feat: 完成网站前端的基本建设

- 网站内容展示:首页, 产品页, 解决方案, 联系信息等
- 网站跳转逻辑:通过Vue-Router实现路由跳转
- 后端通信: 通过Nuxt Strapi与后端Strapi服务进行通信
This commit is contained in:
2025-09-06 15:59:52 +08:00
parent 6470da9792
commit f957adfa5d
52 changed files with 3358 additions and 92 deletions

View File

@ -0,0 +1,49 @@
export interface StrapiEntity {
id: number;
documentId: string;
createdAt: string;
updatedAt: string;
publishedAt: string;
locale: string;
}
export interface StrapiMedia {
id: number;
url: string;
ext: string;
name: string;
size: number;
alternativeText: string;
caption: string;
}
export interface StrapiImageFormat {
url: string;
width: number;
height: number;
size: number;
}
export interface StrapiImage extends StrapiMedia {
width: number;
height: number;
formats: {
small: StrapiImageFormat;
medium: StrapiImageFormat;
thumbnail: StrapiImageFormat;
}
}
export interface StrapiResponse<T> {
data: T;
meta: {
pagination: {
page: number;
pageSize: number;
pageCount: number;
total: number;
}
}
}
export type StrapiRelation<T, K extends keyof T = never> = Omit<T, K | keyof StrapiEntity> & StrapiEntity;

View File

@ -0,0 +1,5 @@
export * from './common';
export * from './production';
export * from './singleTypes';
export * from './solution';
export * from './question';

View File

@ -0,0 +1,33 @@
import type { StrapiEntity, StrapiImage, StrapiMedia, StrapiRelation } from './common';
export interface ProductionType extends StrapiEntity {
type: string;
}
export interface ProductionSpecItem {
label: string;
value: string;
}
export interface ProductionSpecGroup {
title: string;
items: ProductionSpecItem[];
}
export interface Production extends StrapiEntity {
title: string;
summary: string;
production_type: ProductionType;
cover: StrapiImage;
production_images: StrapiImage[];
production_details: string;
production_specs: ProductionSpecGroup[];
production_documents: StrapiRelation<ProductionDocument, 'related_productions'>[];
questions: StrapiRelation<Question, 'related_productions'>[];
show_in_production_list: boolean;
}
export interface ProductionDocument extends StrapiEntity {
document: StrapiMedia;
related_productions: StrapiRelation<Production, 'production_documents'>[];
}

View File

@ -0,0 +1,5 @@
export interface Question extends StrapiEntity {
title: string;
content: string;
related_productions: StrapiRelation<Production, 'questions'>[];
}

View File

@ -0,0 +1,12 @@
export interface StrapiCompanyProfile extends StrapiEntity {
content: string;
}
export interface StrapiContactInfo extends StrapiEntity {
content: string;
}
export interface StrapiHomepage extends StrapiEntity {
carousel: StrapiImage[];
recommend_productions: StrapiRelation<Production>[];
}

View File

@ -0,0 +1,13 @@
import type { StrapiEntity, StrapiImage } from './common';
export interface SolutionType extends StrapiEntity {
type: string;
}
export interface Solution extends StrapiEntity {
title: string;
summary: string;
cover: StrapiImage;
solution_type: SolutionType;
content: string;
}