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`,