orgin/master #1

Merged
uniccoo merged 257 commits from orgin/master into master 2024-06-18 15:49:12 +00:00
Showing only changes of commit b5f7e31b70 - Show all commits

View File

@ -33,7 +33,7 @@ function createAfterEachGuard(router: Router) {
const authStore = useAuthStore();
if (!authStore.isLogin && to && to.name !== 'Login') {
// 如果没有登录且目标路由不是登录页面则跳转到登录页面
router.push({ name: 'Login', tabBar: to?.meta?.tabBar, ...to.query });
router.push({ name: 'Login', params: { tabBar: to?.meta?.tabBar, ...to.query }});
} else if (authStore.isLogin && to && to.name === 'Login') {
// 如果已经登录且目标页面是登录页面则跳转至首页
router.replaceAll({ name: 'Home' });