zmdms-utils 0.0.33 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
1
  declare function getBaseUrl(processObj: any): {
2
2
  API_URL: any;
3
+ CICOMS_API_URL: any;
3
4
  FILE_URL: any;
4
5
  };
5
6
 
@@ -8,6 +8,13 @@ function getBaseUrl(processObj) {
8
8
  stage: processObj.REACT_APP_API_STAGE || window.location.origin,
9
9
  product: processObj.REACT_APP_API_PRODUCT || window.location.origin,
10
10
  };
11
+ // 数字中心各个环境地址
12
+ var cicomsApiBaseUrlObj = {
13
+ dev: processObj.REACT_APP_CICOMS_API_DEV || "http://10.100.234.36:8000",
14
+ test: processObj.REACT_APP_CICOMS_API_TEST || "http://10.100.234.36:8000",
15
+ stage: processObj.REACT_APP_CICOMS_API_STAGE || window.location.origin,
16
+ product: processObj.REACT_APP_CICOMS_API_PRODUCT || window.location.origin,
17
+ };
11
18
  // file 服务器
12
19
  var fileBaseUrlObj = {
13
20
  dev: processObj.REACT_APP_FILE_DEV || "http://192.168.0.134:89",
@@ -18,6 +25,7 @@ function getBaseUrl(processObj) {
18
25
  var currentKey = ENV.toLowerCase() || "dev";
19
26
  return {
20
27
  API_URL: apiBaseUrlObj[currentKey],
28
+ CICOMS_API_URL: cicomsApiBaseUrlObj[currentKey],
21
29
  FILE_URL: fileBaseUrlObj[currentKey],
22
30
  };
23
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zmdms-utils",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
package/src/baseUrl.ts CHANGED
@@ -10,6 +10,14 @@ export function getBaseUrl(processObj: any) {
10
10
  product: processObj.REACT_APP_API_PRODUCT || window.location.origin,
11
11
  };
12
12
 
13
+ // 数字中心各个环境地址
14
+ const cicomsApiBaseUrlObj: any = {
15
+ dev: processObj.REACT_APP_CICOMS_API_DEV || "http://10.100.234.36:8000",
16
+ test: processObj.REACT_APP_CICOMS_API_TEST || "http://10.100.234.36:8000",
17
+ stage: processObj.REACT_APP_CICOMS_API_STAGE || window.location.origin,
18
+ product: processObj.REACT_APP_CICOMS_API_PRODUCT || window.location.origin,
19
+ };
20
+
13
21
  // file 服务器
14
22
  const fileBaseUrlObj: any = {
15
23
  dev: processObj.REACT_APP_FILE_DEV || "http://192.168.0.134:89",
@@ -23,6 +31,7 @@ export function getBaseUrl(processObj: any) {
23
31
 
24
32
  return {
25
33
  API_URL: apiBaseUrlObj[currentKey],
34
+ CICOMS_API_URL: cicomsApiBaseUrlObj[currentKey],
26
35
  FILE_URL: fileBaseUrlObj[currentKey],
27
36
  };
28
37
  }