如果活动类型为9, 则随时可以开始

This commit is contained in:
zhl 2021-05-20 17:21:59 +08:00
parent 3d261f129e
commit de3d850c62
3 changed files with 5 additions and 1 deletions

View File

@ -115,7 +115,9 @@
| 字段 | 说明 |
| -------- | -------------------------------------- |
| shop | 店铺id |
| aid | 活动id |
| debug_begin_sec | 游戏于n秒后开始, 最小2秒, 测试用 |
| debug_qcount | 题目数量 |
3. Response: JSON

View File

@ -203,7 +203,7 @@ class PuzzleController extends BaseController {
@role('anon')
@router('post /api/:accountid/puzzle/match')
async joinMultipleGame(req, res) {
const { shop, accountid, debug_begin_sec, debug_qcount } = req.params
const { shop, aid, accountid, debug_begin_sec, debug_qcount } = req.params
let data: any = { shop, maxTime: 3600, accountid }
let beginSecond = (debug_begin_sec ? +debug_begin_sec : 20)
beginSecond = (Math.max(2, beginSecond)) * 1000

View File

@ -227,6 +227,8 @@ function getCurrentTime(record: any) {
return null
}
return fetchCurrentGameTime(record.beginTime, gameTime, record.prepareTime)
case 9:
return Date.now()
}
return null
}