fix(bilibili/dynamic): update getImgs function to handle image URLs correctly

This commit is contained in:
DIYgod
2025-09-15 15:48:41 +08:00
parent f45bc3402e
commit 7adddbcb7e
+3 -7
View File
@@ -135,12 +135,6 @@ const getImgs = (data?: Modules) => {
if (!major) {
return '';
}
// 投稿视频
if (major.archive?.cover) {
imgUrls.push({
url: major.archive.cover,
});
}
// 动态图片
if (major.opus?.pics?.length) {
imgUrls.push(
@@ -177,7 +171,9 @@ const getImgs = (data?: Modules) => {
}
const type = major.type.replace('MAJOR_TYPE_', '').toLowerCase();
if (major[type]?.cover) {
imgUrls.push(major[type].cover);
imgUrls.push({
url: major[type]?.cover,
});
}
return imgUrls
.filter(Boolean)