refactor(portal): extract PortalLayout so Nav/Footer persist across routes
Some checks failed
CI / test (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
Security Scan / backend-security (push) Has been cancelled
Security Scan / frontend-security (push) Has been cancelled

将 Landing/Docs/Pricing 的 Nav + Footer 提取到共享 PortalLayout。
Router 改为嵌套结构,路由切换时 router-view 内容变化,Nav 本身
不重挂载,消除切页时的 UI 抖动(真·SPA 行为)。

- new: components/layout/PortalLayout.vue(Nav + router-view + Footer)
- router: /、/docs、/pricing 作为 PortalLayout 的子路由
- i18n: 新增 portal.nav.* 命名空间;删除重复的 docs.nav.* / pricing.nav.* / landing.nav.*
- router: scrollBehavior 支持 hash 锚点跳转(offset 80px 绕开 sticky nav)
- router-link 使用 active-class/exact-active-class prop 替代硬编码 class="active"
This commit is contained in:
mini
2026-04-23 12:52:07 +08:00
parent 779005e1cd
commit e7f3fe5b4d
7 changed files with 174 additions and 168 deletions

View File

@@ -5823,7 +5823,7 @@ export default {
},
},
landing: {
portal: {
nav: {
products: '产品',
pricing: '定价',
@@ -5831,6 +5831,9 @@ export default {
login: '登录',
signup: '免费试用 →',
},
},
landing: {
hero: {
badgeNew: 'NEW',
eyebrow: '统一接入多个 AI 平台 · 零改动切换',
@@ -5907,13 +5910,6 @@ export default {
},
pricing: {
nav: {
products: '产品',
pricing: '定价',
docs: '文档',
login: '登录',
signup: '免费试用 →',
},
hero: {
kicker: '// pricing · 充多少 · 用多少 · 永不过期',
previewPill: '// preview · 最终定价以开售为准',
@@ -6110,13 +6106,6 @@ export default {
},
docs: {
nav: {
products: '产品',
pricing: '定价',
docs: '文档',
login: '登录',
signup: '免费试用 →',
},
hero: {
title: '快速接入 PURO AI',
subtitle: '三步走:拿 key → 配 base_url → 发请求',