最低版本号
This commit is contained in:
@@ -74,6 +74,7 @@ export class UpdateRegionParams {
|
||||
name: string = ''; // 大区名
|
||||
prefix: string = ''; // 区名前缀
|
||||
remark: string = '';
|
||||
versionCode: number = 1;
|
||||
|
||||
maxPlayerCnt: number = 0;
|
||||
timers: SERVER_TIMER[] = [];
|
||||
@@ -92,7 +93,7 @@ export class UpdateRegionParams {
|
||||
}
|
||||
|
||||
checkParams() {
|
||||
if(!this.id || !this.name || !this.prefix || !this.maxPlayerCnt || !isArray(this.timers) || this.timers.length <= 0 || !isArray(this.activityGroupId) || this.activityGroupId.length <= 0 ) {
|
||||
if(!this.id || !this.name || !this.prefix || !this.maxPlayerCnt || !isArray(this.timers) || this.timers.length <= 0 || !isArray(this.activityGroupId) || this.activityGroupId.length <= 0 || !isNumber(this.versionCode)) {
|
||||
return false
|
||||
}
|
||||
return true;
|
||||
@@ -105,6 +106,7 @@ export class UpdateRegionParams {
|
||||
name: this.name,
|
||||
prefix: this.prefix,
|
||||
remark: this.remark,
|
||||
versionCode: this.versionCode,
|
||||
stategy
|
||||
}
|
||||
} else {
|
||||
@@ -113,6 +115,7 @@ export class UpdateRegionParams {
|
||||
name: this.name||oldRegion.name,
|
||||
prefix: this.prefix||oldRegion.prefix,
|
||||
remark: this.remark||oldRegion.remark,
|
||||
versionCode: this.versionCode||oldRegion.versionCode,
|
||||
stategy: { ...(oldRegion.stategy||{}), ...stategy }
|
||||
}
|
||||
}
|
||||
@@ -123,6 +126,7 @@ export class CreateRegionParam {
|
||||
name: string = ''; // 大区名
|
||||
prefix: string = ''; // 区名前缀
|
||||
remark: string = '';
|
||||
versionCode: number = 1;
|
||||
env: string = ''; // 环境变量
|
||||
gmLink: string; // 对应后台链接
|
||||
gameHost: string; // 长链接
|
||||
@@ -136,7 +140,7 @@ export class CreateRegionParam {
|
||||
}
|
||||
|
||||
checkParams() {
|
||||
if(!this.name || !this.prefix || !this.env || !this.gmLink || !this.gameHost || !this.gmPort || !this.webHost || !isNumber(this.gmPort) ) {
|
||||
if(!this.name || !this.prefix || !this.env || !this.gmLink || !this.gameHost || !this.gmPort || !this.webHost || !isNumber(this.gmPort) || !isNumber(this.versionCode)) {
|
||||
return false
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user