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