feat: 关于页面优化
This commit is contained in:
parent
e5e68ed8a8
commit
389e620913
@ -128,7 +128,7 @@ const getUserList: (email_or_username: string, loading?: Ref<boolean>) => Promis
|
|||||||
* 获取version
|
* 获取version
|
||||||
*/
|
*/
|
||||||
const getVersion: (loading?: Ref<boolean>) => Promise<Result<any>> = (loading) => {
|
const getVersion: (loading?: Ref<boolean>) => Promise<Result<any>> = (loading) => {
|
||||||
return get('/api/profile', undefined, loading)
|
return get('/profile', undefined, loading)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
<span>论坛求助</span>
|
<span>论坛求助</span>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<div class="text-center">当前版本号:{{ PackageJSON.version }}</div>
|
<div class="text-center">当前版本号:{{ version }}</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <ul class="about-ui">
|
<!-- <ul class="about-ui">
|
||||||
<li class="flex mb-16">
|
<li class="flex mb-16">
|
||||||
@ -52,9 +52,12 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import PackageJSON from '../../../../../package.json'
|
import useStore from '@/stores'
|
||||||
const defaultTitle = import.meta.env.VITE_APP_TITLE
|
const defaultTitle = import.meta.env.VITE_APP_TITLE
|
||||||
|
|
||||||
|
const { user } = useStore()
|
||||||
|
const version = user.version
|
||||||
|
|
||||||
const aboutDialogVisible = ref(false)
|
const aboutDialogVisible = ref(false)
|
||||||
|
|
||||||
const open = () => {
|
const open = () => {
|
||||||
|
|||||||
@ -47,7 +47,7 @@ const useUserStore = defineStore({
|
|||||||
|
|
||||||
async asyncGetVersion() {
|
async asyncGetVersion() {
|
||||||
return UserApi.getVersion().then((ok) => {
|
return UserApi.getVersion().then((ok) => {
|
||||||
this.version = ok.data
|
this.version = ok.data?.version || '0.9.0'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user