diff --git a/jd_crazy_joy_coin.js b/jd_crazy_joy_coin.js index 4e73455b..4c85ab71 100644 --- a/jd_crazy_joy_coin.js +++ b/jd_crazy_joy_coin.js @@ -447,9 +447,11 @@ function openBox(eventType = 'LUCKY_BOX_DROP', boxId) { if (safeGet(data)) { data = JSON.parse(data); if (data['success']) { - $.log(`点击幸运盒子成功,剩余观看视频次数:${data.data.advertViewTimes},等待30秒`) - await $.wait(30000) - await rewardBox(eventType, boxId) + $.log(`点击幸运盒子成功,剩余观看视频次数:${data.data.advertViewTimes}, ${data.data.advertViewTimes > 0 ? '等待30秒' : '跳出'}`) + if (data.data.advertViewTimes > 0) { + await $.wait(30000) + await rewardBox(eventType, boxId); + } } } }