fixed77: 首页最新港剧+筛选页统一换VideoCard(豆瓣链+hover收藏对齐热门电影)+VideoCard search豆瓣0值过滤+兜底
Docker Build & Test / build (push) Canceled after 0s
Docker Build & Test / test (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/amd64) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm/v7) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm64) (push) Canceled after 0s
Build & Push Docker image / merge-images (push) Canceled after 0s
Docker Build & Test / build (push) Canceled after 0s
Docker Build & Test / test (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/amd64) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm/v7) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm64) (push) Canceled after 0s
Build & Push Docker image / merge-images (push) Canceled after 0s
This commit is contained in:
1 parent
940c34a560
commit
8c0a1e209b
4 files changed
+38
-62
No files matched your search
+1
-1
@@ -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 ./
|
||||
|
||||
+15
-28
@@ -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() {
|
||||
) : (
|
||||
<div className='grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4'>
|
||||
{items.map((v) => {
|
||||
const pic = v.poster ? '/api/image-proxy?url=' + encodeURIComponent(v.poster) : '';
|
||||
const dbId = v.douban_id ? String(v.douban_id) : '';
|
||||
return (
|
||||
<Link
|
||||
<VideoCard
|
||||
key={v.source + ':' + v.id}
|
||||
href={`/play?source=${encodeURIComponent(v.source)}&id=${encodeURIComponent(v.id)}&title=${encodeURIComponent(v.title)}${v.year ? '&year=' + encodeURIComponent(v.year) : ''}`}
|
||||
className='group block'
|
||||
>
|
||||
<div className='relative aspect-[2/3] w-full overflow-hidden rounded-lg bg-gray-200 dark:bg-gray-800'>
|
||||
{pic ? (
|
||||
<img
|
||||
src={pic}
|
||||
alt={v.title}
|
||||
loading='lazy'
|
||||
className='absolute inset-0 w-full h-full object-cover group-hover:scale-105 transition-transform duration-300'
|
||||
/>
|
||||
) : null}
|
||||
{v.episodes > 1 ? (
|
||||
<span className='absolute bottom-1 right-1 px-1.5 py-0.5 text-xs bg-black/65 text-white rounded'>
|
||||
{v.episodes}集
|
||||
</span>
|
||||
) : null}
|
||||
</div>
|
||||
<div className='mt-2 text-sm font-medium text-gray-800 dark:text-gray-200 truncate'>
|
||||
{v.title}
|
||||
</div>
|
||||
<div className='text-xs text-gray-500 dark:text-gray-400 truncate'>
|
||||
{[v.year, v.source_name].filter(Boolean).join(' · ')}
|
||||
</div>
|
||||
</Link>
|
||||
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'}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
@@ -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 (
|
||||
<Link
|
||||
<VideoCard
|
||||
key={key}
|
||||
href={`/play?source=${encodeURIComponent(
|
||||
ks
|
||||
)}&id=${encodeURIComponent(kid)}&stitle=${encodeURIComponent(
|
||||
v.vod_name || ''
|
||||
)}&stype=tv`}
|
||||
className='group block'
|
||||
>
|
||||
<div className='relative aspect-[2/3] w-full overflow-hidden rounded-lg bg-gray-200 dark:bg-gray-800'>
|
||||
{pic ? (
|
||||
<img
|
||||
src={pic}
|
||||
alt={v.vod_name || ''}
|
||||
loading='lazy'
|
||||
className='absolute inset-0 w-full h-full object-cover group-hover:scale-105 transition-transform duration-300'
|
||||
/>
|
||||
) : null}
|
||||
{v.vod_remarks ? (
|
||||
<span className='absolute bottom-1 right-1 px-1.5 py-0.5 text-xs bg-black/65 text-white rounded'>
|
||||
{v.vod_remarks}
|
||||
</span>
|
||||
) : null}
|
||||
</div>
|
||||
<div className='mt-2 text-sm font-medium text-gray-800 dark:text-gray-200 truncate'>
|
||||
{v.vod_name}
|
||||
</div>
|
||||
</Link>
|
||||
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'
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in new issue
Block a user