()
| 878 | } |
| 879 | |
| 880 | function requireConfig() { |
| 881 | return new Promise(resolve => { |
| 882 | notify = $.isNode() ? require('./sendNotify') : ''; |
| 883 | //Node.js用户请在jdCookie.js处填写京东ck; |
| 884 | const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; |
| 885 | //IOS等用户直接用NobyDa的jd cookie |
| 886 | if ($.isNode()) { |
| 887 | Object.keys(jdCookieNode).forEach((item) => { |
| 888 | if (jdCookieNode[item]) { |
| 889 | cookiesArr.push(jdCookieNode[item]) |
| 890 | } |
| 891 | }) |
| 892 | if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { |
| 893 | }; |
| 894 | } else { |
| 895 | cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); |
| 896 | } |
| 897 | console.log(`共${cookiesArr.length}个京东账号\n`) |
| 898 | resolve() |
| 899 | }) |
| 900 | } |
| 901 | |
| 902 | function TotalBean() { |
| 903 | return new Promise(resolve => { |
no test coverage detected