'use client'; import { motion } from 'framer-motion'; import { ArrowUpRight, CheckCircle2 } from 'lucide-react'; import { StaticLink } from '@/components/ui/static-link'; import { CTAButton } from '@/components/ui/cta-button'; import type { Service } from '@/lib/constants/services'; const EASE_OUT = [0.22, 1, 0.36, 1] as const; /** Fallback metrics keyed by service ID — used when CMS data does not provide metrics */ const SERVICE_UI_META: Record = { consulting: { metrics: [{ value: '10+', label: '人核心团队' }, { value: '6', label: '行业场景' }] }, software: { metrics: [{ value: '6', label: '款自研产品' }, { value: 'A+', label: '代码质量' }] }, data: { metrics: [{ value: '99.9%', label: '系统可用性' }, { value: '24/7', label: '运维支持' }] }, solutions: { metrics: [{ value: '6', label: '行业场景' }, { value: '100%', label: '结果导向交付' }] }, }; function mapServicesToCards(services: Service[]) { return services.map((svc) => { const uiMeta = SERVICE_UI_META[svc.id]; return { id: svc.id, title: svc.title, description: svc.description, capabilities: svc.capabilities?.slice(0, 4) ?? [], metrics: svc.metrics ?? uiMeta?.metrics ?? [], }; }); } const SERVICE_PROCESS = [ { phase: '需求分析', duration: '2-3 周', deliverables: ['业务痛点清单', '现状评估报告', '项目范围说明书'], }, { phase: '方案设计', duration: '4-6 周', deliverables: ['系统架构设计', '实施路线图', '投资测算模型'], }, { phase: '敏捷交付', duration: '3-6 个月', deliverables: ['分阶段上线版本', '用户培训材料', '数据迁移方案'], }, { phase: '持续支持', duration: '长期', deliverables: ['运维监控体系', '迭代优化计划', '知识转移文档'], }, ]; const SERVICE_MODES = [ { title: '项目制', description: '针对明确的需求和交付目标,以项目为单位进行合作。适合有清晰边界的一次性建设类项目。', highlight: '固定范围 · 固定周期', }, { title: '订阅制', description: '按月或按年持续提供技术支持和迭代优化。适合需要长期维护、持续演进的产品和系统。', highlight: '持续迭代 · 弹性调整', }, { title: '长期陪跑', description: '以合作伙伴身份深度参与您的数字化进程,从规划到执行全程陪伴。适合正在系统性转型的企业。', highlight: '深度参与 · 共同成长', }, ]; type PageCopy = Record; function HeroSection({ pageCopy }: { pageCopy?: PageCopy | null }) { const heroTitle1 = (pageCopy?.servicesHeroTitle1 as string) || '从规划到运维'; const heroTitle2 = (pageCopy?.servicesHeroTitle2 as string) || '全程陪伴'; const heroDescriptionLines = ((pageCopy?.servicesHeroDescription as string) || '不只是技术供应商,更是您数字化转型的同行者。\n从第一次沟通到系统稳定运行,我们始终在您身边。').split('\n'); const ctaPrimary = (pageCopy?.servicesCtaPrimary as string) || '聊聊您的需求'; const ctaSecondary = (pageCopy?.servicesCtaSecondary as string) || '查看产品矩阵'; return (
{heroTitle1}
{heroTitle2}
{heroDescriptionLines.map((line, i) => ( {i > 0 &&
} {line}
))}
{ctaPrimary} {ctaSecondary}
4大
服务领域
3种
合作模式
全流程
服务保障
); } function ServicesGridSection({ services, pageCopy }: { services?: Service[]; pageCopy?: PageCopy | null }) { const displayServices = services?.length ? mapServicesToCards(services) : []; const gridTitle = (pageCopy?.servicesGridTitle as string) || '四大核心服务,覆盖数字化全链路'; const emptyState = (pageCopy?.servicesEmptyState as string) || '暂无服务数据'; if (displayServices.length === 0) { return (

{emptyState}

); } return (

{gridTitle}

{displayServices.map((service, i) => (

{service.title}

{service.description}

    {service.capabilities.map((cap) => (
  • {cap}
  • ))}
{service.metrics.map((m) => (
{m.value}
{m.label}
))}
了解详情
))}
); } function ProcessModesSection() { return (
{/* Process */}

我们的做事方式

{SERVICE_PROCESS.map((step) => (

{step.phase}

{step.duration}
阶段产出
    {step.deliverables.map((d) => (
  • {d}
  • ))}
))}
{/* Modes */}

合作方式

{SERVICE_MODES.map((mode) => (

{mode.title}

{mode.description}

{mode.highlight}
))}
); } function CTASection({ pageCopy }: { pageCopy?: PageCopy | null }) { const ctaTitle = (pageCopy?.servicesCtaTitle as string) || '准备好开始了吗?'; const ctaDescriptionLines = ((pageCopy?.servicesCtaDescription as string) || '无论是一个明确的项目,还是一个模糊的想法,我们都愿意坐下来和您一起理清楚。\n首次咨询免费,没有任何销售压力。').split('\n'); return (

{ctaTitle}

{ctaDescriptionLines.map((line, i) => ( {i > 0 &&
} {line}
))}

预约免费咨询 了解我们的团队
); } export default function ServicesContentV3({ services, pageCopy }: { services?: Service[]; pageCopy?: PageCopy | null }) { return (
); }