mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-14 22:50:47 +08:00
.
This commit is contained in:
parent
d7678ecf35
commit
d48201d80d
@ -112,7 +112,7 @@ export class Main extends Template {
|
|||||||
bean.today = [this.sum(xsa) || 0, this.sum(xsb) || 0]
|
bean.today = [this.sum(xsa) || 0, this.sum(xsb) || 0]
|
||||||
bean.yesterday = [this.sum(ysa) || 0, this.sum(ysb) || 0]
|
bean.yesterday = [this.sum(ysa) || 0, this.sum(ysb) || 0]
|
||||||
if (this.haskey(c, 'data.beanAmount')) {
|
if (this.haskey(c, 'data.beanAmount')) {
|
||||||
bean.expire = c.data.expireSoonNum
|
bean.expireBean = c.data.expireSoonNum
|
||||||
bean.all = c.data.beanAmount
|
bean.all = c.data.beanAmount
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -125,7 +125,7 @@ export class Main extends Template {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (this.haskey(b, 'others')) {
|
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')
|
bean.all = this.haskey(b, 'others.jingBeanBalance.jingBeanCount')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,12 +79,15 @@ export class Main extends Template {
|
|||||||
})
|
})
|
||||||
if (this.haskey(dd, 'success')) {
|
if (this.haskey(dd, 'success')) {
|
||||||
p.log('任务完成:', dd.success)
|
p.log('任务完成:', dd.success)
|
||||||
await this.baseInfo(p)
|
if (!p.info.balck) {
|
||||||
await this.two(p)
|
await this.baseInfo(p)
|
||||||
|
await this.two(p)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 'BROWSE_CHANNEL':
|
case 'BROWSE_CHANNEL':
|
||||||
case 'BROWSE_PRODUCT':
|
case 'BROWSE_PRODUCT':
|
||||||
|
case 'BROWSE_RTB':
|
||||||
let detail = await this.curl({
|
let detail = await this.curl({
|
||||||
'url': `https://api.m.jd.com/`,
|
'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`,
|
'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')) {
|
if (this.haskey(d, 'success')) {
|
||||||
p.log('任务完成:', d.success)
|
p.log('任务完成:', d.success)
|
||||||
await this.baseInfo(p)
|
if (!p.info.balck) {
|
||||||
await this.two(p)
|
await this.baseInfo(p)
|
||||||
|
await this.two(p)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -139,8 +144,10 @@ export class Main extends Template {
|
|||||||
})
|
})
|
||||||
if (this.haskey(d, 'success')) {
|
if (this.haskey(d, 'success')) {
|
||||||
p.log('任务完成:', d.success)
|
p.log('任务完成:', d.success)
|
||||||
await this.baseInfo(p)
|
if (!p.info.balck) {
|
||||||
await this.two(p)
|
await this.baseInfo(p)
|
||||||
|
await this.two(p)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -401,6 +408,9 @@ export class Main extends Template {
|
|||||||
}
|
}
|
||||||
for (let i in this.dict[user].joy) {
|
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].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]
|
let joyInfo = this.dict[user].shop[i]
|
||||||
if (joyInfo && this.dict[user].coin>0 && joyInfo.consume>0 && joyInfo.consume<this.dict[user].coin) {
|
if (joyInfo && this.dict[user].coin>0 && joyInfo.consume>0 && joyInfo.consume<this.dict[user].coin) {
|
||||||
if (this.dict[user].number>9) {
|
if (this.dict[user].number>9) {
|
||||||
@ -622,6 +632,7 @@ export class Main extends Template {
|
|||||||
if (this.haskey(baseInfo, 'errMsg', 'blackfail')) {
|
if (this.haskey(baseInfo, 'errMsg', 'blackfail')) {
|
||||||
p.log("狗子在小黑屋里面...")
|
p.log("狗子在小黑屋里面...")
|
||||||
p.info.jump = true
|
p.info.jump = true
|
||||||
|
p.info.black = true
|
||||||
return {
|
return {
|
||||||
error: 1
|
error: 1
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,12 +79,15 @@ export class Main extends Template {
|
|||||||
})
|
})
|
||||||
if (this.haskey(dd, 'success')) {
|
if (this.haskey(dd, 'success')) {
|
||||||
p.log('任务完成:', dd.success)
|
p.log('任务完成:', dd.success)
|
||||||
await this.baseInfo(p)
|
if (!p.info.balck) {
|
||||||
await this.two(p)
|
await this.baseInfo(p)
|
||||||
|
await this.two(p)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 'BROWSE_CHANNEL':
|
case 'BROWSE_CHANNEL':
|
||||||
case 'BROWSE_PRODUCT':
|
case 'BROWSE_PRODUCT':
|
||||||
|
case 'BROWSE_RTB':
|
||||||
let detail = await this.curl({
|
let detail = await this.curl({
|
||||||
'url': `https://api.m.jd.com/`,
|
'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`,
|
'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"
|
appId: "55276"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
await this.baseInfo(p)
|
if (!p.info.balck) {
|
||||||
await this.two(p)
|
await this.baseInfo(p)
|
||||||
|
await this.two(p)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (this.haskey(doTask, 'code', 2031)) {
|
else if (this.haskey(doTask, 'code', 2031)) {
|
||||||
p.log("任务失败:", this.haskey(doTask, 'errMsg') || doTask)
|
p.log("任务失败:", this.haskey(doTask, 'errMsg') || doTask)
|
||||||
@ -171,8 +176,10 @@ export class Main extends Template {
|
|||||||
})
|
})
|
||||||
if (this.haskey(d, 'success')) {
|
if (this.haskey(d, 'success')) {
|
||||||
p.log('任务完成:', d.success)
|
p.log('任务完成:', d.success)
|
||||||
await this.baseInfo(p)
|
if (!p.info.balck) {
|
||||||
await this.two(p)
|
await this.baseInfo(p)
|
||||||
|
await this.two(p)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -455,6 +462,9 @@ export class Main extends Template {
|
|||||||
}
|
}
|
||||||
for (let i in this.dict[user].joy) {
|
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].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]
|
let joyInfo = this.dict[user].shop[i]
|
||||||
if (joyInfo && this.dict[user].coin>0 && joyInfo.consume>0 && joyInfo.consume<this.dict[user].coin) {
|
if (joyInfo && this.dict[user].coin>0 && joyInfo.consume>0 && joyInfo.consume<this.dict[user].coin) {
|
||||||
if (this.dict[user].number>9) {
|
if (this.dict[user].number>9) {
|
||||||
@ -676,6 +686,7 @@ export class Main extends Template {
|
|||||||
if (this.haskey(baseInfo, 'errMsg', 'blackfail')) {
|
if (this.haskey(baseInfo, 'errMsg', 'blackfail')) {
|
||||||
p.log("牛牛在小黑屋里面...")
|
p.log("牛牛在小黑屋里面...")
|
||||||
p.info.jump = true
|
p.info.jump = true
|
||||||
|
p.info.black = true
|
||||||
return {
|
return {
|
||||||
error: 1
|
error: 1
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user