后台:json上传
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// 各种操作可以增加的活跃
|
||||
import { readJsonFile, decodeIdCntArrayStr } from '../util'
|
||||
import { readFileAndParse, decodeIdCntArrayStr } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicGuildActiveWays {
|
||||
@@ -13,14 +13,15 @@ export interface DicGuildActiveWays {
|
||||
|
||||
}
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_ARMY_ACTIVE_POINT_WAYS);
|
||||
let arr = JSON.parse(str);
|
||||
|
||||
export const dicGuildActiveWays = new Map<number, DicGuildActiveWays>();
|
||||
export function loadGuildActiveWays() {
|
||||
|
||||
arr.forEach(o => {
|
||||
o.activePoint = decodeIdCntArrayStr(o.activePoint, 1);
|
||||
if(!o.count) o.count = o.cout;
|
||||
dicGuildActiveWays.set(o.id, o);
|
||||
});
|
||||
arr = undefined;
|
||||
let arr = readFileAndParse(FILENAME.DIC_ARMY_ACTIVE_POINT_WAYS);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.activePoint = decodeIdCntArrayStr(o.activePoint, 1);
|
||||
if(!o.count) o.count = o.cout;
|
||||
dicGuildActiveWays.set(o.id, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user