添加获取大区热更新地址的接口
This commit is contained in:
@@ -22,5 +22,17 @@ export default class Update extends Service {
|
||||
remoteVersionUrl: 'http://zyz-hot-update.trgame.cn/version.manifest'
|
||||
});
|
||||
}
|
||||
|
||||
public async getUpdateUrl(env: string, curVersion: number, updateResUrl: string) {
|
||||
const ctx = this.ctx;
|
||||
if (!env || !curVersion || !updateResUrl) return ctx.service.utils.resResult(STATUS.UPDATE_INFO_ERR);
|
||||
|
||||
const baseUrl = `${updateResUrl}/${env}/${curVersion}`;
|
||||
return ctx.service.utils.resResult(STATUS.SUCCESS, {
|
||||
packageUrl: baseUrl,
|
||||
remoteManifestUrl: `${baseUrl}/project.manifest`,
|
||||
remoteVersionUrl: `${baseUrl}/version.manifest`
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user