From 4eb0360134b2718742b6c2278b611d6985a7c724 Mon Sep 17 00:00:00 2001 From: wwwwwwwww <526125649@qq.com> Date: Fri, 24 Jul 2026 18:26:20 +0800 Subject: [PATCH] 1 --- video-gen-app/index.html | 22 +------------------ .../src/components/Layout/AppLayout.tsx | 5 ++++- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/video-gen-app/index.html b/video-gen-app/index.html index 213c3f4c..f103505c 100644 --- a/video-gen-app/index.html +++ b/video-gen-app/index.html @@ -2,32 +2,12 @@ - + 民众智创 -
diff --git a/video-gen-app/src/components/Layout/AppLayout.tsx b/video-gen-app/src/components/Layout/AppLayout.tsx index fc2247de..14d7fe5d 100644 --- a/video-gen-app/src/components/Layout/AppLayout.tsx +++ b/video-gen-app/src/components/Layout/AppLayout.tsx @@ -401,7 +401,10 @@ const AppLayout: React.FC = () => { faviconLink.rel = 'icon'; document.head.appendChild(faviconLink); } - faviconLink.href = logo; + // 相对路径拼接 API 基础地址,确保 favicon 正确加载 + const base = import.meta.env.VITE_API_BASE || ''; + const fullUrl = logo.startsWith('http') || logo.startsWith('data:') ? logo : `${base}${logo.startsWith('/') ? '' : '/'}${logo}`; + faviconLink.href = fullUrl; faviconLink.type = 'image/png'; }