This commit is contained in:
lxk0301
2021-02-01 10:43:34 +08:00
parent 4e1e73eeb7
commit c07d99c77b
3 changed files with 26 additions and 18 deletions

View File

@@ -88,7 +88,7 @@ let helpCode = []
// await main();
}
}
// console.log($.temp)
// console.log(JSON.stringify($.temp))
})()
.catch((e) => {
$.log('', `${$.name}, 失败! 原因: ${e}!`, '')

View File

@@ -81,13 +81,17 @@ const JD_API_HOST = `https://api.m.jd.com/api?appid=jdsupermarket`;
coinToBeans = process.env.MARKET_COIN_TO_BEANS;
}
}
if (`${coinToBeans}` !== '0') {
await smtgHome();//查询蓝币数量,是否满足兑换的条件
await PrizeIndex();
} else {
console.log('查询到您设置的是不兑换京豆选项现在为您跳过兑换京豆。如需兑换请去BoxJs设置或者修改脚本coinToBeans\n')
try {
if (`${coinToBeans}` !== '0') {
await smtgHome();//查询蓝币数量,是否满足兑换的条件
await PrizeIndex();
} else {
console.log('查询到您设置的是不兑换京豆选项现在为您跳过兑换京豆。如需兑换请去BoxJs设置或者修改脚本coinToBeans\n')
}
await msgShow();
} catch (e) {
$.logErr(e)
}
await msgShow();
}
}
})()

View File

@@ -80,18 +80,22 @@ let userInfo = null, taskInfo = [], message = '', subTitle = '', fruitTotal = 0;
$.done();
})
async function jd_moneyTree() {
const userRes = await user_info();
if (!userRes || !userRes.realName) return
await signEveryDay();
await dayWork();
await harvest();
await sell();
await myWealth();
await stealFriendFruit()
try {
const userRes = await user_info();
if (!userRes || !userRes.realName) return
await signEveryDay();
await dayWork();
await harvest();
await sell();
await myWealth();
await stealFriendFruit()
$.log(`\n${message}\n`);
if (!jdNotify || jdNotify === 'false') {
$.msg($.name, subTitle, message);
$.log(`\n${message}\n`);
if (!jdNotify || jdNotify === 'false') {
$.msg($.name, subTitle, message);
}
} catch (e) {
$.logErr(e)
}
}
function user_info() {