change UI & fix bugs
This commit is contained in:
+4
-1
@@ -250,7 +250,10 @@ router.beforeEach((to) => {
|
||||
const authed = isAuthenticated()
|
||||
|
||||
if (to.meta.requiresAuth && !authed) {
|
||||
return { name: 'login', query: { redirect: to.fullPath } }
|
||||
if (to.name === 'home' || to.path === '/') {
|
||||
return { name: 'welcome' }
|
||||
}
|
||||
return { name: 'welcome', query: { redirect: to.fullPath } }
|
||||
}
|
||||
|
||||
if (to.meta.guest && authed) {
|
||||
|
||||
Reference in New Issue
Block a user