diff --git a/app/composables/useSite.ts b/app/composables/useSite.ts index e02ce5b..6198edd 100644 --- a/app/composables/useSite.ts +++ b/app/composables/useSite.ts @@ -121,9 +121,24 @@ export function useSite() { return override || siteInfo.value?.websiteName || appName.value || '' }) - /** 站点 Logo(优先应用信息,回退 CMS 站点信息) */ + /** + * 站点 Logo(优先应用信息,回退 CMS 站点信息) + * 统一 ensureFullUrl 补全:本地存储上传的相对路径(如 /20260925/xxx.png) + * 转为 /api/file/ 代理地址;完整 http(s) URL 原样返回。 + */ const siteLogo = computed(() => { - return appLogo.value || siteInfo.value?.websiteLogo || '' + const raw = appLogo.value || siteInfo.value?.websiteLogo || '' + return raw ? ensureFullUrl(raw) : '' + }) + + /** + * 页脚 Logo(仅用于 Footer 品牌展示,与顶部导航 Logo 分离) + * 优先级:后台「网站设置 → 站点信息」上传的 websiteFooterLogo > 站点 Logo(siteLogo)。 + * 后台未单独上传页脚 Logo 时回退站点 Logo,保持旧行为不变。 + */ + const siteFooterLogo = computed(() => { + const raw = siteInfo.value?.websiteFooterLogo || '' + return raw ? ensureFullUrl(raw) : siteLogo.value }) /** @@ -255,6 +270,7 @@ export function useSite() { showHeaderSearch, siteName, siteLogo, + siteFooterLogo, siteIcon, siteKeywords, phone, diff --git a/app/templates/template-01/components/Footer.vue b/app/templates/template-01/components/Footer.vue index dcb7b7c..bd260e3 100644 --- a/app/templates/template-01/components/Footer.vue +++ b/app/templates/template-01/components/Footer.vue @@ -6,7 +6,7 @@
(() => { diff --git a/app/templates/template-02/components/Footer.vue b/app/templates/template-02/components/Footer.vue index 2c31fe0..4ab38f0 100644 --- a/app/templates/template-02/components/Footer.vue +++ b/app/templates/template-02/components/Footer.vue @@ -6,7 +6,7 @@
(() => { diff --git a/app/templates/template-03/components/Footer.vue b/app/templates/template-03/components/Footer.vue index 4a26f41..052fda0 100644 --- a/app/templates/template-03/components/Footer.vue +++ b/app/templates/template-03/components/Footer.vue @@ -6,7 +6,7 @@
(() => { diff --git a/app/templates/template-04/components/Footer.vue b/app/templates/template-04/components/Footer.vue index d9c7d0e..667d1f3 100644 --- a/app/templates/template-04/components/Footer.vue +++ b/app/templates/template-04/components/Footer.vue @@ -6,7 +6,7 @@
(() => { diff --git a/app/templates/template-05/components/Footer.vue b/app/templates/template-05/components/Footer.vue index af372ab..272c7e3 100644 --- a/app/templates/template-05/components/Footer.vue +++ b/app/templates/template-05/components/Footer.vue @@ -6,7 +6,7 @@
(() => { diff --git a/app/templates/template-06/components/Footer.vue b/app/templates/template-06/components/Footer.vue index 3181071..b6f0918 100644 --- a/app/templates/template-06/components/Footer.vue +++ b/app/templates/template-06/components/Footer.vue @@ -6,7 +6,7 @@
import type { CmsNavigation } from '~/types' -const { siteInfo, siteName, siteLogo, siteIcon, siteConfig, bottomNavigations, phone, email, address, icpNo, copyright, wxQrcode, slogan, officialWebsite, officialWebsiteUrl, socialLinks } = useSite() +const { siteInfo, siteName, siteLogo, siteFooterLogo, siteIcon, siteConfig, bottomNavigations, phone, email, address, icpNo, copyright, wxQrcode, slogan, officialWebsite, officialWebsiteUrl, socialLinks } = useSite() const quickLinks = computed(() => { const navs = bottomNavigations.value || [] return navs.filter((nav) => nav.model !== 'index').slice(0, 6) diff --git a/app/templates/template-07/components/Footer.vue b/app/templates/template-07/components/Footer.vue index c126d9f..5108c9b 100644 --- a/app/templates/template-07/components/Footer.vue +++ b/app/templates/template-07/components/Footer.vue @@ -6,7 +6,7 @@
(() => { diff --git a/app/templates/template-10/components/Footer.vue b/app/templates/template-10/components/Footer.vue index 66e7f7d..b26400b 100644 --- a/app/templates/template-10/components/Footer.vue +++ b/app/templates/template-10/components/Footer.vue @@ -7,7 +7,7 @@