Commit c1747a02 authored by lishangbu's avatar lishangbu

添加新特性:触发没有权限的操作时强制登出

parent 219890c2
......@@ -44,6 +44,11 @@ axios.interceptors.response.use(data => {
message: errorCode[code] || errorCode['default'],
type: 'error'
})
if(parseInt(code) === 401 || parseInt(code) === 403){
store.dispatch('FedLogOut').then(() => {
router.push({ path: '/login' });
})
}
return Promise.reject(new Error(error))
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment