对比新文件 |
| | |
| | | import upload from '@/utils/upload' |
| | | import request from '@/utils/request' |
| | | |
| | | // 鐢ㄦ埛瀵嗙爜閲嶇疆 |
| | | export function updateUserPwd(oldPassword, newPassword) { |
| | | const data = { |
| | | oldPassword, |
| | | newPassword |
| | | } |
| | | return request({ |
| | | url: '/system/user/profile/updatePwd', |
| | | method: 'put', |
| | | params: 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 uploadAvatar(data) { |
| | | return upload({ |
| | | url: '/system/user/profile/avatar', |
| | | name: data.name, |
| | | filePath: data.filePath |
| | | }) |
| | | } |