From 51770ad6a05999729c9b12e146ff631d4d797086 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Sat, 7 Sep 2024 20:21:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=B4=E5=83=8F=E6=9B=B4=E6=94=B9=20s?= =?UTF-8?q?tore=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/_core/profile/index.vue | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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); +}