bihuisong 1 年之前
父节点
当前提交
fda09f4f66
共有 2 个文件被更改,包括 10 次插入9 次删除
  1. 9 9
      songhua-ui/src/layout/components/Navbar.vue
  2. 1 0
      songhua-ui/src/permission.js

+ 9 - 9
songhua-ui/src/layout/components/Navbar.vue

@@ -102,15 +102,15 @@ export default {
         type: 'warning'
       }).then(() => {
         this.$store.dispatch('LogOut').then(() => {
-          // location.href = '/index';
-          ajax('/sso/logout', {}, function(res) {
-            // 根据返回的状态码执行不同动作
-            if(res.code === 200) {
-              location.href = res.data;
-            } else {
-              alert(res.msg);
-            }
-          });
+          location.href = '/index';
+          // ajax('/sso/logout', {}, function(res) {
+          //   // 根据返回的状态码执行不同动作
+          //   if(res.code === 200) {
+          //     location.href = res.data;
+          //   } else {
+          //     alert(res.msg);
+          //   }
+          // });
         })
       }).catch(() => {});
     }

+ 1 - 0
songhua-ui/src/permission.js

@@ -48,6 +48,7 @@ router.beforeEach((to, from, next) => {
       next()
     } else {
       next(`/login?redirect=${encodeURIComponent(to.fullPath)}`) // 否则全部重定向到登录页
+      NProgress.done()
       // next(`/sso-login`) // 否则全部重定向到单点登录的登录页,而不是再进入原来的登录页
       // NProgress.done()
     }