From d8433b92be07f7bca4cd83863528a2a564c72feb Mon Sep 17 00:00:00 2001 From: Bright-W Date: Tue, 26 Nov 2019 14:53:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E2=80=9C=E6=B9=96=E5=8D=97=E7=9C=81?= =?UTF-8?q?=E6=94=BF=E5=BA=9C=E9=87=87=E8=B4=AD=E7=BD=91=E2=80=9DRSS?= =?UTF-8?q?=E6=BA=90=E6=8A=A5=E9=94=99=20#3488=20(#3494)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/gov/hunan/notice.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/gov/hunan/notice.js b/lib/routes/gov/hunan/notice.js index 77d554c2c7..d1d8133059 100644 --- a/lib/routes/gov/hunan/notice.js +++ b/lib/routes/gov/hunan/notice.js @@ -59,8 +59,8 @@ module.exports = async (ctx) => { // 结束rssData定义 // 配置api日期参数 const now = new Date(); - const startDate = now.getFullYear() + '-' + now.getMonth() + '-01'; - const endDate = now.toLocaleDateString().replace(/\//g, '-'); + const startDate = now.getFullYear() + '-01-01'; + const endDate = now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate(); rssData.apiResponse = await got({ method: 'post', url: `http://www.ccgp-hunan.gov.cn/mvc/getNoticeList4Web.do?nType=${rssData.typeid(type)}&startDate=${startDate}&endDate=${endDate}&page=1&pageSize=18`,