feat: 微博的description和image (#2182)

This commit is contained in:
Wang Junyu 2019-05-20 14:51:15 +08:00 committed by DIYgod
parent fd32ab4d7d
commit eb97769a2b
1 changed files with 4 additions and 1 deletions

View File

@ -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) => {