ztxkutils 20.0.3 → 20.0.4

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.
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ export { d as authority } from './authority-7a91cb9f.js';
2
2
  export { d as dataModel } from './dataModel-f1ef06bc.js';
3
3
  export { t as tools } from './tools-390e3466.js';
4
4
  export { v as validate } from './validate-ab47ebe9.js';
5
- export { r as request } from './request-80d1ac80.js';
5
+ export { r as request } from './request-d59904b9.js';
6
6
  export { r as reqUrl } from './reqUrl-ea7ef876.js';
7
7
  import './i18next.js';
8
8
  import './tslib.es6-35653116.js';
@@ -2498,7 +2498,7 @@ function loginRequest(params, InnerAuthorization) {
2498
2498
  baseURL: '',
2499
2499
  headers: {
2500
2500
  'Content-Type': 'application/x-www-form-urlencoded',
2501
- 'Tenant-Id': '000000',
2501
+ 'Tenant-Id': localStorage.getItem('system-tenantId') || '000000',
2502
2502
  Authorization: InnerAuthorization ? InnerAuthorization : Authorization,
2503
2503
  'User-Type': 'web',
2504
2504
  },
@@ -2797,7 +2797,7 @@ function request(myOptions, jumpCallback, otherOptions) {
2797
2797
  // baseURL: ZT_API_BASEURL,
2798
2798
  headers: {
2799
2799
  'Zmdms-Auth': "bearer " + token,
2800
- 'Tenant-Id': '000000',
2800
+ // 'Tenant-Id': '000000',
2801
2801
  Authorization: InnerAuthorization ? InnerAuthorization : Authorization,
2802
2802
  // 设置语言包请求头
2803
2803
  'Zmdms-Lang': window.localStorage.getItem('languageType') || 'zh_CN',
package/dist/request.js CHANGED
@@ -2,7 +2,7 @@ import './tslib.es6-35653116.js';
2
2
  import './i18next.js';
3
3
  import 'axios';
4
4
  import 'ztxkui';
5
- export { N as NEW_AUTHORIZATION, O as OLD_AUTHORIZATION, d as clearAutonomousCatch, b as clearCatch, c as clearNoCompleteRequest, a as default } from './request-80d1ac80.js';
5
+ export { N as NEW_AUTHORIZATION, O as OLD_AUTHORIZATION, d as clearAutonomousCatch, b as clearCatch, c as clearNoCompleteRequest, a as default } from './request-d59904b9.js';
6
6
  import './authority-7a91cb9f.js';
7
7
  import './crypto-c481f616.js';
8
8
  import 'crypto';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkutils",
3
- "version": "20.0.3",
3
+ "version": "20.0.4",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -1,24 +0,0 @@
1
- /**
2
- * @description 数据模型创建
3
- */
4
- function createSuccessModel(data, message) {
5
- return {
6
- data: data,
7
- message: message || '数据请求成功',
8
- success: true,
9
- };
10
- }
11
- function createErrorModel(message) {
12
- return {
13
- message: message || '数据请求失败',
14
- success: false,
15
- };
16
- }
17
-
18
- var dataModel = /*#__PURE__*/Object.freeze({
19
- __proto__: null,
20
- createSuccessModel: createSuccessModel,
21
- createErrorModel: createErrorModel
22
- });
23
-
24
- export { createErrorModel as a, createSuccessModel as c, dataModel as d };
@@ -1,26 +0,0 @@
1
- import instance from './i18next.js';
2
-
3
- /**
4
- * @description 数据模型创建
5
- */
6
- function createSuccessModel(data, message) {
7
- return {
8
- data: data,
9
- message: message || instance.t('数据请求成功'),
10
- success: true,
11
- };
12
- }
13
- function createErrorModel(message) {
14
- return {
15
- message: message || instance.t('数据请求失败'),
16
- success: false,
17
- };
18
- }
19
-
20
- var dataModel = /*#__PURE__*/Object.freeze({
21
- __proto__: null,
22
- createSuccessModel: createSuccessModel,
23
- createErrorModel: createErrorModel
24
- });
25
-
26
- export { createErrorModel as a, createSuccessModel as c, dataModel as d };
@@ -1,26 +0,0 @@
1
- import instance from './i18next.js';
2
-
3
- /**
4
- * @description 数据模型创建
5
- */
6
- function createSuccessModel(data, message) {
7
- return {
8
- data: data,
9
- message: message || instance.t('数据请求成功'),
10
- success: true,
11
- };
12
- }
13
- function createErrorModel(message) {
14
- return {
15
- message: message || instance.t('数据请求失败'),
16
- success: false,
17
- };
18
- }
19
-
20
- var dataModel = /*#__PURE__*/Object.freeze({
21
- __proto__: null,
22
- createSuccessModel: createSuccessModel,
23
- createErrorModel: createErrorModel
24
- });
25
-
26
- export { createErrorModel as a, createSuccessModel as c, dataModel as d };
@@ -1,26 +0,0 @@
1
- import instance from './i18next.js';
2
-
3
- /**
4
- * @description 数据模型创建
5
- */
6
- function createSuccessModel(data, message) {
7
- return {
8
- data: data,
9
- message: message || instance.t('数据请求成功'),
10
- success: true,
11
- };
12
- }
13
- function createErrorModel(message) {
14
- return {
15
- message: message || instance.t('数据请求失败'),
16
- success: false,
17
- };
18
- }
19
-
20
- var dataModel = /*#__PURE__*/Object.freeze({
21
- __proto__: null,
22
- createSuccessModel: createSuccessModel,
23
- createErrorModel: createErrorModel
24
- });
25
-
26
- export { createErrorModel as a, createSuccessModel as c, dataModel as d };
@@ -1,82 +0,0 @@
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 || window.location.origin; // 开发环境
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 };