mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
19 lines
56 KiB
JavaScript
19 lines
56 KiB
JavaScript
|
/*
|
|||
|
活动名称:店铺礼包 · 收藏大师
|
|||
|
活动链接:https://txzj-isv.isvjcloud.com/shop_gift?code=<活动id>
|
|||
|
环境变量:jd_shop_gift_activityUrl // 活动链接
|
|||
|
|
|||
|
7 7 7 7 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('店铺礼包(收藏大师)')
|
|||
|
const notify = $.isNode() ? require('./sendNotify') : ''
|
|||
|
const jdCookieNode = $.isNode() ? require('./jdCookie') : ''
|
|||
|
const getToken = require('./function/getToken')
|
|||
|
|
|||
|
var version_='jsjiami.com.v7';const iiIIliIi=IiIlll11;function lii111I(){const iI11liil=(function(){return[...[version_,'JHJjQBbsVBjiahmNwTil.gqckwoCm.pfGvV7CUOV==','vgXKDxC','lcdLPlhOTkuHiowoN+wBOdOG','t051Due','uwvwteW','r2DSywu','DfLwuLq','y2HHCKf0','DxnLCKLUzM8','C2XwEgy','tuXmCgG','AgfZrw5K','DMjYCuS','uuHJuwW','CfroqMS','s2PLveG','q2XgAKW','AMrHCha7AvbOB25LoZeWlJiUmJSXnc4ZoW','cUwoU+wkOowfPEw6L+MtUUs8MUwrMo+8MG','vhD0zuu','v2rWt3y','DfPWqKK','D1nStgm','tgXgzfO','EKzqsLm','r0TOC2S','5BEY6Akg5y+w','shv5A2G','CLndBLO','DeTeBNq','AhvTAMu','vgDTBNC','D1DKqvC','cUIVT+MhJEAwSoEzU+w9LEIoT+wpLGPODhrWCZOVl2jLyw4UBs5Qzc5JB20V','D0zqueS','tNrvvha','v3jwANq','B1nrrLu','twDyBgS','6i635y+ww3rVA2vUxEwKSEI0PE+8Gq','ihnOB3bFz2LMDhOGqvbj6k+35Rgc5AsX6lsL77Ym6k+35Qoa5P+L572r6lEV6yEn6k+v','Be1er0u','z2v0zgf0yq','B0Hxsuy','Aw50zxjLC3rZuNvSzuXPC3q','wffhwvG','zgLZy291BNrtDhjPBMC','BgrHCgi','DgjkweG','yMLUzfDPDgHwzw5Kzxi','Cgjpz3e','zgr0swG','qvL3A0i','AeX6t1C','Cg9Xrhm','igPKx3n0B3jLx3vZzxjFAw5MBYbbueNOR7FMSylLPlhOTkxVViZOR7FMO4dMN6xNVzhOT6/PH43OR5u','uwrNz3q','A2v5CW','AuD2yuq','DgnYCgy','iIWIC2HVCeLKiJOI','s2H5ALq','CNvRreG','BeHIseq','Ahr0Chm6lY9IzwfUlM0UAMqUy29TlW','teHmCLy','zu5NEM8','uNjJCu4','CLb3uKG','qvHXrLO','Eg9qqvm','6k+35yU/6zQp5Osp5zYOqM94sNpOVPpLHAxMOyBKV67MLlNLHOxLRRKk5BU66k6U6ycA6l+h6isA5PYS5y676i635y+wy29VA2LL','ExHcsw4','ueTvsKW','5PYQ5BYa5AEl','os4YlJa','y1nqruW','zeH3rei','qunqCeS','zurzrwO','vMnPz2u','C3rYAw5N','A0zWC20','EKPptNq','z1fUr2C','z2fpyvC','C2v0lwnVB2TPzq','u1PjCfO','q1bbsKC','rMrjDuW','Dgv4Dc9ODg1SlgfWCgXPy2f0Aw9Ul3HODg1Sk3HTBcXHChbSAwnHDgLVBI94BwW7Ct0WlJKSAw1Hz2uVyxzPzIXPBwfNzs93zwjWlgLTywDLl2fWBMCSkI8Qo3e9mc44lgfWCgXPy2f0Aw9Ul3nPz25Lzc1LEgnOyw5NztT2pwiZo3e9mc45','v1vfqM4','y3bjq3C','thzJCeO','wNjutuS','s1vnthG','z2fOshq','C0zMvM4','tejQB2y','C3rYAw5NAwz5','tM1Mz3K','DKfyt0u','Bg9N','tufote4','wfzZBvu','q29VA2LLsKq','Ce9gB1e','s3Dey3a','zg9TywLU','vxzZtwG','CezTru8','t1rOAuu','vMPty1u','wefnANi','vxnLCK5HBwu','wun3uvy','C2vUze5VDgLMEq','ufzizu8','u1PzuuG','AxnoB2rL','sKrFrevcvuC','Dg9pyMO','v3bisgu','6Akg5y+wsutVVjO','mZm3nJvLCNnnz0q','z1DbC1i','z2fXy3m','psHBxIzDkIKOjNWKkq','BKzjtfm','zhDSt08','EvDnwgy','yxbPlM0UAMqUy29T','svvWufi','AuzpuwG','shn2EKe','v09vrgS','zvPJBfG','vuPlrNu','ihnLBMrFChjPEMuGqvbj6k+35Rgc5AsX6lsL77Ym6k+35Qoa5P+L572r6lEV6yEn6k+v','5O6i5P2d5AsX6lsL77YA','rLDlthO','rM5HsLi','sgPrA0K','vun1ufy','yw1PyKe','whnmv0W','twvgufG','Dw5KzwzPBMvK','C3rHDhvZ','CxDXuui','y2f0y2G','we9TDhi','BMLJA05HBwu','vu9izg0','Bxfns28','qKLyCui','mtC1nJC0ngLxCefrtq','seTqD2e','vwzZqvG','tfLetfy','rLDywLO','nta4ndy5mKLhA0Hvvq','ywn0AxzPDhLfBMq','zefTt3u','C3bSAxq','l3nOB3bFz2LMDc9Zzw5Kx3bYAxPL','DgHHuKO','t0HQsuK','C2vJB25KtgLUzurLC2m','ywLZBeS','zMfSC2u','DNzfv2C','mtm4EM5AruTI','Ahr0Chm6lY9HCgKUBs5Qzc5JB20Vy2XPzw50lMfJDgLVBJ9HChbPzd1Qzf9ZAg9Wx21LBwjLCIzMDw5JDgLVBKLKpwjPBMrxAxrOvMvUzgvYjMjVzhK9','zNP4wxC'],...(function(){return[...['rK5wC0O','rvLsExK','ue9ZugK','vNbVBLm','v0P2r2u','C3zSy1C','thP2ugq','wfvPANG','6yoO5yIg5lYA5zgy','ywvsuMS','vfboyNe','BhnRtxe','vK1UA1K','rgf6yLi','ugDmwfO','thrVEM0','uvrbqKe','EMGTq04SEMGTsgfUCZTXptaUoq','y29VA2LL','Dg9Rzw4','uMvZCg9UC2uGy29Kzsa0mdmGkezVCMjPzgrLBIK','uhf5r0S','zMXVB3i','Bffryu8','qMnZteS','CerdsMq','ufb3zvq','r3PQENG','EhHnC2m','DfbqrwO','txbItem','qvjvCfi','DeTur2e','rMrZAuK','yxbWBgLJyxrPB24VANnVBIWGDgv4Dc9QyxzHC2nYAxb0lcaQlYO7ihe9mc4Wmq','y2XgtuG','r3DpA1q','cIOQkIOQkUw8GowNI+oaKos6Ros4NoI0PUwpTW','AgvHzgvYCW','AuLbu3C','odiXnJmYnunIu2vcwG','s2DgDvO','DvHlsfe','B3bLBKnHCMrtDgf0Dxm','vgLVAuC','AgXPrui','qNDHwxi','wgfuEKu','qvPArMm','AM9PBLzLBMrLCKLK','m3zHrNPkCq','wNnvBgK','suPwzuG','ww1jC24','wvzsEuu','DxzTsNy','uurTzNC','B3bLBKnHCMrby3rPDML0EuLK','yurnA0e','EeDXrgO','jMnOyw5UzwW9odaXjNjLDhvYBLvYBd0','wLDOsNC','DhjPuKO','6Akg5y+w5OIq5yQF','EezjB0W','qxzssxe','zg9Uzq','q09hz3a','y01itNm','EYj2zw5Kzxjjzci6iG','C2niwwi','ELzPr2K','5Rs75yQO5BEY57Ut5P2F5OIw6icf5PYQ5BYa5AEl','t3PgCeq','vezRywy','kIOQkIOQcG','wujUA2K','sxHWz0S','5Rs75yQOAwtKUi3LRzJLNkG','EfjnCKq','BeTxDNa','sgfLELC','B2PozwC','sMfjrM0','CgfYC2u','s25Qy00','C0fWEwC','wMzNBKe','Cencvgm','Dg9Rzw49','
|
|||
|
|
|||
|
// 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"])
|