forked from liuhll/hero-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser.js
More file actions
64 lines (55 loc) · 1.21 KB
/
user.js
File metadata and controls
64 lines (55 loc) · 1.21 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import request from '@/utils/request'
import setting from '@/settings'
export function queryUser(query) {
return request({
url: `${setting.apiPrefix}/user/search`,
method: 'post',
data: { query: query }
})
}
export function create(userInfo) {
return request({
url: `${setting.apiPrefix}/user`,
method: 'post',
data: { input: userInfo }
})
}
export function update(userInfo) {
return request({
url: `${setting.apiPrefix}/user`,
method: 'put',
data: { input: userInfo }
})
}
export function updateStatus(userStatus) {
return request({
url: `${setting.apiPrefix}/user/status`,
method: 'put',
data: { input: userStatus }
})
}
export function deleteUser (userId) {
return request({
url: `${setting.apiPrefix}/user/${userId}`,
method: 'delete'
})
}
export function resetPassword (input) {
return request({
url: `${setting.apiPrefix}/user/password`,
method: 'put',
data: { input: input }
})
}
export function getUser (id) {
return request({
url: `${setting.apiPrefix}/user/${id}`,
method: 'get'
})
}
export function check (orgId) {
return request({
url: `${setting.apiPrefix}/user/check/${orgId}`,
method: 'post'
})
}