后台:json上传
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// 每日个人可领奖励
|
||||
import { readJsonFile, parseGoodStr } from '../util'
|
||||
import { readFileAndParse, parseGoodStr } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
|
||||
@@ -14,13 +14,14 @@ export interface DicGuildActiveDayReward {
|
||||
|
||||
}
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_ACTIVE_DAY_REWARD);
|
||||
let arr = JSON.parse(str);
|
||||
|
||||
export const dicGuildActiveDayReward = new Map<number, DicGuildActiveDayReward>();
|
||||
export function loadGuildActiveDayReward() {
|
||||
|
||||
arr.forEach(o => {
|
||||
o.reward = parseGoodStr(o.Reward)
|
||||
dicGuildActiveDayReward.set(o.id, o);
|
||||
});
|
||||
arr = undefined;
|
||||
let arr = readFileAndParse(FILENAME.DIC_ACTIVE_DAY_REWARD);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.reward = parseGoodStr(o.Reward)
|
||||
dicGuildActiveDayReward.set(o.id, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user