fix: 修改request提示
This commit is contained in:
@@ -48,13 +48,12 @@ serveice.interceptors.response.use(response=>{
|
|||||||
case 402:
|
case 402:
|
||||||
break;
|
break;
|
||||||
case 403:
|
case 403:
|
||||||
|
console.log(response)
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '系统提示',
|
title: '系统提示',
|
||||||
message: '禁止访问',
|
message: response.data.msg,
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
removeToken()
|
|
||||||
window.location = '/forbidden'
|
|
||||||
break;
|
break;
|
||||||
case 404:
|
case 404:
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@@ -70,6 +69,15 @@ serveice.interceptors.response.use(response=>{
|
|||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
|
case 511:
|
||||||
|
ElNotification({
|
||||||
|
title: '系统提示',
|
||||||
|
message: '禁止访问',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
removeToken()
|
||||||
|
window.location = '/forbidden'
|
||||||
|
break;
|
||||||
case 500:
|
case 500:
|
||||||
if (response.data){
|
if (response.data){
|
||||||
return response.data
|
return response.data
|
||||||
|
|||||||
Reference in New Issue
Block a user