Compare commits
7 Commits
a8e91dc384
...
4696ece139
| Author | SHA1 | Date | |
|---|---|---|---|
| 4696ece139 | |||
| 7f66dae32e | |||
| 507f90f82a | |||
| 18b494ed00 | |||
| 2864a50550 | |||
| 04ff28bf45 | |||
| 36bd6f5a0b |
@@ -163,11 +163,7 @@ function handleLogout() {
|
||||
auth.logout()
|
||||
ui.showToast('已退出登录')
|
||||
emit('close')
|
||||
if (router.currentRoute.value.meta.requiresAuth) {
|
||||
router.push('/')
|
||||
} else {
|
||||
window.location.reload()
|
||||
}
|
||||
router.push('/')
|
||||
}
|
||||
|
||||
onMounted(loadNotifications)
|
||||
|
||||
@@ -10,13 +10,11 @@ const routes = [
|
||||
path: '/manage',
|
||||
name: 'RecipeManager',
|
||||
component: () => import('../views/RecipeManager.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/inventory',
|
||||
name: 'Inventory',
|
||||
component: () => import('../views/Inventory.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/oils',
|
||||
@@ -27,31 +25,26 @@ const routes = [
|
||||
path: '/projects',
|
||||
name: 'Projects',
|
||||
component: () => import('../views/Projects.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/mydiary',
|
||||
name: 'MyDiary',
|
||||
component: () => import('../views/MyDiary.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/audit',
|
||||
name: 'AuditLog',
|
||||
component: () => import('../views/AuditLog.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/bugs',
|
||||
name: 'BugTracker',
|
||||
component: () => import('../views/BugTracker.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/users',
|
||||
name: 'UserManagement',
|
||||
component: () => import('../views/UserManagement.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user