|
@@ -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;
|