ztxkutils 2.10.49 → 2.10.51

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ export { d as dataModel } from './dataModel-1fbaff40.js';
3
3
  export { t as tools } from './tools-09a4d620.js';
4
4
  export { v as validate } from './validate-18e52490.js';
5
5
  export { r as request } from './request-2c8dff05.js';
6
- export { r as reqUrl } from './reqUrl-787dd9e5.js';
6
+ export { r as reqUrl } from './reqUrl-3792afcd.js';
7
7
  import './tslib.es6-35653116.js';
8
8
  import 'dayjs';
9
9
  import 'axios';
@@ -0,0 +1,82 @@
1
+ /**
2
+ * @file 项目基本配置,包括各个环境的请求地址
3
+ */
4
+ // 环境变量
5
+ function getReqUrl(processObj) {
6
+ var ENV = processObj.REACT_APP_ENV;
7
+ // api服务器各个环境地址
8
+ var ZT_API_DEV = processObj.REACT_APP_ZT_API_DEV || 'http://192.168.0.83:8000'; // 开发环境
9
+ var ZT_API_TEST = processObj.REACT_APP_ZT_API_TEST || window.location.origin; // 测试环境 https://192.168.0.135:8000
10
+ var ZT_API_STAGE = processObj.REACT_APP_ZT_API_STAGE || window.location.origin; // 阶段性环境 http://192.168.0.134:8000
11
+ var ZT_API_SIM = processObj.REACT_APP_ZT_API_SIM || window.location.origin; // 阶段性环境 http://192.168.0.134:8000
12
+ var ZT_API_PRODUCT = processObj.REACT_APP_ZT_API_PRODUCT || window.location.origin; // 生产环境 http://dz.zmd.com.cn
13
+ var ZT_API_PUBLIC_PRODUCT = processObj.REACT_APP_ZT_API_PUBLIC_PRODUCT ||
14
+ 'https://nportal.zmd.com.cn:18998'; // 生产环境外网api地址 https://m-portal.zmd.com.cn:18998 http://dz.zmd.com.cn:48000
15
+ // 文件服务器
16
+ var ZT_FILE_PREVIEW_DEV = processObj.REACT_APP_ZT_FILE_PREVIEW_DEV || 'http://192.168.0.83:88'; // 开发环境
17
+ var ZT_FILE_PREVIEW_TEST = processObj.REACT_APP_ZT_FILE_PREVIEW_TEST || 'http://172.55.5.101:33013'; // 测试环境 https://192.168.0.135:18012
18
+ var ZT_FILE_PREVIEW_STAGE = processObj.REACT_APP_ZT_FILE_PREVIEW_STAGE ||
19
+ 'https://dzfile-prod.zmd.com.cn/'; // 阶段性环境 http://192.168.0.134:8012
20
+ var ZT_FILE_PREVIEW_SIM = processObj.REACT_APP_ZT_FILE_PREVIEW_SIM ||
21
+ 'https://dzfile-data.zmd.com.cn/'; // 阶段性环境 http://192.168.0.134:8012
22
+ var ZT_FILE_PREVIEW_PRODUCT = processObj.REACT_APP_ZT_FILE_PREVIEW_PRODUCT ||
23
+ 'https://dzfile.zmd.com.cn:8012'; // 生产环境
24
+ // 字体文件附件id
25
+ var ZT_FONTFAMILY_DEV = '1551733945007517697';
26
+ var ZT_FONTFAMILY_TEST = '1551836774183047169';
27
+ var ZT_FONTFAMILY_STAGE = '1551837561144905730';
28
+ var ZT_FONTFAMILY_SIM = '1562010976138207234';
29
+ var ZT_FONTFAMILY_PRODUCT = '1552851055372992513';
30
+ // 实际api请求地址
31
+ var ZT_API_BASEURL = ZT_API_DEV;
32
+ var ZT_API_PUBLICURL = ZT_API_PUBLIC_PRODUCT;
33
+ var ZT_FILE_BASEURL = ZT_FILE_PREVIEW_DEV;
34
+ var ZT_FONTFAMILY_BASEURL = ZT_FONTFAMILY_DEV;
35
+ if (ENV) {
36
+ switch (ENV.toLowerCase()) {
37
+ case 'zt-dev':
38
+ ZT_API_BASEURL = ZT_API_DEV;
39
+ ZT_API_PUBLICURL = ZT_API_DEV;
40
+ ZT_FILE_BASEURL = ZT_FILE_PREVIEW_DEV;
41
+ ZT_FONTFAMILY_BASEURL = ZT_FONTFAMILY_DEV;
42
+ break;
43
+ case 'zt-test':
44
+ ZT_API_BASEURL = ZT_API_TEST;
45
+ ZT_API_PUBLICURL = ZT_API_TEST;
46
+ ZT_FILE_BASEURL = ZT_FILE_PREVIEW_TEST;
47
+ ZT_FONTFAMILY_BASEURL = ZT_FONTFAMILY_TEST;
48
+ break;
49
+ case 'zt-stage':
50
+ ZT_API_BASEURL = ZT_API_STAGE;
51
+ ZT_API_PUBLICURL = ZT_API_STAGE;
52
+ ZT_FILE_BASEURL = ZT_FILE_PREVIEW_STAGE;
53
+ ZT_FONTFAMILY_BASEURL = ZT_FONTFAMILY_STAGE;
54
+ break;
55
+ case 'zt-sim':
56
+ ZT_API_BASEURL = ZT_API_SIM;
57
+ ZT_API_PUBLICURL = ZT_API_SIM;
58
+ ZT_FILE_BASEURL = ZT_FILE_PREVIEW_SIM;
59
+ ZT_FONTFAMILY_BASEURL = ZT_FONTFAMILY_SIM;
60
+ break;
61
+ case 'zt-product':
62
+ ZT_API_BASEURL = ZT_API_PRODUCT;
63
+ ZT_API_PUBLICURL = ZT_API_PUBLIC_PRODUCT;
64
+ ZT_FILE_BASEURL = ZT_FILE_PREVIEW_PRODUCT;
65
+ ZT_FONTFAMILY_BASEURL = ZT_FONTFAMILY_PRODUCT;
66
+ break;
67
+ }
68
+ }
69
+ return {
70
+ ZT_API_BASEURL: ZT_API_BASEURL,
71
+ ZT_FILE_BASEURL: ZT_FILE_BASEURL,
72
+ ZT_API_PUBLICURL: ZT_API_PUBLICURL,
73
+ ZT_FONTFAMILY_BASEURL: ZT_FONTFAMILY_BASEURL,
74
+ };
75
+ }
76
+
77
+ var reqUrl = /*#__PURE__*/Object.freeze({
78
+ __proto__: null,
79
+ getReqUrl: getReqUrl
80
+ });
81
+
82
+ export { getReqUrl as g, reqUrl as r };
package/dist/reqUrl.js CHANGED
@@ -1 +1 @@
1
- export { g as getReqUrl } from './reqUrl-787dd9e5.js';
1
+ export { g as getReqUrl } from './reqUrl-3792afcd.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkutils",
3
- "version": "2.10.49",
3
+ "version": "2.10.51",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -68,6 +68,8 @@
68
68
  "react": ">=17.0.1",
69
69
  "react-dom": ">=17.0.1",
70
70
  "react-router-dom": ">=5.2.0",
71
- "ztxkui": ">=0.4.1"
71
+ "ztxkui": ">=0.4.1",
72
+ "zt-sockjs-client": ">=0.0.1",
73
+ "zt-stompjs": ">=1.0.3"
72
74
  }
73
75
  }