fix: 优化axios实例请求异常提示

main
wu.jian2 2 years ago
parent 1c6645d7f6
commit 7ed7eb9e21

@ -210,8 +210,16 @@ export function download (url, headers = {}, params = {}, body = {}) {
}).catch(e => { }).catch(e => {
const status = e?.response?.status const status = e?.response?.status
if (status === 404) { if (status === 404) {
Message({
message: '文件不存在或已被删除',
type: 'error'
})
return return
} }
Message({
message: '服务异常',
type: 'error'
})
console.error('服务异常') console.error('服务异常')
}) })
}) })

Loading…
Cancel
Save