'use client'; import { useEffect, useState } from 'react'; import { motion } from 'framer-motion'; import Link from 'next/link'; import { RippleButton, SealButton } from '@/components/ui/ripple-button'; import { MagneticButton, BlurReveal, CounterWithEffect } from '@/lib/animations'; import { COMPANY_INFO, STATS } from '@/lib/constants'; import { ArrowRight, Shield, Zap, Award } from 'lucide-react'; interface HeroContentProps { isVisible: boolean; } const features = [ { icon: Shield, text: '安全可靠' }, { icon: Zap, text: '高效便捷' }, { icon: Award, text: '专业服务' }, ]; function scrollTo(id: string) { const element = document.getElementById(id); if (element) { element.scrollIntoView({ behavior: 'smooth' }); } } function handleKeyDown(event: React.KeyboardEvent, id: string) { if (event.key === 'Enter' || event.key === ' ') { event.preventDefault(); scrollTo(id); } } export function HeroContent({ isVisible }: HeroContentProps) { return ( 智连未来,成长伙伴 ); } export function HeroTitle({ isVisible }: HeroContentProps) { return ( {COMPANY_INFO.shortName} ); } export function HeroDescription(_props: HeroContentProps) { return (

企业数字化转型服务商

以智慧连接数字趋势,以伙伴身份陪您成长——您的数字化转型同行者

); } export function HeroButtons({ isVisible }: HeroContentProps) { return ( 立即咨询 scrollTo('about')} onKeyDown={(e) => handleKeyDown(e, 'about')} className="min-w-45" > 了解更多 ); } export function HeroFeatures({ isVisible }: HeroContentProps) { return ( {features.map((feature, index) => ( {feature.text} ))} ); } export function HeroStats() { const [statsVisible, setStatsVisible] = useState(false); useEffect(() => { const statsEl = document.getElementById('stats-section'); if (!statsEl) return; const observer = new IntersectionObserver( ([entry]) => { if (entry?.isIntersecting) { setStatsVisible(true); } }, { threshold: 0.5 } ); observer.observe(statsEl); return () => observer.disconnect(); }, []); return (
{STATS.map((stat, index) => ( ))}
); } function HeroStatItem({ stat, index, shouldAnimate }: { stat: { value: string; label: string }; index: number; shouldAnimate: boolean; }) { const numericValue = parseInt(stat.value.replace(/\D/g, '')); const suffix = stat.value.replace(/[\d]/g, ''); return (
{shouldAnimate ? ( ) : ( 0{suffix} )}
{stat.label}
); }