From 412e0a01ac00fb0797bb8327b7b203b5b9d10001 Mon Sep 17 00:00:00 2001
From: yangws <1607839436@qq.com>
Date: Thu, 18 Jul 2024 10:45:33 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=A4=B4=E5=83=8F?=
=?UTF-8?q?=E9=A2=84=E8=A7=88=EF=BC=8C=E5=A4=B4=E5=83=8F=E4=B8=8A=E4=BC=A0?=
=?UTF-8?q?bug=EF=BC=8C=E4=BB=A5=E5=8F=8A=E9=BB=84=E8=89=B2=E6=8A=A5?=
=?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/renderer/src/api/system/user.js | 11 +++++++----
src/renderer/src/views/profile/userAvatar.vue | 19 +++++++++++++------
src/renderer/src/views/profile/userInfo.vue | 16 ++++++++--------
3 files changed, 28 insertions(+), 18 deletions(-)
diff --git a/src/renderer/src/api/system/user.js b/src/renderer/src/api/system/user.js
index c83e0f6..b7e9e23 100644
--- a/src/renderer/src/api/system/user.js
+++ b/src/renderer/src/api/system/user.js
@@ -7,7 +7,7 @@ export function getUserProfile() {
method: 'get'
})
}
-
+
// 修改用户个人信息
export function updateUserProfile(data) {
return request({
@@ -16,7 +16,7 @@ export function getUserProfile() {
data: data
})
}
-
+
// 用户密码重置
export function updateUserPwd(oldPassword, newPassword) {
const data = {
@@ -29,11 +29,14 @@ export function getUserProfile() {
params: data
})
}
-
+
// 用户头像上传
export function uploadAvatar(data) {
return request({
url: '/system/user/profile/avatar',
+ headers: {
+ 'Content-Type': 'multipart/form-data'
+ },
method: 'post',
data: data
})
@@ -46,4 +49,4 @@ export function updateUserInfo(data) {
method: 'put',
data: data
})
-}
\ No newline at end of file
+}
diff --git a/src/renderer/src/views/profile/userAvatar.vue b/src/renderer/src/views/profile/userAvatar.vue
index b301307..1c289a4 100644
--- a/src/renderer/src/views/profile/userAvatar.vue
+++ b/src/renderer/src/views/profile/userAvatar.vue
@@ -26,7 +26,7 @@
-
+
@@ -64,7 +64,7 @@
-
+
-
+
\ No newline at end of file
+
diff --git a/src/renderer/src/views/profile/userInfo.vue b/src/renderer/src/views/profile/userInfo.vue
index c560d39..808e344 100644
--- a/src/renderer/src/views/profile/userInfo.vue
+++ b/src/renderer/src/views/profile/userInfo.vue
@@ -11,16 +11,16 @@
- 男
- 女
+ 男
+ 女
-
- {{
- item.itemtitle
- }}
+
+
+ {{item.itemtitle }}
+
@@ -29,7 +29,7 @@
-
+
\ No newline at end of file
+