'use client'; import { useEffect, useRef, useState } from 'react'; import { motion } from 'framer-motion'; import { RippleButton, SealButton } from '@/components/ui/ripple-button'; import { GradientText, MagneticButton, BlurReveal, CounterWithEffect } from '@/lib/animations'; import { InkBackground } from '@/components/ui/ink-decoration'; import { DataParticleFlow } from '@/components/effects/data-particle-flow'; import { SubtleDots } from '@/components/effects/subtle-dots'; import { COMPANY_INFO, STATS } from '@/lib/constants'; import { ArrowRight, Shield, Zap, Award } from 'lucide-react'; const features = [ { icon: Shield, text: '安全可靠' }, { icon: Zap, text: '高效便捷' }, { icon: Award, text: '专业服务' }, ]; export function HeroSection() { const [isVisible, setIsVisible] = useState(false); const sectionRef = useRef(null); const [statsVisible, setStatsVisible] = useState(false); useEffect(() => { const observer = new IntersectionObserver( ([entry]) => { if (entry?.isIntersecting) { setIsVisible(true); } }, { threshold: 0.1 } ); if (sectionRef.current) { observer.observe(sectionRef.current); } return () => observer.disconnect(); }, []); 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(); }, []); const handleScrollTo = (id: string) => { const element = document.getElementById(id); if (element) { element.scrollIntoView({ behavior: 'smooth' }); } }; const handleKeyDown = (event: React.KeyboardEvent, id: string) => { if (event.key === 'Enter' || event.key === ' ') { event.preventDefault(); handleScrollTo(id); } }; return (
智连未来,成长伙伴 {COMPANY_INFO.shortName}

企业数字化转型服务商

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

handleScrollTo('contact')} onKeyDown={(e) => handleKeyDown(e, 'contact')} className="min-w-45" > 立即咨询 handleScrollTo('about')} onKeyDown={(e) => handleKeyDown(e, 'about')} className="min-w-45" > 了解更多 {features.map((feature, index) => ( {feature.text} ))}
{STATS.map((stat, index) => ( ))}
); } function StatItem({ 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}
); }