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 登记在此。 */}
+
+
+ {eyebrow}
+
+
+
+
+ {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 {