()
| 72 | } |
| 73 | |
| 74 | function requireConfig() { |
| 75 | return new Promise(resolve => { |
| 76 | notify = $.isNode() ? require('./sendNotify') : ''; |
| 77 | const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; |
| 78 | if ($.isNode()) { |
| 79 | Object.keys(jdCookieNode).forEach((item) => { |
| 80 | if (jdCookieNode[item]) { |
| 81 | cookiesArr.push(jdCookieNode[item]) |
| 82 | } |
| 83 | }) |
| 84 | if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; |
| 85 | } else { |
| 86 | cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); |
| 87 | } |
| 88 | console.log(`共${cookiesArr.length}个京东账号\n`) |
| 89 | resolve() |
| 90 | }) |
| 91 | } |
| 92 | |
| 93 | function TotalBean() { |
| 94 | return new Promise(async resolve => { |
no test coverage detected