聊天:部分配置读表

This commit is contained in:
liangtongchuan
2021-03-23 12:22:41 +08:00
parent 3dbd9ba7bf
commit 470be1a72f
8 changed files with 68 additions and 82 deletions

View File

@@ -0,0 +1,21 @@
// 聊天模板表
import { readJsonFile } from '../util'
import { FILENAME } from '../../consts'
export interface DicChatSystem {
// 模板 id
readonly id: number;
// 模板名称
readonly name: string;
}
const str = readJsonFile(FILENAME.DIC_CHAT_SYSTEM);
let arr = JSON.parse(str);
export const dicChatSystem = new Map<number, DicChatSystem>();
arr.forEach(o => {
dicChatSystem.set(o.id, o);
});
arr = undefined;