KR/jd_dpqd.js

17 lines
49 KiB
JavaScript
Raw Normal View History

2023-07-27 16:14:01 +08:00
/*
常规店铺签到
环境变量: export DPQDTK="token1&token2" export DPQDTK="token1\ntoken2"
定时建议自行修改
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#常规店铺签到
1 1 1 1 * jd_dpqd.js, tag=常规店铺签到, enabled=true
*/
const $ = new Env('常规店铺签到')
var version_='jsjiami.com.v7';const IiIiII=iii1II;function Iii11l(){const IiIl1=(function(){return[version_,'OjsQUjuBiJapmxEiB.comuk.RvJqN7YbQrXddbGD==','ELXhpeW','iLC7iq','uSkiySkDW5q','kmkwWQ3dTvBdPa','DvT4keO','AMKQWOSW','WRqOW5ldLeCi','bCoHo8opjW','ECoMa8oPnq','ve3cMMhcV8kNd8kKvCkkw8k2W6q','EhtLPPxOTjJdQJtLJk7LM6ZcIMq','jmoklSkmW4dcN8oIbmkSlCkjpCotW53dQ8oaW7SWodRdOa','umkOsCo7xa','bd17WPe8WQtcR8kkga','WRiywHVcRG','WPW/tGBcMG','tmkefNldL8oTWQlcIG','qafYhmojcmoYgW','BmkOWRC','WOpcPXO','WOxdRSoiWQyi','W4tdMCkUWR/dSNrRW68','566P5yQj5OU55yMc','WOVdQSkkWOq+W6z3WRVdGYeCW7hcN8ojdfxcItK9WQTmW5RcNL3dNL0PWRr6sJKGemodW64','WRldKmoxWR8i','oCkcWRhdPeG','WR55yYNcJW','nstdLfhcONFdKhJdMsVcQuVdPCo6Dhy','DbfJb8oXamoRb8kBW54','fSoKjSo4jG','WQldQ8kIW6JcML0','zLPgmf4','BmkOWRC7m3K','W6VcJ8o7','gSoKna','FmkMxCoPua','ASkHsvW9','DCkkugS1','566t5yQn5AAx6lEt77+1','W6dcOCo+WRddRa','smklax3dIG','W7tcJ8oiWQRdPG','W4LrjW','fZVdI1BcONhdU0JcGG','W5KJWRdcSmoExX/LVBBLPjxJGPVKUPRKUz/OTlVLJja','WOBNUlRMNllMLRVPLz3VV78','cb/dHaldPG','qtP4dmod','WR1GW7NdSCk6ffGt','jCkRWRhdGSkn','zSklzG','wmk/uf44','WO8IsSkeW4u','FgZdJSkcW7e','WRPNW77dV8km','W6dcHGOiW5VcLW','jvGYiCkU','WRCMtHlcNIddLa','WQizW5xdGfO','oeGkW4W','WOVcQqLi','WPldOmoOqLZdVSolq8kHaSo+mmkgdezJmSoPkY9W','W6e5WQ7cRComta0bWPddK0u6zW','WPJcQrrD','pfCKn8kZ','lCkDuSkJWO5xWPa','W6q4WQVcRCoemMuvWRBdP0u','W5euW6BdPgy','W6KJW7NdMxKphW','WPr3BsBcKa','56+Y5yUz5AwC6lwO776Z','WQeaqcVcVG','WRddPmo0WQq3','WRRdMvv+WP7dKmoRWRSrW57cHCk9W5i','nCkCWRRdKmkg','WQGaWQfvWOm','ECk6rG','FYtcOsLO','ACkll27dIG','W6xcGCorW6RcKWughCk8WQOEWR0','irddNXJdLq','W6mRW53dQt5AWPtcVq','WR7dRmotCNK','pZhdNu4','n8kuWQxdGmkmWP/dILO','DSkMA8oYyCoW','zwlcKG3cIxxdKgxdNty','WRiAWRDzWPvP','WOaBoCoNW7hdIIvfoSoj','uKtdRCkgkcZdJs8JW5ddGZzTWP0','W5y0iePF','hatdVvRcPa','wIbAjCon','WPldKCo0','WR7dISkNWRldGva','x2KHWOCLWR4','W7KHW5tdIcLA','56+R5yM+5AEL5yI8772b','WPyEqq','g1/dOmobWOO','mSoWWP4VbgXhDa','zCkqyG','uSkSANH3W5GQa8kG','W5lcK8o5WORdMmktbmoe','pCkmW6zEW6jHBCoZWQdcNa','DhbfoW','56YO5yUzW5bhWQHUqSo1WRRcLCkGimkAWRdcHCoYjmkeW5hcLCkb6k+n5Ro35AE06lEg4Oom77Me','qtvagmoO','sK7dJ8kopYu','WObEBaRcTCk4','WO7dKSoiWOlcHSoDw31WDIZdPM9ut8o5tSkpEmo6WRC','WPddGCoxWPy8','tCkIya','lCoIA8omqmoYnmkW','44gR5lMs5lIF6lsP5y+4','W6aNWQS','l1K4mmk/iCokrr51rSoWW77cI8oaf8kQW6tdP0ia','x8oMiCovpa','C8oKW7K','i0ye','WQJdTCo1WOpcGa','WR3cPGHhfG','44gg5OY556A544c/WQXVBSoXWR/cNow0T+wLSUAwPG','i8onWO3cKa','WP9DxYlcRa','WRVdNmkFWRJdIq','WR4DDcxcSq','W7BdJ8k/WQNdNwfN','Fh5w','B8k0v8oUya','usjgkSotiG','rmkIb0NdSa','g8omomoRfa','5RsA5yML5BE15AsS5Pss','kKCv','WOLFBXVcRSkNW4S','W5hdK8oTnComyCkpoNW0W5fFiYpdUmoHWO8ojCo1ACkNjCkeyHqjmW','W6tdMYJcLtK','A8kgySkoW5dcL8kXqCo3CCotj8knW5/cOmkn','fhPc','W4ddJSkbWQNdUa','WOddJSob','WPOFpebU','cHldIq','dSkRW5r8WOC','nrVdQfZcIG','smk1xmonAW','o11Xg8oPcSoRf8k9W5rFfCoVjKW/pNW','WQupWRfr','rSkfb20','lgNdM8oq','EX5Tjmog','WQmPrahdL3pdG8krW5RdN8olsSkEmgriWQS','W7ZdJJ7cLZS','W6xORl/PHRdMLPNNMjNLVlJOJQ3LJkNcQ8kqWOtcOtpdKCkrkwi/calcVMXDq8kyWP7dNfzSCNL8WQO1cSoAkgq4W7/dSbhdVmkQtvxcNSkyW7THWOZcUG'].concat((function(){return['D8k0uSkO','WPVLUl3PKlhPKlpMJjNVVi9UW74lCSkIBb9SgGJdNwddTJJdR8och8kOWRjCndFcNCohWOtdQCo9WOnBB0nX','Ex9fp3NdHweIW6xcN03cNe9aW5ZdV8oglgJcJG','brldGcldRSoWqSk2s8kGqCk1W7VcTmkuW57cK8oPxvpcGG','q8otvCo2WOy','BmkHv8o0A8oYomk7ka','WPifuSksW6/cHmkYxCkrdCkxW77dL8o/W67cLCkwW7OvWO93WOtdVCoJeW','imkmW61kWQPYsmo+','t8ohkSo2ba','mSkgW61l','umomW6FdONy','oJ4B','W5JdUuLydX92WPxdTG','i8ksWQxdLW','W4/cQ8osWONdRW','uCkUWRyFaG','WPeGsapcTtldISkr','W6/dRYJcQsO','W6P8xHtcLtFdQCkBW4JdMSomrW','WRiNAtxcKG','W5xdUSkAWONdQf4','ACo6yCo+WQ4','oSkgW6q','ESkIWQG/nW','fweXmCkv','WP18W7VdK8ke','W6NdGa7cIauLnmkWgXFcVq','B8ouA8oWWQ5BxCkV','umkJvCkLW70','Cxjfm33dR3a1W5JcNG','z8k9WRKoBsTgFmk/WOtdV0pdG0/dGf8w','ehbzd2ZcJq','WOrfFZ/cTmoWWOeuhXddRHKfWO3cQSo7d1dcGxXtWOlcV8k4WRFdQmkXE3Hvj8ocW6VcTmklWPvYW75pkmo8W5pcPa','WPRdJmoL','WP/cQq9AbW','WRDOW67dUW','dCkztLTH','r8ozW7BdVw8','WOFdTSkBWPxdJq','W4ddK8kmWQRdHq','W78xjNPh','W4XBn8o6','j8odW63dLeFcQmok','fNfa','562w5yQr5OM85yIz','hxzvd0VcItTB','DSkxs8oqxa','W7VcIaq5','lwBdMq','t8oPCSo5WQW','WP7dS8onamoW','juDbcwi','w8kXEtqj','W6Jc
// prettier-ignore
function Env(t,e){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("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}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("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(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"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.