feat: refactoring API

This commit is contained in:
kailong321200875
2022-06-25 21:56:24 +08:00
parent 43518532f1
commit 37b75839a5
29 changed files with 198 additions and 339 deletions

4
types/global.d.ts vendored
View File

@@ -25,7 +25,7 @@ declare type AxiosMethod = 'get' | 'post' | 'delete' | 'put'
declare type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'
declare type AxiosConfig = {
declare interface AxiosConfig {
params?: any
data?: any
url?: string
@@ -36,5 +36,5 @@ declare type AxiosConfig = {
declare interface IResponse<T = any> {
code: string
result: T extends any ? T : T & any
data: T extends any ? T : T & any
}