fix(detail): 指标区间值不再被拼成一个数(DEF-06/07)

`3-6个月` 被渲染成 `36`:两处独立实现都用了
`value.replace(/[^0-9.]/g, '')`,把区间符号与单位一起丢掉。
`metric-value.ts` 的 `parseMetricValue` 在 P4-B4 就已入库,
但**从未被任何组件调用** —— check:dead 实测把它判成「仅测试引用」。

接线到两处:`MetricCard`(detail-product-value)与
`AnimatedCounter`(detail-trust-section)。同时给 ProductValueSection
加 `showDataProofs`,V3 页据此关掉重复的一组 dataProofs
(该页下方 DetailTrustSection 已渲染同一组指标)。

判别性测试(各自负对照已做):
- 区间值 `3-6个月` 不得出现 `36`;只回退 MetricCard ⇒ 仅该例红
- `3–6 个月`(en dash + 空格)同理;只回退 AnimatedCounter ⇒ 仅该例红
- showDataProofs=false 整块不渲染

代价:V3 页去掉重复指标块后页高 5663px → 5078px,
视觉基线 5 张随之重采(另有 100 张见后续提交)。
This commit is contained in:
zhangxiang committed 2026-11-25 08:59:32 +08:00
1 parent a34bd35d8e
commit c9b9c886d1
4 files changed
+53 -14

No files matched your search

@@ -63,7 +63,8 @@ export default async function ERPUpgradeV3Page() {
testIdPrefix="erp-upgrade-hero"
/>
<ProductValueSection product={data as unknown as Product} />
{/* V3 页下方 DetailTrustSection 已渲染同一组 dataProofs,此处关闭避免同组指标重复两遍 */}
<ProductValueSection product={data as unknown as Product} showDataProofs={false} />
<L3EmptyFallback caseStudies={caseStudies} dataProofs={dataProofs} certifications={certifications} />
<DetailTrustSection