Commit eff9cb6510b23fd65d80d36ffaa131a48212379c
1 parent
460597e0
perf: remove console
Showing
1 changed file
with
0 additions
and
6 deletions
yudao-ui-admin-vue3/src/hooks/web/useAxios.ts
| ... | ... | @@ -20,37 +20,31 @@ const request = (option: AxiosConfig) => { |
| 20 | 20 | |
| 21 | 21 | async function getFn<T = any>(option: AxiosConfig): Promise<T> { |
| 22 | 22 | const res = await request({ method: 'GET', ...option }) |
| 23 | - console.info(res) | |
| 24 | 23 | return res.data |
| 25 | 24 | } |
| 26 | 25 | |
| 27 | 26 | async function postFn<T = any>(option: AxiosConfig): Promise<T> { |
| 28 | 27 | const res = await request({ method: 'POST', ...option }) |
| 29 | - console.info(res) | |
| 30 | 28 | return res.data |
| 31 | 29 | } |
| 32 | 30 | |
| 33 | 31 | async function deleteFn<T = any>(option: AxiosConfig): Promise<T> { |
| 34 | 32 | const res = await request({ method: 'DELETE', ...option }) |
| 35 | - console.info(res) | |
| 36 | 33 | return res.data |
| 37 | 34 | } |
| 38 | 35 | |
| 39 | 36 | async function putFn<T = any>(option: AxiosConfig): Promise<T> { |
| 40 | 37 | const res = await request({ method: 'PUT', ...option }) |
| 41 | - console.info(res) | |
| 42 | 38 | return res.data |
| 43 | 39 | } |
| 44 | 40 | async function downloadFn<T = any>(option: AxiosConfig): Promise<T> { |
| 45 | 41 | const res = await request({ method: 'GET', responseType: 'blob', ...option }) |
| 46 | - console.info(res) | |
| 47 | 42 | return res as unknown as Promise<T> |
| 48 | 43 | } |
| 49 | 44 | |
| 50 | 45 | async function uploadFn<T = any>(option: AxiosConfig): Promise<T> { |
| 51 | 46 | option.headersType = 'multipart/form-data' |
| 52 | 47 | const res = await request({ method: 'PUT', ...option }) |
| 53 | - console.info(res) | |
| 54 | 48 | return res as unknown as Promise<T> |
| 55 | 49 | } |
| 56 | 50 | ... | ... |