diff --git a/src/app/play/page.tsx b/src/app/play/page.tsx index 9e11094..f3816e5 100644 --- a/src/app/play/page.tsx +++ b/src/app/play/page.tsx @@ -3887,20 +3887,53 @@ function PlayPageClient() { {/* 星级显示 */}
{[1, 2, 3, 4, 5].map((star) => { - const filled = star <= Math.round(doubanRating.value / 2); + const starValue = doubanRating.value / 2; // 转换为5星制 + const isFullStar = star <= Math.floor(starValue); + const isHalfStar = !isFullStar && star <= Math.ceil(starValue) && starValue % 1 >= 0.25; + return ( - - - +
+ {isFullStar ? ( + // 全星 + + + + ) : isHalfStar ? ( + // 半星 + <> + {/* 空星背景 */} + + + + {/* 半星遮罩 */} + + + + + ) : ( + // 空星 + + + + )} +
); })}