mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-15 00:09:20 +08:00
25 lines
103 KiB
JavaScript
25 lines
103 KiB
JavaScript
|
/*
|
|||
|
活动名称:每日抢好礼 · 超级无线/超级会员
|
|||
|
活动链接:https://lzkj-isv.isvjd.com/activity/daily/wx/indexPage?activityId=<活动id>
|
|||
|
https://cjhy-isv.isvjcloud.com/activity/daily/wx/indexPage?activityId=<活动id>
|
|||
|
环境变量:jd_daily_activityUrl // 活动链接
|
|||
|
jd_daily_joinMember // 是否开卡,默认不开卡
|
|||
|
jd_daily_notify // 是否推送通知,默认不推送
|
|||
|
|
|||
|
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 { wuxian_savePrize } = require('./function/savePrize')
|
|||
|
const CryptoJS = require('crypto-js')
|
|||
|
|
|||
|
var version_='jsjiami.com.v7';function l1Ii1II(){const iiiIlI1l=(function(){return[...[version_,'pLrjRsxjJQHiFDaTVmkyiTE.fcnoXmYHu.FvR7kK==','naX3gdS','WOzutrdcRa','CCoYB8kmba','n8onWOXpWOq','nw1vwmkFnCkMqq','W4ddHSkrmM7dRw/cIgtdKq','e3vzwSkdiCkL','krCuW4bQ','W7xcNCoH','W5JWLlYv','6z2m5RkR5PcU5lYU','zh16iCow','xZffW7BdPsa1W57cMa','iSoYD0RdRs5hkq','WPnlFJpcLq','sgLmgmoP','eSoaW7VcOvC','pmoGu1S','WPyoeaZcKG','aG7cKcmWW5apW6S','WO3dQCkyp0u','WPxcPmkXpCo3WOTExmocySoTmCkZWOj1m8ooW5VcKgJcLgvwWOddImkZlCo+s1hdUCohW6vcWPVdVdhdKCkvW74fsHnyW7RdGLX3mmoqWOfqqmkPo2pdUCkHESkGmSoWaSkizmotW7ZcG8k8BmkwabGPvh0rAKJdHHWwhmoxcSoZh8o9WRZcQHBdS8ofz8kwW6rEeCo2iSkSWQtcGMjjCNlcV0DLk1FcSLmny8o2WRxdS3fFq8o1WQzKW7mqW44LW4RcH8oOjGOlWRxcI2/dM8ozWPxdIvH3W5JdStNcObKUWReJWOH6WRyZtCoexuVcISkFzHThn8oHz8oNt0a0W43dUGmBF2RcOa8EE8k0cGuxzbxdUSoGWPhcHCk0oSoGhcjykqO','feK2','W57cVCoBmG9D','FSkKidWF','W77dHmotW5xcLW','WO9KW7GVgqS','dqtcLWCSW5GyW6S','m8oHWRPNuM82WPu','W6u1ma','qbhcHIGj','fSohW57cGw3cTmkgFqeYWRRdSa','sCoqW7fCWPi','iSoYW5ZcQ1W','WQ7dQeBcM8k9','W5T1BCkldq','zSoBdW','5yMA5yEN5BIx6zgV5l6b5zou5OQq5yMg','WOxcVKpcNmkr','omoFW6mqFq','wcZcPIqp','W4FcJX/cRSkA','i2XFb8oAWPRdOwdcJa','hdnlW6ZdPq','ASowW4G4lYtcLa','aCotF3NdGW','WQBdUmkCsmkV','WOKWWRFdGSkxqGRdGq','BL7dI8ojWOC','dsr4hJ0','AZxcMGyE','W7KZoxL9arGb','mSo6WRbRDwa','msOvW5rZD8ky','Dr1FW57cJq','W5ZcRCoynX5h','AhLne8oEWQJdTG','WR0UpqtcQcm','D8ouESkZcCk3WO4','DSoxW44xlslcMSkfWOS','ibj/jdS','WOhcTCkAnSoo','oYOsW7r7FCknWR/cGhPjb20efmk5bmkgdEADToIcN+IpQEwoI+w7JoMqSEs/OoAcGW','fw1QaKm','lJOiW6j8Da','W7JcO8oYWPDF','4P60d+AEVUIaMoAUHoEGQowKPoEqL8ky','cSoysuJdQG','cHG6zSkhW6NdNGv7W5xdHg4','cM4gWQ/dPW','WOlcSCoMgmoMuhvXma','W6v4WPxcMGy','CHvJ','W5LuwSkRpX/cJbrHzcdcSa','WOZdP8oUW7hdVSo+W4NcVq','r8k3W7FcV8kyh8kI','kbRcGrSU','hWmMxCkAW4/dNHG','W6TTW5ZcGbS','zqBcOdef','WQm0natcTdu','v8kymXSMCSkxmmk8','b3TeA8kYimkgquOBj2lcU8kmW5ddOa','oc4sW4y','WOBcMCktkSol','CN1xfa','C8kdaXex','bmopW4pcMeNcQmkC','e8oCW7a6rq','6i2k5y+hW40+gatcNHtcPowNT+I3Ua','W67dLCkNi1q','hq87FmkzW5a','6i2g5yYcWQuMW5L7CvCvW68gWPFLPBtOTiRVV5a','b8oAWQXNuq','W5tcVHtdJCocotTQWOJcRNldQG','WOlcISkGkmoB','teFdLmo4WPq','t8oZW5mgka','WOBdHSkImMnU','dqSnw8kg','i8oYW4SYrSo2wCocWRC','imobWR5AWP4','bJNcOLLc','y8okW4q','WONdSSoSW7ZdRW','cwrRowuRWPG','WOblCYq','WR3cL2/cP8kbq8kpwCo0WOzk','gSopWOXaEG','WQ/dMSkam0O','WQ3dSSknogq','WPylctNcKG','tSoGW54qaa','W6XqW7/cMd4','WRyKlHlcSZZdJ2pdGSoAn8knW5FdPIbUWQbg','4PQQWRFORzdLOz7LHAdMOj/LVAlMRORNOlRNMiJPKkJMJze','bsfxpbu','W6/dIY5OWRK','W6/cOH/cTSko','adVcNsKV','u8kuW6NcTCkH','WOpdR3lcL8kX','WOldOCo6W4ddRq','WRaIlIJcRdJdI3BdRSo/','W47dM8ocWOXP','4PUpsUIUV+wfGEwTR+s7REw9VUINT+EAJoEmM+wGOowpK+MeL+wtN+weHEI8HUIGVoIhO+ACHW','W7LJFmkhgG','W47cLCo/WPvEWQ8wW4BdPmkP','AmogW48niIlcLG','6iYr5B2q772k','WRySnsVcGW','f252kL8','x8o6W4WmdG','W6X5WOG','WRGqWRBdOCk0','Bmouz8kKdCkIWQlcTIy','WRvqW6TKWPGQaSoVWQu','cem3WR7dHq','edvcW47dVY81W4m','zCoNcYtdPW','WQDhW61KWOaKh8oWWPfKWQfd','W5TsB8kpiW','W5BdN8kDoeG','jSobW7i1sW','WODXW41fWQKonmoCWO9oWPCB','z8kDhcuR','za5YW7ZcGrlcL8kcpa','WPldPCklDq','WPqSWPhdGSkuhq','WOCMWO4','W4xdJCoEW6ZcQq7dM8oHxcZdHG','WPfgjXtcR8oVwcxdSmkDgmori8ks','pt7cGefkvSk4EZzYgCkfoKG8bSo3W7WMxCoEWPJcRMBcN0VdRvldMCkFuIy0','W57dHSkhW6BcSq','gdHvW4VdVciKW4NdQd5yWQS','WOBcHCkdWPC','W5/dKSoPWOXBbc7dHmopWQ0SyCkZWP8','8ygoPSk0','W7xdUCo9WQbP','WPf0W7GnaWC','5lMA5AEY6ykW55Yn','WRGYfYtcTZpdMN0','BSovhdC','4PYIqUIeQ+ADNoI+QEIJRoMaUowiJUs4R+MwRUIVHwu','WQDhW61KWOaKh8oWWOL5WQK','WRxdRSoSW7pdOW','W4RWUOsk','WQdcR8kXc8o/','WQxdGmkdC8kR','hbj5oaG','WONdUmoOW4FdLa','nsepW5ncECktWOFcILbphq','6Ao86kEU5zQV54QG7760','W6FdNCoPWOrv','lIVcLfHaua','W5LuwSkRpX/cJbrGBZW','WRRcQCkUn8ol','m8ojWRTcEG','EHfiW6VcTG','osRcOwrV','WP/dRmoJ','l8ohWOLnWP4j','W5FdI8oeW6hcKqJdM8oXBYC','WONcMNZcMSkH','W5KOewre','o8oaW7VcOMe','s8kXW7dcPCkpeCkZsSkfoSoQ','5Asg5zgh5zk056AR77YY','WP9ZW6eDiG','WPaXWPpdHmkFAqhdLCol','WPddGmkOdw4','dZ5pW4BdRZKzW5q','776P5yEM77+S','W6yRafXz','W6ZcGHJcVSkC','W7BdTZ92WRG','zZlcJd47','WRtcLmkrW65GpexcLSo0dmkbW6avkuvS','W6tdHs9pWRZcPmoKfSoY','WPhdM1/cK8kb','e8oWWR9/DG','WPpdMCkkd3e','sSocW50rbq','AM5xb8owWQe','5Rwc5yUZ5ywe5y2b776q','h0mLWQtdG
|
|||
|
|
|||
|
// 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"])
|