axios.interceptors.response.use(config => {
// 返回请求正确的结果
return config;
console.log(config)
}, error => {
console.log(error.response.status)
if(error.response.status===500) {
Message.error('服务器错误,请稍后重试!');
}
})
来源:CSDN
作者:Call_me_small_pure
链接:https://blog.csdn.net/Call_me_small_pure/article/details/103777988