2023-07-27 16:14:01 +08:00
|
|
|
|
/*
|
2023-10-06 11:59:10 +08:00
|
|
|
|
活动名称:关注店铺有礼(超级无线)
|
|
|
|
|
活动链接:https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10069&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|
|
|
|
https://lzkj-isv.isvjcloud.com/prod/cc/interaction/v1/index?activityType=10069&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|
|
|
|
https://lorealjdcampaign-rc.isvjcloud.com/interact/index?activityType=10069&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
2023-07-27 16:14:01 +08:00
|
|
|
|
环境变量:jd_lzkj_loreal_lkFollowShop_url // 活动链接
|
2023-10-06 11:59:10 +08:00
|
|
|
|
jd_lzkj_loreal_lkFollowShop_opencard // 是否入会(true/false),默认不入会
|
|
|
|
|
jd_lzkj_loreal_lkFollowShop_Notify // 是否推送通知(true/false),默认不推送
|
|
|
|
|
jd_lzkj_loreal_lkFollowShop_break // 493后继续执行,默认退出运行(true/false)
|
2023-07-27 16:14:01 +08:00
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
2023-10-06 11:59:10 +08:00
|
|
|
|
const $ = new Env('关注店铺有礼(超级无线)')
|
|
|
|
|
var version_='jsjiami.com.v7';const IliIlii=l1IIlIiI;(function(iIl111iI,lilII1,lliIII1i,IIl1iI1l,il1I1lI1,l11l11I1,i1iIiIlI){return iIl111iI=iIl111iI>>0x3,l11l11I1='hs',i1iIiIlI='hs',function(lliliilI,IliIi1i,ilIiI1il,lIi1lIIi,IiiiIIII){const IlI1Ill=l1IIlIiI;lIi1lIIi='tfi',l11l11I1=lIi1lIIi+l11l11I1,IiiiIIII='up',i1iIiIlI+=IiiiIIII,l11l11I1=ilIiI1il(l11l11I1),i1iIiIlI=ilIiI1il(i1iIiIlI),ilIiI1il=0x0;const iilIIii=lliliilI();while(!![]&&--IIl1iI1l+IliIi1i){try{lIi1lIIi=-parseInt(IlI1Ill(0x3cf,'[tWo'))/0x1*(parseInt(IlI1Ill(0x346,'Tvhd'))/0x2)+-parseInt(IlI1Ill(0x231,'GIS7'))/0x3*(-parseInt(IlI1Ill(0x278,'%CG@'))/0x4)+parseInt(IlI1Ill(0x2a0,'!!#5'))/0x5+parseInt(IlI1Ill(0x12c,'0YVr'))/0x6+parseInt(IlI1Ill(0x1a2,'PZEH'))/0x7*(parseInt(IlI1Ill(0x175,'*ye%'))/0x8)+parseInt(IlI1Ill(0x268,'F0hP'))/0x9*(parseInt(IlI1Ill(0x3fb,'PKP@'))/0xa)+-parseInt(IlI1Ill(0x275,'!YmP'))/0xb*(parseInt(IlI1Ill(0x209,'Tvhd'))/0xc);}catch(lI1Il1I){lIi1lIIi=ilIiI1il;}finally{IiiiIIII=iilIIii[l11l11I1]();if(iIl111iI<=IIl1iI1l)ilIiI1il?il1I1lI1?lIi1lIIi=IiiiIIII:il1I1lI1=IiiiIIII:ilIiI1il=IiiiIIII;else{if(ilIiI1il==il1I1lI1['replace'](/[KEbyHhCYlqLTxMwXJDVt=]/g,'')){if(lIi1lIIi===IliIi1i){iilIIii['un'+l11l11I1](IiiiIIII);break;}iilIIii[i1iIiIlI](IiiiIIII);}}}}}(lliIII1i,lilII1,function(Iil1iI1l,iiiI1I11,i1Illi1,li1llii1,liIIIIi,iiillIll,Iil1illI){return iiiI1I11='\x73\x70\x6c\x69\x74',Iil1iI1l=arguments[0x0],Iil1iI1l=Iil1iI1l[iiiI1I11](''),i1Illi1=`\x72\x65\x76\x65\x72\x73\x65`,Iil1iI1l=Iil1iI1l[i1Illi1]('\x76'),li1llii1=`\x6a\x6f\x69\x6e`,(0x140fd5,Iil1iI1l[li1llii1](''));});}(0x5e0,0x233dd,i1l11ilI,0xbe),i1l11ilI)&&(version_=i1l11ilI);const iIIliIl=require(IliIlii(0x309,'PACV')),iiI11II1=require(IliIlii(0x2a9,'vqMI')),lIiIIiI1=require(IliIlii(0x224,'o0$w')),i11IlliI=require('./function/krgetToken'),{loreal_savePrize:IlIl1ill}=require('./function/krsavePrize'),liIlIlll=process[IliIlii(0x409,'chCq')][IliIlii(0x412,'PKP@')]||'',lii1IIll=process[IliIlii(0x18b,'!YmP')][IliIlii(0x13b,'lX57')]==='true',IiIl1lI=process[IliIlii(0x37c,'PZEH')][IliIlii(0x306,'yInl')]===IliIlii(0x238,'r2a%'),li11lliI=process['env'][IliIlii(0x2dc,'DTSL')]==='true';function l1IIlIiI(_0x2da02e,_0x369154){const _0x4b9b4c=i1l11ilI();return l1IIlIiI=function(_0x2385d8,_0x21cd0a){_0x2385d8=_0x2385d8-0x125;let _0x49accc=_0x4b9b4c[_0x2385d8];if(l1IIlIiI['RxEDYg']===undefined){var _0x28ef00=function(_0xb21a00){const _0x7c9bd3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x35444c='',_0x5087e3='';for(let _0x4c952e=0x0,_0x3ff0a0,_0x30423f,_0xf726c6=0x0;_0x30423f=_0xb21a00['charAt'](_0xf726c6++);~_0x30423f&&(_0x3ff0a0=_0x4c952e%0x4?_0x3ff0a0*0x40+_0x30423f:_0x30423f,_0x4c952e++%0x4)?_0x35444c+=String['fromCharCode'](0xff&_0x3ff0a0>>(-0x2*_0x4c952e&0x6)):0x0){_0x30423f=_0x7c9bd3['indexOf'](_0x30423f);}for(let _0x1c6cc7=0x0,_0x248a3c=_0x35444c['length'];_0x1c6cc7<_0x248a3c;_0x1c6cc7++){_0x5087e3+='%'+('00'+_0x35444c['charCodeAt'](_0x1c6cc7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5087e3);};const _0x83fd9e=function(_0x5c3523,_0x5591e2){let _0x54b2d4=[],_0xd94ae2=0x0,_0x286578,_0x4de108='';_0x5c3523=_0x28ef00(_0x5c3523);let _0x437bd3;for(_0x437bd3=0x0;_0x437bd3<0x100;_0x437bd3++){_0x54b2d4[_0x437bd3]=_0x437bd3;}for(_0x437bd3=0x0;_0x437bd3<0x100;_0x437bd3++){_0xd94ae2=(_0xd94ae2+_0x54b2d4[_0x437bd3]+_0x5591e2['charCodeAt'](_0x437bd3%_0x5591e2['length']))%0x100,_0x286578=_0x54b2d4[_0x437bd3],_0x54b2d4[_0x437bd3]=_0x54b2d4[_0xd94ae2],_0x54b2d4[_0xd94ae2]=_0x286578;}_0x437bd3=0x0,_0xd94ae2=0x0;for(let _0x1218ae=0x0;_0x1218ae<_0x5c3523['length'];_0x1218ae++){_0x437bd3=(_0x437bd3+0x1)%0x100,_0xd94ae2=(_0xd94ae2+_0x54b2d4[_0x437bd3])%0x100,_0x286578=_0x54b2d4[_0x437bd3],_0x54b2d4[_0x437bd3]=_0x54b2d4[_0xd94ae2],_0x54b2d4[_0xd94ae2]=_0x286578,_0x4de108+=String['fromCharCode'](_0x5c3523['charCodeAt'](_0x1218ae)^_0x54b2d4[(_0x54b2d4[_0x437bd3]+_0x54b2d4[_0xd94ae2])%0x100]);}return _0x4de108;};l1IIlIiI['qfoPBe']=_0x83fd9e,_0x2da02e=arguments,l1IIlIiI['RxEDYg']=!![];}const _0x45513e=_0x4b9b4c[0x0],_0x407a65=_0x2385d8+_0x45513e,_0x6fc47d=_0x2da02e[_0x407
|
2023-07-27 16:14:01 +08:00
|
|
|
|
// prettier-ignore
|
2023-10-06 11:59:10 +08:00
|
|
|
|
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"])
|