'use client'; import { useRef } from 'react'; import Image from 'next/image'; import { motion } from 'framer-motion'; import { ScrollReveal, StaggerReveal } from '@/components/ui/scroll-reveal'; import { Badge } from '@/components/ui/badge'; import { HeroProductVisual } from '@/components/sections/hero-product-visual'; import { ArrowRight, Lightbulb, Database, Layers, Code, Puzzle, Server } from 'lucide-react'; import { cn } from '@/lib/utils'; import { EASE_OUT } from '@/components/ui/page-decoration'; import { COMPANY_INFO, TRUST_SIGNALS, EARLY_ACCESS } from '@/lib/constants'; import { useSiteConfig } from '@/lib/site-config'; // ===== 服务图标映射:将字符串键名映射为 Lucide 组件 ===== const SERVICE_ICON_MAP: Record = { Lightbulb: , Code: , Server: , Puzzle: , }; // ===== 服务数据降级兜底(4 条,保证 sm:grid-cols-2 网格完整,避免孤儿格)===== const FALLBACK_SERVICES = [ { subtitle: 'Strategy Consulting', title: '数字化转型战略咨询', desc: '从业务诊断到数字化路线图,帮助企业识别高价值场景,规划可落地的转型路径,确保每一分投入都能产生可衡量的业务回报。', highlights: ['业务诊断', '数字化蓝图', '实施路线图', 'ROI 评估'], metrics: [ { value: '40%', label: '平均运营效率提升' }, { value: '6个月', label: '战略到试点周期' }, ], href: '/services/consulting', icon: , }, { subtitle: 'Software Delivery', title: '企业软件定制开发', desc: '基于自研产品矩阵与工程化交付流程,提供从需求分析、架构设计到持续运维的全栈软件开发服务,支撑业务数字化落地。', highlights: ['需求分析', '架构设计', '敏捷开发', '持续运维'], metrics: [ { value: '6', label: '款自研产品' }, { value: '24/7', label: '运维支持' }, ], href: '/services/software', icon: , }, { subtitle: 'Data Intelligence', title: '数据智能与 AI 应用', desc: '构建企业级数据平台与 AI 能力,打通数据孤岛,沉淀数据资产,让决策从经验驱动转向数据驱动。', highlights: ['数据中台', 'AI 建模', '可视化分析', '预测决策'], metrics: [ { value: '98%', label: '数据质量达标率' }, { value: '10x', label: '分析效率提升' }, ], href: '/services/data', icon: , }, { subtitle: 'Solution Delivery', title: '行业解决方案落地', desc: '基于核心团队的行业实践,提供从方案设计、系统开发到上线运维的一站式交付,确保数字化转型真正落地生根。', highlights: ['行业套件', '定制开发', '系统集成', '持续运维'], metrics: [ { value: '6', label: '行业场景覆盖' }, { value: '99.9%', label: '系统可用性' }, ], href: '/services/solutions', icon: , }, ]; // ===== 首页结构性文案类型(page-copy CMS 覆盖,未配置时走硬编码兜底)===== type HomePageCopy = Record; // 多行标题渲染:按 \n 分段,输出
换行 function StyledTitle({ lines }: { lines: (string | undefined)[] }) { return ( <> {lines.map((line, i) => ( {i > 0 &&
} {line}
))} ); } // ===== 品牌 CTA 按钮 ===== function CTAButton({ children, href, variant = 'primary', className, dataTestId }: { children: React.ReactNode; href: string; variant?: 'primary' | 'secondary'; className?: string; dataTestId?: string; }) { return ( {children} ); } // ===== Hero 区:克制白底 + 品牌红点缀 ===== function HeroSection({ heroData, stats }: { heroData?: Record | null; stats?: Record[]; }) { const containerRef = useRef(null); const siteConfig = useSiteConfig(); const heading = heroData?.heading || heroData?.headingBottom || '让每一家企业都拥有数据驱动的决策能力'; const subheading = heroData?.subheading || heroData?.description || ''; const ctaLabel = heroData?.ctaLabel || '预约咨询'; const ctaHref = heroData?.ctaHref || '/contact'; const secondaryCtaLabel = heroData?.secondaryCtaLabel || '查看产品矩阵'; const secondaryCtaHref = heroData?.secondaryCtaHref || '/products'; const slogan = siteConfig.slogan || COMPANY_INFO.slogan; const hasValidStats = stats?.length && stats[0]?.value; const displayStats = hasValidStats ? stats!.slice(0, 3) : []; return (
{/* 背景纹理:极淡的品牌色点阵 */}
{/* 品牌标识:Logo 本身已包含印章 + 公司名 + NOVALON */} {`${COMPANY_INFO.name} {/* 品牌口号 Badge:消费站点配置 slogan,后台可改 */} {slogan && ( {slogan} )} {/* 主标题:大胆、直接 */} {heading} {/* 数据指标条:答案优先,数据先行 */} {displayStats.length > 0 && ( {displayStats.map((stat, i) => (
{stat.value} {stat.label}
))}
)} {/* 副标题 */} {subheading && ( {subheading} )} {/* CTA 按钮组 */} {ctaLabel} {secondaryCtaLabel && ( {secondaryCtaLabel} )}
{/* 右侧:产品视觉(SVG 数据看板示意) */}
); } // ===== 信任/成果区:可验证信任信号 + 首批客户共创标签 ===== // 共创计划默认状态条目(如实呈现,无真实案例时不虚构客户) const DEFAULT_EARLY_ACCESS_STATUS = [ { label: '共创进行中', desc: '我们正与首批客户共同打磨产品与方案,以真实运营数据验证业务改善。' }, { label: '产品内测中', desc: '自研产品(如睿视 NovaVis)处于内测阶段,成熟后正式发布。' }, { label: '成果授权公开', desc: '案例与可量化成果在获得客户授权后公示——经得起衡量。' }, ]; function TrustSection({ pageCopy }: { pageCopy?: HomePageCopy | null }) { const eyebrow = pageCopy?.trustEyebrow || '值得信赖'; const titleLines = (pageCopy?.trustTitle || '以可衡量的成果\n赢得长期信任').split('\n'); const signals = (pageCopy?.trustSignals?.length ? pageCopy.trustSignals : TRUST_SIGNALS) as typeof TRUST_SIGNALS; const earlyLabel = pageCopy?.earlyAccessLabel || EARLY_ACCESS.label; const earlyDesc = pageCopy?.earlyAccessDesc || EARLY_ACCESS.desc; const earlyTitle = (pageCopy?.earlyAccessTitle as string) || '首批客户共创计划'; const earlyCtaLabel = (pageCopy?.earlyAccessCtaLabel as string) || '成为共创客户'; const earlyStatus = (pageCopy?.earlyAccessStatus?.length ? pageCopy.earlyAccessStatus : DEFAULT_EARLY_ACCESS_STATUS) as typeof DEFAULT_EARLY_ACCESS_STATUS; return (
{eyebrow}

{signals.map((item, i) => (
{item.value} {item.label}

{item.desc}

数据来源:{item.source}
))}
{/* 首批客户共创计划:如实呈现共创/内测/授权公开状态,不虚构客户 */}
{earlyLabel}

{earlyTitle}

{earlyDesc}

{earlyStatus.map((s) => (
{s.label}
{s.desc}
))}
{earlyCtaLabel}
); } // ===== 章节式叙事区:问题 → 方法 → 结果(Storytelling-Driven)===== const NARRATIVE_ACTS = [ { number: '01', title: '诊断现状', desc: '从业务目标出发,梳理流程断点、数据孤岛与瓶颈环节,形成可量化的诊断结论。', href: '/services/consulting', cta: '了解诊断方法', }, { number: '02', title: '设计路径', desc: '基于诊断结论设计系统架构与实施路线图,明确每一阶段的交付物与衡量指标。', href: '/services/solutions', cta: '查看方案设计', }, { number: '03', title: '交付成果', desc: '以自研产品组合与专业实施团队完成交付,用真实运营数据验证业务改善,持续迭代。', href: '/products', cta: '浏览产品矩阵', }, ]; function NarrativeSection({ pageCopy }: { pageCopy?: HomePageCopy | null }) { const narrativeTitle = (pageCopy?.narrativeTitle || '从问题到结果,\n一条可量化的路径').split('\n'); const NARRATIVE_ACTS_CMS = (pageCopy?.narrativeActs?.length ? pageCopy.narrativeActs : NARRATIVE_ACTS) as Array<{ number: string; title: string; desc: string; href: string; cta: string; }>; return (

{NARRATIVE_ACTS_CMS.map((act) => (
{act.number}

{act.title}

{act.desc}

))}
); } // ===== 服务区:等宽三列卡片 + 兜底数据 ===== function ServicesSection({ services, pageCopy }: { services?: Record[]; pageCopy?: HomePageCopy | null }) { const hasValidData = services?.length && (services![0] as any)?.subtitle; const SERVICE_ITEMS = hasValidData ? services!.map((s: Record) => ({ ...s, icon: SERVICE_ICON_MAP[s.icon as string] || , })) as Record[] : FALLBACK_SERVICES; const servicesTitle = (pageCopy?.servicesTitle || '从战略到落地,\n可量化的一站式服务').split('\n'); return (
); } // ===== 案例区:轻量快照卡片 ===== function CasesSection({ cases, pageCopy }: { cases?: Record[]; pageCopy?: HomePageCopy | null }) { const hasValidData = cases?.length && cases[0]?.metrics; const CASE_ITEMS = hasValidData ? cases! : []; const casesEyebrow = pageCopy?.casesEyebrow || '共创进行时'; const casesTitleLines = (pageCopy?.casesTitle || '每一个项目,\n都以业务改善为衡量标准').split('\n'); const casesDesc = pageCopy?.casesDescription || '我们正与首批客户共同打磨产品与方案,以真实运营数据验证业务改善。'; const earlyLabel = pageCopy?.earlyAccessLabel || EARLY_ACCESS.label; const earlyDesc = pageCopy?.earlyAccessDesc || EARLY_ACCESS.desc; if (CASE_ITEMS.length === 0) { return (
{casesEyebrow}

{casesDesc}

成为首批共创客户
{earlyLabel}

{earlyDesc}

); } return (
); } // ===== CTA 区:克制强调,品牌红仅用于按钮 ===== function CTASection({ heroData, pageCopy }: { heroData?: Record | null; pageCopy?: HomePageCopy | null }) { const ctaTitleLine1 = heroData?.ctaTitleLine1 || pageCopy?.ctaTitleLine1 || '准备好开始了吗?'; const ctaTitleLine2 = heroData?.ctaTitleLine2 || pageCopy?.ctaTitleLine2 || '让数据真正转化为业务增长'; const ctaLabel = heroData?.ctaLabel || pageCopy?.ctaLabel || '预约咨询'; const ctaHref = heroData?.ctaHref || '/contact'; return (

{ctaTitleLine1}
{ctaTitleLine2}

{ctaLabel}
); } // ===== 主页面组件 ===== export default function HomeContentV14({ services, cases, stats, heroData, pageCopy }: { services?: Record[]; cases?: Record[]; stats?: Record[]; heroData?: Record | null; pageCopy?: HomePageCopy | null; }) { return (
{/* 1. Hero:克制白底 + 品牌红点缀 */} {/* 2. 信任区:量化数据成果展示 */} {/* 3. 章节式叙事:问题 → 方法 → 结果 */} {/* 4. 服务区:等宽卡片 + 兜底数据 */} {/* 5. 案例区:轻量快照卡片 */} {/* 6. CTA:克制强调,品牌红仅用于按钮 */}
); }