mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-05-07 03:48:44 +08:00
Update jd_ppdt.js
This commit is contained in:
parent
e7e71f2ebd
commit
cc30cec981
51
jd_ppdt.js
51
jd_ppdt.js
@ -29,6 +29,8 @@ if ($.isNode()) {
|
|||||||
$.index = i + 1;
|
$.index = i + 1;
|
||||||
$.isLogin = true;
|
$.isLogin = true;
|
||||||
$.nickName = '';
|
$.nickName = '';
|
||||||
|
$.ban='';
|
||||||
|
$.donep='';
|
||||||
$.UA = require('./USER_AGENTS').UARAM();
|
$.UA = require('./USER_AGENTS').UARAM();
|
||||||
//await TotalBean();
|
//await TotalBean();
|
||||||
console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`);
|
console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`);
|
||||||
@ -39,12 +41,14 @@ if ($.isNode()) {
|
|||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
await xxx8();
|
||||||
|
await $.wait(1000);
|
||||||
await xxx7();
|
await xxx7();
|
||||||
await $.wait(1000);
|
await $.wait(1000);
|
||||||
await xxx1();
|
await xxx1();
|
||||||
if ($.ban) { console.log('风控,跳出'); continue };
|
if ($.ban) { console.log('风控,跳出'); continue };
|
||||||
await $.wait(500);
|
await $.wait(500);
|
||||||
if ($.done) continue;
|
if ($.donep) continue;
|
||||||
await xxx2();
|
await xxx2();
|
||||||
await $.wait(500);
|
await $.wait(500);
|
||||||
await xxx4();
|
await xxx4();
|
||||||
@ -102,7 +106,7 @@ async function xxx1() {
|
|||||||
$.ban = true;
|
$.ban = true;
|
||||||
} else if (data.data.bizMsg.indexOf('完成') > -1) {
|
} else if (data.data.bizMsg.indexOf('完成') > -1) {
|
||||||
console.log(data.data.bizMsg);
|
console.log(data.data.bizMsg);
|
||||||
$.done = true;
|
$.donep = true;
|
||||||
} else {
|
} else {
|
||||||
console.log(data.data.bizMsg);
|
console.log(data.data.bizMsg);
|
||||||
}
|
}
|
||||||
@ -379,6 +383,49 @@ async function xxx7() {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
async function xxx8() {
|
||||||
|
let opt = {
|
||||||
|
url: `https://api.m.jd.com/?client=wh5&appid=ProductZ4Brand&functionId=superBrandDoTask&t=1674924479339&body=%7B%22source%22:%22hall_1111%22,%22activityId%22:1012483,%22completionFlag%22:1,%22encryptProjectId%22:%222ZaVyRdxyCFSSt8hwT1h1zMwcPah%22,%22encryptAssignmentId%22:%223WbhiPoeV5qrLsEC1qq8HLnHLRSS%22,%22assignmentType%22:0,%22actionType%22:0%7D`,
|
||||||
|
headers: {
|
||||||
|
'Origin': 'https://prodev.m.jd.com',
|
||||||
|
'User-Agent': $.UA,
|
||||||
|
'Cookie': cookie
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new Promise(async (resolve) => {
|
||||||
|
$.post(opt, async (err, resp, data) => {
|
||||||
|
try {
|
||||||
|
if (err) {
|
||||||
|
console.log(`${JSON.stringify(err)}`)
|
||||||
|
console.log(` API请求失败,请检查网路重试`)
|
||||||
|
} else {
|
||||||
|
data = JSON.parse(data)
|
||||||
|
if (data.code == 0) {
|
||||||
|
if (data.data.bizCode == 0) {
|
||||||
|
if (data.data?.result?.rewards.length != 0) {
|
||||||
|
if (data.data?.result?.rewards[0].awardType === 3) {
|
||||||
|
console.log(` 恭喜获得 ${data.data?.result?.rewards[0].beanNum} 京豆`);
|
||||||
|
} else {
|
||||||
|
console.log(JSON.stringify(data.data?.result?.rewards));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log(JSON.stringify(data.data?.result));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log(data.data.bizMsg);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log(data.msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
$.logErr(e, resp)
|
||||||
|
} finally {
|
||||||
|
resolve(data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
function TotalBean() {
|
function TotalBean() {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
const options = {
|
const options = {
|
||||||
|
Loading…
Reference in New Issue
Block a user