From b0f07e7a876a1b4abe80369491d16448bfb9f99c Mon Sep 17 00:00:00 2001 From: Bright-W Date: Fri, 29 Nov 2019 02:30:49 +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=E9=87=8D=E5=A4=8D=20(#3501)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update notice.js * Update notice.js * fix: “湖南省政府采购网”RSS源重复 --- 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 d1d8133059..4382555bef 100644 --- a/lib/routes/gov/hunan/notice.js +++ b/lib/routes/gov/hunan/notice.js @@ -35,7 +35,7 @@ module.exports = async (ctx) => { return htmlContent; }, ItemsSingle: async function(item) { - const cache = await ctx.cache.get(rssData.itemUrl); + const cache = await ctx.cache.get(rssData.itemUrl + item.NOTICE_ID); if (cache) { return Promise.resolve(JSON.parse(cache)); } @@ -49,7 +49,7 @@ module.exports = async (ctx) => { category: item.NOTICE_NAME, pubDate: new Date(`${item.NEWWORK_DATE} GMT`).toUTCString(), }; - ctx.cache.set(rssData.itemUrl, JSON.stringify(single)); + ctx.cache.set(rssData.itemUrl + item.NOTICE_ID, JSON.stringify(single)); return Promise.resolve(single); }, referUrl: `http://www.ccgp-hunan.gov.cn/page/notice/more.jsp`,