From d277079619337f3cbefd86110ce3b89f5683a539 Mon Sep 17 00:00:00 2001 From: lxk0301 <778732665@qq.com> Date: Fri, 23 Apr 2021 17:50:25 +0800 Subject: [PATCH] update --- jd_kd.js | 2 +- jd_market_lottery.js | 4 +++- jd_moneyTree.js | 2 +- jd_plantBean.js | 4 ++-- lxk0301.boxjs.json | 4 ++-- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/jd_kd.js b/jd_kd.js index 4e800e14..1b3f9390 100644 --- a/jd_kd.js +++ b/jd_kd.js @@ -97,7 +97,7 @@ function userSignIn() { } else if (data.code === -1) { console.log(`今日已签到`) - message += `【签到】失败,今日已签到`; + // message += `【签到】失败,今日已签到`; } else { console.log(`异常:${JSON.stringify(data)}`) } diff --git a/jd_market_lottery.js b/jd_market_lottery.js index cf029b41..31c41fd4 100644 --- a/jd_market_lottery.js +++ b/jd_market_lottery.js @@ -69,7 +69,7 @@ const JD_API_HOST = "https://api.m.jd.com/client.action"; }); function showMsg() { return new Promise(async resolve => { - $.msg($.name, '', allMsg); + if (allMsg) $.msg($.name, '', allMsg); resolve(); }) } @@ -106,6 +106,8 @@ async function getInfo(url) { if(lotteryScore<=userScore) { console.log(`抽奖需要${lotteryScore},当前${userScore}分,去抽奖`) await doLottery("a84f9428da0bb36a6a11884c54300582") + } else { + console.log(`当前积分已不足去抽奖`) } } }catch (e) { diff --git a/jd_moneyTree.js b/jd_moneyTree.js index 3fd3c73e..b215531d 100644 --- a/jd_moneyTree.js +++ b/jd_moneyTree.js @@ -37,7 +37,7 @@ if ($.isNode()) { } let jdNotify = false;//是否开启静默运行,默认false开启 -let sellFruit = true;//是否卖出金果得到金币,默认'false'不卖 +let sellFruit = true;//是否卖出金果得到金币,默认'true'卖金果 const JD_API_HOST = 'https://ms.jr.jd.com/gw/generic/uc/h5/m'; let userInfo = null, taskInfo = [], message = '', subTitle = '', fruitTotal = 0; !(async () => { diff --git a/jd_plantBean.js b/jd_plantBean.js index 4d04d659..c9a3fa75 100644 --- a/jd_plantBean.js +++ b/jd_plantBean.js @@ -171,8 +171,8 @@ async function doCultureBean() { async function stealFriendWater() { await stealFriendList(); if ($.stealFriendList && $.stealFriendList.code === '0') { - if ($.stealFriendList.data.tips) { - console.log('偷取好友营养液今日已达上限'); + if ($.stealFriendList.data && $.stealFriendList.data.tips) { + console.log('\n\n今日偷取好友营养液已达上限\n\n'); return } if ($.stealFriendList.data && $.stealFriendList.data.friendInfoList && $.stealFriendList.data.friendInfoList.length > 0) { diff --git a/lxk0301.boxjs.json b/lxk0301.boxjs.json index 52439627..e097057c 100644 --- a/lxk0301.boxjs.json +++ b/lxk0301.boxjs.json @@ -406,9 +406,9 @@ { "id": "MONEY_TREE_SELL_FRUIT", "name": "是否卖出金果获得金币", - "val": false, + "val": true, "type": "boolean", - "desc": "是否卖出金果获得金币,金币具有有效期,默认不卖出" + "desc": "是否卖出金果获得金币,金币具有有效期,默认卖出" } ], "author": "@lxk0301",