refactor: 优化网站页面结构和数据展示

- 增强服务数据模型,添加 challenges 和 outcomes 字段
- 简化统计数据配置,改为静态定义
- 重构多个页面组件,优化代码结构
- 新增产品、服务、解决方案相关的布局和组件
- 更新样式和动画配置
- 优化测试用例和类型定义
- 修复 ESLint 错误:移除不必要的 useEffect 和未使用的导入
This commit is contained in:
张翔
2026-04-25 08:44:23 +08:00
parent 9650e56dcf
commit 40384ec024
77 changed files with 3751 additions and 1226 deletions
+65 -215
View File
@@ -3,11 +3,29 @@
import { motion } from 'framer-motion';
import { useInView } from 'framer-motion';
import { useRef } from 'react';
import dynamic from 'next/dynamic';
import { StaticLink } from '@/components/ui/static-link';
import { Button } from '@/components/ui/button';
import { PageHeader } from '@/components/ui/page-header';
import { ArrowRight, Lightbulb, Cpu, Users, CheckCircle2 } from 'lucide-react';
import { ArrowRight } from 'lucide-react';
import { MethodologySection } from '@/components/sections/methodology-section';
import { SOLUTIONS } from '@/lib/constants/solutions';
import { FadeUp } from '@/lib/animations';
const ConsultingSection = dynamic(
() => import('@/components/solutions/consulting-section').then(mod => ({ default: mod.ConsultingSection })),
{ ssr: false }
);
const TechSolutionSection = dynamic(
() => import('@/components/solutions/tech-solution-section').then(mod => ({ default: mod.TechSolutionSection })),
{ ssr: false }
);
const AccompanySection = dynamic(
() => import('@/components/solutions/accompany-section').then(mod => ({ default: mod.AccompanySection })),
{ ssr: false }
);
export default function SolutionsPage() {
const contentRef = useRef(null);
@@ -22,221 +40,53 @@ export default function SolutionsPage() {
<div className="container-wide relative z-10 py-16" ref={contentRef}>
<div className="max-w-6xl mx-auto space-y-24">
<motion.section
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6 }}
className="bg-gradient-to-br from-[#FFFBF5] to-white rounded-2xl p-12 border border-[#C41E3A]/20"
>
<div className="flex items-start gap-6 mb-8">
<div className="w-16 h-16 bg-[#C41E3A] rounded-2xl flex items-center justify-center flex-shrink-0">
<Lightbulb className="w-8 h-8 text-white" />
</div>
<div>
<h2 className="text-3xl font-bold text-[#1C1C1C] mb-2">
·
</h2>
<p className="text-lg text-[#5C5C5C]">
</p>
</div>
</div>
<div className="space-y-6 mb-8">
<p className="text-lg text-[#1C1C1C] leading-relaxed">
</p>
<p className="text-lg text-[#1C1C1C] leading-relaxed">
</p>
<p className="text-lg text-[#1C1C1C] leading-relaxed">
</p>
</div>
<div className="mb-8">
<h3 className="text-xl font-semibold text-[#1C1C1C] mb-4 flex items-center gap-2">
<CheckCircle2 className="w-6 h-6 text-[#C41E3A]" />
</h3>
<div className="grid md:grid-cols-3 gap-4">
<div className="flex items-start gap-3 p-4 bg-white rounded-lg border border-[#E5E5E5]">
<div className="w-2 h-2 bg-[#C41E3A] rounded-full mt-2" />
<span className="text-[#1C1C1C]"></span>
</div>
<div className="flex items-start gap-3 p-4 bg-white rounded-lg border border-[#E5E5E5]">
<div className="w-2 h-2 bg-[#C41E3A] rounded-full mt-2" />
<span className="text-[#1C1C1C]"></span>
</div>
<div className="flex items-start gap-3 p-4 bg-white rounded-lg border border-[#E5E5E5]">
<div className="w-2 h-2 bg-[#C41E3A] rounded-full mt-2" />
<span className="text-[#1C1C1C]"></span>
</div>
</div>
</div>
<div className="flex justify-center">
<Button
size="lg"
className="bg-[#C41E3A] hover:bg-[#A01830] text-white"
onClick={() => {
const element = document.getElementById('contact');
if (element) {
element.scrollIntoView({ behavior: 'smooth' });
}
}}
>
<ArrowRight className="ml-2 w-4 h-4" />
</Button>
</div>
</motion.section>
<motion.section
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6, delay: 0.2 }}
className="bg-gradient-to-br from-[#FFFBF5] to-white rounded-2xl p-12 border border-[#C41E3A]/20"
>
<div className="flex items-start gap-6 mb-8">
<div className="w-16 h-16 bg-[#C41E3A] rounded-2xl flex items-center justify-center flex-shrink-0">
<Cpu className="w-8 h-8 text-white" />
</div>
<div>
<h2 className="text-3xl font-bold text-[#1C1C1C] mb-2">
·
</h2>
<p className="text-lg text-[#5C5C5C]">
</p>
</div>
</div>
<div className="space-y-6 mb-8">
<p className="text-lg text-[#1C1C1C] leading-relaxed">
&ldquo;&rdquo;&ldquo;&rdquo;
</p>
<p className="text-lg text-[#1C1C1C] leading-relaxed">
沿
</p>
<p className="text-lg text-[#1C1C1C] leading-relaxed">
</p>
</div>
<div className="mb-8">
<h3 className="text-xl font-semibold text-[#1C1C1C] mb-4 flex items-center gap-2">
<CheckCircle2 className="w-6 h-6 text-[#C41E3A]" />
</h3>
<div className="grid md:grid-cols-3 gap-4">
<div className="flex items-start gap-3 p-4 bg-white rounded-lg border border-[#E5E5E5]">
<div className="w-2 h-2 bg-[#C41E3A] rounded-full mt-2" />
<span className="text-[#1C1C1C]"></span>
</div>
<div className="flex items-start gap-3 p-4 bg-white rounded-lg border border-[#E5E5E5]">
<div className="w-2 h-2 bg-[#C41E3A] rounded-full mt-2" />
<span className="text-[#1C1C1C]"></span>
</div>
<div className="flex items-start gap-3 p-4 bg-white rounded-lg border border-[#E5E5E5]">
<div className="w-2 h-2 bg-[#C41E3A] rounded-full mt-2" />
<span className="text-[#1C1C1C]"></span>
</div>
</div>
</div>
<div className="flex justify-center">
<Button
size="lg"
variant="outline"
className="border-[#C41E3A] text-[#C41E3A] hover:bg-[#C41E3A] hover:text-white"
onClick={() => {
const element = document.getElementById('cases');
if (element) {
element.scrollIntoView({ behavior: 'smooth' });
}
}}
>
<ArrowRight className="ml-2 w-4 h-4" />
</Button>
</div>
</motion.section>
<motion.section
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6, delay: 0.4 }}
className="bg-gradient-to-br from-[#FFFBF5] to-white rounded-2xl p-12 border border-[#C41E3A]/20"
>
<div className="flex items-start gap-6 mb-8">
<div className="w-16 h-16 bg-[#C41E3A] rounded-2xl flex items-center justify-center flex-shrink-0">
<Users className="w-8 h-8 text-white" />
</div>
<div>
<h2 className="text-3xl font-bold text-[#1C1C1C] mb-2">
·
</h2>
<p className="text-lg text-[#5C5C5C]">
</p>
</div>
</div>
<div className="space-y-6 mb-8">
<p className="text-lg text-[#1C1C1C] leading-relaxed">
线
</p>
<p className="text-lg text-[#1C1C1C] leading-relaxed">
访
</p>
<p className="text-lg text-[#1C1C1C] leading-relaxed">
</p>
</div>
<div className="mb-8">
<h3 className="text-xl font-semibold text-[#1C1C1C] mb-4 flex items-center gap-2">
<CheckCircle2 className="w-6 h-6 text-[#C41E3A]" />
</h3>
<div className="grid md:grid-cols-3 gap-4">
<div className="flex items-start gap-3 p-4 bg-white rounded-lg border border-[#E5E5E5]">
<div className="w-2 h-2 bg-[#C41E3A] rounded-full mt-2" />
<span className="text-[#1C1C1C]"></span>
</div>
<div className="flex items-start gap-3 p-4 bg-white rounded-lg border border-[#E5E5E5]">
<div className="w-2 h-2 bg-[#C41E3A] rounded-full mt-2" />
<span className="text-[#1C1C1C]"></span>
</div>
<div className="flex items-start gap-3 p-4 bg-white rounded-lg border border-[#E5E5E5]">
<div className="w-2 h-2 bg-[#C41E3A] rounded-full mt-2" />
<span className="text-[#1C1C1C]">7×24</span>
</div>
</div>
</div>
<div className="flex justify-center">
<Button
size="lg"
className="bg-[#C41E3A] hover:bg-[#A01830] text-white"
onClick={() => {
const element = document.getElementById('contact');
if (element) {
element.scrollIntoView({ behavior: 'smooth' });
}
}}
>
<ArrowRight className="ml-2 w-4 h-4" />
</Button>
</div>
</motion.section>
<ConsultingSection />
<TechSolutionSection />
<AccompanySection />
</div>
</div>
{/* 行业解决方案入口 */}
<section className="py-20 md:py-28 bg-[#F8F8F8]">
<div className="container-wide">
<div className="text-center mb-12">
<h2 className="text-3xl md:text-4xl font-bold text-[#1C1C1C] mb-3">
</h2>
<p className="text-[#5C5C5C] text-lg">
</p>
</div>
<div className="grid md:grid-cols-2 gap-6 max-w-5xl mx-auto">
{SOLUTIONS.map((solution, index) => (
<FadeUp key={solution.id} delay={index * 0.1}>
<StaticLink href={`/solutions/${solution.id}`}>
<div className="group p-6 md:p-8 bg-white rounded-2xl border border-[#E5E5E5] hover:border-[#C41E3A]/30 transition-all hover:shadow-lg">
<div className="flex items-center gap-2 mb-3">
<span className="inline-block px-3 py-1 bg-[#C41E3A]/10 text-[#C41E3A] text-xs font-semibold rounded-full">
{solution.industry}
</span>
</div>
<h3 className="text-xl font-bold text-[#1C1C1C] mb-2 group-hover:text-[#C41E3A] transition-colors">
{solution.title}
</h3>
<p className="text-[#5C5C5C] text-sm mb-4 line-clamp-2">
{solution.description}
</p>
<div className="flex items-center gap-1 text-[#C41E3A] text-sm font-semibold">
<ArrowRight className="w-4 h-4 group-hover:translate-x-1 transition-transform" />
</div>
</div>
</StaticLink>
</FadeUp>
))}
</div>
</div>
</section>
<MethodologySection />
<motion.div
@@ -253,15 +103,15 @@ export default function SolutionsPage() {
</p>
<div className="flex justify-center gap-4">
<Button
size="lg"
<Button
size="lg"
variant="outline"
asChild
>
<StaticLink href="/contact"></StaticLink>
</Button>
<Button
size="lg"
<Button
size="lg"
className="bg-[#C41E3A] hover:bg-[#A01830] text-white"
asChild
>