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'; }