From c938028d8d78d317a069cccaf74bf44e33c1db10 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Sat, 27 Apr 2024 19:21:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/system/user-center.ts | 5 + src/components/GiFooter/index.vue | 3 - src/router/permission.ts | 2 +- src/utils/downloadFile.ts | 2 +- src/utils/http.ts | 2 +- src/views/login/components/account/index.vue | 1 - src/views/setting/profile/AvatarModel.vue | 54 ----- .../setting/profile/BasicInfoUpdateModal.vue | 77 +++++++ src/views/setting/profile/LeftBox.vue | 197 ++++++++++++------ src/views/setting/security/SessionSetting.vue | 2 +- src/views/setting/security/index.vue | 4 - src/views/system/role/RoleAddModal.vue | 2 + 12 files changed, 221 insertions(+), 130 deletions(-) delete mode 100644 src/views/setting/profile/AvatarModel.vue create mode 100644 src/views/setting/profile/BasicInfoUpdateModal.vue diff --git a/src/apis/system/user-center.ts b/src/apis/system/user-center.ts index 3b179e02..31f0faba 100644 --- a/src/apis/system/user-center.ts +++ b/src/apis/system/user-center.ts @@ -3,6 +3,11 @@ import type * as System from '@/apis/system/type' const BASE_URL = '/system/user' +/** @desc 上传头像 */ +export function uploadAvatar(data: FormData) { + return http.post(`${BASE_URL}/avatar`, data) +} + /** @desc 修改用户基本信息 */ export function updateUserBaseInfo(data: { nickname: string; gender: number }) { return http.patch(`${BASE_URL}/basic/info`, data) diff --git a/src/components/GiFooter/index.vue b/src/components/GiFooter/index.vue index e61fa7a8..da3d327e 100644 --- a/src/components/GiFooter/index.vue +++ b/src/components/GiFooter/index.vue @@ -3,14 +3,11 @@