修改isTransformResponse
This commit is contained in:
parent
12b5fec18c
commit
b1f769d4b3
@ -152,7 +152,8 @@ export function userExport() {
|
||||
return http.request({
|
||||
url: '/user/export',
|
||||
method: 'GET',
|
||||
responseType: 'blob'
|
||||
},{
|
||||
isTransformResponse: false,
|
||||
});
|
||||
}
|
||||
/**
|
||||
|
@ -55,9 +55,6 @@ const transform: AxiosTransform = {
|
||||
// return '[HTTP] Request has no return value';
|
||||
throw new Error('请求出错,请稍候重试');
|
||||
}
|
||||
if(res.config.responseType=="blob"){
|
||||
return res.data
|
||||
}
|
||||
// 这里 code,result,message为 后台统一的字段,需要修改为项目自己的接口返回格式
|
||||
const { code, data, msg } = res.data;
|
||||
// 请求成功
|
||||
|
Loading…
Reference in New Issue
Block a user