faker3/jd_jinggeng_showInviteJoin.js

22 lines
101 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称邀请入会赢好礼 · 京耕
活动链接https://jinggeng-isv.isvjcloud.com/ql/front/showInviteJoin?id=<活动id>&user_id=<店铺id>
环境变量jd_jinggeng_showInviteJoin_activityUrl // 活动链接
jd_jinggeng_showInviteJoin_address // 用户登记收货地址,按照顺序依次填写 收件人@手机号@省份@城市@区县@详细地址,多个用管道符分开
7 7 7 7 * jd_jinggeng_showInviteJoin.js
*/
const $ = new Env('邀请入会赢好礼(京耕)')
const notify = $.isNode() ? require('./sendNotify') : ''
const jdCookieNode = $.isNode() ? require('./jdCookie') : ''
const getH5st = require('./function/getH5st3_0')
const getToken = require('./function/getToken')
const jsdom = require('jsdom')
var version_='jsjiami.com.v7';function l11Ii1Il(){const I1Iii1Ii=(function(){return[...[version_,'rRjRsTNDjiqatmEi.JcNoVHqmqJ.hlveG7CBUTYS==','A2v5CW','A2vLCc1HBgL2zq','EMGTy24','v1nkAu0','EvzqDxq','vvHwwNe','q1jZtuG','A0j0qKq','mte4mda0CgvXCgvq','Bffov2e','qw50zLu','Bgv2zvr3B051Bq','vNrnAem','rwP2rMG','s1biChG','z1LctMO','wxfQtwS','44cq5O+q56s644cr6k+35ywi6i635y+w5lQS5lIC6lsM5y+35lIay29VA2LLcUEBToAoPEs9V+EuQe5VyNLeyEEAHos6Ros4NoETVUwiSoIoT+wpLG','DuDdrK4','AwXrB28','Agvfwu0','qLzPELm','CezjuK4','wffgCeS','A3z6r2e','DMfIAe8','sg9wrvm','uMTryNu','Ahr0Chm6lY9HCgKUBs5Qzc5JB20Vy2XPzw50lMfJDgLVBJ9HChbPzd1Qzf9ZAg9Wx21LBwjLCIzMDw5JDgLVBKLKpwDLDfnOB3bpCgvUq2fYzeLUzM8MyM9KEt0','rKT4ueC','EgHqA0q','CK5yBwu','5lQS5lIC5PYn5yQH5zMO6l+u5zUE5PwW5O2U5lI656M6','yu5Swxy','Bu1PwwG','u1vmDge','yxDHCMruD29tDgf0Dxm','zMfSC2u','wwzIDeC','v3nSzuG','B0Lyrve','DKLnAey','tfP1Dfm','y0jeBfy','EfbovuK','t2T6q0u','AgDsCg0','vxfiBeC','q0XNBhe','Aw5KzxG','v0fmz04','zfrJCgW','y0PtzLK','DuDdwKy','zgnNreC','jM1VyMLSzt0','zxHPDa','5y676Akg5y+w5Aww5zobiokENcaG','tu9qsKy','y01SsLC','qwDlyMC','rK1KrMe','jMf3yxjKswq9','CgDSEe0','BwvpDNa','EMrJrNK','uNPyyxq','Aw52AxrLu3vJyW','s3vJuMW','CMvJzwL2zxi','qKjLu2m','BMDXANq','tufuyNC','BuTstey','u0v3q28','u2P2C2i','rgLiyNG','tfbuDxC','BgjbEhC','ANbgrva','EK9RzuW','z0Dhvge','u2X6ENa','u3rKvNy','yxbWBgLJyxrPB24VEc13D3CTzM9YBs11CMXLBMnVzgvK','AgvSCevUza','rg5utgm','ignOzwnRvg9Rzw5jBLnLC3nPB24Gqvbj6k+35Rgc5AsX6lsL77Ym6k+35Qoa5P+L572r6lEV6yEn6k+v','sKD1BeK','CLP1sMy','v2Xvtu4','yuzesum','uvHjveu','z2v0zgf0yq','q2Tkt0S','sLzZwfu','Cvfksgu','sgvrtvi','EujyCwS','uM5Ht24','wfj1qMe','vM9eDNq','6k+35yU/6zQp5Osp5zYOqM94sNpOVPpLHAxMOyBKV67MLlNLHOxLRRKk5BU66k6U6ycA6l+h6isA5PYS5y676i635y+wy29VA2LL','y3f6v0e','sezIuwO','zuroz0i','AgLgtuW','yxbWBgLJyxrPB24VANnVBIWGDgv4Dc9QyxzHC2nYAxb0lcaQlYO7ihe9mc4Wmq','vhbnzgK','wef2ALa','D2XtA3e','jMLZt3bLBKnHCMq9ma','wvzNvgu','BgrUs1O','z3Hpq04','teLLrxi','txbQtu4','BMf1CgC','zMLUywXSEq','yMPqCeG','o0LZDLrVA2vUpq','5BQx6zo656EV5yIg','yw5ICuK','t1H5qvG','4P2mioMIHUwpLUwKSEI0PE+8MG','r3zKvM8','jMLUDML0zxjoAwnRpq','CgfYC2u','zvHwvw4','zLP6zvm','DKfZrLy','ze5UweS','77Ym5yMP5l2z','q1jUv1i','Dgzmyui','tuDwEvq','Avfxzey','vxnLCK5HBwu','BuPsqwi','vhvxCw8','r3H5Chy','seTXBfa','yw5cCMq','rwTrtKW','EM5Py2S','DxDrEKe','jMnOyw5UzwW9odaXjNjLDhvYBLvYBd0','v2fjD3i','qKHYtwW','A0jvDxy','yxfkCLu','v2fAtMC','sxfQue8','sLzzBeW','sM94vK4','zg1cvfe','tMvrCNO','DhDV','vxLOCNK','ChP1u1O','sKnpBe8','qKL0yK0','5Rs75yQO5AsQ54gR54Ig77Ym6k+356In5zco5yAn6k+v','tNnRuxC','wLfXrwu','AKDhBue','jNvZzxjFAwq9','tvnNq0i','AMrFC2HVCf9Tzw1Izxi','C0zwAe8','ExPLtK4','ELvsu1y','z1jqzeC','yK1ysKG','Aw50zxjLC3rZsw5MBW','BMLJA05HBwu','BfDns2y','t3b3Dg4','r1rMyu4','5yQG5ywL5BQx6zo65lYA5zgy5AsX6lsL','CerbwgK','5l2G5Aw977Ym','ELr0tLG','Dg9Rzw4','vxDOy20','rfjvvfe','B0XUC1K','EKfLt2C','y0rXqvi','thjiuvm','zxjYB3jkB2LUu2HVCa','DezXCuO','zuvsrM0','wuLIDwu','q29VA2LLsKqY','z0Tmsva','zePTr08','q29VA2LLC0Pe','EwTewKS','wNvPqve','uKDPvwS','zKDfyNG','uMrAEuq','B2jQzwn0','D2j5Eeq','BwfW','EfLIzu4','q0Pbufi','sxbzs0i','z3jgswC','q1nmt28','ywn0AxzPDhLfBMq','B1j2zhe','DNfxtK8','5ywL5lYA6i635B6xoIa','EgnKuee','Aw50zxjLC3rZuNvSzuXPC3q','DxnLCL9Pza','uvrxCMu','tvHwzva','rKzeuhy','vxnnwhy','jNnVDxjJzt0Wmq','r0nmyK8','sKPeAfC','EwjevLq','t09UBKy','l2zYB250l2nOzwnRvg9Rzw5jBLnLC3nPB24','uMDctwu','zLzjs0C','CgHbC3e','BeLTqKS','sKLPuMm','kf58wYy/xsK','D2LUzg93','C3rHDhvZ','sg5dshm','6zQp5PY65OQ95y+w5yIW55Qe5Ps26lsN5zYW5z2a5l+H5OgV5Qc85BYp5A2y5zYO6zsz6k+V77Yi5y+c5PwW5lIn6lAZ5OIw6l+h5AsA77Yj','te9iBNe','sfLpsue','vgnky3G','l3fSl2zYB250l3bVC3rcDxLLCKLUzM8','ihjLy29YzefJDfb2vxzeyxrHiefqsEIVT+AXGUwKSEI0PE+8JoIVT+AJGoAFPEE9KEI3R+MhJEIVLq','Ahr0Chm6lY9HCgKUBs5Qzc5JB20Vy2XPzw50lMfJDgLVBG','qK1js2u','r0neuxa','Bvr5AMi','DMvUzgvYq2fYze5HBwu','yxbPlM0UAMqUy29T','z0rrAKi','C2vJB25KtgLUzurLC2m','sLrtC0i','Bhr0t2O','AvrLDhG','ugLU','uvfZqKG','A0j2Buy','z2LMDeLUzM8','v0Tky2q','C3bSAxq','qxjvvxK','whPxtuW','uevMzhG','iIWIyMLUzej5vMvYAwz5q29KzuzSywCIoJeSiNjLz2LZDgvYrxH0zw5KiJP7FsWID3jPDgvdAgLSzezSywCIoJa','jNrVA2vUpq','ihjLy2vPDMvjBNzPDgvkB2LUqxDHCMqGqvbj6k+35Rgc5AsX6lsL77Ym6k+35Qoa
// 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"])