mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-04-29 14:28:45 +08:00
Update jd_ppdt.js
This commit is contained in:
parent
932dc834e5
commit
508e439669
56
jd_ppdt.js
56
jd_ppdt.js
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
18 10 * * * jd_ppdt.js
|
18 10,18 * * * jd_ppdt.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const $ = new Env('超级品牌殿堂');
|
const $ = new Env('超级品牌殿堂');
|
||||||
@ -42,10 +42,13 @@ if ($.isNode()) {
|
|||||||
await xxx1();
|
await xxx1();
|
||||||
await $.wait(500);
|
await $.wait(500);
|
||||||
await xxx2();
|
await xxx2();
|
||||||
|
await $.wait(500);
|
||||||
|
await xxx4();
|
||||||
await $.wait(500);
|
await $.wait(500);
|
||||||
await xxx3();
|
await xxx3();
|
||||||
await $.wait(2000);
|
await $.wait(2000);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})()
|
})()
|
||||||
@ -59,7 +62,7 @@ if ($.isNode()) {
|
|||||||
|
|
||||||
async function xxx1() {
|
async function xxx1() {
|
||||||
let opt = {
|
let opt = {
|
||||||
url: `https://api.m.jd.com/?client=wh5&appid=ProductZ4Brand&functionId=superBrandDoTask&t=1673695255269&body=%7B%22source%22:%22hall_1111%22,%22activityId%22:1012333,%22completionFlag%22:1,%22encryptProjectId%22:%222aZfauURe2aNSkpWhRgJYi2SgSJc%22,%22encryptAssignmentId%22:%223rC2Bx2wGCSD68Vdw8cRKqcT3ECy%22,%22assignmentType%22:0,%22actionType%22:0%7D`,
|
url: `https://api.m.jd.com/api?functionId=superBrandDoTask&appid=ProductZ4Brand&client=wh5&t=1673920844611&body=%7B%22source%22%3A%22hall_1111%22%2C%22activityId%22%3A1012333%2C%22encryptProjectId%22%3A%222aZfauURe2aNSkpWhRgJYi2SgSJc%22%2C%22completionFlag%22%3A1%2C%22encryptAssignmentId%22%3A%223rC2Bx2wGCSD68Vdw8cRKqcT3ECy%22%2C%22assignmentType%22%3A0%2C%22actionType%22%3A0%7D`,
|
||||||
headers: {
|
headers: {
|
||||||
'Origin': 'https://prodev.m.jd.com',
|
'Origin': 'https://prodev.m.jd.com',
|
||||||
'User-Agent': $.UA,
|
'User-Agent': $.UA,
|
||||||
@ -102,7 +105,51 @@ async function xxx1() {
|
|||||||
}
|
}
|
||||||
async function xxx2() {
|
async function xxx2() {
|
||||||
let opt = {
|
let opt = {
|
||||||
url: `https://api.m.jd.com/?client=wh5&appid=ProductZ4Brand&functionId=superBrandDoTask&t=1673695266809&body=%7B%22source%22:%22hall_1111%22,%22activityId%22:1012333,%22completionFlag%22:1,%22encryptProjectId%22:%222aZfauURe2aNSkpWhRgJYi2SgSJc%22,%22encryptAssignmentId%22:%223S59eXDjPwQAH4QbUkFjJg4KztmC%22,%22assignmentType%22:0,%22actionType%22:0%7D`,
|
url: `https://api.m.jd.com/api?functionId=superBrandDoTask&appid=ProductZ4Brand&client=wh5&t=1673920844810&body=%7B%22source%22%3A%22hall_1111%22%2C%22activityId%22%3A1012333%2C%22encryptProjectId%22%3A%222aZfauURe2aNSkpWhRgJYi2SgSJc%22%2C%22completionFlag%22%3A1%2C%22encryptAssignmentId%22%3A%223S59eXDjPwQAH4QbUkFjJg4KztmC%22%2C%22assignmentType%22%3A0%2C%22actionType%22%3A0%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) {
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async function xxx4() {
|
||||||
|
let opt = {
|
||||||
|
url: `https://api.m.jd.com/api?functionId=superBrandDoTask&appid=ProductZ4Brand&client=wh5&t=1673920844963&body=%7B%22source%22%3A%22hall_1111%22%2C%22activityId%22%3A1012333%2C%22encryptProjectId%22%3A%222aZfauURe2aNSkpWhRgJYi2SgSJc%22%2C%22completionFlag%22%3A1%2C%22encryptAssignmentId%22%3A%2231EmJRrCLjTuCVq9caCNfgKKhomF%22%2C%22assignmentType%22%3A0%2C%22actionType%22%3A0%7D`,
|
||||||
headers: {
|
headers: {
|
||||||
'Origin': 'https://prodev.m.jd.com',
|
'Origin': 'https://prodev.m.jd.com',
|
||||||
'User-Agent': $.UA,
|
'User-Agent': $.UA,
|
||||||
@ -146,7 +193,7 @@ async function xxx2() {
|
|||||||
|
|
||||||
async function xxx3() {
|
async function xxx3() {
|
||||||
let opt = {
|
let opt = {
|
||||||
url: `https://api.m.jd.com/?client=wh5&appid=ProductZ4Brand&functionId=superBrandDoTask&t=1673746202042&body=%7B%22source%22:%22hall_1111%22,%22activityId%22:1012353,%22completionFlag%22:1,%22encryptProjectId%22:%22mCqqcvGW1LKeAWqJtc6NwHGXK2u%22,%22encryptAssignmentId%22:%22H8VttZkAwM83dpETucHznqaNGAc%22,%22assignmentType%22:0,%22actionType%22:0%7D`,
|
url: `https://api.m.jd.com/api?functionId=superBrandDoTask&appid=ProductZ4Brand&client=wh5&t=1673920845164&body=%7B%22source%22%3A%22hall_1111%22%2C%22activityId%22%3A%221012353%22%2C%22encryptProjectId%22%3A%22mCqqcvGW1LKeAWqJtc6NwHGXK2u%22%2C%22completionFlag%22%3A1%2C%22encryptAssignmentId%22%3A%22H8VttZkAwM83dpETucHznqaNGAc%22%2C%22assignmentType%22%3A0%2C%22actionType%22%3A0%7D`,
|
||||||
headers: {
|
headers: {
|
||||||
'Origin': 'https://prodev.m.jd.com',
|
'Origin': 'https://prodev.m.jd.com',
|
||||||
'User-Agent': $.UA,
|
'User-Agent': $.UA,
|
||||||
@ -187,6 +234,7 @@ async function xxx3() {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function TotalBean() {
|
function TotalBean() {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
const options = {
|
const options = {
|
||||||
|
Loading…
Reference in New Issue
Block a user