|
@@ -1,18 +1,8 @@
|
|
|
import store from '@/store/index';
|
|
|
|
|
|
-const checkLogin = router => {
|
|
|
+const checkLogin = (router, func) => {
|
|
|
router.beforeEach(async (to, form, next) => {
|
|
|
- let res = await store.dispatch('login/toGetUser');
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ let res = await store.dispatch('login/toGetUser', func ? func : null);
|
|
|
next();
|
|
|
});
|
|
|
};
|