添加获取大区热更新地址的接口

This commit is contained in:
liangtongchuan
2022-05-05 20:01:55 +08:00
parent c4793c7e8a
commit c263c44a90
6 changed files with 33 additions and 2 deletions

View File

@@ -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 }
}
}