diff --git a/githubAction.md b/githubAction.md index 4f9fe02b..5a12edb4 100644 --- a/githubAction.md +++ b/githubAction.md @@ -111,7 +111,7 @@ | `SUPERMARKET_SHARECODES`| 京小超商圈互助码 | 非必须 | 填写规则请看 [jdSuperMarketShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdSuperMarketShareCodes.js) 或见下方[互助码的填写规则](#互助码的填写规则) | | `TG_PROXY_HOST` | Telegram 代理的 IP | 非必须 | 代理类型为 http。例子:http代理 http://127.0.0.1:1080 则填写 127.0.0.1 | | `TG_PROXY_PORT` | Telegram 代理的端口 | 非必须 | 例子:http代理 http://127.0.0.1:1080 则填写 1080 | - +| `MONEY_TREE_SELL_FRUIT` | 摇钱树是否卖出金果 | 非必须 | 控制摇钱树脚本是否自动卖出金果兑换成金币,`true`卖出,`false`不卖出,默认`true` | ##### 互助码的填写规则 diff --git a/jd_moneyTree.js b/jd_moneyTree.js index e299d6be..b2f5cc48 100644 --- a/jd_moneyTree.js +++ b/jd_moneyTree.js @@ -257,6 +257,12 @@ 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 + } + } if (fruitTotal > 380) { request('sell', params).then((sellRes) => { console.log(`卖出金果结果:${JSON.stringify(sellRes)}\n`)