From 88f58a0a5bba67db6bac4559b4dd8c7cc56c5ead Mon Sep 17 00:00:00 2001 From: layne Date: Mon, 23 Nov 2020 11:04:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=91=87=E9=92=B1=E6=A0=91=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=98=AF=E5=90=A6=E5=8D=96=E5=87=BA=E9=87=91?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- githubAction.md | 2 +- jd_moneyTree.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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`)