config.js
1.37 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
import store from '@/store/index'
let BASE_URL = store.state.baseURL
const MOCK_CONFIG_URL = 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
const env = process.env.NODE_ENV
// https://oss-config.test.glsx.com.cn/mock/5f8fda237ec90706c0f89d05/service
// http://192.168.0.63:8880
if (!BASE_URL) {
BASE_URL = env === 'development' ? 'https://oss-config.test.glsx.com.cn/mock/5f8fda237ec90706c0f89d05/service'
: ''
}
const API = {
getMockConfig() {
return MOCK_CONFIG_URL + '/test_config'
},
LOGIN_ACTION: BASE_URL + '/login_action'
}
const USER_API = {
USER_SEARCH: {
apiUrl: BASE_URL + '/usercenter/user/search'
// method: 'post'
},
USER_SUPER: BASE_URL + '/usercenter/user/suitableSuperUsers',
USER_ADD: BASE_URL + '/usercenter/user/add'
}
const ROLE_API = {
ROLE_SEARCH: {
apiUrl: BASE_URL + '/usercenter/role/search'
}
}
const ORGINIZA_API = {
ORGINIZA_SEARCH: BASE_URL + '/usercenter/organization/rootList',
ORGINIZA_CHILDREN: BASE_URL + '/usercenter/organization/children',
ORGINIZA_SIMPLElIST: BASE_URL + '/usercenter/organization/simpleList',
ORGINIZA_TREEORY: BASE_URL + '/usercenter/organization/treeOrg'
}
const DICT_API = {
DICT_SEARCH: {
apiUrl: BASE_URL + '/publiccenter/dict/type/search'
},
DICT_ADD: BASE_URL + '/publiccenter/dict/type/add'
}
export { API, USER_API, ROLE_API, ORGINIZA_API, DICT_API }