Commit 41d874b1 authored by shangtx's avatar shangtx

fix: 请求错误提示问题

parent 92f1c5ab
...@@ -19,16 +19,16 @@ const err = (error) => { ...@@ -19,16 +19,16 @@ const err = (error) => {
if (error.response) { if (error.response) {
let data = error.response.data let data = error.response.data
if (data.status == SYS_CONST.REQUEST.CONTROLLER_ERROR) { if (data.status == SYS_CONST.REQUEST.CONTROLLER_ERROR) {
notification.error({message: '请求失败', description: data.message}) notification.error({message: '请求失败', description: data.msg})
} else if (data.status == SYS_CONST.REQUEST.NOT_AUTHORITY) { } else if (data.status == SYS_CONST.REQUEST.NOT_AUTHORITY) {
notification.error({message: '权限不足', description: '当前用户无此操作权限,请联系管理员'}) notification.error({message: '权限不足', description: '当前用户无此操作权限,请联系管理员'})
} else if (data.status == SYS_CONST.REQUEST.NOT_LOGIN) { } else if (data.status == SYS_CONST.REQUEST.NOT_LOGIN) {
gotoLogin() gotoLogin()
} else { } else {
notification.error({message: '请求失败', description: ((error.response || {}).data || {}).message || "请求出现错误,请稍后再试"}) notification.error({message: '请求失败', description: ((error.response || {}).data || {}).msg || "请求出现错误,请稍后再试"})
} }
} else { } else {
notification.error({message: '请求失败', description: "请求出现错误,请稍后再试"}) notification.error({message: '请求失败', description: ((error.response || {}).data || {}).msg || "请求出现错误,请稍后再试"})
} }
return Promise.reject(error) return Promise.reject(error)
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment