Skip to content

Commit a890737

Browse files
committed
fix element-plus version issue
1 parent beff80c commit a890737

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/utils/axios-req.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,12 @@ service.interceptors.response.use(
6767
loadingInstance && loadingInstance.close()
6868
}
6969
//download file
70-
const noAuthCode = '401,403'
71-
if (res.data?.size) {
72-
new Response(res.data).text().then((stringData) => {
73-
const parseJson = JSON.parse(stringData)
74-
if (noAuthCode.includes(parseJson.code)) {
75-
noAuthDill()
76-
return
77-
} else {
78-
return res
79-
}
80-
})
70+
if (res.data?.type?.includes("sheet")) {
71+
return res
8172
}
8273
const { code, msg } = res.data
8374
const successCode = '0,200,20000'
75+
const noAuthCode = '401,403'
8476
if (successCode.includes(code)) {
8577
return res.data
8678
} else {

0 commit comments

Comments
 (0)