From 9c58618bf72f6ff645a56de4f439c256052fcb09 Mon Sep 17 00:00:00 2001 From: mtvpls Date: Sun, 28 Dec 2025 21:11:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=9B=B4=E5=A4=9A=E6=8E=A8?= =?UTF-8?q?=E8=8D=90=E6=97=A0=E6=95=B0=E6=8D=AE=E6=97=B6=E7=9A=84=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/play/page.tsx | 27 ++--------- src/components/SmartRecommendations.tsx | 59 ++++++++++++++----------- 2 files changed, 38 insertions(+), 48 deletions(-) diff --git a/src/app/play/page.tsx b/src/app/play/page.tsx index 4c65317..e308398 100644 --- a/src/app/play/page.tsx +++ b/src/app/play/page.tsx @@ -5351,29 +5351,10 @@ function PlayPageClient() { {/* 推荐区域 */} - {(videoDoubanId !== 0 || videoTitle) && ( -
-
- {/* 标题 */} -
-

- - - - 更多推荐 -

-
- - {/* 推荐内容 */} -
- -
-
-
- )} + {/* 豆瓣评论区域 */} {videoDoubanId !== 0 && enableComments && ( diff --git a/src/components/SmartRecommendations.tsx b/src/components/SmartRecommendations.tsx index 92506c2..97e42a3 100644 --- a/src/components/SmartRecommendations.tsx +++ b/src/components/SmartRecommendations.tsx @@ -238,35 +238,44 @@ export default function SmartRecommendations({ ); } - if (error) { - return ( -
- {error} -
- ); - } - - if (recommendations.length === 0) { + if (error || recommendations.length === 0) { return null; } return ( - - {recommendations.map((rec, index) => ( -
- +
+
+ {/* 标题 */} +
+

+ + + + 更多推荐 +

- ))} - + + {/* 推荐内容 */} +
+ + {recommendations.map((rec, index) => ( +
+ +
+ ))} +
+
+
+
); }