首次完整推送,
V:1.20240808.006
This commit is contained in:
85
apis/ctms/fab.js
Normal file
85
apis/ctms/fab.js
Normal file
@ -0,0 +1,85 @@
|
||||
export default {
|
||||
// 登录方法
|
||||
login: function(username, password, smscode, uuid) {
|
||||
const data = {
|
||||
username,
|
||||
password,
|
||||
smscode,
|
||||
uuid
|
||||
}
|
||||
return request({
|
||||
'url': apis.UserLogin,
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
'method': 'post',
|
||||
'data': data
|
||||
})
|
||||
},
|
||||
|
||||
// 注册方法
|
||||
register: function(data) {
|
||||
return request({
|
||||
url: apis.UserReg,
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
|
||||
// 获取用户详细信息
|
||||
getInfo: function() {
|
||||
return request({
|
||||
'url': apis.UserDetail,
|
||||
'method': 'get'
|
||||
})
|
||||
},
|
||||
|
||||
// 退出方法
|
||||
logout: function() {
|
||||
return request({
|
||||
'url': userLogout,
|
||||
'method': 'post'
|
||||
})
|
||||
},
|
||||
// 用户密码重置
|
||||
updateUserPwd: function(oldPassword, newPassword) {
|
||||
const data = {
|
||||
oldPassword,
|
||||
newPassword
|
||||
}
|
||||
return request({
|
||||
url: '/system/user/profile/updatePwd',
|
||||
method: 'put',
|
||||
params: data
|
||||
})
|
||||
},
|
||||
|
||||
// 查询用户个人信息
|
||||
getUserProfile: function() {
|
||||
return request({
|
||||
url: '/system/user/profile',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
// 修改用户个人信息
|
||||
updateUserProfile: function(data) {
|
||||
return request({
|
||||
url: '/system/user/profile',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
|
||||
// 用户头像上传
|
||||
uploadAvatar: function(data) {
|
||||
return upload({
|
||||
url: '/system/user/profile/avatar',
|
||||
name: data.name,
|
||||
filePath: data.filePath
|
||||
})
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user