import { motion } from 'framer-motion'; import { Calendar, ArrowRight } from 'lucide-react'; import { Link } from 'react-router-dom'; import { formatDate } from '../../lib/utils'; /** * NewsSection 组件 - 最新动态区域 */ // 模拟新闻数据 const newsItems = [ { id: 1, category: 'company', title: '示例集团荣获"2025年度优秀企业"称号', excerpt: '在近日举办的年度企业评选活动中,示例集团凭借其卓越的经营业绩和社会责任表现,荣获"2025年度优秀企业"称号。', date: '2025-12-20', image: '/images/news-award.jpg', }, { id: 2, category: 'industry', title: '金融科技创新论坛圆满落幕,示例集团分享行业洞察', excerpt: '示例集团受邀参加金融科技创新论坛,与行业专家共同探讨金融科技发展趋势,分享公司在数字化转型方面的实践经验。', date: '2025-12-15', image: '/images/news-tech.jpg', }, { id: 3, category: 'achievement', title: '示例集团完成新一轮战略融资,估值突破百亿', excerpt: '示例集团宣布完成新一轮战略融资,本轮融资由知名投资机构领投,估值突破百亿元人民币,标志着公司发展进入新阶段。', date: '2025-12-10', image: '/images/news-company.jpg', }, ]; // 新闻分类映射 const categoryMap: Record = { company: { label: '公司动态', color: 'bg-primary/10 text-primary' }, industry: { label: '行业资讯', color: 'bg-accent/20 text-accent-dark' }, achievement: { label: '荣誉资质', color: 'bg-green-100 text-green-700' }, }; /** * 新闻卡片组件 */ const NewsCard: React.FC<{ news: typeof newsItems[0]; index: number; }> = ({ news, index }) => { const category = categoryMap[news.category] || categoryMap.company; return ( {/* 图片区域 */}
{news.image ? ( ) : (
)} {/* 分类标签 */} {category.label} {/* 图片遮罩 */}
{/* 内容区域 */}
{/* 日期 */}
{/* 标题 */}

{news.title}

{/* 摘要 */}

{news.excerpt}

{/* 了解更多链接 */} 阅读全文
); }; export const NewsSection: React.FC = () => { return (
{/* 标题区域 */}

新闻资讯

了解示例集团最新动态

查看更多新闻
{/* 新闻卡片网格 */}
{newsItems.map((news, index) => ( ))}
); }; export default NewsSection;