添加获取大区热更新地址的接口
This commit is contained in:
@@ -75,6 +75,7 @@ export class UpdateRegionParams {
|
||||
prefix: string = ''; // 区名前缀
|
||||
remark: string = '';
|
||||
versionCode: number = 1;
|
||||
curVersion: number = 0;
|
||||
|
||||
maxPlayerCnt: number = 0;
|
||||
timers: SERVER_TIMER[] = [];
|
||||
@@ -93,7 +94,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 || !isNumber(this.versionCode)) {
|
||||
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) || !isNumber(this.curVersion)) {
|
||||
return false
|
||||
}
|
||||
return true;
|
||||
@@ -107,6 +108,7 @@ export class UpdateRegionParams {
|
||||
prefix: this.prefix,
|
||||
remark: this.remark,
|
||||
versionCode: this.versionCode,
|
||||
curVersion: this.curVersion,
|
||||
stategy
|
||||
}
|
||||
} else {
|
||||
@@ -116,6 +118,7 @@ export class UpdateRegionParams {
|
||||
prefix: this.prefix||oldRegion.prefix,
|
||||
remark: this.remark||oldRegion.remark,
|
||||
versionCode: this.versionCode||oldRegion.versionCode,
|
||||
curVersion: this.curVersion||oldRegion.curVersion,
|
||||
stategy: { ...(oldRegion.stategy||{}), ...stategy }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user