任务:今日挑战区分累积型和去做型
This commit is contained in:
@@ -13,6 +13,8 @@ export interface DicTaskType {
|
||||
readonly param: string;
|
||||
// condition怎么填
|
||||
readonly condition: string;
|
||||
// 累积类型 1-累积型 2-去做型
|
||||
readonly sumType: number;
|
||||
}
|
||||
|
||||
const DicTaskTypeKeys: KeysEnum<DicTaskType> = {
|
||||
@@ -20,15 +22,19 @@ const DicTaskTypeKeys: KeysEnum<DicTaskType> = {
|
||||
name: true,
|
||||
info: true,
|
||||
param: true,
|
||||
condition: true
|
||||
condition: true,
|
||||
sumType: true,
|
||||
};
|
||||
|
||||
export const dicTaskTypeDesc = new Array<DicTaskType>();
|
||||
export const taskDescByType = new Map<number, DicTaskType>();
|
||||
export function loadTaskType() {
|
||||
dicTaskTypeDesc.splice(0, dicTaskTypeDesc.length);
|
||||
taskDescByType.clear();
|
||||
let arr = readFileAndParse(FILENAME.DIC_TASK_TYPE);
|
||||
arr.forEach(o => {
|
||||
dicTaskTypeDesc.push(_.pick(o, Object.keys(DicTaskTypeKeys)));
|
||||
taskDescByType.set(o.id, _.pick(o, Object.keys(DicTaskTypeKeys)));
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user