热更新版本号改为字符串格式
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ export default class Region extends BaseModel {
|
|||||||
versionCode: number; // 支持的最小版本号
|
versionCode: number; // 支持的最小版本号
|
||||||
|
|
||||||
@prop({ required: true })
|
@prop({ required: true })
|
||||||
curVersion: number; // 当前版本号
|
curVersion: string; // 当前版本号,格式 x.x.x.x
|
||||||
|
|
||||||
@prop({ required: true }) // 热更新资源根目录
|
@prop({ required: true }) // 热更新资源根目录
|
||||||
updateResUrl: string;
|
updateResUrl: string;
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export class UpdateRegionParams {
|
|||||||
prefix: string = ''; // 区名前缀
|
prefix: string = ''; // 区名前缀
|
||||||
remark: string = '';
|
remark: string = '';
|
||||||
versionCode: number = 1;
|
versionCode: number = 1;
|
||||||
curVersion: number = 0;
|
curVersion: string = '';
|
||||||
|
|
||||||
maxPlayerCnt: number = 0;
|
maxPlayerCnt: number = 0;
|
||||||
timers: SERVER_TIMER[] = [];
|
timers: SERVER_TIMER[] = [];
|
||||||
@@ -94,7 +94,7 @@ export class UpdateRegionParams {
|
|||||||
}
|
}
|
||||||
|
|
||||||
checkParams() {
|
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 false
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -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;
|
const ctx = this.ctx;
|
||||||
if (!env || !curVersion || !updateResUrl) return ctx.service.utils.resResult(STATUS.UPDATE_INFO_ERR);
|
if (!env || !curVersion || !updateResUrl) return ctx.service.utils.resResult(STATUS.UPDATE_INFO_ERR);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user