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:
@@ -5,10 +5,12 @@ import FeatureGrid from "./feature-grid/FeatureGrid";
|
||||
import FAQ from "./faq/FAQ";
|
||||
import CTA from "./cta/CTA";
|
||||
import LogoCloud from "./logo-cloud/LogoCloud";
|
||||
import CaseStudyCard from "./case-study/CaseStudyCard";
|
||||
import LeadForm from "./form/LeadForm";
|
||||
import type { StreamFieldBlock } from "@/types/wagtail";
|
||||
|
||||
/**
|
||||
* StreamField type → 组件映射表。
|
||||
* StreamField 类型 → 组件映射表。
|
||||
* 必须与后端 apps/core/blocks.py 的 COMMON_BLOCKS 保持一致,
|
||||
* 否则新增/重命名 Block 时前后端会出现字段不对齐问题
|
||||
* (详见 documents/设计方案分析与完善版.md §2.6)。
|
||||
@@ -21,6 +23,8 @@ const components: Record<string, ComponentType<{ value: any }>> = {
|
||||
faq: FAQ,
|
||||
cta: CTA,
|
||||
logo_cloud: LogoCloud,
|
||||
case_study: CaseStudyCard,
|
||||
form: LeadForm,
|
||||
};
|
||||
|
||||
export function BlockRenderer({ blocks }: { blocks: StreamFieldBlock[] }) {
|
||||
|
||||
Reference in New Issue
Block a user