refactor(detail): 共享详情件残余清账(P4-B4)
范围:solution-service-card / l3-signals-slot / product-card / solution-value / detail-case-study / detail-product-value / detail-trust-section 七个共享件 + products hub 的两处遗留图标砖。这些件被 product·solution·service·case 详情页共用, 所以一批改完等于把残余存量从"散落在模板里"收敛到"两处已裁定的豁免"。 棘轮读数 - R13 40→**19**:rounded-2xl/xl/lg/md 21 处 → 直角;小圆点(1–1.5px)直接去圆 - R14 12→7:hover:-translate-y 5 处 - R15 12→7:shadow-md 装饰投影 5 处 - R17 22→**13**:font-black 9 处 → font-bold 残余 19(R13)/13(R17)**有意保留**,两条都是已裁定的边界: - `about/brand`(5+11):DESIGN 明写的**遗产豁免**页(90vh / 楷体),随页面退役一并处理; - `products/standalone/[id]`(8+0):seed 无数据 ⇒ 该路由 404、不可观测, 改了也没有任何验证手段,不制造"改过了"的假象。 验证 - check:grammar --selftest 通过;check:grammar 19/19 EXIT=0 - check:accents / check:a11y / check:motion 全 EXIT=0 - type-check EXIT=0;eslint 0 error;jest 157 套件 / 1849 例全通过 - 视觉:只读复跑 /products/erp-upgrade-v3 在 5 个 project 一致判红(真变化:该页直接 使用 detail-product-value / detail-trust-section / l3-signals-slot),重采这 5 张后 L1 全页组 80/80、全量 130/130 通过 P4 四批(hub 6 / 详情 5 / 信任 4 / 共享件 8)完成后的总账: R13 71→19 · R14 21→7 · R15 20→7 · R16 26→8 · R17 53→13 · R19 21→0(硬禁)。
No files matched your search
|
Before Width: | Height: | Size: 596 KiB After Width: | Height: | Size: 597 KiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 794 KiB After Width: | Height: | Size: 794 KiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
@@ -105,8 +105,11 @@ const MARKETING_FLOOR = 60;
|
||||
* R17 43→39 · R19 11→7。
|
||||
* 同日信任四页(P4-B3)清账后再降:R13 48→40 · R14 13→12 · R15 13→12 · R17 39→22 ·
|
||||
* R19 7→**0**(`font-extrabold` 至此清零,R19 从棘轮变硬禁)。
|
||||
* 同日共享详情件(P4-B4)清账:R13 40→19 · R14 12→7 · R15 12→7 · R17 22→13。
|
||||
* 残余 19/8 集中在 `about/brand`(已裁定的遗产豁免,随页面退役)与
|
||||
* `products/standalone/[id]`(seed 无数据、不可观测)。
|
||||
*/
|
||||
const MARKETING_HIT_CEILINGS = { R13: 40, R14: 12, R15: 12, R16: 8, R17: 22, R18: 0, R19: 0 };
|
||||
const MARKETING_HIT_CEILINGS = { R13: 19, R14: 7, R15: 7, R16: 8, R17: 13, R18: 0, R19: 0 };
|
||||
|
||||
/**
|
||||
* 判据正则一律**不带 g 旗标**。
|
||||
|
||||
@@ -205,7 +205,7 @@ function BundleOverview({ products, pageCopy }: { products: Product[]; pageCopy?
|
||||
|
||||
<div className="bg-bg-elevated p-8 sm:p-10 lg:p-12">
|
||||
<div className="flex items-center gap-3 mb-6">
|
||||
<div className="w-10 h-10 rounded-md bg-bg-tertiary border border-border-primary flex items-center justify-center text-text-primary">
|
||||
<div className="w-10 h-10 bg-bg-tertiary border border-border-primary flex items-center justify-center text-text-primary">
|
||||
<Cpu className="w-5 h-5" />
|
||||
</div>
|
||||
<h3 className="text-xl font-bold text-ink">专业产品</h3>
|
||||
@@ -274,7 +274,7 @@ function SpecializedProductsSection({ products }: { products: Product[] }) {
|
||||
<div className="flex flex-col lg:flex-row lg:items-end lg:justify-between gap-8 sm:gap-10 md:gap-12 mb-16 sm:mb-20 md:mb-20">
|
||||
<ScrollReveal className="lg:max-w-3xl">
|
||||
<div className="flex items-center gap-5 mb-8">
|
||||
<div className="w-16 h-16 rounded-md bg-bg-tertiary border border-border-primary flex items-center justify-center text-text-primary">
|
||||
<div className="w-16 h-16 bg-bg-tertiary border border-border-primary flex items-center justify-center text-text-primary">
|
||||
<Cpu className="w-8 h-8" />
|
||||
</div>
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-ink tracking-tight leading-tight">
|
||||
|
||||
@@ -15,10 +15,10 @@ export function CaseStudyCard({ study, index }: CaseStudyCardProps) {
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true, margin: '-50px' }}
|
||||
transition={{ duration: 0.28, delay: index * 0.06 }}
|
||||
className="rounded-xl border border-border-primary bg-bg-elevated p-6 shadow-sm transition-shadow hover:shadow-md"
|
||||
className="border border-border-primary bg-bg-elevated p-6 shadow-sm transition-colors "
|
||||
>
|
||||
<div className="mb-3 flex items-center gap-2">
|
||||
<span className="rounded-full bg-red-50 px-2.5 py-1 text-xs font-medium text-brand-ink">
|
||||
<span className="rounded-cta bg-red-50 px-2.5 py-1 text-xs font-medium text-brand-ink">
|
||||
{study.industry}
|
||||
</span>
|
||||
<span className="text-sm text-text-muted">{study.client}</span>
|
||||
@@ -30,7 +30,7 @@ export function CaseStudyCard({ study, index }: CaseStudyCardProps) {
|
||||
<h4 className="mb-2 text-sm font-semibold text-text-primary">解决方案</h4>
|
||||
<p className="mb-4 text-sm leading-relaxed text-text-secondary">{study.solution}</p>
|
||||
|
||||
<div className="rounded-lg bg-green-50 p-3">
|
||||
<div className="bg-green-50 p-3">
|
||||
<p className="text-sm font-medium text-green-800">{study.result}</p>
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
@@ -107,7 +107,7 @@ function MetricCard({
|
||||
<Icon className="w-6 h-6" />
|
||||
</div>
|
||||
|
||||
<div ref={ref} className="text-3xl sm:text-4xl font-black text-brand-ink tabular-nums leading-none mb-1">
|
||||
<div ref={ref} className="text-3xl sm:text-4xl font-bold text-brand-ink tabular-nums leading-none mb-1">
|
||||
{displayValue}
|
||||
</div>
|
||||
|
||||
@@ -135,7 +135,7 @@ export function ProductValueSection({ product }: ProductValueSectionProps) {
|
||||
产品功能
|
||||
</span>
|
||||
</div>
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-black text-ink tracking-tight leading-[0.95] max-w-3xl">
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-ink tracking-tight leading-[0.95] max-w-3xl">
|
||||
{product.title}
|
||||
<span className="text-brand-ink"> 核心能力</span>
|
||||
</h2>
|
||||
@@ -261,7 +261,7 @@ export function ProductValueSection({ product }: ProductValueSectionProps) {
|
||||
设计目标
|
||||
</span>
|
||||
</div>
|
||||
<h3 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-black text-ink tracking-tight leading-[0.95]">
|
||||
<h3 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-ink tracking-tight leading-[0.95]">
|
||||
以可量化的目标约束交付
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
@@ -73,7 +73,7 @@ function AnimatedCounter({ value, duration = 2000 }: { value: string; duration?:
|
||||
}, [isInView, value, duration, shouldReduceMotion]);
|
||||
|
||||
return (
|
||||
<div ref={ref} className="text-3xl sm:text-4xl font-black text-brand-ink tabular-nums leading-none">
|
||||
<div ref={ref} className="text-3xl sm:text-4xl font-bold text-brand-ink tabular-nums leading-none">
|
||||
{displayValue}
|
||||
</div>
|
||||
);
|
||||
@@ -123,7 +123,7 @@ export function DetailTrustSection({
|
||||
目标口径
|
||||
</span>
|
||||
</div>
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-black text-ink tracking-tight leading-[0.95]">
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-ink tracking-tight leading-[0.95]">
|
||||
以设计目标约束交付,
|
||||
<br />
|
||||
在首批共创中转为可核验数据
|
||||
@@ -166,7 +166,7 @@ export function DetailTrustSection({
|
||||
transition={{ duration: 0.28, ease: [0.22, 1, 0.36, 1] }}
|
||||
className="mb-12"
|
||||
>
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-black text-ink tracking-tight leading-[0.95]">
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-ink tracking-tight leading-[0.95]">
|
||||
他们已经实现了转型突破
|
||||
</h2>
|
||||
</motion.div>
|
||||
|
||||
@@ -128,11 +128,11 @@ function SignalCard({ signal }: { signal: L3Signal }) {
|
||||
const cardBody = (
|
||||
<div
|
||||
className={cn(
|
||||
'group relative h-full p-6 sm:p-8 rounded-lg border border-border-primary bg-bg-primary',
|
||||
'group relative h-full p-6 sm:p-8 border border-border-primary bg-bg-primary',
|
||||
'transition-all duration-normal ease-out',
|
||||
disabled
|
||||
? 'opacity-70 cursor-not-allowed'
|
||||
: 'hover:border-brand/40 hover:shadow-md hover:-translate-y-1'
|
||||
: 'hover:border-brand/40 '
|
||||
)}
|
||||
>
|
||||
<span className="inline-block text-[11px] tracking-[0.15em] uppercase font-bold text-brand-ink mb-4">
|
||||
@@ -140,7 +140,7 @@ function SignalCard({ signal }: { signal: L3Signal }) {
|
||||
</span>
|
||||
|
||||
<div
|
||||
className="w-10 h-10 mb-4 flex items-center justify-center rounded-md bg-brand-soft text-brand-ink"
|
||||
className="w-10 h-10 mb-4 flex items-center justify-center bg-brand-soft text-brand-ink"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<Icon className="w-5 h-5" />
|
||||
@@ -150,7 +150,7 @@ function SignalCard({ signal }: { signal: L3Signal }) {
|
||||
{title}
|
||||
{!disabled && (
|
||||
<ArrowUpRight
|
||||
className="w-4 h-4 transition-transform duration-normal group-hover:translate-x-0.5 group-hover:-translate-y-0.5"
|
||||
className="w-4 h-4 transition-transform duration-normal group-hover:translate-x-0.5 group-.5"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
)}
|
||||
@@ -166,7 +166,7 @@ function SignalCard({ signal }: { signal: L3Signal }) {
|
||||
|
||||
if (disabled) {
|
||||
return (
|
||||
<div aria-disabled="true" className="block rounded-lg">
|
||||
<div aria-disabled="true" className="block ">
|
||||
{cardBody}
|
||||
</div>
|
||||
);
|
||||
@@ -175,7 +175,7 @@ function SignalCard({ signal }: { signal: L3Signal }) {
|
||||
return (
|
||||
<Link
|
||||
href={href}
|
||||
className="block rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2 focus-visible:ring-offset-bg-secondary"
|
||||
className="block focus:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2 focus-visible:ring-offset-bg-secondary"
|
||||
>
|
||||
{cardBody}
|
||||
</Link>
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
import { parseMetricValue } from './metric-value';
|
||||
|
||||
describe('parseMetricValue', () => {
|
||||
it('保留区间值,不把 3-6个月 解析成 36', () => {
|
||||
const parsed = parseMetricValue('3-6个月');
|
||||
expect(parsed.numeric).toBeNull();
|
||||
expect(parsed.display).toBe('3-6个月');
|
||||
});
|
||||
|
||||
it('拆出前导符号与后缀,保留 +113% / <1天', () => {
|
||||
expect(parseMetricValue('+113%')).toEqual({ prefix: '+', numeric: 113, suffix: '%', display: '+113%' });
|
||||
expect(parseMetricValue('<1天')).toEqual({ prefix: '<', numeric: 1, suffix: '天', display: '<1天' });
|
||||
});
|
||||
|
||||
it('拆出尾随后缀,保留 40%+', () => {
|
||||
expect(parseMetricValue('40%+')).toEqual({ prefix: '', numeric: 40, suffix: '%+', display: '40%+' });
|
||||
});
|
||||
|
||||
it('保留小数', () => {
|
||||
expect(parseMetricValue('99.2%')).toEqual({ prefix: '', numeric: 99.2, suffix: '%', display: '99.2%' });
|
||||
});
|
||||
|
||||
it('多数字/带空格的区间同样原样保留', () => {
|
||||
expect(parseMetricValue('3–6 个月').numeric).toBeNull();
|
||||
expect(parseMetricValue('3–6 个月').display).toBe('3–6 个月');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
export interface ParsedMetricValue {
|
||||
prefix: string;
|
||||
numeric: number | null;
|
||||
suffix: string;
|
||||
display: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 只对「单个数字 + 前后缀」做计数动画;区间/多数字值(如 3-6个月)原样显示。
|
||||
* 旧实现按 `replace(/[^0-9.]/g,'')` 取值,会把 3-6个月 变成 36,并把 -个月 当后缀。
|
||||
*/
|
||||
const SINGLE_NUMBER = /^([^\d]*)(\d+(?:\.\d+)?)([^\d]*)$/;
|
||||
|
||||
export function parseMetricValue(value: string): ParsedMetricValue {
|
||||
const match = value.match(SINGLE_NUMBER);
|
||||
if (!match) {
|
||||
return { prefix: '', numeric: null, suffix: '', display: value };
|
||||
}
|
||||
return {
|
||||
prefix: match[1] ?? '',
|
||||
numeric: Number(match[2]),
|
||||
suffix: match[3] ?? '',
|
||||
display: value,
|
||||
};
|
||||
}
|
||||
@@ -30,7 +30,7 @@ export function ProductCard({ product }: ProductCardProps) {
|
||||
className="group"
|
||||
>
|
||||
<Link href={`/products/${product.id}`} className="block">
|
||||
<div className="relative h-full rounded-2xl bg-bg-elevated border border-border-primary overflow-hidden hover:border-brand/30 hover:shadow-lg hover:-translate-y-1 transition-all duration-normal">
|
||||
<div className="relative h-full bg-bg-elevated border border-border-primary overflow-hidden hover:border-brand/30 transition-all duration-normal">
|
||||
<div className="aspect-video relative overflow-hidden bg-bg-secondary">
|
||||
<Image
|
||||
src={product.image}
|
||||
@@ -41,11 +41,11 @@ export function ProductCard({ product }: ProductCardProps) {
|
||||
/>
|
||||
|
||||
<div className="absolute top-4 left-4 flex gap-2">
|
||||
<span className="px-3 py-1 rounded-full text-xs font-semibold bg-brand text-white shadow-md">
|
||||
<span className="px-3 py-1 rounded-cta text-xs font-semibold bg-brand text-white ">
|
||||
{product.category}
|
||||
</span>
|
||||
{product.status === '已发布' && (
|
||||
<span className="px-3 py-1 rounded-full text-xs font-medium bg-green-500 text-white shadow-md flex items-center gap-1">
|
||||
<span className="px-3 py-1 rounded-cta text-xs font-medium bg-green-500 text-white flex items-center gap-1">
|
||||
<CheckCircle2 className="w-3 h-3" />
|
||||
已发布
|
||||
</span>
|
||||
@@ -67,7 +67,7 @@ export function ProductCard({ product }: ProductCardProps) {
|
||||
{product.features.slice(0, 3).map((feature) => (
|
||||
<span
|
||||
key={feature}
|
||||
className="px-2.5 py-1 rounded-md text-xs font-medium bg-bg-secondary text-text-muted border border-border-primary"
|
||||
className="px-2.5 py-1 text-xs font-medium bg-bg-secondary text-text-muted border border-border-primary"
|
||||
>
|
||||
{feature}
|
||||
</span>
|
||||
|
||||
@@ -43,7 +43,7 @@ export function SolutionCard({ solution }: SolutionCardProps) {
|
||||
className="group"
|
||||
>
|
||||
<Link href={`/solutions/${solution.id}`} className="block">
|
||||
<div className="relative h-full rounded-2xl bg-bg-elevated border border-border-primary overflow-hidden hover:border-brand/30 hover:shadow-lg hover:-translate-y-1 transition-all duration-normal">
|
||||
<div className="relative h-full bg-bg-elevated border border-border-primary overflow-hidden hover:border-brand/30 transition-all duration-normal">
|
||||
<div className="aspect-video relative overflow-hidden bg-bg-secondary flex items-center justify-center">
|
||||
{solution.image ? (
|
||||
<Image
|
||||
@@ -57,12 +57,12 @@ export function SolutionCard({ solution }: SolutionCardProps) {
|
||||
)}
|
||||
|
||||
<div className="absolute top-4 left-4 flex gap-2">
|
||||
<span className="px-3 py-1 rounded-full text-xs font-semibold bg-brand text-white shadow-md inline-flex items-center gap-1.5">
|
||||
<span className="px-3 py-1 rounded-cta text-xs font-semibold bg-brand text-white inline-flex items-center gap-1.5">
|
||||
<Icon className="w-3 h-3" />
|
||||
{solution.industry}
|
||||
</span>
|
||||
{solution.suiteCombination && solution.suiteCombination.primaryProducts.length > 0 && (
|
||||
<span className="px-3 py-1 rounded-full text-xs font-semibold bg-white/90 text-text-secondary shadow-md inline-flex items-center gap-1.5">
|
||||
<span className="px-3 py-1 rounded-cta text-xs font-semibold bg-white/90 text-text-secondary inline-flex items-center gap-1.5">
|
||||
<Package className="w-3 h-3" />
|
||||
{solution.suiteCombination.primaryProducts.length} 产品组合
|
||||
</span>
|
||||
@@ -83,7 +83,7 @@ export function SolutionCard({ solution }: SolutionCardProps) {
|
||||
<div className="space-y-2 mb-5">
|
||||
{solution.challenges.slice(0, 2).map((challenge) => (
|
||||
<div key={challenge} className="flex items-start gap-2 text-sm text-text-muted">
|
||||
<span className="w-1 h-1 rounded-full bg-brand mt-1.5 shrink-0" />
|
||||
<span className="w-1 h-1 bg-brand mt-1.5 shrink-0" />
|
||||
<span className="line-clamp-1">{challenge}</span>
|
||||
</div>
|
||||
))}
|
||||
@@ -123,9 +123,9 @@ export function ServiceCard({ service }: ServiceCardProps) {
|
||||
className="group"
|
||||
>
|
||||
<Link href={`/services/${service.id}`} className="block">
|
||||
<div className="relative h-full rounded-2xl bg-bg-secondary border border-border-primary overflow-hidden hover:border-brand/30 hover:shadow-lg hover:-translate-y-1 transition-all duration-normal">
|
||||
<div className="relative h-full bg-bg-secondary border border-border-primary overflow-hidden hover:border-brand/30 transition-all duration-normal">
|
||||
<div className="p-8">
|
||||
<div className="w-14 h-14 rounded-md bg-bg-tertiary border border-border-primary flex items-center justify-center mb-5 shadow-sm group-hover:scale-110 transition-transform">
|
||||
<div className="w-14 h-14 bg-bg-tertiary border border-border-primary flex items-center justify-center mb-5 shadow-sm group-hover:scale-110 transition-transform">
|
||||
<Cpu className="w-7 h-7 text-text-primary" />
|
||||
</div>
|
||||
|
||||
@@ -142,7 +142,7 @@ export function ServiceCard({ service }: ServiceCardProps) {
|
||||
{service.features.slice(0, 3).map((feature) => (
|
||||
<span
|
||||
key={feature}
|
||||
className="px-2.5 py-1 rounded-md text-xs font-medium bg-bg-elevated text-text-secondary border border-border-primary"
|
||||
className="px-2.5 py-1 text-xs font-medium bg-bg-elevated text-text-secondary border border-border-primary"
|
||||
>
|
||||
{feature.split(':')[0]}
|
||||
</span>
|
||||
|
||||
@@ -30,7 +30,7 @@ export function SolutionValueSection({ solution }: SolutionValueSectionProps) {
|
||||
行业方案
|
||||
</span>
|
||||
</div>
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-black text-ink tracking-tight leading-[0.95] max-w-3xl">
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-ink tracking-tight leading-[0.95] max-w-3xl">
|
||||
为<span className="text-brand-ink">{solution.industry}</span>量身定制
|
||||
</h2>
|
||||
<p className="text-lg text-text-secondary max-w-2xl mt-6 leading-relaxed">
|
||||
@@ -68,7 +68,7 @@ export function SolutionValueSection({ solution }: SolutionValueSectionProps) {
|
||||
}}
|
||||
className="flex items-start gap-3 text-text-secondary"
|
||||
>
|
||||
<span className="w-1.5 h-1.5 rounded-full bg-brand mt-2 shrink-0" />
|
||||
<span className="w-1.5 h-1.5 bg-brand mt-2 shrink-0" />
|
||||
<span className="text-sm leading-relaxed">{challenge}</span>
|
||||
</motion.li>
|
||||
))}
|
||||
@@ -128,7 +128,7 @@ export function SolutionValueSection({ solution }: SolutionValueSectionProps) {
|
||||
价值主张
|
||||
</span>
|
||||
</div>
|
||||
<h3 className="text-2xl sm:text-3xl md:text-4xl font-black text-ink tracking-tight leading-[0.95]">
|
||||
<h3 className="text-2xl sm:text-3xl md:text-4xl font-bold text-ink tracking-tight leading-[0.95]">
|
||||
{solution.valueProposition.headline}
|
||||
</h3>
|
||||
</div>
|
||||
@@ -174,7 +174,7 @@ export function SolutionValueSection({ solution }: SolutionValueSectionProps) {
|
||||
产品组合
|
||||
</span>
|
||||
</div>
|
||||
<h3 className="text-2xl sm:text-3xl font-black text-ink tracking-tight leading-[0.95]">
|
||||
<h3 className="text-2xl sm:text-3xl font-bold text-ink tracking-tight leading-[0.95]">
|
||||
推荐搭配方案
|
||||
</h3>
|
||||
</div>
|
||||
|
||||