后台: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
+10 -10
View File
@@ -1,5 +1,5 @@
// 武将特技表
import { readJsonFile, parseNumberList } from '../util'
import { readFileAndParse, parseNumberList } from '../util'
import { FILENAME } from '../../consts'
export interface DicSe {
@@ -20,14 +20,14 @@ export interface DicSe {
readonly index: number;
}
const str = readJsonFile(FILENAME.DIC_SE);
let arr = JSON.parse(str);
export const dicSe = new Map<number, DicSe>();
export function loadSe() {
let arr = readFileAndParse(FILENAME.DIC_SE);
arr.forEach(o => {
o.index = 0;
o.gainValueArr = parseNumberList(o.gainvalue)
dicSe.set(o.id, o);
});
arr.forEach(o => {
o.index = 0;
o.gainValueArr = parseNumberList(o.gainvalue)
dicSe.set(o.id, o);
});
arr = undefined;
}