mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-15 00:09:20 +08:00
21 lines
129 KiB
JavaScript
21 lines
129 KiB
JavaScript
|
/*
|
|||
|
活动名称:店铺签到 · 超级无线/超级会员/lorealjdcampaign
|
|||
|
活动链接:https://lzkj-isv.isvjd.com/sign/sevenDay/signActivity?activityId=<活动id>
|
|||
|
https://lzkj-isv.isvjd.com/sign/signActivity2?activityId=<活动id>
|
|||
|
https://cjhy-isv.isvjcloud.com/sign/sevenDay/signActivity?activityId=<活动id>
|
|||
|
https://cjhy-isv.isvjcloud.com/sign/signActivity?activityId=<活动id>
|
|||
|
https://lorealjdcampaign-rc.isvjcloud.com/prod/cc/cjwx/sign/signActivity2?activityId=<活动id>
|
|||
|
https://cjhy-isv.isvjcloud.com/signNew/signActivity?activityId=<活动id>&venderId=<商家id>
|
|||
|
环境变量:jd_wx_shopSign_activityUrl // 活动链接
|
|||
|
jd_wx_shopSign_joinMember // 是否入会(true/false),默认不入会
|
|||
|
jd_wx_shopSign_notify // 是否推送通知(true/false),默认不推送
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('店铺签到监控(超级无线/超级会员)')
|
|||
|
function yTJ7_s4(){}var U0fG9G=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],grPbXWL,tbXbcEv,xjVVWSc,S7wkMn,SJumROa,Xfv4AX_,Tc9Ndwa,eQLaA5,H4beB7,v3FROI,Xkr9qO,hnRpKb,nuJfZJX,I3_njP,VyJwt5B,gWAwaA,tJYX9Tb,ZFXZkGH;function DLGExyH(yTJ7_s4){return grPbXWL[yTJ7_s4<0x55?yTJ7_s4+0xe:yTJ7_s4>0x185?yTJ7_s4+0x1e:yTJ7_s4<0x185?yTJ7_s4-0x56:yTJ7_s4-0x17]}grPbXWL=TpdUes();function Xl9oca(yTJ7_s4,U0fG9G){var xjVVWSc=WpYSqoS(yTJ7_s4=>{return grPbXWL[yTJ7_s4<0x51?yTJ7_s4-0x9:yTJ7_s4>0x181?yTJ7_s4+0x3:yTJ7_s4>0x181?yTJ7_s4-0x59:yTJ7_s4-0x52]},0x1);return tbXbcEv(yTJ7_s4,xjVVWSc(0x9f),{value:U0fG9G,configurable:xjVVWSc(0xe0)})}yTJ7_s4(tbXbcEv=Object.defineProperty,xjVVWSc=Xl9oca(WpYSqoS((...U0fG9G)=>{yTJ7_s4(U0fG9G.length=0x2,U0fG9G[DLGExyH(0x56)]=U0fG9G[0x0]);return U0fG9G[0x1](U0fG9G[DLGExyH(0x56)]())}),0x2)(N8Gb00i,qjrH_P));var pwh1SS=[],M4FWgF=[V0Eyyr(DLGExyH(0x82)),V0Eyyr(DLGExyH(0x8e)),'bPV/|#IA',V0Eyyr(DLGExyH(0x99)),V0Eyyr(0x3),V0Eyyr(DLGExyH(0x96)),V0Eyyr(0x5),V0Eyyr(0x6),V0Eyyr(0x7),'T@!z<^rF2|<',V0Eyyr(DLGExyH(0x92)),V0Eyyr(DLGExyH(0xac)),V0Eyyr(0xa),V0Eyyr(DLGExyH(0xb1)),V0Eyyr(0xc),V0Eyyr(0xd),V0Eyyr(0xe),'\x77\x7d\x7c\x41\x3a',V0Eyyr(DLGExyH(0x84)),V0Eyyr(DLGExyH(0x8b)),V0Eyyr(DLGExyH(0x61)),V0Eyyr(0x12),V0Eyyr(0x13),V0Eyyr(DLGExyH(0xe2)),V0Eyyr(0x15),V0Eyyr(DLGExyH(0x6a)),V0Eyyr(DLGExyH(0x16a)),V0Eyyr(DLGExyH(0xa2)),'\u0066\u0057\u0043\u004c\u0050\u006a\u004e\u0059\u004e\u006a\u002a\u0064\u0044\u0052\u0042\u0049\u006e\u0023\u002c\u005f\u0034\u007c\u0024',V0Eyyr(DLGExyH(0xa8)),V0Eyyr(DLGExyH(0xbe)),V0Eyyr(0x1a),V0Eyyr(DLGExyH(0x9c)),V0Eyyr(0x1c),V0Eyyr(0x1d),V0E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r(DLGExyH(0x81)),V0Eyyr(DLGExyH(0xb6)),V0Eyyr(DLGExyH(0x7c)),V0Eyyr(0x15),V0Eyyr(0x53),V0Eyyr(0x3e),V0Eyyr(0x54),V0Eyyr(0x55),V0Eyyr(0x56),V0Eyyr(DLGExyH(0x5d)),V0Eyyr(0x58),DLGExyH(0x70),V0Eyyr(0x15),V0Eyyr(DLGExyH(0xe1)),V0Eyyr(0x3e),V0Eyyr(DLGExyH(0x59)),'\u006a\u0047\u0033\u002e\u0043\u003f\u0075\u006b\u0079\u0021\u0044\u002a\u007a\u0069\u0066\u0049\u0043\u0066\u0044\u005d\u007c\u006c\u0024',V0Eyyr(DLGExyH(0x6f)),V0Eyyr(DLGExyH(0x58)),V0Eyyr(DLGExyH(0x5b)),V0Eyyr(0x5b),V0Eyyr(DLGExyH(0x5a)),V0Eyyr(DLGExyH(0x59)),V0Eyyr(0x5c),V0Eyyr(0x1c),V0Eyyr(DLGExyH(0xb2)),V0Eyyr(0x21),V0Eyyr(0x5d),V0Eyyr(0x5e),V0Eyyr(0x15),V0Eyyr(DLGExyH(0xce)),V0Eyyr(DLGExyH(0x5a)),V0Eyyr(0x54),V0Eyyr(DLGExyH(0xcc)),V0Eyyr(0x61),V0Eyyr(DLGExyH(0x5b)),V0Eyyr(DLGExyH(0xba)),V0Eyyr(0x3e),V0Eyyr(0x54),V0Eyyr(0x63),V0Eyyr(DLGExyH(0xb9)),V0Eyyr(0x22),V0Eyyr(0x24),V0Eyyr(0x65),V0Eyyr(DLGExyH(0x74)),V0Eyyr(DLGExyH(0x5c)),V0Eyyr(0x68),V0Eyyr(0x25),V0Eyyr(DLGExyH(0x72)),V0Eyyr(0x6a),V0Eyyr(0x6b),V0Eyyr(0x6c),V0Eyyr(0x6d),V0Eyyr(0x6e),V0Eyyr(DLGExyH(0xcd)),V0Eyyr(DLGExyH(0x73)),V0Eyyr(0x71),'\x6e\x65\x67\x2b\x25\x5f\x5d\x7c\x7a\x32\x76\x39\x71\x73\x5e\x4f\x45\x66','P}MU:5s*Z|',V0Eyyr(0x15),V0Eyyr(0x72),V0Eyyr(0x73),V0Eyyr(DLGExyH(0x97)),V0Eyyr(DLGExyH(0xd2)),V0Eyyr(0x76),V0Eyyr(0x77),V0Eyyr(0x78),V0Eyyr(0x79),V0Eyyr(DLGExyH(0xbc)),V0Eyyr(0x7b),V0Eyyr(0x7c),V0Eyyr(DLGExy
|
|||
|
// 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"])
|