mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-15 15:10:44 +08:00
Update jd_task_healthy.js
This commit is contained in:
parent
8de14d6cd8
commit
5d168b29ed
@ -5,24 +5,32 @@ export class Main extends Template {
|
|||||||
super()
|
super()
|
||||||
this.profile = {
|
this.profile = {
|
||||||
title: '京东健康',
|
title: '京东健康',
|
||||||
crontab: 4,
|
crontab: 3,
|
||||||
round: 2
|
sync: 1,
|
||||||
|
verify: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async prepare() {
|
async prepare() {
|
||||||
for (let i of Array(2)) {
|
}
|
||||||
let kit = await this.curl({
|
|
||||||
'url': `https://api.m.jd.com/api?appid=jdh-middle&functionId=jdh_bm_getKitTask&t=1738395115758`,
|
async batch(p) {
|
||||||
'form': `body={"channel":"jdapp","groupCode":"openkits","m_patch_appKey":"231282000001","imei":"CFFGHFCF"}`,
|
p = await this.getTemp(p.pid) || p
|
||||||
cookie: this.tester()
|
if (!p.encodeId) {
|
||||||
|
for (let i of Array(2)) {
|
||||||
|
let kit = await this.curl({
|
||||||
|
'url': `https://api.m.jd.com/api?appid=jdh-middle&functionId=jdh_bm_getKitTask&t=1738395115758`,
|
||||||
|
'form': `body={"channel":"${p.channel}","groupCode":"openkits","m_patch_appKey":"${p.appKey}","imei":"CFFGHFCF"}`,
|
||||||
|
cookie: this.tester()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (this.haskey(kit, 'result.encodeId')) {
|
||||||
|
p.encodeId = kit.result.encodeId
|
||||||
|
break
|
||||||
}
|
}
|
||||||
)
|
|
||||||
if (this.haskey(kit, 'result.encodeId')) {
|
|
||||||
this.dict.encodeId = kit.result.encodeId
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return p
|
||||||
}
|
}
|
||||||
|
|
||||||
async main(p) {
|
async main(p) {
|
||||||
@ -39,61 +47,70 @@ export class Main extends Template {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.round == 0) {
|
let sign = await this.curl({
|
||||||
if (this.dict.encodeId) {
|
'url': `https://api.m.jd.com/api?appid=jdh-middle&functionId=jdh_msoa_doTaskGw&t=1738387986997`,
|
||||||
let sign = await this.curl({
|
'form': `body={"infoId":"jdhHome_task","channel":"${context.channel}","appKey":"${context.appKey}","encodeId":"${context.encodeId}","imei":"CFFGHFCF","location":{"province":"16","city":"1234","district":"1234","town":"56789"}}`,
|
||||||
'url': `https://api.m.jd.com/api?appid=jdh-middle&functionId=jdh_msoa_doTaskGw&t=1738387986997`,
|
user,
|
||||||
'form': `body={"infoId":"jdhHome_task","channel":"jdapp","appKey":"231282000001","encodeId":"${this.dict.encodeId}","imei":"CFFGHFCF","location":{"province":"16","city":"1234","district":"1234","town":"56789"}}`,
|
algo: {
|
||||||
user,
|
appId: "8c399",
|
||||||
algo: {
|
expire: {
|
||||||
appId: "8c399"
|
'result.code': -1
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)
|
|
||||||
if (this.haskey(sign, 'result.result.bizCode', 12)) {
|
|
||||||
p.log("已签到")
|
|
||||||
p.info.work = true
|
|
||||||
}
|
|
||||||
else if (this.haskey(sign, 'result.result.bizCode', 2)) {
|
|
||||||
p.info.work = true
|
|
||||||
gift.bind(this)(sign)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
p.log(sign)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
let msg = this.haskey(sign, 'result.result.msg') || ''
|
||||||
|
if (this.haskey(sign, 'result.result.bizCode', 12)) {
|
||||||
|
p.log("已签到")
|
||||||
|
p.info.work = true
|
||||||
|
}
|
||||||
|
else if (this.haskey(sign, 'result.result.bizCode', 2)) {
|
||||||
|
p.info.work = true
|
||||||
|
gift.bind(this)(sign)
|
||||||
|
}
|
||||||
|
else if (msg.includes('火爆')) {
|
||||||
|
p.info.jump = true
|
||||||
|
p.log('活动太火爆啦')
|
||||||
|
return
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let taskList = await this.curl({
|
p.log(sign)
|
||||||
'url': `https://api.m.jd.com/api?appid=jdh-middle&functionId=jdh_bm_queryTaskList&t=1738398013872`,
|
}
|
||||||
'form': `body={"activityId":"8542","appKey":"231282000001","channel":"jdapp","imei":"CFFGHFCF","location":{"province":"16","city":"1234","district":"1234","town":"45678"}}`,
|
let taskList = await this.curl({
|
||||||
user
|
'url': `https://api.m.jd.com/api?appid=jdh-middle&functionId=jdh_bm_queryTaskList&t=1738398013872`,
|
||||||
}
|
'form': `body={"activityId":"${context.activityId}","appKey":"${context.appKey}","channel":"${context.channel}","imei":"CFFGHFCF","location":{"province":"16","city":"1234","district":"1234","town":"45678"}}`,
|
||||||
)
|
user
|
||||||
for (let i of this.haskey(taskList, 'data.result')) {
|
}
|
||||||
for (let j of i.taskVoList) {
|
)
|
||||||
if (j.status == 1) {
|
for (let i of this.haskey(taskList, 'data.result')) {
|
||||||
p.log("正在运行:", i.mainTitle || i.groupName)
|
for (let j of i.taskVoList) {
|
||||||
let doTask = await this.curl({
|
if (j.status == 1) {
|
||||||
'url': `https://api.m.jd.com/api?appid=jdh-middle&functionId=jdh_msoa_doTaskGw&t=1738398013872`,
|
p.log("正在运行:", i.mainTitle || i.groupName)
|
||||||
'form': `body={"appKey":"${j.appKey}","channel":"jdapp","infoId":"jdhHome_task","encodeId":"${j.encodeId}","imei":"CFFGHFCF","location":{"province":"16","city":"1234","district":"1234","town":"45678"}}`,
|
let doTask = await this.curl({
|
||||||
user
|
'url': `https://api.m.jd.com/api?appid=jdh-middle&functionId=jdh_msoa_doTaskGw&t=1738398013872`,
|
||||||
}
|
'form': `body={"appKey":"${j.appKey}","channel":"${context.channel}","infoId":"jdhHome_task","encodeId":"${j.encodeId}","imei":"CFFGHFCF","location":{"province":"16","city":"1234","district":"1234","town":"45678"}}`,
|
||||||
)
|
user
|
||||||
await this.wait(1000)
|
|
||||||
let award = await this.curl({
|
|
||||||
'url': `https://api.m.jd.com/api?appid=jdh-middle&functionId=jdh_msoa_sendAwardGw&t=1738398403434`,
|
|
||||||
'form': `body={"appKey":"${j.appKey}","channel":"jdapp","infoId":"jdhHome_task","activityId":${j.activityId},"queryToken":"${j.encodeId}","taskId":${j.id},"imei":"CFFGHFCF","location":{"province":"16","city":"1234","district":"1234","town":"45678"}}`,
|
|
||||||
user,
|
|
||||||
algo: {
|
|
||||||
appId: '8c399'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
try {
|
|
||||||
gift.bind(this)(award)
|
|
||||||
} catch (e) {
|
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
await this.wait(1000)
|
||||||
|
let award = await this.curl({
|
||||||
|
'url': `https://api.m.jd.com/api?appid=jdh-middle&functionId=jdh_msoa_sendAwardGw&t=1738398403434`,
|
||||||
|
'form': `body={"appKey":"${j.appKey}","channel":"${context.channel}","infoId":"jdhHome_task","activityId":${j.activityId},"queryToken":"${j.encodeId}","taskId":${j.id},"imei":"CFFGHFCF","location":{"province":"16","city":"1234","district":"1234","town":"45678"}}`,
|
||||||
|
user,
|
||||||
|
algo: {
|
||||||
|
appId: '8c399'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
let msg = this.haskey(award, 'result.message')
|
||||||
|
if (msg.includes('火爆')) {
|
||||||
|
p.info.jump = true
|
||||||
|
p.log("活动太火爆啦")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
gift.bind(this)(award)
|
||||||
|
} catch (e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user