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
+28
View File
@@ -0,0 +1,28 @@
<template>
<div>
<Component :is="pageComponent" v-if="pageComponent" :key="route.fullPath" />
<SiteLoading v-else />
</div>
</template>
<script setup lang="ts">
/**
* 文章/新闻 路由(栏目列表 与 详情 二合一) /article/:id
* 按模块名单数命名:列表(栏目)/article/{navigationId},详情 /article/{id}。
* 靠「id 是否该模块已知栏目 navigationId」运行时判定。
* 旧链接 /news/*、/newss/* 由 server/middleware/z-news-detail-redirect.ts 301 到 /article/*。
*
* 10626 租户专属:/article/4722(专业人才团队)走写死 TalentTeam
* 不依赖 cms-article 模块拉列表,避免 cms-article 写入受 token 限制而落空。
*/
import TalentTeam from '~/templates/template-07/pages/TalentTeam.vue'
const route = useRoute()
const id = String(route.params.id)
let pageComponent = null as unknown
if (id === '4722') {
pageComponent = TalentTeam
} else {
;({ pageComponent } = await useModuleRoute('article'))
}
</script>
+39
View File
@@ -0,0 +1,39 @@
<template>
<div>
<Component :is="pageComponent" v-if="pageComponent" />
<SiteLoading v-else />
</div>
</template>
<script setup lang="ts">
/**
* 新闻列表路由(根) /article
* 按模块名单数命名:列表根为 /article(旧规范为 /news)。
*/
const { loadTemplate } = useTemplate()
const { siteInfo, navigations, fetchSiteInfo } = useSite()
await fetchSiteInfo()
const pageComponent = shallowRef<Component | null>(null)
// 同步加载当前模板(SSR/客户端路由切换均直接 await,避免先闪 SiteLoading
const components = await loadTemplate()
pageComponent.value = components?.NewsList || null
// 从导航中查找新闻栏目标题
const newsNav = computed(() => {
const navs = navigations.value || []
return navs.find((n) => n.model === 'article')
})
usePageSeo(
{
title: newsNav.value?.title || '新闻资讯',
path: '/article'
},
siteInfo.value
)
</script>