Files
hjc-web/app/templates/template-05/components/Footer.vue
T
weicw-dshsa 13c522ab32 fix: 移除页脚平台外链,分支机构页补充办公场地图
汇吉采已独立,官网页脚不应再出现指向 SaaS 平台的「Powered by 云·企业官网」
外链(site.websoft.top)——这是全站唯一会请求外部的地方。

- 10 个模板的 Footer.vue 移除该外链(三种结构变体:带 Powered by 包裹 div 的
  01/02/05/07、单行 <a> 的 06、icp/police 行内的 03/04/08/09/10)
- template-07 分支机构页补充办公场地图片
- BranchOffice.vue 与 template-09/Footer.vue 换行符归一为 LF,
  消除整文件级的 CRLF 噪声(真实改动分别是 1 行新增、6 行删除)
2026-09-29 02:28:43 +08:00

121 lines
5.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<footer class="bg-[#2E2620] text-[#E9DFD3]">
<div class="container mx-auto px-4 sm:px-6 lg:px-8 py-12 lg:py-16">
<div class="grid sm:grid-cols-2 lg:grid-cols-4 gap-8 lg:gap-12">
<!-- 公司信息 -->
<div class="sm:col-span-2 lg:col-span-1">
<SiteBrand
link-class="mb-4"
:logo="siteFooterLogo"
:icon="siteIcon"
:name="siteName"
default-name="品牌官网"
logo-class="h-8 w-auto max-w-[200px] object-contain"
icon-class="h-6 w-auto object-contain"
name-class="text-lg font-bold text-white"
>
<template #fallback-icon>
<div class="w-8 h-8 rounded-lg bg-[#E5472E] flex items-center justify-center">
<svg class="w-5 h-5 text-white" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 2C7 2 3 6 3 11c0 5 4 9 9 9s9-4 9-9c0-5-4-9-9-9zm0 16c-3.9 0-7-3-7-7 0-2.8 1.6-5.2 4-6.4.2 1.6 1.1 3 2.5 3.8-1-.7-1.6-1.9-1.6-3.1 2.3.3 4.1 2.1 4.4 4.4.8.7 1.3 1.7 1.3 2.9 0 .6-.1 1.2-.4 1.7 1.4-.7 2.4-2.1 2.4-3.7 1.8 1.2 3 3.3 3 5.4 0 4-3.1 7-7 7z" />
</svg>
</div>
</template>
</SiteBrand>
<p v-if="slogan" class="text-sm text-[#B9AC9C] mb-3">{{ slogan }}</p>
<p class="text-sm text-[#B9AC9C] leading-relaxed">
{{ siteInfo?.comments || siteInfo?.content || '用心做好每一份产品,把自然新鲜与健康美味带给每一个家庭。' }}
</p>
</div>
<!-- 快速链接(从导航获取) -->
<div>
<h4 class="text-white font-semibold mb-4">快速链接</h4>
<ul class="space-y-2">
<li v-for="item in quickLinks" :key="item.navigationId">
<NuxtLink
:to="getNavLink(item)"
:target="item.target === '_blank' ? '_blank' : undefined"
class="text-sm text-[#B9AC9C] hover:text-[#F2A900] transition-colors"
>
{{ item.title }}
</NuxtLink>
</li>
</ul>
</div>
<!-- 联系方式 -->
<div>
<h4 class="text-white font-semibold mb-4">联系我们</h4>
<ul class="space-y-2 text-sm text-[#B9AC9C]">
<li v-if="phone">
<span class="text-[#8A7B6B]">电话:</span>{{ phone }}
</li>
<li v-if="email">
<span class="text-[#8A7B6B]">邮箱:</span>{{ email }}
</li>
<li v-if="address" class="leading-relaxed">
<span class="text-[#8A7B6B]">地址:</span>{{ address }}
</li>
<li v-if="officialWebsite">
<span class="text-[#8A7B6B]">官网:</span>
<a :href="officialWebsiteUrl" target="_blank" rel="nofollow" class="hover:text-[#F2A900] transition-colors">{{ officialWebsite }}</a>
</li>
</ul>
</div>
<!-- 微信二维码 + 社交链接 -->
<div v-if="wxQrcode || socialLinks.length">
<h4 class="text-white font-semibold mb-4">关注我们</h4>
<div v-if="wxQrcode" class="bg-white rounded-xl p-3 inline-block">
<img :src="wxQrcode" alt="微信二维码" class="w-32 h-32 object-contain">
</div>
<p v-if="wxQrcode" class="text-xs text-[#8A7B6B] mt-2">{{ siteConfig?.wxQrcodeText || '扫码关注' }}</p>
<div v-if="socialLinks.length" class="mt-3 flex flex-col gap-1">
<a
v-for="link in socialLinks"
:key="link.url"
:href="link.url"
target="_blank"
rel="nofollow"
class="text-sm text-[#B9AC9C] hover:text-[#F2A900] transition-colors"
>
{{ link.name || link.type }}
</a>
</div>
</div>
</div>
<div class="border-t border-[#463B30] mt-12 pt-8 flex flex-col sm:flex-row items-center justify-between gap-4">
<p class="text-sm text-[#8A7B6B]">
{{ copyright || `© ${new Date().getFullYear()} ${siteName || '品牌官网'} 版权所有` }}
</p>
<div class="flex items-center gap-4">
<p v-if="icpNo" class="text-sm text-[#8A7B6B]">
{{ icpNo }}
</p>
<p v-if="siteInfo?.policeNo" class="text-sm text-[#8A7B6B]">
{{ siteInfo.policeNo }}
</p>
</div>
</div>
</div>
</footer>
</template>
<script setup lang="ts">
/**
* 模板 5 - Footer 组件(温暖自然食品风)
* 使用 config 与 useSite 的 bottomNavigations(top!==1 的页脚链接)渲染
*/
import type { CmsNavigation } from '~/types'
const { siteInfo, siteName, siteLogo, siteFooterLogo, siteIcon, siteConfig, bottomNavigations, phone, email, address, icpNo, copyright, wxQrcode, slogan, officialWebsite, officialWebsiteUrl, socialLinks } = useSite()
/** 快速链接:取顶级导航中非首页且无子菜单的项 */
const quickLinks = computed<CmsNavigation[]>(() => {
const navs = bottomNavigations.value || []
return navs.filter((nav) => nav.model !== 'index').slice(0, 6)
})
</script>