后台: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
@@ -1,5 +1,5 @@
// 远征点数奖励表
import { parseGoodStr, readJsonFile } from '../util';
import { parseGoodStr, readFileAndParse } from '../util';
import { FILENAME } from '../../consts';
import { RewardInter } from '../interface';
@@ -11,11 +11,14 @@ export interface DicExpeditionPoint {
}
const str = readJsonFile(FILENAME.DIC_EXPEDITION_POINT);
let arr = JSON.parse(str);
export const dicExpeditionPoint = new Map<number, DicExpeditionPoint>();
arr.forEach(o => {
o.reward = parseGoodStr(o.reward);
dicExpeditionPoint.set(o.point, o);
});
export function loadExpeditionPoint() {
let arr = readFileAndParse(FILENAME.DIC_EXPEDITION_POINT);
arr.forEach(o => {
o.reward = parseGoodStr(o.reward);
dicExpeditionPoint.set(o.point, o);
});
arr = undefined;
}