diff --git a/apps/vue/src/layouts/default/header/components/user-dropdown/index.vue b/apps/vue/src/layouts/default/header/components/user-dropdown/index.vue index 534b05ec5..352d74c33 100644 --- a/apps/vue/src/layouts/default/header/components/user-dropdown/index.vue +++ b/apps/vue/src/layouts/default/header/components/user-dropdown/index.vue @@ -21,6 +21,11 @@ :text="t('AbpAccount.PersonalSettings')" icon="ant-design:setting-outlined" /> + + + + diff --git a/apps/vue/src/views/account/setting/useProfile.ts b/apps/vue/src/views/account/setting/useProfile.ts index fe7c6d3ea..f2e7b3695 100644 --- a/apps/vue/src/views/account/setting/useProfile.ts +++ b/apps/vue/src/views/account/setting/useProfile.ts @@ -1,12 +1,12 @@ import { computed } from 'vue'; import { FormSchema } from '/@/components/Form/index'; -import { useAbpStoreWithOut } from '/@/store/modules/abp'; import { useSettings } from '/@/hooks/abp/useSettings'; import { useLocalization } from '/@/hooks/abp/useLocalization'; import { getTwoFactorEnabled } from '/@/api/account/profiles'; import { getAssignableNotifiers } from '/@/api/messages/notifications'; import { getAll as getMySubscribes } from '/@/api/messages/subscribes'; import { MyProfile } from '/@/api/account/model/profilesModel'; +import { getUserInfo } from '/@/api/sys/user'; export interface ListItem { key: string; @@ -40,11 +40,6 @@ export function useProfile({ profile }: UseProfile) { } return profile.isExternal; }); - const getCurrentUser = computed(() => { - const abpStore = useAbpStoreWithOut(); - const { currentUser } = abpStore.getApplication; - return currentUser; - }); // tab的list function getSettingList() { return [ @@ -130,11 +125,11 @@ export function useProfile({ profile }: UseProfile) { // 安全设置 list async function getSecureSettingList() { - const currentUser = getCurrentUser.value; - const phoneNumber = currentUser.phoneNumber ?? ''; - const phoneNumberConfirmed = currentUser.phoneNumberVerified; - const email = currentUser.email ?? ''; - const emailVerified = currentUser.emailVerified; + const currentUserInfo = await getUserInfo(); + const phoneNumber = currentUserInfo['phone_number'] ?? ''; + const phoneNumberConfirmed = currentUserInfo['phone_number_verified'] === 'True'; + const email = currentUserInfo['email'] ?? ''; + const emailVerified = currentUserInfo['email_verified'] === 'True'; const twoFactorEnabled = await getTwoFactorEnabled(); return [ {