挑战活动记录排行榜时,将对应的id存进去
This commit is contained in:
parent
be0cb09b7b
commit
c23efc4de6
@ -51,7 +51,7 @@ class ExamController extends BaseController {
|
||||
let stat = new PuzzleStatusClass()
|
||||
stat.timeLast = now
|
||||
history.members.set(accountid, stat)
|
||||
|
||||
history.activityId = eid
|
||||
history.expire = Date.now() + (record.qcount * record.timeone || 90) * 1000
|
||||
history.type = 2
|
||||
history.total = record.qcount
|
||||
@ -126,7 +126,7 @@ class ExamController extends BaseController {
|
||||
history.status = 9
|
||||
let rankObj = {
|
||||
shop: history.shop,
|
||||
level: 'exam',
|
||||
level: history.activityId,
|
||||
accountId: accountid,
|
||||
score: statMap.score,
|
||||
mode: 0,
|
||||
@ -134,7 +134,7 @@ class ExamController extends BaseController {
|
||||
}
|
||||
await history.save()
|
||||
await updateExamRank(rankObj)
|
||||
let {rankList, userRank } = await getRank({shop: history.shop, level: 'exam', accountId: accountid, mode: 0, skip: 0, limit: 20})
|
||||
let {rankList, userRank } = await getRank({shop: history.shop, level: history.activityId, accountId: accountid, mode: 0, skip: 0, limit: 20})
|
||||
rspData.rankList = rankList
|
||||
rspData.userRank = userRank
|
||||
}
|
||||
|
@ -89,6 +89,12 @@ export class PuzzleSessionClass extends BaseModule {
|
||||
|
||||
@prop()
|
||||
public level: number
|
||||
/**
|
||||
* 活动或者挑战, 可将相关的id存入该字段
|
||||
* @type {string}
|
||||
*/
|
||||
@prop()
|
||||
public activityId: string
|
||||
|
||||
@prop()
|
||||
public room: string
|
||||
|
Loading…
x
Reference in New Issue
Block a user