fix: 3D Show

This commit is contained in:
xiaoma
2026-02-02 19:10:34 +08:00
commit b8024da3dc
61 changed files with 4123 additions and 0 deletions

View File

@@ -0,0 +1,172 @@
import React, { useEffect, useState } from 'react';
import { Row, Col, Typography, Button, Spin } from 'antd';
import { motion } from 'framer-motion';
import { RightOutlined } from '@ant-design/icons';
import { getServices } from '../api';
import { useNavigate } from 'react-router-dom';
const { Title, Paragraph } = Typography;
const AIServices = () => {
const [services, setServices] = useState([]);
const [loading, setLoading] = useState(true);
const navigate = useNavigate();
useEffect(() => {
const fetchServices = async () => {
try {
const response = await getServices();
setServices(response.data);
} catch (error) {
console.error("Failed to fetch services:", error);
} finally {
setLoading(false);
}
};
fetchServices();
}, []);
if (loading) {
return (
<div style={{ textAlign: 'center', padding: '100px 0' }}>
<Spin size="large" tip="Loading services..." />
</div>
);
}
return (
<div style={{ padding: '20px 0' }}>
<div style={{ textAlign: 'center', marginBottom: 60 }}>
<motion.div
initial={{ scale: 0.8, opacity: 0 }}
animate={{ scale: 1, opacity: 1 }}
transition={{ duration: 0.8 }}
>
<Title level={1} style={{ color: '#fff', fontSize: 'clamp(2rem, 4vw, 3rem)' }}>
AI 全栈<span style={{ color: '#00f0ff', textShadow: '0 0 10px rgba(0,240,255,0.5)' }}>解决方案</span>
</Title>
</motion.div>
<Paragraph style={{ color: '#888', maxWidth: 700, margin: '0 auto', fontSize: 16 }}>
从数据处理到模型部署我们为您提供一站式 AI 基础设施服务
</Paragraph>
</div>
<Row gutter={[32, 32]} justify="center">
{services.map((item, index) => (
<Col xs={24} md={8} key={item.id}>
<motion.div
initial={{ opacity: 0, x: -50 }}
animate={{ opacity: 1, x: 0 }}
transition={{ delay: index * 0.2, duration: 0.5 }}
whileHover={{ scale: 1.03 }}
onClick={() => navigate(`/services/${item.id}`)}
style={{ cursor: 'pointer' }}
>
<div
className="glass-panel"
style={{
padding: 30,
height: '100%',
position: 'relative',
overflow: 'hidden',
border: `1px solid ${item.color}33`,
boxShadow: `0 0 20px ${item.color}11`
}}
>
{/* HUD 装饰线 */}
<div style={{ position: 'absolute', top: 0, left: 0, width: 20, height: 2, background: item.color }} />
<div style={{ position: 'absolute', top: 0, left: 0, width: 2, height: 20, background: item.color }} />
<div style={{ position: 'absolute', bottom: 0, right: 0, width: 20, height: 2, background: item.color }} />
<div style={{ position: 'absolute', bottom: 0, right: 0, width: 2, height: 20, background: item.color }} />
<div style={{ marginBottom: 20, display: 'flex', alignItems: 'center' }}>
<div style={{
width: 60, height: 60,
borderRadius: '50%',
background: `${item.color}22`,
display: 'flex', alignItems: 'center', justifyContent: 'center',
marginRight: 15,
overflow: 'hidden'
}}>
{item.display_icon ? (
<img src={item.display_icon} alt={item.title} style={{ width: '60%', height: '60%', objectFit: 'contain' }} />
) : (
<div style={{ width: 30, height: 30, background: item.color, borderRadius: '50%' }} />
)}
</div>
<h3 style={{ margin: 0, fontSize: 22, color: '#fff' }}>{item.title}</h3>
</div>
<p style={{ color: '#ccc', lineHeight: 1.6, minHeight: 60 }}>{item.description}</p>
<div style={{ marginTop: 20 }}>
{item.features_list && item.features_list.map((feat, i) => (
<div key={i} style={{
display: 'flex', alignItems: 'center', marginBottom: 8, color: item.color
}}>
<div style={{ width: 6, height: 6, background: item.color, marginRight: 10, borderRadius: '50%' }} />
{feat}
</div>
))}
</div>
<Button
type="link"
style={{ padding: 0, marginTop: 20, color: '#fff' }}
icon={<RightOutlined />}
onClick={(e) => {
e.stopPropagation();
navigate(`/services/${item.id}`);
}}
>
了解更多
</Button>
</div>
</motion.div>
</Col>
))}
</Row>
{/* 动态流程图模拟 */}
<motion.div
initial={{ opacity: 0, y: 50 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.8 }}
style={{ marginTop: 80, padding: 40, background: 'rgba(0,0,0,0.3)', borderRadius: 20, border: '1px dashed #333', textAlign: 'center' }}
>
<Title level={3} style={{ color: '#fff', marginBottom: 40 }}>服务流程</Title>
<Row justify="space-around" align="middle" gutter={[20, 20]}>
{['需求分析', '数据准备', '模型训练', '测试验证', '私有化部署'].map((step, i) => (
<Col key={i} xs={12} md={4}>
<div style={{
width: '100%', aspectRatio: '1',
border: '2px solid #333', borderRadius: '50%',
display: 'flex', alignItems: 'center', justifyContent: 'center',
color: '#888', fontSize: 16, fontWeight: 'bold',
position: 'relative'
}}>
{step}
{/* 简单的连接线模拟 */}
{i < 4 && (
<div className="process-arrow" style={{
position: 'absolute', right: -20, top: '50%',
width: 20, height: 2, background: '#333',
display: 'none' // 移动端隐藏
}} />
)}
</div>
</Col>
))}
</Row>
<style>{`
@media (min-width: 768px) {
.process-arrow { display: block !important; }
}
`}</style>
</motion.div>
</div>
);
};
export default AIServices;