feat: 重构联系页面并增强安全性

refactor: 优化导航和路由逻辑

fix: 修复移动端样式问题

perf: 优化字体加载和性能

test: 添加安全性和可访问性测试

style: 调整按钮和表单样式

chore: 更新依赖版本

ci: 添加安全头配置

build: 优化构建配置

docs: 更新常量信息
This commit is contained in:
张翔
2026-03-01 10:56:54 +08:00
parent 13c4a2ca49
commit 9cbc80742a
24 changed files with 1087 additions and 440 deletions
+26 -12
View File
@@ -1,15 +1,29 @@
'use client';
import { useEffect, useRef, useState } from 'react';
import Link from 'next/link';
import dynamic from 'next/dynamic';
import { motion } from 'framer-motion';
import { RippleButton, SealButton } from '@/components/ui/ripple-button';
import { GradientText, MagneticButton, BlurReveal, CounterWithEffect } from '@/lib/animations';
import { InkBackground } from '@/components/ui/ink-decoration';
import { DataParticleFlow } from '@/components/effects/data-particle-flow';
import { SubtleDots } from '@/components/effects/subtle-dots';
import { COMPANY_INFO, STATS } from '@/lib/constants';
import { ArrowRight, Shield, Zap, Award } from 'lucide-react';
const InkBackground = dynamic(
() => import('@/components/ui/ink-decoration').then(mod => ({ default: mod.InkBackground })),
{ ssr: false }
);
const DataParticleFlow = dynamic(
() => import('@/components/effects/data-particle-flow').then(mod => ({ default: mod.DataParticleFlow })),
{ ssr: false }
);
const SubtleDots = dynamic(
() => import('@/components/effects/subtle-dots').then(mod => ({ default: mod.SubtleDots })),
{ ssr: false }
);
const features = [
{ icon: Shield, text: '安全可靠' },
{ icon: Zap, text: '高效便捷' },
@@ -136,15 +150,15 @@ export function HeroSection() {
className="flex flex-col sm:flex-row items-center justify-center gap-4 mb-8"
>
<MagneticButton strength={0.4}>
<SealButton
size="lg"
onClick={() => handleScrollTo('contact')}
onKeyDown={(e) => handleKeyDown(e, 'contact')}
className="min-w-45"
>
<ArrowRight className="w-4 h-4 ml-2" />
</SealButton>
<Link href="/contact">
<SealButton
size="lg"
className="min-w-45"
>
<ArrowRight className="w-4 h-4 ml-2" />
</SealButton>
</Link>
</MagneticButton>
<MagneticButton strength={0.4}>
<RippleButton
+5 -8
View File
@@ -115,15 +115,12 @@ export function ProductsSection() {
</p>
<Button
size="lg"
onClick={() => {
const element = document.getElementById('contact');
if (element) {
element.scrollIntoView({ behavior: 'smooth' });
}
}}
asChild
>
<ArrowRight className="ml-2 w-4 h-4" />
<Link href="/contact">
<ArrowRight className="ml-2 w-4 h-4" />
</Link>
</Button>
</div>
</div>