feat(route)(weibo): add article pic (#9192)

Signed-off-by: Rongrong <15956627+Rongronggg9@users.noreply.github.com>
This commit is contained in:
Rongrong
2022-02-24 14:41:02 -09:00
committed by GitHub
parent 6504724e1b
commit 08784f181a
+16
View File
@@ -83,6 +83,22 @@ const weiboUtils = {
html = usernameAndAvatar + html;
}
// 添加文章头图
if (status.page_info && status.page_info.type === 'article' && status.page_info.page_pic && status.page_info.page_pic.url) {
// 如果以后后续流程会用到其他字段,记得修改这里
const pagePic = {
large: {
url: status.page_info.page_pic.url,
},
};
// 文章微博本身是没有配图的,但还是要以防万一
if (status.pics) {
status.pics.push(pagePic);
} else {
status.pics = [pagePic];
}
}
// 添加微博配图
if (status.pics) {
if (readable) {