From 959c7aabead5a659916ce6a0a2838ac4e36bc76a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=BF=94?= Date: Thu, 26 Feb 2026 18:22:43 +0800 Subject: [PATCH] fix: remove duplicate routes from (marketing) group --- src/app/(marketing)/news/[slug]/page.tsx | 109 ---------------------- src/app/(marketing)/news/page.tsx | 59 ------------ src/app/(marketing)/products/page.tsx | 110 ----------------------- src/app/(marketing)/services/page.tsx | 57 ------------ 4 files changed, 335 deletions(-) delete mode 100644 src/app/(marketing)/news/[slug]/page.tsx delete mode 100644 src/app/(marketing)/news/page.tsx delete mode 100644 src/app/(marketing)/products/page.tsx delete mode 100644 src/app/(marketing)/services/page.tsx diff --git a/src/app/(marketing)/news/[slug]/page.tsx b/src/app/(marketing)/news/[slug]/page.tsx deleted file mode 100644 index 7cadb7d..0000000 --- a/src/app/(marketing)/news/[slug]/page.tsx +++ /dev/null @@ -1,109 +0,0 @@ -import { notFound } from 'next/navigation'; -import { COMPANY_INFO, NEWS } from '@/lib/constants'; -import { Badge } from '@/components/ui/badge'; -import { Card, CardContent } from '@/components/ui/card'; -import { Calendar, ArrowLeft } from 'lucide-react'; -import Link from 'next/link'; -import { Button } from '@/components/ui/button'; - -interface NewsDetailPageProps { - params: Promise<{ - slug: string; - }>; -} - -// 定义新闻项类型 -type NewsItem = { - id: string; - title: string; - excerpt: string; - date: string; - category: string; - image: string; - content?: string; -}; - -export function generateStaticParams() { - return NEWS.map((news) => ({ - slug: news.id, - })); -} - -export async function generateMetadata({ params }: NewsDetailPageProps) { - const { slug } = await params; - const news = (NEWS as unknown as NewsItem[]).find((n) => n.id === slug); - - if (!news) { - return { - title: `新闻未找到 - ${COMPANY_INFO.name}`, - }; - } - - return { - title: `${news.title} - ${COMPANY_INFO.name}`, - description: news.excerpt, - }; -} - -export default async function NewsDetailPage({ params }: NewsDetailPageProps) { - const { slug } = await params; - const news = (NEWS as unknown as NewsItem[]).find((n) => n.id === slug); - - if (!news) { - notFound(); - } - - return ( -
-
-
- - -
-
- {news.category} - - - {news.date} - -
- -

- {news.title} -

- - - -
- {news.content ? ( - news.content.split('\n\n').map((paragraph, idx) => ( -

- {paragraph} -

- )) - ) : ( - <> -

- {news.excerpt} -

-

- 四川睿新致远科技有限公司始终致力于为客户提供最优质的技术服务和解决方案, - 不断创新,追求卓越。我们相信,通过技术的力量,可以帮助更多企业实现数字化转型, - 提升竞争力。 -

- - )} -
-
-
-
-
-
-
- ); -} diff --git a/src/app/(marketing)/news/page.tsx b/src/app/(marketing)/news/page.tsx deleted file mode 100644 index 6d99810..0000000 --- a/src/app/(marketing)/news/page.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import Link from 'next/link'; -import { COMPANY_INFO, NEWS } from '@/lib/constants'; -import { Badge } from '@/components/ui/badge'; -import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/card'; -import { ArrowRight, Calendar } from 'lucide-react'; - -export const metadata = { - title: `新闻动态 - ${COMPANY_INFO.name}`, - description: `了解${COMPANY_INFO.name}的最新动态和行业资讯`, -}; - -export default function NewsPage() { - return ( -
-
-
- - 新闻动态 - -

- 最新资讯 -

-

- 了解公司最新动态、行业资讯和技术分享 -

-
- -
- {NEWS.map((news) => ( - - -
- {news.category} - - - {news.date} - -
- {news.title} -
- - - {news.excerpt} - - - 阅读更多 - - - -
- ))} -
-
-
- ); -} diff --git a/src/app/(marketing)/products/page.tsx b/src/app/(marketing)/products/page.tsx deleted file mode 100644 index d4cd9bb..0000000 --- a/src/app/(marketing)/products/page.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { COMPANY_INFO, PRODUCTS } from '@/lib/constants'; -import { Badge } from '@/components/ui/badge'; -import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/card'; -import { Button } from '@/components/ui/button'; -import { ArrowRight, Check, TrendingUp } from 'lucide-react'; - -export const metadata = { - title: `产品服务 - ${COMPANY_INFO.name}`, - description: `了解${COMPANY_INFO.name}的产品和服务解决方案,包括ERP、客户关系管理、内容管理系统、商业智能平台`, -}; - -export default function ProductsPage() { - return ( -
-
-
- - 产品服务 - -

- 我们的产品 -

-

- 自主研发的企业级产品,助力企业高效运营,实现数字化转型 -

-
- -
- {PRODUCTS.map((product) => ( - - - - {product.category} - - {product.title} - - - - {product.description} - - - {/* 核心功能 */} -
-

核心功能

-
- {product.features.slice(0, 4).map((feature, idx) => ( - - - {feature} - - ))} -
-
- - {/* 核心价值 */} -
-

- - 核心价值 -

-
    - {product.benefits.map((benefit, idx) => ( -
  • - - {benefit} -
  • - ))} -
-
- - -
-
- ))} -
- - {/* 底部CTA */} -
-
-

- 需要定制化解决方案? -

-

- 我们的专业团队可以根据您的业务需求,提供量身定制的产品开发和系统集成服务 -

- -
-
-
-
- ); -} diff --git a/src/app/(marketing)/services/page.tsx b/src/app/(marketing)/services/page.tsx deleted file mode 100644 index b441601..0000000 --- a/src/app/(marketing)/services/page.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import { COMPANY_INFO, SERVICES } from '@/lib/constants'; -import { Badge } from '@/components/ui/badge'; -import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/card'; -import { Code, Cloud, BarChart3, Shield } from 'lucide-react'; - -const iconMap: Record> = { - Code, - Cloud, - BarChart3, - Shield, -}; - -export const metadata = { - title: `核心业务 - ${COMPANY_INFO.name}`, - description: `了解${COMPANY_INFO.name}的核心业务领域和专业服务`, -}; - -export default function ServicesPage() { - return ( -
-
-
- - 核心业务 - -

- 我们的服务 -

-

- 提供全方位的技术解决方案,助力企业数字化转型 -

-
- -
- {SERVICES.map((service) => { - const Icon = iconMap[service.icon]; - return ( - - -
- {Icon && } -
- {service.title} -
- - - {service.description} - - -
- ); - })} -
-
-
- ); -}