Commit 5cb7461e by zhuzhequan

请求 清空缓存,跳到登录

parent b9a29b71
......@@ -25,6 +25,7 @@ axios.interceptors.response.use(
(res) => {
if (res.status === 200) {
if (res.data.code === 401) {
localStorage.clear()
// token过期
Vue.prototype.$message({
type: 'error',
......@@ -50,6 +51,7 @@ axios.interceptors.response.use(
})
return Promise.reject(res.data)
} else if (res.data.code === 403) {
localStorage.clear()
// token过期
if (HTTPNUM === 0) {
HTTPNUM++
......
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