From 421328c6cbbb3aa4bce71c846d5f8c5acb68e1a3 Mon Sep 17 00:00:00 2001 From: 3970260761 <3970260761@qq.com> Date: Sun, 8 Nov 2026 23:05:38 +0800 Subject: [PATCH] =?UTF-8?q?fixed85-94:=20filter=E5=88=86=E9=A1=B5/?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=88=86=E9=A1=B5/=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=A1=B5=E8=BF=94=E5=9B=9E=E4=B8=8E=E9=9D=99=E9=9F=B3/?= =?UTF-8?q?=E5=8A=A8=E6=BC=AB=E5=88=86=E7=B1=BB=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- live-inject.js | 4 ++-- src/app/douban/page.tsx | 10 ++++++---- src/app/filter/page.tsx | 28 +++++++++++----------------- src/app/live/page.tsx | 24 ++++++++++++------------ src/app/search/page.tsx | 14 ++++++++++++++ src/components/MobileBottomNav.tsx | 11 +++++++++-- src/components/PageLayout.tsx | 7 ++++++- 8 files changed, 61 insertions(+), 39 deletions(-) diff --git a/Dockerfile b/Dockerfile index a615af5..dc0a5e1 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=fixed78 +ENV NEXT_PUBLIC_SITE_VERSION=fixed94 # 从构建器中复制 standalone 输出 COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ diff --git a/live-inject.js b/live-inject.js index cca00e4..bb2c40d 100644 --- a/live-inject.js +++ b/live-inject.js @@ -163,7 +163,7 @@ select{background:#171b24;color:#e5e7eb;border:1px solid #2a3140;border-radius:6 .sec{font-size:13px;color:#6b7280;margin:2px 0 8px} .empty{color:#6b7280;font-size:13px;padding:20px 0;text-align:center} -
‹

电视直播 · 港澳台

⭐ 开源地址 +
‹

电视直播 · 港澳台

⭐ 开源地址
TVBox / 影视仓 · 接入直播
配置地址(含直播,推荐)—
@@ -306,7 +306,7 @@ function loadChs(retry){fetch(API+'channels').then(function(r){return r.json()}) grid.appendChild(h);grid.appendChild(box); }); var DEF=chs.find(function(c){return c.id==='5'})||chs.find(function(c){return (c.name||'').indexOf('翡翠')>=0})||chs[0]; - if(DEF){pick(DEF.id,1)} + if(DEF){pick(DEF.id,0)} }).catch(function(){if(retry<3){grid.innerHTML='
加载中…
';setTimeout(function(){loadChs(retry+1)},3000)}else{grid.innerHTML='
加载失败,请刷新
'}})} loadChs(0); `; diff --git a/src/app/douban/page.tsx b/src/app/douban/page.tsx index 8f5c18e..1d1b470 100644 --- a/src/app/douban/page.tsx +++ b/src/app/douban/page.tsx @@ -27,12 +27,14 @@ function DoubanPageClient() { const debounceTimeoutRef = useRef(null); const type = searchParams.get('type') || 'movie'; + const catParam = searchParams.get('cat') || ''; // 选择器状态 - 完全独立,不依赖URL参数 const [primarySelection, setPrimarySelection] = useState(() => { return type === 'movie' ? '热门' : ''; }); const [secondarySelection, setSecondarySelection] = useState(() => { + if (catParam) return catParam; if (type === 'movie') return '全部'; if (type === 'tv') return 'tv'; if (type === 'show') return 'show'; @@ -53,17 +55,17 @@ function DoubanPageClient() { useEffect(() => { setSelectorsReady(false); setLoading(true); // 立即显示loading状态 - }, [type]); + }, [type, catParam]); // 当type变化时重置选择器状态 useEffect(() => { // 批量更新选择器状态 if (type === 'movie') { setPrimarySelection('热门'); - setSecondarySelection('全部'); + setSecondarySelection(catParam || '全部'); } else if (type === 'tv') { setPrimarySelection(''); - setSecondarySelection('tv'); + setSecondarySelection(catParam || 'tv'); } else if (type === 'show') { setPrimarySelection(''); setSecondarySelection('show'); @@ -78,7 +80,7 @@ function DoubanPageClient() { }, 50); return () => clearTimeout(timer); - }, [type]); + }, [type, catParam]); // 生成骨架屏数据 const skeletonData = Array.from({ length: 25 }, (_, index) => index); diff --git a/src/app/filter/page.tsx b/src/app/filter/page.tsx index 91c0bcb..66e65b6 100644 --- a/src/app/filter/page.tsx +++ b/src/app/filter/page.tsx @@ -231,21 +231,13 @@ function FilterClient() { load(1, true); }, [source, cat, area, year]); - // 触底加载更多 - useEffect(() => { - const el = loadingRef.current; - if (!el) return; - const ob = new IntersectionObserver( - (es) => { - if (es[0]?.isIntersecting && hasMore && !refreshing && !loadingMore) { - load(nextPg, false); - } - }, - { rootMargin: '400px' } - ); - ob.observe(el); - return () => ob.disconnect(); - }, [hasMore, refreshing, loadingMore, nextPg, load]); + // 分页:上一页/下一页 + const goPage = (pg: number) => { + if (pg < 1) return; + setItems([]); + setNextPg(pg); + load(pg, true); + }; const resetAll = () => { setCat(''); @@ -327,8 +319,10 @@ function FilterClient() { })}
)} -
- {loadingMore ? '加载中…' : hasMore && items.length > 0 ? '下拉加载更多' : items.length > 0 ? '已加载全部内容' : ''} +
+ + 第 {Math.max(1, nextPg - 1)} 页 +
diff --git a/src/app/live/page.tsx b/src/app/live/page.tsx index f1cd9cc..3449eda 100644 --- a/src/app/live/page.tsx +++ b/src/app/live/page.tsx @@ -7,18 +7,18 @@ export default function LivePage() { <>