feat(兼容): 配表使用后台隐藏物品

This commit is contained in:
luying
2022-11-09 18:01:02 +08:00
parent 5d0873630a
commit 53d4af4e09
54 changed files with 768 additions and 102 deletions

View File

@@ -470,4 +470,29 @@ export class CreatePvpConfigParam {
let { seasonStartTime, seasonEndTime, seasonRewardTime, warIds } = this;
return { seasonStartTime, seasonEndTime, seasonRewardTime, warIds: parseNumberList(warIds)}
}
}
export class UpdateHiddenDataParam {
env: string = '';
arr: { type: number, id: number }[] = [];
publishTime: number = 0;
constructor(obj?: any) {
if(obj) {
for(let key in obj) {
this[key] = obj[key];
}
}
}
checkParams() {
// console.log('##### createNew', this.env, this.openTime, this.stopRegisterTime, this.hasOpenMail, this.hasCircleMail)
if(!isArray(this.arr)) return false;
for(let { type, id } of this.arr) {
if(!isNumber(type) || !isNumber(id)) return false;
}
if(!this.env || !isNumber(this.publishTime)) {
return false
}
return true;
}
}