From b1f769d4b3945515353160923817a43f79805be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=BA=A2=E4=B8=BD?= <1181930680@qq.com> Date: Tue, 30 Jul 2024 10:04:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9isTransformResponse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/user.ts | 3 ++- src/utils/http/axios/index.ts | 3 --- src/views/monitor/job/index.vue | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 0d69094..59d65d2 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -152,7 +152,8 @@ export function userExport() { return http.request({ url: '/user/export', method: 'GET', - responseType: 'blob' + },{ + isTransformResponse: false, }); } /** diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index 6e99b70..332492a 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -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; // 请求成功 diff --git a/src/views/monitor/job/index.vue b/src/views/monitor/job/index.vue index 15dfc02..ebf0919 100644 --- a/src/views/monitor/job/index.vue +++ b/src/views/monitor/job/index.vue @@ -136,7 +136,7 @@ const selectionData = ref([]) }, ], select: (key) => { - if(key=='runOnce') { + if(key=='runOnce') { handelRunOnce(record) } else if(key=='jobLog'){ handleJobLog(record)