mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-27 01:32:03 +08:00
perf: remove console
This commit is contained in:
parent
6b2fbdf8c1
commit
a1f10e68f5
@ -20,37 +20,31 @@ const request = (option: AxiosConfig) => {
|
|||||||
|
|
||||||
async function getFn<T = any>(option: AxiosConfig): Promise<T> {
|
async function getFn<T = any>(option: AxiosConfig): Promise<T> {
|
||||||
const res = await request({ method: 'GET', ...option })
|
const res = await request({ method: 'GET', ...option })
|
||||||
console.info(res)
|
|
||||||
return res.data
|
return res.data
|
||||||
}
|
}
|
||||||
|
|
||||||
async function postFn<T = any>(option: AxiosConfig): Promise<T> {
|
async function postFn<T = any>(option: AxiosConfig): Promise<T> {
|
||||||
const res = await request({ method: 'POST', ...option })
|
const res = await request({ method: 'POST', ...option })
|
||||||
console.info(res)
|
|
||||||
return res.data
|
return res.data
|
||||||
}
|
}
|
||||||
|
|
||||||
async function deleteFn<T = any>(option: AxiosConfig): Promise<T> {
|
async function deleteFn<T = any>(option: AxiosConfig): Promise<T> {
|
||||||
const res = await request({ method: 'DELETE', ...option })
|
const res = await request({ method: 'DELETE', ...option })
|
||||||
console.info(res)
|
|
||||||
return res.data
|
return res.data
|
||||||
}
|
}
|
||||||
|
|
||||||
async function putFn<T = any>(option: AxiosConfig): Promise<T> {
|
async function putFn<T = any>(option: AxiosConfig): Promise<T> {
|
||||||
const res = await request({ method: 'PUT', ...option })
|
const res = await request({ method: 'PUT', ...option })
|
||||||
console.info(res)
|
|
||||||
return res.data
|
return res.data
|
||||||
}
|
}
|
||||||
async function downloadFn<T = any>(option: AxiosConfig): Promise<T> {
|
async function downloadFn<T = any>(option: AxiosConfig): Promise<T> {
|
||||||
const res = await request({ method: 'GET', responseType: 'blob', ...option })
|
const res = await request({ method: 'GET', responseType: 'blob', ...option })
|
||||||
console.info(res)
|
|
||||||
return res as unknown as Promise<T>
|
return res as unknown as Promise<T>
|
||||||
}
|
}
|
||||||
|
|
||||||
async function uploadFn<T = any>(option: AxiosConfig): Promise<T> {
|
async function uploadFn<T = any>(option: AxiosConfig): Promise<T> {
|
||||||
option.headersType = 'multipart/form-data'
|
option.headersType = 'multipart/form-data'
|
||||||
const res = await request({ method: 'PUT', ...option })
|
const res = await request({ method: 'PUT', ...option })
|
||||||
console.info(res)
|
|
||||||
return res as unknown as Promise<T>
|
return res as unknown as Promise<T>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user