feat: 将/support/documents路由的数据获取由Strapi转为Directus
- 修改/support/documents.vue,将相关数据获取迁移到Directus - 增添相应的视图模型与映射方法
This commit is contained in:
42
app/models/views/DocumentListView.ts
Normal file
42
app/models/views/DocumentListView.ts
Normal file
@ -0,0 +1,42 @@
|
||||
/**
|
||||
* 文档关联产品类型模型
|
||||
* 用于在文档库中提供产品筛选功能
|
||||
*/
|
||||
export interface DocumentListProductType {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文档关联产品模型
|
||||
* 用于在文档库中提供产品筛选功能
|
||||
*/
|
||||
export interface DocumentListProduct {
|
||||
id: number;
|
||||
name: string;
|
||||
type: DocumentListProductType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文档列表模型
|
||||
* 用于文档库(/support/documents)页面渲染的数据结构
|
||||
*/
|
||||
export interface DocumentListView {
|
||||
/** 唯一标识符 **/
|
||||
id: number;
|
||||
|
||||
/** 文件名 **/
|
||||
filename: string;
|
||||
|
||||
/** 文档标题 **/
|
||||
title: string;
|
||||
|
||||
/** 文档大小 **/
|
||||
size: number;
|
||||
|
||||
/** 文档链接 **/
|
||||
url: string;
|
||||
|
||||
/** 相关产品 **/
|
||||
products: DocumentListProduct[];
|
||||
}
|
||||
Reference in New Issue
Block a user