Skip to content

Commit

Permalink
fix: sleep delay
Browse files Browse the repository at this point in the history
  • Loading branch information
kuizuo committed Nov 22, 2023
1 parent f10a293 commit da6ad70
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions server/protocol/cx/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ export class Cx {
responseType: 'text',
})

await sleep(300)

// 两条必要请求! 位置签到必备
const { body: data } = await this.http.get(
'https://mobilelearn.chaoxing.com/pptSign/analysis',
Expand All @@ -249,7 +251,7 @@ export class Cx {
)
console.log('analysis 结果: ', data1)

sleep(200)
await sleep(300)

const $ = cheerio.load(html)

Expand Down Expand Up @@ -306,7 +308,7 @@ export class Cx {
if (data.result !== 1)
return data.errorMsg

sleep(100)
await sleep(200)

const query = qsStringify({
activeId: activity.id,
Expand Down Expand Up @@ -338,7 +340,7 @@ export class Cx {
if (data.result !== 1)
return data.errorMsg

sleep(100)
await sleep(200)

const query = qsStringify({
activeId: activity.id,
Expand Down Expand Up @@ -525,6 +527,7 @@ export class Cx {
return '失败'

case SignTypeEnum.Location:
await sleep(300)
return await this.signLocation(activity, setting?.location)

case SignTypeEnum.QRCode:
Expand Down

0 comments on commit da6ad70

Please sign in to comment.