feat(methodology): add CMS-driven methodology page skeleton
- 新增 methodology 内容模型(content-types + seed),内容由 CMS 后台可编辑 - 新建 /methodology 页面:Hero / 四阶段 Cards / 空态占位 / 轻量 CTA - 首页「了解我们的方法论」CTA 改指向 /methodology;sitemap 收录 - 单元测试 4/4 + 视觉基线通过,type-check / lint 0 errors
This commit is contained in:
+49
-1
@@ -12,6 +12,7 @@ import { STANDALONE_PRODUCTS } from './seeds/standalone-products';
|
||||
import { SOLUTIONS } from './seeds/solutions';
|
||||
import { STATS } from '../src/lib/constants/stats';
|
||||
import { COMPANY_INFO } from '../src/lib/constants/company';
|
||||
import { METHODOLOGY } from '../src/lib/constants/methodology';
|
||||
import { NAVIGATION_V2, MEGA_DROPDOWN_DATA } from '../src/lib/constants/navigation';
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
@@ -231,6 +232,7 @@ async function main() {
|
||||
'stat-item',
|
||||
'standalone-product',
|
||||
'media',
|
||||
'methodology',
|
||||
];
|
||||
|
||||
// 为 super_admin 之外的角色创建权限
|
||||
@@ -518,6 +520,32 @@ async function main() {
|
||||
],
|
||||
},
|
||||
},
|
||||
// === methodology ===
|
||||
{
|
||||
model: {
|
||||
code: 'methodology',
|
||||
name: '方法论',
|
||||
description: '实施方法论 — 四阶段模型(诊断→规划→实施→优化)',
|
||||
isPageType: true,
|
||||
urlPattern: '/methodology',
|
||||
hasVersions: false,
|
||||
hasDraft: true,
|
||||
icon: 'route',
|
||||
fields: [
|
||||
{ name: 'heroSubtitle', type: 'text', label: 'Hero 标签', required: true },
|
||||
{ name: 'heroTitle', type: 'textarea', label: 'Hero 主标题', required: true },
|
||||
{ name: 'heroDescription', type: 'textarea', label: 'Hero 描述', required: true },
|
||||
{ name: 'phases', type: 'array', label: '方法论阶段', required: true, fields: [
|
||||
{ name: 'number', type: 'number', label: '序号' },
|
||||
{ name: 'title', type: 'text', label: '阶段标题', required: true },
|
||||
{ name: 'subtitle', type: 'text', label: '副标题' },
|
||||
{ name: 'description', type: 'textarea', label: '阶段描述', required: true },
|
||||
{ name: 'activities', type: 'json', label: '核心活动', description: 'JSON 字符串数组' },
|
||||
{ name: 'deliverables', type: 'json', label: '交付物', description: 'JSON 字符串数组' },
|
||||
]},
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
for (let i = 0; i < modelConfigs.length; i++) {
|
||||
@@ -565,7 +593,7 @@ async function main() {
|
||||
ctaLabel: '预约咨询',
|
||||
ctaHref: '/contact',
|
||||
secondaryCtaLabel: '了解我们的方法论',
|
||||
secondaryCtaHref: '/services/consulting',
|
||||
secondaryCtaHref: '/methodology',
|
||||
statValue: '2026',
|
||||
statSubtext: '年正式成立',
|
||||
ctaTitleLine1: '每一次合作,',
|
||||
@@ -582,6 +610,26 @@ async function main() {
|
||||
await seedItems('case-study', CASE_STUDIES as unknown as Record<string, unknown>[]);
|
||||
console.log(` ✅ ${CASE_STUDIES.length} 个案例`);
|
||||
|
||||
console.log('📝 导入方法论...');
|
||||
await seedItems('methodology', [
|
||||
{
|
||||
slug: 'default',
|
||||
title: '实施方法论',
|
||||
heroSubtitle: '方法论',
|
||||
heroTitle: '从诊断到优化\n四阶段推进\n数字化转型',
|
||||
heroDescription: '基于行业通用框架与核心团队实践,我们以「诊断评估 → 战略规划 → 落地实施 → 持续优化」四阶段推进每个项目,确保每个环节都有可衡量的交付。',
|
||||
phases: METHODOLOGY.map((p) => ({
|
||||
number: p.number,
|
||||
title: p.title,
|
||||
subtitle: p.subtitle,
|
||||
description: p.description,
|
||||
activities: p.activities,
|
||||
deliverables: p.deliverables,
|
||||
})),
|
||||
},
|
||||
]);
|
||||
console.log(' ✅ 方法论(四阶段模型)');
|
||||
|
||||
console.log('📝 导入新闻...');
|
||||
await seedItems('news', NEWS as unknown as Record<string, unknown>[]);
|
||||
console.log(` ✅ ${NEWS.length} 条新闻`);
|
||||
|
||||
Reference in New Issue
Block a user