26 lines
534 B
TypeScript
26 lines
534 B
TypeScript
// 排行榜表
|
|
import { readFileAndParse } from '../util'
|
|
import { FILENAME } from '../../consts'
|
|
|
|
export interface DicRank {
|
|
|
|
// 排行榜id
|
|
readonly id: number;
|
|
// 属于哪个页签
|
|
readonly group: number;
|
|
// 总览中的位置
|
|
readonly general: number;
|
|
|
|
}
|
|
|
|
export const dicRank = new Array<DicRank>();
|
|
export function loadRank() {
|
|
dicRank.splice(0, dicRank.length);
|
|
let arr = readFileAndParse(FILENAME.DIC_RANK);
|
|
|
|
arr.forEach(o => {
|
|
dicRank.push(o);
|
|
});
|
|
|
|
arr = undefined;
|
|
} |