mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-14 07:29:18 +08:00
23 lines
54 KiB
JavaScript
23 lines
54 KiB
JavaScript
|
/*
|
|||
|
活动名称:关注店铺有礼 · 京耕
|
|||
|
活动链接:https://jinggeng-isv.isvjcloud.com/ql/front/showFavoriteShop?id=<活动id>&user_id=<店铺id>
|
|||
|
环境变量:jd_jinggeng_showFavoriteShop_activityUrl // 活动链接
|
|||
|
jd_jinggeng_showFavoriteShop_opencard // 是否入会(true/false),默认不入会
|
|||
|
jd_jinggeng_showFavoriteShop_Notify // 是否通知(true/false),默认不通知
|
|||
|
|
|||
|
7 7 7 7 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('关注店铺有礼(京耕)')
|
|||
|
const jdCookie = require('./jdCookie')
|
|||
|
const common = require('./function/jdCommon')
|
|||
|
const notify = require('./function/sendJDNotify')
|
|||
|
const getToken = require('./function/getToken')
|
|||
|
const { jinggeng_savePrize } = require('./function/savePrize')
|
|||
|
|
|||
|
var iil='jsjiami.com.v7';const Il1ilIIl=Iil11IIi;(function(li11lll1,IiilIlI1,iIl1i11,l1l1l1I,l1Illlil,lI1il1Ii,iII11l1I){return li11lll1=li11lll1>>0x7,lI1il1Ii='hs',iII11l1I='hs',function(ilIi1i1i,iIllI111,li1Iilll,l1iiill,i1ll1){const Ii1ll11i=Iil11IIi;l1iiill='tfi',lI1il1Ii=l1iiill+lI1il1Ii,i1ll1='up',iII11l1I+=i1ll1,lI1il1Ii=li1Iilll(lI1il1Ii),iII11l1I=li1Iilll(iII11l1I),li1Iilll=0x0;const i1ll11I1=ilIi1i1i();while(!![]&&--l1l1l1I+iIllI111){try{l1iiill=-parseInt(Ii1ll11i(0x39d,'HJO['))/0x1+parseInt(Ii1ll11i(0x15c,'oVBr'))/0x2*(-parseInt(Ii1ll11i(0x1c5,'BQi@'))/0x3)+parseInt(Ii1ll11i(0x2f3,'0r]9'))/0x4*(parseInt(Ii1ll11i(0x39c,'SOH('))/0x5)+parseInt(Ii1ll11i(0x1f1,'gC2A'))/0x6+-parseInt(Ii1ll11i(0x1da,'gC2A'))/0x7*(-parseInt(Ii1ll11i(0x255,'9aII'))/0x8)+-parseInt(Ii1ll11i(0x2c2,'92^V'))/0x9+parseInt(Ii1ll11i(0x2a8,'i(Y9'))/0xa;}catch(IilI1Ill){l1iiill=li1Iilll;}finally{i1ll1=i1ll11I1[lI1il1Ii]();if(li11lll1<=l1l1l1I)li1Iilll?l1Illlil?l1iiill=i1ll1:l1Illlil=i1ll1:li1Iilll=i1ll1;else{if(li1Iilll==l1Illlil['replace'](/[EGgURIKQYtMnHkAFP=]/g,'')){if(l1iiill===iIllI111){i1ll11I1['un'+lI1il1Ii](i1ll1);break;}i1ll11I1[iII11l1I](i1ll1);}}}}}(iIl1i11,IiilIlI1,function(iIllII1i,i11l1liI,I1I1iIll,ll1IlIli,Ilil1l1i,iIIllIiI,I11lilii){return i11l1liI='\x73\x70\x6c\x69\x74',iIllII1i=arguments[0x0],iIllII1i=iIllII1i[i11l1liI](''),I1I1iIll=`\x72\x65\x76\x65\x72\x73\x65`,iIllII1i=iIllII1i[I1I1iIll]('\x76'),ll1IlIli=`\x6a\x6f\x69\x6e`,(0x16f5da,iIllII1i[ll1IlIli](''));});}(0x5f80,0x6a7f4,iI1lIIIi,0xc1),iI1lIIIi)&&(iil=`\xb3d`);function iI1lIIIi(){const I1lilii=(function(){return[...[iil,'PknjGEsjMHiKUaYmiR.cQoMmHII.FvFIU7gtAFnQ==','eMBdUCkZeW','FSkKqmoEWR8VxmoIW6ZdISoaWRbtWQRcJSo8W5e','W7ddRmoEW5pcTXW','lh/dOCkznW','n8k6uCoEsmoBWQpcQG','yspcJ1BdLLvU','5yUA5yAS5BIl6zkz5l6A5zkc5AEC6lEB77Yn5Rw+5yMs5lI66zUz5BUC6zcw5lY+5zk55y+M5lMV5zcpEG','5Rs55yU85BwG57Qn5P+1','5yII5yE85BIN6zgS5l+d5zcG5AAe6lsB77Y+5Rsq5yMj5lIF6zUo5BQN6zg35l6j5zkj5y6K5lQT','W4rfW6pcImk0','xWBdG0RcVq','8j+9S++4LJG','WQ9yiK8','W5pcMYS','W7xdGCkXW4nBW4JcICkQmW','xmkbmmkbaW','EqRcMxZdGa','lwCFWP/dJmkeWRKqoXi','5P2l5Acs5z+95z+Z','WRfamwKB','vUIVJUAWUowtQow7I8kp','gJ1FeSot','qZxdKXRdJW','WR7dMSkqW6pcSq','WQmHW6HEWOK','5REF5yIZ5Bs257Mv5P6z','4PUwgEIUJEwfREwVHEs7PUw8TEIMUEEAVoEoKowGVowmKoMeKEwqTowhLoI/RoIGO+IhRUADOG','EM8s','W7xdGCkXW4nBW5xcJCkPmSkOaCkr','bIFdS2BdOq','dmolWQtcNvuYWReF','57Q75y+m8ygNMG','WOhdR2RdHmkbmtO','W4SGWR/dJZxdRJVdPCk2','oIVdPKbFy8kQ','CtJdOXJdVa','W6/dQSox','WOZcG8o9WQ9KW6OgW5C','W54gwJ43','WOfQeMeW','WOuUW59IWQu','W43dIKrfAG','a1Hyd1pcPw99W5vQW4ldUCk5W6pcPKLtW5ldN3VdH8kJW5hdKx/cU2KrD0b5WRFdK8kUqSoDzbnqdmkykmkqg8olwCkC','afGwudO','W6VNU53MNRtVV5NKUidMRlRMLzlNGRVMN47LKyhdVG','i8kWw8od','WQe9W4LIWQ1iasW','FSkBWOLzWQa','DmkSWOToWO7dMCkS','g8k+W70rW6tcLmkmWPnK','x8k3qCoxz8kOW7VcO0NdRW','nJNdTefAv8kQE2JcTYGu','hSkMW78wW63cV8kdWOO','WOBdIhyssCoUuSkg','tmk8mmkAdSo6FCoQWPHqwrDWlK7dVCop','WOFdTmkQW6dcRYO','wEIVH+AWT+wsGEw6ICkP','fXZcO8oxW6PCjSkk','5l6N5Ocu5yM08lUvIo+4UG','WPRdRuVdHSko','wCkSkSknbCoT','rY7dMwlcLG','WO/cMqe2gmoRW6pcG8oeaW','WRPOzG','oGL0c8oH','W5FcKs3dTmo8r28','WR5OBei','W5q9o2aObCkP','WOddK2e4umoRua','jdVdNKi','W5RcMIJdHmoWwhK','qCkSvuf1','f04BvZVdVmkvvLXXW4RcPq','DSkRxCoOW79UxW','WOJcP8ocWOzf','usddRxVcL09+ya','ocHbaXJcSSoN','W7WZWP3dNWy','crBcVSohW6fpaSkl','yCkzWQD4bCo8WO1w','8lc9VwZdGmovye/KVyBLKkpdU/cBRk8','WRLfWPhcRxW','osFdTLHWzCkICa','W6VNU6RMNiNVVklKUBBMR5hML7NNGlZMNjhLKyNcJq','hGemWPBdVgf3','WPBdVSkWW7tcVW','iEElUowNM+IiMCoD','8jMjOSoy','nSk2uCoEqSoE','aSkeW5m','gmoCCa','m8oJW5ixW4xcLmod','ydxdOtVdVYiv','6i6c5y6zW5vAWPvbDxRdUEwMMEI3JG','WPerWRLsW5C6oSkPDG','ffugp3ZdRNa','hCkaW51xDw7dRa','jshcKmoDBW','gqSa','b8kfW5DluN/dP8k4','gJ/dJuxdGq','AsJcMhhdNL9U','EdtcSgFdVW','demqpKldOhe','bJr7aH4','wqtdNGVdUEs9IUwqOCkO','W5a3o2q','WPpcJSo8WRHEW6m','W5eQWRBdRIldRG','kYVcJmohW7S','BSkjFG','bSogECk/d8oQ','BvvfWP7cTW','W4NcLsddPCo8','f8k6W7S','vSkXvmoADmkZW7W','WRi2W5e','maGzWPRdSW','5REF5yIZ5Bs257Mv5P6z772b5lUG5Q+W5Ps454c95P2U5zo7gW','WPJdNLXDtmkVWRhdMSoa','hbtcKY9P','WQa5W45Y','u8kXrSonCmkMW6O','WRu3W4n/','WQq9W5nlWQfcbIejxG','pJngiaBcPW','5RAe5yMC
|
|||
|
|
|||
|
// 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"])
|