后台:增加热更新内容
This commit is contained in:
@@ -76,6 +76,7 @@ export class UpdateRegionParams {
|
||||
remark: string = '';
|
||||
versionCode: number = 1;
|
||||
curVersion: string = '';
|
||||
updateResUrl: string = '';
|
||||
|
||||
maxPlayerCnt: number = 0;
|
||||
timers: SERVER_TIMER[] = [];
|
||||
@@ -94,7 +95,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) || !isString(this.curVersion)) {
|
||||
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) || !isString(this.curVersion) || !isString(this.updateResUrl)) {
|
||||
return false
|
||||
}
|
||||
return true;
|
||||
@@ -109,6 +110,7 @@ export class UpdateRegionParams {
|
||||
remark: this.remark,
|
||||
versionCode: this.versionCode,
|
||||
curVersion: this.curVersion,
|
||||
updateResUrl: this.updateResUrl,
|
||||
stategy
|
||||
}
|
||||
} else {
|
||||
@@ -119,6 +121,7 @@ export class UpdateRegionParams {
|
||||
remark: this.remark||oldRegion.remark,
|
||||
versionCode: this.versionCode||oldRegion.versionCode,
|
||||
curVersion: this.curVersion||oldRegion.curVersion,
|
||||
updateResUrl: this.updateResUrl||oldRegion.updateResUrl,
|
||||
stategy: { ...(oldRegion.stategy||{}), ...stategy }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user