Commit eff9cb6510b23fd65d80d36ffaa131a48212379c

Authored by xingyu
1 parent 460597e0

perf: remove console

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