// 每日总表 import { readJsonFile, parseNumberList } from '../util' import { FILENAME } from '../../consts' export interface DicDaily { // 每日类型 readonly dailyType: number; // 每日类型名称 readonly name: string; // 每天可以挑战的次数 readonly timesPerDay: number; // 每天可以购买的次数 readonly timesCanBuy: number; // 难度 readonly difficultLvl: Array; } const str = readJsonFile(FILENAME.DIC_DAILY); let arr = JSON.parse(str); export const dicDaily = new Array(); arr.forEach(o => { o.difficultLvl = parseNumberList(o.difficultLvl); dicDaily.push(o); });