20 lines
420 B
TypeScript
20 lines
420 B
TypeScript
// 邮件内容
|
|
import {readJsonFile} from '../util'
|
|
import { FILENAME } from '../../consts'
|
|
|
|
export interface DicMail {
|
|
// id MAIL_TYPE
|
|
readonly id: number;
|
|
// 内容 %d 替换
|
|
readonly content: string;
|
|
}
|
|
|
|
const str = readJsonFile(FILENAME.DIC_MAIL);
|
|
let arr = JSON.parse(str);
|
|
|
|
export const dicMail = new Map<number, string>();
|
|
|
|
arr.forEach(o => {
|
|
dicMail.set(o.id, o.content);
|
|
});
|
|
arr = undefined; |