Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Faker authored and Faker committed Apr 10, 2023
1 parent 96da966 commit b9b5965
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 36 deletions.
6 changes: 1 addition & 5 deletions jd_cjhy_completeInfoActivity.js

Large diffs are not rendered by default.

39 changes: 18 additions & 21 deletions jd_dpsign.js

Large diffs are not rendered by default.

21 changes: 11 additions & 10 deletions jd_twcyz.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,23 @@ async function main() {
console.log(`获取活动详情成功`);
$.activityId = $.activityInfo.activityBaseInfo.activityId;
$.activityName = $.activityInfo.activityBaseInfo.activityName;
$.callNumber = $.activityInfo.activityUserInfo.userStarNum;
console.log(`当前活动:${$.activityName},ID:${$.activityId},可抽奖次数:${Math.floor($.callNumber / 200)}`);
$.drawstartnum = $.activityInfo.activityBaseInfo.drawStarNum;
console.log(`当前活动:${$.activityName},ID:${$.activityId},抽奖限制${$.activityInfo.activityBaseInfo.drawLimit}`);
$.encryptProjectId = $.activityInfo.activityBaseInfo.encryptProjectId;
useInfo[$.UserName] = $.encryptProjectId;
await $.wait(1000);
$.taskList = [];
await takeRequest('superBrandTaskList');
await $.wait(1000);
await doTask();
if ($.runFlag) {
await takeRequest('superBrandSecondFloorMainPage');
$.callNumber = $.activityInfo.activityUserInfo.userStarNum;
console.log(`可抽奖次数:${Math.floor($.callNumber / 200)}`);
}
console.log(`\n开始抽奖:`);
for (let i = 0; i < 13; i++) {
//if ($.runFlag) {
await $.wait(200);
await takeRequest('superBrandSecondFloorMainPage');
$.callNumber = $.activityInfo.activityUserInfo.userStarNum;
$.drawtimes = Math.floor($.callNumber / $.drawstartnum);
//}
console.log(`\n可抽奖${$.drawtimes}次,开始...`);
for (let i = 0; i < $.drawtimes; i++) {
//console.log(`进行第${i + 1}抽奖:`);;
await takeRequest('superBrandTaskLottery');//抽奖
await $.wait(1000);
Expand Down Expand Up @@ -180,7 +181,7 @@ async function takeRequest(type) {
url = `https://api.m.jd.com/?uuid=&client=wh5&appid=ProductZ4Brand&functionId=showSecondFloorRunInfo&t=1680485439158&body=%7B%22source%22:%22run%22%7D`;
break;
case 'superBrandTaskList':
url = `https://api.m.jd.com/?uuid=&client=wh5&appid=ProductZ4Brand&functionId=superBrandTaskList&t=1680485439481&body=%7B%22source%22:%22run%22,%22activityId%22:1013398,%22assistInfoFlag%22:1%7D`;
url = `https://api.m.jd.com/?uuid=&client=wh5&appid=ProductZ4Brand&functionId=superBrandTaskList&t=1680485439481&body=%7B%22source%22:%22run%22,%22activityId%22:${$.activityId},%22assistInfoFlag%22:1%7D`;
break;
case 'superBrandDoTask':
if ($.runInfo.itemId === null) {
Expand Down

0 comments on commit b9b5965

Please sign in to comment.