ztxkutils 2.1.1 → 2.1.2
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/stompClient.d.ts +1 -0
- package/dist/stompClient.js +2 -1
- package/package.json +1 -1
package/dist/stompClient.d.ts
CHANGED
package/dist/stompClient.js
CHANGED
@@ -17,7 +17,7 @@ var StompClient = /** @class */ (function () {
|
|
17
17
|
var _this = this;
|
18
18
|
var _a, _b, _c, _d;
|
19
19
|
this.isInit = true;
|
20
|
-
var token = getToken();
|
20
|
+
var token = this.connectWsConfig.token || getToken();
|
21
21
|
// 建立连接对象,还未发起连接
|
22
22
|
var socket = new SockJS(this.connectWsConfig.baseUrl + "/api/zmdms-csc-ztim/ws?token=" + token + "&system=" + this.connectWsConfig.systemType + "&clientType=" + this.connectWsConfig.clientType);
|
23
23
|
// 获取 STOMP 子协议的客户端对象
|
@@ -170,6 +170,7 @@ var StompClient = /** @class */ (function () {
|
|
170
170
|
this.isInit = false;
|
171
171
|
return new Promise(function (resolve, reject) {
|
172
172
|
_this.client.disconnect(function () {
|
173
|
+
_this.client = null;
|
173
174
|
callback && callback();
|
174
175
|
resolve(null);
|
175
176
|
});
|