This commit is contained in:
lxk0301
2021-04-23 17:50:25 +08:00
parent 2e3d5c10b5
commit d277079619
5 changed files with 9 additions and 7 deletions

View File

@ -97,7 +97,7 @@ function userSignIn() {
} else if (data.code === -1) { } else if (data.code === -1) {
console.log(`今日已签到`) console.log(`今日已签到`)
message += `【签到】失败,今日已签到`; // message += `【签到】失败,今日已签到`;
} else { } else {
console.log(`异常:${JSON.stringify(data)}`) console.log(`异常:${JSON.stringify(data)}`)
} }

View File

@ -69,7 +69,7 @@ const JD_API_HOST = "https://api.m.jd.com/client.action";
}); });
function showMsg() { function showMsg() {
return new Promise(async resolve => { return new Promise(async resolve => {
$.msg($.name, '', allMsg); if (allMsg) $.msg($.name, '', allMsg);
resolve(); resolve();
}) })
} }
@ -106,6 +106,8 @@ async function getInfo(url) {
if(lotteryScore<=userScore) { if(lotteryScore<=userScore) {
console.log(`抽奖需要${lotteryScore},当前${userScore}分,去抽奖`) console.log(`抽奖需要${lotteryScore},当前${userScore}分,去抽奖`)
await doLottery("a84f9428da0bb36a6a11884c54300582") await doLottery("a84f9428da0bb36a6a11884c54300582")
} else {
console.log(`当前积分已不足去抽奖`)
} }
} }
}catch (e) { }catch (e) {

View File

@ -37,7 +37,7 @@ if ($.isNode()) {
} }
let jdNotify = false;//是否开启静默运行默认false开启 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'; const JD_API_HOST = 'https://ms.jr.jd.com/gw/generic/uc/h5/m';
let userInfo = null, taskInfo = [], message = '', subTitle = '', fruitTotal = 0; let userInfo = null, taskInfo = [], message = '', subTitle = '', fruitTotal = 0;
!(async () => { !(async () => {

View File

@ -171,8 +171,8 @@ async function doCultureBean() {
async function stealFriendWater() { async function stealFriendWater() {
await stealFriendList(); await stealFriendList();
if ($.stealFriendList && $.stealFriendList.code === '0') { if ($.stealFriendList && $.stealFriendList.code === '0') {
if ($.stealFriendList.data.tips) { if ($.stealFriendList.data && $.stealFriendList.data.tips) {
console.log('偷取好友营养液今日已达上限'); console.log('\n\n今日偷取好友营养液已达上限\n\n');
return return
} }
if ($.stealFriendList.data && $.stealFriendList.data.friendInfoList && $.stealFriendList.data.friendInfoList.length > 0) { if ($.stealFriendList.data && $.stealFriendList.data.friendInfoList && $.stealFriendList.data.friendInfoList.length > 0) {

View File

@ -406,9 +406,9 @@
{ {
"id": "MONEY_TREE_SELL_FRUIT", "id": "MONEY_TREE_SELL_FRUIT",
"name": "是否卖出金果获得金币", "name": "是否卖出金果获得金币",
"val": false, "val": true,
"type": "boolean", "type": "boolean",
"desc": "是否卖出金果获得金币,金币具有有效期,默认卖出" "desc": "是否卖出金果获得金币,金币具有有效期,默认卖出"
} }
], ],
"author": "@lxk0301", "author": "@lxk0301",