From 8efdffa78148cc98739f8d7b20f196d7da4a5bd6 Mon Sep 17 00:00:00 2001 From: Ethan Shen Date: Thu, 9 Jul 2020 10:53:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B4=A2=E8=81=94=E7=A4=BE=E5=A4=B4?= =?UTF-8?q?=E6=9D=A1=E6=9C=AA=E6=8E=A8=E9=80=81=20(#5154)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/cls/depth.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/routes/cls/depth.js b/lib/routes/cls/depth.js index 3158b0d6e..2673ab8ed 100644 --- a/lib/routes/cls/depth.js +++ b/lib/routes/cls/depth.js @@ -26,12 +26,20 @@ module.exports = async (ctx) => { url: link, }); - const list = response.data.data.depth_list.map((item) => ({ + let list = response.data.data.depth_list.map((item) => ({ title: item.title || item.brief, link: `https://www.cls.cn/detail/${item.id}`, pubDate: new Date(item.ctime * 1000).toUTCString(), })); + list = list.concat( + response.data.data.top_article.map((item) => ({ + title: item.title || item.brief, + link: `https://www.cls.cn/detail/${item.id}`, + pubDate: new Date(item.ctime * 1000).toUTCString(), + })) + ); + const items = await Promise.all( list.map( async (item) =>