mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
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
|
||||
*/
|
||||
const getVersion: (loading?: Ref<boolean>) => Promise<Result<any>> = (loading) => {
|
||||
return get('/api/profile', undefined, loading)
|
||||
return get('/profile', undefined, loading)
|
||||
}
|
||||
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
<span>论坛求助</span>
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="text-center">当前版本号:{{ PackageJSON.version }}</div>
|
||||
<div class="text-center">当前版本号:{{ version }}</div>
|
||||
</div>
|
||||
<!-- <ul class="about-ui">
|
||||
<li class="flex mb-16">
|
||||
|
|
@ -52,9 +52,12 @@
|
|||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import PackageJSON from '../../../../../package.json'
|
||||
import useStore from '@/stores'
|
||||
const defaultTitle = import.meta.env.VITE_APP_TITLE
|
||||
|
||||
const { user } = useStore()
|
||||
const version = user.version
|
||||
|
||||
const aboutDialogVisible = ref(false)
|
||||
|
||||
const open = () => {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ const useUserStore = defineStore({
|
|||
|
||||
async asyncGetVersion() {
|
||||
return UserApi.getVersion().then((ok) => {
|
||||
this.version = ok.data
|
||||
this.version = ok.data?.version || '0.9.0'
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue