init
This commit is contained in:
37
app/types/article.ts
Normal file
37
app/types/article.ts
Normal file
@ -0,0 +1,37 @@
|
||||
export interface Article {
|
||||
id: number;
|
||||
title: string;
|
||||
image: string;
|
||||
intro: string;
|
||||
visit: number;
|
||||
collect: boolean;
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface ArticleListParams {
|
||||
cid?: string;
|
||||
}
|
||||
|
||||
export interface ArticleDetail {
|
||||
id: number;
|
||||
cid: number;
|
||||
category: string;
|
||||
title: string;
|
||||
intro: string;
|
||||
summary: string;
|
||||
image: string;
|
||||
content: string;
|
||||
author: string;
|
||||
visit: number;
|
||||
sort: number;
|
||||
isCollect: number;
|
||||
createTime: string;
|
||||
updateTime: string;
|
||||
// prev: Prev
|
||||
// next: Next
|
||||
// news: News[]
|
||||
}
|
||||
|
||||
export interface ArticleDetailParams {
|
||||
id: string;
|
||||
}
|
13
app/types/base.ts
Normal file
13
app/types/base.ts
Normal file
@ -0,0 +1,13 @@
|
||||
export interface BaseResponse<T> {
|
||||
code: number;
|
||||
msg: string;
|
||||
data: T;
|
||||
}
|
||||
|
||||
export interface PageData<T> {
|
||||
count: number;
|
||||
pageNo: number;
|
||||
pageSize: number;
|
||||
extend: any;
|
||||
lists: T[];
|
||||
}
|
Reference in New Issue
Block a user