首页视频卡片增加评分

This commit is contained in:
mtvpls
2025-12-26 23:54:27 +08:00
parent fb9f55136d
commit 83bbf78545
3 changed files with 9 additions and 1 deletions

View File

@@ -315,6 +315,7 @@ function HomeClient() {
poster={movie.poster}
title={movie.title}
year={movie.year}
rate={movie.rate}
type='movie'
from='douban'
/>
@@ -471,6 +472,7 @@ function HomeClient() {
poster={tvShow.poster}
title={tvShow.title}
year={tvShow.year}
rate={tvShow.rate}
type='tv'
from='douban'
/>
@@ -514,6 +516,7 @@ function HomeClient() {
poster={varietyShow.poster}
title={varietyShow.title}
year={varietyShow.year}
rate={varietyShow.rate}
type='tv'
from='douban'
/>

View File

@@ -111,6 +111,11 @@ export default function PrivateLibraryPage() {
title={video.title}
poster={video.poster}
year={video.releaseDate.split('-')[0]}
rate={
video.voteAverage && video.voteAverage > 0
? video.voteAverage.toFixed(1)
: ''
}
from='search'
/>
))}

View File

@@ -389,7 +389,7 @@ const VideoCard = forwardRef<VideoCardHandle, VideoCardProps>(function VideoCard
showHeart: true, // 移动端菜单中需要显示收藏选项
showCheckCircle: false,
showDoubanLink: true, // 移动端菜单中显示豆瓣链接
showRating: false,
showRating: !!rate,
showYear: true,
},
douban: {