后台:json上传
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user