Files
novalon-website/src/components/detail/service-value.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

165 lines
6.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
'use client';
import { motion } from 'framer-motion';
import {
CheckCircle2,
Zap,
Clock,
Users,
Award,
TrendingUp,
type LucideIcon,
} from 'lucide-react';
import type { Service } from '@/lib/constants/services';
interface ServiceValueSectionProps {
service: Service;
}
export function ServiceValueSection({ service }: ServiceValueSectionProps) {
const icons: LucideIcon[] = [Zap, Clock, Users, Award, TrendingUp];
return (
<section className="relative bg-bg-primary py-20 sm:py-28 md:py-36 overflow-hidden">
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative">
<motion.div
initial={{ opacity: 0, y: 32 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, margin: '-120px' }}
transition={{ duration: 0.28, ease: [0.22, 1, 0.36, 1] }}
className="mb-16 sm:mb-20"
>
<div className="flex items-center gap-3 mb-6">
<div className="w-10 h-px bg-brand" />
<span className="text-[13px] tracking-[0.12em] font-semibold text-brand-ink">
服务能力
</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">
为什么选择我们的{service.title}?
</h2>
<p className="text-lg text-text-secondary max-w-2xl mt-6 leading-relaxed">
{service.overview}
</p>
</motion.div>
{/* 核心能力 */}
<div className="mb-16">
<div className="flex items-center gap-3 mb-6">
<div className="w-10 h-px bg-brand" />
<span className="text-[13px] tracking-[0.12em] font-semibold text-brand-ink">
核心能力
</span>
</div>
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5">
{service.features.map((feature, index) => {
const Icon = icons[index % icons.length]!;
return (
<motion.div
key={feature}
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{
delay: index * 0.06,
duration: 0.28,
ease: [0.22, 1, 0.36, 1],
}}
className="bain-card p-6"
>
<div className="flex items-center gap-4">
<div className={`shrink-0 w-11 h-11 flex items-center justify-center ${
index === 0
? 'bg-brand text-white'
: 'bg-bg-secondary text-text-secondary'
}`}>
<Icon className="w-5 h-5" />
</div>
<p className="text-sm font-medium text-text-secondary leading-relaxed">
{feature.split(':')[1] || feature}
</p>
</div>
</motion.div>
);
})}
</div>
</div>
{/* 服务优势 + 服务流程:不对称布局 */}
<div className="asymmetric-wide-narrow">
{/* 服务优势 */}
<div>
<div className="flex items-center gap-3 mb-6">
<div className="w-10 h-px bg-brand" />
<span className="text-[13px] tracking-[0.12em] font-semibold text-brand-ink">
服务优势
</span>
</div>
<div className="space-y-4">
{service.benefits.map((benefit, index) => (
<motion.div
key={index}
initial={{ opacity: 0, x: -20 }}
whileInView={{ opacity: 1, x: 0 }}
viewport={{ once: true }}
transition={{
delay: index * 0.06,
duration: 0.28,
ease: [0.22, 1, 0.36, 1],
}}
className="bain-card p-5 flex items-start gap-3"
>
<CheckCircle2 className="w-5 h-5 text-brand-ink mt-0.5 shrink-0" />
<p className="text-sm font-medium text-text-secondary leading-relaxed">{benefit}</p>
</motion.div>
))}
</div>
</div>
{/* 服务流程 */}
{service.process && service.process.length > 0 && (
<div>
<div className="flex items-center gap-3 mb-6">
<div className="w-10 h-px bg-brand" />
<span className="text-[13px] tracking-[0.12em] font-semibold text-brand-ink">
服务流程
</span>
</div>
<div className="space-y-4">
{service.process.map((step, index) => (
<motion.div
key={step}
initial={{ opacity: 0, x: 20 }}
whileInView={{ opacity: 1, x: 0 }}
viewport={{ once: true }}
transition={{
delay: index * 0.06,
duration: 0.28,
ease: [0.22, 1, 0.36, 1],
}}
className="bain-card p-5"
>
<div className="flex items-start gap-3">
<div className="w-6 h-6 rounded-full bg-brand text-white flex items-center justify-center shrink-0 mt-0.5">
<span className="text-xs font-bold">{index + 1}</span>
</div>
<div>
<h4 className="font-bold text-ink text-sm mb-1">
{step.split(':')[0]}
</h4>
<p className="text-xs text-text-secondary leading-relaxed">
{step.split(':')[1] || step}
</p>
</div>
</div>
</motion.div>
))}
</div>
</div>
)}
</div>
</div>
</section>
);
}