feat: 接入后端全局Snippet(导航菜单/站点设置),补充团队/证言/合作伙伴 service 层

- Header 改为异步 Server Component,接入 NavigationMenu(name=main),
  接口不可用或未配置时回退静态导航项
- Footer 改为异步 Server Component,接入 SiteSettings,
  公司名/ICP备案号/备案链接优先取后台配置,缺省回退硬编码值
- types/wagtail.ts 新增 TeamMember/Testimonial/Partner/NavigationMenu/SiteSettings 类型
- 新增 services: team/testimonial/partner/navigation/site-settings.service.ts
- lint、build 均已验证通过
This commit is contained in:
2026-08-07 13:06:45 +08:00
parent 77e1208c31
commit 24a2311e20
8 changed files with 159 additions and 11 deletions
+50
View File
@@ -160,3 +160,53 @@ export interface SolutionPageDetail extends SolutionPageSummary {
export interface SimpleContentPageDetail extends WagtailPageSummary {
body: string; // richtext HTML
}
/**
* 全局 Snippet 类型(apps/core/models.py)。
* 通过 /api/v1/custom/core/... 只读接口获取,非 Wagtail Page API。
*/
export interface TeamMemberValue {
id: number;
name: string;
role: string;
bio: string;
photo: { url: string; title: string } | null;
}
export interface TestimonialValue {
id: number;
quote: string;
author_name: string;
author_title: string;
author_photo: { url: string; title: string } | null;
}
export interface PartnerValue {
id: number;
name: string;
website_url: string;
logo: { url: string; title: string } | null;
}
export interface NavigationMenuItemValue {
label: string;
url: string;
open_in_new_tab: boolean;
}
export interface NavigationMenuValue {
name: string;
items: NavigationMenuItemValue[];
}
export interface SiteSettingsValue {
company_name: string;
contact_phone: string;
contact_email: string;
address: string;
icp_number: string;
icp_url: string;
wechat_account: string;
weibo_url: string;
wechat_qrcode: { url: string; title: string } | null;
}