lrf402788946 hace 5 años
padre
commit
04843e1cda
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      router/before.js

+ 2 - 2
router/before.js

@@ -1,8 +1,8 @@
 import store from '@/store/index';
 
 const checkLogin = router => {
-  router.beforeEach((to, form, next) => {
-    store.dispatch('login/toGetUser');
+  router.beforeEach(async (to, form, next) => {
+    let res = await store.dispatch('login/toGetUser');
     // if (to.name === 'login') {
     //   next();
     //   return;