diff --git a/src/components/sections/cases-section.tsx b/src/components/sections/cases-section.tsx index 1ab12df..e34358b 100644 --- a/src/components/sections/cases-section.tsx +++ b/src/components/sections/cases-section.tsx @@ -1,149 +1,97 @@ 'use client'; -import { useEffect, useRef, useState } from 'react'; +import { motion } from 'framer-motion'; +import { useInView } from 'framer-motion'; +import { useRef } from 'react'; import Link from 'next/link'; -import { GlassCard } from '@/components/ui/glass-card'; +import { Card, CardContent } from '@/components/ui/card'; +import { Button } from '@/components/ui/button'; +import { Badge } from '@/components/ui/badge'; import { CASES } from '@/lib/constants'; import { ArrowRight, Building2, TrendingUp } from 'lucide-react'; export function CasesSection() { - const [isVisible, setIsVisible] = useState(false); - const sectionRef = useRef(null); + const ref = useRef(null); + const isInView = useInView(ref, { once: true, margin: '-100px' }); - useEffect(() => { - const observer = new IntersectionObserver( - ([entry]) => { - if (entry?.isIntersecting) { - setIsVisible(true); - } - }, - { threshold: 0.1 } - ); - - if (sectionRef.current) { - observer.observe(sectionRef.current); - } - - return () => observer.disconnect(); - }, []); + const featuredCases = CASES.slice(0, 3); return ( -
-
-
-
-
- +
+
+
+
-
-
- - - 成功案例 - -
- -

- 客户成功案例 + +

+ 与谁同行,决定能走多远

- -

- 以专业实力赢得客户信赖,用技术创新创造商业价值 +

+ 我们与优秀的企业同行,共同成长,共创未来

-

+ -
- {CASES.map((caseItem, index) => ( - - -
-
-
- -
-
- +
+ {featuredCases.map((caseItem, index) => ( + + + +
+ +
+ {caseItem.industry} - +
- -
-

+ +
+ + {caseItem.client} +
+

{caseItem.title}

- -

+

{caseItem.description}

- -
- {caseItem.results.map((result) => ( -
-
- {result.value} -
-
- {result.label} -
-
- ))} -
- -
- {caseItem.tags.map((tag) => ( - - {tag} - - ))} -
- -
- 查看详情 - -
-

-
- - + {caseItem.results.length > 0 && ( +
+ + {caseItem.results[0].value} + {caseItem.results[0].label} +
+ )} + + + + ))}
+ + + +
);