后台:json上传
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// 排行榜表
|
||||
import { readJsonFile } from '../util'
|
||||
import { readFileAndParse } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicRank {
|
||||
@@ -13,14 +13,14 @@ export interface DicRank {
|
||||
|
||||
}
|
||||
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_RANK);
|
||||
let arr = JSON.parse(str);
|
||||
|
||||
export const dicRank = new Array<DicRank>();
|
||||
export function loadRank() {
|
||||
|
||||
arr.forEach(o => {
|
||||
dicRank.push(o);
|
||||
});
|
||||
let arr = readFileAndParse(FILENAME.DIC_RANK);
|
||||
|
||||
arr = undefined;
|
||||
arr.forEach(o => {
|
||||
dicRank.push(o);
|
||||
});
|
||||
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user