feat(cms): 品牌叙事与结构性文案全站 CMS 化并补齐信任证据阶段 0
- 品牌叙事内核(价值主张/定位/承诺/三支柱/语气)下沉 site-config,经 SiteConfigProvider 注入全站 - 新增 page-copy 内容模型承载结构性文案(章节标题/眉标/描述/CTA/空状态),覆盖首页+服务/方案/产品/案例/新闻列表页,「CMS 优先 + 硬编码兜底」不白屏 - 首页「首批客户共创计划」板块(earlyAccessTitle/CtaLabel/Status 驱动)替代单行标签,如实呈现共创/内测/授权公开三档状态 - 关于页资质区数据空时如实展示「建设中」空态 - 零编造:不虚构客户/数据/资质
This commit is contained in:
@@ -302,7 +302,38 @@ function CertificationsSection({ data }: { data: AboutData }) {
|
||||
const certifications = data.certifications ?? [];
|
||||
const partners = data.partners ?? [];
|
||||
|
||||
if (certifications.length === 0 && partners.length === 0) return null;
|
||||
// 初创阶段无资质/伙伴数据时,如实呈现「建设中」状态而非隐藏整块(零编造)
|
||||
if (certifications.length === 0 && partners.length === 0) {
|
||||
return (
|
||||
<section className="relative py-20 sm:py-28 md:py-32 overflow-hidden bg-white">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 30 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true, margin: '-80px' }}
|
||||
transition={{ duration: 0.8, ease: EASE_OUT }}
|
||||
className="max-w-3xl"
|
||||
>
|
||||
<div className="text-sm font-mono tracking-[0.2em] text-text-muted uppercase mb-6">
|
||||
Certifications
|
||||
</div>
|
||||
<h2 className="text-3xl sm:text-4xl md:text-5xl font-extrabold text-ink tracking-tight leading-[0.95] mb-10">
|
||||
资质与认证
|
||||
</h2>
|
||||
<div className="p-8 sm:p-10 border border-dashed border-border-primary bg-bg-secondary">
|
||||
<div className="flex items-center gap-2.5 mb-3">
|
||||
<Shield className="w-5 h-5 text-text-muted" />
|
||||
<span className="text-sm font-semibold text-ink">资质建设中</span>
|
||||
</div>
|
||||
<p className="text-sm text-text-muted leading-relaxed">
|
||||
公司资质与认证信息建设中,将随业务开展与取得进度陆续公示。
|
||||
</p>
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="relative py-20 sm:py-28 md:py-32 overflow-hidden bg-white">
|
||||
|
||||
@@ -95,14 +95,23 @@ function CaseCard({ caseItem, index }: { caseItem: CaseStudy; index: number }) {
|
||||
export default function CasesContentV3({
|
||||
cases: casesProp,
|
||||
industries: industriesProp,
|
||||
pageCopy,
|
||||
}: {
|
||||
cases?: CaseStudy[];
|
||||
industries?: { id: string; label: string }[];
|
||||
pageCopy?: Record<string, unknown> | null;
|
||||
}) {
|
||||
const [selectedIndustry, setSelectedIndustry] = useState('all');
|
||||
|
||||
const industries = industriesProp ?? [];
|
||||
|
||||
const heroTitle1 = (pageCopy?.casePageHeroTitle1 as string) || '每一个项目,';
|
||||
const heroTitle2 = (pageCopy?.casePageHeroTitle2 as string) || '都以成果为目标';
|
||||
const heroDescription = (pageCopy?.casePageHeroDescription as string) || '我们正在与首批客户共同创造价值故事。\n从挑战到方案,从过程到成果——用数据说话,用结果证明。';
|
||||
const heroDescriptionLines = heroDescription.split('\n');
|
||||
const filterTitle = (pageCopy?.casePageFilterTitle as string) || '全部案例';
|
||||
const filterDescription = (pageCopy?.casePageFilterDescription as string) || '按行业筛选,找到与您业务最相关的成功故事';
|
||||
|
||||
const filteredCases = useMemo(() => {
|
||||
const allCases = casesProp ?? [];
|
||||
if (selectedIndustry === 'all') return allCases;
|
||||
@@ -130,11 +139,11 @@ export default function CasesContentV3({
|
||||
transition={{ duration: 1, delay: 0.2, ease: EASE_OUT }}
|
||||
className="text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl font-black text-ink leading-[0.88] tracking-tightest mb-10 sm:mb-12 md:mb-16"
|
||||
>
|
||||
<div className="block">每一个项目,</div>
|
||||
<div className="block">{heroTitle1}</div>
|
||||
<div className="block mt-4 sm:mt-6">
|
||||
<span className="relative inline-block">
|
||||
<span className="relative text-brand font-black">
|
||||
都以成果为目标
|
||||
{heroTitle2}
|
||||
<motion.span
|
||||
className="absolute -bottom-2 left-0 w-full h-[3px] bg-brand"
|
||||
style={{ transformOrigin: 'left' }}
|
||||
@@ -153,9 +162,12 @@ export default function CasesContentV3({
|
||||
transition={{ duration: 0.8, delay: 0.5, ease: EASE_OUT }}
|
||||
className="text-lg md:text-xl text-text-secondary max-w-2xl leading-relaxed mb-12"
|
||||
>
|
||||
我们正在与首批客户共同创造价值故事。
|
||||
<br className="hidden sm:block" />
|
||||
从挑战到方案,从过程到成果——用数据说话,用结果证明。
|
||||
{heroDescriptionLines.map((line, i) => (
|
||||
<span key={i}>
|
||||
{i > 0 && <br className="hidden sm:block" />}
|
||||
{line}
|
||||
</span>
|
||||
))}
|
||||
</motion.p>
|
||||
|
||||
<motion.div
|
||||
@@ -225,10 +237,10 @@ export default function CasesContentV3({
|
||||
All Cases
|
||||
</div>
|
||||
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-extrabold text-ink tracking-tight leading-[0.95]">
|
||||
全部案例
|
||||
{filterTitle}
|
||||
</h2>
|
||||
<p className="mt-6 text-lg text-text-secondary leading-relaxed">
|
||||
按行业筛选,找到与您业务最相关的成功故事
|
||||
{filterDescription}
|
||||
</p>
|
||||
</motion.div>
|
||||
|
||||
|
||||
@@ -6,8 +6,9 @@ import CasesContentV3 from './cases-content-v3';
|
||||
interface CasesClientProps {
|
||||
cases?: CaseStudy[];
|
||||
industries?: { id: string; label: string }[];
|
||||
pageCopy?: Record<string, unknown> | null;
|
||||
}
|
||||
|
||||
export function CasesClient({ cases, industries }: CasesClientProps) {
|
||||
return <CasesContentV3 cases={cases} industries={industries} />;
|
||||
export function CasesClient({ cases, industries, pageCopy }: CasesClientProps) {
|
||||
return <CasesContentV3 cases={cases} industries={industries} pageCopy={pageCopy} />;
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import CasesPage from './page';
|
||||
|
||||
jest.mock('@/lib/cms/data-server', () => ({
|
||||
getPublishedItems: jest.fn(),
|
||||
getPageCopy: jest.fn().mockResolvedValue(null),
|
||||
}));
|
||||
|
||||
jest.mock('./cases-content-v3', () => ({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Metadata } from 'next';
|
||||
import { COMPANY_INFO } from '@/lib/constants';
|
||||
import { CASE_INDUSTRIES } from '@/lib/constants/cases';
|
||||
import { getPublishedItems } from '@/lib/cms/data-server';
|
||||
import { getPublishedItems, getPageCopy } from '@/lib/cms/data-server';
|
||||
import type { CaseStudy } from '@/lib/constants/cases';
|
||||
import { CasesClient } from './client';
|
||||
|
||||
@@ -13,7 +13,10 @@ export const metadata: Metadata = {
|
||||
export const revalidate = 3600;
|
||||
|
||||
export default async function CasesPage() {
|
||||
const items = await getPublishedItems('case-study');
|
||||
const [items, pageCopy] = await Promise.all([
|
||||
getPublishedItems('case-study'),
|
||||
getPageCopy('cases').catch(() => null),
|
||||
]);
|
||||
const cases = items.map((item) => ({ ...item.data, id: item.data.id || item.id, slug: item.data.slug || item.slug, title: item.data.title || item.title } as unknown as CaseStudy));
|
||||
return <CasesClient cases={cases} industries={CASE_INDUSTRIES} />;
|
||||
return <CasesClient cases={cases} industries={CASE_INDUSTRIES} pageCopy={pageCopy?.data ?? null} />;
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import { ArrowRight, Lightbulb, Database, Layers, Code, Puzzle, Server } from 'l
|
||||
import { cn } from '@/lib/utils';
|
||||
import { EASE_OUT } from '@/components/ui/page-decoration';
|
||||
import { COMPANY_INFO, TRUST_SIGNALS, EARLY_ACCESS } from '@/lib/constants';
|
||||
import { useSiteConfig } from '@/lib/site-config';
|
||||
|
||||
// ===== 服务图标映射:将字符串键名映射为 Lucide 组件 =====
|
||||
const SERVICE_ICON_MAP: Record<string, React.ReactNode> = {
|
||||
@@ -71,6 +72,23 @@ const FALLBACK_SERVICES = [
|
||||
},
|
||||
];
|
||||
|
||||
// ===== 首页结构性文案类型(page-copy CMS 覆盖,未配置时走硬编码兜底)=====
|
||||
type HomePageCopy = Record<string, any>;
|
||||
|
||||
// 多行标题渲染:按 \n 分段,输出 <br/> 换行
|
||||
function StyledTitle({ lines }: { lines: (string | undefined)[] }) {
|
||||
return (
|
||||
<>
|
||||
{lines.map((line, i) => (
|
||||
<span key={i}>
|
||||
{i > 0 && <br />}
|
||||
{line}
|
||||
</span>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
// ===== 品牌 CTA 按钮 =====
|
||||
function CTAButton({ children, href, variant = 'primary', className, dataTestId }: {
|
||||
children: React.ReactNode;
|
||||
@@ -103,6 +121,7 @@ function HeroSection({ heroData, stats }: {
|
||||
stats?: Record<string, any>[];
|
||||
}) {
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const siteConfig = useSiteConfig();
|
||||
|
||||
const heading = heroData?.heading || heroData?.headingBottom || '让每一家企业都拥有数据驱动的决策能力';
|
||||
const subheading = heroData?.subheading || heroData?.description || '';
|
||||
@@ -110,6 +129,7 @@ function HeroSection({ heroData, stats }: {
|
||||
const ctaHref = heroData?.ctaHref || '/contact';
|
||||
const secondaryCtaLabel = heroData?.secondaryCtaLabel || '查看产品矩阵';
|
||||
const secondaryCtaHref = heroData?.secondaryCtaHref || '/products';
|
||||
const slogan = siteConfig.slogan || COMPANY_INFO.slogan;
|
||||
|
||||
const hasValidStats = stats?.length && stats[0]?.value;
|
||||
const displayStats = hasValidStats ? stats!.slice(0, 3) : [];
|
||||
@@ -147,6 +167,20 @@ function HeroSection({ heroData, stats }: {
|
||||
/>
|
||||
</motion.div>
|
||||
|
||||
{/* 品牌口号 Badge:消费站点配置 slogan,后台可改 */}
|
||||
{slogan && (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.35, delay: 0.03, ease: EASE_OUT }}
|
||||
className="mb-6"
|
||||
>
|
||||
<span className="inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-brand/5 text-brand text-sm font-medium border border-brand/15">
|
||||
{slogan}
|
||||
</span>
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
{/* 主标题:大胆、直接 */}
|
||||
<motion.h1
|
||||
initial={{ opacity: 0, y: 40 }}
|
||||
@@ -228,7 +262,23 @@ function HeroSection({ heroData, stats }: {
|
||||
}
|
||||
|
||||
// ===== 信任/成果区:可验证信任信号 + 首批客户共创标签 =====
|
||||
function TrustSection() {
|
||||
// 共创计划默认状态条目(如实呈现,无真实案例时不虚构客户)
|
||||
const DEFAULT_EARLY_ACCESS_STATUS = [
|
||||
{ label: '共创进行中', desc: '我们正与首批客户共同打磨产品与方案,以真实运营数据验证业务改善。' },
|
||||
{ label: '产品内测中', desc: '自研产品(如睿视 NovaVis)处于内测阶段,成熟后正式发布。' },
|
||||
{ label: '成果授权公开', desc: '案例与可量化成果在获得客户授权后公示——经得起衡量。' },
|
||||
];
|
||||
|
||||
function TrustSection({ pageCopy }: { pageCopy?: HomePageCopy | null }) {
|
||||
const eyebrow = pageCopy?.trustEyebrow || '值得信赖';
|
||||
const titleLines = (pageCopy?.trustTitle || '以可衡量的成果\n赢得长期信任').split('\n');
|
||||
const signals = (pageCopy?.trustSignals?.length ? pageCopy.trustSignals : TRUST_SIGNALS) as typeof TRUST_SIGNALS;
|
||||
const earlyLabel = pageCopy?.earlyAccessLabel || EARLY_ACCESS.label;
|
||||
const earlyDesc = pageCopy?.earlyAccessDesc || EARLY_ACCESS.desc;
|
||||
const earlyTitle = (pageCopy?.earlyAccessTitle as string) || '首批客户共创计划';
|
||||
const earlyCtaLabel = (pageCopy?.earlyAccessCtaLabel as string) || '成为共创客户';
|
||||
const earlyStatus = (pageCopy?.earlyAccessStatus?.length ? pageCopy.earlyAccessStatus : DEFAULT_EARLY_ACCESS_STATUS) as typeof DEFAULT_EARLY_ACCESS_STATUS;
|
||||
|
||||
return (
|
||||
<section className="relative py-20 sm:py-28 md:py-36 overflow-hidden bg-bg-secondary" data-testid="trust-section">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10">
|
||||
@@ -236,18 +286,16 @@ function TrustSection() {
|
||||
<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">
|
||||
值得信赖
|
||||
{eyebrow}
|
||||
</span>
|
||||
</div>
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-black text-ink tracking-tight leading-[1.05]">
|
||||
以可衡量的成果
|
||||
<br />
|
||||
赢得长期信任
|
||||
<StyledTitle lines={titleLines} />
|
||||
</h2>
|
||||
</ScrollReveal>
|
||||
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 mb-10">
|
||||
{TRUST_SIGNALS.map((item, i) => (
|
||||
{signals.map((item, i) => (
|
||||
<StaggerReveal key={i} staggerDelay={0.06}>
|
||||
<div className="bain-card p-6 sm:p-7 h-full flex flex-col">
|
||||
<div className="flex items-baseline gap-2 mb-3">
|
||||
@@ -265,24 +313,33 @@ function TrustSection() {
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* 首批客户共创标签:无真实案例时如实标注,不虚构客户 */}
|
||||
{/* 首批客户共创计划:如实呈现共创/内测/授权公开状态,不虚构客户 */}
|
||||
<StaggerReveal staggerDelay={0.08}>
|
||||
<div className="flex flex-col sm:flex-row sm:items-center gap-4 sm:gap-6 p-6 sm:p-8 bg-brand-bg border border-[rgba(196,30,58,0.15)]" data-testid="early-access-banner">
|
||||
<div>
|
||||
<div className="flex items-center gap-3 mb-1">
|
||||
<span className="text-[13px] tracking-[0.12em] font-semibold text-brand">
|
||||
{EARLY_ACCESS.label}
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-sm text-text-secondary leading-relaxed">
|
||||
{EARLY_ACCESS.desc}
|
||||
</p>
|
||||
<div className="p-6 sm:p-8 bg-brand-bg border border-[rgba(196,30,58,0.15)]" data-testid="early-access-banner">
|
||||
<div className="flex items-center gap-3 mb-4">
|
||||
<span className="text-[13px] tracking-[0.12em] font-semibold text-brand">
|
||||
{earlyLabel}
|
||||
</span>
|
||||
</div>
|
||||
<h3 className="text-xl sm:text-2xl font-bold text-ink mb-3">
|
||||
{earlyTitle}
|
||||
</h3>
|
||||
<p className="text-sm text-text-secondary leading-relaxed mb-6 max-w-2xl">
|
||||
{earlyDesc}
|
||||
</p>
|
||||
<div className="grid sm:grid-cols-3 gap-4 mb-8">
|
||||
{earlyStatus.map((s) => (
|
||||
<div key={s.label} className="p-4 bg-white border border-brand/10">
|
||||
<div className="text-sm font-semibold text-brand mb-1">{s.label}</div>
|
||||
<div className="text-xs text-text-secondary leading-relaxed">{s.desc}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<a
|
||||
href="/contact"
|
||||
className="group inline-flex shrink-0 items-center gap-2 text-sm font-semibold text-ink hover:text-brand transition-colors sm:ml-auto"
|
||||
className="group inline-flex shrink-0 items-center gap-2 text-sm font-semibold text-ink hover:text-brand transition-colors"
|
||||
>
|
||||
<span>成为首批共创客户</span>
|
||||
<span>{earlyCtaLabel}</span>
|
||||
<ArrowRight className="w-4 h-4 transition-transform duration-300 group-hover:translate-x-1" />
|
||||
</a>
|
||||
</div>
|
||||
@@ -317,20 +374,27 @@ const NARRATIVE_ACTS = [
|
||||
},
|
||||
];
|
||||
|
||||
function NarrativeSection() {
|
||||
function NarrativeSection({ pageCopy }: { pageCopy?: HomePageCopy | null }) {
|
||||
const narrativeTitle = (pageCopy?.narrativeTitle || '从问题到结果,\n一条可量化的路径').split('\n');
|
||||
const NARRATIVE_ACTS_CMS = (pageCopy?.narrativeActs?.length ? pageCopy.narrativeActs : NARRATIVE_ACTS) as Array<{
|
||||
number: string;
|
||||
title: string;
|
||||
desc: string;
|
||||
href: string;
|
||||
cta: string;
|
||||
}>;
|
||||
|
||||
return (
|
||||
<section className="relative py-20 sm:py-28 md:py-36 overflow-hidden bg-white" data-testid="narrative-section">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10">
|
||||
<ScrollReveal className="mb-16 sm:mb-20">
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-black text-ink tracking-tight leading-[1.05]">
|
||||
从问题到结果,
|
||||
<br />
|
||||
一条可量化的路径
|
||||
<StyledTitle lines={narrativeTitle} />
|
||||
</h2>
|
||||
</ScrollReveal>
|
||||
|
||||
<div className="grid md:grid-cols-3 gap-px bg-border-primary">
|
||||
{NARRATIVE_ACTS.map((act) => (
|
||||
{NARRATIVE_ACTS_CMS.map((act) => (
|
||||
<StaggerReveal key={act.number} staggerDelay={0.08}>
|
||||
<div className="group relative h-full bg-white p-8 sm:p-10 md:p-12 transition-colors duration-300 hover:bg-bg-secondary">
|
||||
<div className="flex items-start justify-between mb-8">
|
||||
@@ -363,7 +427,7 @@ function NarrativeSection() {
|
||||
}
|
||||
|
||||
// ===== 服务区:等宽三列卡片 + 兜底数据 =====
|
||||
function ServicesSection({ services }: { services?: Record<string, any>[] }) {
|
||||
function ServicesSection({ services, pageCopy }: { services?: Record<string, any>[]; pageCopy?: HomePageCopy | null }) {
|
||||
const hasValidData = services?.length && (services![0] as any)?.subtitle;
|
||||
const SERVICE_ITEMS = hasValidData
|
||||
? services!.map((s: Record<string, any>) => ({
|
||||
@@ -371,6 +435,7 @@ function ServicesSection({ services }: { services?: Record<string, any>[] }) {
|
||||
icon: SERVICE_ICON_MAP[s.icon as string] || <Server className="w-7 h-7" />,
|
||||
})) as Record<string, any>[]
|
||||
: FALLBACK_SERVICES;
|
||||
const servicesTitle = (pageCopy?.servicesTitle || '从战略到落地,\n可量化的一站式服务').split('\n');
|
||||
|
||||
return (
|
||||
<section className="relative py-20 sm:py-28 md:py-36 overflow-hidden bg-bg-secondary">
|
||||
@@ -378,9 +443,7 @@ function ServicesSection({ services }: { services?: Record<string, any>[] }) {
|
||||
<div className="max-w-3xl mb-16 sm:mb-20">
|
||||
<ScrollReveal>
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-black text-ink tracking-tight leading-[1.05]">
|
||||
从战略到落地,
|
||||
<br />
|
||||
可量化的一站式服务
|
||||
<StyledTitle lines={servicesTitle} />
|
||||
</h2>
|
||||
</ScrollReveal>
|
||||
</div>
|
||||
@@ -434,9 +497,14 @@ function ServicesSection({ services }: { services?: Record<string, any>[] }) {
|
||||
}
|
||||
|
||||
// ===== 案例区:轻量快照卡片 =====
|
||||
function CasesSection({ cases }: { cases?: Record<string, any>[] }) {
|
||||
function CasesSection({ cases, pageCopy }: { cases?: Record<string, any>[]; pageCopy?: HomePageCopy | null }) {
|
||||
const hasValidData = cases?.length && cases[0]?.metrics;
|
||||
const CASE_ITEMS = hasValidData ? cases! : [];
|
||||
const casesEyebrow = pageCopy?.casesEyebrow || '共创进行时';
|
||||
const casesTitleLines = (pageCopy?.casesTitle || '每一个项目,\n都以业务改善为衡量标准').split('\n');
|
||||
const casesDesc = pageCopy?.casesDescription || '我们正与首批客户共同打磨产品与方案,以真实运营数据验证业务改善。';
|
||||
const earlyLabel = pageCopy?.earlyAccessLabel || EARLY_ACCESS.label;
|
||||
const earlyDesc = pageCopy?.earlyAccessDesc || EARLY_ACCESS.desc;
|
||||
|
||||
if (CASE_ITEMS.length === 0) {
|
||||
return (
|
||||
@@ -447,18 +515,14 @@ function CasesSection({ cases }: { cases?: Record<string, any>[] }) {
|
||||
<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">
|
||||
共创进行时
|
||||
{casesEyebrow}
|
||||
</span>
|
||||
</div>
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-black text-ink tracking-tight leading-[1.05] mb-8">
|
||||
每一个项目,
|
||||
<br />
|
||||
都以业务改善为衡量标准
|
||||
<StyledTitle lines={casesTitleLines} />
|
||||
</h2>
|
||||
<p className="text-text-secondary leading-relaxed text-lg mb-8">
|
||||
我们正与首批客户共同打磨产品与方案,以真实运营数据验证业务改善。
|
||||
<br className="hidden sm:block" />
|
||||
公开案例将在验证后发布——合作成果,经得起衡量。
|
||||
{casesDesc}
|
||||
</p>
|
||||
<a
|
||||
href="/contact"
|
||||
@@ -471,9 +535,9 @@ function CasesSection({ cases }: { cases?: Record<string, any>[] }) {
|
||||
<ScrollReveal delay={0.15}>
|
||||
<div className="bain-card p-10 sm:p-12 bg-bg-secondary">
|
||||
<div className="text-5xl sm:text-6xl font-black text-brand tabular-nums leading-none mb-4">
|
||||
{EARLY_ACCESS.label}
|
||||
{earlyLabel}
|
||||
</div>
|
||||
<p className="text-text-secondary leading-relaxed">{EARLY_ACCESS.desc}</p>
|
||||
<p className="text-text-secondary leading-relaxed">{earlyDesc}</p>
|
||||
</div>
|
||||
</ScrollReveal>
|
||||
</div>
|
||||
@@ -488,9 +552,7 @@ function CasesSection({ cases }: { cases?: Record<string, any>[] }) {
|
||||
<div className="flex flex-col md:flex-row md:items-end md:justify-between gap-8 mb-16 sm:mb-20">
|
||||
<ScrollReveal className="md:max-w-3xl">
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-black text-ink tracking-tight leading-[1.05]">
|
||||
每一个项目,
|
||||
<br />
|
||||
都以业务改善为衡量标准
|
||||
<StyledTitle lines={casesTitleLines} />
|
||||
</h2>
|
||||
</ScrollReveal>
|
||||
<ScrollReveal delay={0.1}>
|
||||
@@ -553,10 +615,10 @@ function CasesSection({ cases }: { cases?: Record<string, any>[] }) {
|
||||
}
|
||||
|
||||
// ===== CTA 区:克制强调,品牌红仅用于按钮 =====
|
||||
function CTASection({ heroData }: { heroData?: Record<string, any> | null }) {
|
||||
const ctaTitleLine1 = heroData?.ctaTitleLine1 || '准备好开始了吗?';
|
||||
const ctaTitleLine2 = heroData?.ctaTitleLine2 || '让数据真正转化为业务增长';
|
||||
const ctaLabel = heroData?.ctaLabel || '预约咨询';
|
||||
function CTASection({ heroData, pageCopy }: { heroData?: Record<string, any> | null; pageCopy?: HomePageCopy | null }) {
|
||||
const ctaTitleLine1 = heroData?.ctaTitleLine1 || pageCopy?.ctaTitleLine1 || '准备好开始了吗?';
|
||||
const ctaTitleLine2 = heroData?.ctaTitleLine2 || pageCopy?.ctaTitleLine2 || '让数据真正转化为业务增长';
|
||||
const ctaLabel = heroData?.ctaLabel || pageCopy?.ctaLabel || '预约咨询';
|
||||
const ctaHref = heroData?.ctaHref || '/contact';
|
||||
|
||||
return (
|
||||
@@ -576,11 +638,12 @@ function CTASection({ heroData }: { heroData?: Record<string, any> | null }) {
|
||||
}
|
||||
|
||||
// ===== 主页面组件 =====
|
||||
export default function HomeContentV14({ services, cases, stats, heroData }: {
|
||||
export default function HomeContentV14({ services, cases, stats, heroData, pageCopy }: {
|
||||
services?: Record<string, any>[];
|
||||
cases?: Record<string, any>[];
|
||||
stats?: Record<string, any>[];
|
||||
heroData?: Record<string, any> | null;
|
||||
pageCopy?: HomePageCopy | null;
|
||||
}) {
|
||||
return (
|
||||
<main>
|
||||
@@ -588,19 +651,19 @@ export default function HomeContentV14({ services, cases, stats, heroData }: {
|
||||
<HeroSection heroData={heroData} stats={stats} />
|
||||
|
||||
{/* 2. 信任区:量化数据成果展示 */}
|
||||
<TrustSection />
|
||||
<TrustSection pageCopy={pageCopy} />
|
||||
|
||||
{/* 3. 章节式叙事:问题 → 方法 → 结果 */}
|
||||
<NarrativeSection />
|
||||
<NarrativeSection pageCopy={pageCopy} />
|
||||
|
||||
{/* 4. 服务区:等宽卡片 + 兜底数据 */}
|
||||
<ServicesSection services={services} />
|
||||
<ServicesSection services={services} pageCopy={pageCopy} />
|
||||
|
||||
{/* 5. 案例区:轻量快照卡片 */}
|
||||
<CasesSection cases={cases} />
|
||||
<CasesSection cases={cases} pageCopy={pageCopy} />
|
||||
|
||||
{/* 6. CTA:克制强调,品牌红仅用于按钮 */}
|
||||
<CTASection heroData={heroData} />
|
||||
<CTASection heroData={heroData} pageCopy={pageCopy} />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
@@ -74,12 +74,18 @@ function NewsCard({ newsItem, index }: { newsItem: NewsItem; index: number }) {
|
||||
);
|
||||
}
|
||||
|
||||
export default function NewsContentV3({ news }: { news?: NewsItem[] }) {
|
||||
export default function NewsContentV3({ news, pageCopy }: { news?: NewsItem[]; pageCopy?: Record<string, unknown> | null }) {
|
||||
const NEWS = news ?? [];
|
||||
const [selectedCategory, setSelectedCategory] = useState('全部');
|
||||
const [searchQuery, setSearchQuery] = useState('');
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
|
||||
const heroEyebrow = (pageCopy?.newsPageHeroEyebrow as string) || 'News & Insights';
|
||||
const heroTitleLines = ((pageCopy?.newsPageHeroTitle as string) || '新闻与\n洞察').split('\n');
|
||||
const heroDescription = (pageCopy?.newsPageHeroDescription as string) || `${COMPANY_INFO.displayName}最新动态、产品更新与行业洞察。了解数字化趋势,把握技术脉搏。`;
|
||||
const emptyTitle = (pageCopy?.newsPageEmptyTitle as string) || '没有找到相关新闻';
|
||||
const emptyDescription = (pageCopy?.newsPageEmptyDescription as string) || '试试其他关键词或分类';
|
||||
|
||||
const filteredNews = useMemo(() => {
|
||||
return NEWS.filter((newsItem) => {
|
||||
const matchesCategory = selectedCategory === '全部' || newsItem.category === selectedCategory;
|
||||
@@ -118,19 +124,22 @@ export default function NewsContentV3({ news }: { news?: NewsItem[] }) {
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10 w-full py-28 sm:py-36 md:py-44 lg:py-56">
|
||||
<div className="max-w-4xl">
|
||||
<ScrollReveal>
|
||||
<SectionLabel>News & Insights</SectionLabel>
|
||||
<SectionLabel>{heroEyebrow}</SectionLabel>
|
||||
</ScrollReveal>
|
||||
|
||||
<ScrollReveal delay={0.1}>
|
||||
<h1 className="text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl font-bold leading-[0.92] tracking-tighter mb-10 sm:mb-12 md:mb-16">
|
||||
新闻与
|
||||
<span className="block mt-4 text-brand">洞察</span>
|
||||
{heroTitleLines.map((line, i) => (
|
||||
<span key={i} className={i === heroTitleLines.length - 1 ? 'block mt-4 text-brand' : 'block'}>
|
||||
{line}
|
||||
</span>
|
||||
))}
|
||||
</h1>
|
||||
</ScrollReveal>
|
||||
|
||||
<ScrollReveal delay={0.2}>
|
||||
<p className="text-lg md:text-xl text-text-secondary max-w-2xl leading-relaxed">
|
||||
{COMPANY_INFO.displayName}最新动态、产品更新与行业洞察。了解数字化趋势,把握技术脉搏。
|
||||
{heroDescription}
|
||||
</p>
|
||||
</ScrollReveal>
|
||||
</div>
|
||||
@@ -173,8 +182,8 @@ export default function NewsContentV3({ news }: { news?: NewsItem[] }) {
|
||||
<ScrollReveal>
|
||||
<div className="text-center py-24">
|
||||
<Newspaper className="w-16 h-16 text-text-muted/20 mx-auto mb-6" />
|
||||
<p className="text-xl text-text-secondary">没有找到相关新闻</p>
|
||||
<p className="mt-2 text-text-muted">试试其他关键词或分类</p>
|
||||
<p className="text-xl text-text-secondary">{emptyTitle}</p>
|
||||
<p className="mt-2 text-text-muted">{emptyDescription}</p>
|
||||
</div>
|
||||
</ScrollReveal>
|
||||
) : (
|
||||
|
||||
@@ -4,6 +4,7 @@ import NewsListPage from './page';
|
||||
|
||||
jest.mock('@/lib/cms/data-server', () => ({
|
||||
getPublishedItems: jest.fn(),
|
||||
getPageCopy: jest.fn().mockResolvedValue(null),
|
||||
}));
|
||||
|
||||
jest.mock('./news-content-v3', () => ({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Metadata } from 'next';
|
||||
import { COMPANY_INFO } from '@/lib/constants';
|
||||
import { getPublishedItems } from '@/lib/cms/data-server';
|
||||
import { getPublishedItems, getPageCopy } from '@/lib/cms/data-server';
|
||||
import type { NewsItem } from '@/lib/constants/news';
|
||||
import NewsContentV3 from './news-content-v3';
|
||||
|
||||
@@ -13,7 +13,10 @@ export const metadata: Metadata = {
|
||||
export const revalidate = 3600;
|
||||
|
||||
export default async function NewsListPage() {
|
||||
const items = await getPublishedItems('news');
|
||||
const [items, pageCopy] = await Promise.all([
|
||||
getPublishedItems('news'),
|
||||
getPageCopy('news').catch(() => null),
|
||||
]);
|
||||
const news = items.map((item) => ({ ...item.data, title: item.data.title || item.title } as unknown as NewsItem));
|
||||
return <NewsContentV3 news={news} />;
|
||||
return <NewsContentV3 news={news} pageCopy={pageCopy?.data ?? null} />;
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import HomePage from './page';
|
||||
jest.mock('@/lib/cms/data-server', () => ({
|
||||
getPublishedItems: jest.fn(),
|
||||
getResolvedHomeZones: jest.fn(),
|
||||
getHomePageCopy: jest.fn(),
|
||||
}));
|
||||
|
||||
jest.mock('./home-content-v14', () => ({
|
||||
@@ -16,15 +17,17 @@ jest.mock('./home-content-v14', () => ({
|
||||
<div data-testid="cases-count">{(props.cases as unknown[])?.length ?? 0}</div>
|
||||
<div data-testid="stats-count">{(props.stats as unknown[])?.length ?? 0}</div>
|
||||
<div data-testid="hero-data">{props.heroData ? JSON.stringify(props.heroData) : 'null'}</div>
|
||||
<div data-testid="page-copy-data">{props.pageCopy ? JSON.stringify(props.pageCopy) : 'null'}</div>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
}));
|
||||
|
||||
import { getPublishedItems, getResolvedHomeZones } from '@/lib/cms/data-server';
|
||||
import { getPublishedItems, getResolvedHomeZones, getHomePageCopy } from '@/lib/cms/data-server';
|
||||
|
||||
const mockedGetResolvedHomeZones = getResolvedHomeZones as jest.MockedFunction<typeof getResolvedHomeZones>;
|
||||
const mockedGetPublishedItems = getPublishedItems as jest.MockedFunction<typeof getPublishedItems>;
|
||||
const mockedGetHomePageCopy = getHomePageCopy as jest.MockedFunction<typeof getHomePageCopy>;
|
||||
|
||||
const createMockItem = (modelCode: string, data: Record<string, unknown>) => ({
|
||||
id: `${modelCode}-id`,
|
||||
@@ -48,6 +51,7 @@ describe('HomePage', () => {
|
||||
jest.clearAllMocks();
|
||||
mockedGetResolvedHomeZones.mockResolvedValue({});
|
||||
mockedGetPublishedItems.mockResolvedValue([]);
|
||||
mockedGetHomePageCopy.mockResolvedValue(null);
|
||||
});
|
||||
|
||||
it('renders home content from resolved zones', async () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getPublishedItems, getResolvedHomeZones } from '@/lib/cms/data-server';
|
||||
import { getPublishedItems, getResolvedHomeZones, getHomePageCopy } from '@/lib/cms/data-server';
|
||||
import HomeContentV14 from './home-content-v14';
|
||||
|
||||
export const revalidate = 3600;
|
||||
@@ -31,5 +31,14 @@ export default async function HomePage() {
|
||||
heroData = heroItems[0]?.data ?? null;
|
||||
}
|
||||
|
||||
return <HomeContentV14 services={services} cases={cases} stats={stats} heroData={heroData} />;
|
||||
// 首页各章节结构性文案(信任信号/叙事情节/标题/CTA),CMS 未配置时为 null(组件内部兜底)
|
||||
const homePageCopy = await getHomePageCopy().catch(() => null);
|
||||
|
||||
return <HomeContentV14
|
||||
services={services}
|
||||
cases={cases}
|
||||
stats={stats}
|
||||
heroData={heroData}
|
||||
pageCopy={homePageCopy?.data ?? null}
|
||||
/>;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import ProductsPage from './page';
|
||||
|
||||
jest.mock('@/lib/cms/data-server', () => ({
|
||||
getPublishedItems: jest.fn(),
|
||||
getPageCopy: jest.fn().mockResolvedValue(null),
|
||||
}));
|
||||
|
||||
jest.mock('./products-content-v3', () => ({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Metadata } from 'next';
|
||||
import { COMPANY_INFO } from '@/lib/constants';
|
||||
import { getPublishedItems } from '@/lib/cms/data-server';
|
||||
import { getPublishedItems, getPageCopy } from '@/lib/cms/data-server';
|
||||
import type { Product } from '@/lib/constants/products';
|
||||
import ProductsContentV3 from './products-content-v3';
|
||||
|
||||
@@ -12,9 +12,10 @@ export const metadata: Metadata = {
|
||||
export const revalidate = 3600;
|
||||
|
||||
export default async function ProductsPage() {
|
||||
const [items, standaloneItems] = await Promise.all([
|
||||
const [items, standaloneItems, pageCopy] = await Promise.all([
|
||||
getPublishedItems('product'),
|
||||
getPublishedItems('standalone-product'),
|
||||
getPageCopy('products').catch(() => null),
|
||||
]);
|
||||
const products = items.map((item) => ({ ...item.data, id: item.data.id || item.id, slug: item.data.slug || item.slug, title: item.data.title || item.title } as unknown as Product));
|
||||
const standaloneProducts = standaloneItems.map((item) => ({
|
||||
@@ -25,5 +26,5 @@ export default async function ProductsPage() {
|
||||
categoryId: 'specialized',
|
||||
bundle: 'standalone',
|
||||
} as unknown as Product));
|
||||
return <ProductsContentV3 products={[...products, ...standaloneProducts]} />;
|
||||
return <ProductsContentV3 products={[...products, ...standaloneProducts]} pageCopy={pageCopy?.data ?? null} />;
|
||||
}
|
||||
@@ -14,6 +14,8 @@ import { cn } from '@/lib/utils';
|
||||
|
||||
const EASE_SPRING = { type: 'spring', stiffness: 300, damping: 30 } as const;
|
||||
|
||||
type PageCopy = Record<string, unknown>;
|
||||
|
||||
const PRODUCT_ICONS: Record<string, React.ReactNode> = {
|
||||
'睿新ERP管理系统': <Package className="w-5 h-5" />,
|
||||
'睿新商业智能分析平台': <TrendingUp className="w-5 h-5" />,
|
||||
@@ -75,10 +77,18 @@ function StatItem({ value, suffix, label, start, delay }: { value: number; suffi
|
||||
);
|
||||
}
|
||||
|
||||
function HeroSection() {
|
||||
function HeroSection({ pageCopy }: { pageCopy?: PageCopy | null }) {
|
||||
const statsRef = useRef(null);
|
||||
const isInView = useInView(statsRef, { once: true, margin: '-100px' });
|
||||
|
||||
const heroTitle1 = (pageCopy?.productsHeroTitle1 as string) || '自研产品矩阵';
|
||||
const heroTitle2 = (pageCopy?.productsHeroTitle2 as string) || '支撑企业';
|
||||
const heroTitle3 = (pageCopy?.productsHeroTitle3 as string) || '数字化核心系统';
|
||||
const heroDescriptionLines = ((pageCopy?.productsHeroDescription as string) ||
|
||||
'从业务系统到数据智能,深度自研、互为补充。\n6 大企业套装与专业产品线,覆盖企业数字化核心场景。').split('\n');
|
||||
const ctaPrimary = (pageCopy?.productsCtaPrimary as string) || '了解我们的服务';
|
||||
const ctaSecondary = (pageCopy?.productsCtaSecondary as string) || '查看行业方案';
|
||||
|
||||
return (
|
||||
<section className="relative min-h-[85vh] flex items-center overflow-hidden bg-white">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10 w-full py-24 sm:py-28 md:py-32 lg:py-40">
|
||||
@@ -89,10 +99,10 @@ function HeroSection() {
|
||||
transition={{ duration: 1.2, delay: 0.15, ease: EASE_OUT }}
|
||||
className="text-4xl sm:text-5xl md:text-6xl lg:text-7xl font-bold text-ink leading-[0.92] tracking-tighter mb-8 sm:mb-10 md:mb-12"
|
||||
>
|
||||
<div className="block">自研产品矩阵</div>
|
||||
<div className="block">{heroTitle1}</div>
|
||||
<div className="block mt-5">
|
||||
<span className="relative inline-block">
|
||||
<span className="text-brand font-extrabold">支撑企业</span>
|
||||
<span className="text-brand font-extrabold">{heroTitle2}</span>
|
||||
<motion.span
|
||||
className="absolute -bottom-3 left-0 w-full h-[3px] bg-brand"
|
||||
style={{ transformOrigin: 'left' }}
|
||||
@@ -102,7 +112,7 @@ function HeroSection() {
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
<div className="block mt-5">数字化核心系统</div>
|
||||
<div className="block mt-5">{heroTitle3}</div>
|
||||
</motion.h1>
|
||||
|
||||
<motion.p
|
||||
@@ -111,8 +121,12 @@ function HeroSection() {
|
||||
transition={{ duration: 1, delay: 0.45, ease: EASE_OUT }}
|
||||
className="text-lg sm:text-xl lg:text-2xl text-text-secondary max-w-2xl leading-relaxed mb-8 sm:mb-10 md:mb-12"
|
||||
>
|
||||
从业务系统到数据智能,深度自研、互为补充。
|
||||
6 大企业套装与专业产品线,覆盖企业数字化核心场景。
|
||||
{heroDescriptionLines.map((line, i) => (
|
||||
<span key={i}>
|
||||
{i > 0 && <br className="hidden sm:block" />}
|
||||
{line}
|
||||
</span>
|
||||
))}
|
||||
</motion.p>
|
||||
|
||||
<motion.div
|
||||
@@ -123,12 +137,12 @@ function HeroSection() {
|
||||
>
|
||||
<Button size="xl" asChild>
|
||||
<a href="/services">
|
||||
了解我们的服务
|
||||
{ctaPrimary}
|
||||
<ArrowRight className="w-5 h-5 ml-2" />
|
||||
</a>
|
||||
</Button>
|
||||
<Button size="xl" variant="outline" asChild>
|
||||
<a href="/solutions">查看行业方案</a>
|
||||
<a href="/solutions">{ctaSecondary}</a>
|
||||
</Button>
|
||||
</motion.div>
|
||||
|
||||
@@ -214,9 +228,12 @@ function ProductCard({ product, size = 'small' }: { product: Product; size?: 'la
|
||||
);
|
||||
}
|
||||
|
||||
function BundleOverview({ products }: { products: Product[] }) {
|
||||
function BundleOverview({ products, pageCopy }: { products: Product[]; pageCopy?: PageCopy | null }) {
|
||||
const enterpriseProducts = products.filter((p) => p.bundle === 'enterprise');
|
||||
const standaloneProducts = products.filter((p) => p.bundle === 'standalone');
|
||||
const bundleTitle = (pageCopy?.productsBundleTitle as string) || '两套产品体系\n覆盖不同场景';
|
||||
const bundleTitleLines = bundleTitle.split('\n');
|
||||
const bundleDescription = (pageCopy?.productsBundleDescription as string) || '企业套装以组合形式解决核心管理问题,专业产品聚焦独立场景深度赋能。';
|
||||
|
||||
return (
|
||||
<section className="relative py-20 sm:py-28 md:py-36 lg:py-44 overflow-hidden bg-white">
|
||||
@@ -225,10 +242,14 @@ function BundleOverview({ products }: { products: Product[] }) {
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10">
|
||||
<ScrollReveal className="max-w-3xl mb-12 sm:mb-16 md:mb-20">
|
||||
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-extrabold text-ink tracking-tight leading-[0.95] mb-6">
|
||||
两套产品体系,<span className="text-brand">覆盖不同场景</span>
|
||||
{bundleTitleLines.map((line, i) => (
|
||||
<span key={i} className={i === bundleTitleLines.length - 1 ? 'block text-brand' : 'block'}>
|
||||
{line}
|
||||
</span>
|
||||
))}
|
||||
</h2>
|
||||
<p className="text-lg text-text-secondary leading-relaxed">
|
||||
企业套装以组合形式解决核心管理问题,专业产品聚焦独立场景深度赋能。
|
||||
{bundleDescription}
|
||||
</p>
|
||||
</ScrollReveal>
|
||||
|
||||
@@ -453,7 +474,9 @@ function SuiteCombosSection({ products }: { products: Product[] }) {
|
||||
);
|
||||
}
|
||||
|
||||
function CTASection() {
|
||||
function CTASection({ pageCopy }: { pageCopy?: PageCopy | null }) {
|
||||
const ctaTitleLines = ((pageCopy?.productsCtaTitle as string) || '以自研产品\n支撑数字化落地').split('\n');
|
||||
const ctaDescription = (pageCopy?.productsCtaDescription as string) || '从企业套装到专业产品,以自研能力与专业服务,陪伴企业完成数字化升级。';
|
||||
return (
|
||||
<section className="relative py-20 sm:py-28 md:py-36 lg:py-44 overflow-hidden bg-white">
|
||||
<div className="absolute top-0 left-0 right-0 h-px bg-border-primary" />
|
||||
@@ -462,13 +485,15 @@ function CTASection() {
|
||||
<div className="max-w-container mx-auto px-6 lg:px-10 relative z-10">
|
||||
<ScrollReveal className="text-center max-w-3xl mx-auto">
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-ink tracking-tight leading-tight mb-6 sm:mb-8">
|
||||
以<span className="text-brand">自研产品</span><br />
|
||||
支撑数字化落地
|
||||
{ctaTitleLines.map((line, i) => (
|
||||
<span key={i} className={i === ctaTitleLines.length - 1 ? 'block text-brand' : 'block'}>
|
||||
{line}
|
||||
</span>
|
||||
))}
|
||||
</h2>
|
||||
|
||||
<p className="text-xl text-text-secondary mb-12 max-w-2xl mx-auto leading-relaxed">
|
||||
从企业套装到专业产品,以自研能力与专业服务,
|
||||
陪伴企业完成数字化升级。
|
||||
{ctaDescription}
|
||||
</p>
|
||||
|
||||
<div className="flex flex-wrap justify-center gap-6">
|
||||
@@ -488,17 +513,17 @@ function CTASection() {
|
||||
);
|
||||
}
|
||||
|
||||
export default function ProductsContentV3({ products: productsProp }: { products?: Product[] }) {
|
||||
export default function ProductsContentV3({ products: productsProp, pageCopy }: { products?: Product[]; pageCopy?: PageCopy | null }) {
|
||||
const products = productsProp ?? [];
|
||||
|
||||
return (
|
||||
<main>
|
||||
<HeroSection />
|
||||
<BundleOverview products={products} />
|
||||
<HeroSection pageCopy={pageCopy} />
|
||||
<BundleOverview products={products} pageCopy={pageCopy} />
|
||||
<EnterpriseProductsSection products={products} />
|
||||
<SpecializedProductsSection products={products} />
|
||||
<SuiteCombosSection products={products} />
|
||||
<CTASection />
|
||||
<CTASection pageCopy={pageCopy} />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import ServicesPage from './page';
|
||||
|
||||
jest.mock('@/lib/cms/data-server', () => ({
|
||||
getPublishedItems: jest.fn(),
|
||||
getPageCopy: jest.fn().mockResolvedValue(null),
|
||||
}));
|
||||
|
||||
jest.mock('./services-content-v3', () => ({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Metadata } from 'next';
|
||||
import { COMPANY_INFO } from '@/lib/constants';
|
||||
import { getPublishedItems } from '@/lib/cms/data-server';
|
||||
import { getPublishedItems, getPageCopy } from '@/lib/cms/data-server';
|
||||
import type { Service } from '@/lib/constants/services';
|
||||
import ServicesContentV3 from './services-content-v3';
|
||||
|
||||
@@ -15,5 +15,7 @@ export const revalidate = 3600;
|
||||
export default async function ServicesPage() {
|
||||
const items = await getPublishedItems('service');
|
||||
const services = items.map((item) => ({ ...item.data, id: item.data.id || item.id, slug: item.data.slug || item.slug, title: item.data.title || item.title } as unknown as Service));
|
||||
return <ServicesContentV3 services={services} />;
|
||||
// 服务页结构性文案(Hero/区块标题/CTA/空状态),CMS 未配置时组件内部兜底
|
||||
const pageCopy = await getPageCopy('services').catch(() => null);
|
||||
return <ServicesContentV3 services={services} pageCopy={pageCopy?.data ?? null} />;
|
||||
}
|
||||
@@ -69,7 +69,16 @@ const SERVICE_MODES = [
|
||||
},
|
||||
];
|
||||
|
||||
function HeroSection() {
|
||||
type PageCopy = Record<string, unknown>;
|
||||
|
||||
function HeroSection({ pageCopy }: { pageCopy?: PageCopy | null }) {
|
||||
const heroTitle1 = (pageCopy?.servicesHeroTitle1 as string) || '从规划到运维';
|
||||
const heroTitle2 = (pageCopy?.servicesHeroTitle2 as string) || '全程陪伴';
|
||||
const heroDescriptionLines = ((pageCopy?.servicesHeroDescription as string) ||
|
||||
'不只是技术供应商,更是您数字化转型的同行者。\n从第一次沟通到系统稳定运行,我们始终在您身边。').split('\n');
|
||||
const ctaPrimary = (pageCopy?.servicesCtaPrimary as string) || '聊聊您的需求';
|
||||
const ctaSecondary = (pageCopy?.servicesCtaSecondary as string) || '查看产品矩阵';
|
||||
|
||||
return (
|
||||
<section className="relative min-h-[85vh] flex items-center overflow-hidden bg-white">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10 w-full py-28 sm:py-36 md:py-44 lg:py-56">
|
||||
@@ -80,11 +89,11 @@ function HeroSection() {
|
||||
transition={{ duration: 1, delay: 0.2, ease: EASE_OUT }}
|
||||
className="text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl font-black text-ink leading-[0.92] tracking-tightest mb-10 sm:mb-12 md:mb-16"
|
||||
>
|
||||
<div className="block">从规划到运维</div>
|
||||
<div className="block">{heroTitle1}</div>
|
||||
<div className="block mt-4 sm:mt-6">
|
||||
<span className="relative inline-block">
|
||||
<span className="relative text-brand font-black">
|
||||
全程陪伴
|
||||
{heroTitle2}
|
||||
<motion.span
|
||||
className="absolute -bottom-2 left-0 w-full h-[3px] bg-brand"
|
||||
style={{ transformOrigin: 'left' }}
|
||||
@@ -103,9 +112,12 @@ function HeroSection() {
|
||||
transition={{ duration: 0.8, delay: 0.5, ease: EASE_OUT }}
|
||||
className="text-lg md:text-xl text-text-secondary max-w-2xl leading-relaxed mb-12 sm:mb-16"
|
||||
>
|
||||
不只是技术供应商,更是您数字化转型的同行者。
|
||||
<br className="hidden sm:block" />
|
||||
从第一次沟通到系统稳定运行,我们始终在您身边。
|
||||
{heroDescriptionLines.map((line, i) => (
|
||||
<span key={i}>
|
||||
{i > 0 && <br className="hidden sm:block" />}
|
||||
{line}
|
||||
</span>
|
||||
))}
|
||||
</motion.p>
|
||||
|
||||
<motion.div
|
||||
@@ -118,14 +130,14 @@ function HeroSection() {
|
||||
href="/contact"
|
||||
className="group inline-flex items-center justify-center gap-3 px-10 py-5 font-semibold text-base bg-brand text-white transition-all duration-300 hover:bg-brand/90 min-h-[52px] touch-manipulation"
|
||||
>
|
||||
聊聊您的需求
|
||||
{ctaPrimary}
|
||||
<ArrowUpRight className="w-4 h-4 transition-transform duration-300 group-hover:translate-x-0.5 group-hover:-translate-y-0.5" />
|
||||
</a>
|
||||
<a
|
||||
href="/products"
|
||||
className="inline-flex items-center justify-center gap-3 px-10 py-5 font-semibold text-base text-ink border border-border-primary hover:border-ink/30 transition-all duration-300 min-h-[52px] touch-manipulation"
|
||||
>
|
||||
查看产品矩阵
|
||||
{ctaSecondary}
|
||||
</a>
|
||||
</motion.div>
|
||||
|
||||
@@ -160,15 +172,17 @@ function HeroSection() {
|
||||
);
|
||||
}
|
||||
|
||||
function ServicesGridSection({ services }: { services?: Service[] }) {
|
||||
function ServicesGridSection({ services, pageCopy }: { services?: Service[]; pageCopy?: PageCopy | null }) {
|
||||
const displayServices = services?.length ? mapServicesToCards(services) : [];
|
||||
const gridTitle = (pageCopy?.servicesGridTitle as string) || '四大核心服务,覆盖数字化全链路';
|
||||
const emptyState = (pageCopy?.servicesEmptyState as string) || '暂无服务数据';
|
||||
if (displayServices.length === 0) {
|
||||
return (
|
||||
<section className="relative py-20 sm:py-28 md:py-36 lg:py-44 overflow-hidden bg-bg-secondary">
|
||||
<div className="absolute top-0 left-0 right-0 h-px bg-border-primary" />
|
||||
<div className="absolute bottom-0 left-0 right-0 h-px bg-border-primary" />
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 text-center">
|
||||
<p className="text-text-muted text-lg">暂无服务数据</p>
|
||||
<p className="text-text-muted text-lg">{emptyState}</p>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
@@ -187,7 +201,7 @@ function ServicesGridSection({ services }: { services?: Service[] }) {
|
||||
className="max-w-3xl mb-16 sm:mb-20 md:mb-24"
|
||||
>
|
||||
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-extrabold text-ink tracking-tight leading-[0.95]">
|
||||
四大核心服务,<br className="sm:hidden" />覆盖数字化全链路
|
||||
{gridTitle}
|
||||
</h2>
|
||||
</motion.div>
|
||||
|
||||
@@ -321,7 +335,11 @@ function ProcessModesSection() {
|
||||
);
|
||||
}
|
||||
|
||||
function CTASection() {
|
||||
function CTASection({ pageCopy }: { pageCopy?: PageCopy | null }) {
|
||||
const ctaTitle = (pageCopy?.servicesCtaTitle as string) || '准备好开始了吗?';
|
||||
const ctaDescriptionLines = ((pageCopy?.servicesCtaDescription as string) ||
|
||||
'无论是一个明确的项目,还是一个模糊的想法,我们都愿意坐下来和您一起理清楚。\n首次咨询免费,没有任何销售压力。').split('\n');
|
||||
|
||||
return (
|
||||
<section className="relative py-20 sm:py-28 md:py-36 lg:py-44 overflow-hidden bg-bg-secondary">
|
||||
<div className="absolute top-0 left-0 right-0 h-px bg-border-primary" />
|
||||
@@ -335,12 +353,15 @@ function CTASection() {
|
||||
className="max-w-3xl"
|
||||
>
|
||||
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-extrabold text-ink tracking-tight leading-[0.95] mb-8">
|
||||
准备好开始了吗?
|
||||
{ctaTitle}
|
||||
</h2>
|
||||
<p className="text-lg text-text-secondary leading-relaxed mb-10">
|
||||
无论是一个明确的项目,还是一个模糊的想法,我们都愿意坐下来和您一起理清楚。
|
||||
<br className="hidden sm:block" />
|
||||
首次咨询免费,没有任何销售压力。
|
||||
{ctaDescriptionLines.map((line, i) => (
|
||||
<span key={i}>
|
||||
{i > 0 && <br className="hidden sm:block" />}
|
||||
{line}
|
||||
</span>
|
||||
))}
|
||||
</p>
|
||||
<div className="flex flex-col sm:flex-row gap-4 sm:gap-6">
|
||||
<a
|
||||
@@ -363,13 +384,13 @@ function CTASection() {
|
||||
);
|
||||
}
|
||||
|
||||
export default function ServicesContentV3({ services }: { services?: Service[] }) {
|
||||
export default function ServicesContentV3({ services, pageCopy }: { services?: Service[]; pageCopy?: PageCopy | null }) {
|
||||
return (
|
||||
<main className="bg-white text-ink">
|
||||
<HeroSection />
|
||||
<ServicesGridSection services={services} />
|
||||
<HeroSection pageCopy={pageCopy} />
|
||||
<ServicesGridSection services={services} pageCopy={pageCopy} />
|
||||
<ProcessModesSection />
|
||||
<CTASection />
|
||||
<CTASection pageCopy={pageCopy} />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import SolutionsPage from './page';
|
||||
|
||||
jest.mock('@/lib/cms/data-server', () => ({
|
||||
getPublishedItems: jest.fn(),
|
||||
getPageCopy: jest.fn().mockResolvedValue(null),
|
||||
}));
|
||||
|
||||
jest.mock('./solutions-content-v3', () => ({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Metadata } from 'next';
|
||||
import { COMPANY_INFO } from '@/lib/constants';
|
||||
import { getPublishedItems } from '@/lib/cms/data-server';
|
||||
import { getPublishedItems, getPageCopy } from '@/lib/cms/data-server';
|
||||
import type { Solution } from '@/lib/constants/solutions';
|
||||
import type { Product } from '@/lib/constants/products';
|
||||
import SolutionsContentV3 from './solutions-content-v3';
|
||||
@@ -13,11 +13,12 @@ export const metadata: Metadata = {
|
||||
export const revalidate = 3600;
|
||||
|
||||
export default async function SolutionsPage() {
|
||||
const [solutionItems, productItems] = await Promise.all([
|
||||
const [solutionItems, productItems, pageCopy] = await Promise.all([
|
||||
getPublishedItems('solution'),
|
||||
getPublishedItems('product'),
|
||||
getPageCopy('solutions').catch(() => null),
|
||||
]);
|
||||
const solutions = solutionItems.map((item) => ({ ...item.data, id: item.data.id || item.id, slug: item.data.slug || item.slug, title: item.data.title || item.title } as unknown as Solution));
|
||||
const products = productItems.map((item) => ({ ...item.data, id: item.data.id || item.id, slug: item.data.slug || item.slug, title: item.data.title || item.title } as unknown as Product));
|
||||
return <SolutionsContentV3 solutions={solutions} products={products} />;
|
||||
return <SolutionsContentV3 solutions={solutions} products={products} pageCopy={pageCopy?.data ?? null} />;
|
||||
}
|
||||
@@ -8,6 +8,8 @@ import type { Product } from '@/lib/constants/products';
|
||||
|
||||
const EASE_OUT = [0.22, 1, 0.36, 1] as const;
|
||||
|
||||
type PageCopy = Record<string, unknown>;
|
||||
|
||||
const INDUSTRY_ICONS: Record<string, LucideIcon> = {
|
||||
制造业: Factory,
|
||||
贸易零售: ShoppingCart,
|
||||
@@ -17,7 +19,14 @@ const INDUSTRY_ICONS: Record<string, LucideIcon> = {
|
||||
物流运输: Truck,
|
||||
};
|
||||
|
||||
function HeroSection() {
|
||||
function HeroSection({ pageCopy }: { pageCopy?: PageCopy | null }) {
|
||||
const heroTitle1 = (pageCopy?.solutionsHeroTitle1 as string) || '专注行业场景的';
|
||||
const heroTitle2 = (pageCopy?.solutionsHeroTitle2 as string) || '解决方案';
|
||||
const heroDescriptionLines = ((pageCopy?.solutionsHeroDescription as string) ||
|
||||
'端到端交付可量化的业务成果。\n基于自研产品矩阵,为制造、零售、教育、医疗、金融、物流六大行业沉淀最佳实践。').split('\n');
|
||||
const ctaPrimary = (pageCopy?.solutionsCtaPrimary as string) || '立即咨询';
|
||||
const ctaSecondary = (pageCopy?.solutionsCtaSecondary as string) || '浏览产品';
|
||||
|
||||
return (
|
||||
<section className="relative min-h-[85vh] flex items-center overflow-hidden bg-white">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10 w-full py-28 sm:py-36 md:py-44 lg:py-56">
|
||||
@@ -28,11 +37,11 @@ function HeroSection() {
|
||||
transition={{ duration: 1, delay: 0.2, ease: EASE_OUT }}
|
||||
className="text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl font-black text-ink leading-[0.92] tracking-tightest mb-10 sm:mb-12 md:mb-16"
|
||||
>
|
||||
<div className="block">专注行业场景的</div>
|
||||
<div className="block">{heroTitle1}</div>
|
||||
<div className="block mt-4 sm:mt-6">
|
||||
<span className="relative inline-block">
|
||||
<span className="relative text-brand font-black">
|
||||
解决方案
|
||||
{heroTitle2}
|
||||
<motion.span
|
||||
className="absolute -bottom-2 left-0 w-full h-[3px] bg-brand"
|
||||
style={{ transformOrigin: 'left' }}
|
||||
@@ -51,9 +60,12 @@ function HeroSection() {
|
||||
transition={{ duration: 0.8, delay: 0.5, ease: EASE_OUT }}
|
||||
className="text-lg md:text-xl text-text-secondary max-w-2xl leading-relaxed mb-12 sm:mb-16"
|
||||
>
|
||||
端到端交付可量化的业务成果。
|
||||
<br className="hidden sm:block" />
|
||||
基于自研产品矩阵,为制造、零售、教育、医疗、金融、物流六大行业沉淀最佳实践。
|
||||
{heroDescriptionLines.map((line, i) => (
|
||||
<span key={i}>
|
||||
{i > 0 && <br className="hidden sm:block" />}
|
||||
{line}
|
||||
</span>
|
||||
))}
|
||||
</motion.p>
|
||||
|
||||
<motion.div
|
||||
@@ -66,14 +78,14 @@ function HeroSection() {
|
||||
href="/contact"
|
||||
className="group inline-flex items-center justify-center gap-3 px-10 py-5 font-semibold text-base bg-brand text-white transition-all duration-300 hover:bg-brand/90 min-h-[52px] touch-manipulation"
|
||||
>
|
||||
立即咨询
|
||||
{ctaPrimary}
|
||||
<ArrowUpRight className="w-4 h-4 transition-transform duration-300 group-hover:translate-x-0.5 group-hover:-translate-y-0.5" />
|
||||
</a>
|
||||
<a
|
||||
href="/products"
|
||||
className="inline-flex items-center justify-center gap-3 px-10 py-5 font-semibold text-base text-ink border border-border-primary hover:border-ink/30 transition-all duration-300 min-h-[52px] touch-manipulation"
|
||||
>
|
||||
浏览产品
|
||||
{ctaSecondary}
|
||||
</a>
|
||||
</motion.div>
|
||||
|
||||
@@ -174,7 +186,9 @@ function SolutionCard({ solution, index, products, featured = false }: { solutio
|
||||
);
|
||||
}
|
||||
|
||||
function SolutionsGridSection({ solutions, products }: { solutions: Solution[]; products?: Product[] }) {
|
||||
function SolutionsGridSection({ solutions, products, pageCopy }: { solutions: Solution[]; products?: Product[]; pageCopy?: PageCopy | null }) {
|
||||
const gridTitle = (pageCopy?.solutionsGridTitle as string) || '行业解决方案';
|
||||
const gridDescription = (pageCopy?.solutionsGridDescription as string) || '每个方案都明确推荐产品组合和服务包,确保落地效果';
|
||||
return (
|
||||
<section className="relative py-20 sm:py-28 md:py-36 lg:py-44 overflow-hidden bg-bg-secondary">
|
||||
<div className="absolute top-0 left-0 right-0 h-px bg-border-primary" />
|
||||
@@ -189,10 +203,10 @@ function SolutionsGridSection({ solutions, products }: { solutions: Solution[];
|
||||
className="max-w-3xl mb-16 sm:mb-20 md:mb-24"
|
||||
>
|
||||
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-extrabold text-ink tracking-tight leading-[0.95]">
|
||||
行业解决方案
|
||||
{gridTitle}
|
||||
</h2>
|
||||
<p className="mt-6 text-lg text-text-secondary leading-relaxed">
|
||||
每个方案都明确推荐产品组合和服务包,确保落地效果
|
||||
{gridDescription}
|
||||
</p>
|
||||
</motion.div>
|
||||
|
||||
@@ -206,7 +220,9 @@ function SolutionsGridSection({ solutions, products }: { solutions: Solution[];
|
||||
);
|
||||
}
|
||||
|
||||
function CTASection() {
|
||||
function CTASection({ pageCopy }: { pageCopy?: PageCopy | null }) {
|
||||
const ctaTitle = (pageCopy?.solutionsCtaTitle as string) || '告诉我们您的行业场景';
|
||||
const ctaDescription = (pageCopy?.solutionsCtaDescription as string) || '无论您处于哪个行业、哪个数字化阶段,我们都能为您推荐最合适的产品组合和服务包。';
|
||||
return (
|
||||
<section className="relative py-20 sm:py-28 md:py-36 lg:py-44 overflow-hidden bg-white">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10">
|
||||
@@ -218,10 +234,10 @@ function CTASection() {
|
||||
className="max-w-3xl"
|
||||
>
|
||||
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-extrabold text-ink tracking-tight leading-[0.95] mb-8">
|
||||
告诉我们您的<br className="sm:hidden" />行业场景
|
||||
{ctaTitle}
|
||||
</h2>
|
||||
<p className="text-lg text-text-secondary leading-relaxed mb-10">
|
||||
无论您处于哪个行业、哪个数字化阶段,我们都能为您推荐最合适的产品组合和服务包。
|
||||
{ctaDescription}
|
||||
</p>
|
||||
<div className="flex flex-col sm:flex-row gap-4 sm:gap-6">
|
||||
<a
|
||||
@@ -244,14 +260,14 @@ function CTASection() {
|
||||
);
|
||||
}
|
||||
|
||||
export default function SolutionsContentV3({ solutions: solutionsProp, products }: { solutions?: Solution[]; products?: Product[] }) {
|
||||
export default function SolutionsContentV3({ solutions: solutionsProp, products, pageCopy }: { solutions?: Solution[]; products?: Product[]; pageCopy?: PageCopy | null }) {
|
||||
const solutions = solutionsProp ?? [];
|
||||
|
||||
return (
|
||||
<main className="bg-white text-ink">
|
||||
<HeroSection />
|
||||
<SolutionsGridSection solutions={solutions} products={products} />
|
||||
<CTASection />
|
||||
<HeroSection pageCopy={pageCopy} />
|
||||
<SolutionsGridSection solutions={solutions} products={products} pageCopy={pageCopy} />
|
||||
<CTASection pageCopy={pageCopy} />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
+6
-1
@@ -15,7 +15,7 @@ import { BackToTop } from "@/components/ui/back-to-top";
|
||||
import { ClientLayout } from "@/components/layout/client-layout";
|
||||
import { getPublishedItems } from "@/lib/cms/data-server";
|
||||
import { SiteConfigProvider, type SiteConfig, type NavigationItem, type MegaDropdownGroup, type MegaDropdownItem } from "@/lib/site-config";
|
||||
import { COMPANY_INFO } from "@/lib/constants/company";
|
||||
import { COMPANY_INFO, BRAND_NARRATIVE, type BrandPillar } from "@/lib/constants/company";
|
||||
import { NAVIGATION_V2, MEGA_DROPDOWN_DATA } from "@/lib/constants/navigation";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
@@ -127,6 +127,11 @@ export default async function RootLayout({
|
||||
displayName: (configData?.displayName as string) || COMPANY_INFO.displayName,
|
||||
slogan: (configData?.slogan as string) || COMPANY_INFO.slogan,
|
||||
description: (configData?.description as string) || COMPANY_INFO.description,
|
||||
valueProposition: (configData?.valueProposition as string) || BRAND_NARRATIVE.valueProposition,
|
||||
positioningStatement: (configData?.positioningStatement as string) || BRAND_NARRATIVE.positioningStatement,
|
||||
brandPromise: (configData?.brandPromise as string) || BRAND_NARRATIVE.brandPromise,
|
||||
toneOfVoice: (configData?.toneOfVoice as string) || BRAND_NARRATIVE.toneOfVoice,
|
||||
pillars: (Array.isArray(configData?.pillars) ? configData.pillars : BRAND_NARRATIVE.pillars) as BrandPillar[],
|
||||
founded: (configData?.founded as string) || COMPANY_INFO.founded,
|
||||
location: (configData?.location as string) || COMPANY_INFO.location,
|
||||
email: (configData?.email as string) || COMPANY_INFO.email,
|
||||
|
||||
@@ -33,6 +33,11 @@ export function Footer() {
|
||||
</StaticLink>
|
||||
</div>
|
||||
<p className="text-gray-300 text-sm leading-relaxed max-w-md">
|
||||
{config.slogan && (
|
||||
<>
|
||||
<span className="block text-gray-200 font-medium mb-2">{config.slogan}</span>
|
||||
</>
|
||||
)}
|
||||
{config.description}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1578,6 +1578,122 @@ const methodologyFields: FieldDefinition[] = [
|
||||
},
|
||||
];
|
||||
|
||||
const pageCopyFields: FieldDefinition[] = [
|
||||
// === 首页信任区 ===
|
||||
{ name: 'trustEyebrow', type: 'text', label: '信任区眉标' },
|
||||
{ name: 'trustTitle', type: 'text', label: '信任区标题' },
|
||||
{ name: 'trustDescription', type: 'textarea', label: '信任区描述' },
|
||||
{
|
||||
name: 'trustSignals',
|
||||
type: 'array',
|
||||
label: '信任信号',
|
||||
description: '可验证信任信号卡片(数值/标签/描述/来源)',
|
||||
fields: [
|
||||
{ name: 'value', type: 'text', label: '数值', required: true },
|
||||
{ name: 'label', type: 'text', label: '标签', required: true },
|
||||
{ name: 'desc', type: 'textarea', label: '描述', required: true },
|
||||
{ name: 'source', type: 'text', label: '来源', required: true },
|
||||
],
|
||||
},
|
||||
{ name: 'earlyAccessLabel', type: 'text', label: '共创状态标签' },
|
||||
{ name: 'earlyAccessDesc', type: 'textarea', label: '共创状态说明' },
|
||||
{ name: 'earlyAccessTitle', type: 'text', label: '共创计划标题' },
|
||||
{ name: 'earlyAccessCtaLabel', type: 'text', label: '共创计划 CTA 文案' },
|
||||
{
|
||||
name: 'earlyAccessStatus',
|
||||
type: 'array',
|
||||
label: '共创计划状态条目',
|
||||
description: '如实呈现共创/内测/授权公开等当前状态',
|
||||
fields: [
|
||||
{ name: 'label', type: 'text', label: '状态名称', required: true },
|
||||
{ name: 'desc', type: 'textarea', label: '状态说明', required: true },
|
||||
],
|
||||
},
|
||||
// === 首页叙事区 ===
|
||||
{ name: 'narrativeTitle', type: 'textarea', label: '叙事区标题' },
|
||||
{
|
||||
name: 'narrativeActs',
|
||||
type: 'array',
|
||||
label: '叙事情节(问题→方法→结果)',
|
||||
fields: [
|
||||
{ name: 'number', type: 'text', label: '序号', required: true },
|
||||
{ name: 'title', type: 'text', label: '标题', required: true },
|
||||
{ name: 'desc', type: 'textarea', label: '描述', required: true },
|
||||
{ name: 'href', type: 'text', label: '链接' },
|
||||
{ name: 'cta', type: 'text', label: '按钮文案' },
|
||||
],
|
||||
},
|
||||
// === 首页服务区 ===
|
||||
{ name: 'servicesTitle', type: 'textarea', label: '服务区标题' },
|
||||
// === 首页案例区 ===
|
||||
{ name: 'casesEyebrow', type: 'text', label: '案例区眉标' },
|
||||
{ name: 'casesTitle', type: 'textarea', label: '案例区标题' },
|
||||
{ name: 'casesDescription', type: 'textarea', label: '案例区空状态描述' },
|
||||
// === 首页 CTA ===
|
||||
{ name: 'ctaTitleLine1', type: 'text', label: 'CTA 标题第一行' },
|
||||
{ name: 'ctaTitleLine2', type: 'text', label: 'CTA 标题第二行' },
|
||||
{ name: 'ctaLabel', type: 'text', label: 'CTA 按钮文案' },
|
||||
// === 服务列表页 ===
|
||||
{ name: 'servicesHeroTitle1', type: 'text', label: '服务页 Hero 标题第一行' },
|
||||
{ name: 'servicesHeroTitle2', type: 'text', label: '服务页 Hero 标题第二行(品牌红)' },
|
||||
{ name: 'servicesHeroDescription', type: 'textarea', label: '服务页 Hero 描述' },
|
||||
{ name: 'servicesCtaPrimary', type: 'text', label: '服务页主 CTA 文案' },
|
||||
{ name: 'servicesCtaSecondary', type: 'text', label: '服务页次 CTA 文案' },
|
||||
{ name: 'servicesGridTitle', type: 'text', label: '服务页区块标题' },
|
||||
{ name: 'servicesEmptyState', type: 'text', label: '服务页空状态文案' },
|
||||
{ name: 'servicesCtaTitle', type: 'text', label: '服务页 CTA 标题' },
|
||||
{ name: 'servicesCtaDescription', type: 'textarea', label: '服务页 CTA 描述' },
|
||||
// === 方案列表页 ===
|
||||
{ name: 'solutionsHeroTitle1', type: 'text', label: '方案页 Hero 标题第一行' },
|
||||
{ name: 'solutionsHeroTitle2', type: 'text', label: '方案页 Hero 标题第二行(品牌红)' },
|
||||
{ name: 'solutionsHeroDescription', type: 'textarea', label: '方案页 Hero 描述' },
|
||||
{ name: 'solutionsCtaPrimary', type: 'text', label: '方案页主 CTA 文案' },
|
||||
{ name: 'solutionsCtaSecondary', type: 'text', label: '方案页次 CTA 文案' },
|
||||
{ name: 'solutionsGridTitle', type: 'text', label: '方案页区块标题' },
|
||||
{ name: 'solutionsGridDescription', type: 'textarea', label: '方案页区块描述' },
|
||||
{ name: 'solutionsCtaTitle', type: 'text', label: '方案页 CTA 标题' },
|
||||
{ name: 'solutionsCtaDescription', type: 'textarea', label: '方案页 CTA 描述' },
|
||||
// === 产品列表页 ===
|
||||
{ name: 'productsHeroTitle1', type: 'text', label: '产品页 Hero 标题第一行' },
|
||||
{ name: 'productsHeroTitle2', type: 'text', label: '产品页 Hero 标题第二行(品牌红)' },
|
||||
{ name: 'productsHeroTitle3', type: 'text', label: '产品页 Hero 标题第三行' },
|
||||
{ name: 'productsHeroDescription', type: 'textarea', label: '产品页 Hero 描述' },
|
||||
{ name: 'productsCtaPrimary', type: 'text', label: '产品页主 CTA 文案' },
|
||||
{ name: 'productsCtaSecondary', type: 'text', label: '产品页次 CTA 文案' },
|
||||
{ name: 'productsBundleTitle', type: 'text', label: '产品页双体系区块标题' },
|
||||
{ name: 'productsBundleDescription', type: 'textarea', label: '产品页双体系区块描述' },
|
||||
{ name: 'productsCtaTitle', type: 'text', label: '产品页 CTA 标题' },
|
||||
{ name: 'productsCtaDescription', type: 'textarea', label: '产品页 CTA 描述' },
|
||||
// === 案例列表页 ===
|
||||
{ name: 'casePageHeroTitle1', type: 'text', label: '案例页 Hero 标题第一行' },
|
||||
{ name: 'casePageHeroTitle2', type: 'text', label: '案例页 Hero 标题第二行(品牌红)' },
|
||||
{ name: 'casePageHeroDescription', type: 'textarea', label: '案例页 Hero 描述' },
|
||||
{ name: 'casePageFilterTitle', type: 'text', label: '案例页筛选区块标题' },
|
||||
{ name: 'casePageFilterDescription', type: 'textarea', label: '案例页筛选区块描述' },
|
||||
// === 新闻列表页 ===
|
||||
{ name: 'newsPageHeroEyebrow', type: 'text', label: '新闻页 Hero 眉标' },
|
||||
{ name: 'newsPageHeroTitle', type: 'textarea', label: '新闻页 Hero 标题(多行,最后一行品牌红)' },
|
||||
{ name: 'newsPageHeroDescription', type: 'textarea', label: '新闻页 Hero 描述' },
|
||||
{ name: 'newsPageEmptyTitle', type: 'text', label: '新闻页空状态标题' },
|
||||
{ name: 'newsPageEmptyDescription', type: 'textarea', label: '新闻页空状态描述' },
|
||||
];
|
||||
|
||||
const pageCopyConfig: ContentTypeConfig = {
|
||||
model: {
|
||||
id: 'model-page-copy',
|
||||
code: 'page-copy',
|
||||
name: '页面文案',
|
||||
description: '各业务页面结构性文案配置(章节标题/眉标/描述/CTA/空状态)',
|
||||
fields: pageCopyFields,
|
||||
isPageType: false,
|
||||
hasVersions: false,
|
||||
hasDraft: true,
|
||||
icon: 'file-text',
|
||||
createdAt: '2024-01-01T00:00:00Z',
|
||||
updatedAt: '2024-01-01T00:00:00Z',
|
||||
},
|
||||
};
|
||||
|
||||
const newsConfig: ContentTypeConfig = {
|
||||
model: {
|
||||
id: 'model-news',
|
||||
@@ -1851,4 +1967,5 @@ export const CONTENT_TYPE_CONFIGS = {
|
||||
'contact-page': contactPageConfig,
|
||||
'legal-page': legalPageConfig,
|
||||
methodology: methodologyConfig,
|
||||
'page-copy': pageCopyConfig,
|
||||
};
|
||||
|
||||
@@ -414,11 +414,27 @@ describe('data-server - CMS 数据访问层', () => {
|
||||
|
||||
it('getSolutionBySlug should call getPublishedItemBySlug with solution', async () => {
|
||||
const spy = jest.spyOn(dataServer, 'getPublishedItemBySlug');
|
||||
spy.mockResolvedValue(null);
|
||||
spy.mockResolvedValue(null as never);
|
||||
|
||||
await dataServer.getSolutionBySlug('test-solution');
|
||||
expect(spy).toHaveBeenCalledWith('solution', 'test-solution');
|
||||
});
|
||||
|
||||
it('getPageCopy should call getPublishedItemBySlug with page-copy model', async () => {
|
||||
const spy = jest.spyOn(dataServer, 'getPublishedItemBySlug');
|
||||
spy.mockResolvedValue(null as never);
|
||||
|
||||
await dataServer.getPageCopy('home');
|
||||
expect(spy).toHaveBeenCalledWith('page-copy', 'home');
|
||||
});
|
||||
|
||||
it('getHomePageCopy should fetch page-copy for home page code', async () => {
|
||||
const spy = jest.spyOn(dataServer, 'getPublishedItemBySlug');
|
||||
spy.mockResolvedValue(null as never);
|
||||
|
||||
await dataServer.getHomePageCopy();
|
||||
expect(spy).toHaveBeenCalledWith('page-copy', 'home');
|
||||
});
|
||||
});
|
||||
|
||||
describe('getResolvedHomeZones', () => {
|
||||
|
||||
@@ -157,6 +157,20 @@ export async function getSolutionBySlug(slug: string) {
|
||||
return getPublishedItemBySlug('solution', slug);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定页面的结构性文案配置(page-copy 模型,按页面 slug)
|
||||
*/
|
||||
export async function getPageCopy(pageCode: string) {
|
||||
return getPublishedItemBySlug('page-copy', pageCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取首页结构性文案配置(章节标题/信任信号/叙事情节/CTA 的 CMS 覆盖)
|
||||
*/
|
||||
export async function getHomePageCopy() {
|
||||
return getPageCopy('home');
|
||||
}
|
||||
|
||||
export async function getHomePageZones() {
|
||||
return getPageZones('home');
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ describe('Constants', () => {
|
||||
});
|
||||
|
||||
it('should have slogan', () => {
|
||||
expect(COMPANY_INFO.slogan).toBe('企业数字化转型的同行者');
|
||||
expect(COMPANY_INFO.slogan).toBe('智连未来 · 成长伙伴 —— 您的数字化转型同行者');
|
||||
});
|
||||
|
||||
it('should have contact information', () => {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
export {
|
||||
COMPANY_INFO,
|
||||
BRAND_NARRATIVE,
|
||||
type BrandPillar,
|
||||
TRUST_SIGNALS,
|
||||
EARLY_ACCESS,
|
||||
NAVIGATION,
|
||||
|
||||
@@ -2,8 +2,15 @@ export const COMPANY_INFO = {
|
||||
name: '四川睿新致远科技有限公司',
|
||||
shortName: '睿新致遠',
|
||||
displayName: '睿新致远',
|
||||
slogan: '企业数字化转型的同行者',
|
||||
description: '专业核心团队,以结果导向的服务理念,做企业数字化转型的同行者与成长伙伴',
|
||||
/**
|
||||
* 品牌主口号(整句采用)。
|
||||
* ★ 全站唯一真源:Hero / Footer / About 等品牌触点统一引用本值,
|
||||
* 并通过 CMS `site-config` 的 slogan 字段覆盖(后台可编辑)。
|
||||
*/
|
||||
slogan: '智连未来 · 成长伙伴 —— 您的数字化转型同行者',
|
||||
/** 公司简介:结果导向 + 同行者定位,与 slogan 语义一致。CMS site-config 可覆盖。 */
|
||||
description:
|
||||
'专业核心团队,以结果导向的服务理念,做中国企业数字化转型的同行者与成长伙伴,从战略诊断到系统落地、再到持续陪跑,让每一份技术投入都转化为可衡量的成长。',
|
||||
founded: '2026',
|
||||
foundedFull: '2026 年 1 月',
|
||||
location: '四川省成都市',
|
||||
@@ -13,6 +20,59 @@ export const COMPANY_INFO = {
|
||||
police: '川公网安备51010602003285号',
|
||||
} as const;
|
||||
|
||||
export interface BrandPillar {
|
||||
key: string;
|
||||
title: string;
|
||||
tagline: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 品牌叙事内核(Brand Narrative Core)—— 代码侧唯一真源。
|
||||
*
|
||||
* 定义见 docs/brand-narrative-core.md。以下字段均通过 CMS `site-config`
|
||||
* 模型在后台可编辑,代码常量作为未配置 CMS 时的兜底默认值。
|
||||
*
|
||||
* 零编造原则延续:定位、承诺、三支柱均围绕「同行者 + 结果导向 + 成长伙伴」
|
||||
* 展开,不虚构资质/案例/数据。
|
||||
*/
|
||||
export const BRAND_NARRATIVE = {
|
||||
/** L0 一句话价值主张(elevator pitch) */
|
||||
valueProposition: '让数据连接未来,让伙伴陪您成长——我们是您数字化转型的同行者。',
|
||||
/** 品牌定位声明 */
|
||||
positioningStatement:
|
||||
'睿新致远是中国成长型企业的数字化转型同行者:对需要数字化升级但缺乏大型 IT 投入的成长型企业,我们以结果导向的方法论、自研可组合的产品与复合型工程师团队,提供从战略诊断到系统落地、再到持续陪跑的一站式服务,让数字化从「投入」真正变成「成长」。',
|
||||
/** 品牌承诺 */
|
||||
brandPromise:
|
||||
'我们承诺:每一份方案都源于对您业务的理解;每一次交付都以结果说话;每一段合作都以陪您走到成长为终点。',
|
||||
/**
|
||||
* L1 三支柱(品牌叙事信息层级),对应产品 / 方案 / 服务。
|
||||
* HTML 提示:CMS 中以数组形式编辑。
|
||||
*/
|
||||
pillars: [
|
||||
{
|
||||
key: 'strategy',
|
||||
title: '战略同行',
|
||||
tagline: '从诊断到蓝图,先想清楚再动手',
|
||||
description: '以诊断代替推销,先理解您的业务、痛点与约束,再给出可落地的数字化转型路线图。',
|
||||
},
|
||||
{
|
||||
key: 'delivery',
|
||||
title: '落地同行',
|
||||
tagline: '让转型真正落地,让投入可衡量',
|
||||
description: '用自研可组合产品与工程化交付,把蓝图变成可运行的系统,每一分投入都可验证。',
|
||||
},
|
||||
{
|
||||
key: 'accompany',
|
||||
title: '陪跑同行',
|
||||
tagline: '交付不是终点,成长才是成果',
|
||||
description: '交付后仍持续陪跑,助您沉淀团队能力,让数字化持续产生业务价值。',
|
||||
},
|
||||
] satisfies BrandPillar[],
|
||||
/** 语气语调(内部写作规范,供内容/文案参考,不在页面直接展示) */
|
||||
toneOfVoice: '严谨不说教、专业不冰冷、同行不越位;答案优先、数据先行;可衡量的才说,未成的如实「共创中」。',
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* 首页信任层可验证信任信号(L3 Trust & Authority)。
|
||||
*
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export { COMPANY_INFO, TRUST_SIGNALS, EARLY_ACCESS } from './company';
|
||||
export { COMPANY_INFO, BRAND_NARRATIVE, TRUST_SIGNALS, EARLY_ACCESS } from './company';
|
||||
export type { BrandPillar } from './company';
|
||||
export { NAVIGATION, NAVIGATION_V2, MEGA_DROPDOWN_DATA } from './navigation';
|
||||
export type { NavigationItem, NavigationItemV2, MegaDropdownItem, MegaDropdownGroup, MegaDropdownData } from './navigation';
|
||||
export { STATS, type StatItem } from './stats';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { createContext, useContext, type ReactNode } from 'react';
|
||||
import type { BrandPillar } from '@/lib/constants';
|
||||
|
||||
export interface NavigationItem {
|
||||
id: string;
|
||||
@@ -40,6 +41,13 @@ export interface SiteConfig {
|
||||
icp: string;
|
||||
police: string;
|
||||
|
||||
/** Brand narrative core (CMS editable via site-config, fallback to BRAND_NARRATIVE) */
|
||||
valueProposition: string;
|
||||
positioningStatement: string;
|
||||
brandPromise: string;
|
||||
pillars: BrandPillar[];
|
||||
toneOfVoice: string;
|
||||
|
||||
/** Navigation */
|
||||
mainNav: NavigationItem[];
|
||||
megaDropdown: Record<string, MegaDropdownGroup[]>;
|
||||
@@ -57,6 +65,11 @@ const DEFAULT_CONFIG: SiteConfig = {
|
||||
address: '',
|
||||
icp: '',
|
||||
police: '',
|
||||
valueProposition: '',
|
||||
positioningStatement: '',
|
||||
brandPromise: '',
|
||||
pillars: [],
|
||||
toneOfVoice: '',
|
||||
mainNav: [],
|
||||
megaDropdown: {},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user