2023-07-27 16:14:01 +08:00
|
|
|
|
/*
|
|
|
|
|
活动名称:每日抢好礼 · 超级无线/超级会员
|
2023-09-27 09:22:52 +08:00
|
|
|
|
活动链接:https://lzkj-isv.isvjd.com/activity/daily/wx/indexPage?activityId=<活动id>
|
|
|
|
|
https://cjhy-isv.isvjcloud.com/activity/daily/wx/indexPage?activityId=<活动id>
|
|
|
|
|
环境变量:jd_daily_activityUrl // 活动链接
|
|
|
|
|
jd_daily_joinMember // 是否开卡,默认不开卡
|
|
|
|
|
jd_daily_notify // 是否推送通知,默认不推送
|
|
|
|
|
jd_daily_blacklist 黑名单 用&隔开 pin值
|
|
|
|
|
JD_LZ_OPEN // 是否开启LZ活动运行,默认运行
|
|
|
|
|
JD_CJ_OPEN // 是否开启CJ活动运行,默认运行
|
|
|
|
|
jd_daily_break // 493后继续执行,默认退出运行(true/false)
|
|
|
|
|
|
2023-07-27 16:14:01 +08:00
|
|
|
|
cron:1 1 1 1 *
|
|
|
|
|
============Quantumultx===============
|
|
|
|
|
[task_local]
|
2023-09-27 09:22:52 +08:00
|
|
|
|
#每日抢好礼通用活动
|
|
|
|
|
1 1 1 1 * jd_daily.js, tag=每日抢好礼通用活动, enabled=true
|
2023-07-27 16:14:01 +08:00
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const $ = new Env('每日抢好礼(超级无线/超级会员)')
|
2023-10-18 16:25:09 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const iI1iIli=iII1iI1;(function(iilIIl11,Il111iii,i1IiIlil,Iiili1l,ii11I1l1,IIiI111i,lIi1IIl1){return iilIIl11=iilIIl11>>0x3,IIiI111i='hs',lIi1IIl1='hs',function(I1lli1li,iIIli1II,iI1IliIi,ii1ilIlI,lIiilili){const ilI111ll=iII1iI1;ii1ilIlI='tfi',IIiI111i=ii1ilIlI+IIiI111i,lIiilili='up',lIi1IIl1+=lIiilili,IIiI111i=iI1IliIi(IIiI111i),lIi1IIl1=iI1IliIi(lIi1IIl1),iI1IliIi=0x0;const lIllilll=I1lli1li();while(!![]&&--Iiili1l+iIIli1II){try{ii1ilIlI=-parseInt(ilI111ll(0x2f4,'1fmV'))/0x1+parseInt(ilI111ll(0x222,'26(%'))/0x2*(-parseInt(ilI111ll(0x2c5,'E1[P'))/0x3)+-parseInt(ilI111ll(0x33e,'0E*r'))/0x4*(-parseInt(ilI111ll(0x381,'a8ZQ'))/0x5)+-parseInt(ilI111ll(0x57b,'0Z(i'))/0x6+parseInt(ilI111ll(0x215,'&0s^'))/0x7*(-parseInt(ilI111ll(0x37e,'s2YP'))/0x8)+-parseInt(ilI111ll(0x386,'[a1a'))/0x9*(-parseInt(ilI111ll(0x3cb,'zOUs'))/0xa)+parseInt(ilI111ll(0x248,'zOUs'))/0xb;}catch(iIIil1i1){ii1ilIlI=iI1IliIi;}finally{lIiilili=lIllilll[IIiI111i]();if(iilIIl11<=Iiili1l)iI1IliIi?ii11I1l1?ii1ilIlI=lIiilili:ii11I1l1=lIiilili:iI1IliIi=lIiilili;else{if(iI1IliIi==ii11I1l1['replace'](/[gYnwIpRSkthVPOBLylfUF=]/g,'')){if(ii1ilIlI===iIIli1II){lIllilll['un'+IIiI111i](lIiilili);break;}lIllilll[lIi1IIl1](lIiilili);}}}}}(i1IiIlil,Il111iii,function(l1I1l1,iIIl1ilI,iIlII11I,I1il1ilI,liIli1Ii,lIl1I1lI,IIiIlIl1){return iIIl1ilI='\x73\x70\x6c\x69\x74',l1I1l1=arguments[0x0],l1I1l1=l1I1l1[iIIl1ilI](''),iIlII11I=`\x72\x65\x76\x65\x72\x73\x65`,l1I1l1=l1I1l1[iIlII11I]('\x76'),I1il1ilI=`\x6a\x6f\x69\x6e`,(0x1433c6,l1I1l1[I1il1ilI](''));});}(0x608,0x55bba,ll11I1II,0xc3),ll11I1II)&&(version_=ll11I1II);const II1I1lIi=$[iI1iIli(0x4ec,'zOUs')]()?require('./jdCookie'):'',lI1i1i11=require('./function/jdCommon'),iII1II=require(iI1iIli(0x548,'KC4f')),Ill1I1lI=require(iI1iIli(0x3fa,'EmY[')),{wuxian_savePrize:liIliI1l}=require('./function/krsavePrize'),ll1I11li=require(iI1iIli(0x4f3,'s2YP'));function iII1iI1(_0x26c8c1,_0x5491d5){const _0x4023be=ll11I1II();return iII1iI1=function(_0x4feb5d,_0x5764a4){_0x4feb5d=_0x4feb5d-0x1cf;let _0x1f81ef=_0x4023be[_0x4feb5d];if(iII1iI1['sgjDrg']===undefined){var _0x5484be=function(_0x13e716){const _0x2df018='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3508d3='',_0x472b9e='';for(let _0x4952c4=0x0,_0x4d6591,_0x10cd08,_0x193fef=0x0;_0x10cd08=_0x13e716['charAt'](_0x193fef++);~_0x10cd08&&(_0x4d6591=_0x4952c4%0x4?_0x4d6591*0x40+_0x10cd08:_0x10cd08,_0x4952c4++%0x4)?_0x3508d3+=String['fromCharCode'](0xff&_0x4d6591>>(-0x2*_0x4952c4&0x6)):0x0){_0x10cd08=_0x2df018['indexOf'](_0x10cd08);}for(let _0xc0fc6b=0x0,_0x34ed04=_0x3508d3['length'];_0xc0fc6b<_0x34ed04;_0xc0fc6b++){_0x472b9e+='%'+('00'+_0x3508d3['charCodeAt'](_0xc0fc6b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x472b9e);};const _0x578042=function(_0x543b12,_0x1e1a09){let _0x33dfa9=[],_0x20099c=0x0,_0x5cfb32,_0x15fe7e='';_0x543b12=_0x5484be(_0x543b12);let _0x39053e;for(_0x39053e=0x0;_0x39053e<0x100;_0x39053e++){_0x33dfa9[_0x39053e]=_0x39053e;}for(_0x39053e=0x0;_0x39053e<0x100;_0x39053e++){_0x20099c=(_0x20099c+_0x33dfa9[_0x39053e]+_0x1e1a09['charCodeAt'](_0x39053e%_0x1e1a09['length']))%0x100,_0x5cfb32=_0x33dfa9[_0x39053e],_0x33dfa9[_0x39053e]=_0x33dfa9[_0x20099c],_0x33dfa9[_0x20099c]=_0x5cfb32;}_0x39053e=0x0,_0x20099c=0x0;for(let _0x42eb62=0x0;_0x42eb62<_0x543b12['length'];_0x42eb62++){_0x39053e=(_0x39053e+0x1)%0x100,_0x20099c=(_0x20099c+_0x33dfa9[_0x39053e])%0x100,_0x5cfb32=_0x33dfa9[_0x39053e],_0x33dfa9[_0x39053e]=_0x33dfa9[_0x20099c],_0x33dfa9[_0x20099c]=_0x5cfb32,_0x15fe7e+=String['fromCharCode'](_0x543b12['charCodeAt'](_0x42eb62)^_0x33dfa9[(_0x33dfa9[_0x39053e]+_0x33dfa9[_0x20099c])%0x100]);}return _0x15fe7e;};iII1iI1['CxIJrW']=_0x578042,_0x26c8c1=arguments,iII1iI1['sgjDrg']=!![];}const _0x5a05d7=_0x4023be[0x0],_0x1afce4=_0x4feb5d+_0x5a05d7,_0x3290fe=_0x26c8c1[_0x1afce4];return!_0x3290fe?(iII1iI1['jWdoBw']===undefined&&(iII1iI1['jWdoBw']=!![]),_0x1f81ef=iII1iI1['CxIJrW'](_0x1f81ef,_0x5764a4),_0x26c8c1[_0x1afce4]=_0x1f81ef):_0x1f81ef=_0x3290fe,_0x1f81ef;},iII1iI1(_0x26c8c1,_0x5491d5);}let iIIllII=[];const i111iiIi=
|
2023-07-27 16:14:01 +08:00
|
|
|
|
// prettier-ignore
|
2023-09-27 09:22:52 +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"])
|