refactor(ui): 优化导航组件和页面布局

- 移除多个页面的面包屑导航组件
- 添加统一的返回按钮组件替代各页面独立实现
- 优化导航栏滚动检测逻辑和动画效果
- 更新常量类型定义和统计数据
- 调整动态导入的SSR配置为false
- 添加FlipClock组件展示公司运营时长
- 优化新闻列表页的类型安全和响应式设计
This commit is contained in:
张翔
2026-02-28 13:09:07 +08:00
parent 9451814ca4
commit 0cfefaa937
18 changed files with 389 additions and 195 deletions
+45 -30
View File
@@ -2,18 +2,38 @@
import { motion } from 'framer-motion';
import { useInView } from 'framer-motion';
import { useRef } from 'react';
import { useRef, useState, useEffect, useMemo } from 'react';
import { COMPANY_INFO, STATS } from '@/lib/constants';
import { Card, CardContent } from '@/components/ui/card';
import { PageHeader } from '@/components/ui/page-header';
import { Breadcrumb } from '@/components/layout/breadcrumb';
import { FlipClock } from '@/components/ui/flip-clock';
import { Lightbulb, Users, Target, Award, MapPin, Mail, Phone } from 'lucide-react';
export function AboutClient() {
const contentRef = useRef(null);
const isContentInView = useInView(contentRef, { once: true, margin: '-100px' });
const [operationTime, setOperationTime] = useState({ days: 0, months: 0, years: 0 });
const values = [
useEffect(() => {
const foundingDate = new Date('2026-01-15');
const calculateTime = () => {
const now = new Date();
const diff = now.getTime() - foundingDate.getTime();
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
const years = Math.floor(days / 365);
const months = Math.floor((days % 365) / 30);
setOperationTime({ days, months, years });
};
calculateTime();
const timer = setInterval(calculateTime, 60000);
return () => clearInterval(timer);
}, []);
const values = useMemo(() => [
{
icon: Lightbulb,
title: '创新驱动',
@@ -34,44 +54,33 @@ export function AboutClient() {
title: '诚信为本',
description: '坚持透明沟通,信守承诺,以诚信赢得客户信任和尊重',
},
];
], []);
const milestones = [
const milestones = useMemo(() => [
{
date: '2018年',
date: '2026年1月',
title: '公司成立',
description: '睿新致远正式成立,专注于企业数字化转型解决方案',
description: '四川睿新致远科技有限公司在成都龙泉驿区正式成立,专注于企业数字化转型解决方案',
},
{
date: '2019年',
title: '业务拓展',
description: '成功服务首批20家企业客户,建立行业口碑',
date: '2026年1月',
title: '团队组建',
description: '核心团队到位,技术团队拥有丰富的行业经验和专业技能',
},
{
date: '2020年',
title: '技术突破',
description: '自主研发的智能分析平台上线,获得多项技术专利',
date: '2026年2月',
title: '业务启动',
description: '推出企业数字化转型解决方案,开始服务首批客户',
},
{
date: '2021年',
title: '规模扩张',
description: '团队规模突破50人,服务客户超过100家',
date: '2026年2月',
title: '产品发布',
description: '自主研发的ERP、CRM等产品陆续上线,为客户提供一站式数字化服务',
},
{
date: '2022年',
title: '生态建设',
description: '建立合作伙伴生态,与多家行业领军企业达成战略合作',
},
{
date: '2023年',
title: '品牌升级',
description: '全面升级品牌形象,推出新一代智能化产品矩阵',
},
];
], []);
return (
<div className="min-h-screen bg-white">
<Breadcrumb items={[{ label: '关于我们', href: '/about' }]} />
<PageHeader
title="关于我们"
description="了解睿新致远的品牌故事。我们不只是技术供应商,更是您数字化转型的成长伙伴。以智慧连接数字趋势,以伙伴身份陪您成长。"
@@ -144,6 +153,12 @@ export function AboutClient() {
</p>
</div>
<FlipClock
years={operationTime.years}
months={operationTime.months}
days={operationTime.days}
/>
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
@@ -176,7 +191,7 @@ export function AboutClient() {
transition={{ duration: 0.5, delay: 0.4 + idx * 0.1 }}
className="flex items-start gap-4 p-6 bg-[#FFFBF5] rounded-xl border border-[#E5E5E5] hover:border-[#1C1C1C] transition-all duration-300"
>
<div className="w-12 h-12 rounded-lg bg-[#C41E3A] flex items-center justify-center flex-shrink-0">
<div className="w-12 h-12 rounded-lg bg-[#C41E3A] flex items-center justify-center shrink-0">
<value.icon className="w-6 h-6 text-white" />
</div>
<div>
@@ -204,7 +219,7 @@ export function AboutClient() {
transition={{ duration: 0.5, delay: 0.6 + idx * 0.1 }}
className="flex flex-col md:flex-row md:items-start gap-4 p-6 bg-[#FFFBF5] rounded-xl border border-[#E5E5E5]"
>
<div className="md:w-32 flex-shrink-0">
<div className="md:w-32 shrink-0">
<span className="text-sm font-medium text-[#C41E3A]">{milestone.date}</span>
</div>
<div className="flex-1">