登录处理

This commit is contained in:
2025-12-30 22:54:57 -08:00
parent a9cbd2b921
commit ab5de5e0f5
7 changed files with 51 additions and 13 deletions
+8
View File
@@ -21,4 +21,12 @@ const router = createRouter({
],
})
router.beforeEach((to, _from, next) => {
if (to.path === '/user-center' && !localStorage.getItem('Authorization')) {
next({ path: '/', query: { login: 'true' } })
} else {
next()
}
})
export default router