Files
hjc-web/app/templates/template-01/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

120 lines
4.9 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-gray-900 text-gray-300">
<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"
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-blue-600 flex items-center justify-center">
<svg class="w-5 h-5 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" />
</svg>
</div>
</template>
</SiteBrand>
<p v-if="slogan" class="text-sm text-gray-400 mb-3">{{ slogan }}</p>
<p class="text-sm text-gray-400 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-gray-400 hover:text-white 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-gray-400">
<li v-if="phone">
<span class="text-gray-500">电话:</span>{{ phone }}
</li>
<li v-if="email">
<span class="text-gray-500">邮箱:</span>{{ email }}
</li>
<li v-if="address" class="leading-relaxed">
<span class="text-gray-500">地址:</span>{{ address }}
</li>
<li v-if="officialWebsite">
<span class="text-gray-500">官网:</span>
<a :href="officialWebsiteUrl" target="_blank" rel="nofollow" class="hover:text-white 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-lg p-3 inline-block">
<img :src="wxQrcode" alt="微信二维码" class="w-32 h-32 object-contain">
</div>
<p v-if="wxQrcode" class="text-xs text-gray-500 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-gray-400 hover:text-white transition-colors"
>
{{ link.name || link.type }}
</a>
</div>
</div>
</div>
<div class="border-t border-gray-800 mt-12 pt-8 flex flex-col sm:flex-row items-center justify-between gap-4">
<p class="text-sm text-gray-500">
{{ copyright || `© ${new Date().getFullYear()} ${siteName || '企业官网'} 版权所有` }}
</p>
<div class="flex items-center gap-4">
<p v-if="icpNo" class="text-sm text-gray-500">
{{ icpNo }}
</p>
<p v-if="siteInfo?.policeNo" class="text-sm text-gray-500">
{{ siteInfo.policeNo }}
</p>
</div>
</div>
</div>
</footer>
</template>
<script setup lang="ts">
/**
* 模板 1 - 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>