diff --git a/src/app/products/[id]/page.tsx b/src/app/products/[id]/page.tsx new file mode 100644 index 0000000..3ecf186 --- /dev/null +++ b/src/app/products/[id]/page.tsx @@ -0,0 +1,232 @@ +import { notFound } from 'next/navigation'; +import { PRODUCTS } from '@/lib/constants'; +import { Button } from '@/components/ui/button'; +import { ArrowLeft, CheckCircle2, Zap, Target, Layers, CreditCard, ArrowRight } from 'lucide-react'; +import Link from 'next/link'; + +export async function generateStaticParams() { + return PRODUCTS.map((product) => ({ + id: product.id, + })); +} + +export async function generateMetadata({ params }: { params: { id: string } }) { + const product = PRODUCTS.find((p) => p.id === params.id); + + if (!product) { + return { + title: '产品未找到', + }; + } + + return { + title: `${product.title} - 睿新致远`, + description: product.description, + }; +} + +export default function ProductDetailPage({ params }: { params: { id: string } }) { + const product = PRODUCTS.find((p) => p.id === params.id); + + if (!product) { + notFound(); + } + + return ( +
+ {product.description} +
++ {product.overview} +
+{step}
+ {index < product.process.length - 1 && ( + + )} +{product.pricing.base}
+{product.pricing.standard}
+{product.pricing.enterprise}
+