feat:增加登录模块
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user