mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 16:29:13 +08:00
22 lines
82 KiB
JavaScript
22 lines
82 KiB
JavaScript
|
/*
|
|||
|
活动名称:关注店铺有礼 · 京耕
|
|||
|
活动链接:https://jinggeng-isv.isvjcloud.com/ql/front/showFavoriteShop?id=<活动id>&user_id=<店铺id>
|
|||
|
环境变量:jd_jinggeng_favoriteShop_url // 活动链接
|
|||
|
jd_jinggeng_favoriteShop_opencard // 是否入会(true/false),默认不入会
|
|||
|
jd_jinggeng_favoriteShop_Notify // 是否通知(true/false),默认不通知
|
|||
|
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#关注店铺有礼 · 京耕
|
|||
|
1 1 1 1 * jd_jinggeng_favoriteShop.js, tag=关注店铺有礼 · 京耕, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('关注店铺有礼(京耕)')
|
|||
|
function pfxE8Y(){}var bfeSTI=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],PiFwhM,P9dHYOr,EMm4iC,TdmNQat,Riex6Y,tp44Oh,GZtj1BH,tyKcHy,y0Ujtsv,p5ak4CP,AZMqYES,g_u8O2,KflMsLu,xCyovuV,ofV1k2N,d1xldpG,PIxdcVx,KcOOJJD,qR6wZW,vP_Mo9,nf08eh,udFUjW,pWFu02,ks6eWi6;function B2QZmMd(pfxE8Y){return PiFwhM[pfxE8Y>-0x3a?pfxE8Y>-0x3a?pfxE8Y>-0x3a?pfxE8Y+0x39:pfxE8Y-0x6:pfxE8Y-0x6:pfxE8Y+0xf]}PiFwhM=ak7cTo();function PP2myG(pfxE8Y,bfeSTI){var EMm4iC=rsCNOOo(pfxE8Y=>{return PiFwhM[pfxE8Y<-0x2e?pfxE8Y+0x49:pfxE8Y<0x9f?pfxE8Y+0x2d:pfxE8Y-0x1d]},0x1);return P9dHYOr.call(null,pfxE8Y,EMm4iC(-0x2d),{value:bfeSTI,configurable:EMm4iC(0x43)})}pfxE8Y(P9dHYOr=Object.defineProperty,EMm4iC=PP2myG(rsCNOOo((...bfeSTI)=>{var P9dHYOr=rsCNOOo(bfeSTI=>{return PiFwhM[bfeSTI>-0x14?bfeSTI<0xb9?bfeSTI<-0x14?bfeSTI-0x30:bfeSTI+0x13:bfeSTI-0x5d:bfeSTI-0x2e]},0x1);pfxE8Y(bfeSTI[B2QZmMd(-0x39)]=P9dHYOr(-0x2),bfeSTI.R0y6_2=bfeSTI[P9dHYOr(-0x12)]);return bfeSTI.R0y6_2(bfeSTI[0x0]())}),0x2)(AzSlGDt,wJoJbnR));var Lqe5BC=[],gQh11l=[XKwav1(0x0),XKwav1(B2QZmMd(-0x38)),XKwav1(0x2),'xBLN^|(5','5GdxcJ|{M&[JJ]fK;R}9T]C',XKwav1(B2QZmMd(-0x2b)),XKwav1(B2QZmMd(-0x2a)),XKwav1(0x5),'?$e,$`>AM&[c^:|K7Q>9=`Qvn=QOy:FADKj','?$e,$`>AM&[c^:|K7Q>9=`Qvn=QOy:=2N.dx5_D}i',XKwav1(0x6),'?$e,$`>AM&[c^:|K7Q>9=`Qvn=QOy:*N5X}9%aC',XKwav1(B2QZmMd(-0xf)),XKwav1(B2QZmMd(-0x16)),XKwav1(0x9),XKwav1(0xa),XKwav1(B2QZmMd(0x3d)),XKwav1(B2QZmMd(-0x23)),XKwav1(B2QZmMd(-0xb)),XKwav1(B2QZmMd(-0x8)),XKwav1(B2QZmMd(-0x24)),XKwav1(B2QZmMd(-0x7)),XKwav1(B2QZmMd(-0x1a)),XKwav1(B2QZmMd(-0x1f)),XKwav1(0x13),XKwav1(0x14),'\x69\x24\x4b\x2c\x44\x6b\x40\x61\x7c\x3d\x28\x38\x2f\x6a','i$%tCk@a|=(8/j',XKwav1(B2QZmMd(0x43)),XKwav1(B2QZmMd(-0x19)),XKwav1(0x17),XKwav1(B2QZmMd(-0x15)),XKwav1(B2QZmMd(-0x4)),XKwav1(0x1a),XKwav1(B2QZmMd(-0x18)),XKwav1(0x1c),XKwav1(0x1d),XKwav1(B2QZmMd(-0x17)),XKwav1(0x1f),XKwav1(0x20),XKwav1(0x21),XKwav1(B2QZmMd(-0x34)),'\x21\x56\x63\x58\x73\x31\x52\x3c\x7c\x5e\x5b\x2a\x3a\x73\x5d\x2b\x58\x4f\x26\x3c\x7c\x49\x44',XKwav1(B2QZmMd(-0x9)),XKwav1(0x24),XKwav1(B2QZmMd(-0x1d)),XKwav1(0x26),XKwav1(0x27),XKwav1(B2QZmMd(-0x1)),XKwav1(0x29),XKwav1(B2QZmMd(0x0)),XKwav1(B2QZmMd(0x1)),XKwav1(0x2c),XKwav1(0x2d),XKwav1(B2QZmMd(-0x2c)),XKwav1(B2QZmMd(0x5)),XKwav1(B2QZmMd(0x6)),XKwav1(B2QZmMd(-0x2d)),XKwav1(0x32),XKwav1(B2QZmMd(0x7)),XKwav1(B2QZmMd(0x8)),XKwav1(0x35),XKwav1(0x36),XKwav1(B2QZmMd(0x9)),XKwav1(0x38),XKwav1(B2QZmMd(0x2)),XKwav1(0x3a),XKwav1(B2QZmMd(0x32)),XKwav1(B2QZmMd(0xa)),XKwav1(0x3d),XKwav1(0x3e),XKwav1(B2QZmMd(-0x22)),XKwav1(0x40),XKwav1(0x41),XKwav1(0x42),XKwav1(0x43),XKwav1(B2QZmMd(0xf)),XKwav1(0x45),XKwav1(0x46),XKwav1(0x47),XKwav1(0x48),XKwav1(0x49),XKwav1(0x4a),XKwav1(0x4b),'5]zju7x9`|t+gm',XKwav1(0x4c),XKwav1(B2QZmMd(-0x37)),XKwav1(B2QZmMd(0xc)),XKwav1(0x4f),XKwav1(0x50),XKwav1(B2QZmMd(0x10)),XKwav1(B2QZmMd(0x12)),XKwav1(B2QZmMd(0x13)),XKwav1(B2QZmMd(-0x26)),XKwav1(0x55),XKwav1(B2QZmMd(-0x35)),XKwav1(B2QZmMd(-0x2f)),XKwav1(B2QZmMd(-0x37)),XKwav1(0x4c),'?$a`*l|{i',XKwav1(0x58),XKwav1(B2QZmMd(-0x29)),XKwav1(0x5a),XKwav1(0x47),XKwav1(B2QZmMd(-0x30)),XKwav1(0x5c),XKwav1(B2QZmMd(-0x33)),XKwav1(B2QZmMd(-0x36)),XKwav1(B2QZmMd(0x1f)),'N+|=_Vs($ZP,3>2+$F}dI2ZWkuI<J*#k)baU(UZht',XKwav1(B2QZmMd(-0x32)),XKwav1(0x5b),'\u004e\u002b\u007c\u003d\u005f\u0056\u0073\u0028\u0024\u005a\u0050\u002c\u0033\u003e\u0032\u002b\u0024\u0046\u007d\u0064\u0049\u0032\u005a\u0057\u006b\u0075\u0049\u003c\u004a\u002a\u0023\u006b\u0029\u0062\u0061\u0055\u0023',XKwav1(B2QZmMd(0x21)),XKwav1(0x61),XKwav1(B2QZmMd(0x23)),XKwav1(0x63),XKwav1(B2QZmMd(0x24)),XKwav1(0x65),XKwav1(B2QZmMd(0x25)),XKwav1(B2QZmMd(-0x31)),XKwav1(0x67),XKwav1(B2QZmMd(0x59)),XKwav1(B2QZmMd(0x26)),XKwav1(0x6a),XKwav1(B2QZmMd(0x2f)),XKwav1(0x6c),XKwav1(0x6d),XKwav1(0x6e),XKwav1(B2QZmMd(0x28)),XKwav1(0x70),XKwav1(B2QZmMd(-0x36)),XKwav1(0x22),XKwav1(B2QZmMd(-0x35)),XKwav1(B2QZmMd(0x29)),XKwav1(0x72),XKwav1(0x5f),XKwav1(0x22),XKwav1(B2QZmMd(-0x34)),XKwav1(B2QZmMd(0x2b)),XKwav1(B2QZmMd(0x2c)),XKwav1(0x4d),XKwav1(B2QZmMd(-0x35)),XKwav1(0x75),XKwav1(0x76),XKwav1(B2QZmMd(-0x33)),XKwav1(0x77),XKwav1(0x4d),XKwav1(B2QZ
|
|||
|
|
|||
|
// 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"])
|