feat(ui): 营销站 UI/UE/UX 治理 P0→P3 收官

复评(impeccable critique)全部 Priority Issues 与 Minor Observations 落地:
- P0 数字口径:MetricsBasisNote 单一真源 + metrics-basis.test fs 防线,接入
  products/solutions/services/home/about;纯渲染端加角注,不动 DB/seed 值
- P1 转化断头路:敬请期待态 + 404 语境出口 + services 空态双出口
- P1 首页并卡:TrustSection 早鸟横幅并入 CasesSection 单张深色共创卡
- P2 CTA 治理:CONSULT_CTA_ALLOWLIST 白名单 + 逐字符扫描器,/contact CTA 全归一
- P3 polish:footer 补 服务/公司列、contact 死三元/空槽/toast、GlobalErrorTracker 幂等日志
- 文档同源:PRODUCT/CONTEXT 动效带统一 180–280ms;DESIGN.md 立 The 10px Floor;
  font-floor.test 守卫禁止再引入 <10px(保留 10/11px 有意 Bain 微标签)

Gates: type-check 0 · jest 1581/132 · lint 0e/126w · contrast 7/7 · headings 10/10
This commit is contained in:
zhangxiang committed 2026-09-20 11:50:58 +08:00
1 parent dcf8ed6f20
commit f8917d4fda
66 files changed
+1448 -1313

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
/**
* CTA_LABELS — 全站「预约动作」按钮文案单一真源。
*
* DESIGN.md 约束:CTA 文案不得自由发挥,预约动作全站统一「预约咨询」。
* 2026-09-19 critique P1:预约动作曾并存「预约免费咨询 / 预约体验 / 预约演示 /
* 聊聊您的需求」等变体,机械防线见同目录 cta-labels.test.ts。
*/
export const CTA_LABELS = {
consult: '预约咨询',
} as const;
/**
* CMS pageCopy 里可能仍存有历史预约按钮变体(seed 先于常量修正写入库)。
* 仅做「整串精确匹配」替换——长文案/正文句子不受影响。
* 根治方式是 admin 更新数据,此处是渲染入口的最后一道防线。
*/
const STALE_CONSULT_VARIANTS = new Set([
'预约演示',
'预约体验',
'预约免费咨询',
'立即咨询',
'咨询专家',
'聊聊您的需求',
]);
export function canonicalCtaLabel(label?: string | null): string | undefined {
if (!label) return undefined;
return STALE_CONSULT_VARIANTS.has(label.trim()) ? CTA_LABELS.consult : label;
}
/**
* /contact 预约意图 CTA 的白名单(复评 P2:咨询词汇漂移)。
*
* 除规范「预约咨询」外,仅允许下列「语义不同」的按钮保留自有文案——它们不是通用预约,
* 强改成「预约咨询」反而失真:
* - 「获取上线通知」:内测产品订阅发布提醒,非咨询。
* - 「免费诊断咨询」/「预约免费诊断」:ERP 升级页的窄口径限时 offer。
* - 「联系我们的技术团队」:错误恢复页的技术支持出口,语境不同。
* - 「了解共创合作」:内测产品页早期共创说明卡的内联次级链接,非通用预约。
* 其余任何 href="/contact" 的 CTA 文案都必须等于 CTA_LABELS.consult。
* 机械防线见同目录 cta-labels.test.ts。
*/
export const CONSULT_CTA_ALLOWLIST: ReadonlySet<string> = new Set([
CTA_LABELS.consult,
'获取上线通知',
'免费诊断咨询',
'预约免费诊断',
'联系我们的技术团队',
'了解共创合作',
]);