| 123456789101112131415161718192021222324 |
- import { createApp } from 'vue'
- import App from './App.vue'
- import router from './router'
-
- router.beforeEach((to, from, next) => {
- const requiresAuth = false
- const requiresProfile = true
-
- if (requiresAuth) {
- console.log('You are not authorized to access this area.')
- next('login')
- } else {
- next()
- }
-
- // if (requiresProfile) {
- // console.log('You must first complete your profile.')
- // next('profile')
- // } else {
- // next()
- // }
- })
-
- createApp(App).use(router).mount('#app')
|