feat: 完成网站功能开发与优化

- 完善产品页面布局与交互
- 优化服务详情页用户体验
- 增强新闻模块内容展示
- 改进团队页面设计
- 优化全局样式和响应式布局
- 添加分页组件支持
- 提升性能与SEO优化
- 修复已知问题与改进代码质量
This commit is contained in:
张翔
2026-04-27 20:53:39 +08:00
parent 1832640e8f
commit 1f591fe2b4
86 changed files with 688 additions and 634 deletions
+7 -7
View File
@@ -65,10 +65,10 @@ function HeaderContent() {
}
}, [isOpen]);
const handleNavClick = useCallback((e: React.MouseEvent<HTMLAnchorElement>, item: NavigationItem) => {
e.preventDefault();
window.location.href = item.href;
const handleNavClick = useCallback((href: string) => {
// Close mobile menu, then navigate (StaticLink delegates navigation to onClick when present)
setIsOpen(false);
window.location.href = href;
}, []);
const isActive = useCallback((item: NavigationItem) => {
@@ -124,7 +124,7 @@ function HeaderContent() {
<StaticLink
key={item.id}
href={item.href}
onClick={(e) => handleNavClick(e, item)}
onClick={() => handleNavClick(item.href)}
className={`
relative px-3 py-1.5 text-sm font-medium
transition-all duration-300
@@ -142,7 +142,7 @@ function HeaderContent() {
{item.label}
<span
className={`
absolute bottom-0 left-1/2 -translate-x-1/2 w-6 h-0.5 bg-[#C41E3A] rounded-full
absolute bottom-0 left-1/2 -translate-x-1/2 w-6 h-0.5 bg-[var(--color-brand-primary)] rounded-full
transition-all duration-200 ease-out
${isActive(item)
? 'opacity-100 scale-x-100'
@@ -223,12 +223,12 @@ function HeaderContent() {
>
<StaticLink
href={item.href}
onClick={(e) => handleNavClick(e, item)}
onClick={() => handleNavClick(item.href)}
className={`
block px-4 py-4 text-base font-medium rounded-lg
transition-all duration-200
${isActive(item)
? 'text-[#1C1C1C] bg-[#F5F5F5] border-l-4 border-[#C41E3A]'
? 'text-[#1C1C1C] bg-[#F5F5F5] border-l-4 border-[var(--color-brand-primary)]'
: 'text-[#3D3D3D] hover:text-[#1C1C1C] hover:bg-[#F5F5F5]'
}
`}