官网开发中 0803

This commit is contained in:
eafonyang
2026-08-03 19:09:03 +08:00
parent eeccdb079c
commit f37b6451ef
36 changed files with 1906 additions and 78 deletions
+148
View File
@@ -150,6 +150,10 @@ export interface SectionBlock {
product_id: number | null;
layout: SectionLayout;
theme: 'light' | 'dark';
/** 前景文案自定义颜色(空字符串 = 跟随 theme 默认配色) */
overline_color: string;
title_color: string;
body_color: string;
bg_type: 'color' | 'image' | 'video';
bg_value: string;
overlay_enabled: number;
@@ -217,3 +221,147 @@ export interface ProductsData {
series: ProductSeries[];
total: number;
}
// ===== 新闻 =====
export interface NewsArticle {
id: number;
title_zh: string;
title_en: string;
slug: string;
summary_zh: string;
summary_en: string;
cover_url: string;
published_at: string | null;
created_at: string;
}
export interface NewsDetail extends NewsArticle {
content_zh: string | null;
content_en: string | null;
recommendations: NewsArticle[];
}
// ===== 页面配置 =====
export interface PageHeroConfig {
hero_title_zh: string;
hero_title_en: string;
hero_subtitle_zh: string;
hero_subtitle_en: string;
hero_bg_url: string;
}
export interface ProductListConfig extends PageHeroConfig {
hero_overline_zh: string;
hero_overline_en: string;
max_columns: number;
}
export interface NewsListConfig extends PageHeroConfig {
page_size: number;
pagination_mode: 'paginator' | 'load_more';
}
// ===== 关于页(s2_features 为 JSON 字符串,需 parse =====
export interface AboutFeature {
title_zh: string;
title_en: string;
desc_zh: string;
desc_en: string;
}
export interface AboutConfig extends PageHeroConfig {
s1_title_zh: string;
s1_title_en: string;
s1_content_zh: string | null;
s1_content_en: string | null;
s1_image_url: string;
s1_cta_zh: string;
s1_cta_en: string;
s1_cta_url: string;
s2_title_zh: string;
s2_title_en: string;
s2_features: string | AboutFeature[] | null;
s3_title_zh: string;
s3_title_en: string;
s3_cta_zh: string;
s3_cta_en: string;
s3_cta_url: string;
}
// ===== 支持页(JSON 字段为字符串,需 parse =====
export interface FaqItem {
question_zh: string;
question_en: string;
answer_zh: string;
answer_en: string;
}
export interface FaqCategory {
title_zh: string;
title_en: string;
items: FaqItem[];
}
export interface SupportDownload {
name_zh: string;
name_en: string;
file_url: string;
file_size: string;
}
export interface SupportContactItem {
label_zh: string;
label_en: string;
value_zh: string;
value_en: string;
}
export interface SupportConfig extends PageHeroConfig {
s1_faq_categories: string | FaqCategory[] | null;
s2_downloads: string | SupportDownload[] | null;
s3_contact: string | SupportContactItem[] | null;
s4_cta_zh: string;
s4_cta_en: string;
s4_cta_url: string;
}
// ===== 联系表单 =====
export type FormFieldType = 'text' | 'email' | 'phone' | 'textarea' | 'select';
export interface FormField {
id: number;
name_zh: string;
name_en: string;
field_type: FormFieldType;
is_required: number;
placeholder_zh: string;
placeholder_en: string;
options_json: string | null;
sort_order: number;
}
export interface FormSettings {
id: number;
recipient_email: string;
success_message_zh: string;
success_message_en: string;
error_message_zh: string;
error_message_en: string;
cooldown_seconds: number;
}
export interface ContactConfig {
settings: FormSettings | null;
fields: FormField[];
}
// ===== 页面 SEO =====
export interface PageSeo {
id: number;
page_type: string;
entity_id: number | null;
meta_title: string;
meta_description: string;
meta_keywords: string;
og_image_url: string;
}