forked from mtianyan/vue-mooc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser.js
40 lines (33 loc) · 881 Bytes
/
user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import axios from 'utils/axios.js'
// 用户登录
export function userLogin (data) {
return axios.post('/api/v1/user/login', data)
}
// 用户注册接口
export function userRegister (data) {
return axios.post('/api/v1/user/register', data)
}
// 获取用户详细信息接口
export function getUserInfo () {
return axios.get('/api/v1/user/info')
}
// 分页获取用户登录日志
export function getUserLogs (params) {
return axios.get('/api/v1/log/', {
params
})
}
// 编辑账号绑定信息
export function updateUserBinds (data) {
return axios.post('/api/v1/user/update/binds', data)
}
// 编辑用户个人信息
export function updateUserInfo (data) {
return axios.post('/api/v1/user/update/info', data)
}
// 获取用户课程信息接口
export function getUserCourse (params) {
return axios.get('/api/v1/user/course/', {
params
})
}