后台:json上传
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { readJsonFile, parseGoodStr } from '../util'
|
||||
import { readFileAndParse, parseGoodStr } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
export interface DicPvpBox {
|
||||
@@ -9,12 +9,14 @@ export interface DicPvpBox {
|
||||
|
||||
}
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_PVP_BOX);
|
||||
let arr = JSON.parse(str);
|
||||
|
||||
export const dicPvpBoxs = new Array<DicPvpBox>();
|
||||
export function loadPvpBox() {
|
||||
|
||||
arr.forEach(o => {
|
||||
o.reward = parseGoodStr(o.reward);
|
||||
dicPvpBoxs.push(o);
|
||||
});
|
||||
let arr = readFileAndParse(FILENAME.DIC_PVP_BOX);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.reward = parseGoodStr(o.reward);
|
||||
dicPvpBoxs.push(o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user