This commit is contained in:
@@ -117,16 +117,24 @@ for (let key in urls) {
|
||||
reslove([ArrayBuffer, Blob].indexOf(data.constructor) > -1 ? res : data)
|
||||
}
|
||||
})
|
||||
.catch(({ response: { data } }) => {
|
||||
.catch(({ response }) => {
|
||||
if (process.env.VUE_APP_NODE_ENV === 'development') {
|
||||
errorNotification(data)
|
||||
const { data, status } = response
|
||||
if (data.constructor === String) {
|
||||
errorNotification({
|
||||
message: data,
|
||||
code: status
|
||||
})
|
||||
} else {
|
||||
errorNotification(data)
|
||||
}
|
||||
reject(data)
|
||||
if (data.code === status.Unauthorized) {
|
||||
handlerUnauthorized()
|
||||
}
|
||||
} else {
|
||||
errorNotification({
|
||||
message: '发生错误,请联系管理员'
|
||||
message: '系统发生错误,请联系管理员'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user