Browse Source

单点登录

mqd 3 years ago
parent
commit
04fb6423f8
1 changed files with 8 additions and 8 deletions
  1. 8 8
      src/router/index.js

+ 8 - 8
src/router/index.js

@@ -1663,18 +1663,18 @@ let menuList = [];
 router.beforeEach((to, from, next) => {
 router.beforeEach((to, from, next) => {
     if (to.name == 'login') {
     if (to.name == 'login') {
         //window.location.href = "http://cas.hl.cmcc/cas/login?service=?service=http%3A%2F%2F10.230.26.15%3A8000%2Fspfm%2Fsysmgr%2FssLogin%3FsysFlag%3D0"
         //window.location.href = "http://cas.hl.cmcc/cas/login?service=?service=http%3A%2F%2F10.230.26.15%3A8000%2Fspfm%2Fsysmgr%2FssLogin%3FsysFlag%3D0"
+        next()
+    } else {
         if (window.location.href.indexOf('?agileauthtoken=') == -1) {
         if (window.location.href.indexOf('?agileauthtoken=') == -1) {
             window.location.href = "http://10.230.26.15:8000/spfm/sysmgr/ssLogin?sysFlag=0";
             window.location.href = "http://10.230.26.15:8000/spfm/sysmgr/ssLogin?sysFlag=0";
-            //  next()
         } else {
         } else {
             next()
             next()
         }
         }
-    } else {
-        if (window.sessionStorage.agileauthtoken == undefined) {
-             router.push('/login')
-            next()
-        } else {
-            next()
+        // if (window.sessionStorage.agileauthtoken == undefined) {
+        //      router.push('/login')
+        //     next()
+        // } else {
+        //     next()
             //权限控制 过于霸道暂时注释
             //权限控制 过于霸道暂时注释
             // let toNext = false;
             // let toNext = false;
             // let Menus = JSON.parse(window.sessionStorage.childrenMenus);
             // let Menus = JSON.parse(window.sessionStorage.childrenMenus);
@@ -1689,7 +1689,7 @@ router.beforeEach((to, from, next) => {
             // } else {
             // } else {
             //     alert('暂无使用权限');
             //     alert('暂无使用权限');
             // }
             // }
-        }
+        // }
     }
     }
     // let menus = JSON.parse(window.sessionStorage.menus);
     // let menus = JSON.parse(window.sessionStorage.menus);
     // menuList = [];
     // menuList = [];