增加website

This commit is contained in:
hero920103 committed 2026-09-14 22:24:55 +08:00
1 parent bb8a6936e4
commit 7e6a3e969f
57 files changed
+10568 -1

No files matched your search

+110
View File
@@ -0,0 +1,110 @@
/**
* 内容模型:列表页 / 详情页 / 单页共用
* 与后端 CMS(文章、产品、解决方案)字段保持一一对应的思路,
* 后续接入接口时只需替换 data 层的数据来源。
*/
/** 栏目标识 */
export type SectionKey = "news" | "products" | "solutions" | "cases" | "events";
/** 分类 */
export interface Category {
slug: string;
name: string;
desc?: string;
}
/** 封面配色(暂用渐变替代实拍图) */
export type CoverTone = "navy" | "blue" | "teal" | "indigo";
export interface Feature {
icon: string;
title: string;
desc: string;
}
export interface Stat {
value: string;
label: string;
}
export interface Step {
title: string;
desc: string;
}
export interface TimelineNode {
year: string;
text: string;
}
export interface ContactRow {
icon: string;
label: string;
value: string;
}
export interface QuickLink {
icon: string;
title: string;
desc: string;
path: string;
}
/** 正文区块:详情页与单页共用同一套渲染器 */
export type Block =
| { type: "heading"; text: string; sub?: string }
| { type: "paragraph"; text: string }
| { type: "quote"; text: string; author?: string }
| { type: "list"; items: string[] }
| { type: "features"; items: Feature[] }
| { type: "stats"; items: Stat[] }
| { type: "steps"; items: Step[] }
| { type: "timeline"; items: TimelineNode[] }
| { type: "contact"; items: ContactRow[] }
| { type: "links"; items: QuickLink[] }
| { type: "table"; head: string[]; rows: string[][] };
/** 一条内容(新闻 / 产品 / 方案 / 案例 / 活动) */
export interface ContentItem {
slug: string;
section: SectionKey;
/** 分类 slug */
category: string;
title: string;
subtitle: string;
summary: string;
tone: CoverTone;
date?: string;
author?: string;
tags?: string[];
featured?: boolean;
blocks: Block[];
}
/** 独立单页 */
export interface SinglePage {
title: string;
subtitle: string;
/** 面包屑(不含"首页") */
crumbs: string[];
tone: CoverTone;
blocks: Block[];
}
/** 列表查询参数 */
export interface ListQuery {
section: SectionKey;
category?: string;
keyword?: string;
page?: number;
pageSize?: number;
}
export interface ListResult {
list: ContentItem[];
total: number;
page: number;
pageSize: number;
totalPages: number;
}
+8
View File
@@ -0,0 +1,8 @@
// 补充第三方库缺失的类型声明
declare module "vuex";
declare module "*.vue" {
import type { DefineComponent } from "vue";
const component: DefineComponent<{}, {}, any>;
export default component;
}