From b834ec70ad6de11b36d2df5e3f08bf540d301a0f Mon Sep 17 00:00:00 2001 From: KingRan Date: Tue, 15 Mar 2022 01:10:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_opencard96.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/jd_opencard96.js b/jd_opencard96.js index b8002ff..9997651 100644 --- a/jd_opencard96.js +++ b/jd_opencard96.js @@ -138,12 +138,22 @@ async function run() { $.joinVenderId = 1000410747 await joinShop() if($.errorJoinShop.indexOf('活动太火爆,请稍后再试') > -1){ - console.log('重新开卡') + console.log('第1次 重新开卡') await $.wait(parseInt(Math.random() * 2000 + 3000, 10)) await joinShop() } if($.errorJoinShop.indexOf('活动太火爆,请稍后再试') > -1){ - console.log("开卡失败❌") + console.log('第2次 重新开卡') + await $.wait(parseInt(Math.random() * 2000 + 4000, 10)) + await joinShop() + } + if($.errorJoinShop.indexOf('活动太火爆,请稍后再试') > -1){ + console.log('第3次 重新开卡') + await $.wait(parseInt(Math.random() * 2000 + 4000, 10)) + await joinShop() + } + if($.errorJoinShop.indexOf('活动太火爆,请稍后再试') > -1){ + console.log("开卡失败❌ ,重新执行脚本") } await takePostRequest('activityContent'); }