后台:添加查询taskType

This commit is contained in:
luying
2021-06-04 11:10:28 +08:00
parent 95621b827e
commit f77de8eb78
6 changed files with 55 additions and 2 deletions
+6
View File
@@ -31,4 +31,10 @@ export default class GameController extends Controller {
ctx.body = await ctx.service.game.getDicActivityType();
return
}
public async getDicTaskType() {
const { ctx } = this;
ctx.body = await ctx.service.game.getDicTaskType();
return
}
}
+1
View File
@@ -48,6 +48,7 @@ export default (app: Application) => {
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/game/getdictasktype', controller.game.getDicTaskType);
router.post('/api/activity/getactivitylist', controller.activity.getActivityList);
router.post('/api/activity/updateactivity', controller.activity.updateActivity);
+8
View File
@@ -6,6 +6,7 @@ import { gameData } from '@pubUtils/data';
import { DicHero } from '@pubUtils/dictionary/DicHero';
import { DicRMB } from '@pubUtils/dictionary/DicRMB';
import { DicActivityType } from '@pubUtils/dictionary/DicActivityType';
import { DicTaskType } from '@pubUtils/dictionary/DicTaskType';
/**
* Test Service
@@ -69,4 +70,11 @@ export default class Game extends Service {
list
})
}
public async getDicTaskType() {
let list: DicTaskType[] = gameData.taskTypeDesc;
return this.ctx.service.utils.resResult(STATUS.SUCCESS, {
list
})
}
}