'use client'; import { motion } from 'framer-motion'; import { CTAButton } from '@/components/ui/cta-button'; import { Trophy, Shield, Award, Zap, type LucideIcon, } from 'lucide-react'; const EASE_OUT = [0.22, 1, 0.36, 1] as const; /** Icon name-to-component mapping for CMS string-based icons */ const ICON_MAP: Record = { Shield, Award, Zap, Trophy, }; const DEFAULT_CERT_ICON_NAMES = ['Shield', 'Award', 'Zap', 'Trophy'] as const; interface AboutData { heroSubtitle?: string; heroTitle?: string; heroDescription?: string; heroPrimaryCtaLabel?: string; heroPrimaryCtaHref?: string; heroSecondaryCtaLabel?: string; heroSecondaryCtaHref?: string; whoWeAreTitle?: string; whoWeAreDescription?: string; promiseText?: string; coreValues?: { number: string; title: string; description: string }[]; milestones?: { year: string; title: string; description: string; highlight: string }[]; keyMetrics?: { value: string; label: string; sub: string }[]; certifications?: { name: string; description: string }[]; partners?: string[]; ctaTitle?: string; ctaDescription?: string; ctaPrimaryLabel?: string; ctaPrimaryHref?: string; ctaSecondaryLabel?: string; ctaSecondaryHref?: string; } function HeroSection({ data }: { data: AboutData }) { const titleLines = (data.heroTitle || '').split('\n'); return (
{data.heroSubtitle || ''} {titleLines.map((line, i) => (
0 ? 'mt-4 sm:mt-6' : ''}`}> {i === 1 ? ( {line} ) : ( line )}
))}
{data.heroDescription || ''} {data.heroPrimaryCtaLabel || '预约咨询'} {data.heroSecondaryCtaLabel || '了解更多'}
); } function MetricsStrip({ data }: { data: AboutData }) { const metrics = data.keyMetrics ?? []; if (metrics.length === 0) return null; return (
{metrics.map((metric, i) => (
{metric.value}
{metric.label}
{metric.sub}
))}
); } function WhoWeAreSection({ data }: { data: AboutData }) { const values = data.coreValues ?? []; return (
01
Why We Started
为什么成立

{data.whoWeAreTitle || ''}

{data.whoWeAreDescription || ''}

{data.promiseText || ''}

02
How We Work
怎么做事
{values.map((value) => (
{/* 纯装饰序号:与右侧 value.title 并列,无独立语义,标记 aria-hidden 豁免对比度要求 */}

{value.title}

{value.description}

))}
); } function MilestonesSection({ data }: { data: AboutData }) { const milestones = data.milestones ?? []; return (
03
Where We Are Heading
走到哪里

一路走来,
步步扎实

{milestones.map((milestone, idx) => (
{milestone.year}

{milestone.title}

{milestone.description}

{milestone.highlight}
))}
); } function CertificationsSection({ data }: { data: AboutData }) { const certifications = data.certifications ?? []; const partners = data.partners ?? []; // 初创阶段无资质/伙伴数据时,如实呈现「建设中」状态而非隐藏整块(零编造) if (certifications.length === 0 && partners.length === 0) { return (
Certifications

资质与认证

资质建设中

公司资质与认证信息建设中,将随业务开展与取得进度陆续公示。

); } return (
{certifications.length > 0 && (
Certifications

资质与认证

{certifications.map((cert, i) => { const iconName = DEFAULT_CERT_ICON_NAMES[i % DEFAULT_CERT_ICON_NAMES.length] ?? 'Shield'; const Icon = ICON_MAP[iconName] ?? Shield; return (
{cert.name}
{cert.description}
); })}
)} {partners.length > 0 && (
Partners

生态合作伙伴

{partners.map((partner) => (
{partner}
))}

与主流软件厂商和云服务提供商建立合作,持续为客户提供可靠的技术方案与服务保障。

)}
); } function CTASection({ data }: { data: AboutData }) { return (

{data.ctaTitle || ''}

{data.ctaDescription || ''}

{data.ctaPrimaryLabel || '预约咨询'} {data.ctaSecondaryLabel || '了解更多'}
); } export default function AboutContentV4({ data }: { data: Record }) { const aboutData = data as AboutData; // Empty state when no CMS data is available if (!data || Object.keys(data).length === 0) { return (
内容暂未发布
); } return (
); }