We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent beff80c commit a890737Copy full SHA for a890737
src/utils/axios-req.js
@@ -67,20 +67,12 @@ service.interceptors.response.use(
67
loadingInstance && loadingInstance.close()
68
}
69
//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
- })
+ if (res.data?.type?.includes("sheet")) {
+ return res
81
82
const { code, msg } = res.data
83
const successCode = '0,200,20000'
+ const noAuthCode = '401,403'
84
if (successCode.includes(code)) {
85
return res.data
86
} else {
0 commit comments