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.
@@ -10152,7 +10152,8 @@ var common_request_wsClass = /*#__PURE__*/function () {
10152
10152
  var _onOpen = _ref2.onOpen,
10153
10153
  _onClose = _ref2.onClose,
10154
10154
  _onMessage = _ref2.onMessage,
10155
- _onError = _ref2.onError;
10155
+ _onError = _ref2.onError,
10156
+ initAction = _ref2.initAction;
10156
10157
 
10157
10158
  Object(classCallCheck["a" /* default */])(this, wsClass);
10158
10159
 
@@ -10187,7 +10188,9 @@ var common_request_wsClass = /*#__PURE__*/function () {
10187
10188
  onMessage: function onMessage(e) {
10188
10189
  if (e.data === 'Back_Login') {
10189
10190
  // 设置坐席
10190
- _this.config.AgentGroupName && _this.send("SetGroupRole", _this.config.AgentGroupName);
10191
+ _this.config.AgentGroupName && _this.send("SetGroupRole", _this.config.AgentGroupName); // 初始化操作
10192
+
10193
+ initAction && initAction();
10191
10194
  return;
10192
10195
  }
10193
10196
 
@@ -10254,13 +10257,15 @@ var useKUcservice = function useKUcservice(options, _ref3) {
10254
10257
  var onOpen = _ref3.onOpen,
10255
10258
  onClose = _ref3.onClose,
10256
10259
  onMessage = _ref3.onMessage,
10257
- onError = _ref3.onError;
10260
+ onError = _ref3.onError,
10261
+ initAction = _ref3.initAction;
10258
10262
  if (!window.WebSocket) return console.error('您的浏览器不支持WebSocket, 请更换浏览器!');
10259
10263
  return new common_request_wsClass(options, {
10260
10264
  onOpen: onOpen,
10261
10265
  onClose: onClose,
10262
10266
  onMessage: onMessage,
10263
- onError: onError
10267
+ onError: onError,
10268
+ initAction: initAction
10264
10269
  });
10265
10270
  };
10266
10271
  // CONCATENATED MODULE: ./index.js
Binary file