dedsudiyu hai 1 ano
pai
achega
51751484b8

+ 0 - 1
src/layout/components/Navbar.vue

@@ -126,7 +126,6 @@ export default {
         type: 'warning'
       }).then(() => {
         this.$store.dispatch('LogOut').then(() => {
-          this.$router.push({ path: '/login' });
         })
       }).catch(() => {});
     }

+ 0 - 3
src/layout/components/Sidebar/index.vue

@@ -104,9 +104,6 @@ export default {
             list.push(this.$store.state.tagsView.visitedViews[0]);
             this.$store.state.tagsView.visitedViews = [];
             this.$store.state.tagsView.visitedViews.push(list[0]);
-            console.log('visitedViews',this.$store.state.tagsView.visitedViews)
-            // location.href = localStorage.getItem('windowHref');
-            this.$router.push({ path:"/login" }).catch(()=>{});
           })
         }).catch(() => {});
       }

+ 0 - 1
src/permission.js

@@ -30,7 +30,6 @@ router.beforeEach((to, from, next) => {
         }).catch(err => {
             store.dispatch('LogOut').then(() => {
               Message.error(err)
-              next({ path: '/' })
             })
           })
       } else {

+ 0 - 4
src/store/modules/user.js

@@ -111,9 +111,6 @@ const user = {
           }else{
             store.dispatch('LogOut').then(() => {
               localStorage.removeItem('serviceType');
-              router.replace({
-                path: '/login'
-              })
             })
             return
           }
@@ -143,7 +140,6 @@ const user = {
         commit('SET_ROLES', [])
         commit('SET_PERMISSIONS', [])
         removeToken()
-        debugger
         logout(state.token).then(() => {
           // commit('SET_TOKEN', '')
           // commit('SET_ROLES', [])

+ 0 - 3
src/utils/bigDataRequest.js

@@ -88,9 +88,6 @@ service.interceptors.response.use(res => {
         ).then(() => {
           store.dispatch('LogOut').then(() => {
             localStorage.removeItem('serviceType');
-            router.replace({
-              path: '/login'
-            })
             // location.href = '/index';
           })
           return

+ 1 - 5
src/utils/request.js

@@ -82,6 +82,7 @@ service.interceptors.response.use(res => {
     //   // window.location.href = 'https://icas.jnu.edu.cn/cas/login?service=http://localhost:8081/#/login';
     //   return
     // }
+    debugger
     if(res.config.url == '/auth/logout'&&res.request.responseURL){
       window.location.href = res.request.responseURL;
       return
@@ -99,11 +100,6 @@ service.interceptors.response.use(res => {
         ).then(() => {
           localStorage.removeItem('serviceType');
           store.dispatch('LogOut').then(() => {
-            // localStorage.removeItem('serviceType');
-            router.replace({
-              path: '/login'
-            })
-            // location.href = '/index';
           })
           return
         }).catch(() => {});

+ 0 - 1
src/views/homeNavbar.vue

@@ -121,7 +121,6 @@ export default {
         type: 'warning'
       }).then(() => {
         this.$store.dispatch('LogOut').then(() => {
-          this.$router.push({ path: '/login' });
         })
       }).catch(() => {});
     }