MCPcopy Create free account
hub / github.com/Semporia/Scripts / requireConfig

Function requireConfig

jd_joy_new.js:880–900  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

878}
879
880function 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
902function TotalBean() {
903 return new Promise(resolve => {

Callers 1

jd_joy_new.jsFile · 0.70

Calls 4

jsonParseFunction · 0.70
isNodeMethod · 0.45
getdataMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected