KR/jd_shopSign.js

29 lines
107 KiB
JavaScript
Raw Normal View History

2023-08-06 19:11:07 +08:00
/*
活动名称店铺签到 · 超级无线/超级会员/lorealjdcampaign
活动链接https://lzkj-isv.isvjd.com/sign/sevenDay/signActivity?activityId=<活动id>
https://lzkj-isv.isvjd.com/sign/signActivity2?activityId=<活动id>
https://cjhy-isv.isvjcloud.com/sign/sevenDay/signActivity?activityId=<活动id>
https://cjhy-isv.isvjcloud.com/sign/signActivity?activityId=<活动id>
https://lorealjdcampaign-rc.isvjcloud.com/prod/cc/cjwx/sign/signActivity2?activityId=<活动id>
2023-09-27 09:24:23 +08:00
环境变量jd_shopSign_activityUrl // 活动链接
jd_shopSign_joinMember // 是否入会true/false默认不入会
jd_shopSign_notify // 是否推送通知true/false默认不推送
jd_shopSign_blacklist 黑名单 &隔开 pin值
JD_LZ_OPEN // 是否开启LZ活动运行默认运行
JD_CJ_OPEN // 是否开启CJ活动运行默认运行
jd_shopSign_break // 493后继续执行默认退出运行true/false
此脚本主要监控使用,部分活动需要加入会员才能签到
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#无线店铺签到
1 1 1 1 * jd_shopSign.js, tag=无线店铺签到, enabled=true
2023-08-06 19:11:07 +08:00
*/
const $ = new Env('无线店铺签到(超级无线/超级会员)')
2023-09-27 09:24:23 +08:00
var version_='jsjiami.com.v7';const iIl1lIIi=l1I1Il11;(function(IIlI1iIl,l1ilIl,Il111ii,l1iIlii,lii1IIl1,l1l1ll,iIlIiiIl){return IIlI1iIl=IIlI1iIl>>0x8,l1l1ll='hs',iIlIiiIl='hs',function(llil1llI,iIlIllii,II1llI,IlI11il1,l11I1IIi){const l1lll1I=l1I1Il11;IlI11il1='tfi',l1l1ll=IlI11il1+l1l1ll,l11I1IIi='up',iIlIiiIl+=l11I1IIi,l1l1ll=II1llI(l1l1ll),iIlIiiIl=II1llI(iIlIiiIl),II1llI=0x0;const I1l1i11l=llil1llI();while(!![]&&--l1iIlii+iIlIllii){try{IlI11il1=-parseInt(l1lll1I(0x273,'LzJ3'))/0x1*(-parseInt(l1lll1I(0x13d,'f*M3'))/0x2)+-parseInt(l1lll1I(0x39d,'gELA'))/0x3*(-parseInt(l1lll1I(0x249,'MnHp'))/0x4)+-parseInt(l1lll1I(0x220,'BMNy'))/0x5+-parseInt(l1lll1I(0x1ac,'CIQ)'))/0x6+-parseInt(l1lll1I(0x4a7,'a52v'))/0x7+-parseInt(l1lll1I(0xfa,'a52v'))/0x8+parseInt(l1lll1I(0x252,'O(&n'))/0x9*(parseInt(l1lll1I(0x370,')%L*'))/0xa);}catch(i1l11ilI){IlI11il1=II1llI;}finally{l11I1IIi=I1l1i11l[l1l1ll]();if(IIlI1iIl<=l1iIlii)II1llI?lii1IIl1?IlI11il1=l11I1IIi:lii1IIl1=l11I1IIi:II1llI=l11I1IIi;else{if(II1llI==lii1IIl1['replace'](/[SYKIhbWRwCLEOtrqy=]/g,'')){if(IlI11il1===iIlIllii){I1l1i11l['un'+l1l1ll](l11I1IIi);break;}I1l1i11l[iIlIiiIl](l11I1IIi);}}}}}(Il111ii,l1ilIl,function(liiilIi,lIi1i11I,lli1iIii,IiIIilIl,liI1Il1i,li1l1IlI,liIII1i1){return lIi1i11I='\x73\x70\x6c\x69\x74',liiilIi=arguments[0x0],liiilIi=liiilIi[lIi1i11I](''),lli1iIii=`\x72\x65\x76\x65\x72\x73\x65`,liiilIi=liiilIi[lli1iIii]('\x76'),IiIIilIl=`\x6a\x6f\x69\x6e`,(0x1401f8,liiilIi[IiIIilIl](''));});}(0xc500,0x2dcb6,IIIi1IlI,0xc7),IIIi1IlI)&&(version_=IIIi1IlI);function IIIi1IlI(){const li11iIlI=(function(){return[...[version_,'IwCjsEjRKtiamwir.wchqIoYOwm.SEvC7WLywEbr==','WQ7cJ8oivc4','W5JdUceBWOhcVmkNfCovrJLvka','wCoEWOr4WRldP8kdW4NdUmoBpW','t8oLWQhdQmoAme4','z8o0WOe','lqddJ3y','WODoc1lcJG','zZH/W7BcJxNdRCoz','y8oWvsZdGa','sKrzW47dIeOMW7HDnG','WPbiWO5JWPa','WOyUWPibhSkBC8kDWP1OoxG','F8o5CX7dIq','W6RcRHz+mYnQ','bSoUiCo2vCoj','w0ZcUCkhtmoeqSk2','Dw5IW6FdThWhW418','CMZcNCkl','WPePWO4RaSkY','kGBdIhRcN8oFW7vkuG','qc7cLrFcN8oZW6nPsG','W63dJCoqaCka','DMvOW6BdT2CGW4W','W6hcGCkwWORcSMmxkCkKcu9pWR8','AxroW5pdNq','vSoxWRHtWPq','b8oVpCoAvCokprxdUa','pGFdRmkXWP/cH2RdGwFcRq','WR1QoCoiW4BcHHm','B8kKsWNdUSohseW','5P2K6ioE6iY05yYy5BU/6zcS5l+c5OgG','WOdcHCoYWQb+','gXxdP8kVWOm','fNpdQ8k9lq','WOq5WPq','WR7cV8olWOvT','5Q6/c8kS5Bw96kkW6zM+5yUg772T6kYa6l6bgJBLIRFPKjpLKzxLHRVMIQVOOQ/OH6pMNOpVVQq','bmogW7KmW4/cRYJdRCkw','B1/cRmkquW','WQDVoComW4tcMHmcW48vcNS','xHOtW6eEW7BcUYBcNW','EqBcL8ojW4e','ymo0WQFdNSog','we7cVSkJCCoAsq','AxFcK8kuFmkdfCoprSocC3y','FW5jtCks','W4pdOsyrWPVcUmkjhW','W4BdOYGJWP0','b8oYkmoDAmozoWm','W4pcLZq','WPe9WO4ka8k7','v8o1WRpdPa','qcdcNXxcQmoYW50','WOJcSSkzxcu','zML+','WRJdVmo5amkyWRbQW4acW5RcGe3dMEITQ+AYQowNUUI1NU+8IEIUH+AGTUAFUEE9G+I2NUMhT+IUTq','WQJdJSo4hmkLWOBdT8kJxCoWtCoOWR5a','yJj4t8ky','qUwSGoEjUdq','p8kOpG','WPzoiu4','wfxcU8k6qmok','WQerWQ7dG1e','WQ0wWOGDcq','WPpcQmkgFYCxW4a','W63cIZXmWPJcGCopwG','x1hdO8k9ifLRqmoE','5Q605PAB5Awe5yQ077+d','WR4vimo7WRm','iXRdRSkUWOtcLutdIW','5P+n6ioh6i2q5y+b55ED5OQq6yMB5P6i5lYR5Ogj','WPNcMCkWqa4','lMlcGSktBSkpe8o/B8kq','jmoOWO9MWQFcJCoRW6pdGW3cVSkWlCoMWRmdmCkvWRLVWPexdCksWRVdKSkj','WOC9WPqp','WQjpn0FcNa','W7iNWQq','B8ojEG7dHW','W6BcUHzBnW','6i6Q5B+I772M','EaCoW6ufW57cRr/cQmoeWR3dNW','WRBdT8oKmSkHWQT3W6aHW6VcPMG','5RsA5yUY5BkM5P+05B+j5AAu77295B6g5As45Pw46zwI77+7','W5lcMI5+cG','idFdPSk/WQW','CSoxWRvSWQu','W5VcQJ1OWPi','WR3dUmo+i8kKWRb1','tXPVxCkF','Bg9H','4PIIFUIUPUwIVUwgKEAJGUw9MUAUIoEGTEEARUMsIoApMG','W5NdUJaF','FmoRcSoN','wf3dPCk5n0rpumo9n8o/WOu','ASo4WPjOWR/dI8oSW7/dUaFcTmkr','paRdPCk1WQG','W5VcIIbpWPJcGSoX','BuhcOSkdvG','aCk5W5RdISoevsbMuwW','CCoXyH3dPcP1W7e','y3hcNSko','xdNcJKaJ','uSouWPC','D8o3CGldHcP1W7e','W65fW5CaW5y','xYtcKq','DCo8ba','5lIM5A295z+/','h8kuifST','Bd5+W4FcQ3i','AWypW4an','WPv7WO9pWQq','WOi/WPqhgSk/ySkxWQDT','AmoBqdZdSG','caPGBmk3WRBcGNuv','WQznWO57WQW','WRToaM/cGG','W6m9jCk8FSkxiCkseK4','W7xcSGXSmcLOW6G','oYhdT3dcVq','oHVdQSkhWPO','DCk1W7PPshPgW7y','pSk0k0SAW7nYkmoeWO1/WRpdV8o1vM4','WQKxWRldINvk','W7i/i8kMBCkRj8kh','Amk0W4PXt3DnW6i','warZB8k7prC8WPC','WQPGjmoz','DrOpW74zW7lcPqK','WOzzWOrYWOBdLgpcPmkT','C3ZcGCk7W6m','E3V
2023-08-06 19:11:07 +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"])