// 开启功能表 import { readJsonFile } from '../util'; import { FILENAME } from '../../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 Map(); arr.forEach(o => { dicFuncSwitch.set(o.id, o); });