feat : 403 权限校验

This commit is contained in:
clay
2024-03-29 15:20:52 +08:00
parent c88be616fc
commit 2ad0dbf8ab

View File

@@ -48,9 +48,8 @@ serveice.interceptors.response.use(response=>{
case 402:
break;
case 403:
ElMessage.warning('禁止访问')
removeToken()
window.location = '/forbidden'
console.log(response)
ElMessage.warning(response.data.msg)
break;
case 404:
ElMessage.warning('不存在的地址')
@@ -58,6 +57,11 @@ serveice.interceptors.response.use(response=>{
case 405:
ElMessage.warning('传输格式错误,请检查')
break;
case 511:
ElMessage.warning('禁止访问')
removeToken()
window.location = '/forbidden'
break;
case 500:
if (response.data){
return response.data