This commit is contained in:
sedmedgh
2022-01-13 12:39:52 +03:30
parent ea9904acfb
commit 90687db70e
4 changed files with 28 additions and 8 deletions
+4 -2
View File
@@ -1,6 +1,7 @@
import Vue from 'vue'
import Router from 'vue-router'
import 'firebase/auth'
import store from "./store/store";
Vue.use(Router)
@@ -151,16 +152,17 @@ const router = new Router({
],
})
router.afterEach(() => {
router.afterEach((to) => {
const appLoading = document.getElementById('loading-bg')
if (appLoading) {
appLoading.style.display = "none";
}
})
router.beforeEach((to, from, next) => {
router.beforeEach(async (to, from, next) => {
// return next();
let isLogin = sessionStorage.getItem('accessToken');
await store.commit('route/SET_ROUTE',to.path)
//console.log("to.path ==> ", to.path);
if (
to.path === "/register/form" ||