mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-18 16:50:45 +08:00
Compare commits
No commits in common. "e30c2d49304f50a830ddd3d4dddee6bdeb73f22b" and "227ecf67a3a6b0d41d11e1fe9a841117d31f4fa9" have entirely different histories.
e30c2d4930
...
227ecf67a3
@ -21,6 +21,16 @@ export class Main extends Template {
|
|||||||
let user = p.data.user;
|
let user = p.data.user;
|
||||||
let context = p.context;
|
let context = p.context;
|
||||||
this.dict[user] = {}
|
this.dict[user] = {}
|
||||||
|
let curl = this.curl
|
||||||
|
let reports = setInterval(async function f() {
|
||||||
|
p.log(`正在上报游戏信息...`)
|
||||||
|
let report = await curl({
|
||||||
|
'url': `functionId=gameHeartbeat&body={"linkId":"${context.linkId}"}&t=1741137369937&appid=activities_platform&client=ios&clientVersion=15.0.25`,
|
||||||
|
user,
|
||||||
|
delay: 10,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}, 5000)
|
||||||
await this.curl({
|
await this.curl({
|
||||||
'url': `https://api.m.jd.com/api`,
|
'url': `https://api.m.jd.com/api`,
|
||||||
'form': `appid=risk_h5_info&functionId=reportInvokeLog&body={"sdkClient":"handler","sdkVersion":"1.1.0","url":"aHR0cHM6Ly9qb3lwYXJrLmpkLmNvbS8","timestamp":${new Date().getTime()}}`,
|
'form': `appid=risk_h5_info&functionId=reportInvokeLog&body={"sdkClient":"handler","sdkVersion":"1.1.0","url":"aHR0cHM6Ly9qb3lwYXJrLmpkLmNvbS8","timestamp":${new Date().getTime()}}`,
|
||||||
@ -248,6 +258,7 @@ export class Main extends Template {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
p.info.work = true
|
p.info.work = true
|
||||||
|
clearInterval(reports)
|
||||||
}
|
}
|
||||||
|
|
||||||
async one(p) {
|
async one(p) {
|
||||||
@ -656,12 +667,6 @@ export class Main extends Template {
|
|||||||
let user = p.data.user
|
let user = p.data.user
|
||||||
let context = p.context
|
let context = p.context
|
||||||
this.dict[user] = {}
|
this.dict[user] = {}
|
||||||
await this.curl({
|
|
||||||
'form': `functionId=gameHeartbeat&body={"businessCode":1,"linkId":"${context.linkId}"}&t=1741137369937&appid=activities_platform&client=ios&clientVersion=15.0.25`,
|
|
||||||
user,
|
|
||||||
delay: 10,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
let baseInfo = await this.curl({
|
let baseInfo = await this.curl({
|
||||||
'url': `https://api.m.jd.com/api?functionId=joyBaseInfo`,
|
'url': `https://api.m.jd.com/api?functionId=joyBaseInfo`,
|
||||||
'form': `functionId=joyBaseInfo&body={"taskId":"","inviteType":"","inviterPin":"","linkId":"${context.linkId}"}&t=1741137369937&appid=activities_platform&client=ios&clientVersion=15.0.25`,
|
'form': `functionId=joyBaseInfo&body={"taskId":"","inviteType":"","inviterPin":"","linkId":"${context.linkId}"}&t=1741137369937&appid=activities_platform&client=ios&clientVersion=15.0.25`,
|
||||||
|
|||||||
@ -21,6 +21,16 @@ export class Main extends Template {
|
|||||||
let user = p.data.user;
|
let user = p.data.user;
|
||||||
let context = p.context;
|
let context = p.context;
|
||||||
this.dict[user] = {}
|
this.dict[user] = {}
|
||||||
|
let curl = this.curl
|
||||||
|
let reports = setInterval(async function f() {
|
||||||
|
p.log(`正在上报游戏信息...`)
|
||||||
|
let report = await curl({
|
||||||
|
'url': `functionId=gameHeartbeat&body={"linkId":"${context.linkId}"}&t=1741137369937&appid=activities_platform&client=ios&clientVersion=15.0.25`,
|
||||||
|
user,
|
||||||
|
delay: 10,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}, 5000)
|
||||||
await this.curl({
|
await this.curl({
|
||||||
'url': `https://api.m.jd.com/api`,
|
'url': `https://api.m.jd.com/api`,
|
||||||
'form': `appid=risk_h5_info&functionId=reportInvokeLog&body={"sdkClient":"handler","sdkVersion":"1.1.0","url":"aHR0cHM6Ly9qb3lwYXJrLmpkLmNvbS8","timestamp":${new Date().getTime()}}`,
|
'form': `appid=risk_h5_info&functionId=reportInvokeLog&body={"sdkClient":"handler","sdkVersion":"1.1.0","url":"aHR0cHM6Ly9qb3lwYXJrLmpkLmNvbS8","timestamp":${new Date().getTime()}}`,
|
||||||
@ -264,6 +274,7 @@ export class Main extends Template {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
p.info.work = true
|
p.info.work = true
|
||||||
|
clearInterval(reports)
|
||||||
}
|
}
|
||||||
|
|
||||||
async one(p) {
|
async one(p) {
|
||||||
@ -672,12 +683,6 @@ export class Main extends Template {
|
|||||||
let user = p.data.user
|
let user = p.data.user
|
||||||
let context = p.context
|
let context = p.context
|
||||||
this.dict[user] = {}
|
this.dict[user] = {}
|
||||||
await this.curl({
|
|
||||||
'form': `functionId=gameHeartbeat&body={"businessCode":1,"linkId":"${context.linkId}"}&t=1741137369937&appid=activities_platform&client=ios&clientVersion=15.0.25`,
|
|
||||||
user,
|
|
||||||
delay: 10,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
let baseInfo = await this.curl({
|
let baseInfo = await this.curl({
|
||||||
'url': `https://api.m.jd.com/api?functionId=joyBaseInfo`,
|
'url': `https://api.m.jd.com/api?functionId=joyBaseInfo`,
|
||||||
'form': `functionId=joyBaseInfo&body={"taskId":"","inviteType":"","inviterPin":"","linkId":"${context.linkId}"}&t=1741137369937&appid=activities_platform&client=ios&clientVersion=15.0.25`,
|
'form': `functionId=joyBaseInfo&body={"taskId":"","inviteType":"","inviterPin":"","linkId":"${context.linkId}"}&t=1741137369937&appid=activities_platform&client=ios&clientVersion=15.0.25`,
|
||||||
|
|||||||
@ -142,7 +142,7 @@ export class Main extends Template {
|
|||||||
}
|
}
|
||||||
let count = skus.length + packs.length
|
let count = skus.length + packs.length
|
||||||
let exceed = parseInt(this.profile.exceed || 0)
|
let exceed = parseInt(this.profile.exceed || 0)
|
||||||
if (exceed && exceed>count) {
|
if (exceed && exceed<count) {
|
||||||
p.info.work = true
|
p.info.work = true
|
||||||
p.log(`当前购物车数量: ${count},小于指定数量,跳过运行`)
|
p.log(`当前购物车数量: ${count},小于指定数量,跳过运行`)
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user