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:
@@ -0,0 +1,11 @@
|
||||
import { fetchAPI } from "./api-client";
|
||||
import type { PartnerValue } from "@/types/wagtail";
|
||||
|
||||
/** 获取合作伙伴/客户 Logo 列表(apps.core.Partner Snippet)。 */
|
||||
export async function getPartners(): Promise<PartnerValue[]> {
|
||||
const res = await fetchAPI<{ items: PartnerValue[] }>(
|
||||
"/api/v1/custom/core/partners/",
|
||||
{ tags: ["partners"] },
|
||||
);
|
||||
return res.items;
|
||||
}
|
||||
Reference in New Issue
Block a user