后台:添加活动类型表

This commit is contained in:
luying
2021-06-01 19:32:52 +08:00
parent 0a5f3960eb
commit 6feaedff5b
6 changed files with 52 additions and 2 deletions

View File

@@ -25,4 +25,10 @@ export default class GameController extends Controller {
ctx.body = await ctx.service.game.getDicRmb();
return
}
public async getDicActivityType() {
const { ctx } = this;
ctx.body = await ctx.service.game.getDicActivityType();
return
}
}

View File

@@ -47,6 +47,7 @@ export default (app: Application) => {
router.post('/api/game/getserverlistbyenv', controller.game.getServerListByEnv);
router.post('/api/game/getdichero', controller.game.getDicHero);
router.post('/api/game/getdicrmb', controller.game.getDicRMB);
router.post('/api/game/getdicactivitytype', controller.game.getDicActivityType);
router.post('/api/activity/getactivitylist', controller.activity.getActivityList);
router.post('/api/activity/updateactivity', controller.activity.updateActivity);

View File

@@ -5,6 +5,7 @@ import { ServerlistModel } from '@db/Serverlist';
import { gameData } from '@pubUtils/data';
import { DicHero } from '@pubUtils/dictionary/DicHero';
import { DicRMB } from '@pubUtils/dictionary/DicRMB';
import { DicActivityType } from '@pubUtils/dictionary/DicActivityType';
/**
* Test Service
@@ -62,4 +63,10 @@ export default class Game extends Service {
})
}
public async getDicActivityType() {
let list: DicActivityType[] = gameData.activityType;
return this.ctx.service.utils.resResult(STATUS.SUCCESS, {
list
})
}
}