From 8c0a1e209bf57918be63cb1385118b7b05f91788 Mon Sep 17 00:00:00 2001 From: 3970260761 <3970260761@qq.com> Date: Sun, 8 Nov 2026 13:52:09 +0800 Subject: [PATCH] =?UTF-8?q?fixed77:=20=E9=A6=96=E9=A1=B5=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E6=B8=AF=E5=89=A7+=E7=AD=9B=E9=80=89=E9=A1=B5=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E6=8D=A2VideoCard(=E8=B1=86=E7=93=A3=E9=93=BE+hover?= =?UTF-8?q?=E6=94=B6=E8=97=8F=E5=AF=B9=E9=BD=90=E7=83=AD=E9=97=A8=E7=94=B5?= =?UTF-8?q?=E5=BD=B1)+VideoCard=20search=E8=B1=86=E7=93=A30=E5=80=BC?= =?UTF-8?q?=E8=BF=87=E6=BB=A4+=E5=85=9C=E5=BA=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- src/app/filter/page.tsx | 43 +++++++++++------------------- src/components/HkDramaRow.tsx | 49 ++++++++++++++--------------------- src/components/VideoCard.tsx | 6 ++--- 4 files changed, 38 insertions(+), 62 deletions(-) diff --git a/Dockerfile b/Dockerfile index 82fa1ce..a76f666 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=fixed75 +ENV NEXT_PUBLIC_SITE_VERSION=fixed77 # 从构建器中复制 standalone 输出 COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ diff --git a/src/app/filter/page.tsx b/src/app/filter/page.tsx index eac07a5..91c0bcb 100644 --- a/src/app/filter/page.tsx +++ b/src/app/filter/page.tsx @@ -1,11 +1,11 @@ /* eslint-disable react-hooks/exhaustive-deps */ 'use client'; -import Link from 'next/link'; import { useSearchParams } from 'next/navigation'; import { Suspense, useCallback, useEffect, useRef, useState } from 'react'; import PageLayout from '@/components/PageLayout'; +import VideoCard from '@/components/VideoCard'; // ---------- /filter 筛选页(源码化,原运行时补丁 filter-page-chunk.js) ---------- // 数据约定对应 src/app/api/filter/route.ts: @@ -25,6 +25,7 @@ type Item = { year: string; area: string; type_name: string; + douban_id?: number | string; }; const AREA_OPTS = [ @@ -307,35 +308,21 @@ function FilterClient() { ) : (
{items.map((v) => { - const pic = v.poster ? '/api/image-proxy?url=' + encodeURIComponent(v.poster) : ''; + const dbId = v.douban_id ? String(v.douban_id) : ''; return ( - -
- {pic ? ( - {v.title} - ) : null} - {v.episodes > 1 ? ( - - {v.episodes}集 - - ) : null} -
-
- {v.title} -
-
- {[v.year, v.source_name].filter(Boolean).join(' · ')} -
- + id={v.id} + source={v.source} + source_name={v.source_name} + title={v.title} + poster={v.poster} + episodes={v.episodes} + year={v.year} + douban_id={dbId} + from='search' + type={v.episodes > 1 ? 'tv' : 'movie'} + /> ); })}
diff --git a/src/components/HkDramaRow.tsx b/src/components/HkDramaRow.tsx index 74fa4e6..1af93ee 100644 --- a/src/components/HkDramaRow.tsx +++ b/src/components/HkDramaRow.tsx @@ -3,6 +3,8 @@ import Link from 'next/link'; import { useEffect, useState } from 'react'; +import VideoCard from './VideoCard'; + type VodItem = { vod_id?: string | number; vod_name?: string; @@ -10,6 +12,8 @@ type VodItem = { vod_remarks?: string; vod_year?: string; vod_time?: string; + vod_douban_id?: number; + vod_area?: string; }; const SHOW_COUNT = 10; @@ -69,38 +73,23 @@ export default function HkDramaRow() { const sep = key.indexOf(':'); const ks = sep > 0 ? key.slice(0, sep) : ''; const kid = sep > 0 ? key.slice(sep + 1) : key; - const pic = v.vod_pic - ? '/api/image-proxy?url=' + encodeURIComponent(v.vod_pic) - : ''; + const epMatch = String(v.vod_remarks || '').match(/(\d+)/); + const epCount = epMatch ? parseInt(epMatch[1], 10) : 1; + const dbId = v.vod_douban_id ? String(v.vod_douban_id) : ''; return ( - -
- {pic ? ( - {v.vod_name - ) : null} - {v.vod_remarks ? ( - - {v.vod_remarks} - - ) : null} -
-
- {v.vod_name} -
- + id={kid} + source={ks} + source_name={ks} + title={v.vod_name || ''} + poster={v.vod_pic || ''} + episodes={epCount} + year={v.vod_year || ''} + douban_id={dbId} + from='search' + type='tv' + /> ); })} diff --git a/src/components/VideoCard.tsx b/src/components/VideoCard.tsx index 81cf12e..018161e 100644 --- a/src/components/VideoCard.tsx +++ b/src/components/VideoCard.tsx @@ -100,7 +100,7 @@ export default function VideoCard({ const actualSource = aggregateData?.first.source ?? source; const actualId = aggregateData?.first.id ?? id; const actualDoubanId = String( - aggregateData?.mostFrequentDoubanId ?? douban_id + aggregateData?.mostFrequentDoubanId ?? douban_id ?? '' ); const actualEpisodes = aggregateData?.mostFrequentEpisodes ?? episodes; const actualYear = aggregateData?.first.year ?? year; @@ -248,9 +248,9 @@ export default function VideoCard({ showSourceName: true, showProgress: false, showPlayButton: true, - showHeart: !isAggregate, + showHeart: true, showCheckCircle: false, - showDoubanLink: !!actualDoubanId, + showDoubanLink: !!actualDoubanId && actualDoubanId !== '0', showRating: false, }, douban: {