refactor: 优化前端错误提示
This commit is contained in:
parent
2e6f5df1ef
commit
4b43a2cd8b
|
@ -61,7 +61,7 @@ export default {
|
||||||
window.console.error(error.response || error.message);
|
window.console.error(error.response || error.message);
|
||||||
if (error.response && error.response.data) {
|
if (error.response && error.response.data) {
|
||||||
if (error.response.headers["authentication-status"] !== "invalid") {
|
if (error.response.headers["authentication-status"] !== "invalid") {
|
||||||
Message.error({message: error.response.data.message, showClose: true});
|
Message.error({message: error.response.data.message || error.response.data, showClose: true});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Message.error({message: error.message, showClose: true});
|
Message.error({message: error.message, showClose: true});
|
||||||
|
|
Loading…
Reference in New Issue