From c841131bd735ef496c868deffcb5f023a305cbb0 Mon Sep 17 00:00:00 2001 From: star <869728223@qq.com> Date: Wed, 26 May 2021 16:21:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8A=BD=E5=A5=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E6=9C=AA=E5=BC=80=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_zoo.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/jd_zoo.js b/jd_zoo.js index 6b36e103..83ba13b9 100644 --- a/jd_zoo.js +++ b/jd_zoo.js @@ -252,6 +252,21 @@ async function zoo() { } } } + // await $.wait(1000); + // let boxLotteryNum = $.shopResult.boxLotteryNum; + // for (let j = 0; j < boxLotteryNum; j++) { + // console.log(`开始第${j+1}次拆盒`) + // //抽奖 + // await takePostRequest('zoo_boxShopLottery'); + // await $.wait(3000); + // } + // let wishLotteryNum = $.shopResult.wishLotteryNum; + // for (let j = 0; j < wishLotteryNum; j++) { + // console.log(`开始第${j+1}次能量抽奖`) + // //抽奖 + // await takePostRequest('zoo_wishShopLottery'); + // await $.wait(3000); + // } await $.wait(3000); } } @@ -420,6 +435,14 @@ async function takePostRequest(type) { body = `functionId=qryCompositeMaterials&body={"qryParam":"[{\\"type\\":\\"advertGroup\\",\\"mapTo\\":\\"resultData\\",\\"id\\":\\"05371960\\"}]","activityId":"2s7hhSTbhMgxpGoa9JDnbDzJTaBB","pageId":"","reqSrc":"","applyKey":"jd_star"}&client=wh5&clientVersion=1.0.0`; myRequest = await getPostRequest(`qryCompositeMaterials`,body); break; + case 'zoo_boxShopLottery': + body = `functionId=zoo_boxShopLottery&body={"shopSign":"${$.shopSign}"}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_boxShopLottery`,body); + break; + case `zoo_wishShopLottery`: + body = `functionId=zoo_wishShopLottery&body={"shopSign":"${$.shopSign}"}&client=wh5&clientVersion=1.0.0`; + myRequest = await getPostRequest(`zoo_boxShopLottery`,body); + break; default: console.log(`错误${type}`); } @@ -573,6 +596,12 @@ async function dealReturn(type, data) { console.log(`获取到${$.shopInfoList.length}个店铺`); } break + case 'zoo_boxShopLottery': + console.log(JSON.stringify(data)); + break + case 'zoo_wishShopLottery': + console.log(JSON.stringify(data)); + break default: console.log(`未判断的异常${type}`); }