diff --git a/src/components/services/service-detail-modal.tsx b/src/components/services/service-detail-modal.tsx new file mode 100644 index 0000000..be16df7 --- /dev/null +++ b/src/components/services/service-detail-modal.tsx @@ -0,0 +1,173 @@ +'use client'; + +import { motion, AnimatePresence } from 'framer-motion'; +import { Dialog, DialogContent, DialogTitle } from '@/components/ui/dialog'; +import { Button } from '@/components/ui/button'; +import { SERVICES } from '@/lib/constants'; +import { X, CheckCircle2, ArrowRight, Sparkles, Target, Zap, Shield, Code, Cloud, BarChart3 } from 'lucide-react'; +import { useState } from 'react'; + +interface ServiceDetailModalProps { + serviceId: string; + open: boolean; + onOpenChange: (open: boolean) => void; +} + +const iconMap = { + Code, + Cloud, + BarChart3, + Shield, +}; + +export function ServiceDetailModal({ serviceId, open, onOpenChange }: ServiceDetailModalProps) { + const [activeTab, setActiveTab] = useState<'features' | 'benefits' | 'process'>('features'); + const service = SERVICES.find((s) => s.id === serviceId); + const IconComponent = service ? iconMap[service.icon as keyof typeof iconMap] : Code; + + if (!service) return null; + + return ( + + +
+ + +
+
+
+ +
+
+ {service.title} +

{service.description}

+
+
+
+ +
+
+

+ + 服务概述 +

+

{service.overview}

+
+ +
+
+ {[ + { id: 'features', label: '核心功能', icon: Zap }, + { id: 'benefits', label: '服务优势', icon: Target }, + { id: 'process', label: '服务流程', icon: CheckCircle2 }, + ].map((tab) => ( + + ))} +
+ + + + {activeTab === 'features' && ( +
+ {service.features.map((feature, index) => ( + +
+ +
+ {feature} +
+ ))} +
+ )} + + {activeTab === 'benefits' && ( +
+ {service.benefits.map((benefit, index) => ( + +
+ +
+ {benefit} +
+ ))} +
+ )} + + {activeTab === 'process' && ( +
+ {service.process.map((step, index) => ( + +
+ {index + 1} +
+
+

{step}

+ {index < service.process.length - 1 && ( +
+ )} +
+ + ))} +
+ )} +
+ +
+ +
+ + +
+
+
+ +
+ ); +}