后台:权限
This commit is contained in:
@@ -96,6 +96,7 @@ import { dicGuildTrainInfo, loadGuildTrainInfo } from './dictionary/DicGuildTrai
|
||||
import { dicPvpDifficultRatio, loadPvpDifficultRatio } from './dictionary/DicPvpDifficultRatio';
|
||||
import { dicWhiteIp, loadWhiteIp } from './dictionary/DicWhiteIp';
|
||||
import { dicGuildWishReward, loadGuildWishReward } from './dictionary/DicGuildWishReward';
|
||||
import { dicApiById, dicApiByUrl, loadApi } from './dictionary/DicApi';
|
||||
import { pick } from "underscore";
|
||||
import _ = require("underscore");
|
||||
|
||||
@@ -242,6 +243,8 @@ export const gameData = {
|
||||
auctionTime: new Map<number, { hour: number, minute: number, seconds: number}>(),
|
||||
whiteip: dicWhiteIp,
|
||||
guildWishReward: dicGuildWishReward,
|
||||
apiById: dicApiById,
|
||||
apiByUrl: dicApiByUrl,
|
||||
};
|
||||
|
||||
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
||||
@@ -990,6 +993,7 @@ function loadDatas() {
|
||||
loadWhiteIp();
|
||||
treatTaskGroup();
|
||||
loadGuildWishReward();
|
||||
loadApi();
|
||||
}
|
||||
|
||||
// 重载dicParam
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import { readFileAndParse } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicApi {
|
||||
// id
|
||||
readonly id: number;
|
||||
// 消耗
|
||||
readonly api: string;
|
||||
// 描述
|
||||
readonly name: string;
|
||||
// 模块
|
||||
readonly module: string;
|
||||
// 类型 增删改查
|
||||
readonly type: string;
|
||||
}
|
||||
|
||||
export const dicApiByUrl = new Map<string, DicApi>();
|
||||
export const dicApiById = new Map<number, DicApi>();
|
||||
export function loadApi() {
|
||||
dicApiByUrl.clear();
|
||||
dicApiById.clear();
|
||||
let arr = readFileAndParse(FILENAME.DIC_API);
|
||||
arr.forEach(o => {
|
||||
dicApiByUrl.set(o.api, o);
|
||||
dicApiById.set(o.id, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user