优化:从登录页面点返回直接回到主页

This commit is contained in:
ivan 2026-03-27 18:21:13 +08:00
parent c329d712c5
commit e1456f14d6

View File

@ -43,6 +43,14 @@ const bottomNavValue = computed({
},
})
function onBackClick() {
if (currentRoute.value === '/login') {
router.replace('/')
} else {
router.back()
}
}
async function refreshUserData() {
if (!userStore.isLoggedIn) return
await router.isReady()
@ -73,7 +81,7 @@ watch(
variant="text"
class="back-btn"
:aria-label="t('common.back')"
@click="$router.back()"
@click="onBackClick"
>
<v-icon>mdi-arrow-left</v-icon>
</v-btn>