underscore读取,排行榜保护
This commit is contained in:
@@ -7,7 +7,7 @@ import { handleCost } from '../../../services/rewardService';
|
||||
import { getTitle, getTeraph, gameData, getScollByStar } from '../../../pubUtils/data';
|
||||
import { SCHOOL, SCROLL } from '../../../pubUtils/dicParam';
|
||||
import { getTeraphAttr, getAtrrNameById } from '../../../consts/constModules/abilityConst'
|
||||
const _ = require('underscore');
|
||||
import { findIndex } from 'underscore';
|
||||
import { SclResultInter, SclPosInter } from '../../../pubUtils/interface';
|
||||
import { SchoolModel } from '../../../db/School';
|
||||
import { checkMaterialEnough } from '../../../services/roleService'
|
||||
@@ -103,7 +103,7 @@ export class RoleHandler {
|
||||
let roleId = session.get('roleId');
|
||||
let role = await RoleModel.findByRoleId(roleId);
|
||||
let sid: string = session.get('sid');
|
||||
let index = _.findIndex(role.teraphs, {id});
|
||||
let index = findIndex(role.teraphs, {id});
|
||||
if (index < 0)
|
||||
return resResult(STATUS.WRONG_PARMS);
|
||||
let teraph = role.teraphs[index];
|
||||
@@ -138,7 +138,7 @@ export class RoleHandler {
|
||||
let roleId = session.get('roleId');
|
||||
let role = await RoleModel.findByRoleId(roleId);
|
||||
let sid: string = session.get('sid');
|
||||
let index = _.findIndex(role.teraphs, {id});
|
||||
let index = findIndex(role.teraphs, {id});
|
||||
if (index < 0)
|
||||
return resResult(STATUS.WRONG_PARMS);
|
||||
let teraph = role.teraphs[index];
|
||||
|
||||
Reference in New Issue
Block a user