2024-11-12 11:17:55 +08:00
|
|
|
|
/*
|
|
|
|
|
活动名称:京东资产变动
|
|
|
|
|
环境变量:
|
|
|
|
|
jd_bean_change_interval // 自定义运行间隔时长(整数,单位毫秒),默认1500
|
|
|
|
|
jd_bean_change_pinFilter // 账号pin过滤,多个用@进行分割
|
|
|
|
|
jd_bean_change_farm // 是否开启东东农场查询(true/false),默认开启
|
|
|
|
|
jd_bean_change_xinfarm // 是否开启新东东农场查询(true/false),默认开启
|
|
|
|
|
jd_bean_change_wyw // 是否开启玩一玩奖票查询(true/false),默认开启
|
|
|
|
|
jd_bean_change_ecard // 是否开启E卡余额查询(true/false),默认开启
|
|
|
|
|
jd_bean_change_marketcard // 是否开启超市卡余额查询(true/false),默认开启
|
|
|
|
|
jd_bean_change_phonebill // 是否开启话费积分查询(true/false),默认开启
|
|
|
|
|
jd_bean_change_comment // 是否开启评论查询(true/false),默认开启
|
|
|
|
|
jd_bean_change_hongbao // 是否开启红包查询(true/false),默认开启
|
|
|
|
|
jd_bean_change_jingbean // 是否开启过期京豆查询(true/false),默认开启
|
|
|
|
|
jd_bean_change_market // 是否开启汪贝余额查询(true/false),默认开启
|
|
|
|
|
jd_bean_change_coupon // 是否开启优惠券查询(true/false),默认开启
|
|
|
|
|
jd_bean_change_wallet // 是否开启钱包余额查询(true/false),默认开启
|
|
|
|
|
jd_bean_change_baitiao // 是否开启白条查询(true/false),默认开启
|
|
|
|
|
jd_bean_change_hbChannel // 是否开启小程序省钱币查询(true/false),默认开启
|
|
|
|
|
jd_bean_change_plantBean // 是否开启种豆得豆查询(true/false),默认开启
|
|
|
|
|
jd_bean_change_try // 是否开启试用通知(true/false),默认开启
|
|
|
|
|
jd_bean_change_prizeNotify // 是否单独推送账号通知(true/false),默认不推送
|
|
|
|
|
jd_bean_change_mainnotify // 是否开启成熟和快过期通知(true/false),默认不推送
|
|
|
|
|
jd_bean_change_notify // 是否推送通知(true/false),默认不推送
|
|
|
|
|
jd_bean_change_intpersent // 分段通知数量,默认5
|
|
|
|
|
|
|
|
|
|
## wxpusher一对一推送
|
|
|
|
|
export WP_APP_TOKEN_ONE="" //你的UID
|
|
|
|
|
## 查询变量默认开启,不需要开启的变量请设置为false即可关闭,有条件上代理
|
|
|
|
|
|
|
|
|
|
cron:15 9 * * *
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const $ = new Env('京东资产变动')
|
2024-12-13 11:18:19 +08:00
|
|
|
|
function E7uALC(){}var GIFuKSR=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],O81GXLV,hoK3I_,FoED6_a,zCUoP4M,WKSmUCx,yVlI1uu,qPmGuP4,SsOgno,lwHY0V,Oklj1_F,_Voq_s1,ccpj0uX,Tig7RvO,M3Q9mTr,vmE62b,rBFlPx,Op1M1qp,vTNxEL,FiySBp,JiwIdrE,WqsGHfU,yCg82rN,WLhKMY,ikYiuX,P180C5r,C6PgXZ,YMQnTJh;function LaGO_Z(E7uALC){return O81GXLV[E7uALC>-0x48?E7uALC+0x47:E7uALC-0x25]}E7uALC(O81GXLV=OVEwGE(),hoK3I_=zK7M04K((E7uALC,GIFuKSR)=>{return GIFuKSR(E7uALC())},0x2)(vE64I0Z,mpzCUjI));var FNMP_0R=[],e0EqlAe=['{05bdH1_','\u0030\u0075\u005b\u003e\u0038\u002b\u002a\u003a','\u004c\u0021\u0069\u003c\u0026\u004b\u002a\u0039',';q8+K9#P','\x48\x4a\x6d\x40\x7e','\u0041\u0069\u0032\u0040','\x38\x47\x43\x61\x76\x7c\x5a\x66\x7c\x2f\x74\x51\x3a\x7c\x4d\x43\x7e\x5d\x3e\x58\x24\x74\x5f\x34\x6d\x77\x60\x3a\x63','\u0038\u0047\u0043\u0061\u0076\u007c\u005a\u0066\u007c\u002f\u0074\u0051\u003a\u007c\u004d\u0043\u007e\u005d\u0070\u0036\u0066\u0039\u005b\u0079\u005e\u0045\u0038\u0068\u0063','\u0051\u004a\u0055\u0078\u0047','\u0038\u0047\u0043\u0061\u0076\u007c\u005a\u0066\u007c\u002f\u0074\u0051\u003a\u007c\u004d\u0043\u007e\u005d\u0030\u004b\u0066\u0039\u003d\u0043\u002b\u0055','\x38\x47\x43\x61\x76\x7c\x5a\x66\x7c\x2f\x74\x51\x3a\x7c\x4d\x43\x7e\x5d\x43\x37\x66\x39\x3d\x43\x2b\x55','\x6a\x71\x57\x6e\x29','\x38\x47\x43\x61\x76\x7c\x5a\x66\x7c\x2f\x74\x51\x3a\x7c\x4d\x43\x7e\x5d\x66\x36\x33\x37\x37\x34\x3a\x5f\x35\x74\x79\x3a\x68\x24','\x38\x47\x43\x61\x76\x7c\x5a\x66\x7c\x2f\x74\x51\x3a\x7c\x4d\x43\x7e\x5d\x40\x6e\x40\x37\x77\x39\x61\x30\x64\x5f\x35\x3f\x3f','\x5d\x41\x66\x34\x69\x51\x33\x4f\x5e\x4a\x5a\x3f\x71\x2a\x26\x4d\x7b\x69\x58\x3d','8GCav|Zf|/tQ:|MC~]>nJK"sN0hsPN','\x29\x26\x7a\x6e\x48\x39\x3c','\u0038\u0047\u0043\u0061\u0076\u007c\u005a\u0066\u007c\u002f\u0074\u0051\u003a\u007c\u004d\u0043\u007e\u005d\u0041\u002b\u0069\u0066\u0043\u0050','uzxK+|<','8GCav|Zf|/tQ:|MC~]}MJKH}mE6','8GCav|Zf|/tQ:|MC~]bnPF<','8GCav|Zf|/tQ:|MC~]"6,Vj}20Jskx','\u0038\u0047\u0043\u0061\u0076\u007c\u005a\u0066\u007c\u002f\u0074\u0051\u003a\u007c\u004d\u0043\u007e\u005d\u0038\u005e\u0042\u0035\u0063\u0029\u003d','\u0038\u0047\u0043\u0061\u0076\u007c\u005a\u0066\u007c\u002f\u0074\u0051\u003a\u007c\u004d\u0043\u007e\u005d\u0079\u002b\u0040\u0037\u0077\u0061\u0047\u0068\u004c','\u0038\u0047\u0043\u0061\u0076\u007c\u005a\u0066\u007c\u002f\u0074\u0051\u003a\u007c\u004d\u0043\u007e\u005d\u0048\u0025\u0056\u0035\u0046\u0070\u0053\u0051\u005d\u0026\u004b\u0078','\x38\x47\x43\x61\x76\x7c\x5a\x66\x7c\x2f\x74\x51\x3a\x7c\x4d\x43\x7e\x5d\x40\x6e\x69\x66\x42\x34\x24\x23','8GCav|Zf|/tQ:|MC~]@nifB4[El&zrG','\x38\x47\x43\x61\x76\x7c\x5a\x66\x7c\x2f\x74\x51\x3a\x7c\x4d\x43\x7e\x5d\x48\x25\x6e\x59\x72\x34\x64\x68\x24\x68\x6b\x78','\u0038\u0047\u0043\u0061\u0076\u007c\u005a\u0066\u007c\u002f\u0074\u0051\u003a\u007c\u004d\u0043\u007e\u005d\u0067\u005e\u006c\u005e\u0065\u0034\u0032\u0030\u005f','\x38\x47\x43\x61\x76\x7c\x5a\x66\x7c\x2f\x74\x51\x3a\x7c\x4d\x43\x7e\x5d\x68\x5e\x44\x4b\x56\x79\x47\x68\x4c','\x38\x47\x43\x61\x76\x7c\x5a\x66\x7c\x2f\x74\x51\x3a\x7c\x4d\x43\x7e\x5d\x4b\x2b\x4a\x4b\x56\x79\x5e\x68\x55\x45\x63','\x38\x47\x43\x61\x76\x7c\x5a\x66\x7c\x2f\x74\x51\x3a\x7c\x4d\x43\x7e\x5d\x67\x5e\x61\x5a\x59\x4f\x32\x30','8GCav|Zf|/tQ:|MC~]bn#^&4$#','\u0038\u0047\u0043\u0061\u0076\u007c\u005a\u0066\u007c\u002f\u0074\u0051\u003a\u007c\u004d\u0043\u007e\u005d\u0055\u004c\u0032\u0075\u003c','\u0038\u0047\u0043\u0061\u0076\u007c\u005a\u0066\u007c\u002f\u0074\u0051\u003a\u007c\u004d\u0043\u007e\u005d\u0070\u0036\u0066\u0039\u0036\u0034\u006d\u0045\u002f\u0073\u0059\u006f\u0033',scLZ44x(0x0),'D|"MR+^7l}wq8cO"JAgojMNc','\u0031\u003f\u0055\u0040\u007d\u0037\u0065\u0034\u003d','g?wYd',scLZ44x(0x1),'\u0069\u0060\u0065\u0025\u006e\u007c\u0026\u0050','\u004a\u0036\u0058\u0025','Pxmn)','APE."mq$bd{rj"|9.;S$bNfj)Kng>imI?n*+)','.5p%~','\x6a\x33\x71\x61\x50\x3e\x51\x50','\u0060\u005b\u0045\u0036\u006d\u0037\u0070\u0050','\x36\x60\x55\x40\x34\x7c\x3c','\u0050\u0078\u006d\u006e\u0029','\u0026\u003e\u0068\u0078\u0030\u002e\u0030\u0063','\u005f\u0065\u0034\u002b\u0040\u
|
2024-11-12 11:17:55 +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"])
|