jyy-canteen-h5/api/system/user.js

60 lines
1.2 KiB
JavaScript
Raw Normal View History

2025-04-03 11:24:37 +08:00
import upload from '@/utils/upload'
import request from '@/utils/request'
// 用户密码重置
2025-04-22 15:13:54 +08:00
export function updateUserPwd(oldPassword,newPassword) {
// const data = {
// oldPassword,
// newPassword
// }
2025-04-03 11:24:37 +08:00
return request({
2025-04-22 15:13:54 +08:00
url: '/system/user/profile/updatePwd?oldPassword='+oldPassword+'&newPassword='+newPassword,
2025-04-03 11:24:37 +08:00
method: 'post',
2025-04-22 15:13:54 +08:00
// params:data
2025-04-03 11:24:37 +08:00
})
}
// 查询用户个人信息
export function getUserProfile(data) {
2025-04-22 15:13:54 +08:00
return request({
url: '/smart-canteen/custInfo/queryCustInfoDetailForApp',
method: 'post',
data
})
2025-04-03 11:24:37 +08:00
}
// 查询用户头像
export function getUserHeaderPhoto(data) {
return request({
url: '/smart-canteen/api/v4/app/custInfo/query/profile/photo',
method: 'post',
data
})
}
// 保存头像地址
export function saveUserHeaderPhoto(data) {
return request({
url: '/smart-canteen/api/v4/app/custInfo/save/profile/photo',
method: 'post',
data
})
}
// 修改用户个人信息
export function updateUserProfile(data) {
return request({
2025-04-22 17:39:56 +08:00
url: '/system/user/edit',
2025-04-03 11:24:37 +08:00
method: 'post',
data: data
})
}
// 用户头像上传
export function uploadAvatar(data) {
return upload({
url: '/system/user/profile/avatar',
name: data.name,
filePath: data.filePath
})
}