Commit 212ec202 authored by 张伯涛's avatar 张伯涛

接口410判断

parent 5520b673
......@@ -5,6 +5,7 @@ import Qs from 'qs'
import { getToken, setToken } from '@/utils/auth'
import SM4 from './gmUtil'
import errorCode from '@/utils/errorCode'
import router from '../router'
import { refreshToken } from '@/api/login.js'
axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'
......@@ -101,6 +102,14 @@ service.interceptors.response.use(res => {
// location.reload() // 为了重新实例化vue-router对象 避免bug
// })
// })
} else if (code === 410) {
Message({
message: '当前登录无权限,请重新登录',
type: 'error'
})
store.dispatch('FedLogOut').then(() => {
location.reload()
})
} else if (code === 500 || code === 400) {
const errMsg = res.data.data || res.data.message || res.data.msg
Message({
......
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