diff --git a/src/utils/request.js b/src/utils/request.js index 09b5f36..a1d99e7 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -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