fix: “湖南省政府采购网”RSS源报错 #3488 (#3494)

This commit is contained in:
Bright-W
2019-11-26 14:53:26 +08:00
committed by DIYgod
parent 7dd0e2a2f6
commit d8433b92be
+2 -2
View File
@@ -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`,