From 49ec32e2acd0ecfc155824aa92e6eefd7b59ca32 Mon Sep 17 00:00:00 2001 From: iHeyTang Date: Wed, 10 Sep 2025 15:48:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0ai=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=B0=B4=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DownloadSection/index.css | 1 - src/components/TemplateCard/index.css | 18 +++++++++++++----- src/components/TemplateCard/index.tsx | 10 ++++++---- src/pages/result/index.css | 6 +++--- src/pages/result/index.tsx | 4 ++-- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/src/components/DownloadSection/index.css b/src/components/DownloadSection/index.css index 12a7ed4..9f61395 100644 --- a/src/components/DownloadSection/index.css +++ b/src/components/DownloadSection/index.css @@ -72,7 +72,6 @@ } .download-tip { - color: #fff; font-size: 24rpx; opacity: 0.8; } diff --git a/src/components/TemplateCard/index.css b/src/components/TemplateCard/index.css index 86292cc..c8eaa70 100644 --- a/src/components/TemplateCard/index.css +++ b/src/components/TemplateCard/index.css @@ -123,12 +123,14 @@ /* 模板名称悬浮 - 图片底部 */ .name-overlay { position: absolute; - bottom: 24rpx; + bottom: 12rpx; left: 24rpx; right: 24rpx; z-index: 4; display: flex; + flex-direction: column; justify-content: center; + align-items: center; } .name-badge { @@ -143,6 +145,7 @@ text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.3); text-align: center; max-width: 90%; + width: fit-content; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -165,6 +168,8 @@ object-fit: cover; display: block; border-radius: 32rpx; + position: relative; + z-index: 2; /* 性能优化:启用硬件加速 */ transform: translateZ(0); /* 防止视频闪烁 */ @@ -183,10 +188,6 @@ border-radius: 32rpx; } -.single-video { - position: relative; - z-index: 2; -} /* 视频样式 */ .full-video { @@ -201,3 +202,10 @@ backface-visibility: hidden; } +.watermark-text { + color: rgba(255, 255, 255, 0.5); + font-size: 20rpx; + font-weight: 400; + text-align: center; +} + diff --git a/src/components/TemplateCard/index.tsx b/src/components/TemplateCard/index.tsx index 47aad0f..f042552 100644 --- a/src/components/TemplateCard/index.tsx +++ b/src/components/TemplateCard/index.tsx @@ -15,12 +15,12 @@ export default function TemplateCard({ template, onClick }: TemplateCardProps) { const [containerInfo, setContainerInfo] = useState(null) const containerRef = useRef(null) const containerId = `container-${template.code}` // 为每个容器创建唯一ID - + // 检测output是否为视频 const isOutputVideo = useMemo(() => { return /\.(mp4|webm|ogg|mov|avi|mkv|flv)$/i.test(template.outputExample) }, [template.outputExample]) - + // 检测input是否为视频 const isInputVideo = useMemo(() => { return /\.(mp4|webm|ogg|mov|avi|mkv|flv)$/i.test(template.inputExample) @@ -83,7 +83,7 @@ export default function TemplateCard({ template, onClick }: TemplateCardProps) { {isOutputVideo ? ( // 当output是视频时,只显示单个视频 - {template.name} + 内容由AI生成 ) : ( @@ -175,10 +176,11 @@ export default function TemplateCard({ template, onClick }: TemplateCardProps) { {template.name} + 内容由AI生成 )} ) -} \ No newline at end of file +} diff --git a/src/pages/result/index.css b/src/pages/result/index.css index d624306..ea0e3fc 100644 --- a/src/pages/result/index.css +++ b/src/pages/result/index.css @@ -1,7 +1,7 @@ .result-page { width: 100%; height: 100vh; - background: black; + background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%); display: flex; flex-direction: column; } @@ -67,7 +67,7 @@ right: 0; bottom: 0; background: linear-gradient( - 135deg, + 135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(0, 0, 0, 0.1) 100% @@ -159,4 +159,4 @@ height: 100%; max-height: 80vh; border-radius: 0rpx; -} \ No newline at end of file +} diff --git a/src/pages/result/index.tsx b/src/pages/result/index.tsx index c8c133e..6cb0ac1 100644 --- a/src/pages/result/index.tsx +++ b/src/pages/result/index.tsx @@ -277,7 +277,7 @@ const ResultPage: React.FC = () => { }) hideToast() - + // 跳转到生成页面 navigateTo({ url: `/pages/generate/index?taskId=${taskId}&templateCode=character_figurine_v1` @@ -336,7 +336,7 @@ const ResultPage: React.FC = () => { onImageToVideo={handleImageToVideo} loading={adLoading} adAvailable={adAvailable} - showImageToVideo={mediaType === 'image'} + showImageToVideo={false} imageToVideoLoading={loading} />