|
@@ -9,22 +9,22 @@ const baseServer = axios.create({
|
|
},
|
|
},
|
|
})
|
|
})
|
|
|
|
|
|
-interface AuthSuccess {
|
|
|
|
|
|
+export interface AuthSuccess {
|
|
code: 200
|
|
code: 200
|
|
token: string
|
|
token: string
|
|
}
|
|
}
|
|
|
|
|
|
-interface AuthFailed {
|
|
|
|
|
|
+export interface AuthFailed {
|
|
code: 401
|
|
code: 401
|
|
msg: string
|
|
msg: string
|
|
}
|
|
}
|
|
|
|
|
|
-interface PostListSuccess {
|
|
|
|
|
|
+export interface PostListSuccess {
|
|
code: number
|
|
code: number
|
|
data: Datum[]
|
|
data: Datum[]
|
|
}
|
|
}
|
|
|
|
|
|
-interface Datum {
|
|
|
|
|
|
+export interface Datum {
|
|
id: number
|
|
id: number
|
|
title: string
|
|
title: string
|
|
createdAt: string
|
|
createdAt: string
|
|
@@ -32,23 +32,23 @@ interface Datum {
|
|
tags: Tag[]
|
|
tags: Tag[]
|
|
}
|
|
}
|
|
|
|
|
|
-interface Tag {
|
|
|
|
|
|
+export interface Tag {
|
|
name: string
|
|
name: string
|
|
id: number
|
|
id: number
|
|
color: string
|
|
color: string
|
|
}
|
|
}
|
|
|
|
|
|
-interface TagList {
|
|
|
|
|
|
+export interface TagList {
|
|
code: number
|
|
code: number
|
|
data: Tag[]
|
|
data: Tag[]
|
|
}
|
|
}
|
|
|
|
|
|
-interface PostGetSuccess {
|
|
|
|
|
|
+export interface PostGetSuccess {
|
|
code: number
|
|
code: number
|
|
data: PostDetail
|
|
data: PostDetail
|
|
}
|
|
}
|
|
|
|
|
|
-interface PostDetail {
|
|
|
|
|
|
+export interface PostDetail {
|
|
id: number
|
|
id: number
|
|
title: string
|
|
title: string
|
|
content: string
|
|
content: string
|
|
@@ -57,18 +57,18 @@ interface PostDetail {
|
|
tags: Tag[]
|
|
tags: Tag[]
|
|
}
|
|
}
|
|
|
|
|
|
-interface DefaultFailedResponse {
|
|
|
|
|
|
+export interface DefaultFailedResponse {
|
|
code: 404
|
|
code: 404
|
|
msg: string
|
|
msg: string
|
|
}
|
|
}
|
|
|
|
|
|
-interface PostBody {
|
|
|
|
|
|
+export interface PostBody {
|
|
title: string
|
|
title: string
|
|
content: string
|
|
content: string
|
|
tags: string[]
|
|
tags: string[]
|
|
}
|
|
}
|
|
|
|
|
|
-interface PushSuccess {
|
|
|
|
|
|
+export interface PushSuccess {
|
|
code: number
|
|
code: number
|
|
msg: string
|
|
msg: string
|
|
data: {
|
|
data: {
|
|
@@ -76,7 +76,7 @@ interface PushSuccess {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-interface UpdateSuccess {
|
|
|
|
|
|
+export interface UpdateSuccess {
|
|
code: 200,
|
|
code: 200,
|
|
msg: string
|
|
msg: string
|
|
}
|
|
}
|