liriming
2025-03-03 d6fd1acfe3cae8ec7e9b2abee436e1fce1025ec2
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 })