# ERP 产品落地页实现计划 > **面向 AI 代理的工作者:** 必需子技能:使用 superpowers:subagent-driven-development(推荐)或 superpowers:executing-plans 逐任务实现此计划。步骤使用复选框(`- [ ]`)语法来跟踪进度。 **目标:** 将 ERP 产品详情页改造为 Terminal 风格的全屏沉浸式落地页 **架构:** 组件化重构,每个 section 独立组件,复用现有 Framer Motion 动画库,通过客户端组件组合所有 section **技术栈:** Next.js 16 + React 19 + Tailwind CSS v4 + Framer Motion --- ## 文件结构 ``` 新建文件: src/components/products/ ├── product-hero-section.tsx # Section 1: 全屏沉浸 Hero ├── product-overview-section.tsx # Section 2: 产品概述 ├── product-features-section.tsx # Section 3: 核心功能(滚动叙事) ├── product-benefits-section.tsx # Section 4: 产品优势 ├── product-process-section.tsx # Section 5: 实施流程 ├── product-specs-section.tsx # Section 6: 技术规格 ├── product-pricing-section.tsx # Section 7: 定价方案 ├── product-cta-section.tsx # Section 8: CTA 横幅 └── index.ts # 统一导出 src/app/(marketing)/products/[id]/ └── product-detail-client.tsx # 客户端组件入口 修改文件: src/app/(marketing)/products/[id]/page.tsx src/components/layout/header.tsx ``` --- ## 任务 1:创建产品 Hero Section 组件 **文件:** - 创建:`src/components/products/product-hero-section.tsx` - [ ] **步骤 1:创建 product-hero-section.tsx** ```tsx 'use client'; import { useEffect, useRef, useState } from 'react'; import { motion, useScroll, useTransform } from 'framer-motion'; import dynamic from 'next/dynamic'; import { MagneticButton } from '@/lib/animations'; import { ChevronDown } from 'lucide-react'; import type { Product } from '@/lib/constants/products'; const InkBackground = dynamic( () => import('@/components/ui/ink-decoration').then(mod => ({ default: mod.InkBackground })), { ssr: false } ); const DataParticleFlow = dynamic( () => import('@/components/effects/data-particle-flow').then(mod => ({ default: mod.DataParticleFlow })), { ssr: false } ); interface ProductHeroSectionProps { product: Product; } export function ProductHeroSection({ product }: ProductHeroSectionProps) { const [isVisible, setIsVisible] = useState(false); const sectionRef = useRef(null); useEffect(() => { const observer = new IntersectionObserver( ([entry]) => { if (entry?.isIntersecting) { setIsVisible(true); } }, { threshold: 0.1 } ); if (sectionRef.current) { observer.observe(sectionRef.current); } return () => observer.disconnect(); }, []); return (
{/* 背景特效 */} {/* 内容 */}
{/* 分类标签 */} {product.category} {/* 产品名称 */} {product.title} {/* 价值主张 */} {product.description} {/* CTA 按钮 */} 预约演示
{/* 滚动指示器 */}
); } ``` - [ ] **步骤 2:Commit** ```bash git add src/components/products/product-hero-section.tsx git commit -m "feat(products): add product hero section component" ``` --- ## 任务 2:创建产品概述 Section 组件 **文件:** - 创建:`src/components/products/product-overview-section.tsx` - [ ] **步骤 1:创建 product-overview-section.tsx** ```tsx 'use client'; import { motion, useInView } from 'framer-motion'; import { useRef } from 'react'; import { TextReveal } from '@/components/ui/scroll-animations'; import type { Product } from '@/lib/constants/products'; interface ProductOverviewSectionProps { product: Product; } export function ProductOverviewSection({ product }: ProductOverviewSectionProps) { const ref = useRef(null); const isInView = useInView(ref, { once: true, margin: '-100px' }); return (
{/* 标题 */} 产品概述 {/* 概述文字 - 逐词揭示 */}
); } ``` - [ ] **步骤 2:Commit** ```bash git add src/components/products/product-overview-section.tsx git commit -m "feat(products): add product overview section component" ``` --- ## 任务 3:创建核心功能 Section 组件(滚动叙事) **文件:** - 创建:`src/components/products/product-features-section.tsx` - [ ] **步骤 1:创建 product-features-section.tsx** ```tsx 'use client'; import { motion, useInView, useScroll, useTransform } from 'framer-motion'; import { useRef } from 'react'; import type { Product } from '@/lib/constants/products'; interface ProductFeaturesSectionProps { product: Product; } function FeatureItem({ feature, index, }: { feature: string; index: number; }) { const ref = useRef(null); const isInView = useInView(ref, { once: true, margin: '-50px' }); // 解析功能标题和描述 const [title, ...descParts] = feature.split(':'); const description = descParts.join(':'); // 编号格式化 const number = String(index + 1).padStart(2, '0'); return (
{/* 左侧:编号和文字 */}
{/* 编号 */} {number} {/* 功能标题 */} {title} {/* 功能描述 */} {description && ( {description} )}
{/* 右侧:动画占位区域 */}
); } export function ProductFeaturesSection({ product }: ProductFeaturesSectionProps) { const sectionRef = useRef(null); return (
{/* 标题 */}
核心功能 全方位覆盖企业核心业务场景
{/* 功能列表 */} {product.features.map((feature, index) => ( ))}
); } ``` - [ ] **步骤 2:Commit** ```bash git add src/components/products/product-features-section.tsx git commit -m "feat(products): add product features section with scroll storytelling" ``` --- ## 任务 4:创建产品优势 Section 组件 **文件:** - 创建:`src/components/products/product-benefits-section.tsx` - [ ] **步骤 1:创建 product-benefits-section.tsx** ```tsx 'use client'; import { motion, useInView } from 'framer-motion'; import { useRef } from 'react'; import { StaggerReveal, StaggerItem, CounterWithEffect } from '@/lib/animations'; import type { Product } from '@/lib/constants/products'; interface ProductBenefitsSectionProps { product: Product; } // 解析优势中的数字 function extractNumber(text: string): { number: number; suffix: string } | null { const match = text.match(/(\d+)%/); if (match) { return { number: parseInt(match[1], 10), suffix: '%' }; } return null; } function BenefitCard({ benefit, index, }: { benefit: string; index: number; }) { const numberInfo = extractNumber(benefit); return ( {numberInfo && (
)}

{benefit}

); } export function ProductBenefitsSection({ product }: ProductBenefitsSectionProps) { const ref = useRef(null); const isInView = useInView(ref, { once: true, margin: '-100px' }); return (
{/* 标题 */} 产品优势 经过验证的业务价值提升 {/* 优势卡片网格 */} {product.benefits.map((benefit, index) => ( ))}
); } ``` - [ ] **步骤 2:Commit** ```bash git add src/components/products/product-benefits-section.tsx git commit -m "feat(products): add product benefits section with counter animation" ``` --- ## 任务 5:创建实施流程 Section 组件 **文件:** - 创建:`src/components/products/product-process-section.tsx` - [ ] **步骤 1:创建 product-process-section.tsx** ```tsx 'use client'; import { motion, useInView } from 'framer-motion'; import { useRef } from 'react'; import type { Product } from '@/lib/constants/products'; interface ProductProcessSectionProps { product: Product; } function ProcessStep({ step, index, total, }: { step: string; index: number; total: number; }) { const ref = useRef(null); const isInView = useInView(ref, { once: true, margin: '-50px' }); // 解析步骤标题和描述 const [title, ...descParts] = step.split(':'); const description = descParts.join(':'); return ( {/* 编号圆圈 */}
{index + 1}
{index < total - 1 && (
)}
{/* 内容 */}

{title}

{description && (

{description}

)}
); } export function ProductProcessSection({ product }: ProductProcessSectionProps) { const ref = useRef(null); const isInView = useInView(ref, { once: true, margin: '-100px' }); return (
{/* 标题 */} 实施流程 专业团队全程护航,确保项目成功落地 {/* 步骤列表 */}
{product.process.map((step, index) => ( ))}
); } ``` - [ ] **步骤 2:Commit** ```bash git add src/components/products/product-process-section.tsx git commit -m "feat(products): add product process section with timeline" ``` --- ## 任务 6:创建技术规格 Section 组件 **文件:** - 创建:`src/components/products/product-specs-section.tsx` - [ ] **步骤 1:创建 product-specs-section.tsx** ```tsx 'use client'; import { motion, useInView } from 'framer-motion'; import { useRef } from 'react'; import { StaggerReveal, StaggerItem } from '@/components/ui/scroll-animations'; import type { Product } from '@/lib/constants/products'; interface ProductSpecsSectionProps { product: Product; } export function ProductSpecsSection({ product }: ProductSpecsSectionProps) { const ref = useRef(null); const isInView = useInView(ref, { once: true, margin: '-100px' }); return (
{/* 标题 */} 技术规格 灵活配置,满足多样化业务需求 {/* 规格网格 */} {product.specs.map((spec, index) => (
{spec} ))}
); } ``` - [ ] **步骤 2:Commit** ```bash git add src/components/products/product-specs-section.tsx git commit -m "feat(products): add product specs section" ``` --- ## 任务 7:创建定价方案 Section 组件 **文件:** - 创建:`src/components/products/product-pricing-section.tsx` - [ ] **步骤 1:创建 product-pricing-section.tsx** ```tsx 'use client'; import { motion, useInView } from 'framer-motion'; import { useRef } from 'react'; import { StaggerReveal, StaggerItem } from '@/components/ui/scroll-animations'; import { MagneticButton } from '@/lib/animations'; import { Check } from 'lucide-react'; import type { Product } from '@/lib/constants/products'; interface ProductPricingSectionProps { product: Product; } const pricingFeatures = { base: ['基础功能模块', '邮件支持', '标准报表'], standard: ['全部功能模块', '电话支持', '自定义报表', '优先响应'], enterprise: ['全部功能模块', '专属客服', '定制开发', 'SLA保障'], }; function PricingCard({ name, price, features, isRecommended = false, }: { name: string; price: string; features: string[]; isRecommended?: boolean; }) { const ref = useRef(null); const isInView = useInView(ref, { once: true, margin: '-50px' }); return ( {/* 推荐标签 */} {isRecommended && (
推荐
)} {/* 名称 */}

{name}

{/* 价格 */}

{price}

{/* 功能列表 */}
    {features.map((feature, index) => (
  • {feature}
  • ))}
{/* 按钮 */} 立即咨询
); } export function ProductPricingSection({ product }: ProductPricingSectionProps) { const ref = useRef(null); const isInView = useInView(ref, { once: true, margin: '-100px' }); return (
{/* 标题 */} 价格方案 灵活定价,按需选择 {/* 定价卡片 */}
); } ``` - [ ] **步骤 2:Commit** ```bash git add src/components/products/product-pricing-section.tsx git commit -m "feat(products): add product pricing section with dark theme" ``` --- ## 任务 8:创建 CTA Section 组件 **文件:** - 创建:`src/components/products/product-cta-section.tsx` - [ ] **步骤 1:创建 product-cta-section.tsx** ```tsx 'use client'; import { motion, useInView } from 'framer-motion'; import { useRef } from 'react'; import { MagneticButton } from '@/lib/animations'; export function ProductCTASection() { const ref = useRef(null); const isInView = useInView(ref, { once: true, margin: '-100px' }); return (
{/* 标题 */} 准备好提升企业运营效率了吗? {/* 描述 */} 立即联系我们,获取专属解决方案 {/* 按钮 */} 立即咨询 电话咨询
); } ``` - [ ] **步骤 2:Commit** ```bash git add src/components/products/product-cta-section.tsx git commit -m "feat(products): add product CTA section" ``` --- ## 任务 9:创建统一导出文件 **文件:** - 创建:`src/components/products/index.ts` - [ ] **步骤 1:创建 index.ts** ```tsx export { ProductHeroSection } from './product-hero-section'; export { ProductOverviewSection } from './product-overview-section'; export { ProductFeaturesSection } from './product-features-section'; export { ProductBenefitsSection } from './product-benefits-section'; export { ProductProcessSection } from './product-process-section'; export { ProductSpecsSection } from './product-specs-section'; export { ProductPricingSection } from './product-pricing-section'; export { ProductCTASection } from './product-cta-section'; ``` - [ ] **步骤 2:Commit** ```bash git add src/components/products/index.ts git commit -m "feat(products): add products components index" ``` --- ## 任务 10:创建产品详情客户端组件 **文件:** - 创建:`src/app/(marketing)/products/[id]/product-detail-client.tsx` - [ ] **步骤 1:创建 product-detail-client.tsx** ```tsx 'use client'; import { useEffect, useState } from 'react'; import dynamic from 'next/dynamic'; import { PRODUCTS, type Product } from '@/lib/constants/products'; // 动态导入所有 section 组件 const ProductHeroSection = dynamic( () => import('@/components/products/product-hero-section').then(mod => ({ default: mod.ProductHeroSection })), { ssr: false } ); const ProductOverviewSection = dynamic( () => import('@/components/products/product-overview-section').then(mod => ({ default: mod.ProductOverviewSection })), { ssr: false } ); const ProductFeaturesSection = dynamic( () => import('@/components/products/product-features-section').then(mod => ({ default: mod.ProductFeaturesSection })), { ssr: false } ); const ProductBenefitsSection = dynamic( () => import('@/components/products/product-benefits-section').then(mod => ({ default: mod.ProductBenefitsSection })), { ssr: false } ); const ProductProcessSection = dynamic( () => import('@/components/products/product-process-section').then(mod => ({ default: mod.ProductProcessSection })), { ssr: false } ); const ProductSpecsSection = dynamic( () => import('@/components/products/product-specs-section').then(mod => ({ default: mod.ProductSpecsSection })), { ssr: false } ); const ProductPricingSection = dynamic( () => import('@/components/products/product-pricing-section').then(mod => ({ default: mod.ProductPricingSection })), { ssr: false } ); const ProductCTASection = dynamic( () => import('@/components/products/product-cta-section').then(mod => ({ default: mod.ProductCTASection })), { ssr: false } ); interface ProductDetailClientProps { productId: string; } export function ProductDetailClient({ productId }: ProductDetailClientProps) { const [product, setProduct] = useState(null); const [isDarkHeader, setIsDarkHeader] = useState(true); useEffect(() => { const found = PRODUCTS.find(p => p.id === productId); setProduct(found || null); }, [productId]); // 监听滚动,控制导航栏颜色 useEffect(() => { const handleScroll = () => { const heroHeight = window.innerHeight; setIsDarkHeader(window.scrollY < heroHeight * 0.8); }; window.addEventListener('scroll', handleScroll, { passive: true }); return () => window.removeEventListener('scroll', handleScroll); }, []); // 设置导航栏颜色(通过 CSS 变量或全局状态) useEffect(() => { document.documentElement.setAttribute('data-header-theme', isDarkHeader ? 'dark' : 'light'); }, [isDarkHeader]); if (!product) { return (

加载中...

); } return (
); } ``` - [ ] **步骤 2:Commit** ```bash git add src/app/\(marketing\)/products/\[id\]/product-detail-client.tsx git commit -m "feat(products): add product detail client component" ``` --- ## 任务 11:修改产品详情页面入口 **文件:** - 修改:`src/app/(marketing)/products/[id]/page.tsx` - [ ] **步骤 1:修改 page.tsx** 将现有内容替换为: ```tsx import { notFound } from 'next/navigation'; import { PRODUCTS } from '@/lib/constants'; import { ProductDetailClient } from './product-detail-client'; export async function generateStaticParams() { return PRODUCTS.map((product) => ({ id: product.id, })); } export async function generateMetadata({ params }: { params: Promise<{ id: string }> }) { const { id } = await params; const product = PRODUCTS.find((p) => p.id === id); if (!product) { return { title: '产品未找到', }; } return { title: `${product.title} - 睿新致远`, description: product.description, }; } export default async function ProductDetailPage({ params }: { params: Promise<{ id: string }> }) { const { id } = await params; const product = PRODUCTS.find((p) => p.id === id); if (!product) { notFound(); } return ; } ``` - [ ] **步骤 2:Commit** ```bash git add src/app/\(marketing\)/products/\[id\]/page.tsx git commit -m "refactor(products): update product detail page to use client component" ``` --- ## 任务 12:修改 Header 组件支持深色模式 **文件:** - 修改:`src/components/layout/header.tsx` - [ ] **步骤 1:修改 Header 组件** 在 `HeaderContent` 函数中,找到导航栏的 className 定义,修改为支持深色模式: ```tsx // 在 HeaderContent 函数开头添加 const [headerTheme, setHeaderTheme] = useState<'light' | 'dark'>('light'); useEffect(() => { const handleThemeChange = () => { const theme = document.documentElement.getAttribute('data-header-theme'); setHeaderTheme(theme === 'dark' ? 'dark' : 'light'); }; // 初始检查 handleThemeChange(); // 使用 MutationObserver 监听属性变化 const observer = new MutationObserver(handleThemeChange); observer.observe(document.documentElement, { attributes: true, attributeFilter: ['data-header-theme'], }); return () => observer.disconnect(); }, []); // 修改 header 的 className
``` 同时修改 Logo 和导航链接的颜色: ```tsx // Logo 颜色 {COMPANY_INFO.name} // 导航链接颜色 ``` - [ ] **步骤 2:Commit** ```bash git add src/components/layout/header.tsx git commit -m "feat(layout): add dark mode support to header component" ``` --- ## 任务 13:验证构建 - [ ] **步骤 1:运行构建** ```bash npm run build ``` 预期:构建成功,无错误 - [ ] **步骤 2:本地预览** ```bash npm run start ``` 访问 `http://localhost:3000/products/erp` 验证效果 - [ ] **步骤 3:最终 Commit** ```bash git add -A git commit -m "feat(products): complete ERP product landing page with Terminal-style design" ``` --- ## 规格覆盖度检查 | 规格章节 | 对应任务 | |---------|---------| | Section 1: 全屏沉浸 Hero | 任务 1 | | Section 2: 产品概述 | 任务 2 | | Section 3: 核心功能(滚动叙事) | 任务 3 | | Section 4: 产品优势 | 任务 4 | | Section 5: 实施流程 | 任务 5 | | Section 6: 技术规格 | 任务 6 | | Section 7: 定价方案 | 任务 7 | | Section 8: CTA 横幅 | 任务 8 | | 导航栏动态变色 | 任务 12 | | 文件结构 | 任务 9, 10, 11 | ✅ 所有规格需求已覆盖 --- **计划版本**: 1.0 **最后更新**: 2026-04-24