2024-06-28 15:38:28 +08:00
|
|
|
|
/*
|
2024-08-26 15:45:34 +08:00
|
|
|
|
活动名称:邀请关注店铺有礼(超级无线)
|
|
|
|
|
活动链接:https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=<类型id>&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|
|
|
|
https://lzkj-isv.isvjcloud.com/prod/cc/interaction/v1/index?activityType=<类型id>&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|
|
|
|
https://lorealjdcampaign-rc.isvjcloud.com/interact/index?activityType=<类型id>&activityId=<活动id>&templateId=<模板id>&prd=crm
|
2024-06-28 15:38:28 +08:00
|
|
|
|
环境变量:jd_lzkj_inviteFollowShop_url // 活动链接
|
2024-08-26 15:45:34 +08:00
|
|
|
|
jd_lzkj_inviteFollowShop_notify // 是否推送通知(true/false),默认不推送
|
|
|
|
|
jd_lzkj_inviteFollowShop_pin // 指定助力账号,多个用英文逗号进行分隔,指定此变量时将忽略下方助力账号数
|
|
|
|
|
jd_lzkj_inviteFollowShop_helpnum // 助力账号数,默认助力前3账号,需要助力其他请自行设置变量
|
|
|
|
|
jd_lzkj_inviteFollowShop_num // 指定助力次数,不填默认为最高助力人数
|
|
|
|
|
jd_lzkj_inviteFollowShop_concThreads // 控制并发线程数(正整数),默认1 (注意:根据助力人数自动调整线程)
|
|
|
|
|
jd_lzkj_inviteFollowShop_concRetry // 最大重试次数(正整数),默认0即不重试
|
|
|
|
|
jd_lzkj_inviteFollowShop_concTimeout // 最大超时时间(正整数,单位毫秒),默认 '60000' 即1分钟
|
|
|
|
|
jd_lzkj_inviteFollowShop_pinFilter_interactsaas // 账号pin过滤,多个@链接
|
|
|
|
|
jd_lzkj_inviteFollowShop_pinFilter_interaction_v1 // 账号pin过滤,多个@链接
|
2024-06-28 15:38:28 +08:00
|
|
|
|
|
2024-08-26 15:45:34 +08:00
|
|
|
|
支持的活动类型:
|
|
|
|
|
10068 邀请关注有礼
|
|
|
|
|
|
|
|
|
|
注释:
|
|
|
|
|
需要链接中的三个必要参数才能正常访问活动页,运行脚本至少需要提供 activityId 参数
|
|
|
|
|
官方后端性能较差并且写的很烂,同一时间冲的人较多会导致服务器抽风返回 500 即 Internal Server Error
|
|
|
|
|
|
|
|
|
|
cron:1 1 1 1 *
|
2024-06-28 15:38:28 +08:00
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const $ = new Env('邀请关注店铺有礼(超级无线)')
|
|
|
|
|
|
2024-08-26 15:45:34 +08:00
|
|
|
|
var iil='jsjiami.com.v7';function II11llIi(_0x3b4b7a,_0x39aef7){const _0x2ea18f=I1il11II();return II11llIi=function(_0x42450d,_0x38c69e){_0x42450d=_0x42450d-0xed;let _0x4d7d13=_0x2ea18f[_0x42450d];if(II11llIi['fcbUHb']===undefined){var _0x5b6eeb=function(_0x1d2dcd){const _0x240152='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5c0a5d='',_0x4ed2d6='';for(let _0x1ee03e=0x0,_0x2c83c4,_0x5ebdf9,_0xe2558a=0x0;_0x5ebdf9=_0x1d2dcd['charAt'](_0xe2558a++);~_0x5ebdf9&&(_0x2c83c4=_0x1ee03e%0x4?_0x2c83c4*0x40+_0x5ebdf9:_0x5ebdf9,_0x1ee03e++%0x4)?_0x5c0a5d+=String['fromCharCode'](0xff&_0x2c83c4>>(-0x2*_0x1ee03e&0x6)):0x0){_0x5ebdf9=_0x240152['indexOf'](_0x5ebdf9);}for(let _0x38d191=0x0,_0x4a5834=_0x5c0a5d['length'];_0x38d191<_0x4a5834;_0x38d191++){_0x4ed2d6+='%'+('00'+_0x5c0a5d['charCodeAt'](_0x38d191)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4ed2d6);};const _0x8a3603=function(_0x56044c,_0x267787){let _0x38aace=[],_0x38691a=0x0,_0x159105,_0x5d8489='';_0x56044c=_0x5b6eeb(_0x56044c);let _0x3a4525;for(_0x3a4525=0x0;_0x3a4525<0x100;_0x3a4525++){_0x38aace[_0x3a4525]=_0x3a4525;}for(_0x3a4525=0x0;_0x3a4525<0x100;_0x3a4525++){_0x38691a=(_0x38691a+_0x38aace[_0x3a4525]+_0x267787['charCodeAt'](_0x3a4525%_0x267787['length']))%0x100,_0x159105=_0x38aace[_0x3a4525],_0x38aace[_0x3a4525]=_0x38aace[_0x38691a],_0x38aace[_0x38691a]=_0x159105;}_0x3a4525=0x0,_0x38691a=0x0;for(let _0x3381e4=0x0;_0x3381e4<_0x56044c['length'];_0x3381e4++){_0x3a4525=(_0x3a4525+0x1)%0x100,_0x38691a=(_0x38691a+_0x38aace[_0x3a4525])%0x100,_0x159105=_0x38aace[_0x3a4525],_0x38aace[_0x3a4525]=_0x38aace[_0x38691a],_0x38aace[_0x38691a]=_0x159105,_0x5d8489+=String['fromCharCode'](_0x56044c['charCodeAt'](_0x3381e4)^_0x38aace[(_0x38aace[_0x3a4525]+_0x38aace[_0x38691a])%0x100]);}return _0x5d8489;};II11llIi['wOpBOP']=_0x8a3603,_0x3b4b7a=arguments,II11llIi['fcbUHb']=!![];}const _0x37f61b=_0x2ea18f[0x0],_0x46aa12=_0x42450d+_0x37f61b,_0x5319aa=_0x3b4b7a[_0x46aa12];return!_0x5319aa?(II11llIi['NTyfBr']===undefined&&(II11llIi['NTyfBr']=!![]),_0x4d7d13=II11llIi['wOpBOP'](_0x4d7d13,_0x38c69e),_0x3b4b7a[_0x46aa12]=_0x4d7d13):_0x4d7d13=_0x5319aa,_0x4d7d13;},II11llIi(_0x3b4b7a,_0x39aef7);}const lIi1l=II11llIi;function I1il11II(){const lIIil111=(function(){return[...[iil,'PJhjnYsOPjMigxfaJmtligg.QcWoqdnm.lFvrT7y==','W44WsCo4Aq','g8onW7hdGhW','ig7dH8kvWPm','WRXwnCk3WQ4','W7tdI1hcM2K','EGVdOJGu','W4TcoXiFB0FcQdGdsGpcLG','xr1F','5P2F6ict6iYX5y6D55wE5OQI5Rwx5yQ654Q25Oc3','WQGrW53dILDo','rJD9WR1PfGO','ow/cTSofW4y','W5P/dSkkW6q','W7ZdI8oaW6WVvmkfWOJdJqhcQCkft8kccmo+','m3ddV8kOWRWUW5Lv','W4uoW5dcHKTsWQr5zSkMEmoQW7RdHMu','WPSBAMvY','WP1FjSk0gq4XnZJcLbpdH8kU','W4mBW5tcV1bDWPvSFCkOE8kGW6tdKhJdJJOVWQ9hW6BcLCkqWPu2W5X8WOTRWPxcMGrg','WRf9aSkjWOW','ke/cQSoSW5a','W484W4RcUf4','jvdcP1uU','W6ldOXPw','WPaxxgvo','WRekW6FdQeK','W4ddLNddSMZdGuXk','WPncc8kimW','5P6m5B+65AE9','q8kFqqXWjbpcVL0','W6qBEW','wqDnWOXn','jSomW6W','bHrMWPbKivu','W6nrW4xdTq','W68YxrKC','t29RW6Pu','W6nnWOhdKWafWQmsumkZ','WRLuqf1NW4bAWP3dOSogBa','W4JdRha','BeDtW5LcW6bV','hCkuq8oOEG','q8kFqqXWjbK','kYhcHSkJwW','d1xcRmoFW79dAHxcVCkNWQ9N','WRm3kwFdJG','W7NdJ8oAW70','vmkyFdfF','WPZcLtdcPqRcQ8kvW5eioa','56UY5RgG8jIqVG','a8kHWR7cK8ok','omk+WR7cI8kt','5OoQ5zAS6iYg5BYd5A6l54U3s3lLPypLKRJLK6xNPQVVVPG','qmkfrWzCcq','W6zpWOhdMW','W61FW5JdULBdSve7xbFcJJq','WPRLU7lPKOhPKOxMJyBVVQZcMCogWRlcOrCCfCotW7i8W47dMKyxW5VdMmosscONDNjMWQJcRSotWQCVnYtcJSkR','WOmiW5JdILW','W5aoW5FcO2zDWPT8Cq','W7fgWPRdIJ8i','icVcTW','n0NcRSoMW7O','cSktWRZcUmoQ','W6PbWOBdJHGnWROo','W50jhI3cQG','W6ifW5lcTmkk','WPpcRdtcVGhcVa','BeDrW5X4W75Oha','56Iu5RgL8j6HNa','bZ9SWPjV','amk3zW','W67dNmkXW4NdIG','W5S4A8oxva','W6qkeb7cJq','8jo9SU+4PW','W4JcN1pdL8k6W5pcHmkXrmoFW4pcHSo+W6tdLmkvaSoKu8ktyG','mdmHwCk0xuRcOmoxrG','F8oIW7qna8oaWOBdHW','DXRdUcmq','k3RdPCk2WQOJW5bEW58','W4akW5FcTMXmWPG','W43dVgvska','W4miW5dcNvHtWPe','W77cOHVdTgWZWPS9WOzrW4qLWP10WPW5r8kXWQldISoCWO7cLmofrGhcH8k3W5VdT8o0pSkT','WPnumCkraHW9ma','W5ryla','aCk7Cx3dUCkvW5u','WOhcJ8o/W7q','iZhcMCkuFq','nmklW64gea','WP9tfSkheq','D0XrW4LvW6C','5RAF5yIR5BEL57Ic57UW5PY7','f23cRCo+W60','WQ0AW4dd
|
2024-06-28 15:38:28 +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"])
|