underscore读取,排行榜保护

This commit is contained in:
mamengke01
2021-01-12 14:12:19 +08:00
parent 58f3e94fc0
commit 22f2eed34e
16 changed files with 53 additions and 51 deletions

View File

@@ -16,7 +16,7 @@ import { RankParam } from '../pubUtils/interface';
import { RoleModel } from '../db/Role';
import { MailModel, MailType } from '../db/Mail';
import { pinus } from 'pinus';
const _ = require('underscore');
import { indexOf } from 'underscore';
const PER_SECOND = 1 * 1000;
const PER_DAY = 24 * 60 * 60;
const SETTLE_DIFF = 29 * 60;
@@ -133,7 +133,7 @@ export async function resetPvpWarId() {
console.log('resetPvpWarId');
let systemConfig = await SystemConfigModel.findSystemConfig();
let warIds = deepCopy(getPvpGkWarIds());
let index = _.indexOf(warIds, systemConfig.warId);
let index = indexOf(warIds, systemConfig.warId);
if (index != -1) {
warIds.splice(index, 1);
}