解决萌宠以及种豆脚本部分账号火爆或者风控导致脚本执行中断情况
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
/*
|
||||
种豆得豆 脚本更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js
|
||||
更新时间:2020-12-31
|
||||
更新时间:2021-1-16
|
||||
已支持IOS京东双账号,云端N个京东账号
|
||||
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
|
||||
注:会自动关注任务中的店铺跟商品,介意者勿使用。
|
||||
@ -81,32 +81,36 @@ let randomCount = $.isNode() ? 20 : 5;
|
||||
})
|
||||
|
||||
async function jdPlantBean() {
|
||||
console.log(`获取任务及基本信息`)
|
||||
await plantBeanIndex();
|
||||
// console.log(plantBeanIndexResult.data.taskList);
|
||||
if ($.plantBeanIndexResult.code === '0') {
|
||||
const shareUrl = $.plantBeanIndexResult.data.jwordShareInfo.shareUrl
|
||||
$.myPlantUuid = getParam(shareUrl, 'plantUuid')
|
||||
console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})的${$.name}好友互助码】${$.myPlantUuid}\n`);
|
||||
roundList = $.plantBeanIndexResult.data.roundList;
|
||||
currentRoundId = roundList[1].roundId;//本期的roundId
|
||||
lastRoundId = roundList[0].roundId;//上期的roundId
|
||||
awardState = roundList[0].awardState;
|
||||
$.taskList = $.plantBeanIndexResult.data.taskList;
|
||||
subTitle = `【京东昵称】${$.plantBeanIndexResult.data.plantUserInfo.plantNickName}`;
|
||||
message += `【上期时间】${roundList[0].dateDesc.replace('上期 ', '')}\n`;
|
||||
message += `【上期成长值】${roundList[0].growth}\n`;
|
||||
await receiveNutrients();//定时领取营养液
|
||||
await doHelp();//助力
|
||||
await doTask();//做日常任务
|
||||
await doEgg();
|
||||
await stealFriendWater();
|
||||
await doCultureBean();
|
||||
await doGetReward();
|
||||
await showTaskProcess();
|
||||
await plantShareSupportList();
|
||||
} else {
|
||||
console.log(`种豆得豆-初始失败: ${JSON.stringify($.plantBeanIndexResult)}`);
|
||||
try {
|
||||
console.log(`获取任务及基本信息`)
|
||||
await plantBeanIndex();
|
||||
// console.log(plantBeanIndexResult.data.taskList);
|
||||
if ($.plantBeanIndexResult.code === '0') {
|
||||
const shareUrl = $.plantBeanIndexResult.data.jwordShareInfo.shareUrl
|
||||
$.myPlantUuid = getParam(shareUrl, 'plantUuid')
|
||||
console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})的${$.name}好友互助码】${$.myPlantUuid}\n`);
|
||||
roundList = $.plantBeanIndexResult.data.roundList;
|
||||
currentRoundId = roundList[1].roundId;//本期的roundId
|
||||
lastRoundId = roundList[0].roundId;//上期的roundId
|
||||
awardState = roundList[0].awardState;
|
||||
$.taskList = $.plantBeanIndexResult.data.taskList;
|
||||
subTitle = `【京东昵称】${$.plantBeanIndexResult.data.plantUserInfo.plantNickName}`;
|
||||
message += `【上期时间】${roundList[0].dateDesc.replace('上期 ', '')}\n`;
|
||||
message += `【上期成长值】${roundList[0].growth}\n`;
|
||||
await receiveNutrients();//定时领取营养液
|
||||
await doHelp();//助力
|
||||
await doTask();//做日常任务
|
||||
await doEgg();
|
||||
await stealFriendWater();
|
||||
await doCultureBean();
|
||||
await doGetReward();
|
||||
await showTaskProcess();
|
||||
await plantShareSupportList();
|
||||
} else {
|
||||
console.log(`种豆得豆-初始失败: ${JSON.stringify($.plantBeanIndexResult)}`);
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e);
|
||||
}
|
||||
}
|
||||
async function doGetReward() {
|
||||
|
Reference in New Issue
Block a user