后台:拉取物品表
This commit is contained in:
@@ -20,6 +20,12 @@ export default class GameController extends Controller {
|
||||
return
|
||||
}
|
||||
|
||||
public async getDicGoods() {
|
||||
const { ctx } = this;
|
||||
ctx.body = await ctx.service.game.getDicGoods();
|
||||
return
|
||||
}
|
||||
|
||||
public async getDicRMB() {
|
||||
const { ctx } = this;
|
||||
ctx.body = await ctx.service.game.getDicRmb();
|
||||
|
||||
@@ -45,6 +45,7 @@ export default (app: Application) => {
|
||||
|
||||
router.post('/api/game/getserverenv', tokenParser, controller.game.getServerEnv);
|
||||
router.post('/api/game/getserverlistbyenv', controller.game.getServerListByEnv);
|
||||
router.post('/api/game/getdicgoods', controller.game.getDicGoods);
|
||||
router.post('/api/game/getdichero', controller.game.getDicHero);
|
||||
router.post('/api/game/getdicrmb', controller.game.getDicRMB);
|
||||
router.post('/api/game/getdicactivitytype', controller.game.getDicActivityType);
|
||||
|
||||
@@ -54,6 +54,18 @@ export default class Game extends Service {
|
||||
})
|
||||
}
|
||||
|
||||
public async getDicGoods() {
|
||||
let list = [];
|
||||
for(let [_, { good_id, name, pieceId, quality, itid, image_id }] of gameData.goods) {
|
||||
list.push({
|
||||
good_id, name, pieceId, quality, itid, image_id
|
||||
})
|
||||
}
|
||||
return this.ctx.service.utils.resResult(STATUS.SUCCESS, {
|
||||
list
|
||||
})
|
||||
}
|
||||
|
||||
public async getDicRmb() {
|
||||
let list: DicRMB[] = [];
|
||||
for(let [_, dicRmb] of gameData.rmb) {
|
||||
|
||||
Reference in New Issue
Block a user