api.js
2.03 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
65
66
67
68
69
70
71
72
73
74
75
// export let url = 'http://192.168.9.208:20080/api/v1'
// export let url = 'http://52.1.113.109:20080/api/v1'
const { urls = '', picUrls = '', mapUrls = '' } = window.SECURITY_CONF
export const mapUrl = mapUrls || location.host
export let IP = urls || location.host
if (IP.indexOf('9.102') > -1 || IP.indexOf('localhost') > -1) {
IP = 'https://store.keliuyun.com/report'
// IP="/report"
}
// IP="/report"
export let url = `${IP}`
export let menus = `${url}/auth/api/auth/apps/23660e5593563b27832c2b8f490b458e/menus`
let timer = ()=>{
return new Date().getTime()
}
export let auth = {
login: `${url}/users/login`,
accountid:`${url}/accounts`,
user: `${url}/users`,
edituser(userid){
return `${url}/users/${userid}`
},
role: `${url}/auth/roles`,
editrole (roleid){
return `${url}/auth/roles/${roleid}`
},
menusRole(roleid){
return `${url}/auth/roles/${roleid}/apps/23660e5593563b27832c2b8f490b458e/menus`
},
userRole(userid) {
return `${url}/auth/users/${userid}/roles`
},
deleteRole(roleid) {
return `${url}/auth/roles/${roleid}`
},
deleteuserRole(userid, roleid) {
return `${url}/auth/users/${userid}/roles/${roleid}`
},
perms(roleid){
return `${url}/auth/roles/${roleid}/perms`
},
ugrps: `${url}/auth/ugrps`,
delugrps(ugrp_unid) {
return `${url}/auth/ugrps/${ugrp_unid}`
},
userTogroup(groupid) {
return `${url}/auth/ugrps/${groupid}/users`
},
delUserToGroup(groupid, userid) {
return `${url}/auth/ugrps/${groupid}/users/${userid}`
},
///-------cyl add
getRoleUsers (roleid){
return `${url}/auth/roles/${roleid}/users`
},
}
export let org = {
getorgtree:`${url}/org/tree`,
getorg:`${url}/org`,
deleteorg (org_unid){
return `${url}/org/${org_unid}`
},
getvchan:`${url}/org/vchans`,
getvchanList:`${url}/org/vchans/list`,
editvchan (id){
return `${url}/org/vchans/${id}`
}
}
export let faceweb = `${url}/face_web`
export let picUrl = picUrls || "https://vion-retail.oss-cn-beijing.aliyuncs.com/"
// export let picUrl ="http://192.168.9.239/"