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:
2026-08-19 15:28:15 +08:00
parent c195768281
commit 6573ab449e
9 changed files with 421 additions and 3 deletions
+57
View File
@@ -1536,6 +1536,42 @@ const legalPageFields: FieldDefinition[] = [
},
];
const methodologyFields: FieldDefinition[] = [
{
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: '方法论阶段',
description: '四阶段推进模型,如 诊断评估 → 战略规划 → 落地实施 → 持续优化',
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 字符串数组' },
],
},
];
const newsConfig: ContentTypeConfig = {
model: {
id: 'model-news',
@@ -1770,6 +1806,26 @@ const legalPageConfig: ContentTypeConfig = {
},
};
const methodologyConfig: ContentTypeConfig = {
model: {
id: 'model-methodology',
code: 'methodology',
name: '方法论',
description: '实施方法论 — 四阶段模型(诊断→规划→实施→优化)',
fields: methodologyFields,
isPageType: true,
urlPattern: '/methodology',
hasVersions: false,
hasDraft: true,
icon: 'route',
createdAt: '2024-01-01T00:00:00Z',
updatedAt: '2024-01-01T00:00:00Z',
},
listPage: {
route: '/methodology',
},
};
/** @deprecated 旧客户端 CMS 的注册函数,已不再需要 */
export function registerAllContentTypes(): void {
// no-op — 数据模型定义已全部移至 CONTENT_TYPE_CONFIGS
@@ -1788,4 +1844,5 @@ export const CONTENT_TYPE_CONFIGS = {
'team-page': teamPageConfig,
'contact-page': contactPageConfig,
'legal-page': legalPageConfig,
methodology: methodologyConfig,
};