后台:添加设置武将星级

This commit is contained in:
luying
2022-01-17 16:13:49 +08:00
parent 1d1fd68160
commit 683dfeda81
8 changed files with 92 additions and 35 deletions
+26
View File
@@ -288,4 +288,30 @@ export class GuildFormParam {
if(this.donate && !isNumber(this.donate)) return false;
return true;
}
}
export class SetHeroParam {
lv?: number;
expInc?: number;
star?: number;
quality?: number;
colorStar?: number;
job?: number;
constructor(obj?: any) {
if(obj) {
for(let key in obj) {
this[key] = obj[key];
}
}
}
checkParams() {
if(this.lv && !isNumber(this.lv)) return false;
if(this.expInc && !isNumber(this.expInc)) return false;
if(this.star && !isNumber(this.star)) return false;
if(this.quality && !isNumber(this.quality)) return false;
if(this.colorStar && !isNumber(this.colorStar)) return false;
return true;
}
}