在挑战模式下, timeLeft返回当前局的使用时间

This commit is contained in:
zhl 2021-05-19 10:25:49 +08:00
parent a1fa453cd6
commit dfbe89f10b
3 changed files with 7 additions and 1 deletions

View File

@ -278,7 +278,7 @@
"maxCombo": 1, // 当局连续答对的最大数量
"score": 10, // 当前得分
"star": 1, // 当局胜利后获得的星星
"timeLeft": 1, // 当局剩余时间
"timeLeft": 1, // 当局使用时间
"gameResult": 0, // 当局的游戏结果, 单人的话和上一层gameResult相同
"timeLast": 1620973155307 //上次回答时间
}

View File

@ -113,6 +113,7 @@ class ExamController extends BaseController {
statMap.errorCount++
statMap.comboCount = 0
}
statMap.timeLeft = (statMap.timeLast - history.createdAt.getTime()) / 1000
history.status = 1
let score = result ? calcExamScore(time, statMap.comboCount) : 0

5
src/services/Wechat.ts Normal file
View File

@ -0,0 +1,5 @@
export async function generateQr({appId, appSecret, scene, filePath}) {
}