From 1fd6968238166f000b70ef463a55258d6e2547f9 Mon Sep 17 00:00:00 2001 From: mtvpls Date: Sun, 14 Dec 2025 20:45:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=96=B0=E7=95=AA=E6=94=BE?= =?UTF-8?q?=E9=80=81=E6=A8=A1=E5=9D=97=E7=A7=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/page.tsx | 152 +++++++++++++++++++++++------------------------ 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 44d026e..1430e45 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -286,6 +286,82 @@ function HomeClient() { + {/* 每日新番放送 */} +
+
+

+ 新番放送 +

+ + 查看更多 + + +
+ + {loading + ? // 加载状态显示灰色占位数据 + Array.from({ length: 8 }).map((_, index) => ( +
+
+
+
+
+
+ )) + : // 展示当前日期的番剧 + (() => { + // 获取当前日期对应的星期 + const today = new Date(); + const weekdays = [ + 'Sun', + 'Mon', + 'Tue', + 'Wed', + 'Thu', + 'Fri', + 'Sat', + ]; + const currentWeekday = weekdays[today.getDay()]; + + // 找到当前星期对应的番剧数据,并过滤掉没有图片的 + const todayAnimes = + bangumiCalendarData + .find((item) => item.weekday.en === currentWeekday) + ?.items.filter((anime) => anime.images) || []; + + return todayAnimes.map((anime, index) => ( +
+ +
+ )); + })()} +
+
+ {/* 热门剧集 */}
@@ -371,82 +447,6 @@ function HomeClient() { ))}
- - {/* 每日新番放送 */} -
-
-

- 新番放送 -

- - 查看更多 - - -
- - {loading - ? // 加载状态显示灰色占位数据 - Array.from({ length: 8 }).map((_, index) => ( -
-
-
-
-
-
- )) - : // 展示当前日期的番剧 - (() => { - // 获取当前日期对应的星期 - const today = new Date(); - const weekdays = [ - 'Sun', - 'Mon', - 'Tue', - 'Wed', - 'Thu', - 'Fri', - 'Sat', - ]; - const currentWeekday = weekdays[today.getDay()]; - - // 找到当前星期对应的番剧数据,并过滤掉没有图片的 - const todayAnimes = - bangumiCalendarData - .find((item) => item.weekday.en === currentWeekday) - ?.items.filter((anime) => anime.images) || []; - - return todayAnimes.map((anime, index) => ( -
- -
- )); - })()} -
-
)}