Pārlūkot izejas kodu

Merge branch 'test' into 'master'

Test

See merge request spfm-group/spfm-market-front!6
侯利飞 3 gadi atpakaļ
vecāks
revīzija
082c2b1b77
1 mainītis faili ar 13 papildinājumiem un 9 dzēšanām
  1. 13 9
      src/router/index.js

+ 13 - 9
src/router/index.js

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