mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-20 09:42:48 +08:00
Compare commits
No commits in common. "655c3eda919edc3ea4ef0c7c89e1e10a69421adc" and "4bcfbccfabae07fcc623b2089dbcb5ea1947c178" have entirely different histories.
655c3eda91
...
4bcfbccfab
@ -131,7 +131,7 @@ export class Main extends Template {
|
|||||||
}
|
}
|
||||||
else if (helpResult == 2) {
|
else if (helpResult == 2) {
|
||||||
p.log("活动火爆...")
|
p.log("活动火爆...")
|
||||||
p.info.complete = true
|
p.info.jump = true
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
p.log("助力错误...")
|
p.log("助力错误...")
|
||||||
|
|||||||
@ -1,50 +0,0 @@
|
|||||||
import {Template} from '../../template.js'
|
|
||||||
|
|
||||||
export class Main extends Template {
|
|
||||||
constructor() {
|
|
||||||
super()
|
|
||||||
this.profile = {
|
|
||||||
title: '京东摇一摇',
|
|
||||||
prompt: {
|
|
||||||
linkId: '活动linkId'
|
|
||||||
},
|
|
||||||
sync: 1,
|
|
||||||
verify: 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async prepare() {
|
|
||||||
await this.field('linkId')
|
|
||||||
}
|
|
||||||
|
|
||||||
async main(p) {
|
|
||||||
let user = p.data.user;
|
|
||||||
let context = p.context;
|
|
||||||
for (let i = 0; i<20; i++) {
|
|
||||||
let s = await this.curl({
|
|
||||||
'url': `https://api.m.jd.com/?functionId=superRedBagDraw&body={"linkId":"${context.linkId}"}&appid=activities_platform`,
|
|
||||||
user,
|
|
||||||
algo: {
|
|
||||||
'appId': '6e8d7',
|
|
||||||
expire: {
|
|
||||||
'data.isLogin': false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
if (this.haskey(s, 'data.prizeDrawVo')) {
|
|
||||||
p.log(`抽奖获得: ${s.data.prizeDrawVo.prizeDesc} ${s.data.prizeDrawVo.amount}`)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (this.haskey(s, 'code', 20005)) {
|
|
||||||
p.context.jump = true
|
|
||||||
this.log("场次已过期");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
p.log('什么也没有')
|
|
||||||
}
|
|
||||||
await this.wait(1000)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user