From eb97769a2b4bc9438bb2a012d46e3f2d0c7def78 Mon Sep 17 00:00:00 2001 From: Wang Junyu Date: Mon, 20 May 2019 14:51:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BE=AE=E5=8D=9A=E7=9A=84description?= =?UTF-8?q?=E5=92=8Cimage=20(#2182)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/weibo/user.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/routes/weibo/user.js b/lib/routes/weibo/user.js index 75a2a05b6..47f9ac81b 100644 --- a/lib/routes/weibo/user.js +++ b/lib/routes/weibo/user.js @@ -13,6 +13,8 @@ module.exports = async (ctx) => { }, }); const name = containerResponse.data.data.userInfo.screen_name; + const description = containerResponse.data.data.userInfo.description; + const profileImageUrl = containerResponse.data.data.userInfo.profile_image_url; const containerid = containerResponse.data.data.tabsInfo.tabs[1].containerid; const response = await axios({ @@ -29,7 +31,8 @@ module.exports = async (ctx) => { ctx.state.data = { title: `${name}的微博`, link: `http://weibo.com/${uid}/`, - description: `${name}的微博`, + description: description, + image: profileImageUrl, item: response.data.data.cards .filter((item) => item.mblog && !item.mblog.isTop) .map((item) => {