From 6423fe38c69a11121e6793ce545427e98e9b139e Mon Sep 17 00:00:00 2001 From: lxk0301 <778732665@qq.com> Date: Wed, 23 Dec 2020 17:35:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=89=A9=E4=BD=99?= =?UTF-8?q?=E8=A7=82=E7=9C=8B=E8=A7=86=E9=A2=91=E6=AC=A1=E6=95=B0=20?= =?UTF-8?q?=E4=B8=BA0=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C=20?= =?UTF-8?q?=E8=BF=98=E7=BB=A7=E7=BB=AD=E7=AD=89=E5=BE=8530=E7=A7=92?= =?UTF-8?q?=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_crazy_joy_coin.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jd_crazy_joy_coin.js b/jd_crazy_joy_coin.js index 4e73455..4c85ab7 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); + } } } }