后台:增加热更新内容

This commit is contained in:
luying
2022-05-10 17:42:52 +08:00
parent 9658fd8059
commit b80466bb51

View File

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