添加天梯排行榜,修复setHour有时差的bug
This commit is contained in:
@@ -5,7 +5,7 @@ import { ExpeditionRecordModel } from '../../../db/ExpeditionRecord';
|
||||
import { ExpeditionWarRecordModel } from '../../../db/ExpeditionWarRecord';
|
||||
import { ExpeditionPointModel } from '../../../db/ExpeditionPoint';
|
||||
import { RoleModel } from '../../../db/Role';
|
||||
import { calculateSumCE, genCode } from '../../../pubUtils/util';
|
||||
import { calculateSumCE, genCode, setLocalHours } from '../../../pubUtils/util';
|
||||
import { matchPlayers, matchRobots, getPointRewardStatus, getCEScaleAndRange } from '../../../services/expeditionService';
|
||||
import { EXPEDITION_INCREASE_POINT } from '../../../consts/consts';
|
||||
import { WarReward } from '../../../services/warRewardService';
|
||||
@@ -33,7 +33,7 @@ export class ExpeditionBattleHandler {
|
||||
|
||||
// 每日刷新,刷新关卡进度,宝箱进度,武将状态
|
||||
let now = new Date();
|
||||
let today = now.setHours(0, 0, 0, 0);
|
||||
let today = setLocalHours(0, now);
|
||||
let expeditionRecord = await ExpeditionRecordModel.getTodayRecord(roleId, today);
|
||||
if(!expeditionRecord) { // 每天新建一条记录
|
||||
let code = genCode(8);
|
||||
|
||||
Reference in New Issue
Block a user