From b5afe6a25b603201e781df60e8288c337cb4dc2e Mon Sep 17 00:00:00 2001 From: mtvpls Date: Sun, 31 May 2026 09:03:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5=E5=8D=95?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=A4=B1=E8=B4=A5=E5=BD=B1=E5=93=8D=E5=85=A8?= =?UTF-8?q?=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/page.tsx | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index f22b2b9..c67c9b6 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -446,25 +446,45 @@ function HomeClient() { kind: 'movie', category: '热门', type: '全部', + }).catch((error) => { + console.error('获取热门电影数据失败:', error); + return null; + }), + getDoubanCategories({ + kind: 'tv', + category: 'tv', + type: 'tv', + }).catch((error) => { + console.error('获取热门剧集数据失败:', error); + return null; + }), + getDoubanCategories({ + kind: 'tv', + category: 'show', + type: 'show', + }).catch((error) => { + console.error('获取热门综艺数据失败:', error); + return null; + }), + GetBangumiCalendarData().catch((error) => { + console.error('获取新番放送数据失败:', error); + return []; }), - getDoubanCategories({ kind: 'tv', category: 'tv', type: 'tv' }), - getDoubanCategories({ kind: 'tv', category: 'show', type: 'show' }), - GetBangumiCalendarData(), ]); - if (moviesData.code === 200) { + if (moviesData?.code === 200) { setHotMovies(moviesData.list); if (moviesData.list && moviesData.list.length > 0) { setCache('homepage_movies', moviesData.list); } } - if (tvShowsData.code === 200) { + if (tvShowsData?.code === 200) { setHotTvShows(tvShowsData.list); if (tvShowsData.list && tvShowsData.list.length > 0) { setCache('homepage_tvshows', tvShowsData.list); } } - if (varietyShowsData.code === 200) { + if (varietyShowsData?.code === 200) { setHotVarietyShows(varietyShowsData.list); if (varietyShowsData.list && varietyShowsData.list.length > 0) { setCache('homepage_variety', varietyShowsData.list);