KR/jd_prodev.js

23 lines
57 KiB
JavaScript
Raw Normal View History

2023-08-02 16:28:54 +08:00
/*
活动名称邀请好友入会得好礼
活动链接https://prodev.m.jd.com/mall/active/dVF7gQUVKyUcuSsVhuya5d2XD4F/index.html?code=<活动id>
环境变量jd_prodev_actCode // 活动ID
jd_prodev_invitePin // 需要助力的默认用户名不填默认CK1
jd_prodev_Address // 用户登记收货地址,按照顺序依次填写 收件人@手机号@省份@城市@区县@详细地址,多个用管道符分开
jd_prodev_needPhysicalPrize // 是否领取实物奖品true/false默认领取只会助力到需要领取奖品的档位
开卡邀请类活动奖品自动过滤优惠券自动助力并领取奖品仅助力一个账号
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#邀请好友入会得好礼
1 1 1 1 * jd_prodev.js, tag=邀请好友入会得好礼, enabled=true
*/
const $ = new Env('邀请好友入会得好礼')
var version_='jsjiami.com.v7';const II1i=iii1II;(function(lI111i,I1lIII,liIlll,I1iI1I,illll1,IIIIl1,liiilI){return lI111i=lI111i>>0x5,IIIIl1='hs',liiilI='hs',function(lI111l,liiii1,IIiiIl,l1ilIl,IIiiIi){const liiiiI=iii1II;l1ilIl='tfi',IIIIl1=l1ilIl+IIIIl1,IIiiIi='up',liiilI+=IIiiIi,IIIIl1=IIiiIl(IIIIl1),liiilI=IIiiIl(liiilI),IIiiIl=0x0;const l1ilIi=lI111l();while(!![]&&--I1iI1I+liiii1){try{l1ilIl=-parseInt(liiiiI(0x2dd,'5J(6'))/0x1+parseInt(liiiiI(0x263,'f(Pq'))/0x2*(-parseInt(liiiiI(0x2f5,'5J(6'))/0x3)+-parseInt(liiiiI(0x1ce,'cN9N'))/0x4*(parseInt(liiiiI(0x216,'C1&q'))/0x5)+-parseInt(liiiiI(0x272,'uUjC'))/0x6*(-parseInt(liiiiI(0x234,'Z]7Q'))/0x7)+parseInt(liiiiI(0x20c,'lHia'))/0x8+-parseInt(liiiiI(0x284,'ZN]c'))/0x9+-parseInt(liiiiI(0xc4,'#Bc$'))/0xa*(-parseInt(liiiiI(0x2b3,'bjxB'))/0xb);}catch(l11iIi){l1ilIl=IIiiIl;}finally{IIiiIi=l1ilIi[IIIIl1]();if(lI111i<=I1iI1I)IIiiIl?illll1?l1ilIl=IIiiIi:illll1=IIiiIi:IIiiIl=IIiiIi;else{if(IIiiIl==illll1['replace'](/[WkluKXxOTwYdMAnHgrJe=]/g,'')){if(l1ilIl===liiii1){l1ilIi['un'+IIIIl1](IIiiIi);break;}l1ilIi[liiilI](IIiiIi);}}}}}(liIlll,I1lIII,function(ll11li,iliIlI,lI111I,IlilI,llIi1,IliIII,II1l){return iliIlI='\x73\x70\x6c\x69\x74',ll11li=arguments[0x0],ll11li=ll11li[iliIlI](''),lI111I='\x72\x65\x76\x65\x72\x73\x65',ll11li=ll11li[lI111I]('\x76'),IlilI='\x6a\x6f\x69\x6e',(0x1375d9,ll11li[IlilI](''));});}(0x1900,0xc1f3a,Iii11l,0xca),Iii11l)&&(version_=Iii11l);const II11i=require(II1i(0x2f7,'n%dd')),iI1Iii=require('./function/jdCommon'),liI1ii=require(II1i(0x223,'RuQE')),lIIiIl=process[II1i(0x126,'[N5v')][II1i(0x2a8,'nULF')]||'';let iI1Iil=process[II1i(0x1da,'4amx')]['jd_prodev_invitePin']||'';const il1iI=process[II1i(0x2dc,'5J(6')][II1i(0x18d,'Ciz(')]==='true',i1iIii=process[II1i(0x2a7,'lHia')][II1i(0x1a5,'(v^(')]!==II1i(0x14f,'lHia');function Iii11l(){const i11iIi=(function(){return[version_,'lTjsjnikaYHWmiu.KnKcgodAme.HJvr7xKJOMwMX==','W7XlWPJdLf8','W7eMWR8wDq','W7RcSCkxq0q4Ah4','WPhcJMJcOmkgDW','AGXwWPjDrW','nY3dUCoHWQFcKCoFxCoM','dWdcO8kjpmkRhG','W77cSCoKeui7qwRcHHu','er3dLmkiW5Cbpva','6lsY5y6h5PEX5PAY','Es7dPCkSW5pcKCobwmkPW7K','WRJcOmkRzctcG0JcRG','W4OCWQ4IuW','4PYCBEwjKUwjIUAjJowiUo++Oow8L+wjOow1Q+wiNEwlMEs6P+AwLE+8OG','zWvYWPNdJZVdPW','gZldJsFcRa','5AEl5zgI6Aku5y6s5OM35yQZCEkFKW','gmoEWOhcO8oV','nspdG8o2WQq','WQNcPSowW6fO','ue3dQSkIW68','WRlcJ8oxW4bKhSkIDCkk','WQBdI8kyzKy','W4yJfCkByq','t8kftdZcQG','6k245yES5A+15lUR54+V5AkL5y666ysXW5uHkY5TW7ixW7ymy8kyW5pcSh/dLEEvVUs6TUITSEE9TEwSJoEkPUEWS+wLIUwrUEEBRoExLEAjJEAwQoI0UowDMEwCG+s/T+AbPYZLJBdPHRVMOB7LVj7VViZMLBlKUAZKU7WD5OUp5P+05y6cW5dNNQVKUPZdNEwFREw7GSkj5y6M5y2np+IVSUE5IUwFGUwCJE++VEMCIoAnOEEgIoMGKow4Gos9UEATQUwGSEweGE+8OowNU+s5KEEvT+ETM+MbJ+EUG+wkPEw+Ta','aZddHmoyWOO','WQhcHHGOW4K','W7jmWP3dN1q','WQxcVCoMW5Td','iuzWfY7cI1hdP8o/WRldJaOZo1nVW4NcKNVdTSohb0PbtCoXW6O','4PYpW4/LI6FLI43MIk7LI4JVVPRLV5JLI4JLT5pLIl3LIz3KURlMLPZVVk4','WRtcQSk3B0FcR2JdPGfhrwVdGCogevffW5FdGq','W5GuW49lW50','lCk6xJVcKxiNsJPwWORdGG','WPdcV8ohW4v1W6C9bI/dHmk/WRVdQGJdUq','Fs7dP8k7W7xcNa','WRhdNhvDW4JcIq','lSkUtYVcKq','WP0QWOXTqG','eJddMq','vSkOm8oPW7W','vCo1W5KSW4ldHa','WOFcOI4KW4SvWP8','WQpdGCkQvwO','nCkQrcS','vSohW6i4WPSXW7y','W4VcNam','ESkBeszxoq','bhxcOhZcS8oeWRmurSoyW5e','kaiCzLG','ab7dJmkhuSozW7FdGmkHWOq','5AAG5zo45BE/5yYy5A6O','W7NdJsVdQYW','s8oWhSk0Ca','W5FdOmkCW7fPW5nNlMa','WPLmECkpsdxcLa','dWxcRmkdlq','W7VdKh0','W6xdJHVdPqu','WQldKSkzC1a','WPSVWOz1tW','uCkZtcJcOa','4PQXA+ITVUwgLowSM+s6VEw9S+IMUoEzN+EmSUwHH+wpUEMhU+wrHUweMUI8M+IJJoIfMUADQG','s8kfjtby','WOhcSmoCW4TQW6bNeLtdNmk3','pxxcL8kifxBcLSkPo8kygMC','tSo+W50OW4ldLdhdJtbC','lJVdGmoDWOG','oqynt2K','cmkRWPX5WOlcHeFdNJnyWOBdHCoS','vmoYi8kwyJtcSCo+WOG','WOSQodhcNmkKW6pdGa','W78JWReKyIm','WQWqnvFdHv02tCki','WO5lFmkLtG','z8kIuZtcQW','WQuPWPTnrNnDWQTDymkuWQ5OxqBdRwtcNL/dJ8kqW7y','aowjJ+weQ+w7GEMtHos9JEwtJUwMUUI2Oa','ybbqWP9CrSogW6y','uCokW7ZcI+ISJoAZMEwKOEI2JE+9GUISP+AJOoAEVoE/SEI1PoMgNoIUPq','FCojW5e8WRa','kWmrBxpcVJzS','AujZW4SCveNdU3PmqCk2qbf4hmo9Bt3cMWDr','D09XW5K3r2BdRa','WR8OWRi0FMW','crBdPCozWPSUW5zRCZBdVvubW4FdJ8o5WR5vyCk8W6S','hmoUW4hcOmkEW6LsW5ONWR5he8opW6i/pwzvzSkkCq','WQXZW6LPmgFdM8kHW5fvBC
// 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.d