修复$.allFriends为undefined时,导致脚本出错

This commit is contained in:
lxk0301
2021-02-22 09:43:24 +08:00
parent bf5efe7690
commit adf5786adb

View File

@@ -139,7 +139,7 @@ async function jdJoySteal() {
console.log(`偷好友积分 开始查询第${i}页好友\n`);
await getFriends(i);
$.allFriends = $.getFriendsData.datas;
await stealFriendCoinFun();
if ($.allFriends) await stealFriendCoinFun();
}
for (let i = 1; i <= new Array(lastPage).fill('').length; i++) {
if ($.stealStatus === 'chance_full') {
@@ -168,7 +168,7 @@ async function jdJoySteal() {
console.log(`偷好友狗粮 开始查询第${i}页好友\n`);
await getFriends(i);
$.allFriends = $.getFriendsData.datas;
await stealFriendsFood();
if ($.allFriends) await stealFriendsFood();
}
for (let i = 1; i <= new Array(lastPage).fill('').length; i++) {
if ($.help_feed >= 200 || ($.helpFeedStatus && $.helpFeedStatus === 'chance_full')) {
@@ -188,7 +188,7 @@ async function jdJoySteal() {
console.log(`帮好友喂食 开始查询第${i}页好友\n`);
await getFriends(i);
$.allFriends = $.getFriendsData.datas;
await helpFriendsFeed();
if ($.allFriends) await helpFriendsFeed();
}
}
} else {