diff --git a/api/app/lib/controllers/report/index.js b/api/app/lib/controllers/report/index.js index ccf3581..53c9547 100644 --- a/api/app/lib/controllers/report/index.js +++ b/api/app/lib/controllers/report/index.js @@ -2,7 +2,7 @@ // 查询储备项目统计表 async function getReserveItemReport(ctx, next) { - const { type } = ctx.request.query; + const { type } = ctx.params; let rslt = null; try { rslt = await ctx.fs.dc.models.ReserveItemReport.findAll({ diff --git a/api/app/lib/routes/report/index.js b/api/app/lib/routes/report/index.js index 62b9527..0d4e04f 100644 --- a/api/app/lib/routes/report/index.js +++ b/api/app/lib/routes/report/index.js @@ -3,6 +3,6 @@ const report = require('../../controllers/report'); module.exports = function (app, router, opts) { - app.fs.api.logAttr['GET/getReserveItemReport'] = { content: '查询储备项目统计表', visible: false }; - router.get('/getReserveItemReport', report.getReserveItemReport); + app.fs.api.logAttr['GET/reserveItem/report/:type'] = { content: '查询储备项目统计表', visible: false }; + router.get('/reserveItem/report/:type', report.getReserveItemReport); }; \ No newline at end of file