diff --git a/docs/acceptance/2026-11-03-porsche-home/visual-baselines.md b/docs/acceptance/2026-11-03-porsche-home/visual-baselines.md index 2a9b4e0e..4008074c 100644 --- a/docs/acceptance/2026-11-03-porsche-home/visual-baselines.md +++ b/docs/acceptance/2026-11-03-porsche-home/visual-baselines.md @@ -67,3 +67,40 @@ E2E_TARGET=production ... --update-snapshots=none → 125 passed / 0 failed ⚠ 纪律:这一条**不得**被用来解释真正的像素回归。判据是「失败集是否可复现」—— 同一基线连跑两轮失败集不同 = 抖动;同一张连跑两轮都红 = 真回归。 + +--- + +## 2026-11-03 · P5(退役遗留 hero)之后 + +### 5 张 `/news` 红不是回归,是**构建产物被测试数据污染** + +只读复跑时 `/news` 在 5 个 project 上一致判红(不是随机子集,所以先当成真回归查)。 +差异区放大后看到多出一张卡片:`E2E 测试新闻 1793691768735-7hak7w`。 + +链路:E2E 套件里有用例会**写库**建一条 news;那次 `npm run build` 发生时该行还在, +于是 `/news` 的预渲染 HTML 把它烤了进去(`grep -c "E2E 测试新闻" dist/standalone/dist/server/app/news.html` = 2)。 +用例的 teardown 之后删了行,但 `dist/` 里的静态产物不会自己回退 —— 基线没错,产物错了。 + +处置:`prisma/dev.db` 只剩 2 条真实新闻行 → 重建 → 产物 0 命中 → `/news` 5/5 通过。 +**没有重采这 5 张**(重采等于把测试数据写进基线)。 + +教训(已可机械判定):`grep -c "E2E 测试新闻" dist/standalone/dist/server/app/news.html` 应为 0; +非 0 就先重建再谈视觉红。顺序纪律:**先跑写库型 E2E,再 build**,反过来就会把测试数据烤进产物。 + +### 补上一个真实的覆盖缺口 + +`/products/erp-upgrade-v3` 是遗留 hero 的两个调用点之一,但**视觉表里从来没有它** —— +磁盘上那 5 张 `product-erp-upgrade-v3-*` 基线是孤儿(有文件、无用例),所以退役 hero 时 +改了它的首屏却没有任何守卫。本轮把它接进 `VISUAL_TEST_PAGES`,用 `changed` 重生成这 5 张 +(复用同名文件,孤儿基线复活成有效基线),只读复跑 5/5 通过。 + +另一个调用点 `/products/standalone/[id]` 仍然**不可观测**:seed 库里没有 standalone 行, +`generateStaticParams` 产出为空 ⇒ 该路由 404。这条迁移只有类型检查 + 组件单测覆盖 +(`detail-page-hero.test.tsx` 5 例),没有视觉证据 —— 不假装有。 + +### P5 后的全量读数 + +``` +--workers=2 --update-snapshots=none → 125 passed / 0 failed +(新增 1 个用例 × 5 project 后,全量 130 例;上面 125 是加用例之前那一轮) +``` diff --git a/e2e/visual-regression.spec.ts b/e2e/visual-regression.spec.ts index c8b3956a..e0a0cbe5 100644 --- a/e2e/visual-regression.spec.ts +++ b/e2e/visual-regression.spec.ts @@ -31,6 +31,10 @@ const VISUAL_TEST_PAGES = [ { path: '/products/erp', name: 'product-erp', label: '产品详情-ERP' }, // 与 /products/erp 是不同路由:此前只在 Lighthouse URL 表里,视觉表缺它 ⇒ 同型覆盖缺口(验收 §8 限制⑦) { path: '/products/erp-upgrade', name: 'product-erp-upgrade', label: '产品 ERP 升级页' }, + // 2026-11-03 补:这条路由此前遗留 hero 的 2 个调用点之一,但视觉表里从来没有它 —— + // 磁盘上那 5 张 `product-erp-upgrade-v3-*` 基线成了**孤儿**(有文件、无用例)。 + // 退役遗留 hero 时顺手接上,否则改完这个页面没有任何视觉守卫。 + { path: '/products/erp-upgrade-v3', name: 'product-erp-upgrade-v3', label: '产品 ERP 升级页 v3' }, { path: '/about/brand', name: 'about-brand', label: '品牌资产页' }, { path: '/solutions', name: 'solutions', label: '解决方案列表' }, { path: '/solutions/manufacturing', name: 'solution-manufacturing', label: '解决方案详情-制造' }, diff --git a/e2e/visual-snapshots/visual-chromium-desktop/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-chromium-desktop.png b/e2e/visual-snapshots/visual-chromium-desktop/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-chromium-desktop.png index 437acbb7..40082c14 100644 Binary files a/e2e/visual-snapshots/visual-chromium-desktop/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-chromium-desktop.png and b/e2e/visual-snapshots/visual-chromium-desktop/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-chromium-desktop.png differ diff --git a/e2e/visual-snapshots/visual-chromium-mobile/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-chromium-mobile.png b/e2e/visual-snapshots/visual-chromium-mobile/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-chromium-mobile.png index 810f02c4..6b166942 100644 Binary files a/e2e/visual-snapshots/visual-chromium-mobile/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-chromium-mobile.png and b/e2e/visual-snapshots/visual-chromium-mobile/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-chromium-mobile.png differ diff --git a/e2e/visual-snapshots/visual-chromium-tablet/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-chromium-tablet.png b/e2e/visual-snapshots/visual-chromium-tablet/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-chromium-tablet.png index 083fa88e..a562b712 100644 Binary files a/e2e/visual-snapshots/visual-chromium-tablet/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-chromium-tablet.png and b/e2e/visual-snapshots/visual-chromium-tablet/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-chromium-tablet.png differ diff --git a/e2e/visual-snapshots/visual-firefox-desktop/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-firefox-desktop.png b/e2e/visual-snapshots/visual-firefox-desktop/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-firefox-desktop.png index 821b02ee..5298086e 100644 Binary files a/e2e/visual-snapshots/visual-firefox-desktop/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-firefox-desktop.png and b/e2e/visual-snapshots/visual-firefox-desktop/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-firefox-desktop.png differ diff --git a/e2e/visual-snapshots/visual-webkit-desktop/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-webkit-desktop.png b/e2e/visual-snapshots/visual-webkit-desktop/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-webkit-desktop.png index 6e1659bd..6ff16477 100644 Binary files a/e2e/visual-snapshots/visual-webkit-desktop/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-webkit-desktop.png and b/e2e/visual-snapshots/visual-webkit-desktop/visual-regression.spec.ts/product-erp-upgrade-v3-fullpage-visual-webkit-desktop.png differ diff --git a/scripts/check-accents.mjs b/scripts/check-accents.mjs index 981b61e3..7cf4affb 100644 --- a/scripts/check-accents.mjs +++ b/scripts/check-accents.mjs @@ -93,7 +93,7 @@ const ALLOWLIST_INLINE_COLOR = [ { file: THEME_SOURCE, color: '#0f3d3e', reason: '产品线视觉身份 novavis(受控例外,ADR-0008 决策五)' }, // —— 透传点:把真源色值写进内联 style 的两处。登记后,**新增透传点即判红** // (比如哪天有人把产品线色相从徽章扩散到卡片描边)。 - { file: 'src/components/detail/detail-hero.tsx', color: 'theme.accentColor', reason: '唯一持有该身份的内联透传点(hero 徽章)' }, + { file: 'src/components/detail/detail-page-hero.tsx', color: 'theme.accentColor', reason: '唯一持有该身份的内联透传点(eyebrow 短线,2026-11-03 由旧 detail-hero 徽章迁来)' }, { file: 'src/components/content/sections.tsx', color: 'theme.accentColor', reason: 'dataviz 构件的 accent 透传(默认值是品牌红,未被产品线覆盖)' }, ]; diff --git a/src/app/(marketing)/products/erp-upgrade-v3/page.tsx b/src/app/(marketing)/products/erp-upgrade-v3/page.tsx index c6c72f42..1af978ae 100644 --- a/src/app/(marketing)/products/erp-upgrade-v3/page.tsx +++ b/src/app/(marketing)/products/erp-upgrade-v3/page.tsx @@ -3,7 +3,7 @@ import { getProductBySlug } from '@/lib/cms/data-server'; import { COMPANY_INFO } from '@/lib/constants'; import { DetailSwipeNav } from '@/components/ui/detail-swipe-nav'; import { CTA_LABELS } from '@/lib/constants/cta-labels'; -import { DetailHero } from '@/components/detail/detail-hero'; +import { DetailPageHero } from '@/components/detail/detail-page-hero'; import { ProductValueSection } from '@/components/detail/detail-product-value'; import { DetailTrustSection } from '@/components/detail/detail-trust-section'; import { DetailCTASection } from '@/components/detail/detail-cta-section'; @@ -52,7 +52,7 @@ export default async function ERPUpgradeV3Page() {
- diff --git a/src/app/(marketing)/products/standalone/[id]/client.tsx b/src/app/(marketing)/products/standalone/[id]/client.tsx index 15597f01..69cf1474 100644 --- a/src/app/(marketing)/products/standalone/[id]/client.tsx +++ b/src/app/(marketing)/products/standalone/[id]/client.tsx @@ -3,7 +3,7 @@ import { getHeroTheme } from '@/lib/constants/hero-themes'; import { CTAButton } from '@/components/ui/cta-button'; import { CTA_LABELS } from '@/lib/constants/cta-labels'; -import { DetailHero } from '@/components/detail/detail-hero'; +import { DetailPageHero } from '@/components/detail/detail-page-hero'; import { DetailTrustSection } from '@/components/detail/detail-trust-section'; import { DetailCTASection } from '@/components/detail/detail-cta-section'; import { L3EmptyFallback } from '@/components/detail'; @@ -55,7 +55,7 @@ export function StandaloneProductClient({ item }: StandaloneProductClientProps)
- {status === 'coming-soon' ? ( diff --git a/src/components/detail/detail-hero.tsx b/src/components/detail/detail-hero.tsx deleted file mode 100644 index b773ba34..00000000 --- a/src/components/detail/detail-hero.tsx +++ /dev/null @@ -1,208 +0,0 @@ -'use client'; - -import { motion } from 'framer-motion'; -import { ArrowRight, Sparkles, ChevronDown } from 'lucide-react'; -import type { HeroTheme } from '@/lib/constants/hero-themes'; -import { PressableButton } from './micro-interactions'; - -interface DetailHeroProps { - theme: HeroTheme; - badge?: string; - title: string; - subtitle: string; - description?: string; - primaryAction?: { label: string; href: string }; - secondaryAction?: { label: string; href: string }; - /** Bain 式变体:'light' | 'brand'(深红背景) */ - variant?: 'light' | 'brand'; -} - -export function DetailHero({ - theme, - badge, - title, - subtitle, - description, - primaryAction, - secondaryAction, - variant = 'light', -}: DetailHeroProps) { - const isCenterLayout = theme.layout === 'center' || theme.layout === 'wide'; - const isBrand = variant === 'brand'; - - const bgClass = isBrand - ? 'bg-brand-section text-white' - : 'bg-bg-primary text-ink'; - - return ( -
- {/* 品牌色背景纹理 */} - {isBrand && ( -
- )} -
- - {(badge || theme.badge) && ( - - - - - {badge || theme.badge} - - )} - - - {title} - - - - {subtitle} - - - {description && ( - - {description} - - )} - - {(primaryAction || secondaryAction) && ( - - {primaryAction && ( - - {primaryAction.label} - - - )} - {secondaryAction && ( - - {secondaryAction.label} - - )} - - )} - - - -
- -
-
-
-
- ); -} diff --git a/src/components/detail/detail-page-hero.test.tsx b/src/components/detail/detail-page-hero.test.tsx new file mode 100644 index 00000000..b8436d45 --- /dev/null +++ b/src/components/detail/detail-page-hero.test.tsx @@ -0,0 +1,85 @@ +import { render, screen } from '@testing-library/react'; +import '@testing-library/jest-dom'; +import { DetailPageHero } from './detail-page-hero'; +import type { HeroTheme } from '@/lib/constants/hero-themes'; + +const theme: HeroTheme = { + id: 'erp', + name: 'ERP', + accentColor: '#1e3a5f', + badge: '企业套装', +}; + +const base = { + theme, + title: '睿新 ERP 管理系统', + subtitle: '企业资源管理专家', +}; + +/** + * 这组用例同时是**旧实现的回归防线**:被取代的遗留 `DetailHero` 有四处与 + * DESIGN.md / ADR-0008 冲突的做法,任何一处回来都应当在这里被判红 —— + * 光删文件不写防线,下一个"重构"就会把它抄回来。 + */ +describe('DetailPageHero', () => { + it('标题走 h1,副标题与描述都在', () => { + render(); + expect(screen.getByRole('heading', { level: 1 }).textContent).toBe(base.title); + expect(screen.getByText(base.subtitle)).toBeInTheDocument(); + expect(screen.getByText('覆盖采购到交付的全流程')).toBeInTheDocument(); + }); + + it('产品线色相只落在 eyebrow 短线上(3px 色条),不铺胶囊底纹', () => { + const { container } = render(); + const bar = container.querySelector('span[aria-hidden="true"]') as HTMLElement; + expect(bar).toBeTruthy(); + // 色值来自真源、此处只透传 —— check:accents 判据 B 的登记点就是这一处 + expect(bar.style.backgroundColor).toBeTruthy(); + expect(bar.className).toContain('h-[3px]'); + // 旧实现:rounded-full 胶囊 + 6.3% alpha 底纹 + Sparkles 图标 + expect(container.querySelector('.rounded-full')).toBeNull(); + expect(container.innerHTML).toContain('ERP'); + expect(bar.className).not.toContain('rounded-full'); + }); + + it('badge 覆盖主题自带徽章;都不传时回落主题名', () => { + const { rerender } = render(); + expect(screen.getByText('企业旗舰系列')).toBeInTheDocument(); + rerender(); + expect(screen.getByText('企业套装')).toBeInTheDocument(); + rerender(); + expect(screen.getByText('ERP')).toBeInTheDocument(); + }); + + it('两轨 CTA 各自带 testid,href 原样透出;缺动作时整行不渲染', () => { + const { rerender } = render( + , + ); + expect(screen.getByTestId('erp-hero-primary')).toHaveAttribute('href', '/contact'); + expect(screen.getByTestId('erp-hero-secondary')).toHaveAttribute('href', '/solutions'); + + rerender(); + expect(screen.queryByTestId('erp-hero-primary')).toBeNull(); + }); + + it('回归防线:不回到满幅红面 / 700px 宣言档 / 装饰模糊 / 1.x 秒延迟', () => { + const { container } = render( + , + ); + const section = container.querySelector('section')!; + expect(section.className).toContain('bg-bg-primary'); + expect(section.className).not.toContain('bg-brand-section'); + expect(section.className).not.toContain('min-h-[700px]'); + // 旧实现是 framer-motion 的 blur→0 入场 + delay 0.05/0.25/0.4/0.55/1.5 + expect(container.innerHTML).not.toContain('blur('); + expect(container.querySelector('[style*="filter"]')).toBeNull(); + }); +}); diff --git a/src/components/detail/detail-page-hero.tsx b/src/components/detail/detail-page-hero.tsx new file mode 100644 index 00000000..8aa5cc0b --- /dev/null +++ b/src/components/detail/detail-page-hero.tsx @@ -0,0 +1,100 @@ +import { CTAButton } from '@/components/ui/cta-button'; +import type { HeroTheme } from '@/lib/constants/hero-themes'; + +/** + * 详情页首屏(Detail Page Hero)—— 取代 2026-11 之前那版遗留 `DetailHero`。 + * + * 被取代的旧实现有四条与 ADR-0008/0009 直接冲突的做法,都是有据可查的: + * 1. `min-h-[700px]`:DESIGN.md「Layout · Hero 四档音量」明写叶子详情页是**紧凑引言** + * (无 min-h、`py-16 sm:py-20 lg:py-28`),旧实现按首页宣言档在做。 + * 2. `rounded-full` 胶囊徽章 + `bg-brand-section`(当前 variant='brand' 时)满幅红面: + * 两家对标实测红只做按钮,满幅红面是本仓自造语法。 + * 3. `Sparkles` 图标 + 模糊入场(`filter: blur(8px)` → 0)+ `delay: 1.5` 的滚动提示: + * 装饰性模糊与 1.x 秒等待都在禁止清单里。 + * 4. 4 段错峰 delay(0.05/0.25/0.4/0.55)靠 staggerChildren 级联,实际观感是"逐个挤出来"。 + * + * 本实现借用的是 v17 首页那套已经验证过的语法:白底、左对齐、40/64 声明、400/700 双字重、 + * 实心 + 描边两轨 CTA、入场只做 280ms 的 fadeUp。 + * + * **产品线色相(7 个受控例外)的落点从"胶囊徽章底纹"移到"eyebrow 短线"**: + * 一条 3px × 24px 的色条 + 一行中性标签。色相身份保留(`check:accents` 判据 B 的 + * 透传点从旧 hero 迁到这里,按 文件+色值 登记),但可见面积从视口的 0.538% 降到发丝级, + * 不再需要靠 6.3% alpha 底纹去"不刺眼"。 + */ + +export interface DetailPageHeroAction { + label: string; + href: string; +} + +export function DetailPageHero({ + theme, + badge, + title, + subtitle, + description, + primaryAction, + secondaryAction, + testIdPrefix = 'detail-hero', +}: { + theme: HeroTheme; + /** 徽章文案(分类 / 状态)。省略时回落到主题自带的 badge 或主题名 */ + badge?: string; + title: string; + subtitle: string; + description?: string; + primaryAction?: DetailPageHeroAction; + secondaryAction?: DetailPageHeroAction; + /** e2e/testid 前缀:`${prefix}-primary` / `${prefix}-secondary` */ + testIdPrefix?: string; +}) { + const eyebrow = badge || theme.badge || theme.name; + + return ( +
+
+
+ {/* 产品线视觉身份的唯一落点:3px × 24px 短线。 + 色值来自真源(hero-themes.ts),此处只做透传 —— check:accents 判据 B 登记在此。 */} +
+ +

+ {title} +

+ +

{subtitle}

+ + {description && ( +

{description}

+ )} + + {(primaryAction || secondaryAction) && ( +
+ {primaryAction && ( + + {primaryAction.label} + + )} + {secondaryAction && ( + + {secondaryAction.label} + + )} +
+ )} +
+
+ ); +} diff --git a/src/components/detail/detail.test.tsx b/src/components/detail/detail.test.tsx index 9f3bfbde..f3a815d9 100644 --- a/src/components/detail/detail.test.tsx +++ b/src/components/detail/detail.test.tsx @@ -184,13 +184,6 @@ const mockHeroTheme = { badge: '企业套装', }; -const mockCenterTheme = { - ...mockHeroTheme, - id: 'solution', - layout: 'center' as const, - badge: undefined, -}; - const mockProduct = { id: 'erp', title: 'ERP 企业资源管理系统', @@ -221,143 +214,6 @@ const mockProduct = { // ─── Tests ─────────────────────────────────────────────────────────────── -describe('DetailHero', () => { - it('should render title and subtitle', async () => { - const { DetailHero } = await import('./detail-hero'); - render( - - ); - expect(screen.getByText('ERP 系统')).toBeInTheDocument(); - expect(screen.getByText('企业资源管理专家')).toBeInTheDocument(); - }); - - it('should render badge from theme', async () => { - const { DetailHero } = await import('./detail-hero'); - render( - - ); - expect(screen.getByText('企业套装')).toBeInTheDocument(); - }); - - it('should render badge prop overriding theme badge', async () => { - const { DetailHero } = await import('./detail-hero'); - render( - - ); - expect(screen.getByText('新版')).toBeInTheDocument(); - }); - - it('should render description when provided', async () => { - const { DetailHero } = await import('./detail-hero'); - render( - - ); - expect(screen.getByText('Detailed description here')).toBeInTheDocument(); - }); - - it('should not render description when not provided', async () => { - const { DetailHero } = await import('./detail-hero'); - const { container } = render( - - ); - // Should still render subtitle but no extra description paragraph - expect(screen.getByText('Expert')).toBeInTheDocument(); - // The description text should not be present - expect(container.querySelector('section')?.children.length).toBeGreaterThan(0); - }); - - it('should render primary and secondary actions', async () => { - const { DetailHero } = await import('./detail-hero'); - render( - - ); - expect(screen.getByText('了解更多')).toBeInTheDocument(); - expect(screen.getByText('预约演示')).toBeInTheDocument(); - }); - - it('should not render actions when not provided', async () => { - const { DetailHero } = await import('./detail-hero'); - render( - - ); - expect(screen.queryByText('了解更多')).not.toBeInTheDocument(); - }); - - it('should render no badge when theme has no badge and no badge prop', async () => { - const { DetailHero } = await import('./detail-hero'); - render( - - ); - // Center theme has no badge - verify sparkles (badge icon) is not in document - expect(screen.queryByText('企业套装')).not.toBeInTheDocument(); - }); - - it('should render with center layout', async () => { - const { DetailHero } = await import('./detail-hero'); - const { container } = render( - - ); - // Center layout renders text-center class - const section = container.querySelector('section'); - expect(section).toBeInTheDocument(); - }); - - it('should use theme-aware bg token (not hard-coded bg-white) for light variant', async () => { - const { DetailHero } = await import('./detail-hero'); - const { container } = render( - - ); - // 暗黑模式:浅色底色必须走 CSS 变量 token,dark 下才能随主题反色 - const section = container.querySelector('section'); - expect(section?.className).toContain('bg-bg-primary'); - expect(section?.className).not.toContain('bg-white'); - }); -}); - describe('ProductValueSection', () => { it('should render product title and overview', async () => { const { ProductValueSection } = await import('./detail-product-value'); diff --git a/src/components/detail/index.ts b/src/components/detail/index.ts index 05081c8c..8a2a1d25 100644 --- a/src/components/detail/index.ts +++ b/src/components/detail/index.ts @@ -1,4 +1,4 @@ -export { DetailHero } from './detail-hero'; +export { DetailPageHero } from './detail-page-hero'; export { ProductValueSection } from './detail-product-value'; diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 4cb4e242..b272b606 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -31,8 +31,6 @@ export { getSolutionCrossRefs, getServiceCrossRefs, type HeroTheme, - type HeroLayout, - type HeroTexture, type CrossReference, type MegaDropdownGroup, SERVICE_COMMITMENTS, diff --git a/src/lib/constants/hero-themes.ts b/src/lib/constants/hero-themes.ts index 144094b7..581bcd91 100644 --- a/src/lib/constants/hero-themes.ts +++ b/src/lib/constants/hero-themes.ts @@ -1,21 +1,7 @@ -export type HeroLayout = 'left' | 'center' | 'wide' | 'icon-left'; - -export interface HeroTexture { - type: 'grid' | 'data-flow' | 'layers' | 'shield-hex' | 'circuit' | 'none'; - opacity: number; - color?: string; -} - export interface HeroTheme { id: string; name: string; - gradientFrom: string; - gradientTo: string; - gradientAngle: number; accentColor: string; - accentBg: string; - texture: HeroTexture; - layout: HeroLayout; badge?: string; } @@ -23,131 +9,65 @@ export const HERO_THEMES: Record = { erp: { id: 'erp', name: 'ERP', - gradientFrom: '#f8f6f3', - gradientTo: '#f0ebe4', - gradientAngle: 135, accentColor: '#1e3a5f', - accentBg: 'rgba(30, 58, 95, 0.06)', - texture: { type: 'grid', opacity: 0.03 }, - layout: 'left', badge: '企业套装', }, crm: { id: 'crm', name: 'CRM', - gradientFrom: '#f7f5f2', - gradientTo: '#eee9e2', - gradientAngle: 120, accentColor: '#1e40af', - accentBg: 'rgba(30, 64, 175, 0.06)', - texture: { type: 'layers', opacity: 0.03 }, - layout: 'left', badge: '企业套装', }, bi: { id: 'bi', name: 'BI', - gradientFrom: '#FAF8F4', - gradientTo: '#EFEAE1', - gradientAngle: 145, accentColor: '#0c4a6e', - accentBg: 'rgba(12, 74, 110, 0.06)', - texture: { type: 'data-flow', opacity: 0.03 }, - layout: 'left', badge: '企业套装', }, cms: { id: 'cms', name: 'CMS', - gradientFrom: '#f5f8f5', - gradientTo: '#eaf0ea', - gradientAngle: 130, accentColor: '#14532d', - accentBg: 'rgba(20, 83, 45, 0.06)', - texture: { type: 'layers', opacity: 0.03 }, - layout: 'left', badge: '企业套装', }, sds: { id: 'sds', name: 'SDS', - gradientFrom: '#faf7f4', - gradientTo: '#f3ede5', - gradientAngle: 140, accentColor: '#78350f', - accentBg: 'rgba(120, 53, 15, 0.06)', - texture: { type: 'data-flow', opacity: 0.03 }, - layout: 'left', badge: '企业套装', }, oa: { id: 'oa', name: 'OA', - gradientFrom: '#f7f5fa', - gradientTo: '#efeaf5', - gradientAngle: 125, accentColor: '#4c1d95', - accentBg: 'rgba(76, 29, 149, 0.06)', - texture: { type: 'grid', opacity: 0.03 }, - layout: 'left', badge: '企业套装', }, novavis: { id: 'novavis', name: 'NovaVis', - gradientFrom: '#f4fafa', - gradientTo: '#e8f3f3', - gradientAngle: 150, accentColor: '#0f3d3e', - accentBg: 'rgba(15, 61, 62, 0.06)', - texture: { type: 'data-flow', opacity: 0.04 }, - layout: 'wide', badge: '专业产品', }, solution: { id: 'solution', name: '解决方案', - gradientFrom: '#f8f6f3', - gradientTo: '#f0ebe4', - gradientAngle: 150, accentColor: '#C41E3A', - accentBg: 'rgba(196, 30, 58, 0.06)', - texture: { type: 'circuit', opacity: 0.02 }, - layout: 'center', }, service: { id: 'service', name: '服务', - gradientFrom: '#f7f5f2', - gradientTo: '#eee9e2', - gradientAngle: 135, accentColor: '#C41E3A', - accentBg: 'rgba(196, 30, 58, 0.06)', - texture: { type: 'none', opacity: 0 }, - layout: 'icon-left', }, security: { id: 'security', name: '安全产品', - gradientFrom: '#faf5f5', - gradientTo: '#f5eded', - gradientAngle: 135, accentColor: '#991b1b', - accentBg: 'rgba(153, 27, 27, 0.06)', - texture: { type: 'shield-hex', opacity: 0.03 }, - layout: 'wide', badge: '安全合规', }, default: { id: 'default', name: '默认', - gradientFrom: '#f8f6f3', - gradientTo: '#f0ebe4', - gradientAngle: 140, accentColor: '#C41E3A', - accentBg: 'rgba(196, 30, 58, 0.06)', - texture: { type: 'none', opacity: 0 }, - layout: 'left', }, }; diff --git a/src/lib/constants/index.ts b/src/lib/constants/index.ts index 4d7ace43..466fa998 100644 --- a/src/lib/constants/index.ts +++ b/src/lib/constants/index.ts @@ -11,7 +11,7 @@ export type { TeamMember } from './team'; export { METHODOLOGY, type MethodologyPhase } from './methodology'; export { SOLUTIONS, type Solution } from './solutions'; export { CASE_INDUSTRIES, type CaseStudy, type CaseMetric, type CaseTimelinePhase, type CaseService, type CaseTestimonial } from './cases'; -export { HERO_THEMES, getHeroTheme, type HeroTheme, type HeroLayout, type HeroTexture } from './hero-themes'; +export { HERO_THEMES, getHeroTheme, type HeroTheme } from './hero-themes'; export { IMAGE_RATIOS, aspectStyle, aspectWidthStyle, type ImageRatio } from './image-ratios'; export { getProductCrossRefs, getSolutionCrossRefs, getServiceCrossRefs, type CrossReference } from './cross-references'; export {