From 2e8ee2eb64207fa80687697388746e38d208ee7d Mon Sep 17 00:00:00 2001 From: 3970260761 <3970260761@qq.com> Date: Sat, 7 Nov 2026 18:43:24 +0800 Subject: [PATCH] =?UTF-8?q?fixed70:=20=E6=9C=80=E6=96=B0=E6=B8=AF=E5=89=A7?= =?UTF-8?q?10=E4=B8=AA+=E5=8A=A0=E8=BD=BD=E9=AA=A8=E6=9E=B6=E5=8D=A0?= =?UTF-8?q?=E4=BD=8D(=E4=B8=8E=E7=83=AD=E9=97=A8=E6=A0=8F=E7=9B=AE?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E5=87=BA=E7=8E=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- src/components/HkDramaRow.tsx | 23 +++++++++++++++++++---- src/components/TopRightButtons.tsx | 2 +- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index dcf3e1d..ea26d50 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,7 +51,7 @@ ENV NODE_ENV=production ENV HOSTNAME=0.0.0.0 ENV PORT=3000 ENV DOCKER_ENV=true -ENV NEXT_PUBLIC_SITE_VERSION=fixed69 +ENV NEXT_PUBLIC_SITE_VERSION=fixed70 # 从构建器中复制 standalone 输出 COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ diff --git a/src/components/HkDramaRow.tsx b/src/components/HkDramaRow.tsx index cf14bb3..74fa4e6 100644 --- a/src/components/HkDramaRow.tsx +++ b/src/components/HkDramaRow.tsx @@ -12,8 +12,11 @@ type VodItem = { vod_time?: string; }; +const SHOW_COUNT = 10; + export default function HkDramaRow() { const [items, setItems] = useState([]); + const [loading, setLoading] = useState(true); useEffect(() => { fetch('/api/tvbox/all?ac=videolist&t=902&pg=1&by=time') @@ -28,12 +31,14 @@ export default function HkDramaRow() { String(a.vod_time || '') ); }); - setItems(arr.slice(0, 5)); + setItems(arr.slice(0, SHOW_COUNT)); }) - .catch(() => {}); + .catch(() => {}) + .finally(() => setLoading(false)); }, []); - if (!items.length) return null; + // 加载失败且无数据时不占位;加载中显示骨架占位,与其它栏目同时出现 + if (!loading && !items.length) return null; return (
@@ -49,7 +54,17 @@ export default function HkDramaRow() {
- {items.map((v) => { + {loading + ? // 加载中显示10个占位,与热门电影/剧集同时出现,避免后半拍跳动 + Array.from({ length: SHOW_COUNT }).map((_, index) => ( +
+
+
+
+
+
+ )) + : items.map((v) => { const key = String(v.vod_id || ''); const sep = key.indexOf(':'); const ks = sep > 0 ? key.slice(0, sep) : ''; diff --git a/src/components/TopRightButtons.tsx b/src/components/TopRightButtons.tsx index 4e18f3b..3031005 100644 --- a/src/components/TopRightButtons.tsx +++ b/src/components/TopRightButtons.tsx @@ -37,7 +37,7 @@ export default function TopRightButtons({ variant = 'bar' }: TopRightButtonsProp className='hidden lg:inline-flex shrink-0 items-center select-none rounded-lg px-2 py-1.5 text-xs font-bold tracking-wide text-purple-600 dark:text-purple-400 bg-purple-500/10 border border-purple-500/20' title='米视TV 当前版本' > - v{process.env.NEXT_PUBLIC_SITE_VERSION || 'fixed69'} + v{process.env.NEXT_PUBLIC_SITE_VERSION || 'fixed70'}