diff --git a/Yi.Vben5.Vue3/apps/web-antd/src/api/system/profile/index.ts b/Yi.Vben5.Vue3/apps/web-antd/src/api/system/profile/index.ts index 6e68ef98..82bcd37a 100644 --- a/Yi.Vben5.Vue3/apps/web-antd/src/api/system/profile/index.ts +++ b/Yi.Vben5.Vue3/apps/web-antd/src/api/system/profile/index.ts @@ -1,21 +1,27 @@ -import type { FileCallBack, UpdatePasswordParam, UserProfile } from './model'; +import type { FileCallBack, UpdatePasswordParam } from './model'; +import type { UserInfoResp } from '#/api/core/user'; import { buildUUID } from '@vben/utils'; import { requestClient } from '#/api/request'; +import { getUserInfoApi } from '#/api/core/user'; enum Api { root = '/user/profile', updateAvatar = '/user/profile/avatar', - updatePassword = '/user/profile/updatePwd', + updatePassword = '/account/password', } /** * 用户个人主页信息 * @returns userInformation */ -export function userProfile() { - return requestClient.get(Api.root); +export async function userProfile() { + const resp = await getUserInfoApi() as UserInfoResp; + if (!resp) { + throw new Error('获取用户信息失败'); + } + return resp; } /** diff --git a/Yi.Vben5.Vue3/apps/web-antd/src/views/_core/profile/components/base-setting.vue b/Yi.Vben5.Vue3/apps/web-antd/src/views/_core/profile/components/base-setting.vue index fc16b4ed..58e623e0 100644 --- a/Yi.Vben5.Vue3/apps/web-antd/src/views/_core/profile/components/base-setting.vue +++ b/Yi.Vben5.Vue3/apps/web-antd/src/views/_core/profile/components/base-setting.vue @@ -1,8 +1,6 @@