后台:跑马灯
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user