|
@ -47,6 +47,10 @@ export default { |
|
|
const res = await request({ method: 'GET', responseType: 'blob', ...option }) |
|
|
const res = await request({ method: 'GET', responseType: 'blob', ...option }) |
|
|
return res as unknown as Promise<T> |
|
|
return res as unknown as Promise<T> |
|
|
}, |
|
|
}, |
|
|
|
|
|
downloadPost: async <T = any>(option: any) => { |
|
|
|
|
|
const res = await request({ method: 'POST', responseType: 'blob', ...option }) |
|
|
|
|
|
return res as unknown as Promise<T> |
|
|
|
|
|
}, |
|
|
upload: async <T = any>(option: any) => { |
|
|
upload: async <T = any>(option: any) => { |
|
|
option.headersType = 'multipart/form-data' |
|
|
option.headersType = 'multipart/form-data' |
|
|
const res = await request({ method: 'POST', ...option }) |
|
|
const res = await request({ method: 'POST', ...option }) |
|
|