diff --git a/src/utils/request.js b/src/utils/request.js index 91bc5cd6..18c24eee 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -112,9 +112,9 @@ service.interceptors.response.use(res => { if (code === 401) { console.log('🚀 ~ process.env.VUE_APP_BASE_API:', process.env.VUE_APP_BASE_API) if (process.env.VUE_APP_BASE_API == '/iws/jiju-api') { - this.$store.dispatch('LogOut').then(() => { + store.dispatch('LogOut').then(() => { }).catch((err) => { - console.log('🚀 ~ this.$store.dispatch ~ err:', err) + console.log('🚀 ~ store.dispatch ~ err:', err) }) setTimeout(() => { // 'http://sgwpdm.ah.sgcc.com.cn/iws/cas/login?appId=3874dcb953f184dc75450e33d6d6d4fa&service=http://sgwpdm.ah.sgcc.com.cn/iws/mea-view/', @@ -123,7 +123,7 @@ service.interceptors.response.use(res => { ) }, 500) } else { - this.$store.dispatch('LogOut').then(() => { + store.dispatch('LogOut').then(() => { // location.href = '/login' router.push('/login') }).catch(() => {