2022-02-08 14:36:02 +08:00
|
|
|
|
/*
|
|
|
|
|
粉丝互动
|
|
|
|
|
蚊子腿活动,不定时更新,尽量自己改定时跑,一起冲容易挂掉
|
|
|
|
|
环境变量:RUHUI,是否自动入会,默认不如会,设置RUHUI=1,则会自动入会
|
|
|
|
|
环境变量:RUNCK,执行多少CK,默认全执行,设置RUNCK=10,则脚本只会运行前10个CK
|
|
|
|
|
* */
|
|
|
|
|
const $ = new Env('粉丝互动');
|
|
|
|
|
const notify = $.isNode() ? require('./sendNotify') : '';
|
|
|
|
|
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
|
|
|
|
const RUHUI = $.isNode() ? (process.env.RUHUI ? process.env.RUHUI : `888`):`888`;
|
|
|
|
|
const RUNCK = $.isNode() ? (process.env.RUNCK ? process.env.RUNCK : `9999`):`9999`;
|
|
|
|
|
let cookiesArr = [],message = '';
|
|
|
|
|
if ($.isNode()) {
|
|
|
|
|
Object.keys(jdCookieNode).forEach((item) => {
|
|
|
|
|
cookiesArr.push(jdCookieNode[item])
|
|
|
|
|
});
|
|
|
|
|
if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {};
|
|
|
|
|
} else {
|
|
|
|
|
cookiesArr = [
|
|
|
|
|
$.getdata("CookieJD"),
|
|
|
|
|
$.getdata("CookieJD2"),
|
|
|
|
|
...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item);
|
|
|
|
|
}
|
|
|
|
|
const activityList = [
|
2022-02-17 20:52:37 +08:00
|
|
|
|
{'id':'027ba51d1ee44a3eb9dddfb06ee4f9e6','endTime':1646063999000},//2022-02-01---2022-02-28
|
2022-02-08 14:36:02 +08:00
|
|
|
|
{'id':'dc08625c66a342a7b884b7a0e981edd8','endTime':1646063999000},//2022-02-01---2022-02-28 Origins悦木之源京东自营官方旗舰店
|
|
|
|
|
{'id':'145efa9da8d74d4784f284a10f3f13c2','endTime':1646063999000},//2022-02-01---2022-02-28 戴·可·思(Dexter)母婴京东自营旗舰店
|
|
|
|
|
{'id':'ad006d9123d14e92b40a898c19508bc1','endTime':1645286400000},//2022-02-01---2022-02-20 乐而雅旗舰店
|
2022-02-17 20:52:37 +08:00
|
|
|
|
{'id':'d8594388e5454a568e49592f90c2bf5b','endTime':1646063999000},//
|
2022-02-08 14:36:02 +08:00
|
|
|
|
];
|
|
|
|
|
var _0xody='jsjiami.com.v6',_0xody_=['_0xody'],_0x33f5=[_0xody,'w5bDp8OCwozDmQ==','KMO/w7TDlMKr','w7LCuVg=','5oqT5aSN6I645b2pGg==','YsOCU8OH','wqsJecO6QsOTw6R6','V+iMjuW/oe+9hQ==','ecKdwpDDrA==','wpfDpXPDvMONH8O6E8OkwrcqJ3lbw5zDlQ==','w4XDncKxMcKPwrXDqzFpwppuw53CjsKnYRo=','w6rCt0zCknHCt8OcwrpjYsOgInXCq3/Cgg==','5oq66KCP6YKK5L2A5Z+0','wqYAEWnCoFk=','EsKVPC/DoA==','w7PDkcOiwoLDv0Z3DF0FIHs5wpXChMOvJSbCvMO9ZcOpYcOBw5nDrsOpwqPDmT4RwqJ+Q8O8w4Etw5sR','w6wfMAU=','GBUA','wpDDkMOtSMOMw4jCscKIwrI=','wpPDhcOtUsOH','wqjDlcKVQU4=','f8OWXcOBwo7DtyA=','5Ya45LyqWQ==','w5/Dt8OXw63DlH4=','w63CvlDCiQvCn8OUwr1yQMOPImTCqmDCgzjDuQ==','I8KKHxLDsDZ8wqXCgMOmQTdSVg==','wpDDrG/Dp8KbMcOrH8Omwo4yP1Na','NkrDjlsJHA==','RzV7wptSb8O4REXCtMKuVcOeNE5Nw68=','wq9VEMK1E8K/','w6ceIBnDg8KUw67CmcO8eMKMHxvCu8O8wqdL','AnUHGE3Cv8KvFFnChQB+NMOIw5zCjMOJ','cBp2wobCusKXwrLDlDVt','QBlowrtZ','wpvCi2M0OA==','wq7DhcO0UMOy','V8KTwpE=','Ymgc','PRAWKuito+azjOWmuui0ju+8kOiuiOais+afsee/v+i1l+mHu+itug==','FV5XVTM=','wrfCssKcwpDDjA==','w4ZcF8KqeA==','dSUMNsOR','wp/CgnEKCcOJw4JNNMKTwozCug==','wrQVIw==','wrAiw6U5wqY=','CMOMFCwNYsK7cMOA','JsKfHR/DoQ==','WTggRMKhDg==','RUQ8Ah0=','cCMICMOy','w7/Dq0LCrHs=','woHCgmMLC8OGw7c=','w4PDmcKxL8OUwow=','CcOcBSoVZA==','PMOkbcOOJsKRw77DhQ==','DHIVCXPCs8KvFA==','XF3DlQ==','5YSw5L+16I+G5b+hwq8=','am4IGRUpwos9dsOTOMOlCMK5','wqXCt8K/wrLDgyTDhsK/Yw==','SMKMwprDpcOf','CcOGY8OIAw==','RzVrwptYRcOt','AMKNXsKRwoHClcKgwpNRw6EeBsObw7/CoQh+woPDuAg4UMOfwqPDnsKqwqfDqg==','wrrCoApswp/CvTPCs1/Dm8KoDcKYcm7ClcKf','RF3DmW7DoQ==','w7TCn8Oo','bcOTTsOOwoLDpzLDiMOTwoDCrBcfayfCqcOywpteOcKYLcK9Dn8yU03CkcOjJsOKOg==','wo3CusKHGMKZ','Ul3DlnI=','fmR8ZxbDvCUENcOUwpbDmg==','wrd1IcKUPQ==','w7DDpi/Cp1ofwqAdDkVfwr8/R0xWwrlTw4t8w4MIw4vDtcK9w7UPwoI4MDVdVjkZworCnUNrXMOew4HDgMO3GnMW','wp7DgcKuwr/Cthx1YBjCtSzDogQ9w7nDgsKmw7DDgER1w4/CqkoaIRXDkcK1NUrCslRzMWLDpkHCsMK8W2PCu0zChMO7PjMgwoBZdy7DmgMWVMKww5fChcKawqnDk8KrS2xbWMKrIcOY','XWEQGCM=','wrAfOG7CqFs=','QhJtwrVo','GsOJBjMQc8KzasOOBMO2RsOgKMKXwqAowpIjK8ORCUfDmnrCosK/w67DlT9rw4DCqA==','w7zDpsOGwrrDlg==','R8KoNcONw6ckTCDCk8KHe13Dm2IkYzDCoMOF','WypXwq4=','wpYoOU/CuQ==','OsKBCxnDog==','OHEDO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sKCCiVpw6NHR8OlFMOOw5rDrVI5wozCmsOswqHDg8K0wqwhPGc5w7LCmcO2wpt+JcONwrVaDRTDnsOnwqrDisOvMCrDqsOXwrcAwrXChjPClcO7wpYt','wrpyBMKUHA==','w4fDusORwqfDiA==','w53ConrCixU=','wqnDt8OAdMOxw6rCisKxworCo0QSwqw=','aMKTXcOcw7ZJcQ3DsMKb','w4zDnsKTw4FLwpTDow==','asKTwofDr8Ov','WsKlbMOqw4h8Vw==','wq7DusOWwrY=','OH5xJQ/Csz8QIMOewqnDlsO1ODTDoEjDk1grw43CvAjDhSJid8KVwqVad8Krw77DpQgqP8OdcsK8SlEKwrHCqT4fwo3Csh92w4vDiTbDgsOgw4fDpmpbN3HDjMOVw4Qiw7jCicKzKMOIwoZ0wp59w5XDmMOWMgLDjcKkwqfCnMKhw5EDB8O7w7PCpMOwU3bCisKawo8gw69fPsKKw7MlwoRQw6ZkMW7Ds2ACw4Ytd8OEwojDlWzDq2oBCiU8TsKew5zDhcOwGjvCpRgHZcKTWQXDjcKCL8OEw69/wr0Twrs7w4pDw73CsA==','GMKWWcKV','wo/Dq2fDksKIIA==','Hj7Dv8OxJQ==','w5nDrcKPw5NO','Fea0r+WKvQA/77+I','NTLDlMOQEQ==','wpzCrG4vBAY7fWATXsO3','w5vDkmvComMUwq4HAgUAwqZiABoIwrVbw5ZJw5MTworDoMOqwrQPwqNHMC5GUg==','woTDicOrcUU=','wqUMw5gxwrY=','wqHCoMKuwrzCiQLDk8K/asKAMsKvUGDCqV3DuM
|
|
|
|
|
// 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"])
|
|
|
|
|
|