From dced87f34c98ad98c882fc5d5c40a724c69e05f7 Mon Sep 17 00:00:00 2001 From: Archer_cdm Date: Wed, 23 Nov 2022 15:19:17 +0800 Subject: [PATCH] =?UTF-8?q?(*)=E4=BB=A3=E7=A0=81=E8=B5=B0=E6=9F=A5?= =?UTF-8?q?=E5=90=8E=E4=BF=AE=E6=94=B9=E8=B7=AF=E7=94=B1=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/report/index.js | 2 +- api/app/lib/routes/report/index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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