聊天:部分配置读表
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// 聊天举报表
|
||||
import { readJsonFile } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicChatAccuse {
|
||||
|
||||
// 举报 id
|
||||
readonly id: number;
|
||||
// 举报名称
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_CHAT_ACCUSE);
|
||||
let arr = JSON.parse(str);
|
||||
|
||||
export const dicChatAccuse = new Map<number, DicChatAccuse>();
|
||||
|
||||
arr.forEach(o => {
|
||||
dicChatAccuse.set(o.id, o);
|
||||
});
|
||||
arr = undefined;
|
||||
Reference in New Issue
Block a user