前端-官网内容管理开发
This commit is contained in:
+348
@@ -0,0 +1,348 @@
|
||||
declare namespace Api {
|
||||
namespace Www {
|
||||
// ===== 1. 全局配置 =====
|
||||
interface SiteSettings {
|
||||
id?: number;
|
||||
site_title: string;
|
||||
favicon_url: string;
|
||||
logo_dark_url: string;
|
||||
logo_light_url: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
interface FooterSettings {
|
||||
id?: number;
|
||||
company_name: string;
|
||||
company_address: string;
|
||||
contact_phone: string;
|
||||
contact_email: string;
|
||||
copyright_text: string;
|
||||
icp_number: string;
|
||||
police_number: string;
|
||||
}
|
||||
|
||||
interface SocialLink {
|
||||
id?: number;
|
||||
platform: string;
|
||||
url: string;
|
||||
qrcode_url: string;
|
||||
sort_order?: number;
|
||||
}
|
||||
|
||||
interface SeoDefaults {
|
||||
id?: number;
|
||||
meta_description: string;
|
||||
meta_keywords: string;
|
||||
og_image_url: string;
|
||||
}
|
||||
|
||||
// ===== 2. 导航管理 =====
|
||||
interface NavItem {
|
||||
id: number;
|
||||
name_zh: string;
|
||||
name_en: string;
|
||||
link: string;
|
||||
is_visible: boolean;
|
||||
sort_order: number;
|
||||
display_mode: 'text' | 'icon' | 'image';
|
||||
icon_name: string;
|
||||
image_url: string;
|
||||
open_new_tab: boolean;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
interface NavItemPayload {
|
||||
name_zh: string;
|
||||
name_en: string;
|
||||
link: string;
|
||||
is_visible?: boolean;
|
||||
display_mode?: string;
|
||||
icon_name?: string;
|
||||
image_url?: string;
|
||||
open_new_tab?: boolean;
|
||||
}
|
||||
|
||||
interface NavAppearance {
|
||||
id?: number;
|
||||
homepage_style: string;
|
||||
non_homepage_style: string;
|
||||
}
|
||||
|
||||
// ===== 3. Section 区块 =====
|
||||
interface SectionBlock {
|
||||
id: number;
|
||||
page_type: string;
|
||||
product_id: number | null;
|
||||
layout: string;
|
||||
theme: string;
|
||||
bg_type: string;
|
||||
bg_value: string;
|
||||
overlay_enabled: boolean;
|
||||
overlay_opacity: number;
|
||||
overline_zh: string;
|
||||
overline_en: string;
|
||||
title_zh: string;
|
||||
title_en: string;
|
||||
subtitle_zh: string;
|
||||
subtitle_en: string;
|
||||
content_zh: string;
|
||||
content_en: string;
|
||||
cta_primary_zh: string;
|
||||
cta_primary_en: string;
|
||||
cta_primary_url: string;
|
||||
cta_secondary_zh: string;
|
||||
cta_secondary_en: string;
|
||||
cta_secondary_url: string;
|
||||
media_url_zh: string;
|
||||
media_url_en: string;
|
||||
video_url: string;
|
||||
config: Record<string, unknown>;
|
||||
is_visible: boolean;
|
||||
sort_order: number;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
interface SectionPayload {
|
||||
page_type: string;
|
||||
product_id?: number | null;
|
||||
layout: string;
|
||||
theme?: string;
|
||||
bg_type?: string;
|
||||
bg_value?: string;
|
||||
overlay_enabled?: boolean;
|
||||
overlay_opacity?: number;
|
||||
overline_zh?: string;
|
||||
overline_en?: string;
|
||||
title_zh?: string;
|
||||
title_en?: string;
|
||||
subtitle_zh?: string;
|
||||
subtitle_en?: string;
|
||||
content_zh?: string;
|
||||
content_en?: string;
|
||||
cta_primary_zh?: string;
|
||||
cta_primary_en?: string;
|
||||
cta_primary_url?: string;
|
||||
cta_secondary_zh?: string;
|
||||
cta_secondary_en?: string;
|
||||
cta_secondary_url?: string;
|
||||
media_url_zh?: string;
|
||||
media_url_en?: string;
|
||||
video_url?: string;
|
||||
config?: Record<string, unknown>;
|
||||
is_visible?: boolean;
|
||||
}
|
||||
|
||||
interface SpecGroup {
|
||||
id: number;
|
||||
section_id: number;
|
||||
title_zh: string;
|
||||
title_en: string;
|
||||
default_visible: number;
|
||||
sort_order: number;
|
||||
}
|
||||
|
||||
interface SpecItem {
|
||||
id: number;
|
||||
group_id: number;
|
||||
name_zh: string;
|
||||
name_en: string;
|
||||
value_zh: string;
|
||||
value_en: string;
|
||||
sort_order: number;
|
||||
}
|
||||
|
||||
// ===== 4. 页面配置 =====
|
||||
interface ProductListSettings {
|
||||
id?: number;
|
||||
hero_title_zh: string;
|
||||
hero_title_en: string;
|
||||
hero_subtitle_zh: string;
|
||||
hero_subtitle_en: string;
|
||||
hero_bg_url: string;
|
||||
columns: number;
|
||||
show_series_filter: boolean;
|
||||
default_sort: string;
|
||||
}
|
||||
|
||||
interface NewsListSettings {
|
||||
id?: number;
|
||||
hero_title_zh: string;
|
||||
hero_title_en: string;
|
||||
hero_subtitle_zh: string;
|
||||
hero_subtitle_en: string;
|
||||
hero_bg_url: string;
|
||||
page_size: number;
|
||||
show_cover: boolean;
|
||||
show_summary: boolean;
|
||||
}
|
||||
|
||||
interface AboutSettings {
|
||||
id?: number;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
interface SupportSettings {
|
||||
id?: number;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
// ===== 5. 产品管理 =====
|
||||
interface ProductSeries {
|
||||
id: number;
|
||||
name_zh: string;
|
||||
name_en: string;
|
||||
overline: string;
|
||||
subtitle_zh: string;
|
||||
subtitle_en: string;
|
||||
cover_url: string;
|
||||
sort_order: number;
|
||||
is_visible: boolean;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
interface ProductSeriesPayload {
|
||||
name_zh: string;
|
||||
name_en: string;
|
||||
overline?: string;
|
||||
subtitle_zh?: string;
|
||||
subtitle_en?: string;
|
||||
cover_url?: string;
|
||||
is_visible?: boolean;
|
||||
}
|
||||
|
||||
interface Product {
|
||||
id: number;
|
||||
series_id: number;
|
||||
name_zh: string;
|
||||
name_en: string;
|
||||
slug: string;
|
||||
intro_zh: string;
|
||||
intro_en: string;
|
||||
cover_url: string;
|
||||
is_visible: boolean;
|
||||
sort_order: number;
|
||||
series?: ProductSeries;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
interface ProductPayload {
|
||||
series_id: number;
|
||||
name_zh: string;
|
||||
name_en: string;
|
||||
slug: string;
|
||||
intro_zh?: string;
|
||||
intro_en?: string;
|
||||
cover_url?: string;
|
||||
is_visible?: boolean;
|
||||
}
|
||||
|
||||
// ===== 6. 新闻管理 =====
|
||||
interface NewsArticle {
|
||||
id: number;
|
||||
title_zh: string;
|
||||
title_en: string;
|
||||
slug: string;
|
||||
summary_zh: string;
|
||||
summary_en: string;
|
||||
cover_url: string;
|
||||
content_zh: string;
|
||||
content_en: string;
|
||||
status: 'draft' | 'published' | 'offline';
|
||||
published_at: string | null;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
interface NewsArticlePayload {
|
||||
title_zh: string;
|
||||
title_en: string;
|
||||
slug: string;
|
||||
summary_zh?: string;
|
||||
summary_en?: string;
|
||||
cover_url?: string;
|
||||
content_zh?: string;
|
||||
content_en?: string;
|
||||
status?: string;
|
||||
published_at?: string | null;
|
||||
}
|
||||
|
||||
// ===== 7. 素材库 =====
|
||||
interface MediaItem {
|
||||
id: number;
|
||||
filename: string;
|
||||
file_path: string;
|
||||
file_type: 'image' | 'video' | 'file';
|
||||
mime_type: string;
|
||||
file_size: number;
|
||||
width: number | null;
|
||||
height: number | null;
|
||||
category: string;
|
||||
thumbnail_url: string;
|
||||
webp_url: string;
|
||||
ref_count: number;
|
||||
tags: string[];
|
||||
created_at?: string;
|
||||
}
|
||||
|
||||
interface MediaTag {
|
||||
id: number;
|
||||
tag_name: string;
|
||||
}
|
||||
|
||||
// ===== 8. 翻译管理 =====
|
||||
interface I18nEntry {
|
||||
id: number;
|
||||
dict_key: string;
|
||||
value_zh: string;
|
||||
value_en: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
// ===== 9. 联系表单 =====
|
||||
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;
|
||||
}
|
||||
|
||||
interface FormField {
|
||||
id: number;
|
||||
name_zh: string;
|
||||
name_en: string;
|
||||
field_type: 'text' | 'email' | 'phone' | 'textarea' | 'select';
|
||||
is_required: boolean;
|
||||
placeholder_zh: string;
|
||||
placeholder_en: string;
|
||||
options_json: string | null;
|
||||
sort_order: number;
|
||||
}
|
||||
|
||||
interface FormSubmission {
|
||||
id: number;
|
||||
form_data: Record<string, unknown>;
|
||||
visitor_ip: string;
|
||||
user_agent: string;
|
||||
is_read: boolean;
|
||||
submitted_at: string;
|
||||
}
|
||||
|
||||
// ===== 10. 页面 SEO =====
|
||||
interface PageSeo {
|
||||
id?: number;
|
||||
page_type: string;
|
||||
entity_id?: number | null;
|
||||
meta_title: string;
|
||||
meta_description: string;
|
||||
meta_keywords: string;
|
||||
og_image_url: string;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user