From 58f8fbaffa4082e708c217e08b7782e908cce1fe Mon Sep 17 00:00:00 2001 From: bb_pan Date: Thu, 17 Apr 2025 11:05:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(() => {