-
Notifications
You must be signed in to change notification settings - Fork 123
/
index.js
69 lines (68 loc) · 1.33 KB
/
index.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
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
/**
* ip地址或域名
*/
const ipAddress = 'http://113.62.127.199:38080/app/mock/16'
// 文件访问地址
const fileAddr = 'http://localhost:8082/fileUpload/'
// 永中云服务
// 文档管理接口url
const yzDmc = 'http://dmc.yozocloud.cn'
const yzEic = 'http://eic.yozocloud.cn'
// 云预览应用信息
const yzPreviewAPPID = 'appId'
const yzPreviewAPPKEY = 'appKey'
// 云编辑应用信息
const yzEditAPPID = 'appId'
const yzEditAPPKEY = 'appKey'
// 格式转换应用信息
const yzFormatConvertAPPID = 'appId'
const yzFormatConvertAPPKEY = 'appKey'
/**
* api前缀
*/
const apiPrefix = '/apiUA'
const apiYzDmc = '/apiYzDmc'
const apiYzEic = '/apiYzEic'
/**
* 针对不同平台的baseUrl
*/
const getBaseUrl = () => {
// #ifdef H5
return apiPrefix
// #endif
// #ifndef H5
return ipAddress
// #endif
}
const getYzDmc = () => {
// #ifdef H5
return apiYzDmc
// #endif
// #ifndef H5
return yzDmc
// #endif
}
const getYzEic = () => {
// #ifdef H5
return apiYzEic
// #endif
// #ifndef H5
return yzEic
// #endif
}
export default {
/**
* 针对不同平台的baseUrl
*/
baseUrl: getBaseUrl(),
fileAddr,
yzDmcUrl: getYzDmc(),
yzEic,
yzEicUrl: getYzEic(),
yzPreviewAPPID,
yzPreviewAPPKEY,
yzEditAPPID,
yzEditAPPKEY,
yzFormatConvertAPPID,
yzFormatConvertAPPKEY
}