feat: vue3 axios add download function

This commit is contained in:
xingyu
2022-07-25 21:03:14 +08:00
parent 611e11ae23
commit b085f35dfe
26 changed files with 48 additions and 37 deletions

View File

@ -39,7 +39,7 @@ export const deleteAppApi = (id: number) => {
// 导出支付应用
export const exportAppApi = (params) => {
return request.get({ url: '/pay/app/export-excel', params, responseType: 'blob' })
return request.download({ url: '/pay/app/export-excel', params })
}
// 根据商ID称搜索应用列表

View File

@ -35,5 +35,5 @@ export const deleteChannelApi = (id: number) => {
// 导出支付渠道
export const exportChannelApi = (params) => {
return request.get({ url: '/pay/channel/export-excel', params, responseType: 'blob' })
return request.download({ url: '/pay/channel/export-excel', params })
}

View File

@ -40,7 +40,7 @@ export const deleteMerchantApi = (id: number) => {
// 导出支付商户
export const exportMerchantApi = (params) => {
return request.get({ url: '/pay/merchant/export-excel', params, responseType: 'blob' })
return request.download({ url: '/pay/merchant/export-excel', params })
}
// 支付商户状态修改
export const changeMerchantStatusApi = (id: number, status: number) => {

View File

@ -30,5 +30,5 @@ export const deleteOrderApi = async (id: number) => {
// 导出支付订单
export const exportOrderApi = async (params) => {
return await request.get({ url: '/pay/order/export-excel', params, responseType: 'blob' })
return await request.download({ url: '/pay/order/export-excel', params })
}

View File

@ -30,5 +30,5 @@ export const deleteRefundApi = (id: number) => {
// 导出退款订单
export const exportRefundApi = (params) => {
return request.get({ url: '/pay/refund/export-excel', params, responseType: 'blob' })
return request.download({ url: '/pay/refund/export-excel', params })
}