From cf9495cfb1424816167586fa985ecdf29a923eea Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 26 Sep 2022 17:25:23 +0800
Subject: [PATCH] 替换原登录页为统一登录页

---
 src/page/login/authredirect.vue |    3 ++-
 src/router/axios.js             |    5 ++++-
 src/page/lock/index.vue         |    3 ++-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/page/lock/index.vue b/src/page/lock/index.vue
index 26cb451..44467f3 100644
--- a/src/page/lock/index.vue
+++ b/src/page/lock/index.vue
@@ -49,7 +49,8 @@
         type: "warning"
       }).then(() => {
         this.$store.dispatch("LogOut").then(() => {
-          this.$router.push({ path: "/login" });
+          // this.$router.push({ path: "/login" });
+          window.opener.location.href = 'http://dev.jxpskj.com:8020/ncny/login.html'
         });
       });
     },
diff --git a/src/page/login/authredirect.vue b/src/page/login/authredirect.vue
index 15cbce1..edc61db 100644
--- a/src/page/login/authredirect.vue
+++ b/src/page/login/authredirect.vue
@@ -10,7 +10,8 @@
     const params = this.$route.query
     const state = params.state
     const code = params.code
-    window.opener.location.href = `${window.location.origin}/#/login?state=${state}&code=${code}`
+    // window.opener.location.href = `${window.location.origin}/#/login?state=${state}&code=${code}`
+    window.opener.location.href = 'http://dev.jxpskj.com:8020/ncny/login.html'
   }
 }
 </script>
diff --git a/src/router/axios.js b/src/router/axios.js
index 101fa8a..f2ced43 100644
--- a/src/router/axios.js
+++ b/src/router/axios.js
@@ -67,7 +67,10 @@
   //如果在白名单里则自行catch逻辑处理
   if (statusWhiteList.includes(status)) return Promise.reject(res);
   //如果是401则跳转到登录页面
-  if (status === 401) store.dispatch('FedLogOut').then(() => router.push({path: '/login'}));
+  if (status === 401) store.dispatch('FedLogOut').then(() => 
+    // router.push({path: '/login'})
+    window.opener.location.href = 'http://dev.jxpskj.com:8020/ncny/login.html'
+  );
   // 如果请求为非200否者默认统一处理
   if (status !== 200) {
     Message({

--
Gitblit v1.9.3