underscore读取,排行榜保护

This commit is contained in:
mamengke01
2021-01-12 14:13:30 +08:00
parent 58f3e94fc0
commit 22f2eed34e
16 changed files with 53 additions and 51 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ import path = require('path');
import { DicRandomEffectPool } from './dictionary/DicRandomEffectPool';
import { HERO_CE_RATIO, ABI_STAGE } from '../consts';
const _ = require('underscore');
import { uniq, findWhere, findIndex } from 'underscore';
const moment = require('moment');
@@ -475,7 +475,7 @@ export function parseNumberList(str: string) {
export function mergeSameGoods(goods: Array<{ id: number, count: number }>) {
let resGoods = [];
for (let { id, count } of goods) {
let index = _.findIndex(resGoods, { id });
let index = findIndex(resGoods, { id });
if (index > -1) {
resGoods[index].count += count;
} else {