faker3/jd_jinggeng_exchangeActDetail.js

25 lines
52 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称积分兑换 · 京耕
活动链接https://jinggeng-isv.isvjcloud.com/ql/front/exchangeActDetail?id=<活动id>&user_id=<店铺id>
https://jinggeng-isv.isvjcloud.com/ql/front/exchangeActDetail?actId=<活动id>&userId=<店铺id>
环境变量jd_jinggeng_exchangeActDetail_url // 活动链接
jd_jinggeng_exchangeActDetail_Notify // 是否通知true/false默认不通知
默认不入会没有入会就没有积分
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 { jinggeng_savePrize } = require('./function/savePrize')
var il='jsjiami.com.v7';function liIlllIl(){const IilIlIlI=(function(){return[...[il,'bbLSjdsSUjOPixayqmEiO.tkRcqogmVy.YbUvD7B==','W4rGjrSB','WQpcQSoDACozWOlcIdS','WOODv2r+ySoFCIO','W77cK8oNuKm','qSoizSomxa','4PUiCEIUR+wfOowTSEs4Tow9MEIKPEEBO+EpMUwHVowmL+MgTEwrMUwgJUI+UEIIKUIeToAETq','5PYT5lI+5AAM','krStWOu6','ESo5vmofvCk4WQC','4P63WQ7OHRBMNRZOVQVOOA3PGOtLIQ3KUPtPL7/ORlxcIW','vmoTw2ZdI8kPaa','WQRdT8kxW7bo','W5hdSftcRcC','CMJdLmkmWQO','xmoGtf/dL8kPwmoh','BqKeeJFdQW','W7NLUOpPKzBPKQhMJ5VVVPVdKSksW5/cGCk4EKWbWR4inIbTbvOsWOC1lJpdLSoZW75WeCoOq1aGcSogBG','oGqgWPaR','D0ddHmk8WOO','5REH5yIv5Bsp57M35P2t776/5lIb5Q6d5PEB54cV5P+j5zgrAa','5P6A5AoX5z625z+v','WRBdKSkA','EWJcJwrv','W59PWQbMWPy','BL/cMCkoW7O','mHauWPiXAG','W6ZcGCokWRhcKSovxCoDW7hcO8kRn8omW4u','WPzGnt/cGh1d','W5ueyXNcSCk0vmk7','WRtdLmkEW49cW5jNW4C','WRFcPN7cHCkJaCoX','ed9rWPu5','gSoZhtHi','B8kwW7PoEq','dZXJWOqz','i8ommmkWWPe','5zwy5A+RWRf5zSk1x+I8O+ADKq','W7BdKSo1W5yk','dEA0QowjMoACSUs7T++9QUA0TEIdHG','jJKr','5REx5yQj5ywh5y+r77+L','odKNsmocoYtcS8kW','pCogiW','vComW7y','zSoWx8ogyq','WQRcPmoo','W6tcTSoA','tCkEW6ddN8kinCojWQu','4P+1WORMN6BOG73MRAhNOPlLPO/NKklcQq','W7hdMg3cL8k5W45Ngmkef8kN','W6ddUmoBW7RdGCoJDW','WP97W4S','WRRMTQhLIk7NS67LN7JVV44','8y6PRSkE','W4RdN8kVyW','pWWgWOacACoeWONcTSoMWQyK','W73cT8kcwWC','W55QWR4+W7q','WPf3bG','AuZdRmk5WPm','WPhdTmoKoSk9','57ML5y+aWP7WMkwt','W60eyq','56Ay5yQs5ysZ5O+u','W53cUmoOBgqfBq','iJKBW6W','W4v3WQOcW4JdTq','W4zBWQKHW54','zZGpbri','W7PeWPWdW5u','W53cSSo6Fg8wC8oF','W5xdHCkR','W4nhuf3cKCkuE8k1bu7cMJ/dJ2mlaSoN','obejWPeQEq','WRldPSoTpCkwWR8Dwq','FSkhW452w8kpgKKW','W7lcK8kUCt42W5pdIW','rmkqW7FdICkn','W67cSmorW4ZcV8kE','WP7cOhdcUSkN','WOfsrq','W6H5aZex','5P6H6icz6iYj5yYI55Ew5OQh6yMe5P+75l2+5Ok4','W67dTmoK','WR7dKSohWRBcPSo0DSo7','W6/cGConWPFcJmozqmomW7BcUmkh','5BIH6zgA5zcC56s17728WOO','W67dJMC','8kc7Hce','wSkzW6ZdMSkRmCokWRq','B3JcImk1W5VdGMO4W4CCWOlcKcGvhW','W5VcVmoKBq','W5FdL3dcTWldP8k+WOZcJW','fZRcJavWW6TEWQhcJfNcJf0pWOC','W4TqWQ5AWQC','5lYF5OoZ5yUi8kUNKo+5VW','E8oZqa','WOvebSkKpCojhq','xmoGs1BdMG','br0CW4hcSq','WRFdTCkqW7jn','W77dS8oRW5au','W6tdTCoz','DgpcNdP1','rKpcNGfJ','W5WWBwjt','WRrgnfRdHSoNuSk3cCkhDwi','WRtcGCkaWPCd','W7CEAa/cKmkI','f8oZW4RcJ8oP','W7BdLmoMW5JdOG','WPRdUConW6iFCSkMW7n2WQJcR8oS','WQ3dLmktW4bJW4q','ASoBW5mXea','W4uLWP1Pt8k3W5xcKCoXWRBcJsy','fmoHlCkYWQK','md5BW4RcMWbTWRVdLw06j8koWPZcO8oHWQ0os2vbvmkRW5dcO8oaDdpcHvtcTXywESopuhbOCxvoDqPpW68jja','gqPVWPC2g8k2qCkWyG3dJbLMW4a','zMtcKsfLpSoCWRZdLW','WP9uqve','W5JdTCoRW7a','WPxdUCoFW6iH','uu4HFvyupmkD','WPNdHSoNW5e9','nmoiW5xcGSoXWRW8gmo+W6ldIa','WONJGQ3LUPFPKilLK4lNPzVJGkzu','W5pcT8omqgy','rulcHWvs','W71LaqyE','WQKjW6NdSHxcVee','W4PDpIqy','W5f/WRafW48','W5X9WOu3W7m','ymkaW5S','hcLNWQSX','56sh5yIN5ysK5O61','ya8EhdxdQSoaW5rHAKO','hXyczSkd','msJcRq5t','n8oCctTZW4lcJCkTuq','56sO5yUd5y2r5ywn5O+wW63MT53LI6FOP5FLI73VVBeI','ltmcW4ZcUuL6WRBcGgHfBSoPW4e','ca5TWRaY','BCoiymo4Fq','dJGG','W7mFArVcSCk0vmk7','W7/cMCowtf40uCoVW48xWPG','hCo7c8oy','C8oZrmodwCk6WQZcGW','evBdO0TK','WQ8gAKtcMCkNvSkWl8oAwx5mWQCbW59rlGFcQYbxzrFdL8ouWPK+W5/dGSkxW57cLNa','5BM76zoB5zcV56Ec77+LW4m','xCogAhFdMG','s8kQW55tqG','W4Obqq','wwnOhmoFtmo/W5uPimkqWP4','6yge5yMU5lYJ5zgJ','WRCrW6C','W6ZcHCktW5v5W7j+W6u','4PYoo+IgJ+ACVEI/MEIHUEMcLEwlTEs7Q+MxJ+IVVMa','WOLcaCkzpCodhq','4PQNm+ISH+wGUowgMoAHJow+SUAUSUEJNoEzN+wnOUMgLW','W7RcJCk9Ecu2W7xdL8ofjmoEWQhdLW','W7HAWPSSW7JdGqX1AIdcUW','WPtcR8k0WP8i','WQ9oteBcMSkoimo+pLVcHJu','W6BdImoxW5/dHq','WQJdMannqSkKpCkzWOxcNCo6uCoV','WOZcV8kAWRyXDmoFdKtdNq','W67cJSkOBWi2WOS','AKXuW4n2kmksW4pdQ8ks','W6ldMmooW7qG','WPZdQ8oyW4ujtCktW7XGWOFcT8oKWRq+sG','W5xdG8ohW7Oh','WRVcQ0BcNSkTfG','AY7cOgreWRq','WPvQeJxcMwW','W7hcIfatpCoWymkx','WRynW6C','5P2x6igL6i+H5y6O55se5OQ26yQ45P685l+05Ogb7762','W77dVmoWW6JdOq','hWzxWRet','emo9jq1nW6BcQq','W6BcJ8o9r1u','WP1ZaclcJ1zmzaC','WOpdUSoRoSk1WRSEsa','jCocaY9H','FNNdKmkkWQZdGdFdSCkicZldPSoR','5RsZ5yQ15Bso57IZ5P+2','DZpcTNn/WQq','W7/cMmk+FJK7W4BdJmocp8ov','W6CjAvfQ','5BAN5Aoa5z6r5z6R','WRxcK8kQWPyHsCo4lG','W77cVmotW5ZcV8kEoNu','W5P8kHey','FSkwW4HsxmkqpuyQW5y','WO/dH8kfwvtcU8oJ','W5isBY3cKq','W6FdKM7cNq','WQJdImktW6fIW5C','u+obNUA1VEwkKUwELUwCTEobLa','8
// 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"])