摇钱树脚本改成默认不卖出金果得金币(金币有时效,会过期)

This commit is contained in:
lxk0301
2020-12-17 14:50:30 +08:00
parent 92aae1a90b
commit 11312cec62
3 changed files with 14 additions and 6 deletions

View File

@@ -35,6 +35,7 @@ if ($.isNode()) {
}
let jdNotify = true;//是否开启静默运行默认true开启
let sellFruit = false;//是否卖出金果得到金币,默认'false'不卖
const JD_API_HOST = 'https://ms.jr.jd.com/gw/generic/uc/h5/m';
let userInfo = null, taskInfo = [], message = '', subTitle = '', fruitTotal = 0;
!(async () => {
@@ -262,11 +263,11 @@ function sell() {
}
params.riskDeviceParam = JSON.stringify(params.riskDeviceParam);//这一步不可省略否则提交会报错和login接口一样
console.log(`目前金果数量${fruitTotal}`)
if ($.isNode()) {
if (process.env.MONEY_TREE_SELL_FRUIT && process.env.MONEY_TREE_SELL_FRUIT === 'false') {
rs()
return
}
sellFruit = $.isNode() ? (process.env.MONEY_TREE_SELL_FRUIT ? process.env.MONEY_TREE_SELL_FRUIT : `${sellFruit}`) : ($.getdata('MONEY_TREE_SELL_FRUIT') ? $.getdata('MONEY_TREE_SELL_FRUIT') : `${sellFruit}`);
if (sellFruit && sellFruit === 'false') {
console.log(`\n设置的不卖出金果\n`)
rs()
return
}
if (fruitTotal > 380) {
request('sell', params).then((sellRes) => {