Update jd_task_drainage.js

This commit is contained in:
可达鸭 2025-02-16 15:47:00 +08:00
parent a5c1bc5389
commit ae2dce6630

View File

@ -58,27 +58,22 @@ export class Main extends Template {
}, },
} }
) )
let subCode = this.haskey(rights, 'subCode') let sign = await this.curl({
if (this.haskey(rights, 'data.rights')) { 'url': `https://api.m.jd.com/mini_doSign?g_ty=ls&g_tk=1084416199`,
p.info.work = true 'form': `appid=hot_channel&body={"itemId":"1"}&client=apple&clientVersion=10.14.110&functionId=mini_doSign`,
for (let i of this.haskey(rights, 'data.rights')) { algo: {appId: '60d61'},
if (i.rewardType == 1) { user
p.msg(`红包: ${i.discount}`)
}
else if (i.rewardType == 3) {
p.log(`优惠券:${i.quota}-${i.discount} (${i.category})`)
}
else {
p.log(i)
}
} }
)
let subCode = this.haskey(sign, 'subCode')
if (subCode == 0) {
p.msg(sign.data.toastMsg)
} }
else if (subCode == 3010) { else if (subCode == 3010) {
p.info.work = true p.log(sign.message)
p.log(rights.message)
} }
else { else {
p.log(this.haskey(rights, 'message') || rights) p.log(this.haskey(sign, 'message') || sign)
} }
} }
} }