diff --git a/src/api/controllers/puzzle.controller.ts b/src/api/controllers/puzzle.controller.ts index c8a1bca..e43f03d 100644 --- a/src/api/controllers/puzzle.controller.ts +++ b/src/api/controllers/puzzle.controller.ts @@ -107,8 +107,10 @@ class PuzzleController extends BaseController { @role('anon') @router('post /api/:accountid/puzzle/match') async joinMultipleGame(req, res) { - const { shop, accountid } = req.params + const { shop, accountid, debug_begin_sec } = req.params let data = { shop } + let beginSecond = (debug_begin_sec ? +debug_begin_sec : 20) + beginSecond = (Math.max(2, beginSecond)) * 1000 /** * 查找店铺设置, 查看一定时间内是否有要开始的活动 * 如果有, 则读取配置, 加入开始游戏的定时 @@ -146,7 +148,6 @@ class PuzzleController extends BaseController { history.members.set(accountid, new PuzzleStatusClass()) history.room = roomId //TODO: 根据配置赋值 - const beginSecond = 20 * 1000 history.total = 10 history.begin = Date.now() + beginSecond beginTime = history.begin