潘志宝
2025-02-05 3e5f6c444a32a66a6111aacd3a4c5212c32bdf9e
src/config/axios/index.ts
@@ -43,6 +43,10 @@
    const res = await request({ method: 'GET', responseType: 'blob', ...option })
    return res as unknown as Promise<T>
  },
  downloadByPost: 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) => {
    option.headersType = 'multipart/form-data'
    const res = await request({ method: 'POST', ...option })