mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-16 15:40:42 +08:00
Compare commits
2 Commits
1a01772955
...
af654d7f07
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af654d7f07 | ||
|
|
0439958ab3 |
@ -123,10 +123,10 @@ export class Main extends Template {
|
||||
try {
|
||||
let skus = board.data.result.farmTreeLevels[2].farmLevelTrees[0]
|
||||
p.log("正在种树,选择商品:", skus.skuName)
|
||||
let tree = await this.curl({
|
||||
let plantTree = await this.curl({
|
||||
'url': `https://api.m.jd.com/client.action`,
|
||||
'form': `appid=signed_wh5&body=${this.dumps({
|
||||
"version": 10,
|
||||
"version": 13,
|
||||
"channelParam": "1",
|
||||
"uid": skus.uid,
|
||||
"type": "plantSku"
|
||||
@ -134,6 +134,11 @@ export class Main extends Template {
|
||||
user,
|
||||
}
|
||||
)
|
||||
let tree = await this.curl({
|
||||
'form': `appid=signed_wh5&client=apple&clientVersion=15.0.11&body={"version":13,"channelParam":"1","level":3,"type":"plantLevel"}&functionId=farm_plant_tree`,
|
||||
user
|
||||
}
|
||||
)
|
||||
if (this.haskey(tree, 'data.success')) {
|
||||
farmHome = await this.curl({
|
||||
'url': `https://api.m.jd.com/client.action`,
|
||||
|
||||
@ -252,7 +252,10 @@ export class Main extends Template {
|
||||
let apTaskDetail = await this.curl({
|
||||
'url': `https://api.m.jd.com/api?functionId=apTaskDetail`,
|
||||
'form': `functionId=apTaskDetail&body={"taskType":"${i.taskType}","taskId":${i.id},"channel":4,"checkVersion":true,"linkId":"${context.linkId}","pipeExt":${this.dumps(i.pipeExt)}}&t=1738480907628&appid=activities_platform&client=ios&clientVersion=15.0.11&`,
|
||||
user
|
||||
user,
|
||||
algo: {
|
||||
expire: {"code": 1000}
|
||||
}
|
||||
}
|
||||
)
|
||||
let taskItemList = this.haskey(apTaskDetail, 'data.taskItemList')
|
||||
@ -362,7 +365,7 @@ export class Main extends Template {
|
||||
else {
|
||||
p.err("抽奖领取失败")
|
||||
}
|
||||
await this.wait(2000)
|
||||
await this.wait(1000)
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -434,7 +437,7 @@ export class Main extends Template {
|
||||
p.err("抽奖错误")
|
||||
break
|
||||
}
|
||||
await this.wait(2000)
|
||||
await this.wait(1000)
|
||||
} catch (e) {
|
||||
p.log(e)
|
||||
}
|
||||
@ -504,7 +507,7 @@ export class Main extends Template {
|
||||
p.err("抽奖错误")
|
||||
break
|
||||
}
|
||||
await this.wait(2000)
|
||||
await this.wait(1000)
|
||||
} catch (e) {
|
||||
p.log(e)
|
||||
}
|
||||
@ -570,7 +573,7 @@ export class Main extends Template {
|
||||
p.err("抽奖错误")
|
||||
break
|
||||
}
|
||||
await this.wait(2000)
|
||||
await this.wait(1000)
|
||||
} catch (e) {
|
||||
p.log(e)
|
||||
}
|
||||
@ -606,9 +609,9 @@ export class Main extends Template {
|
||||
return
|
||||
}
|
||||
let drawNum = this.haskey(home, 'data.remainTimes') || 0
|
||||
let num = drawNum>5 ? 6 : drawNum
|
||||
p.log("可抽奖次数:", num)
|
||||
for (let i of Array(num)) {
|
||||
// let num = drawNum>5 ? 6 : drawNum
|
||||
p.log("可抽奖次数:", drawNum)
|
||||
for (let i of Array(drawNum)) {
|
||||
try {
|
||||
let lottery = await this.curl({
|
||||
url: 'https://api.m.jd.com/api?functionId=lotteryMachineDraw',
|
||||
@ -638,12 +641,12 @@ export class Main extends Template {
|
||||
p.err("抽奖错误")
|
||||
break
|
||||
}
|
||||
await this.wait(2000)
|
||||
await this.wait(1000)
|
||||
} catch (e) {
|
||||
p.log(e)
|
||||
}
|
||||
}
|
||||
if (drawNum != 0 && drawNum<6) {
|
||||
if (drawNum != 0) {
|
||||
home = await this.curl({
|
||||
'url': `https://api.m.jd.com/api?functionId=lotteryMachineHome`,
|
||||
'form': `functionId=lotteryMachineHome&body={"linkId":"${context.linkId}","taskId":"","inviter":""}&t=1738481450815&appid=activities_platform&client=ios&clientVersion=15.0.11`,
|
||||
@ -685,7 +688,7 @@ export class Main extends Template {
|
||||
p.info.work = true
|
||||
break
|
||||
}
|
||||
await this.wait(2000)
|
||||
await this.wait(1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user