-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuser.js
More file actions
19 lines (19 loc) · 698 Bytes
/
user.js
File metadata and controls
19 lines (19 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
export default {
getUserInfo (http) {
return http.get('api/rest/user-api/user-info?_format=json&time=' + Math.round(new Date().getTime() / 1000))
},
uploadAvatar (http, userId, data) {
return http.post('api/rest/user-api/upload-avatar/' + userId + '?_format=json', {
base64: data
})
},
resetPassword (http, userId, data) {
return http.post('api/rest/user-api/reset-password/' + userId + '?_format=json', data)
},
updateUserProfile (http, userId, data) {
return http.patch('api/rest/enhanced-user/user-profile/' + userId + '?_format=json', data)
},
bindPhone (http, data) {
return http.post('api/rest/phone-login/bind-phone?_format=json', data)
}
}