mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-17 16:10:43 +08:00
Create jd_task_quanyi.js
This commit is contained in:
parent
9e6f92a42c
commit
68fc78376d
56
parse/jd/jd_task_quanyi.js
Normal file
56
parse/jd/jd_task_quanyi.js
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
import {Template} from '../../template.js'
|
||||||
|
|
||||||
|
export class Main extends Template {
|
||||||
|
constructor() {
|
||||||
|
super()
|
||||||
|
this.profile = {
|
||||||
|
title: '京东权益中心',
|
||||||
|
crontab: 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async prepare() {
|
||||||
|
}
|
||||||
|
|
||||||
|
async main(p) {
|
||||||
|
let user = p.data.user;
|
||||||
|
let context = p.context;
|
||||||
|
let sign = await this.curl({
|
||||||
|
'form': `appid=plus_business&body={"baseVersion":"2.0.0","scene":"signBlindDaily","gcLat":"0.000000","gcLng":"0.000000"}&functionId=bff_rights_center_index_sign`,
|
||||||
|
user,
|
||||||
|
algo: {
|
||||||
|
appId: 'b63ff',
|
||||||
|
expire: {code: 'F10002'}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (this.haskey(sign, 'code', '1711000')) {
|
||||||
|
p.info.work = true
|
||||||
|
p.log("签到成功")
|
||||||
|
let index = await this.curl({
|
||||||
|
'form': `appid=plus_business&body={"baseVersion":"2.0.0","modelVersion":"2.0.0","queryTypes":"SIGN_DAILY","scene":"index","otherApis":[{"api":"balance_abTest_v3","businessParam":{"procudtAndExpResultList":"[{\\"productLine\\":\\"WJQYZX\\",\\"expIdWithDefautExpLabel\\":{\\"WJQYZX_78369\\":\\"base\\"}}]"}}]}&functionId=bff_rights_center_index`,
|
||||||
|
user,
|
||||||
|
algo: {
|
||||||
|
appId: '1ff7a'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
for (let i of this.haskey(index, 'rs.SIGN.signRewards')) {
|
||||||
|
if (i.type == 0) {
|
||||||
|
p.award(i.value, 'redpacket')
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
p.log(i.title)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this.haskey(sign, 'code', '1711002')) {
|
||||||
|
p.log("今天已完成签到哦")
|
||||||
|
p.info.work = true
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
p.log(sign)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user