2023-07-27 16:14:01 +08:00
|
|
|
|
/*
|
2023-10-11 16:54:21 +08:00
|
|
|
|
活动名称:完善信息有礼 · 超级无线/超级会员
|
|
|
|
|
活动链接:https://cjhy-isv.isvjcloud.com/wx/completeInfoActivity/view/activity?activityId=<活动id>&venderId=<店铺id>
|
|
|
|
|
环境变量:jd_completeInfoActivity_activityUrl // 活动链接
|
|
|
|
|
jd_completeInfoActivity_joinMember // 是否开卡,默认不开卡
|
|
|
|
|
jd_completeInfoActivity_notify // 是否推送通知,默认不推送
|
|
|
|
|
jd_completeInfoActivity_blacklist 黑名单 用&隔开 pin值
|
|
|
|
|
JD_CJ_OPEN // 是否开启CJ活动运行,默认运行
|
|
|
|
|
jd_completeInfoActivity_break // 493后继续执行,默认退出运行(true/false)
|
|
|
|
|
|
2023-07-27 16:14:01 +08:00
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
2023-10-11 16:54:21 +08:00
|
|
|
|
const $ = new Env('完善信息有礼(超级无线/超级会员)')
|
|
|
|
|
var version_='jsjiami.com.v7';const Iiiiliii=I1IIiiI1;(function(ll111lil,I1iiIIl1,liii1II,i1llliIi,i1iliI1,iI11l1il,iliiIlIi){return ll111lil=ll111lil>>0x5,iI11l1il='hs',iliiIlIi='hs',function(llII1ll1,ilI1il1l,IiIiI11i,IliiIiii,I1lIiIlI){const li1lliI1=I1IIiiI1;IliiIiii='tfi',iI11l1il=IliiIiii+iI11l1il,I1lIiIlI='up',iliiIlIi+=I1lIiIlI,iI11l1il=IiIiI11i(iI11l1il),iliiIlIi=IiIiI11i(iliiIlIi),IiIiI11i=0x0;const liI1i1I=llII1ll1();while(!![]&&--i1llliIi+ilI1il1l){try{IliiIiii=-parseInt(li1lliI1(0x24a,'#nvV'))/0x1+parseInt(li1lliI1(0xcc,'l9N@'))/0x2*(parseInt(li1lliI1(0x4f1,'rDW6'))/0x3)+-parseInt(li1lliI1(0x470,'A]DV'))/0x4*(-parseInt(li1lliI1(0x339,'@g%@'))/0x5)+-parseInt(li1lliI1(0x3fc,'LJXP'))/0x6+-parseInt(li1lliI1(0x245,'mN#d'))/0x7+-parseInt(li1lliI1(0x275,'C2NH'))/0x8+parseInt(li1lliI1(0xc8,'%ySW'))/0x9;}catch(II111ili){IliiIiii=IiIiI11i;}finally{I1lIiIlI=liI1i1I[iI11l1il]();if(ll111lil<=i1llliIi)IiIiI11i?i1iliI1?IliiIiii=I1lIiIlI:i1iliI1=I1lIiIlI:IiIiI11i=I1lIiIlI;else{if(IiIiI11i==i1iliI1['replace'](/[KnHIyLVJfxwdYuGXpBCOl=]/g,'')){if(IliiIiii===ilI1il1l){liI1i1I['un'+iI11l1il](I1lIiIlI);break;}liI1i1I[iliiIlIi](I1lIiIlI);}}}}}(liii1II,I1iiIIl1,function(lIll111i,liII1i1i,iilI1li1,lilli1II,ll1Il11i,I111lII,I1llll1){return liII1i1i='\x73\x70\x6c\x69\x74',lIll111i=arguments[0x0],lIll111i=lIll111i[liII1i1i](''),iilI1li1=`\x72\x65\x76\x65\x72\x73\x65`,lIll111i=lIll111i[iilI1li1]('\x76'),lilli1II=`\x6a\x6f\x69\x6e`,(0x141cee,lIll111i[lilli1II](''));});}(0x1880,0x1e580,ilIIl1I,0xc6),ilIIl1I)&&(version_=ilIIl1I);const I1liiI1l=$[Iiiiliii(0x318,'nGcQ')]()?require(Iiiiliii(0x2f0,'25Kj')):'',IIlIilii=require(Iiiiliii(0x284,'2C7Q')),illI1iI1=require('./function/sendJDNotify'),iI1IIllI=require('./function/krgetToken'),{wuxian_savePrize:ii1lilli}=require(Iiiiliii(0x286,'YjAS')),IiIi1Ii1=require('crypto-js');let liiIl1li=[];const lIIIl1i=process[Iiiiliii(0x3f0,'BbS&')][Iiiiliii(0x4bf,'rDW6')]||'',iI1il1i1=process['env'][Iiiiliii(0x3f6,'rDW6')]===Iiiiliii(0x29f,'C2NH'),lilII111=process[Iiiiliii(0x300,')UHb')]['jd_completeInfoActivity_notify']==='true';let II1lI1i='',lIli1IlI='',li1il1li='';if($['isNode']()){if(JSON[Iiiiliii(0x471,'*tLH')](process[Iiiiliii(0x118,'mN#d')])[Iiiiliii(0x1cb,'rD^v')]('GITHUB')>-0x1)process['exit'](0x0);Object[Iiiiliii(0x369,'uJU4')](I1liiI1l)[Iiiiliii(0x27d,'rDW6')](ii1iiI1i=>{liiIl1li['push'](I1liiI1l[ii1iiI1i]);});if(process['env'][Iiiiliii(0x2c0,'hY47')]&&process['env']['JD_DEBUG']===Iiiiliii(0x122,'ADJF'))console[Iiiiliii(0x4d3,'Kx$h')]=()=>{};}else liiIl1li=[$[Iiiiliii(0x489,'#nvV')](Iiiiliii(0x227,'zKuB')),$[Iiiiliii(0x2c6,'WhP(')]('CookieJD2'),...$[Iiiiliii(0x3a0,'$bgj')]($['getdata']('CookiesJD')||'[]')[Iiiiliii(0x1fc,'rDW6')](i1I1III=>i1I1III[Iiiiliii(0x35b,'cBsN')])][Iiiiliii(0x499,'%Jfy')](Iill1Ii1=>!!Iill1Ii1);!liiIl1li[0x0]&&($['msg']($['name'],'【提示】请先获取Cookie'),process[Iiiiliii(0x1d7,'uVV8')](0x1));const iiI1liII=process[Iiiiliii(0x38c,'3Dyw')][Iiiiliii(0x4a5,'!Je9')]===Iiiiliii(0xf6,'LJXP');let l1i1il1i=process[Iiiiliii(0x13c,'Ffv*')][Iiiiliii(0x427,'WhP(')]?process['env'][Iiiiliii(0x1c1,'D2Ft')]:Iiiiliii(0x265,'Fymb'),ii1IlIii='',I11l1II='';$['whitelist']=process[Iiiiliii(0x4cb,'pI(O')][Iiiiliii(0x119,'jJh)')]||ii1IlIii,$[Iiiiliii(0x295,'#nvV')]=process[Iiiiliii(0x14b,'Kx$h')][Iiiiliii(0x198,'YjAS')]||I11l1II,iiIIil11(),lIlilii(),!(async()=>{const l1llIll1=Iiiiliii,ilii1II1={'FWjQC':l1llIll1(0x488,'r^DG'),'XHDgE':function(l1lIl1l,ill11l1i){return l1lIl1l===ill11l1i;},'cTrCP':l1llIll1(0x2e2,'l9N@'),'HEgqi':function(li1liI1I,iiiiilil){return li1liI1I-iiiiilil;},'ifxYw':function(II1liii,iIi1iiIi){return II1liii<iIi1iiIi;},'gOqHl':'bNaaJ','sHvjo':'pgoxa','WUgxf':l1llIll1(0x3fa,'3Dyw'),'maOWO':l1llIll1(0x23d,'l9N@'),'KFPxQ':'venderId','PxvTn':'cjhy','orUqg':function(I1lIliii,llI111li){return I1lIliii===llI111li;},'jrosX':l1llIll1(0x213,'25Kj'),'WNCaE':function(IilIil1i,iI1i1iil){return IilIil1i!==iI1i1iil;},'jIhiB':l1llIll1(0x308,'ADJF'),'HMNFx':function(lIIiiil1,llllIl1I){return lIIiiil1+llllIl1I;},'mQnfZ':function(IilI1iil,iiiIlII){return IilI1iil(iiiIlII);},'jTHTH':functio
|
2023-07-27 16:14:01 +08:00
|
|
|
|
// 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"])
|