KR/jd_lzkj_loreal_followGoods.js

22 lines
65 KiB
JavaScript
Raw Normal View History

2023-07-27 16:14:01 +08:00
/**
2023-11-10 11:28:39 +08:00
活动名称关注商品有礼超级无线
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10053&templateId=<模板id>&activityId=<活动id>&prd=cjwx
https://lzkj-isv.isvjcloud.com/prod/cc/interaction/v1/index?activityType=10053&templateId=<模板id>&activityId=<活动id>&prd=cjwx
2023-07-27 16:14:01 +08:00
环境变量jd_lzkj_loreal_followGoods_url // 活动链接
2023-11-10 11:28:39 +08:00
jd_lzkj_loreal_followGoods_opencard // 是否入会true/false默认不入会
jd_lzkj_loreal_followGoods_Notify // 是否推送通知true/false默认不推送
jd_lzkj_loreal_followGoods_break // 493后继续执行默认退出运行true/false
2023-07-27 16:14:01 +08:00
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
2023-11-10 11:28:39 +08:00
#关注商品有礼超级无线
1 1 1 1 * jd_lzkj_loreal_followGoods.js, tag=关注商品有礼超级无线, enabled=true
2023-07-27 16:14:01 +08:00
*/
2023-11-10 11:28:39 +08:00
const $ = new Env("关注商品有礼(超级无线)");
2023-11-12 16:44:11 +08:00
var version_='jsjiami.com.v7';const IIlI1i=iii1II;function Iii11l(){const liI1Ii=(function(){return[...[version_,'YJXgjdGMsGxjHilqladBmuiB.PVCcrEeoIYm.Vv7==','W57cSw/cQI0','nVc1N7FVUBO','W6HjuJ1trGqg','WPnRnb9Xqwu','WRLvsG/dMCkwW7q','dSkQW7FdO8klWOiVWRyeaa','WPvSWOtcUMFcO8ka','WONcKfj+WOG','CmoWzWLetCoweSkRfG','5z6e5z+b5Rwz5yUE5lQF6lES5lQQvq','WQRdKv7cI8o5W6q0W40','WPdJGlZLURBPKRFLKihNP5VJGAzc','5RsT5yIb5BAA5lU7WOC','W47dNSodW7W3WRmnW4O','W47dVmoJnmovW6u0vq','WQLlCXldVG','sCo9WPZdNG','A8ojWO1BeG','WQWJWQFcP3HoWQddMa','nSo8fSkLW4FdSLVdVCkKW7m','WQpcT8kkaCoD','sCoGWQy','t+ISVUAZGEwMU+I3Mo+/OWNcQJ4uWRFcJCojW6VdKrpdK0HSiW','FCo6WOBcVCkP','yCkwgG','WPtcTMvaWRSVW7NcKwddMa','8ksKGCkA','W7qihYOqW6Lr','W6BdQ1VdPSkaWRPD','WPH4WOpcMv7cSmkl','WOJcQmk/','dwNcTupcV8oUW6P8','nmkIW44','WPH/WP7cUfVcVW','WQWyehS0eZyibc7cT8od','WR1RDdxdVq','W73cUvlcJb7dL8o9WQ04','W6FdTvZdK8k8WQS','kSosnI5FWQZcTJC','WQ7dRmksagZdOG','lLGJWOiCW7C0W7q','o8kquZLD','5P+q5B+F5AsI','5Rwu5yQo5Bk85z2krq','W5hdSSo5na','lmosmG','WRqKW4jTzq','WQZdOSkkdq','44c25O6s56sB44kd6kYp5yAZ6i6y5y2jWQVdUSkwW4hdULK','jCo+rmkEW68','W47cPJpcMSopWQ8U','WPiGW6WI','W5TUWPzNuhFdOCovmCkRWPib','5yUI5yEy5BUs6zkG5lYR5zkv5OUl5yUn','5yIs5yw45BMf6zo45lYS5zgk5AA+6lAd772y5REr5yMk5lQT6zIY5BQs6zg95l6c5zor5y2y5lMw','WPhcHGbXrq','bupdJWKh','xhJcKq','WP/cVhy','W7FdSSo7b8oS','lCoEvmkn','WOtLKi/LU7pcTSolWQuRu3FcSCkcl8kQ','W4SGW5pdKCoe','bfqjpSoeymkqBf9GnNq1W50','W4ddVmo8lmouW7mEx3NcHmoh','swxcM0W1owPUhq','jmoupq','WQDEDqxdNa','hmkVe3PD','bSo+przN','W6qCW6NdRSoVeXtcQSkIW6NcRSku','W7tWRAYN','WRJdT8kHhgRdUW','WPjJWPtcRuVcOCkyxqP2','W5fjWQNdTX5PWOe','cL8EfmoEAmkzCa','WR7JGlFMT7BLIiVLPkhLK4xJG7u','5BIz6zkj6zg+5OYL7762fatcU8kBW7tdSSouWOH2oSoSWPKXj8oLW5NcMKGYWP5NWPJdPCk3h1RdKmoEdmogWP/dMa','mmoikX9FWQK','doAmNEwmG+wtKEw7J+AvKoApLoINPUADG+wMPUI1VSowqa','WPNcNXX8udJdGG','WRhdNgZcVCoq','8k+4LMu','c8k1rJn/','WQhcMWrBsW','WPFcSMvS','W5HiWQO','5lUL5AEv6yoK556j','vCo1WPnko8oJ','BCkWaWFdIW','bSkNW6FdR8kf','xmokWOLMpM7dM2JcTG','eCoLjGLH','W7NdR1u','s8k3jGTt','5P296igI6i+v5yY255Ab5OQH5Rs05yI854M/5Okx','sSoGWPJdGurSySkAWQq','l8oynILqWQRcVG','x8o0WPLjkG','WOVdPCkukLi','yoIVHUAWGUMgPoE8VownLoAuQEMwIoISUE++HoIVOUIdSEEYOUw8I+wmNoIdIUI8GoIIUUwoTEMLSU+9HSopW4frzmkwW4BdJL7cLmojyh/cNgK','5PYr55YZ5RwV5yUq54Qa5Oc3WPi','pSoXaCkmW5ZdSMRdPW','jSopjc1HWR/cSIGP','W6XxW4b7WO8','D8oYzW4zz8oLj8kRi0q','W7hdGSopW6a9WRCt','zmoCbJddICo+','fCkenxLJ','W4XKW41UWRxcImkEpSkko33dRq','W4JdLCobe8oI','dgtcQupcRSoSW6H9uW','jCo6eCkqW7BdTwddSmkS','WR8IW4JcN8ku','5BEe5y2l5A2X','bSkNW6ddPSkiWO8+WRW','AmkhmtZdGW','jfa0WOG','rSoNWRFcHmk+WOTaW6ZcIH3dOqa','WQVdNelcI8oOW6GQW48','8jsvQE+7RZZKVypMG4dLIOi','W6C1WRZcU2LGWQe','W7viWQpdLGa','W4b4WQfYAx/dVmob','W7/dR1VdUmkBWQfvtW','5zYL5z6T5RAR5yUO5lQ26lwv5lUFtG','W45OW5rnWQ3cJmkyl8kDpwxdPGq','emkqFrS','tCoBWPr1luNdJNZcHSoLnW','AfjfxmkTccJdVmoX','d8oKACkCW7BcQq','tmo3WP/dN0rkuSko','W7BdImovW70yWRuf','W7/dJmosW68','W6VdN8opW7qCWPSoW4KB','W7ypW6ftW60','W6yCW7pdTmochr3cQG','hYebqflcPCoPWOfJ','WRWPW5jHA8kRCSoOWQrS','4PYoWP3OHz/MNBBOV6hOOOhPGPZLIAlKU4RPLkdORkqP','wCo9WOpdIa','WReLW4e','5P2Y55YO5RAs5yUM54ID5OkOwq','y8oUWRf9gW','AunhwCkIdcq','eCo+ya','l0q0WQ8+W7C+','FmobWPtcP8kg','jK3dRJqM','sxNcHLism2q','FSk+W4y7W5NdIHXkWRLhfSocWO0bW5NdSSojW4uvC8oeEXC','W5biWQpdHG','W7FdL8onW6q','8yIFG8kg','xCoLWPVcUmkQ','imo+c8ku','r8omWO1mcq','f1pdGIK2','4P26WRRLVQ7LIAhMTANLIkZNSANLNiVVV4C','gCoWC8k4','WOhcUCkvWQxcOG','x3/cILCIlNDydCoD','W6HztWHItW','qeFdIGTkW6bIW4VdPq5XWPKfwSk0WR7cMZNcRrVdQ8kQW6VcH1PPW6VdVCkJW6xcPSo5W4K3WRS6CGuet29PBuldSb1QrW','juRdNcyk','WRJMIQdKU78I','WOdJGydMT7tLIAdLNlJLNyFJG5u','bCktFXfy','fqaJW6JdPhLTkv97W77cNG','W5eiWQOIWO/cLa','a8kMW6q','BSkrbHpdQG','t+ISVUAZGEMhH+E+K+wmQEAuQ+MxLUIUOU+9QoISR+IcT+EXGEw+JUwmOoIbTEI9P+IHOowpHoMMI++8QbBcNmoxWPNdHtRdJqRdM8kVeg3cI8kt','W63dIMddOmke','WQRORQFMSO3OTy3ML77VViVORlpMOkxMNjdNVl3NU6RPHz3ORAu','5Rsb5yI65Bo35z6taq','uwdcQLRdNSoUW6rTx8kaW5OYsdVcOaldHs1BWRpdPG','x8omWPj1nuFdK2pcQG','WRhdMK7cL8otW60IW5K','W5FOR7RMSRxLP67OTjFVV5NcVMGqAbNcRLJdJ3ldK0bTWRFdTq','baO5W6/dV3n6mW','W4LMW41C','lCkUm1fFuCoedq','W6/NU7ZMNidVVzJKU5lMRORMLiVNGAtMNApLK6dcKW','WPxcM8k9a8oS','5P+56iom6i6P5y6255AA
2023-07-27 16:14:01 +08:00
// 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"])