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
This commit is contained in:
2026-08-06 16:04:43 +08:00
parent 7e30631c68
commit b5fe5e13ab
11 changed files with 391 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
import Link from "next/link";
import type { CaseStudyBlockValue } from "@/types/wagtail";
export default function CaseStudyCard({ value }: { value: CaseStudyBlockValue }) {
if (!value.case_page) {
return null;
}
return (
<div className="mx-auto max-w-3xl px-6 py-8">
<Link
href={value.case_page.meta.html_url ?? "#"}
className="block rounded-3xl border border-slate-100 p-8 shadow-sm transition hover:shadow-md"
>
<h3 className="text-xl font-semibold text-slate-900">
{value.case_page.title}
</h3>
{value.summary && (
<p className="mt-2 text-slate-600">{value.summary}</p>
)}
</Link>
</div>
);
}