修复 剩余观看视频次数 为0的情况下, 还继续等待30秒的Bug

This commit is contained in:
lxk0301
2020-12-23 17:35:09 +08:00
parent 474e5619a5
commit 8408ff4430

View File

@@ -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秒`)
$.log(`点击幸运盒子成功,剩余观看视频次数:${data.data.advertViewTimes}, ${data.data.advertViewTimes > 0 ? '等待30秒' : '跳出'}`)
if (data.data.advertViewTimes > 0) {
await $.wait(30000)
await rewardBox(eventType, boxId)
await rewardBox(eventType, boxId);
}
}
}
}