- 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 均已验证通过
12 lines
401 B
TypeScript
12 lines
401 B
TypeScript
import { fetchAPI } from "./api-client";
|
|
import type { TestimonialValue } from "@/types/wagtail";
|
|
|
|
/** 获取客户证言列表(apps.core.Testimonial Snippet)。 */
|
|
export async function getTestimonials(): Promise<TestimonialValue[]> {
|
|
const res = await fetchAPI<{ items: TestimonialValue[] }>(
|
|
"/api/v1/custom/core/testimonials/",
|
|
{ tags: ["testimonials"] },
|
|
);
|
|
return res.items;
|
|
}
|