feat(app): 添加多模板关于我们页面及相关路由和404页面

- 新增404页面,优化未找到页面体验,避免被搜索引擎索引
- 增加文件代理接口,隐藏真实文件服务器地址,支持文件请求代理
- 实现/article、/case、/product及/page动态路由兼容列表与详情展示
- 添加动态CMS页面兼容入口处理旧式路径,统一路由与SEO设置
- 新增模板1、模板7、模板2、模板3关于我们页面,实现多模板支持
- 模板增强支持CMS单页内容加载及SEO信息动态设置
- 配置环境变量及Git忽略文件规则辅助开发和构建环境管理
This commit is contained in:
2026-09-08 12:13:44 +08:00
commit 2b69686795
381 changed files with 59891 additions and 0 deletions
@@ -0,0 +1,82 @@
<template>
<footer class="bg-[#1B2233] text-[#C7CEDB]">
<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-9 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-9 h-9 rounded-lg bg-[#CF1313] flex items-center justify-center">
<svg class="w-5 h-5 text-white" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2L3 7v10l9 5 9-5V7l-9-5zm0 2.3L18.5 8 12 11.7 5.5 8 12 4.3zM5 9.6l6 3.3v6.8l-6-3.3V9.6zm14 0v6.8l-6 3.3V12.9l6-3.3z" /></svg>
</div>
</template>
</SiteBrand>
<p v-if="slogan" class="text-sm text-[#9AA3B5] mb-3">{{ slogan }}</p>
<p class="text-sm text-[#9AA3B5] 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-[#9AA3B5] hover:text-[#FF6B6B] 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-[#9AA3B5]">
<li v-if="phone"><span class="text-[#6B7488]">电话</span>{{ phone }}</li>
<li v-if="email"><span class="text-[#6B7488]">邮箱</span>{{ email }}</li>
<li v-if="address" class="leading-relaxed"><span class="text-[#6B7488]">地址</span>{{ address }}</li>
<li v-if="officialWebsite"><span class="text-[#6B7488]">官网:</span><a :href="officialWebsiteUrl" target="_blank" rel="nofollow" class="hover:text-[#FF6B6B] 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-[#6B7488] 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-[#9AA3B5] hover:text-[#FF6B6B] transition-colors">{{ link.name || link.type }}</a>
</div>
</div>
</div>
<div class="border-t border-[#2C3548] mt-12 pt-8 flex flex-col sm:flex-row items-center justify-between gap-4">
<p class="text-sm text-[#6B7488]">{{ copyright || `© ${new Date().getFullYear()} ${siteName || '企业官网'} 版权所有` }}</p>
<div class="flex items-center gap-4">
<p v-if="icpNo" class="text-sm text-[#6B7488]">{{ icpNo }}</p>
<p v-if="siteInfo?.policeNo" class="text-sm text-[#6B7488]">{{ siteInfo.policeNo }}</p>
<div class="flex items-center gap-2 text-xs">
<span class="text-[#6B7488]">Powered by</span>
<a rel="nofollow" href="https://site.websoft.top" target="_blank" class="text-[#6B7488] hover:text-[#FF6B6B] transition-colors">·企业官网</a>
</div>
</div>
</div>
</div>
</footer>
</template>
<script setup lang="ts">
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>
@@ -0,0 +1,113 @@
<template>
<!-- 顶部信息条 -->
<div class="bg-[#1E2A47] text-[#C7CEDB] text-xs">
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-9">
<span class="truncate">{{ topWelcome }}</span>
<div class="flex items-center gap-3 flex-shrink-0">
<span class="hidden sm:inline">全国统一服务热线</span>
<a v-if="phone" :href="`tel:${phone}`" class="font-semibold text-white hover:text-[#FF6B6B] transition-colors">{{ phone }}</a>
</div>
</div>
</div>
</div>
<header class="sticky top-0 z-50 bg-white border-b border-[#E5E7EB]">
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-20">
<!-- Logo -->
<SiteBrand
link-class="flex-shrink-0"
:logo="siteLogo"
:icon="siteIcon"
:name="siteName"
logo-class="h-12 w-auto max-w-[220px] object-contain"
icon-class="h-8 w-auto object-contain"
name-class="text-xl font-bold text-[#1E2A47] truncate max-w-[200px]"
>
<template #fallback-icon>
<div class="w-10 h-10 rounded-lg bg-[#1E2A47] flex items-center justify-center">
<svg class="w-6 h-6 text-white" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2L3 7v10l9 5 9-5V7l-9-5zm0 2.3L18.5 8 12 11.7 5.5 8 12 4.3zM5 9.6l6 3.3v6.8l-6-3.3V9.6zm14 0v6.8l-6 3.3V12.9l6-3.3z" /></svg>
</div>
</template>
</SiteBrand>
<!-- 搜索框后台 setting.searchBtn 控制是否显示提交带关键词跳转资讯列表 -->
<SiteSearchBox v-if="showHeaderSearch" variant="light" accent="#1E2A47" class="hidden lg:flex items-center ml-8" />
<!-- 桌面端导航 -->
<nav class="hidden lg:flex items-center gap-1 ml-auto">
<template v-for="item in navItems" :key="item.navigationId || item.path">
<div v-if="item.children && item.children.length > 0" class="relative group h-20 flex items-center">
<button class="flex items-center gap-1 px-3 text-base font-medium text-[#1E2A47] hover:text-[#CF1313] transition-colors">
{{ item.title }}
<svg class="w-4 h-4 transition-transform group-hover:rotate-180" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" /></svg>
</button>
<div class="absolute left-0 top-full pt-2 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200">
<div class="bg-white rounded-xl shadow-xl border border-[#E5E7EB] py-2 min-w-[200px]">
<NuxtLink
v-for="child in item.children" :key="child.navigationId" :to="getChildPath(child)"
class="block px-5 py-2.5 text-[15px] text-[#333333] hover:text-[#CF1313] hover:bg-[#F4F6FA] transition-colors whitespace-nowrap"
>
{{ child.title }}
</NuxtLink>
</div>
</div>
</div>
<NuxtLink
v-else :to="getNavLink(item)" :target="item.target === '_blank' ? '_blank' : undefined"
class="px-3 text-base font-medium text-[#1E2A47] hover:text-[#CF1313] transition-colors" active-class="text-[#CF1313]"
>
{{ item.title }}
</NuxtLink>
</template>
<NuxtLink to="/contact" class="ml-3 inline-flex items-center justify-center px-5 py-2.5 bg-[#CF1313] text-white text-base font-semibold rounded-full hover:bg-[#A60E0E] transition-colors shadow-sm">立即咨询</NuxtLink>
</nav>
<!-- 移动端汉堡 -->
<button class="lg:hidden ml-auto p-2 rounded-lg hover:bg-[#F4F6FA]" @click="mobileMenuOpen = !mobileMenuOpen" aria-label="菜单">
<svg v-if="!mobileMenuOpen" class="w-6 h-6 text-[#1E2A47]" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" /></svg>
<svg v-else class="w-6 h-6 text-[#1E2A47]" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /></svg>
</button>
</div>
</div>
<!-- 移动端展开菜单 -->
<div v-if="mobileMenuOpen" class="lg:hidden bg-white border-t border-[#E5E7EB]">
<div class="container mx-auto px-4 py-4 space-y-1">
<template v-for="item in navItems" :key="item.navigationId || item.path">
<div v-if="item.children && item.children.length > 0">
<div class="px-2 py-2.5 text-base font-semibold text-[#1E2A47]">{{ item.title }}</div>
<NuxtLink
v-for="child in item.children" :key="child.navigationId" :to="getChildPath(child)"
class="block px-6 py-2 text-sm text-[#666666] hover:text-[#CF1313] hover:bg-[#F4F6FA] rounded-lg transition-colors" @click="mobileMenuOpen = false"
>
{{ child.title }}
</NuxtLink>
</div>
<NuxtLink
v-else :to="getNavLink(item)" :target="item.target === '_blank' ? '_blank' : undefined"
class="block px-2 py-2.5 text-base font-medium text-[#1E2A47] hover:text-[#CF1313] hover:bg-[#F4F6FA] rounded-lg transition-colors"
active-class="text-[#CF1313] bg-[#F4F6FA]" @click="mobileMenuOpen = false"
>
{{ item.title }}
</NuxtLink>
</template>
<NuxtLink to="/contact" class="block px-2 py-2.5 mt-2 text-center bg-[#CF1313] text-white font-semibold rounded-lg hover:bg-[#A60E0E] transition-colors" @click="mobileMenuOpen = false">立即咨询</NuxtLink>
</div>
</div>
</header>
</template>
<script setup lang="ts">
import type { CmsNavigation } from '~/types'
const { siteInfo, siteName, siteLogo, siteIcon, navigations, phone, showHeaderSearch, fetchSiteInfo } = useSite()
const mobileMenuOpen = ref(false)
const topWelcome = computed(() => siteInfo.value?.welcomeInfo || `${siteName.value || '我们'} · 专业的企业数字化服务提供商`)
function getChildPath(child: CmsNavigation): string { return getNavLink(child) }
await fetchSiteInfo()
const navItems = computed<CmsNavigation[]>(() => navigations.value || [])
</script>
@@ -0,0 +1,48 @@
<template>
<section class="relative overflow-hidden">
<img :src="heroBanner" alt="" class="absolute inset-0 w-full h-full object-cover">
<div class="absolute inset-0 bg-gradient-to-r from-[#16203A]/95 via-[#1E2A47]/80 to-[#1E2A47]/30" />
<div class="absolute -top-24 -right-24 w-96 h-96 rounded-full bg-[#CF1313]/20 blur-3xl" />
<div class="absolute bottom-0 left-0 w-full h-1.5 bg-[#CF1313]" />
<div class="container mx-auto px-4 sm:px-6 lg:px-8 relative z-10">
<div class="max-w-3xl py-24 lg:py-32">
<span class="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-white/10 text-sm font-medium text-white mb-6 border border-white/20" data-reveal>
<span class="w-2 h-2 rounded-full bg-[#CF1313]" /> 专业 · 可靠 · 数字化
</span>
<h1 class="text-3xl sm:text-4xl lg:text-5xl font-extrabold text-white leading-tight mb-6" data-reveal>{{ heroTitle }}</h1>
<p class="text-base sm:text-lg text-white/85 mb-8 leading-relaxed max-w-2xl" data-reveal data-reveal-delay="120">{{ heroSubtitle }}</p>
<div class="flex flex-wrap gap-4" data-reveal data-reveal-delay="240">
<button type="button" class="inline-flex items-center justify-center px-8 py-3 bg-[#CF1313] text-white font-semibold rounded-full hover:bg-[#A60E0E] transition-colors shadow-lg" @click="openConsult()">免费咨询</button>
<NuxtLink v-if="productNav" :to="productNav.path || '/product'" class="inline-flex items-center justify-center px-8 py-3 border-2 border-white text-white font-semibold rounded-full hover:bg-white/10 transition-colors">产品与方案</NuxtLink>
</div>
<!-- 数据指标 -->
<div class="grid grid-cols-2 sm:grid-cols-4 gap-6 mt-14" data-reveal data-reveal-delay="360">
<div v-for="stat in stats" :key="stat.label">
<div class="text-2xl lg:text-3xl font-bold text-white">{{ stat.value }}</div>
<div class="text-xs text-white/70 mt-1">{{ stat.label }}</div>
</div>
</div>
</div>
</div>
</section>
</template>
<script setup lang="ts">
import type { CmsNavigation } from '~/types'
import heroBanner from '../assets/hero-banner.jpg'
const { siteInfo, siteName, navigations, fetchSiteInfo } = useSite()
const { openConsult } = useConsult()
await fetchSiteInfo()
const heroTitle = computed(() => siteName.value ? `${siteName.value} · 企业数字化伙伴` : '企业数字化升级的首选伙伴')
const heroSubtitle = computed(() => siteInfo.value?.comments || '以技术驱动业务增长,提供专业、安全、可落地的软件产品与行业解决方案,助力企业实现数字化转型。')
const productNav = computed<CmsNavigation | undefined>(() => (navigations.value || []).find((n) => n.model === 'product'))
const stats = [
{ value: '20+', label: '服务行业' },
{ value: '500+', label: '合作客户' },
{ value: '99.9%', label: '服务可用率' },
{ value: '7×24', label: '技术支持' }
]
</script>