mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-16 07:30:43 +08:00
Compare commits
4 Commits
d7678ecf35
...
4c67377343
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c67377343 | ||
|
|
ce5b2de74c | ||
|
|
741173a35a | ||
|
|
d48201d80d |
@ -112,7 +112,7 @@ export class Main extends Template {
|
||||
bean.today = [this.sum(xsa) || 0, this.sum(xsb) || 0]
|
||||
bean.yesterday = [this.sum(ysa) || 0, this.sum(ysb) || 0]
|
||||
if (this.haskey(c, 'data.beanAmount')) {
|
||||
bean.expire = c.data.expireSoonNum
|
||||
bean.expireBean = c.data.expireSoonNum
|
||||
bean.all = c.data.beanAmount
|
||||
}
|
||||
else {
|
||||
@ -125,7 +125,7 @@ export class Main extends Template {
|
||||
}
|
||||
})
|
||||
if (this.haskey(b, 'others')) {
|
||||
bean.expireBean = this.haskey(b, 'others.jingBeanExpiringInfo.detailList')
|
||||
bean.expire = this.haskey(b, 'others.jingBeanExpiringInfo.detailList')
|
||||
bean.all = this.haskey(b, 'others.jingBeanBalance.jingBeanCount')
|
||||
}
|
||||
}
|
||||
|
||||
@ -79,12 +79,15 @@ export class Main extends Template {
|
||||
})
|
||||
if (this.haskey(dd, 'success')) {
|
||||
p.log('任务完成:', dd.success)
|
||||
await this.baseInfo(p)
|
||||
await this.two(p)
|
||||
if (!p.info.balck) {
|
||||
await this.baseInfo(p)
|
||||
await this.two(p)
|
||||
}
|
||||
}
|
||||
break
|
||||
case 'BROWSE_CHANNEL':
|
||||
case 'BROWSE_PRODUCT':
|
||||
case 'BROWSE_RTB':
|
||||
let detail = await this.curl({
|
||||
'url': `https://api.m.jd.com/`,
|
||||
'form': `functionId=apTaskDetail&body={"taskType":"${i.taskType}","taskId":${i.id},"openUdId":"","cityId":"1234","provinceId":"16","countyId":"1234","channel":4,"linkId":"${context.linkId}"}&t=1741137369937&appid=activities_platform&client=ios&clientVersion=15.0.25`,
|
||||
@ -110,8 +113,10 @@ export class Main extends Template {
|
||||
})
|
||||
if (this.haskey(d, 'success')) {
|
||||
p.log('任务完成:', d.success)
|
||||
await this.baseInfo(p)
|
||||
await this.two(p)
|
||||
if (!p.info.balck) {
|
||||
await this.baseInfo(p)
|
||||
await this.two(p)
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -139,8 +144,10 @@ export class Main extends Template {
|
||||
})
|
||||
if (this.haskey(d, 'success')) {
|
||||
p.log('任务完成:', d.success)
|
||||
await this.baseInfo(p)
|
||||
await this.two(p)
|
||||
if (!p.info.balck) {
|
||||
await this.baseInfo(p)
|
||||
await this.two(p)
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -401,6 +408,9 @@ export class Main extends Template {
|
||||
}
|
||||
for (let i in this.dict[user].joy) {
|
||||
if (this.dict[user].joy[i] && this.dict[user].joy[i].length % 2 == 1 && i<this.dict[user].buyLevel) {
|
||||
if (!this.dict[user].shop) {
|
||||
await this.shopList(p)
|
||||
}
|
||||
let joyInfo = this.dict[user].shop[i]
|
||||
if (joyInfo && this.dict[user].coin>0 && joyInfo.consume>0 && joyInfo.consume<this.dict[user].coin) {
|
||||
if (this.dict[user].number>9) {
|
||||
@ -622,6 +632,7 @@ export class Main extends Template {
|
||||
if (this.haskey(baseInfo, 'errMsg', 'blackfail')) {
|
||||
p.log("狗子在小黑屋里面...")
|
||||
p.info.jump = true
|
||||
p.info.black = true
|
||||
return {
|
||||
error: 1
|
||||
}
|
||||
|
||||
@ -79,12 +79,15 @@ export class Main extends Template {
|
||||
})
|
||||
if (this.haskey(dd, 'success')) {
|
||||
p.log('任务完成:', dd.success)
|
||||
await this.baseInfo(p)
|
||||
await this.two(p)
|
||||
if (!p.info.balck) {
|
||||
await this.baseInfo(p)
|
||||
await this.two(p)
|
||||
}
|
||||
}
|
||||
break
|
||||
case 'BROWSE_CHANNEL':
|
||||
case 'BROWSE_PRODUCT':
|
||||
case 'BROWSE_RTB':
|
||||
let detail = await this.curl({
|
||||
'url': `https://api.m.jd.com/`,
|
||||
'form': `functionId=apTaskDetail&body={"taskType":"${i.taskType}","taskId":${i.id},"openUdId":"","cityId":"1234","provinceId":"16","countyId":"1234","channel":4,"linkId":"${context.linkId}"}&t=1741137369937&appid=activities_platform&client=ios&clientVersion=15.0.25`,
|
||||
@ -137,8 +140,10 @@ export class Main extends Template {
|
||||
appId: "55276"
|
||||
}
|
||||
})
|
||||
await this.baseInfo(p)
|
||||
await this.two(p)
|
||||
if (!p.info.balck) {
|
||||
await this.baseInfo(p)
|
||||
await this.two(p)
|
||||
}
|
||||
}
|
||||
else if (this.haskey(doTask, 'code', 2031)) {
|
||||
p.log("任务失败:", this.haskey(doTask, 'errMsg') || doTask)
|
||||
@ -171,8 +176,10 @@ export class Main extends Template {
|
||||
})
|
||||
if (this.haskey(d, 'success')) {
|
||||
p.log('任务完成:', d.success)
|
||||
await this.baseInfo(p)
|
||||
await this.two(p)
|
||||
if (!p.info.balck) {
|
||||
await this.baseInfo(p)
|
||||
await this.two(p)
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -455,6 +462,9 @@ export class Main extends Template {
|
||||
}
|
||||
for (let i in this.dict[user].joy) {
|
||||
if (this.dict[user].joy[i] && this.dict[user].joy[i].length % 2 == 1 && i<this.dict[user].buyLevel) {
|
||||
if (!this.dict[user].shop) {
|
||||
await this.shopList(p)
|
||||
}
|
||||
let joyInfo = this.dict[user].shop[i]
|
||||
if (joyInfo && this.dict[user].coin>0 && joyInfo.consume>0 && joyInfo.consume<this.dict[user].coin) {
|
||||
if (this.dict[user].number>9) {
|
||||
@ -676,6 +686,7 @@ export class Main extends Template {
|
||||
if (this.haskey(baseInfo, 'errMsg', 'blackfail')) {
|
||||
p.log("牛牛在小黑屋里面...")
|
||||
p.info.jump = true
|
||||
p.info.black = true
|
||||
return {
|
||||
error: 1
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ export class Main extends Template {
|
||||
p.log("已签到..")
|
||||
}
|
||||
else {
|
||||
status = 0
|
||||
st = 0
|
||||
let sign = await this.curl({
|
||||
'url': `https://api.m.jd.com/miniTask_doFarmSign?g_ty=ls&g_tk=1084416199`,
|
||||
'form': `loginType=2&clientType=wxapp&client=apple&clientVersion=10.14.110&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=oCwKwuBoW0okKEIIDlT5FXxscxcM&functionId=miniTask_doFarmSign&t=1739945007901&body={}&appid=hot_channel`,
|
||||
@ -51,7 +51,7 @@ export class Main extends Template {
|
||||
)
|
||||
if (this.haskey(sign, 'data.signStatus')) {
|
||||
p.log(`签到成功: 获得水滴: ${sign.data.awardNum}`)
|
||||
status = 1
|
||||
st = 1
|
||||
}
|
||||
}
|
||||
let taskList = await this.curl({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user