后台:json上传

This commit is contained in:
luying
2021-05-12 18:56:47 +08:00
parent 2fc5017af8
commit 148a11edab
102 changed files with 1675 additions and 1117 deletions
+9 -9
View File
@@ -1,5 +1,5 @@
// 邮件内容
import {readJsonFile} from '../util'
import {readFileAndParse} from '../util'
import { FILENAME } from '../../consts'
export interface DicMail {
@@ -10,13 +10,13 @@ export interface DicMail {
readonly time: number;
}
const str = readJsonFile(FILENAME.DIC_MAIL);
let arr = JSON.parse(str);
export const dicMail = new Map<number, DicMail>();
export function loadMail() {
arr.forEach(o => {
o.time = o.time * 24 * 60 * 60;
dicMail.set(o.id, o);
});
arr = undefined;
let arr = readFileAndParse(FILENAME.DIC_MAIL);
arr.forEach(o => {
o.time = o.time * 24 * 60 * 60;
dicMail.set(o.id, o);
});
arr = undefined;
}