feat:增加登录模块

This commit is contained in:
2025-06-25 23:48:43 +08:00
parent 37b2e588db
commit 99f828381d
21 changed files with 822 additions and 82 deletions

View File

@@ -14,17 +14,22 @@
<script setup lang="ts">
import { useAppStore } from '@/store/app.ts'
import { useUserStore } from '@/store/user.ts'
import { useAuthStore } from '@/store/auth.ts'
import { useRouter } from 'vue-router'
const appStore = useAppStore()
const userStore = useUserStore()
const authStore = useAuthStore()
const router = useRouter()
const viewLatestVersionClick = () => {
location.reload()
}
const logoutClick = () => {
router.push('/')
const logoutClick = async () => {
await authStore.handleLogout(userStore.userInfo.username)
await router.push('/')
}
</script>