From d8be452fd809f71fdb48d6976f9a0fe64177ee57 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Wed, 16 Nov 2022 16:35:51 +0800 Subject: [PATCH] fix: avatar --- .../src/api/system/user/profile.ts | 2 +- .../views/Profile/components/UserAvatar.vue | 209 ++++++++++-------- 2 files changed, 114 insertions(+), 97 deletions(-) diff --git a/yudao-ui-admin-vue3/src/api/system/user/profile.ts b/yudao-ui-admin-vue3/src/api/system/user/profile.ts index e78424cc4..eb3de0f5f 100644 --- a/yudao-ui-admin-vue3/src/api/system/user/profile.ts +++ b/yudao-ui-admin-vue3/src/api/system/user/profile.ts @@ -73,5 +73,5 @@ export const updateUserPwdApi = (oldPassword: string, newPassword: string) => { // 用户头像上传 export const uploadAvatarApi = (data) => { - return request.upload({ url: '/system/user/profile/update-avatar', data: data }) + return request.put({ url: '/system/user/profile/update-avatar', data }) } diff --git a/yudao-ui-admin-vue3/src/views/Profile/components/UserAvatar.vue b/yudao-ui-admin-vue3/src/views/Profile/components/UserAvatar.vue index b7a08de3a..2aaa65d3c 100644 --- a/yudao-ui-admin-vue3/src/views/Profile/components/UserAvatar.vue +++ b/yudao-ui-admin-vue3/src/views/Profile/components/UserAvatar.vue @@ -1,97 +1,10 @@ - + +