后台:json上传
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// pvp三个对手
|
||||
import { readJsonFile, parseGoodStr } from '../util'
|
||||
import { readFileAndParse, parseGoodStr } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
|
||||
@@ -12,16 +12,17 @@ export interface DicPvpRefreshConsume {
|
||||
readonly consume: RewardInter[]
|
||||
}
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_PVP_REFRESH_CONSUME);
|
||||
let arr = JSON.parse(str);
|
||||
|
||||
export const dicPvpRefreshConsume = new Map<number, RewardInter[]>();
|
||||
export let maxPvpRefreshCnt = 0;
|
||||
export function loadPvpRefreshConsume() {
|
||||
|
||||
arr.forEach(o => {
|
||||
o.consume = parseGoodStr(o.consume);
|
||||
if(o.count > maxPvpRefreshCnt) maxPvpRefreshCnt = o.count;
|
||||
dicPvpRefreshConsume.set(o.count, o.consume);
|
||||
});
|
||||
let arr = readFileAndParse(FILENAME.DIC_PVP_REFRESH_CONSUME);
|
||||
|
||||
arr = undefined;
|
||||
arr.forEach(o => {
|
||||
o.consume = parseGoodStr(o.consume);
|
||||
if(o.count > maxPvpRefreshCnt) maxPvpRefreshCnt = o.count;
|
||||
dicPvpRefreshConsume.set(o.count, o.consume);
|
||||
});
|
||||
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user