更新:接口

This commit is contained in:
qiaoxin
2021-08-17 18:34:35 +08:00
parent a785644cbb
commit 13d55ca5c0
6 changed files with 45 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
import { STATUS, } from '@consts';
import { Service } from 'egg';
// let fs = require("fs");
// const HOT_URL = 'http://zyz-hot-update.trgame.cn/version.manifest'
/**
* UpdateRes Service
*/
export default class Update extends Service {
/**
* 获取版本号
* @param version - 客户端版本号
*/
public async getVersion(version: string) {
const ctx = this.ctx;
console.log('client version: ', version);
return ctx.service.utils.resResult(STATUS.SUCCESS, {
packageUrl: 'http://zyz-hot-update.trgame.cn/',
remoteManifestUrl: 'http://zyz-hot-update.trgame.cn/project.manifest',
remoteVersionUrl: 'http://zyz-hot-update.trgame.cn/version.manifest'
});
}
}