fix: 修改request提示

This commit is contained in:
lilinyuan
2024-03-29 15:41:21 +08:00
parent a5a2e099a2
commit e418b588f6

View File

@@ -48,13 +48,12 @@ serveice.interceptors.response.use(response=>{
case 402:
break;
case 403:
console.log(response)
ElNotification({
title: '系统提示',
message: '禁止访问',
message: response.data.msg,
type: 'warning'
})
removeToken()
window.location = '/forbidden'
break;
case 404:
ElNotification({
@@ -70,6 +69,15 @@ serveice.interceptors.response.use(response=>{
type: 'error'
})
break;
case 511:
ElNotification({
title: '系统提示',
message: '禁止访问',
type: 'error'
})
removeToken()
window.location = '/forbidden'
break;
case 500:
if (response.data){
return response.data