mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-19 09:10:44 +08:00
Update jd_task_drainage.js
This commit is contained in:
parent
e5c32e416d
commit
5ddec819d5
@ -11,7 +11,8 @@ export class Main extends Template {
|
|||||||
wqreferer: 'http://wq.jd.com/wxapp/pages/marketing/entry_task/channel',
|
wqreferer: 'http://wq.jd.com/wxapp/pages/marketing/entry_task/channel',
|
||||||
'X-Rp-Client': 'mini_2.1.0'
|
'X-Rp-Client': 'mini_2.1.0'
|
||||||
},
|
},
|
||||||
crontab: 3
|
crontab: 3,
|
||||||
|
turn: 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,6 +23,7 @@ export class Main extends Template {
|
|||||||
let user = p.data.user;
|
let user = p.data.user;
|
||||||
let context = p.context;
|
let context = p.context;
|
||||||
let status
|
let status
|
||||||
|
if (this.turnCount == 0) {
|
||||||
let s = await this.curl({
|
let s = await this.curl({
|
||||||
'url': `https://api.m.jd.com/MiniTask_ChannelPage?g_ty=ls&g_tk=1629788202`,
|
'url': `https://api.m.jd.com/MiniTask_ChannelPage?g_ty=ls&g_tk=1629788202`,
|
||||||
'form': `loginType=11&clientType=wxapp&client=apple&clientVersion=9.23.200&build=&osVersion=iOS%2015.1.1&screen=390*844&networkType=wifi&d_brand=iPhone&d_model=iPhone%2012%20Pro%3CiPhone13%2C3%3E&lang=zh_CN&functionId=MiniTask_ChannelPage&t=1732259085779&body={"source":"task","businessSource":"bbxa"}&appid=hot_channel`,
|
'form': `loginType=11&clientType=wxapp&client=apple&clientVersion=9.23.200&build=&osVersion=iOS%2015.1.1&screen=390*844&networkType=wifi&d_brand=iPhone&d_model=iPhone%2012%20Pro%3CiPhone13%2C3%3E&lang=zh_CN&functionId=MiniTask_ChannelPage&t=1732259085779&body={"source":"task","businessSource":"bbxa"}&appid=hot_channel`,
|
||||||
@ -81,6 +83,8 @@ export class Main extends Template {
|
|||||||
else {
|
else {
|
||||||
p.log(this.haskey(sign, 'message') || sign)
|
p.log(this.haskey(sign, 'message') || sign)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (this.turnCount == 1) {
|
||||||
let sign2 = await this.curl({
|
let sign2 = await this.curl({
|
||||||
'form': `loginType=11&clientType=wxapp&client=apple&clientVersion=10.15.100&build=&osVersion=iOS%2015.1.1&screen=390*844&networkType=wifi&d_brand=iPhone&d_model=iPhone%2012%20Pro%3CiPhone13%2C3%3E&lang=zh_CN&uuid=oTGnpnBPpyvARmNaPlEeBxjJ4J_U&partner=&forcebot=&wifiBssid=&scope=&functionId=SignComponent_doSignTask&appid=hot_channel&loginWQBiz=signcomponent&body={"activityId":"10004","version":1}`,
|
'form': `loginType=11&clientType=wxapp&client=apple&clientVersion=10.15.100&build=&osVersion=iOS%2015.1.1&screen=390*844&networkType=wifi&d_brand=iPhone&d_model=iPhone%2012%20Pro%3CiPhone13%2C3%3E&lang=zh_CN&uuid=oTGnpnBPpyvARmNaPlEeBxjJ4J_U&partner=&forcebot=&wifiBssid=&scope=&functionId=SignComponent_doSignTask&appid=hot_channel&loginWQBiz=signcomponent&body={"activityId":"10004","version":1}`,
|
||||||
user,
|
user,
|
||||||
@ -90,6 +94,45 @@ export class Main extends Template {
|
|||||||
referer: 'https://servicewechat.com/wx91d27dbf599dff74/793/page-frame.html'
|
referer: 'https://servicewechat.com/wx91d27dbf599dff74/793/page-frame.html'
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
if (this.haskey(sign2, 'subCode', 3001)) {
|
||||||
|
p.log("您已经签到过了,请不要重复签到")
|
||||||
|
}
|
||||||
|
let mainPage = await this.curl({
|
||||||
|
'url': `https://api.m.jd.com/miniTask_superVenue_venueChannelMainPage?g_ty=ls&g_tk=2107606655`,
|
||||||
|
'form': `appid=hot_channel&body={"source":"task"}&client=apple&clientVersion=10.15.180&functionId=miniTask_superVenue_venueChannelMainPage`,
|
||||||
|
user,
|
||||||
|
algo: {
|
||||||
|
appId: '7b8ba'
|
||||||
|
},
|
||||||
|
referer: 'https://servicewechat.com/wx91d27dbf599dff74/793/page-frame.html'
|
||||||
|
}
|
||||||
|
)
|
||||||
|
let sign3 = await this.curl({
|
||||||
|
url: 'https://api.m.jd.com/miniTask_superVenue_getSignGiftReward?g_ty=ls&g_tk=2107606655',
|
||||||
|
'form': `appid=hot_channel&body={"itemId":"1"}&client=apple&clientVersion=10.15.100&functionId=miniTask_superVenue_getSignGiftReward`,
|
||||||
|
user,
|
||||||
|
algo: {
|
||||||
|
appId: '7b8ba'
|
||||||
|
},
|
||||||
|
referer: 'https://servicewechat.com/wx91d27dbf599dff74/793/page-frame.html'
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (this.haskey(sign3, 'subCode', 3010)) {
|
||||||
|
status = 1
|
||||||
|
p.log("已经签过了,明天再来吧");
|
||||||
|
}
|
||||||
|
for (let i of this.haskey(sign3, 'data.signGiftSignInfoList.0.rewardList') || []) {
|
||||||
|
if (i.rewardType == 1) {
|
||||||
|
p.award(i.discount, 'redpacket')
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
p.log(i.category)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.haskey(sign3, 'data')) {
|
||||||
|
status = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
if (status) {
|
if (status) {
|
||||||
p.info.work = true
|
p.info.work = true
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user