@zgfe/business-lib 1.1.29-visual.7 → 1.1.29-visual.9
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/es/socket/index.js +3 -6
- package/package.json +2 -2
package/es/socket/index.js
CHANGED
|
@@ -204,7 +204,7 @@ var SocketClient = /*#__PURE__*/function () {
|
|
|
204
204
|
});
|
|
205
205
|
case 2:
|
|
206
206
|
res = _context.sent;
|
|
207
|
-
return _context.abrupt("return", res);
|
|
207
|
+
return _context.abrupt("return", res.data.socketToken);
|
|
208
208
|
case 4:
|
|
209
209
|
case "end":
|
|
210
210
|
return _context.stop();
|
|
@@ -220,13 +220,10 @@ var SocketClient = /*#__PURE__*/function () {
|
|
|
220
220
|
key: "open",
|
|
221
221
|
value: function open(url, params) {
|
|
222
222
|
var _this4 = this;
|
|
223
|
-
this.getToken().then(function (
|
|
224
|
-
if (!res) {
|
|
225
|
-
throw new Error('获取socket授权失败');
|
|
226
|
-
}
|
|
223
|
+
this.getToken().then(function (token) {
|
|
227
224
|
_this4.params = params || _this4.params;
|
|
228
225
|
if (_this4.client) _this4.close();
|
|
229
|
-
var paramUrl = [];
|
|
226
|
+
var paramUrl = ["socketToken=".concat(token)];
|
|
230
227
|
if (_this4.params) {
|
|
231
228
|
Object.keys(_this4.params || {}).forEach(function (key) {
|
|
232
229
|
if (_.isObject(_this4.params[key]) || _.isArray(_this4.params[key])) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.1.29-visual.
|
|
3
|
+
"version": "1.1.29-visual.9",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"react": "^16.12.0 || ^17.0.0",
|
|
60
60
|
"yorkie": "^2.0.0"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "a7a41e67490f6da5e12e3f8cc2f4f3046f1c423a"
|
|
63
63
|
}
|