Files
Zhengen b5fe5e13ab feat: add products/cases pages and lead-capture form block
- types: Product/CaseStudy page types, CaseStudyBlockValue, FormBlockValue
- services: product.service.ts, case.service.ts
- app/products, app/cases: list + detail pages
- blocks: CaseStudyCard, LeadForm (submits to /api/v1/custom/leads/)
- Header nav: add 产品/案例 links
2026-08-06 16:04:43 +08:00

36 lines
1.1 KiB
TypeScript

import Link from "next/link";
import type { Metadata } from "next";
import { getProductList } from "@/services/product.service";
export const metadata: Metadata = {
title: "产品",
};
export default async function ProductListPage() {
const products = await getProductList().catch(() => []);
return (
<div className="mx-auto max-w-4xl px-6 py-24">
<h1 className="mb-12 text-4xl font-bold text-slate-900">产品</h1>
<ul className="space-y-6">
{products.map((product) => (
<li key={product.id} className="border-b border-slate-100 pb-6">
<Link
href={`/products/${product.meta.slug}`}
className="text-2xl font-semibold text-slate-900 hover:text-primary"
>
{product.title}
</Link>
{product.summary && (
<p className="mt-2 text-slate-600">{product.summary}</p>
)}
</li>
))}
{products.length === 0 && (
<p className="text-slate-500">暂无产品,或后端服务未连接。</p>
)}
</ul>
</div>
);
}