Update jd_task_daka.js

This commit is contained in:
可达鸭 2025-03-06 13:56:29 +08:00
parent b705139f16
commit 1874f77bd5

View File

@ -8,33 +8,34 @@ export class Main extends Template {
verify: 1, verify: 1,
help: 'main', help: 'main',
interval: 1000, interval: 1000,
crontab: 4 crontab: 4,
sync: 1
} }
} }
async prepare() { async prepare() {
let c = 0 // let c = 0
for (let user of this.help) { // for (let user of this.help) {
let home = await this.curl({ // let home = await this.curl({
'url': `https://api.m.jd.com/?functionId=interact_game_home&_=1740844418368`, // 'url': `https://api.m.jd.com/?functionId=interact_game_home&_=1740844418368`,
'form': `appid=activities_platform&loginType=2&loginWQBiz=&functionId=interact_game_home&body={}`, // 'form': `appid=activities_platform&loginType=2&loginWQBiz=&functionId=interact_game_home&body={}`,
user // user
} // }
) // )
for (let i of this.haskey(home, 'data.assetInfos.bannerInfos')) { // for (let i of this.haskey(home, 'data.assetInfos.bannerInfos')) {
if (i.functionId == 'beanSign') { // if (i.functionId == 'beanSign') {
c++ // c++
this.shareCode({ // this.shareCode({
assignmentId: i.assignmentId, // assignmentId: i.assignmentId,
itemId: i.itemId // itemId: i.itemId
}) // })
} // }
} // }
if (c) { // if (c) {
break // break
} // }
await this.wait(2000) // await this.wait(2000)
} // }
} }
async main(p) { async main(p) {