From 6ab90d6fe2034158db89c03d5f3f0387f73a56df Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Tue, 3 Feb 2026 20:53:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=A8=E6=88=B7js=E5=AF=B9=E5=BA=94bu?= =?UTF-8?q?g=E4=BF=AE=E5=A4=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/user.js | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/api/system/user.js b/src/api/system/user.js index fcd16ef..a9d8c6e 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -76,3 +76,42 @@ export function deptTreeSelect() { method: 'get' }) } + +// 用户头像上传 +export function uploadAvatar(data) { + return request({ + url: '/system/user/profile/avatar', + method: 'post', + data: data + }) +} + +// 查询用户个人信息 +export function getUserProfile() { + return request({ + url: '/system/user/profile', + method: 'get' + }) +} + +// 修改用户个人信息 +export function updateUserProfile(data) { + return request({ + url: '/system/user/profile', + method: 'put', + data: data + }) +} + +// 修改用户密码 +export function updateUserPwd(oldPassword, newPassword) { + const data = { + oldPassword, + newPassword + } + return request({ + url: '/system/user/profile/updatePwd', + method: 'put', + data: data + }) +}