ztxkutils 2.10.66-25-beta → 2.10.66-26

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/request.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import './tslib.es6-35653116.js';
2
+ import './i18next.js';
2
3
  import 'axios';
3
4
  import 'ztxkui';
4
- export { N as NEW_AUTHORIZATION, O as OLD_AUTHORIZATION, d as clearAutonomousCatch, b as clearCatch, c as clearNoCompleteRequest, a as default } from './request-4c29d6de.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-1e442d5d.js';
5
6
  import './authority-7a91cb9f.js';
6
7
  import './crypto-c481f616.js';
7
8
  import 'crypto';
@@ -1,3 +1,4 @@
1
+ import instance from './i18next.js';
1
2
  import Stomp from 'zt-stompjs';
2
3
  import SockJS from 'zt-sockjs-client';
3
4
  import { g as getToken } from './authority-7a91cb9f.js';
@@ -58,18 +59,22 @@ var StompClient = /** @class */ (function () {
58
59
  this.clearIsClient = setTimeout(function () {
59
60
  _this.clearIsClient = null;
60
61
  if (!_this.isClient) {
61
- console.log("\u8FDE\u63A5\u5DF2\u53D1\u8D77\uFF0C\u4F46\u662F10\u79D2\u540E\u672A\u6210\u529F\u5EFA\u7ACB\u8FDE\u63A5\uFF0C\u624B\u52A8\u65AD\u5F00\u91CD\u8FDE!system=" + _this.connectWsConfig.systemType);
62
+ console.log(instance.t('连接已发起,但是10秒后未成功建立连接,手动断开重连!system={{slot0}}', { slot0: _this.connectWsConfig.systemType }));
62
63
  try {
63
64
  _this.client.disconnect(function () {
64
65
  _this.client = null;
65
66
  });
66
67
  }
67
68
  catch (err) {
68
- console.log('---连接未建立的关闭出错---', err);
69
+ console.log(instance.t('---连接未建立的关闭出错---'), err);
69
70
  }
70
71
  _this.reconnectionNum++;
71
72
  var timeInterval = _this.getReconnectionTime();
72
- console.log("---\u7B2C" + _this.reconnectionNum + "\u6B21\u91CD\u8FDE\uFF01time=" + Date.now() + "system=" + _this.connectWsConfig.systemType + "---");
73
+ console.log(instance.t('---第{{slot0}}次重连!time={{slot1}}system={{slot2}}---', {
74
+ slot0: _this.reconnectionNum,
75
+ slot1: Date.now(),
76
+ slot2: _this.connectWsConfig.systemType,
77
+ }));
73
78
  if (_this.clearIsClientNo) {
74
79
  clearTimeout(_this.clearIsClientNo);
75
80
  _this.clearIsClientNo = null;
@@ -112,7 +117,11 @@ var StompClient = /** @class */ (function () {
112
117
  _this.clearIsClientYes = null;
113
118
  }
114
119
  _this.reconnectionNum = 0;
115
- console.log("---------\u8FDE\u63A5\u6210\u529F time=" + Date.now() + " system=" + _this.connectWsConfig.systemType + " time=" + Date.now() + "--------");
120
+ console.log(instance.t('---------连接成功 time={{slot0}} system={{slot1}} time={{slot2}}--------', {
121
+ slot0: Date.now(),
122
+ slot1: _this.connectWsConfig.systemType,
123
+ slot2: Date.now(),
124
+ }));
116
125
  // 连接成功后,将当前已注册的,未执行的 连接通道 连接
117
126
  var subscriptionsFnKeys = Object.keys(_this.subscriptionsFn);
118
127
  if (Array.isArray(subscriptionsFnKeys)) {
@@ -145,7 +154,7 @@ var StompClient = /** @class */ (function () {
145
154
  },
146
155
  // 连接失败回调
147
156
  function (err) {
148
- console.log("---------\u8FDE\u63A5\u5931\u8D25 system=" + _this.connectWsConfig.systemType + " time=" + Date.now() + "--------");
157
+ console.log(instance.t('---------连接失败 system={{slot0}} time={{slot1}}--------', { slot0: _this.connectWsConfig.systemType, slot1: Date.now() }));
149
158
  console.log(err);
150
159
  if (_this.userClose) {
151
160
  _this.userClose = false; // 重新初始化 重新计算
@@ -161,7 +170,7 @@ var StompClient = /** @class */ (function () {
161
170
  clearTimeout(_this.clearIsClientYes);
162
171
  _this.clearIsClientYes = null;
163
172
  }
164
- console.log('用户主动关闭');
173
+ console.log(instance.t('用户主动关闭'));
165
174
  return;
166
175
  }
167
176
  _this.isClient = true;
@@ -211,14 +220,18 @@ var StompClient = /** @class */ (function () {
211
220
  });
212
221
  }
213
222
  catch (err) {
214
- console.log("---\u8FDE\u63A5\u5DF2\u5EFA\u7ACB\u7684\u5173\u95ED\u51FA\u9519 time=" + Date.now() + "system=" + _this.connectWsConfig.systemType + "---", err);
223
+ console.log(instance.t('---连接已建立的关闭出错 time={{slot0}}system={{slot1}}---', { slot0: Date.now(), slot1: _this.connectWsConfig.systemType }), err);
215
224
  }
216
225
  _this.reconnectionNum++;
217
226
  // const timeInterval =
218
227
  // Math.ceil(this.reconnectionNum / 5) *
219
228
  // (this.connectWsConfig.reconnectionTime ?? 3000);
220
229
  var timeInterval = _this.getReconnectionTime();
221
- console.log("---\u7B2C" + _this.reconnectionNum + "\u6B21\u91CD\u8FDE\uFF01time=" + Date.now() + "system=" + _this.connectWsConfig.systemType);
230
+ console.log(instance.t('---第{{slot0}}次重连!time={{slot1}}system={{slot2}}', {
231
+ slot0: _this.reconnectionNum,
232
+ slot1: Date.now(),
233
+ slot2: _this.connectWsConfig.systemType,
234
+ }));
222
235
  _this.clearIsClientYes = setTimeout(function () {
223
236
  _this.init();
224
237
  }, timeInterval > _this.maxReconnectiontime