feat: 添加面包屑导航组件并优化页面布局
refactor: 重构页面结构和导航逻辑 fix: 修复移动端菜单导航和滚动行为 perf: 优化图片加载性能和资源请求 test: 添加端到端测试和性能测试用例 docs: 更新.gitignore文件 chore: 更新依赖和配置 style: 优化代码格式和类型安全 ci: 调整Playwright测试超时时间 build: 更新Next.js配置和构建选项
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import Link from 'next/link';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Breadcrumb } from '@/components/layout/breadcrumb';
|
||||
import { ArrowLeft, CheckCircle2, TrendingUp, Users, Target, Quote, Clock, MessageCircle, Award } from 'lucide-react';
|
||||
import { CASES } from '@/lib/constants';
|
||||
import type { StaticImageData } from 'next/image';
|
||||
@@ -66,12 +68,14 @@ export function CaseDetailClient({ caseItem }: CaseDetailClientProps) {
|
||||
|
||||
return (
|
||||
<main className="min-h-screen bg-white">
|
||||
<Breadcrumb items={[{ label: '成功案例', href: '/cases' }, { label: caseItem.title, href: `/cases/${caseItem.id}` }]} />
|
||||
<div className="relative overflow-hidden bg-gradient-to-b from-[#FAFAFA] to-white">
|
||||
<div className="container-wide relative z-10 pt-32 pb-20">
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="text-[#5C5C5C] hover:text-[#C41E3A] hover:bg-[#C41E3A]/10"
|
||||
onClick={() => router.back()}
|
||||
type="button"
|
||||
>
|
||||
<ArrowLeft className="w-4 h-4 mr-2" />
|
||||
返回
|
||||
@@ -273,11 +277,14 @@ export function CaseDetailClient({ caseItem }: CaseDetailClientProps) {
|
||||
<p className="text-sm text-white/80 mb-4">
|
||||
联系我们的专家团队,获取定制化解决方案
|
||||
</p>
|
||||
<Link href="/#contact">
|
||||
<Button className="w-full bg-white text-[#C41E3A] hover:bg-white/90">
|
||||
<Button
|
||||
className="w-full bg-white text-[#C41E3A] hover:bg-white/90"
|
||||
asChild
|
||||
>
|
||||
<Link href="/#contact">
|
||||
联系我们
|
||||
</Button>
|
||||
</Link>
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -33,5 +33,5 @@ export default async function CaseDetailPage({ params }: { params: Promise<{ id:
|
||||
notFound();
|
||||
}
|
||||
|
||||
return <CaseDetailClient caseItem={caseItem} />;
|
||||
return <CaseDetailClient caseItem={caseItem as any} />;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,8 @@ import { useRef } from 'react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { PageHeader } from '@/components/ui/page-header';
|
||||
import { ArrowRight, Building2, Calendar, TrendingUp } from 'lucide-react';
|
||||
import { Breadcrumb } from '@/components/layout/breadcrumb';
|
||||
import { ArrowLeft, ArrowRight, Building2, Calendar, TrendingUp } from 'lucide-react';
|
||||
import { CASES } from '@/lib/constants';
|
||||
|
||||
export default function CasesPage() {
|
||||
@@ -16,6 +17,7 @@ export default function CasesPage() {
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-white">
|
||||
<Breadcrumb items={[{ label: '成功案例', href: '/cases' }]} />
|
||||
<PageHeader
|
||||
title="与谁同行,决定能走多远"
|
||||
description="我们与优秀的企业同行,共同成长,共创未来"
|
||||
@@ -101,31 +103,23 @@ export default function CasesPage() {
|
||||
让我们与您同行,共创美好未来
|
||||
</p>
|
||||
<div className="flex justify-center gap-4">
|
||||
<Button
|
||||
size="lg"
|
||||
variant="outline"
|
||||
onClick={() => {
|
||||
const element = document.getElementById('contact');
|
||||
if (element) {
|
||||
element.scrollIntoView({ behavior: 'smooth' });
|
||||
}
|
||||
}}
|
||||
>
|
||||
联系我们
|
||||
</Button>
|
||||
<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>
|
||||
<Link href="/#contact">
|
||||
<Button
|
||||
size="lg"
|
||||
variant="outline"
|
||||
>
|
||||
联系我们
|
||||
</Button>
|
||||
</Link>
|
||||
<Link href="/#contact">
|
||||
<Button
|
||||
size="lg"
|
||||
className="bg-[#C41E3A] hover:bg-[#A01830] text-white"
|
||||
>
|
||||
立即咨询
|
||||
<ArrowRight className="ml-2 w-4 h-4" />
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
Reference in New Issue
Block a user