faker3/jd_jinggeng_cart.js

22 lines
90 KiB
JavaScript
Raw Normal View History

2024-11-27 18:38:53 +08:00
/*
活动名称加购有礼 · 京耕
活动链接https://jinggeng-isv.isvjcloud.com/ql/front/showCart?id=<活动id>&user_id=<店铺id>
环境变量jd_jinggeng_cart_url // 活动链接
jd_jinggeng_cart_opencard // 是否入会true/false默认不入会
jd_jinggeng_cart_Notify // 是否通知true/false默认不通知
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#加购有礼 · 京耕
1 1 1 1 * jd_jinggeng_cart.js, tag=加购有礼 · 京耕, enabled=true
*/
const $ = new Env('加购有礼(京耕)')
function pZf7nW(){}var rrVZqC=Object['defineProperty'],jm1Yc__,tOK6MQU,mcMNsm,PxJVcgp,RqduhS,CF2RCn,lksRl7_,gvK35YZ,VNKP27d,sTuuMy,ha3iepC,QzJS3Y,voDEjtC,Qxb9IR,c8VHQ3y,PunLarg,VrRXY1i,Ocr5lw,TajPXN,_MwiMT,QW4qPN,e9Owrd,Vt17rBR;function XBva0o(pZf7nW){return jm1Yc__[pZf7nW>0x123?pZf7nW+0x4:pZf7nW>0x50?pZf7nW>0x123?pZf7nW+0x56:pZf7nW<0x123?pZf7nW-0x51:pZf7nW+0x4d:pZf7nW-0x35]}jm1Yc__=LrbmONN();function QJ228_b(pZf7nW,rrVZqC){var mcMNsm=lhUpRE(pZf7nW=>{return jm1Yc__[pZf7nW<0xf5?pZf7nW<0x22?pZf7nW-0x33:pZf7nW<0x22?pZf7nW+0x5a:pZf7nW-0x23:pZf7nW-0x3b]},0x1);return tOK6MQU.call(XBva0o(0x88),pZf7nW,mcMNsm(0x23),{value:rrVZqC,configurable:XBva0o(0xa7)})}pZf7nW(tOK6MQU=Object.defineProperty,mcMNsm=QJ228_b(lhUpRE((...rrVZqC)=>{var tOK6MQU=lhUpRE(rrVZqC=>{return jm1Yc__[rrVZqC>-0x4f?rrVZqC+0x4e:rrVZqC-0x35]},0x1);pZf7nW(rrVZqC[XBva0o(0x51)]=tOK6MQU(-0x4d),rrVZqC[0x2f]=rrVZqC[XBva0o(0x5e)]);return rrVZqC[XBva0o(0x53)](rrVZqC[XBva0o(0xcd)]())}),XBva0o(0x52))(eZ7FL5,EydoNV));var XvyecT=[],txoCU_o=[hapbvr(0x0),hapbvr(XBva0o(0x53)),hapbvr(0x2),hapbvr(0x3),hapbvr(XBva0o(0x62)),hapbvr(XBva0o(0x5c)),hapbvr(0x6),hapbvr(XBva0o(0x6e)),hapbvr(XBva0o(0x78)),'^L9Oa,|B','!N.[Nrt(k@:5e1v|UwR<GuTO!U}f0jN',hapbvr(0x9),'!N.[Nrt(k@:5e1v|UwR<_?x7X4l,M',hapbvr(0xa),hapbvr(XBva0o(0x70)),hapbvr(0xc),hapbvr(0xd),hapbvr(0xe),hapbvr(XBva0o(0x60)),hapbvr(0x10),hapbvr(0x11),hapbvr(XBva0o(0x6d)),hapbvr(0x13),'pN|h2??M',hapbvr(XBva0o(0x73)),hapbvr(0x15),hapbvr(XBva0o(0x71)),hapbvr(0x17),':N?Ps]9B|K^6_m',hapbvr(XBva0o(0x84)),'pN|hcl6vYsXqK0',hapbvr(XBva0o(0xa4)),'@gX|^2Bd9vO*_m','pN|h=[R48',hapbvr(0x1a),hapbvr(XBva0o(0xe1)),hapbvr(XBva0o(0x86)),hapbvr(XBva0o(0xe4)),hapbvr(XBva0o(0x75)),hapbvr(0x1f),hapbvr(0x20),hapbvr(0x21),hapbvr(XBva0o(0x87)),hapbvr(0x23),hapbvr(XBva0o(0x61)),hapbvr(0x25),hapbvr(0x26),hapbvr(XBva0o(0xd1)),'lt.@=^2~x,?)G|B1SqDk',hapbvr(0x28),hapbvr(0x29),hapbvr(0x2a),hapbvr(0x2b),hapbvr(0x2c),hapbvr(XBva0o(0x7a)),hapbvr(0x2e),hapbvr(0x2f),hapbvr(0x30),hapbvr(0x31),hapbvr(0x32),hapbvr(0x33),hapbvr(XBva0o(0x90)),hapbvr(XBva0o(0x91)),hapbvr(XBva0o(0x5d)),hapbvr(0x37),hapbvr(XBva0o(0x8b)),hapbvr(0x39),hapbvr(XBva0o(0x92)),hapbvr(XBva0o(0x93)),hapbvr(0x3c),hapbvr(0x3d),hapbvr(XBva0o(0x8a)),'|5/#YWy',hapbvr(XBva0o(0x68)),hapbvr(0x40),hapbvr(XBva0o(0x94)),hapbvr(0x42),hapbvr(XBva0o(0x95)),hapbvr(0x44),hapbvr(XBva0o(0x96)),hapbvr(0x46),hapbvr(0x47),hapbvr(XBva0o(0x98)),hapbvr(0x49),hapbvr(0x4a),hapbvr(XBva0o(0x99)),hapbvr(0x4c),hapbvr(0x4d),hapbvr(XBva0o(0x97)),hapbvr(0x4f),hapbvr(XBva0o(0x11f)),hapbvr(0x51),hapbvr(0x52),hapbvr(0x53),hapbvr(0x54),hapbvr(XBva0o(0xa0)),hapbvr(XBva0o(0x9a)),hapbvr(XBva0o(0x9c)),hapbvr(0x58),hapbvr(XBva0o(0x59)),hapbvr(XBva0o(0xc4)),hapbvr(XBva0o(0x7e)),hapbvr(XBva0o(0x55)),hapbvr(0x5c),hapbvr(XBva0o(0x9e)),hapbvr(XBva0o(0x57)),hapbvr(XBva0o(0xc0)),hapbvr(0x5f),hapbvr(XBva0o(0x5b)),hapbvr(XBva0o(0x54)),hapbvr(0x62),hapbvr(XBva0o(0xaa)),hapbvr(0x64),hapbvr(XBva0o(0xc7)),hapbvr(0x66),hapbvr(XBva0o(0xa8)),hapbvr(0x60),hapbvr(XBva0o(0x54)),hapbvr(0x68),hapbvr(XBva0o(0x56)),hapbvr(0x6a),hapbvr(0x6b),hapbvr(0x6c),hapbvr(0x6d),hapbvr(0x6e),hapbvr(0x6f),hapbvr(0x70),hapbvr(XBva0o(0xdb)),hapbvr(0x72),hapbvr(XBva0o(0xab)),hapbvr(XBva0o(0xac)),hapbvr(0x60),hapbvr(XBva0o(0x54)),hapbvr(0x75),hapbvr(0x76),hapbvr(0x70),hapbvr(0x77),hapbvr(0x78),hapbvr(XBva0o(0xaf)),hapbvr(XBva0o(0xb0)),hapbvr(0x7b),hapbvr(0x7c),hapbvr(0x7d),hapbvr(0x7e),hapbvr(0x7f),hapbvr(0x80),hapbvr(0x81),hapbvr(0x24),'\x54\x3d\x4f\x7c\x26\x22\x5e\x62\x3f\x55\x4c\x46\x3c\x6d\x25\x6c\x56\x34\x65\x39\x3b',hapbvr(0x7d),hapbvr(XBva0o(0x55)),hapbvr(0x59),hapbvr(0x82),hapbvr(XBva0o(0xb7)),hapbvr(0x75),hapbvr(XBva0o(0xb8)),hapbvr(0x65),hapbvr(XBva0o(0xbb)),hapbvr(0x85),hapbvr(0x59),hapbvr(XBva0o(0xbc)),hapbvr(XBva0o(0xbd)),hapbvr(XBva0o(0xc5)),hapbvr(0x89),hapbvr(0x8a),hapbvr(XBva0o(0xc6)),hapbvr(0x60),hapbvr(0x61),hapbvr(XBva0o(0xb5)),hapbvr(0x8d),hapbvr(0x70),hapbvr(0x8e),hapbvr(0x6d),hapbvr(0x8f),hapbvr(0x90),hapbvr(0x91),hapbvr(XBva0o(0xce)),hapbvr(0x93),hapbvr(XBva0o(0x100)),hapbvr(XBva0o(0xcf)),hapbvr(0x96),hapbvr(0x6f),hapbvr(0x97),hapbvr(0x98),hapbvr(XBva0o(0xd0)),
// 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"])