diff --git a/apps/web-antd/src/views/_core/profile/index.vue b/apps/web-antd/src/views/_core/profile/index.vue index 1e47835f..4e595b03 100644 --- a/apps/web-antd/src/views/_core/profile/index.vue +++ b/apps/web-antd/src/views/_core/profile/index.vue @@ -4,8 +4,10 @@ import type { UserProfile } from '#/api/system/profile/model'; import { onMounted, ref } from 'vue'; import { Page } from '@vben/common-ui'; +import { useUserStore } from '@vben/stores'; import { userProfile } from '#/api/system/profile'; +import { useAuthStore } from '#/store'; import ProfilePanel from './profile-panel.vue'; import SettingPanel from './setting-panel.vue'; @@ -17,13 +19,26 @@ async function loadProfile() { } onMounted(loadProfile); + +const authStore = useAuthStore(); +const userStore = useUserStore(); +/** + * ToDo 接口重复 + */ +async function handleUploadFinish() { + // 重新加载用户信息 + await loadProfile(); + // 更新store + const userInfo = await authStore.fetchUserInfo(); + userStore.setUserInfo(userInfo); +}