From 13b6b75a5910fd0059d0c5d3db331010516292d4 Mon Sep 17 00:00:00 2001 From: KingRan Date: Tue, 1 Mar 2022 12:34:08 +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_opencardL86.js | 6 +++++- jd_opencardL87.js | 5 +++++ jd_opencardL88.js | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/jd_opencardL86.js b/jd_opencardL86.js index f2e3cd8..d9c1684 100644 --- a/jd_opencardL86.js +++ b/jd_opencardL86.js @@ -132,8 +132,11 @@ async function run() { if(o.status == 0){ flag = true $.joinVenderId = o.venderId - await $.wait(parseInt(Math.random() * 3000 + 3000, 10)) await joinShop() + if($.joinShopresmessage === '活动太火爆,请稍后再试'){ + console.log('重新开卡') + await joinShop() + } await $.wait(parseInt(Math.random() * 1000 + 1000, 10)) await takePostRequest('activityContent'); await takePostRequest('drawContent'); @@ -718,6 +721,7 @@ function joinShop() { if(typeof res == 'object'){ if(res.success === true){ console.log(res.message) + $.joinShopresmessage = res.message if(res.result && res.result.giftInfo){ for(let i of res.result.giftInfo.giftList){ console.log(`入会获得:${i.discountString}${i.prizeName}${i.secondLineDesc}`) diff --git a/jd_opencardL87.js b/jd_opencardL87.js index cb4926d..d72058d 100644 --- a/jd_opencardL87.js +++ b/jd_opencardL87.js @@ -137,6 +137,10 @@ async function run() { flag = true $.joinVenderId = o.value await joinShop() + if($.joinShopresmessage === '活动太火爆,请稍后再试'){ + console.log('重新开卡') + await joinShop() + } await $.wait(parseInt(Math.random() * 2000 + 3000, 10)) await takePostRequest('drawContent'); await takePostRequest('checkOpenCard'); @@ -630,6 +634,7 @@ function joinShop() { if(typeof res == 'object'){ if(res.success === true){ console.log(res.message) + $.joinShopresmessage = res.message if(res.result && res.result.giftInfo){ for(let i of res.result.giftInfo.giftList){ console.log(`入会获得:${i.discountString}${i.prizeName}${i.secondLineDesc}`) diff --git a/jd_opencardL88.js b/jd_opencardL88.js index b70d92e..0ee33aa 100644 --- a/jd_opencardL88.js +++ b/jd_opencardL88.js @@ -127,6 +127,10 @@ async function run() { flag = true $.joinVenderId = o.venderId await joinShop() + if($.joinShopresmessage === '活动太火爆,请稍后再试'){ + console.log('重新开卡') + await joinShop() + } await $.wait(parseInt(Math.random() * 2000 + 2000, 10)) await takePostRequest('activityContent'); await takePostRequest('drawContent'); @@ -716,6 +720,7 @@ function joinShop() { if(typeof res == 'object'){ if(res.success === true){ console.log(res.message) + $.joinShopresmessage = res.message if(res.result && res.result.giftInfo){ for(let i of res.result.giftInfo.giftList){ console.log(`入会获得:${i.discountString}${i.prizeName}${i.secondLineDesc}`)