后台:跑马灯

This commit is contained in:
luying
2021-07-07 16:43:06 +08:00
parent a1aabfdd42
commit f45dd06621
6 changed files with 80 additions and 35 deletions

View File

@@ -32,9 +32,12 @@ export default class Game extends Service {
/**
* 获取正式服,测试服,开发服等环境
*/
public async getServerListByEnv(serverType?: string) {
const { ctx } = this;
const list = await ServerlistModel.findByServerType(serverType);
public async getServerListByEnv() {
const { ctx, app } = this;
let env = app.config.env
let serverEnv = await GameModel.getServerEnvList();
let curEnv = serverEnv.find(cur => cur.env == env);
const list = await ServerlistModel.findByServerType(curEnv?.serverType);
return ctx.service.utils.resResult(STATUS.SUCCESS, {
list