Files
novalon-website/src/components/detail/detail-case-study.tsx
T
zhangxiang a366bd1400 fix(qa): 第五轮系统性质量保障缺陷修复 + 单元/集成测试
安全/鉴权:登出清服务端 httpOnly 令牌、登录 IP 限流前置 bcrypt、停用账号
令牌在 6 个内联 role handler 失效、admin/items 存在性 oracle 认证前置、
同意偏好 sanitize fail-closed、api-crypto 按 HTTP 方法判体。

CMS:workflow 状态更新+审计收进交互式 $transaction(失败即回滚)、编辑器
richtext 走 textarea 防换行损毁、array/object 子字段按作用域读写防污染、
about/contact/erp-upgrade 补 ISR revalidate 与路由映射。

UI/a11y:AnimatedCounter 入视口前显起点、CLS 累计上报、MetricCard 动画入
effect 并卸载取消 rAF、后台状态四态映射/搜索防抖+序号守卫/媒体单 input/
吞错改横幅/表单 label-aria 关联。

新增对应判别性单测与 pagination/rate-limit/client-ip/sanitize/validate-content-data
等模块及 tests-integration 真库集成层。
2026-09-28 10:48:07 +08:00

39 lines
1.4 KiB
TypeScript

'use client';
import { motion } from 'framer-motion';
import type { CaseStudy } from '@/lib/constants/products';
interface CaseStudyCardProps {
study: CaseStudy;
index: number;
}
export function CaseStudyCard({ study, index }: CaseStudyCardProps) {
return (
<motion.div
initial={{ opacity: 0, y: 20 }}
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"
>
<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">
{study.industry}
</span>
<span className="text-sm text-text-muted">{study.client}</span>
</div>
<h4 className="mb-2 text-sm font-semibold text-text-primary">挑战</h4>
<p className="mb-4 text-sm leading-relaxed text-text-secondary">{study.challenge}</p>
<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">
<p className="text-sm font-medium text-green-800">{study.result}</p>
</div>
</motion.div>
);
}