后台: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 -8
View File
@@ -1,4 +1,4 @@
import { readJsonFile, parseGoodStr } from '../util'
import { readFileAndParse, parseGoodStr } from '../util'
import { FILENAME } from '../../consts'
import { RewardInter } from '../interface';
@@ -11,11 +11,13 @@ export interface DicHeroRewads {
}
const str = readJsonFile(FILENAME.DIC_PVP_HERO_REWARD);
let arr = JSON.parse(str);
export const dicHeroRewads = new Array<DicHeroRewads>();
arr.forEach(o => {
o.reward = parseGoodStr(o.reward);
dicHeroRewads.push(o);
});
export function loadPvpHeroReward() {
let arr = readFileAndParse(FILENAME.DIC_PVP_HERO_REWARD);
arr.forEach(o => {
o.reward = parseGoodStr(o.reward);
dicHeroRewads.push(o);
});
arr = undefined;
}