perf: 优化403错误提示
This commit is contained in:
parent
1d8da7ee50
commit
1a69f5ae8d
@ -92,8 +92,12 @@ service.interceptors.response.use(
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
let msg = '哎呀!服务器出错了,请稍后再试!'
|
||||||
|
if (error.response && error.response.status === 403) {
|
||||||
|
msg = '您的请求被服务器拒绝!'
|
||||||
|
}
|
||||||
Vue.prototype.$message({
|
Vue.prototype.$message({
|
||||||
message: '哎呀!服务器出错了,请稍后再试!',
|
message: msg,
|
||||||
type: 'error',
|
type: 'error',
|
||||||
duration: 5 * 1000
|
duration: 5 * 1000
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user