( url: string, data?: unknown, config?: AxiosRequestConfig )
| 142 | |
| 143 | // 封装 POST 请求 |
| 144 | export const post = async <T = unknown>( |
| 145 | url: string, |
| 146 | data?: unknown, |
| 147 | config?: AxiosRequestConfig |
| 148 | ): Promise<T> => { |
| 149 | const response = await request.post<T>(url, data, config) |
| 150 | return response.data |
| 151 | } |
| 152 | |
| 153 | // 封装 PUT 请求 |
| 154 | export const put = async <T = unknown>( |
no outgoing calls
no test coverage detected