diff --git a/src/components/Layout/GlobalCTA.tsx b/src/components/Layout/GlobalCTA.tsx index e0b49eb..188ae76 100644 --- a/src/components/Layout/GlobalCTA.tsx +++ b/src/components/Layout/GlobalCTA.tsx @@ -12,7 +12,7 @@ interface Props { export default function GlobalCTA({ title = '下一步如何行动?', - desc = '任意页面均可直接发起咨询,不强制浏览完整链路。一期提供轻量对照与深度陪跑两条路径。', + desc = '帮助企业看清位置、找到方向、持续进化。', primaryLabel = '咨询获取方案', primaryTo = '/contact', secondaryLabel = '看看你的企业', diff --git a/src/services/cms.ts b/src/services/cms.ts index 036e282..b9588bf 100644 --- a/src/services/cms.ts +++ b/src/services/cms.ts @@ -45,7 +45,7 @@ export async function fetchCMSPublic(): Promise { // 归一化:CMS行 -> 前端 Model function normalizeFourValues(raw:any[]): FourValue[]{ - if(!raw || raw.length===0) return FALLBACK_FOUR + if(!raw) return FALLBACK_FOUR return raw.map(r=>({ id: r.id, slug: r.key, @@ -64,7 +64,7 @@ function normalizeFourValues(raw:any[]): FourValue[]{ })) } function normalizeServices(raw:any[]): Service[]{ - if(!raw || raw.length===0) return FALLBACK_SERVICES + if(!raw) return FALLBACK_SERVICES return raw.map(r=>({ id: r.id, slug: r.slug, @@ -87,7 +87,7 @@ function normalizeServices(raw:any[]): Service[]{ })) } function normalizeCases(raw:any[]): Case[]{ - if(!raw || raw.length===0) return FALLBACK_CASES + if(!raw) return FALLBACK_CASES return raw.map(r=>({ id: r.id, slug: r.slug, @@ -102,21 +102,21 @@ function normalizeCases(raw:any[]): Case[]{ updatedAt: r.updated_at||new Date().toISOString(), coverImage: r.cover_url, narrative: { - originalState: r.original_state || '【占位】', - goal: r.goal || '【占位】', - gap: r.gap || '【占位】', - rootCause: r.root_cause || '【占位】', - amebaIntervention: r.ameba_intervention || '【占位】', - evolutionPath: r.evolution_path || '【占位】', - actions: r.actions || '【占位】', - phasedResult: r.phased_result || '【占位】', - continuousIteration: r.continuous_iteration || '【占位】', + originalState: r.original_state || '', + goal: r.goal || '', + gap: r.gap || '', + rootCause: r.root_cause || '', + amebaIntervention: r.ameba_intervention || '', + evolutionPath: r.evolution_path || '', + actions: r.actions || '', + phasedResult: r.phased_result || '', + continuousIteration: r.continuous_iteration || '', }, results: [] })) } function normalizeInsights(raw:any[]): Insight[]{ - if(!raw || raw.length===0) return FALLBACK_INSIGHTS + if(!raw) return FALLBACK_INSIGHTS return raw.map(r=>({ id: r.id, slug: r.slug, @@ -130,11 +130,11 @@ function normalizeInsights(raw:any[]): Insight[]{ createdAt: r.created_at||new Date().toISOString(), updatedAt: r.updated_at||new Date().toISOString(), coverImage: r.cover_url, - contentBlocks: r.content_html ? [{id:'b1', type:'paragraph' as const, text: r.content_html}] : [{id:'b1', type:'paragraph' as const, text: '【占位】'}], + contentBlocks: r.content_html ? [{id:'b1', type:'paragraph' as const, text: r.content_html}] : [], })) } function normalizeMethods(raw:any[]): MethodCapability[]{ - if(!raw || raw.length===0) return FALLBACK_METHODS + if(!raw) return FALLBACK_METHODS return raw.map(r=>({ id: r.id, slug: r.id, @@ -151,7 +151,7 @@ function normalizeMethods(raw:any[]): MethodCapability[]{ })) } function normalizeAmb(raw:any[]): Record{ - if(!raw || raw.length===0) return FALLBACK_AMB + if(!raw) return FALLBACK_AMB return raw.reduce((result, r) => { const status = String(r.key || '').toUpperCase() as AmbStatusMeta['status'] if (!['A','M','B'].includes(status)) return result