yuanyuan vor 2 Jahren
Ursprung
Commit
062abfb0d6

+ 4 - 4
src/main/zhi-rong-web/src/mixins/common.js

@@ -117,11 +117,11 @@ export default {
                         cancelButtonText: '取消'
                         cancelButtonText: '取消'
                     })
                     })
                     .then(() => {
                     .then(() => {
-                        // this.$store.commit('loginVerification', true);
+                        this.$store.commit('loginVerification', true);
                         // this.$router.push('/login')
                         // this.$router.push('/login')
-                        this.$router.push({
-                            name: "home"
-                        });
+                        // this.$router.push({
+                        //     name: "home"
+                        // });
                     })
                     })
                     .catch(() => {});
                     .catch(() => {});
 
 

+ 5 - 4
src/main/zhi-rong-web/src/router/index.js

@@ -993,6 +993,7 @@ router.beforeEach((to, from, next) => {
                 next();
                 next();
             })
             })
             .catch(() => {
             .catch(() => {
+                let that = this
                 if (to.meta.checkLogin) {
                 if (to.meta.checkLogin) {
                     next(false);
                     next(false);
                     MessageBox.confirm('用户未登录,是否立即登录', '提示', {
                     MessageBox.confirm('用户未登录,是否立即登录', '提示', {
@@ -1000,11 +1001,11 @@ router.beforeEach((to, from, next) => {
                             cancelButtonText: '取消'
                             cancelButtonText: '取消'
                         })
                         })
                         .then(() => {
                         .then(() => {
-                            // this.$store.commit('loginVerification', true);
+                            store.commit('loginVerification', true);
                             // router.push('/login')
                             // router.push('/login')
-                            router.push({
-                                name: "home"
-                            })
+                            // router.push({
+                            //     name: "home"
+                            // })
                         })
                         })
                         .catch(() => {});
                         .catch(() => {});
                     // next('/login');
                     // next('/login');

+ 0 - 1
src/main/zhi-rong-web/src/store/index.js

@@ -18,7 +18,6 @@ export default new Vuex.Store({
     },
     },
     mutations: {
     mutations: {
         loginVerification(state, loginHome) {
         loginVerification(state, loginHome) {
-            console.log(loginHome)
             state.loginHome = loginHome
             state.loginHome = loginHome
         },
         },
         modifyFlag(state, flag) {
         modifyFlag(state, flag) {