feat(app): 添加多模板关于我们页面及相关路由和404页面
- 新增404页面,优化未找到页面体验,避免被搜索引擎索引 - 增加文件代理接口,隐藏真实文件服务器地址,支持文件请求代理 - 实现/article、/case、/product及/page动态路由兼容列表与详情展示 - 添加动态CMS页面兼容入口处理旧式路径,统一路由与SEO设置 - 新增模板1、模板7、模板2、模板3关于我们页面,实现多模板支持 - 模板增强支持CMS单页内容加载及SEO信息动态设置 - 配置环境变量及Git忽略文件规则辅助开发和构建环境管理
This commit is contained in:
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<footer class="bg-[var(--t2-footer-bg)] 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="siteLogo"
|
||||
: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-[var(--t2-primary)] 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 class="flex items-center gap-2 text-xs">
|
||||
<span class="text-gray-500">Powered by</span>
|
||||
<a
|
||||
rel="nofollow"
|
||||
href="https://site.websoft.top"
|
||||
target="_blank"
|
||||
class="text-gray-500 hover:text-gray-200 transition-colors"
|
||||
>云·企业官网</a>
|
||||
</div>
|
||||
</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, 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>
|
||||
Reference in New Issue
Block a user