kucservice 1.2.4 → 1.2.5

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.
@@ -10161,7 +10161,8 @@ var common_request_wsClass = /*#__PURE__*/function () {
10161
10161
  var _onOpen = _ref2.onOpen,
10162
10162
  _onClose = _ref2.onClose,
10163
10163
  _onMessage = _ref2.onMessage,
10164
- _onError = _ref2.onError;
10164
+ _onError = _ref2.onError,
10165
+ initAction = _ref2.initAction;
10165
10166
 
10166
10167
  Object(classCallCheck["a" /* default */])(this, wsClass);
10167
10168
 
@@ -10196,7 +10197,9 @@ var common_request_wsClass = /*#__PURE__*/function () {
10196
10197
  onMessage: function onMessage(e) {
10197
10198
  if (e.data === 'Back_Login') {
10198
10199
  // 设置坐席
10199
- _this.config.AgentGroupName && _this.send("SetGroupRole", _this.config.AgentGroupName);
10200
+ _this.config.AgentGroupName && _this.send("SetGroupRole", _this.config.AgentGroupName); // 初始化操作
10201
+
10202
+ initAction && initAction();
10200
10203
  return;
10201
10204
  }
10202
10205
 
@@ -10263,13 +10266,15 @@ var useKUcservice = function useKUcservice(options, _ref3) {
10263
10266
  var onOpen = _ref3.onOpen,
10264
10267
  onClose = _ref3.onClose,
10265
10268
  onMessage = _ref3.onMessage,
10266
- onError = _ref3.onError;
10269
+ onError = _ref3.onError,
10270
+ initAction = _ref3.initAction;
10267
10271
  if (!window.WebSocket) return console.error('您的浏览器不支持WebSocket, 请更换浏览器!');
10268
10272
  return new common_request_wsClass(options, {
10269
10273
  onOpen: onOpen,
10270
10274
  onClose: onClose,
10271
10275
  onMessage: onMessage,
10272
- onError: onError
10276
+ onError: onError,
10277
+ initAction: initAction
10273
10278
  });
10274
10279
  };
10275
10280
  // CONCATENATED MODULE: ./index.js
Binary file