53 lines
1.2 KiB
Vue
53 lines
1.2 KiB
Vue
<template>
|
||
<div class="common-mobile-view profile">
|
||
个人中心
|
||
<div>
|
||
<span>版本号:</span>
|
||
<span>{{ appStore.version }}</span>
|
||
</div>
|
||
|
||
<div>
|
||
IOS下载地址:<el-image :src="getAssetsImageFile('ios.png')"/>
|
||
</div>
|
||
<div>
|
||
Android下载地址:
|
||
</div>
|
||
|
||
<div class="button-container">
|
||
<el-button type="primary" @click="viewLatestVersionClick">检查新版本</el-button>
|
||
<el-button type="primary" @click="logoutClick">退出登录</el-button>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<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'
|
||
import { getAssetsImageFile } from '@/utils'
|
||
|
||
const appStore = useAppStore()
|
||
const userStore = useUserStore()
|
||
const authStore = useAuthStore()
|
||
const router = useRouter()
|
||
|
||
const viewLatestVersionClick = async () => {
|
||
await router.push('/')
|
||
location.reload()
|
||
}
|
||
|
||
const logoutClick = async () => {
|
||
await authStore.handleLogout(userStore.userInfo.username)
|
||
await router.push('/')
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss">
|
||
.profile {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 10px;
|
||
}
|
||
</style>
|