2
.github/workflows/deploy_tencent_scf.yml
vendored
2
.github/workflows/deploy_tencent_scf.yml
vendored
@@ -45,6 +45,7 @@ jobs:
|
||||
if [ $JOY_FEED_COUNT ]; then sed -i "/variables/a\ JOY_FEED_COUNT: $JOY_FEED_COUNT" serverless.yml; fi;
|
||||
if [ $JOY_HELP_FEED ]; then sed -i "/variables/a\ JOY_HELP_FEED: $JOY_HELP_FEED" serverless.yml; fi;
|
||||
if [ $JOY_RUN_FLAG ]; then sed -i "/variables/a\ JOY_RUN_FLAG: $JOY_RUN_FLAG" serverless.yml; fi;
|
||||
if [ $JOY_TEAM_LEVEL ]; then sed -i "/variables/a\ JOY_TEAM_LEVEL: $JOY_TEAM_LEVEL" serverless.yml; fi;
|
||||
if [ $JD_JOY_REWARD_NAME ]; then sed -i "/variables/a\ JD_JOY_REWARD_NAME: $JD_JOY_REWARD_NAME" serverless.yml; fi;
|
||||
if [ $MARKET_COIN_TO_BEANS ]; then sed -i "/variables/a\ MARKET_COIN_TO_BEANS: $MARKET_COIN_TO_BEANS" serverless.yml; fi;
|
||||
if [ $MARKET_REWARD_NOTIFY ]; then sed -i "/variables/a\ MARKET_REWARD_NOTIFY: $MARKET_REWARD_NOTIFY" serverless.yml; fi;
|
||||
@@ -86,6 +87,7 @@ jobs:
|
||||
JOY_FEED_COUNT: ${{ secrets.JOY_FEED_COUNT}}
|
||||
JOY_HELP_FEED: ${{ secrets.JOY_HELP_FEED}}
|
||||
JOY_RUN_FLAG: ${{ secrets.JOY_RUN_FLAG}}
|
||||
JOY_TEAM_LEVEL: ${{ secrets.JOY_TEAM_LEVEL}}
|
||||
JD_JOY_REWARD_NAME: ${{ secrets.JD_JOY_REWARD_NAME}}
|
||||
MARKET_COIN_TO_BEANS: ${{ secrets.MARKET_COIN_TO_BEANS}}
|
||||
MARKET_REWARD_NOTIFY: ${{ secrets.MARKET_REWARD_NOTIFY}}
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,6 +1,6 @@
|
||||
/node_modules/
|
||||
/.idea
|
||||
/index.js
|
||||
/.history
|
||||
/box.dat
|
||||
/CookieSet.json
|
||||
/jdCookie.js
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
"id": "QQ_READ",
|
||||
"name": "企鹅阅读(QQ小程序)",
|
||||
"keys": [
|
||||
"qqreadurl",
|
||||
"qqreadhd",
|
||||
"qqreadtimeurl",
|
||||
"qqreadtimehd"
|
||||
|
||||
@@ -98,9 +98,9 @@ let qqreadtimeheaderVal = $.getdata(qqreadtimeheaderKey)
|
||||
let QQ_READ_COOKIES = [
|
||||
{
|
||||
qqreadurlVal,
|
||||
"qqreadheaderVal": "",
|
||||
"qqreadtimeurlVal": "",
|
||||
"qqreadtimeheaderVal": ""
|
||||
"qqreadheaderVal": ``,
|
||||
"qqreadtimeurlVal": ``,
|
||||
"qqreadtimeheaderVal": ``
|
||||
}
|
||||
]
|
||||
function getNodeCookie() {
|
||||
@@ -185,7 +185,7 @@ function GetCookie() {
|
||||
// if (qqreadbodyVal) $.setdata(qqreadbodyVal, qqreadbodyKey)
|
||||
// $.log(`[${jsname}] 获取阅读: 成功,qqreadbodyVal: ${qqreadbodyVal}`)
|
||||
|
||||
$.setdata(qqreadurlVal, qqreadurlKey);
|
||||
// $.setdata(qqreadurlVal, qqreadurlKey);
|
||||
const qqreadheaderVal = JSON.stringify($request.headers)
|
||||
if (qqreadheaderVal) $.setdata(qqreadheaderVal, qqreadheaderKey)
|
||||
$.log(`[${jsname}] 获取Cookie: 成功,qqreadheaderVal: ${qqreadheaderVal}`)
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
|
||||
|
||||
##############短期活动##############
|
||||
# 暂无
|
||||
|
||||
|
||||
# 京喜故事(2020.12.12活动过期)
|
||||
10 * * * * node /scripts/jd_jxstory.js >> /scripts/logs/jd_jxstory.log 2>&1
|
||||
# 金榜年终奖(2020.12.12活动过期)
|
||||
10 7 * * * node /scripts/jd_split.js >> /scripts/logs/jd_split.log 2>&1
|
||||
##############长期活动##############
|
||||
|
||||
# 签到
|
||||
@@ -63,3 +64,5 @@
|
||||
36 * * * * node /scripts/jd_jdfactory.js >> /scripts/logs/jd_jdfactory.log 2>&1
|
||||
#十元街
|
||||
36 8 * * * node /scripts/jd_syj.js >> /scripts/logs/jd_syj.log 2>&1
|
||||
#秒杀红包雨
|
||||
40 8 * * * node /scripts/jd_ms_redrain.js >> /scripts/logs/jd_ms_redrain.log 2>&1
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
|
||||
|
||||
##############短期活动##############
|
||||
# 暂无
|
||||
|
||||
|
||||
# 京喜故事(2020.12.12活动过期)
|
||||
10 * * * * node /scripts/jd_jxstory.js |ts >> /scripts/logs/jd_jxstory.log 2>&1
|
||||
# 金榜年终奖(2020.12.12活动过期)
|
||||
10 7 * * * node /scripts/jd_split.js |ts >> /scripts/logs/jd_split.log 2>&1
|
||||
##############长期活动##############
|
||||
|
||||
# 签到
|
||||
@@ -63,3 +64,5 @@
|
||||
36 * * * * node /scripts/jd_jdfactory.js |ts >> /scripts/logs/jd_jdfactory.log 2>&1
|
||||
#十元街
|
||||
36 8 * * * node /scripts/jd_syj.js |ts >> /scripts/logs/jd_syj.log 2>&1
|
||||
#秒杀红包雨
|
||||
40 8 * * * node /scripts/jd_ms_redrain.js |ts >> /scripts/logs/jd_ms_redrain.log 2>&1
|
||||
|
||||
@@ -96,7 +96,8 @@
|
||||
| `JD_818_SHAREID_NOTIFY` | 京东818互助码通知开关 | 非必须 | 控制jd_818.js脚本是否在获取互助码后通知,`true`为是(发送推送通知消息),`false`为否(即:不发送推送通知消息) |
|
||||
| `JOY_FEED_COUNT` | 宠汪汪喂食数量 | 非必须 | 控制jd_joy_feedPets.js脚本喂食数量 ,可以填的数字10,20,40,80 , 其他数字不可. |
|
||||
| `JOY_HELP_FEED` | 宠汪汪帮好友喂食 | 非必须 | 控制jd_joy_steal.js脚本是否给好友喂食,`false`为否,`true`为是(给好友喂食) |
|
||||
| `JOY_RUN_FLAG` | 宠汪汪参加双人赛跑 | 非必须 | 控制jd_joy.js脚本是否参加双人赛跑,`false`为否,`true`为是,脚本默认是`true` |
|
||||
| `JOY_RUN_FLAG` | 宠汪汪是否赛跑 | 非必须 | 控制jd_joy.js脚本是否参加赛跑(默认参加双人赛跑),`false`为否,`true`为是,脚本默认是`true` |
|
||||
| `JOY_TEAM_LEVEL` | 宠汪汪参加什么级别的赛跑 | 非必须 | 控制jd_joy.js脚本参加几人的赛跑,可选数字为`2`,`10`,`50`,其中2代表参加双人PK赛,10代表参加10人突围赛,50代表参加50人挑战赛(注:此项功能在`JOY_RUN_FLAG`为true的时候才生效) |
|
||||
| `JD_JOY_REWARD_NAME` | 宠汪汪积分兑换多少京豆 | 非必须 | 目前可填值为`20`或者`500`,脚本默认`20`,`0`表示不兑换京豆 |
|
||||
| `MARKET_COIN_TO_BEANS` | 京小超兑换京豆数量 | 非必须 | 控制jd_blueCoin.js兑换京豆数量,可输入值为`20`或者`1000`的数字或者其他商品的名称,例如`碧浪洗衣凝珠` |
|
||||
| `MARKET_REWARD_NOTIFY` | 京小超兑换奖品推送开关 | 非必须 | 控制jd_blueCoin.js兑换奖品成功后是否静默运行, `false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) |
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
金榜年终奖互助码
|
||||
此文件为Node.js专用。其他用户请忽略
|
||||
支持京东N个账号
|
||||
*/
|
||||
//云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。
|
||||
// github action用户的好友互助码填写到Action->Settings->Secrets->new Secret里面(Name填写 PLANT_BEAN_SHARECODES(此处的Name必须按此来写,不能随意更改),内容处填写互助码,填写规则如下)
|
||||
// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例
|
||||
// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2
|
||||
let shareCodes = [
|
||||
'',//账号一的好友shareCode,不同好友中间用@符号隔开
|
||||
'',//账号二的好友shareCode,不同好友中间用@符号隔开
|
||||
]
|
||||
// 判断github action里面是否有东东工厂互助码
|
||||
if (process.env.JDSPLIT_SHARECODES) {
|
||||
if (process.env.JDSPLIT_SHARECODES.indexOf('&') > -1) {
|
||||
console.log(`您的互助码选择的是用&隔开\n`)
|
||||
shareCodes = process.env.JDSPLIT_SHARECODES.split('&');
|
||||
} else if (process.env.JDSPLIT_SHARECODES.indexOf('\n') > -1) {
|
||||
console.log(`您的互助码选择的是用换行隔开\n`)
|
||||
shareCodes = process.env.JDSPLIT_SHARECODES.split('\n');
|
||||
} else {
|
||||
shareCodes = process.env.JDSPLIT_SHARECODES.split();
|
||||
}
|
||||
} else if (process.env.JDSPLIT_SHARECODES) {
|
||||
console.log(`由于您secret里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`)
|
||||
}
|
||||
for (let i = 0; i < shareCodes.length; i++) {
|
||||
const index = (i + 1 === 1) ? '' : (i + 1);
|
||||
exports['shareCodes' + index] = shareCodes[i];
|
||||
}
|
||||
@@ -847,7 +847,7 @@ function updateShareCodes(url = 'https://raw.githubusercontent.com/lxk0301/updat
|
||||
})
|
||||
})
|
||||
}
|
||||
function updateShareCodesCDN(url = 'https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_shareCodes.json') {
|
||||
function updateShareCodesCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/master/jd_shareCodes.json') {
|
||||
return new Promise(resolve => {
|
||||
//https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_shareCodes.json
|
||||
//https://raw.githubusercontent.com/lxk0301/updateTeam/master/jd_shareCodes.json
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
京东京喜工厂
|
||||
更新时间:2020-12-02
|
||||
更新时间:2020-12-07
|
||||
活动入口 :京东APP->游戏与互动->查看更多->京喜工厂
|
||||
或者: 京东APP首页搜索 "玩一玩" ,造物工厂即可
|
||||
|
||||
@@ -31,6 +31,8 @@ const JD_API_HOST = 'https://m.jingxi.com';
|
||||
const notify = $.isNode() ? require('./sendNotify') : '';
|
||||
let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送
|
||||
const randomCount = $.isNode() ? 20 : 5;
|
||||
const tuanActiveId = `jfkcidGQavswLOBcAWljrw==`;
|
||||
const jxOpenUrl = `openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://wqsd.jd.com/pingou/dream_factory/index.html%22%20%7D`;
|
||||
let cookiesArr = [], cookie = '', message = '';
|
||||
const inviteCodes = ['V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k=', 'PDPM257r_KuQhil2Y7koNw==', "gB99tYLjvPcEFloDgamoBw=="];
|
||||
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
||||
@@ -59,7 +61,9 @@ if ($.isNode()) {
|
||||
message = '';
|
||||
$.ele = 0;
|
||||
$.pickEle = 0;
|
||||
$.pickFriendEle = 0
|
||||
$.pickFriendEle = 0;
|
||||
$.friendList = [];
|
||||
$.canHelpFlag = true;//能否助力朋友
|
||||
await TotalBean();
|
||||
console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`);
|
||||
if (!$.isLogin) {
|
||||
@@ -72,7 +76,6 @@ if ($.isNode()) {
|
||||
}
|
||||
continue
|
||||
}
|
||||
await shareCodesFormat();
|
||||
await jdDreamFactory()
|
||||
}
|
||||
}
|
||||
@@ -86,15 +89,19 @@ if ($.isNode()) {
|
||||
|
||||
async function jdDreamFactory() {
|
||||
await userInfo();
|
||||
// await JoinTuan();参团功能暂时无效,
|
||||
await QueryFriendList();//查询今日招工情况以及剩余助力次数
|
||||
await joinLeaderTuan();//参团
|
||||
await helpFriends();
|
||||
if (!$.unActive) return
|
||||
await getUserElectricity();
|
||||
await taskList();
|
||||
await investElectric();
|
||||
await QueryHireReward();//收取招工电力
|
||||
await PickUp();
|
||||
await PickUp();//收取自家的地下零件
|
||||
await stealFriend();
|
||||
await tuanActivity();
|
||||
await QueryAllTuan();
|
||||
await exchangeProNotify();
|
||||
await showMsg();
|
||||
}
|
||||
|
||||
@@ -125,7 +132,7 @@ function collectElectricity(facId = $.factoryId, help = false, master) {
|
||||
message += `【帮助好友】帮助成功,获得 ${data.data['loginPinCollectElectricity']} 电力\n`
|
||||
} else {
|
||||
$.ele += Number(data.data['CollectElectricity'])
|
||||
console.log(`收取 ${data.data['loginPinCollectElectricity']} 电力`);
|
||||
console.log(`收取 ${data.data['CollectElectricity']} 电力`);
|
||||
message += `【收取发电站】收取成功,获得 ${data.data['CollectElectricity']} 电力\n`
|
||||
}
|
||||
} else {
|
||||
@@ -246,7 +253,11 @@ function getUserElectricity() {
|
||||
if (safeGet(data)) {
|
||||
data = JSON.parse(data);
|
||||
if (data['ret'] === 0) {
|
||||
console.log(`发电机:当前 ${data.data.currentElectricityQuantity} 电力,最大值 ${data.data.maxElectricityQuantity} 电力,达到最大电量才会进行收取`)
|
||||
console.log(`\nnextCollectDoubleFlag::${data.data.nextCollectDoubleFlag}`);
|
||||
console.log(`nextCollectDoubleType::${data.data.nextCollectDoubleType}\n`);
|
||||
$.log(`下次集满收取${data.data.nextCollectDoubleFlag === 1 ? '可' : '不可'}双倍电力`)
|
||||
console.log(`发电机:当前 ${data.data.currentElectricityQuantity} 电力,最大值 ${data.data.maxElectricityQuantity} 电力`)
|
||||
if (data.data.nextCollectDoubleFlag === 1) {
|
||||
if (data.data.currentElectricityQuantity === data.data.maxElectricityQuantity && data.data.doubleElectricityFlag) {
|
||||
console.log(`发电机:电力可翻倍并收获`)
|
||||
// await shareReport();
|
||||
@@ -254,40 +265,12 @@ function getUserElectricity() {
|
||||
} else {
|
||||
message += `【发电机电力】当前 ${data.data.currentElectricityQuantity} 电力,未达到收获标准\n`
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
//满电力的时候分享,电力翻倍
|
||||
function shareReport() {
|
||||
return new Promise(async resolve => {
|
||||
const options = {
|
||||
'url': `https://wq.jd.com/activetmp/helpdraw/sharereport?call=reportshare&active=dreamfactory_platform_test&hj=app&sharetype=2&idctime=${Date.now()}&reportrefer=http%3A%2F%2Fwq.jd.com%2Fcube%2Ffront%2FactivePublish%2Fdream_factory_report%2F380556.html&_=${Date.now()}&sceneval=2&g_login_type=1`,
|
||||
'headers': {
|
||||
"Accept": "*/*",
|
||||
"Accept-Encoding": "gzip, deflate, br",
|
||||
"Accept-Language": "zh-cn",
|
||||
"Connection": "keep-alive",
|
||||
"Cookie": cookie,
|
||||
"Host": "wq.jd.com",
|
||||
"Referer": "https://wqsd.jd.com/pingou/dream_factory/index.html",
|
||||
"User-Agent": "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0",
|
||||
}
|
||||
}
|
||||
$.get(options, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} API请求失败,请检查网路重试`)
|
||||
} else {
|
||||
console.log(`\n分享获取翻倍电力功能(测试中):${data}\n`);
|
||||
//再收取双倍电力达到上限时,直接收取,不再等到满级
|
||||
await collectElectricity()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
@@ -297,6 +280,7 @@ function shareReport() {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
//查询有多少的招工电力可收取
|
||||
function QueryHireReward() {
|
||||
return new Promise(async resolve => {
|
||||
@@ -312,7 +296,7 @@ function QueryHireReward() {
|
||||
if (data['ret'] === 0) {
|
||||
for (let item of data['data']['hireReward']) {
|
||||
if (item.date !== new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).Format("yyyyMMdd")) {
|
||||
await hireAward(item.date);
|
||||
await hireAward(item.date, item.type);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -329,10 +313,10 @@ function QueryHireReward() {
|
||||
})
|
||||
}
|
||||
// 收取招工电力
|
||||
function hireAward(date) {
|
||||
function hireAward(date, type = 0) {
|
||||
return new Promise(async resolve => {
|
||||
// const url = `/dreamfactory/friend/HireAward?zone=dream_factory&date=${new Date().Format("yyyyMMdd")}&type=0&sceneval=2&g_login_type=1`
|
||||
$.get(taskurl('friend/HireAward', `date=${date}&type=0`), async (err, resp, data) => {
|
||||
$.get(taskurl('friend/HireAward', `date=${date}&type=${type}`), async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
@@ -358,6 +342,8 @@ function hireAward(date) {
|
||||
})
|
||||
}
|
||||
async function helpFriends() {
|
||||
if ($.canHelpFlag) {
|
||||
await shareCodesFormat();
|
||||
for (let code of $.newShareCodes) {
|
||||
if (code) {
|
||||
if ($.encryptPin === code) {
|
||||
@@ -376,6 +362,9 @@ async function helpFriends() {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$.log(`今日助力好友机会已耗尽\n`);
|
||||
}
|
||||
}
|
||||
// 帮助用户
|
||||
function assistFriend(sharepin) {
|
||||
@@ -391,7 +380,7 @@ function assistFriend(sharepin) {
|
||||
"Cookie": cookie,
|
||||
"Host": "m.jingxi.com",
|
||||
"Referer": "https://st.jingxi.com/pingou/dream_factory/index.html",
|
||||
"User-Agent": "jdpingou;iPhone;3.15.2;14.2;f803928b71d2fcd51c7eae549f7bc3062d17f63f;network/4g;model/iPhone11,8;appBuild/100365;ADID/0E38E9F1-4B4C-40A4-A479-DD15E58A5623;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/2;pap/JA2015_311210;brand/apple;supportJDSHWK/1;"
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36"
|
||||
}
|
||||
}
|
||||
$.get(options, (err, resp, data) => {
|
||||
@@ -417,7 +406,38 @@ function assistFriend(sharepin) {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
//查询助力招工情况
|
||||
function QueryFriendList() {
|
||||
return new Promise(async resolve => {
|
||||
$.get(taskurl('friend/QueryFriendList'), (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} API请求失败,请检查网路重试`)
|
||||
} else {
|
||||
if (safeGet(data)) {
|
||||
data = JSON.parse(data);
|
||||
if (data['ret'] === 0) {
|
||||
data = data['data'];
|
||||
const { assistListToday = [], assistNumMax, hireListToday = [], hireNumMax } = data;
|
||||
if (assistListToday.length === assistNumMax) {
|
||||
$.canHelpFlag = false;
|
||||
}
|
||||
$.log(`【今日招工进度】${hireListToday.length}/${hireNumMax}`);
|
||||
message += `【招工进度】${hireListToday.length}/${hireNumMax}\n`;
|
||||
} else {
|
||||
console.log(`QueryFriendList异常:${JSON.stringify(data)}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
// 任务领奖
|
||||
function completeTask(taskId, taskName) {
|
||||
return new Promise(async resolve => {
|
||||
@@ -474,7 +494,7 @@ function doTask(taskId) {
|
||||
if (data['ret'] === 0) {
|
||||
console.log("做任务完成!")
|
||||
} else {
|
||||
console.log(`异常:${JSON.stringify(data)}`)
|
||||
console.log(`DoTask异常:${JSON.stringify(data)}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -502,16 +522,23 @@ function userInfo() {
|
||||
data = data['data'];
|
||||
$.unActive = true;//标记是否开启了京喜活动或者选购了商品进行生产
|
||||
$.encryptPin = '';
|
||||
$.shelvesList = [];
|
||||
if (data.factoryList && data.productionList) {
|
||||
const production = data.productionList[0];
|
||||
const factory = data.factoryList[0];
|
||||
const productionStage = data.productionStage;
|
||||
$.factoryId = factory.factoryId;//工厂ID
|
||||
$.productionId = production.productionId;//商品ID
|
||||
$.commodityDimId = production.commodityDimId;
|
||||
$.encryptPin = data.user.encryptPin;
|
||||
// subTitle = data.user.pin;
|
||||
await GetCommodityDetails();//获取已选购的商品信息
|
||||
if (productionStage['productionStageAwardStatus'] === 1) {
|
||||
$.log(`可以开红包了\n`);
|
||||
await DrawProductionStagePrize();//领取红包
|
||||
} else {
|
||||
$.log(`再加${productionStage['productionStageProgress']}电力可开红包\n`)
|
||||
}
|
||||
console.log(`当前电力:${data.user.electric}`)
|
||||
console.log(`当前等级:${data.user.currentLevel}`)
|
||||
console.log(`分享码: ${data.user.encryptPin}`);
|
||||
@@ -521,21 +548,21 @@ function userInfo() {
|
||||
message += `【当前等级】${data.user.userIdentity} ${data.user.currentLevel}\n`;
|
||||
message += `【生产进度】${((production.investedElectric / production.needElectric) * 100).toFixed(2)}%\n`;
|
||||
if (production.investedElectric >= production.needElectric) {
|
||||
$.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}\n已生产完,请速去兑换`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://wqsd.jd.com/pingou/dream_factory/index.html%22%20%7D'})
|
||||
await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}\n已生产完,请速去兑换`)
|
||||
$.log(`可以对方商品了`)
|
||||
// await exchangeProNotify()
|
||||
}
|
||||
} else {
|
||||
$.unActive = false;//标记是否开启了京喜活动或者选购了商品进行生产
|
||||
if (!data.factoryList) {
|
||||
console.log('【提示】此账号京喜工厂活动未开始\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 开启活动\n');
|
||||
$.msg($.name, '【提示】', `京东账号${$.index}[${$.nickName}]京喜工厂活动未开始\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 开启活动`);
|
||||
console.log(`【提示】京东账号${$.index}[${$.nickName}]京喜工厂活动未开始\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 开启活动\n`);
|
||||
// $.msg($.name, '【提示】', `京东账号${$.index}[${$.nickName}]京喜工厂活动未开始\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 开启活动`);
|
||||
} else if (data.factoryList && !data.productionList) {
|
||||
console.log(`【提示】此账号京喜工厂未选购商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选购\n`)
|
||||
$.msg($.name, '【提示】', `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品`);
|
||||
console.log(`【提示】京东账号${$.index}[${$.nickName}]京喜工厂未选购商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选购\n`)
|
||||
// $.msg($.name, '【提示】', `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品`);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log(`异常:${JSON.stringify(data)}`)
|
||||
console.log(`GetUserInfo异常:${JSON.stringify(data)}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -563,7 +590,39 @@ function GetCommodityDetails() {
|
||||
data = data['data'];
|
||||
$.productName = data['commodityList'][0].name;
|
||||
} else {
|
||||
console.log(`异常:${JSON.stringify(data)}`)
|
||||
console.log(`GetCommodityDetails异常:${JSON.stringify(data)}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
// 查询已完成商品
|
||||
function GetShelvesList(pageNo = 1) {
|
||||
return new Promise(async resolve => {
|
||||
$.get(taskurl('userinfo/GetShelvesList', `pageNo=${pageNo}&pageSize=12`), (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} API请求失败,请检查网路重试`)
|
||||
} else {
|
||||
if (safeGet(data)) {
|
||||
data = JSON.parse(data);
|
||||
if (data['ret'] === 0) {
|
||||
data = data['data'];
|
||||
const { shelvesList } = data;
|
||||
if (shelvesList) {
|
||||
$.shelvesList = [...$.shelvesList, ...shelvesList];
|
||||
pageNo ++
|
||||
GetShelvesList(pageNo);
|
||||
}
|
||||
} else {
|
||||
console.log(`GetShelvesList异常:${JSON.stringify(data)}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -604,25 +663,24 @@ function DrawProductionStagePrize() {
|
||||
})
|
||||
}
|
||||
async function PickUp(encryptPin = $.encryptPin, help = false) {
|
||||
for (let i = 0; i < new Array(5).fill('').length; i++) {
|
||||
await $.wait(1000);
|
||||
await PickUpComponent(i + 1, encryptPin, help);
|
||||
}
|
||||
}
|
||||
//收取地下随机零件电力API
|
||||
//usermaterial/GetUserComponent
|
||||
function PickUpComponent(index, encryptPin, help) {
|
||||
return new Promise(resolve => {
|
||||
$.get(taskurl('usermaterial/PickUpComponent', `placeId=${index}&pin=${encryptPin}`), (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} API请求失败,请检查网路重试`)
|
||||
$.pickUpMyselfComponent = true;
|
||||
const GetUserComponentRes = await GetUserComponent(encryptPin);
|
||||
if (GetUserComponentRes && GetUserComponentRes['ret'] === 0) {
|
||||
const { componentList } = GetUserComponentRes['data'];
|
||||
if (componentList && componentList.length <= 0) {
|
||||
if (help) {
|
||||
$.log(`好友【${encryptPin}】地下暂无零件可收`)
|
||||
} else {
|
||||
if (safeGet(data)) {
|
||||
data = JSON.parse(data);
|
||||
if (data['ret'] === 0) {
|
||||
data = data['data'];
|
||||
$.log(`自家地下暂无零件可收`)
|
||||
}
|
||||
$.pickUpMyselfComponent = false;
|
||||
}
|
||||
for (let item of componentList) {
|
||||
await $.wait(1000);
|
||||
const PickUpComponentRes = await PickUpComponent(item['placeId'], encryptPin);
|
||||
if (PickUpComponentRes) {
|
||||
if (PickUpComponentRes['ret'] === 0) {
|
||||
const data = PickUpComponentRes['data'];
|
||||
if (help) {
|
||||
console.log(`收取好友[${encryptPin}]零件成功:获得${data['increaseElectric']}电力\n`);
|
||||
$.pickFriendEle += data['increaseElectric'];
|
||||
@@ -632,25 +690,101 @@ function PickUpComponent(index, encryptPin, help) {
|
||||
}
|
||||
} else {
|
||||
if (help) {
|
||||
console.log(`收好友[${encryptPin}]零件失败:${JSON.stringify(data)}`)
|
||||
console.log(`收好友[${encryptPin}]零件失败:${PickUpComponentRes.msg},直接跳出`)
|
||||
} else {
|
||||
console.log(`收零件失败:${JSON.stringify(data)}`)
|
||||
console.log(`收自己地下零件失败:${PickUpComponentRes.msg},直接跳出`);
|
||||
$.pickUpMyselfComponent = false;
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function GetUserComponent(pin = $.encryptPin) {
|
||||
return new Promise(resolve => {
|
||||
$.get(taskurl('usermaterial/GetUserComponent', `pin=${pin}`), (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} API请求失败,请检查网路重试`)
|
||||
} else {
|
||||
if (safeGet(data)) {
|
||||
data = JSON.parse(data);
|
||||
if (data['ret'] === 0) {
|
||||
|
||||
} else {
|
||||
console.log(`GetUserComponent失败:${JSON.stringify(data)}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve();
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
//收取地下随机零件电力API
|
||||
|
||||
function PickUpComponent(index, encryptPin) {
|
||||
return new Promise(resolve => {
|
||||
$.get(taskurl('usermaterial/PickUpComponent', `placeId=${index}&pin=${encryptPin}`), (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} API请求失败,请检查网路重试`)
|
||||
} else {
|
||||
if (safeGet(data)) {
|
||||
data = JSON.parse(data);
|
||||
// if (data['ret'] === 0) {
|
||||
// data = data['data'];
|
||||
// if (help) {
|
||||
// console.log(`收取好友[${encryptPin}]零件成功:获得${data['increaseElectric']}电力\n`);
|
||||
// $.pickFriendEle += data['increaseElectric'];
|
||||
// } else {
|
||||
// console.log(`收取自家零件成功:获得${data['increaseElectric']}电力\n`);
|
||||
// $.pickEle += data['increaseElectric'];
|
||||
// }
|
||||
// } else {
|
||||
// if (help) {
|
||||
// console.log(`收好友[${encryptPin}]零件失败:${JSON.stringify(data)}`)
|
||||
// } else {
|
||||
// console.log(`收零件失败:${JSON.stringify(data)}`)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
//偷好友的电力
|
||||
function stealFriend() {
|
||||
async function stealFriend() {
|
||||
if (!$.pickUpMyselfComponent) {
|
||||
$.log(`今日收取零件已达上限,偷好友零件也达到上限,故跳出`)
|
||||
return
|
||||
}
|
||||
await getFriendList();
|
||||
$.friendList = [...new Set($.friendList)];
|
||||
for (let i = 0; i < $.friendList.length; i++) {
|
||||
let pin = $.friendList[i];//好友的encryptPin
|
||||
if (pin === 'V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k=' || pin === 'Bo-jnVs_m9uBvbRzraXcSA==') {
|
||||
continue
|
||||
}
|
||||
await PickUp(pin, true);
|
||||
// await getFactoryIdByPin(pin);//获取好友工厂ID
|
||||
// if ($.stealFactoryId) await collectElectricity($.stealFactoryId,true, pin);
|
||||
}
|
||||
}
|
||||
function getFriendList(sort = 0) {
|
||||
return new Promise(async resolve => {
|
||||
$.get(taskurl('friend/QueryFactoryManagerList', 'sort=0'), async (err, resp, data) => {
|
||||
$.get(taskurl('friend/QueryFactoryManagerList', `sort=${sort}`), async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
@@ -660,17 +794,19 @@ function stealFriend() {
|
||||
data = JSON.parse(data);
|
||||
if (data['ret'] === 0) {
|
||||
data = data['data'];
|
||||
for (let i = 0; i < data.list.length; i++) {
|
||||
let pin = data.list[i]['encryptPin'];//好友的encryptPin
|
||||
if (pin === 'V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k=' || pin === 'Bo-jnVs_m9uBvbRzraXcSA==') {
|
||||
continue
|
||||
if (data.list && data.list.length <= 0) {
|
||||
console.log(`查询好友列表完成,共${$.friendList.length}好友,下面开始拾取好友地下的零件\n`);
|
||||
return
|
||||
}
|
||||
await PickUp(pin, true);
|
||||
// await getFactoryIdByPin(pin);//获取好友工厂ID
|
||||
// if ($.stealFactoryId) await collectElectricity($.stealFactoryId,true, pin);
|
||||
let friendsEncryptPins = [];
|
||||
for (let item of data.list) {
|
||||
friendsEncryptPins.push(item.encryptPin);
|
||||
}
|
||||
$.friendList = [...$.friendList, ...friendsEncryptPins];
|
||||
if (!$.isNode()) return
|
||||
await getFriendList(data.sort);
|
||||
} else {
|
||||
console.log(`异常:${JSON.stringify(data)}`)
|
||||
console.log(`QueryFactoryManagerList异常:${JSON.stringify(data)}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -682,7 +818,6 @@ function stealFriend() {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function getFactoryIdByPin(pin) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// const url = `/dreamfactory/userinfo/GetUserInfoByPin?zone=dream_factory&pin=${pin}&sceneval=2`;
|
||||
@@ -713,11 +848,129 @@ function getFactoryIdByPin(pin) {
|
||||
})
|
||||
})
|
||||
}
|
||||
async function tuanActivity() {
|
||||
const tuanConfig = await QueryActiveConfig();
|
||||
if (tuanConfig && tuanConfig.ret === 0) {
|
||||
const { activeId, surplusOpenTuanNum, tuanId } = tuanConfig['data']['userTuanInfo'];
|
||||
console.log(`今日剩余开团次数:${surplusOpenTuanNum}次`);
|
||||
$.surplusOpenTuanNum = surplusOpenTuanNum;
|
||||
if (!tuanId && surplusOpenTuanNum > 0) {
|
||||
//开团
|
||||
$.log(`准备开团`)
|
||||
await CreateTuan();
|
||||
} else if (tuanId) {
|
||||
//查询词团信息
|
||||
const QueryTuanRes = await QueryTuan(activeId, tuanId);
|
||||
if (QueryTuanRes && QueryTuanRes.ret === 0) {
|
||||
const { tuanInfo } = QueryTuanRes.data;
|
||||
for (let item of tuanInfo) {
|
||||
const { realTuanNum, tuanNum, userInfo } = item;
|
||||
$.log(`\n开团情况:${realTuanNum}/${tuanNum}\n`);
|
||||
if (realTuanNum === tuanNum) {
|
||||
for (let user of userInfo) {
|
||||
if (user.encryptPin === $.encryptPin) {
|
||||
if (user.receiveElectric && user.receiveElectric > 0) {
|
||||
console.log(`您在${new Date(user.joinTime * 1000).toLocaleString()}开团奖励已经领取成功\n`)
|
||||
if ($.surplusOpenTuanNum > 0) await CreateTuan();
|
||||
} else {
|
||||
$.log(`开始领取开团奖励`);
|
||||
await tuanAward(item.tuanActiveId, item.tuanId);//isTuanLeader
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$.log(`\n此团未达领取团奖励人数:${tuanNum}人\n`)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//可获取开团后的团ID,如果团ID为空并且surplusOpenTuanNum>0,则可继续开团
|
||||
//如果团ID不为空,则查询QueryTuan()
|
||||
function QueryActiveConfig() {
|
||||
return new Promise((resolve) => {
|
||||
const options = {
|
||||
'url': `https://m.jingxi.com/dreamfactory/tuan/QueryActiveConfig?activeId=${escape(tuanActiveId)}&_time=${Date.now()}&_=${Date.now()}&sceneval=2&g_login_type=1`,
|
||||
"headers": {
|
||||
"Accept": "*/*",
|
||||
"Accept-Encoding": "gzip, deflate, br",
|
||||
"Accept-Language": "zh-cn",
|
||||
"Connection": "keep-alive",
|
||||
"Cookie": cookie,
|
||||
"Host": "m.jingxi.com",
|
||||
"Referer": "https://st.jingxi.com/pingou/dream_factory/divide.html",
|
||||
"User-Agent": "jdpingou;iPhone;3.15.2;13.5.1;90bab9217f465a83a99c0b554a946b0b0d5c2f7a;network/wifi;model/iPhone12,1;appBuild/100365;ADID/696F8BD2-0820-405C-AFC0-3C6D028040E5;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/14;pap/JA2015_311210;brand/apple;supportJDSHWK/1;"
|
||||
}
|
||||
}
|
||||
$.get(options, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} API请求失败,请检查网路重试`);
|
||||
} else {
|
||||
if (safeGet(data)) {
|
||||
data = JSON.parse(data);
|
||||
if (data['ret'] === 0) {
|
||||
const { userTuanInfo } = data['data'];
|
||||
console.log(`\n团活动ID ${userTuanInfo.activeId}`);
|
||||
console.log(`团ID ${userTuanInfo.tuanId}\n`);
|
||||
} else {
|
||||
console.log(`QueryActiveConfig异常:${JSON.stringify(data)}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
function QueryTuan(activeId, tuanId) {
|
||||
return new Promise((resolve) => {
|
||||
const options = {
|
||||
'url': `https://m.jingxi.com/dreamfactory/tuan/QueryTuan?activeId=${escape(activeId)}&tuanId=${escape(tuanId)}&_time=${Date.now()}&_=${Date.now()}&sceneval=2&g_login_type=1`,
|
||||
"headers": {
|
||||
"Accept": "*/*",
|
||||
"Accept-Encoding": "gzip, deflate, br",
|
||||
"Accept-Language": "zh-cn",
|
||||
"Connection": "keep-alive",
|
||||
"Cookie": cookie,
|
||||
"Host": "m.jingxi.com",
|
||||
"Referer": "https://st.jingxi.com/pingou/dream_factory/divide.html",
|
||||
"User-Agent": "jdpingou;iPhone;3.15.2;13.5.1;90bab9217f465a83a99c0b554a946b0b0d5c2f7a;network/wifi;model/iPhone12,1;appBuild/100365;ADID/696F8BD2-0820-405C-AFC0-3C6D028040E5;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/14;pap/JA2015_311210;brand/apple;supportJDSHWK/1;"
|
||||
}
|
||||
}
|
||||
$.get(options, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} API请求失败,请检查网路重试`);
|
||||
} else {
|
||||
if (safeGet(data)) {
|
||||
data = JSON.parse(data);
|
||||
if (data['ret'] === 0) {
|
||||
// $.log(`\n开团情况:${data.data.tuanInfo.realTuanNum}/${data.data.tuanInfo.tuanNum}\n`)
|
||||
} else {
|
||||
console.log(`异常:${JSON.stringify(data)}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
//开团API
|
||||
function CreateTuan() {
|
||||
return new Promise((resolve) => {
|
||||
const options = {
|
||||
'url': `https://m.jingxi.com/dreamfactory/tuan/CreateTuan?activeId=${escape('ilOin38J30PcT9xnWbx9lw==')}&isOpenApp=1&_time=${Date.now()}&_=${Date.now()}&sceneval=2&g_login_type=1`,
|
||||
'url': `https://m.jingxi.com/dreamfactory/tuan/CreateTuan?activeId=${escape(tuanActiveId)}&isOpenApp=1&_time=${Date.now()}&_=${Date.now()}&sceneval=2&g_login_type=1`,
|
||||
"headers": {
|
||||
"Accept": "*/*",
|
||||
"Accept-Encoding": "gzip, deflate, br",
|
||||
@@ -752,10 +1005,18 @@ function CreateTuan() {
|
||||
})
|
||||
})
|
||||
}
|
||||
function JoinTuan() {
|
||||
async function joinLeaderTuan() {
|
||||
await updateTuanIds();
|
||||
if (!$.tuanIdS) await updateTuanIdsCDN();
|
||||
for (let tuanId of $.tuanIdS.tuanIds) {
|
||||
if (!tuanId) continue
|
||||
await JoinTuan(tuanId);
|
||||
}
|
||||
}
|
||||
function JoinTuan(tuanId) {
|
||||
return new Promise((resolve) => {
|
||||
const options = {
|
||||
'url': `https://m.jingxi.com/dreamfactory/tuan/JoinTuan?activeId=${escape('ilOin38J30PcT9xnWbx9lw==')}&tuanId=${escape('8W4VdqMEQfzmZnSGRgMRCw==')}&_time=${Date.now()}&_=${Date.now()}&sceneval=2&g_login_type=1`,
|
||||
'url': `https://m.jingxi.com/dreamfactory/tuan/JoinTuan?activeId=${escape(tuanActiveId)}&tuanId=${escape(tuanId)}&_time=${Date.now()}&_=${Date.now()}&sceneval=2&g_login_type=1`,
|
||||
"headers": {
|
||||
"Accept": "*/*",
|
||||
"Accept-Encoding": "gzip, deflate, br",
|
||||
@@ -764,7 +1025,7 @@ function JoinTuan() {
|
||||
"Cookie": cookie,
|
||||
"Host": "m.jingxi.com",
|
||||
"Referer": "https://st.jingxi.com/pingou/dream_factory/divide.html?exchange=%7B%22activeId%22:%22ilOin38J30PcT9xnWbx9lw%3D%3D%22,%22sTuanId%22:%22QvqM7GtgQQJUO8jaz1CYBA%3D%3D%22,%22sPin%22:%22V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k%3D%22,%22sType%22:%22101%22%7D&ptag=139022.1.2?srv=jinshusongjin_https://wq.jd.com/cube/front/activePublish/dream_factory_report/380556.html_jing",
|
||||
"User-Agent": "jdpingou;iPhone;3.15.2;13.5.1;90bab9217f465a83a99c0b554a946b0b0d5c2f7a;network/wifi;model/iPhone12,1;appBuild/100365;ADID/696F8BD2-0820-405C-AFC0-3C6D028040E5;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/14;pap/JA2015_311210;brand/apple;supportJDSHWK/1;"
|
||||
"User-Agent": "jdpingou"
|
||||
}
|
||||
}
|
||||
$.get(options, (err, resp, data) => {
|
||||
@@ -790,8 +1051,201 @@ function JoinTuan() {
|
||||
})
|
||||
})
|
||||
}
|
||||
//查询所有的团情况(自己开团以及参加别人的团)
|
||||
function QueryAllTuan() {
|
||||
return new Promise((resolve) => {
|
||||
const options = {
|
||||
'url': `https://m.jingxi.com/dreamfactory/tuan/QueryAllTuan?activeId=${escape(tuanActiveId)}&pageNo=1&pageSize=10&_time=${Date.now()}&_=${Date.now()}&sceneval=2&g_login_type=1`,
|
||||
"headers": {
|
||||
"Accept": "*/*",
|
||||
"Accept-Encoding": "gzip, deflate, br",
|
||||
"Accept-Language": "zh-cn",
|
||||
"Connection": "keep-alive",
|
||||
"Cookie": cookie,
|
||||
"Host": "m.jingxi.com",
|
||||
"Referer": "https://st.jingxi.com/pingou/dream_factory/divide.html",
|
||||
"User-Agent": "jdpingou;iPhone;3.15.2;13.5.1;90bab9217f465a83a99c0b554a946b0b0d5c2f7a;network/wifi;model/iPhone12,1;appBuild/100365;ADID/696F8BD2-0820-405C-AFC0-3C6D028040E5;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/14;pap/JA2015_311210;brand/apple;supportJDSHWK/1;"
|
||||
}
|
||||
}
|
||||
$.get(options, async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} API请求失败,请检查网路重试`);
|
||||
} else {
|
||||
if (safeGet(data)) {
|
||||
data = JSON.parse(data);
|
||||
if (data['ret'] === 0) {
|
||||
const { tuanInfo } = data;
|
||||
for (let item of tuanInfo) {
|
||||
if (item.tuanNum === item.realTuanNum) {
|
||||
// console.log(`参加团主【${item.tuanLeader}】已成功`)
|
||||
const { userInfo } = item;
|
||||
for (let item2 of userInfo) {
|
||||
if (item2.encryptPin === $.encryptPin) {
|
||||
if (item2.receiveElectric && item2.receiveElectric > 0) {
|
||||
console.log(`${new Date(item2.joinTime * 1000).toLocaleString()}参加团主【${item2.nickName}】的奖励已经领取成功`)
|
||||
} else {
|
||||
console.log(`开始领取${new Date(item2.joinTime * 1000).toLocaleString()}参加团主【${item2.nickName}】的奖励`)
|
||||
await tuanAward(item.tuanActiveId, item.tuanId, item.tuanLeader === $.encryptPin);//isTuanLeader
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log(`${new Date(item.beginTime * 1000).toLocaleString()}参加团主【${item.tuanLeader}】失败`)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log(`QueryAllTuan异常:${JSON.stringify(data)}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
//开团人的领取奖励API
|
||||
function tuanAward(activeId, tuanId, isTuanLeader = true) {
|
||||
return new Promise((resolve) => {
|
||||
const options = {
|
||||
'url': `https://m.jingxi.com/dreamfactory/tuan/Award?activeId=${escape(activeId)}&tuanId=${escape(tuanId)}&_time=${Date.now()}&_=${Date.now()}&sceneval=2&g_login_type=1`,
|
||||
"headers": {
|
||||
"Accept": "*/*",
|
||||
"Accept-Encoding": "gzip, deflate, br",
|
||||
"Accept-Language": "zh-cn",
|
||||
"Connection": "keep-alive",
|
||||
"Cookie": cookie,
|
||||
"Host": "m.jingxi.com",
|
||||
"Referer": "https://st.jingxi.com/pingou/dream_factory/divide.html",
|
||||
"User-Agent": "jdpingou;iPhone;3.15.2;13.5.1;90bab9217f465a83a99c0b554a946b0b0d5c2f7a;network/wifi;model/iPhone12,1;appBuild/100365;ADID/696F8BD2-0820-405C-AFC0-3C6D028040E5;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/14;pap/JA2015_311210;brand/apple;supportJDSHWK/1;"
|
||||
}
|
||||
}
|
||||
$.get(options, async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} API请求失败,请检查网路重试`);
|
||||
} else {
|
||||
if (safeGet(data)) {
|
||||
data = JSON.parse(data);
|
||||
if (data['ret'] === 0) {
|
||||
if (isTuanLeader) {
|
||||
console.log(`开团奖励(团长)${data.data['electric']}领取成功`);
|
||||
message += `【开团(团长)奖励】${data.data['electric']}领取成功\n`;
|
||||
if ($.surplusOpenTuanNum > 0) {
|
||||
$.log(`开团奖励(团长)已领取,准备开团`);
|
||||
await CreateTuan();
|
||||
}
|
||||
} else {
|
||||
console.log(`参团奖励${data.data['electric']}领取成功`);
|
||||
message += `【参团奖励】${data.data['electric']}领取成功\n`;
|
||||
}
|
||||
} else if (data['ret'] === 10212) {
|
||||
console.log(`${JSON.stringify(data)}`);
|
||||
|
||||
if (isTuanLeader && $.surplusOpenTuanNum > 0) {
|
||||
$.log(`团奖励已领取,准备开团`);
|
||||
await CreateTuan();
|
||||
}
|
||||
} else {
|
||||
console.log(`异常:${JSON.stringify(data)}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
function updateTuanIds(url = 'https://raw.githubusercontent.com/lxk0301/updateTeam/master/jd_updateFactoryTuanId.json') {
|
||||
return new Promise(resolve => {
|
||||
$.get({url}, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
} else {
|
||||
$.tuanIdS = JSON.parse(data);
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
function updateTuanIdsCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/master/jd_updateFactoryTuanId.json') {
|
||||
return new Promise(resolve => {
|
||||
$.get({url}, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
} else {
|
||||
$.tuanIdS = JSON.parse(data);
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
function checkExchange() {
|
||||
|
||||
}
|
||||
//商品可兑换时的通知
|
||||
async function exchangeProNotify() {
|
||||
await GetShelvesList();
|
||||
let exchangeEndTime, exchangeEndHours, nowHours;
|
||||
//脚本运行的UTC+8时区的时间戳
|
||||
let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000);
|
||||
if ($.shelvesList && $.shelvesList.length > 0) console.log(`\n 商品名 兑换状态`)
|
||||
for (let shel of $.shelvesList) {
|
||||
console.log(`${shel['name']} ${shel['exchangeStatus'] === 1 ? '未兑换' : shel['exchangeStatus'] === 2 ? '已兑换' : '兑换超时'}`)
|
||||
if (shel['exchangeStatus'] === 1) {
|
||||
exchangeEndTime = shel['exchangeEndTime'] * 1000;
|
||||
$.picture = shel['picture'];
|
||||
// 兑换截止时间点
|
||||
exchangeEndHours = new Date(exchangeEndTime + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).getHours();
|
||||
//兑换截止时间(年月日 时分秒)
|
||||
$.exchangeEndTime = new Date(exchangeEndTime + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString('zh', {hour12: false});
|
||||
//脚本运行此时的时间点
|
||||
nowHours = nowTimes.getHours();
|
||||
}
|
||||
}
|
||||
if (exchangeEndTime) {
|
||||
//比如兑换(超时)截止时间是2020/12/8 09:20:04,现在时间是2020/12/6
|
||||
if (nowTimes < exchangeEndTime) {
|
||||
//还可以兑换
|
||||
// 一:在兑换超时这一天(2020/12/8 09:20:04)的前2小时内通知
|
||||
if ((exchangeEndTime - nowTimes) <= 3600000 * 2) {
|
||||
$.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}${(exchangeEndTime - nowTimes) / 60*60*1000}分钟后兑换超时\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, {'open-url': jxOpenUrl, 'media-url': $.picture})
|
||||
await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}${(exchangeEndTime - nowTimes) / 60*60*1000}分钟后兑换超时\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, { url: jxOpenUrl })
|
||||
}
|
||||
//二:在兑换超时日期前的时间一天通知三次(2020/12/6 9,10,11点,以及在2020/12/7 9,10,11点各通知一次)
|
||||
if (nowHours === exchangeEndHours || nowHours === (exchangeEndHours + 1) || nowHours === (exchangeEndHours + 2)) {
|
||||
$.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}已可兑换\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, {'open-url': jxOpenUrl, 'media-url': $.picture})
|
||||
await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}已可兑换\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, { url: jxOpenUrl })
|
||||
}
|
||||
} else {
|
||||
//兑换已超时
|
||||
$.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}兑换已超时,请重新选择商品生产\n【兑换截止时间】${$.exchangeEndTime}`, {'open-url': jxOpenUrl})
|
||||
await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}兑换已超时,请重新选择商品生产\n【兑换截止时间】${$.exchangeEndTime}`, { url: jxOpenUrl })
|
||||
}
|
||||
}
|
||||
}
|
||||
async function showMsg() {
|
||||
return new Promise(async resolve => {
|
||||
message += `【收取自己零件】${$.pickUpMyselfComponent ? `获得${$.pickEle}电力` : `今日已达上限`}\n`;
|
||||
message += `【收取好友零件】${$.pickUpMyselfComponent ? `获得${$.pickFriendEle}电力` : `今日已达上限`}\n`;
|
||||
let ctrTemp;
|
||||
if ($.isNode() && process.env.DREAMFACTORY_NOTIFY_CONTROL) {
|
||||
ctrTemp = `${process.env.DREAMFACTORY_NOTIFY_CONTROL}` === 'false';
|
||||
@@ -803,13 +1257,13 @@ async function showMsg() {
|
||||
if (ctrTemp) {
|
||||
$.msg($.name, '', message);
|
||||
if ($.isNode()) {
|
||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${message}\n【收取零件】获得${$.pickEle}电力`);
|
||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${message}`);
|
||||
}
|
||||
} else if (new Date().getHours() === 22) {
|
||||
$.msg($.name, '', `${message}【收取自己零件】获得${$.pickEle}电力\n【收取好友零件】获得${$.pickFriendEle}电力`)
|
||||
$.log(`\n${message}【收取自己零件】获得${$.pickEle}电力\n【收取好友零件】获得${$.pickFriendEle}电力`);
|
||||
$.msg($.name, '', `${message}`)
|
||||
$.log(`\n${message}`);
|
||||
} else {
|
||||
$.log(`\n${message}【收取自己零件】获得${$.pickEle}电力\n【收取好友零件】获得${$.pickFriendEle}电力`);
|
||||
$.log(`\n${message}`);
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
@@ -834,8 +1288,8 @@ function readShareCode() {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
// await $.wait(2000);
|
||||
// resolve()
|
||||
await $.wait(10000);
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
//格式化助力码
|
||||
|
||||
@@ -1222,7 +1222,7 @@ function timeFormat(time) {
|
||||
return date.getFullYear() + '-' + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + '-' + (date.getDate() >= 10 ? date.getDate() : '0' + date.getDate());
|
||||
}
|
||||
function readShareCode() {
|
||||
return new Promise(resolve => {
|
||||
return new Promise(async resolve => {
|
||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/farm/read/${randomCount}/`}, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
@@ -1240,6 +1240,8 @@ function readShareCode() {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
await $.wait(10000);
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
function shareCodesFormat() {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: lxk0301 https://github.com/lxk0301
|
||||
* @Date: 2020-11-25 18:19:21
|
||||
* @Date: 2020-12-06 18:19:21
|
||||
* @Last Modified by: lxk0301
|
||||
* @Last Modified time: 2020-11-28 09:58:02
|
||||
* @Last Modified time: 2020-12-06 22:58:02
|
||||
*/
|
||||
/*
|
||||
东东工厂,不是京喜工厂
|
||||
@@ -158,7 +158,7 @@ async function algorithm() {
|
||||
console.log(`\n提供的心仪商品${name}目前数量:${couponCount},且当前总电量为:${remainScore * 1 + useScore * 1},【满足】兑换此商品所需总电量:${totalScore + 100000}`);
|
||||
console.log(`请去活动页面更换成心仪商品并手动投入电量兑换\n`);
|
||||
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请点击弹窗直达活动页面\n更换成心仪商品并手动投入电量兑换`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'});
|
||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请去活动页面更换成心仪商品并手动投入电量兑换`);
|
||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请去活动页面更换成心仪商品并手动投入电量兑换`);
|
||||
} else {
|
||||
console.log(`您心仪商品${name}\n当前数量为:${couponCount}\n兑换所需电量为:${totalScore}\n您当前总电量为:${remainScore * 1 + useScore * 1}\n不满足兑换心仪商品的条件\n`)
|
||||
}
|
||||
@@ -169,7 +169,7 @@ async function algorithm() {
|
||||
console.log(`BoxJs或环境变量暂未提供心仪商品,下面为您目前选的${name} 发送提示通知\n`);
|
||||
// await jdfactory_addEnergy();
|
||||
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n您所选商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请点击弹窗直达活动页面查看`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'});
|
||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `所选商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请速去活动页面查看`);
|
||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n所选商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请速去活动页面查看`);
|
||||
} else {
|
||||
console.log(`\n所选商品${name}目前数量:${couponCount},且当前总电量为:${remainScore * 1 + useScore * 1},【不满足】兑换此商品所需总电量:${totalScore}`)
|
||||
console.log(`故不一次性投入电力,一直放到蓄电池累计\n`);
|
||||
@@ -193,6 +193,8 @@ async function algorithm() {
|
||||
wantProductSkuId = item.skuId;
|
||||
}
|
||||
}
|
||||
if (totalScore) {
|
||||
// 库存存在您设置的心仪商品
|
||||
message += `心仪商品数量:${couponCount}\n`;
|
||||
message += `心仪商品所需电量:${totalScore}\n`;
|
||||
message += `您当前总电量:${$.batteryValue * 1}\n`;
|
||||
@@ -200,10 +202,13 @@ async function algorithm() {
|
||||
console.log(`\n提供的心仪商品${name}目前数量:${couponCount},且当前总电量为:${$.batteryValue * 1},【满足】兑换此商品所需总电量:${totalScore}`);
|
||||
console.log(`请去活动页面选择心仪商品并手动投入电量兑换\n`);
|
||||
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${$.batteryValue * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请点击弹窗直达活动页面\n选择此心仪商品并手动投入电量兑换`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'});
|
||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${$.batteryValue * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请去活动页面选择此心仪商品并手动投入电量兑换`);
|
||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${$.batteryValue * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请去活动页面选择此心仪商品并手动投入电量兑换`);
|
||||
} else {
|
||||
console.log(`您心仪商品${name}\n当前数量为:${couponCount}\n兑换所需电量为:${totalScore}\n您当前总电量为:${$.batteryValue * 1}\n不满足兑换心仪商品的条件\n`)
|
||||
}
|
||||
} else {
|
||||
message += `目前库存:暂无您设置的心仪商品\n`;
|
||||
}
|
||||
} else {
|
||||
console.log(`BoxJs或环境变量暂未提供心仪商品\n如需兑换心仪商品,请提供心仪商品名称\n`);
|
||||
await jdfactory_getProductList(true);
|
||||
@@ -211,8 +216,8 @@ async function algorithm() {
|
||||
message += `兑换所需电量:${$.canMakeList[0].fullScore}\n`;
|
||||
message += `您当前总电量:${$.batteryValue * 1}\n`;
|
||||
if ($.canMakeList[0].couponCount > 0 && $.batteryValue * 1 >= $.canMakeList[0].fullScore) {
|
||||
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n当前总电量为:${$.batteryValue * 1}\n当前总电量为:${$.batteryValue * 1}\n【满足】兑换${$.canMakeList[0].name}所需总电量:${$.canMakeList[0].totalScore}\n请点击弹窗直达活动页面\n选择此心仪商品并手动投入电量兑换`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'});
|
||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `当前总电量为:${$.batteryValue * 1}\n【满足】兑换${$.canMakeList[0].name}所需总电量:${$.canMakeList[0].totalScore}\n请速去活动页面查看`);
|
||||
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}【满足】兑换${$.canMakeList[0].name}所需总电量:${$.canMakeList[0].fullScore}\n请点击弹窗直达活动页面\n选择此心仪商品并手动投入电量兑换`, {'open-url': 'openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'});
|
||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n${message}【满足】兑换${$.canMakeList[0].name}所需总电量:${$.canMakeList[0].fullScore}\n请速去活动页面查看`);
|
||||
} else {
|
||||
console.log(`\n目前电量${$.batteryValue * 1},不满足兑换 ${$.canMakeList[0].name}所需的 ${$.canMakeList[0].fullScore}电量\n`)
|
||||
}
|
||||
@@ -284,11 +289,11 @@ async function doTask() {
|
||||
}
|
||||
if (item.taskType === 10) {
|
||||
if (item.status === 1) {
|
||||
if (item.threeMealInfoVos.status === 1) {
|
||||
if (item.threeMealInfoVos[0].status === 1) {
|
||||
//可以做此任务
|
||||
console.log(`准备做此任务:${item.taskName}`);
|
||||
await jdfactory_collectScore(item.threeMealInfoVos.taskToken);
|
||||
} else if (item.threeMealInfoVos.status === 0) {
|
||||
await jdfactory_collectScore(item.threeMealInfoVos[0].taskToken);
|
||||
} else if (item.threeMealInfoVos[0].status === 0) {
|
||||
console.log(`${item.taskName} 任务已错过时间`)
|
||||
}
|
||||
} else if (item.status === 2){
|
||||
@@ -619,8 +624,8 @@ function readShareCode() {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
// await $.wait(2000);
|
||||
// resolve()
|
||||
await $.wait(10000);
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
//格式化助力码
|
||||
|
||||
44
jd_joy.js
44
jd_joy.js
@@ -2,7 +2,7 @@
|
||||
jd宠汪汪 搬的https://github.com/uniqueque/QuantumultX/blob/4c1572d93d4d4f883f483f907120a75d925a693e/Script/jd_joy.js
|
||||
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
|
||||
IOS用户支持京东双账号,NodeJs用户支持N个京东账号
|
||||
更新时间:2020-11-03
|
||||
更新时间:2020-12-06
|
||||
建议先凌晨0点运行jd_joy.js脚本获取狗粮后,再运行此脚本(jd_joy_steal.js)可偷好友积分,6点运行可偷好友狗粮
|
||||
feedCount:自定义 每次喂养数量; 等级只和喂养次数有关,与数量无关
|
||||
推荐每次投喂10个,积累狗粮,然后去聚宝盆赌每小时的幸运奖,据观察,投入3000-6000中奖概率大,超过7000基本上注定亏本,即使是第一名
|
||||
@@ -37,6 +37,7 @@ if ($.isNode()) {
|
||||
}
|
||||
let message = '', subTitle = '';
|
||||
let FEED_NUM = ($.getdata('joyFeedCount') * 1) || 10; //每次喂养数量 [10,20,40,80]
|
||||
let teamLevel = 2;//参加多少人的赛跑比赛,默认是双人赛跑,可选2,10,50。其他不可选,其中2代表参加双人PK赛,10代表参加10人突围赛,50代表参加50人挑战赛
|
||||
//是否参加宠汪汪双人赛跑(据目前观察,参加双人赛跑不消耗狗粮,如需参加其他多人赛跑,请关闭)
|
||||
// 默认 'true' 参加双人赛跑,如需关闭 ,请改成 'false';
|
||||
let joyRunFlag = true;
|
||||
@@ -133,15 +134,16 @@ async function joinTwoPeopleRun() {
|
||||
console.log(`\n===========以下是双人赛跑信息========\n`)
|
||||
await getPetRace();
|
||||
if ($.petRaceResult) {
|
||||
teamLevel = $.isNode() ? (process.env.JOY_TEAM_LEVEL ? process.env.JOY_TEAM_LEVEL : teamLevel) : ($.getdata('JOY_TEAM_LEVEL') ? $.getdata('JOY_TEAM_LEVEL') : teamLevel);
|
||||
let petRaceResult = $.petRaceResult.data.petRaceResult;
|
||||
let raceUsers = $.petRaceResult.data.raceUsers;
|
||||
console.log(`赛跑状态:${petRaceResult}\n`);
|
||||
if (petRaceResult === 'not_participate') {
|
||||
console.log('暂未参赛,现在为您参加双人赛跑');
|
||||
await runMatch(2);
|
||||
console.log(`暂未参赛,现在为您参加${teamLevel}人赛跑`);
|
||||
await runMatch(teamLevel * 1);
|
||||
if ($.runMatchResult.success) {
|
||||
console.log(`双人赛跑参加成功\n`);
|
||||
message += `双人赛跑:成功参加\n`;
|
||||
console.log(`${teamLevel}人赛跑参加成功\n`);
|
||||
message += `${teamLevel}人赛跑:成功参加\n`;
|
||||
await getPetRace();
|
||||
petRaceResult = $.petRaceResult.data.petRaceResult;
|
||||
raceUsers = $.petRaceResult.data.raceUsers;
|
||||
@@ -157,10 +159,16 @@ async function joinTwoPeopleRun() {
|
||||
}
|
||||
if (petRaceResult === 'unreceive') {
|
||||
console.log('今日参赛的比赛已经结束,现在领取奖励');
|
||||
await getWinCoin();
|
||||
let winCoin = 0;
|
||||
if ($.getWinCoinRes && $.getWinCoinRes.success) {
|
||||
winCoin = $.getWinCoinRes.data.winCoin;
|
||||
}
|
||||
await receiveJoyRunAward();
|
||||
console.log(`领取赛跑奖励结果:${JSON.stringify($.receiveJoyRunAwardRes)}`)
|
||||
if ($.receiveJoyRunAwardRes.success) {
|
||||
$.msg($.name, '双人赛跑取得获胜', `【京东账号${$.index}】${$.nickName}\n太棒了,恭喜您获得300积分奖励`)
|
||||
$.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n太棒了,${teamLevel}人赛跑取得获胜\n恭喜您已获得${winCoin}积分奖励`);
|
||||
if ($.isNode()) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index}${$.nickName}\n${teamLevel}人赛跑取得获胜\n恭喜您已获得${winCoin}积分奖励`)
|
||||
}
|
||||
}
|
||||
if (petRaceResult === 'participate') {
|
||||
@@ -604,6 +612,7 @@ function getPetRace() {
|
||||
}
|
||||
//参加赛跑API
|
||||
function runMatch(teamLevel, timeout = 5000) {
|
||||
if (teamLevel === 10 || teamLevel === 50) timeout = 60000;
|
||||
console.log(`正在参赛中,请稍等${timeout / 1000}秒,以防多个账号匹配到统一赛场\n`)
|
||||
return new Promise(async resolve => {
|
||||
await $.wait(timeout);
|
||||
@@ -650,6 +659,29 @@ function getBackupInfo() {
|
||||
})
|
||||
})
|
||||
}
|
||||
//查询赛跑获得多少积分
|
||||
function getWinCoin() {
|
||||
return new Promise(resolve => {
|
||||
const url = `${weAppUrl}/combat/detail/v2?help=false&reqSource=weapp`;
|
||||
$.get(taskUrl(url, 'draw.jdfcloud.com', `weapp`), (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log('\n京东宠汪汪: API查询请求失败 ‼️‼️')
|
||||
} else {
|
||||
// console.log('查询应援团信息API',(data))
|
||||
// $.appGetPetTaskConfigRes = JSON.parse(data);
|
||||
if (data) {
|
||||
$.getWinCoinRes = JSON.parse(data);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp);
|
||||
} finally {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
//领取赛跑奖励API
|
||||
function receiveJoyRunAward() {
|
||||
return new Promise(resolve => {
|
||||
|
||||
@@ -38,10 +38,10 @@ const isRequest = typeof $request != "undefined"
|
||||
const $ = new Env('宠汪汪赛跑');
|
||||
const JD_BASE_API = `https://draw.jdfcloud.com//pet`;
|
||||
//此处填入你需要助力好友的京东用户名
|
||||
//给下面好友邀请助力的
|
||||
let invite_pins = ["jd_6cd93e613b0e5,被折叠的记忆33,jd_704a2e5e28a66,jd_45a6b5953b15b,zooooo58"];
|
||||
//给下面好友赛跑助力
|
||||
let run_pins = ["jd_6cd93e613b0e5,被折叠的记忆33,jd_704a2e5e28a66,jd_45a6b5953b15b,zooooo58"];
|
||||
//下面给出好友邀请助力的示例填写规则
|
||||
let invite_pins = ["jd_6cd93e613b0e5,被折叠的记忆33,jd_704a2e5e28a66,jd_45a6b5953b15b,zooooo58,jd_66f5cecc1efcd"];
|
||||
//下面给出好友赛跑助力的示例填写规则
|
||||
let run_pins = ["jd_6cd93e613b0e5,被折叠的记忆33,jd_704a2e5e28a66,jd_45a6b5953b15b,zooooo58,jd_66f5cecc1efcd"];
|
||||
// $.LKYLToken = '76fe7794c475c18711e3b47185f114b5' || $.getdata('jdJoyRunToken');
|
||||
// $.LKYLToken = $.getdata('jdJoyRunToken');
|
||||
//Node.js用户请在jdCookie.js处填写京东ck;
|
||||
|
||||
@@ -31,7 +31,7 @@ const notify = $.isNode() ? require('./sendNotify') : '';
|
||||
let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送
|
||||
const randomCount = 3;
|
||||
let cookiesArr = [], cookie = '', message = '';
|
||||
const inviteCodes = ['qSDHMwUOz7onHcMyaju4KmdSXWf0dlv7LVnTt1Wzemo='];
|
||||
const inviteCodes = ['qSDHMwUOz7onHcMyaju4KmdSXWf0dlv7LVnTt1Wzemo=@iuGNoGYvk9YdEImUAz25Wyzm7oeggrm0JSIYgZdHJGI=', 'iuGNoGYvk9YdEImUAz25Wyzm7oeggrm0JSIYgZdHJGI='];
|
||||
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
||||
if ($.isNode()) {
|
||||
Object.keys(jdCookieNode).forEach((item) => {
|
||||
@@ -90,10 +90,14 @@ async function jdJxStory() {
|
||||
await upgrade();
|
||||
}
|
||||
await cardList()
|
||||
if ($.isNode()) {
|
||||
$.click = true;
|
||||
while($.click){
|
||||
await increase()
|
||||
}
|
||||
} else {
|
||||
await increase()
|
||||
}
|
||||
}
|
||||
// 签到
|
||||
function sign() {
|
||||
@@ -516,10 +520,10 @@ function shareCodesFormat() {
|
||||
const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1);
|
||||
$.newShareCodes = inviteCodes[tempIndex].split('@');
|
||||
}
|
||||
const readShareCodeRes = await readShareCode();
|
||||
if (readShareCodeRes && readShareCodeRes.code === 200) {
|
||||
$.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])];
|
||||
}
|
||||
// const readShareCodeRes = await readShareCode();
|
||||
// if (readShareCodeRes && readShareCodeRes.code === 200) {
|
||||
// $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])];
|
||||
// }
|
||||
console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`)
|
||||
resolve();
|
||||
})
|
||||
|
||||
@@ -47,7 +47,7 @@ function updateShareCodes(url = 'https://raw.githubusercontent.com/yangtingxiao/
|
||||
})
|
||||
})
|
||||
}
|
||||
function updateShareCodesCDN(url = 'https://cdn.jsdelivr.net/gh/yangtingxiao/QuantumultX@master/scripts/jd/jd_lotteryMachine.js') {
|
||||
function updateShareCodesCDN(url = 'https://raw.fastgit.org/yangtingxiao/QuantumultX/master/scripts/jd/jd_lotteryMachine.js') {
|
||||
return new Promise(resolve => {
|
||||
$.get({url}, async (err, resp, data) => {
|
||||
try {
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
/*
|
||||
秒杀红包雨,可以获取3次,一天运行一次即可
|
||||
活动时间:2020-12-1 到 2020-12-31
|
||||
活动入口:首页👉秒杀👉往下拉(手指向上滑动)👉可以看到狂撒2亿京东
|
||||
更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js
|
||||
已支持IOS双京东账号, Node.js支持N个京东账号
|
||||
脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js
|
||||
============Quantumultx===============
|
||||
[task_local]
|
||||
#秒杀红包雨
|
||||
10 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_ms_redrain.png, enabled=true
|
||||
10 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true
|
||||
|
||||
================Loon==============
|
||||
[Script]
|
||||
@@ -95,11 +97,12 @@ function getRedRain() {
|
||||
data = JSON.parse(data);
|
||||
if (data.subCode === '0') {
|
||||
console.log(`领取成功,获得${JSON.stringify(data.lotteryResult)}`)
|
||||
message+= `领取成功,获得${JSON.stringify(data.lotteryResult)}\n`
|
||||
// message+= `领取成功,获得${JSON.stringify(data.lotteryResult)}\n`
|
||||
message+= `${data.lotteryResult.jPeasList[0].ext}:${(data.lotteryResult.jPeasList[0].quantity)}京豆\n`
|
||||
|
||||
} else if (data.subCode === '8') {
|
||||
console.log(`今日次数已满`)
|
||||
message += `领取失败,今日已签到`;
|
||||
message += `领取失败,今日已签到\n`;
|
||||
} else {
|
||||
console.log(`异常:${JSON.stringify(data)}`)
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ async function showMsg() {
|
||||
}
|
||||
}
|
||||
function readShareCode() {
|
||||
return new Promise(resolve => {
|
||||
return new Promise(async resolve => {
|
||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/pet/read/${randomCount}/`}, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
@@ -454,6 +454,8 @@ function readShareCode() {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
await $.wait(10000);
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
function shareCodesFormat() {
|
||||
|
||||
@@ -96,7 +96,7 @@ async function jdPlantBean() {
|
||||
awardState = roundList[0].awardState;
|
||||
$.taskList = $.plantBeanIndexResult.data.taskList;
|
||||
subTitle = `【京东昵称】${$.plantBeanIndexResult.data.plantUserInfo.plantNickName}`;
|
||||
message += `【上期时间】${roundList[0].dateDesc}\n`;
|
||||
message += `【上期时间】${roundList[0].dateDesc.replace('上期 ', '')}\n`;
|
||||
message += `【上期成长值】${roundList[0].growth}\n`;
|
||||
await receiveNutrients();//定时领取营养液
|
||||
await doHelp();//助力
|
||||
@@ -501,7 +501,7 @@ async function plantBeanIndex() {
|
||||
$.plantBeanIndexResult = await request('plantBeanIndex');//plantBeanIndexBody
|
||||
}
|
||||
function readShareCode() {
|
||||
return new Promise(resolve => {
|
||||
return new Promise(async resolve => {
|
||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/bean/read/${randomCount}/`}, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
@@ -519,6 +519,8 @@ function readShareCode() {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
await $.wait(15000);
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
//格式化助力码
|
||||
|
||||
@@ -48,7 +48,7 @@ function updateShareCodes(url = 'https://raw.githubusercontent.com/yangtingxiao/
|
||||
})
|
||||
})
|
||||
}
|
||||
function scriptsCDN(url = 'https://cdn.jsdelivr.net/gh/yangtingxiao/QuantumultX@master/scripts/jd/jd_rankingList.js') {
|
||||
function scriptsCDN(url = 'https://raw.fastgit.org/yangtingxiao/QuantumultX/master/scripts/jd/jd_rankingList.js') {
|
||||
return new Promise(resolve => {
|
||||
$.get({url}, async (err, resp, data) => {
|
||||
try {
|
||||
|
||||
@@ -157,7 +157,7 @@ async function doChannelsListTask(taskId, taskType) {
|
||||
}
|
||||
async function helpFriends() {
|
||||
await updateInviteCode();
|
||||
if (!$.updatePkActivityIdRes) await updateInviteCodeCDN();
|
||||
if (!$.inviteCodes) await updateInviteCodeCDN();
|
||||
for (let item of $.inviteCodes.inviteCode) {
|
||||
if (!item) continue
|
||||
await createAssistUser(item, $.createAssistUserID || "1318106976846299138");
|
||||
@@ -710,7 +710,7 @@ function updateInviteCode(url = 'https://raw.githubusercontent.com/lxk0301/updat
|
||||
})
|
||||
})
|
||||
}
|
||||
function updateInviteCodeCDN(url = 'https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_updateSmallHomeInviteCode.json') {
|
||||
function updateInviteCodeCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/master/jd_updateSmallHomeInviteCode.json') {
|
||||
return new Promise(resolve => {
|
||||
$.get({url}, async (err, resp, data) => {
|
||||
try {
|
||||
|
||||
77
jd_split.js
77
jd_split.js
@@ -1,5 +1,7 @@
|
||||
/*
|
||||
金榜年终奖
|
||||
活动时间:2020-12-12日结束
|
||||
活动入口:京东APP首页右边浮动飘窗
|
||||
已支持IOS双京东账号,Node.js支持N个京东账号
|
||||
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
|
||||
============Quantumultx===============
|
||||
@@ -35,9 +37,8 @@ if ($.isNode()) {
|
||||
cookiesArr.push(...[$.getdata('CookieJD'), $.getdata('CookieJD2')]);
|
||||
}
|
||||
const JD_API_HOST = 'https://api.m.jd.com/client.action';
|
||||
const inviteCodes = [`P04z54XCjVUnIaW5nJcXCCyoR8C6p8txXBH`, 'P04z54XCjVUnIaW5nJcXCCyoR8C6p8txXBH'];
|
||||
$.newShareCodes = [`P04z54XCjVUnIaW5nJcXCCyoR8C6p8txXBH`, 'P04z54XCjVUnIaW5nJcXCCyoR8C6p8txXBH', 'P04z54XCjVUnIaW5u2ak7ZCdan1BT0NlbBGZ1-rnMYj'];
|
||||
!(async () => {
|
||||
await requireConfig();
|
||||
if (!cookiesArr[0]) {
|
||||
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"});
|
||||
return;
|
||||
@@ -62,7 +63,6 @@ const inviteCodes = [`P04z54XCjVUnIaW5nJcXCCyoR8C6p8txXBH`, 'P04z54XCjVUnIaW5nJc
|
||||
}
|
||||
continue
|
||||
}
|
||||
await shareCodesFormat();
|
||||
await jdSplit()
|
||||
}
|
||||
}
|
||||
@@ -81,14 +81,8 @@ async function jdSplit() {
|
||||
}
|
||||
function showMsg() {
|
||||
return new Promise(resolve => {
|
||||
if (!jdNotify) {
|
||||
$.msg($.name, '', `${message}`);
|
||||
} else {
|
||||
$.log(`京东账号${$.index}${$.nickName}\n${message}`);
|
||||
}
|
||||
if (new Date().getHours() === 23) {
|
||||
message += `任务已做完:具体奖品去发活动页面查看\n活动入口:京东APP首页右边浮动飘窗`;
|
||||
$.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`);
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
@@ -232,69 +226,6 @@ function jdsplit_getTaskDetail() {
|
||||
})
|
||||
}
|
||||
|
||||
function readShareCode() {
|
||||
console.log(`开始`)
|
||||
return new Promise(async resolve => {
|
||||
$.get({url: `http://api.turinglabs.net/api/v1/jd/jdsplit/read/${randomCount}/`}, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} API请求失败,请检查网路重试`)
|
||||
} else {
|
||||
if (data) {
|
||||
console.log(`随机取${randomCount}个码放到您固定的互助码后面`)
|
||||
data = JSON.parse(data);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
// await $.wait(2000);
|
||||
// resolve()
|
||||
})
|
||||
}
|
||||
//格式化助力码
|
||||
function shareCodesFormat() {
|
||||
return new Promise(async resolve => {
|
||||
// console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`)
|
||||
$.newShareCodes = [];
|
||||
if ($.shareCodesArr[$.index - 1]) {
|
||||
$.newShareCodes = $.shareCodesArr[$.index - 1].split('@');
|
||||
} else {
|
||||
console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`)
|
||||
const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1);
|
||||
$.newShareCodes = inviteCodes[tempIndex].split('@');
|
||||
}
|
||||
const readShareCodeRes = null //await readShareCode();
|
||||
if (readShareCodeRes && readShareCodeRes.code === 200) {
|
||||
$.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])];
|
||||
}
|
||||
console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`)
|
||||
resolve();
|
||||
})
|
||||
}
|
||||
function requireConfig() {
|
||||
return new Promise(resolve => {
|
||||
console.log(`开始获取${$.name}配置文件\n`);
|
||||
//Node.js用户请在jdCookie.js处填写京东ck;
|
||||
const shareCodes = $.isNode() ? require('./jdSplitShareCodes.js') : '';
|
||||
console.log(`共${cookiesArr.length}个京东账号\n`);
|
||||
$.shareCodesArr = [];
|
||||
if ($.isNode()) {
|
||||
Object.keys(shareCodes).forEach((item) => {
|
||||
if (shareCodes[item]) {
|
||||
$.shareCodesArr.push(shareCodes[item])
|
||||
}
|
||||
})
|
||||
}
|
||||
// console.log(`\n种豆得豆助力码::${JSON.stringify($.shareCodesArr)}`);
|
||||
console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`);
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
function taskPostUrl(function_id, body = {}, function_id2) {
|
||||
let url = `${JD_API_HOST}`;
|
||||
if (function_id2) {
|
||||
|
||||
@@ -406,10 +406,31 @@
|
||||
},
|
||||
{
|
||||
"id": "joyRunFlag",
|
||||
"name": "是否参加双人赛跑(默认参加)",
|
||||
"name": "是否参加赛跑(默认参加)",
|
||||
"val": true,
|
||||
"type": "boolean",
|
||||
"desc": "开启脚本将会为您自动参加双人赛跑"
|
||||
"desc": "开启脚本将会为您自动参加赛跑(默认参加双人赛跑)"
|
||||
},
|
||||
{
|
||||
"id": "JOY_TEAM_LEVEL",
|
||||
"name": "宠汪汪赛跑级别选择",
|
||||
"val": "2",
|
||||
"type": "radios",
|
||||
"desc": "参加多少人的赛跑比赛,其中2代表参加双人PK赛,10代表参加10人突围赛,50代表参加50人挑战赛",
|
||||
"items": [
|
||||
{
|
||||
"key": "2",
|
||||
"label": "双人PK赛"
|
||||
},
|
||||
{
|
||||
"key": "10",
|
||||
"label": "10人突围赛"
|
||||
},
|
||||
{
|
||||
"key": "50",
|
||||
"label": "50人挑战赛"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "joyFeedCount",
|
||||
|
||||
Reference in New Issue
Block a user