syr před 3 roky
rodič
revize
82d0c54bb2
1 změnil soubory, kde provedl 5 přidání a 4 odebrání
  1. 5 4
      src/router/index.js

+ 5 - 4
src/router/index.js

@@ -1661,13 +1661,14 @@ const router = new VueRouter({
 })
 let menuList = [];
 router.beforeEach((to, from, next) => {
+    console.log("====token===="+window.sessionStorage.agileauthtoken)
     if (to.name == 'login') {
-        next()
+        window.location.href = "http://cas.hl.cmcc/cas?service=http%3A%2F%2F10.230.26.15%3A8000%2Fspfm%2Fsysmgr%2FssLogin%3FsysFlag%3D0"
+
+        // next()
     } else {
         if (window.sessionStorage.agileauthtoken == undefined) {
-            // router.push('/login')
-            window.location.href = "http://cas.hl.cmcc/cas?service=http%3A%2F%2F10.230.26.15%3A8000%2Fspfm%2Fsysmgr%2FssLogin%3FsysFlag%3D0"
-
+             router.push('/login')
             next()
         } else {
             next()