锁定问题解决
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2024-11-14 17:05:38 +08:00
parent fbbcad359c
commit b076c1edbd
2 changed files with 5 additions and 0 deletions

View File

@ -596,3 +596,4 @@ VueInit()
// }); // });
export default _vm

View File

@ -1,4 +1,5 @@
import axios from 'axios' import axios from 'axios'
import _vm from '@/main'
import { Message, MessageBox, Alert } from 'element-ui' import { Message, MessageBox, Alert } from 'element-ui'
import store from '@/store' import store from '@/store'
import router from '@/router' import router from '@/router'
@ -90,6 +91,9 @@ service.interceptors.response.use(
const status = error.response.status const status = error.response.status
if (error.response.data && (error.response.data.Code === -1 || error.response.data.Code === -2)) { if (error.response.data && (error.response.data.Code === -1 || error.response.data.Code === -2)) {
store.dispatch('user/logout').then(() => { store.dispatch('user/logout').then(() => {
if (_vm.$msgbox) {
_vm.$msgbox.close();
}
router.push(`/login`) router.push(`/login`)
this.$i18n.locale = 'zh' this.$i18n.locale = 'zh'
this.setLanguage('zh') this.setLanguage('zh')