From 9486a99a955f8fe506d6456172774dd449c968c1 Mon Sep 17 00:00:00 2001 From: liangtongchuan Date: Fri, 6 May 2022 12:28:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=83=AD=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=E6=94=B9=E4=B8=BA=E5=AD=97=E7=AC=A6=E4=B8=B2=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/db/Region.ts | 2 +- shared/domain/backEndField/params.ts | 4 ++-- web-server/app/service/Update.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shared/db/Region.ts b/shared/db/Region.ts index 36f813adc..d1ad3ec67 100644 --- a/shared/db/Region.ts +++ b/shared/db/Region.ts @@ -43,7 +43,7 @@ export default class Region extends BaseModel { versionCode: number; // 支持的最小版本号 @prop({ required: true }) - curVersion: number; // 当前版本号 + curVersion: string; // 当前版本号,格式 x.x.x.x @prop({ required: true }) // 热更新资源根目录 updateResUrl: string; diff --git a/shared/domain/backEndField/params.ts b/shared/domain/backEndField/params.ts index 5ad2cb151..db05c439b 100644 --- a/shared/domain/backEndField/params.ts +++ b/shared/domain/backEndField/params.ts @@ -75,7 +75,7 @@ export class UpdateRegionParams { prefix: string = ''; // 区名前缀 remark: string = ''; versionCode: number = 1; - curVersion: number = 0; + curVersion: string = ''; maxPlayerCnt: number = 0; timers: SERVER_TIMER[] = []; @@ -94,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) || !isNumber(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)) { return false } return true; diff --git a/web-server/app/service/Update.ts b/web-server/app/service/Update.ts index 8adc313a2..55c0624bf 100644 --- a/web-server/app/service/Update.ts +++ b/web-server/app/service/Update.ts @@ -23,7 +23,7 @@ export default class Update extends Service { }); } - public async getUpdateUrl(env: string, curVersion: number, updateResUrl: string) { + public async getUpdateUrl(env: string, curVersion: string, updateResUrl: string) { const ctx = this.ctx; if (!env || !curVersion || !updateResUrl) return ctx.service.utils.resResult(STATUS.UPDATE_INFO_ERR);