添加字典表解析
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
// 开启功能表
|
||||
import { readJsonFile } from '../util';
|
||||
import { FILENAME } from '../../consts/consts';
|
||||
|
||||
export interface DicFuncSwitch {
|
||||
// 功能id
|
||||
readonly id: number;
|
||||
// 描述
|
||||
readonly desc: string;
|
||||
// 条件
|
||||
readonly conditionType: number;
|
||||
// 参数
|
||||
readonly param: number;
|
||||
// 客户端指令
|
||||
readonly script: string;
|
||||
|
||||
}
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_FUNC_SWITCH);
|
||||
let arr = JSON.parse(str);
|
||||
|
||||
export const dicFuncSwitch = new Array<DicFuncSwitch>();
|
||||
arr.forEach(o => {
|
||||
dicFuncSwitch.push(o);
|
||||
});
|
||||
Reference in New Issue
Block a user