mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-16 15:40:42 +08:00
parent
8b5738cd3f
commit
2af4b002a7
@ -57,33 +57,6 @@ export class Main extends Template {
|
|||||||
async main(p) {
|
async main(p) {
|
||||||
let user = p.data.user;
|
let user = p.data.user;
|
||||||
let context = p.context;
|
let context = p.context;
|
||||||
if (!context.continuePrizeRuleList) {
|
|
||||||
let sign = await this.curl({
|
|
||||||
'url': `https://api.m.jd.com`,
|
|
||||||
form: `appid=interCenter_shopSign&loginType=2&functionId=interact_center_shopSign_signCollectGift&body={"token":"${context.token}","venderId":${context.venderId},"activityId":${context.activityId},"type":56,"actionType":7}`,
|
|
||||||
user,
|
|
||||||
algo: {
|
|
||||||
appId: '4da33',
|
|
||||||
version: 'latest',
|
|
||||||
status: true
|
|
||||||
},
|
|
||||||
})
|
|
||||||
if (this.haskey(sign, 'code', 402)) {
|
|
||||||
p.log('当前不存在有效的活动')
|
|
||||||
p.context.jump = true
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.haskey(sign, 'code', [403030023, 200])) {
|
|
||||||
p.info.work = true
|
|
||||||
if (sign.success) {
|
|
||||||
p.log(`签到: ${days + 1}天`, context.token, context.shopName)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
p.log(sign.msg)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
let s = await this.curl({
|
let s = await this.curl({
|
||||||
'url': `https://api.m.jd.com/api?appid=interCenter_shopSign&loginType=2&functionId=interact_center_shopSign_getSignRecord&body={"token":"${context.token}","venderId":${context.venderId},"activityId":${context.activityId},"type":56,"actionType":7}&jsonp=jsonp1004`,
|
'url': `https://api.m.jd.com/api?appid=interCenter_shopSign&loginType=2&functionId=interact_center_shopSign_getSignRecord&body={"token":"${context.token}","venderId":${context.venderId},"activityId":${context.activityId},"type":56,"actionType":7}&jsonp=jsonp1004`,
|
||||||
user,
|
user,
|
||||||
@ -134,5 +107,4 @@ export class Main extends Template {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user