From 16696b259e984e86d07ae981d031d0c54bdc7089 Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期五, 08 三月 2024 10:05:39 +0800
Subject: [PATCH] 1、消息确认页面完成所有布局及功能 2、通过调整刷新页面的登出账号方式为路由跳转至登录页面,以试图解决token过期后无法正常跳转的问题(未在现场调试)

---
 src/utils/request.js |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/utils/request.js b/src/utils/request.js
index 4f0c381..26a7423 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -79,7 +79,8 @@
         if (token) {
           store.dispatch('Logout').then(() => {
             setTimeout(() => {
-              window.location.reload()
+              router.push({ path: '/user/login' });
+              // window.location.reload()
             }, 1500)
           })
         }
@@ -169,7 +170,10 @@
             onOk: () => {
               store.dispatch('Logout').then(() => {
                 Vue.ls.remove(ACCESS_TOKEN)
-                window.location.reload()
+                setTimeout(() => {
+                  router.push({ path: '/user/login' });
+                  // window.location.reload()
+                }, 1500)
               })
             }
           })

--
Gitblit v1.9.3