23 lines
473 B
TypeScript
23 lines
473 B
TypeScript
import { Service } from 'egg';
|
|
import { STATUS } from '@consts';
|
|
import { GameModel } from '@db/Game';
|
|
|
|
/**
|
|
* Test Service
|
|
*/
|
|
export default class Game extends Service {
|
|
|
|
/**
|
|
* 后台账号登录
|
|
*/
|
|
public async getServerEnv() {
|
|
const { ctx, app } = this;
|
|
const list = await GameModel.getServerEnvList();
|
|
|
|
return ctx.service.utils.resResult(STATUS.SUCCESS, {
|
|
list,
|
|
env: app.config.env
|
|
});
|
|
}
|
|
}
|