| 463 | }; |
| 464 | |
| 465 | async function callback(error, response, body) { |
| 466 | if (!error && response.statusCode == 200) { |
| 467 | // $.log(body); |
| 468 | let result = JSON.parse(body) |
| 469 | let message = "" |
| 470 | if (result.data.length > 0) { |
| 471 | message += message += `\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n` |
| 472 | } |
| 473 | for (let obj of result.data) { |
| 474 | if (obj.hasOwnProperty('fillStatus') && obj.fillStatus != true) { |
| 475 | message += JSON.stringify(obj) |
| 476 | } |
| 477 | } |
| 478 | if (message.length > 0) { |
| 479 | await notify.sendNotify($.name, message); |
| 480 | } |
| 481 | resolve() |
| 482 | } |
| 483 | } |
| 484 | |
| 485 | request(options, callback); |
| 486 | |