ucservice 1.9.9 → 2.0.1

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.
@@ -26463,7 +26463,8 @@ let account = {
26463
26463
  },
26464
26464
  heartBeatNet: {
26465
26465
  //账号心跳保持接口, 长轮询调用该接口保持与服务端的连接,每15s发送一次该消息,如果60s内没有收到该消息,服务端主动注销该用户
26466
- url: '/scooper-core-rest/data/system/authManage/heartbeat',
26466
+ // url: '/scooper-core-rest/data/system/authManage/heartbeat',
26467
+ url: '/dispatch-web/api/conn/heartKeep',
26467
26468
  requestParam: {
26468
26469
  token: ''
26469
26470
  },
@@ -31611,7 +31612,19 @@ const dologin = function (username, password, sip) {
31611
31612
  accPassword: sha256_digest(password)
31612
31613
  }, function (ret) {
31613
31614
  if (ret.code == 0) {
31614
- let token = ret.data; //启动心跳保持
31615
+ let token = ret.data;
31616
+ let connectUrl = '/dispatch-web/api/conn/connectionByToken';
31617
+ loadJson((sip || server) + connectUrl, {
31618
+ token
31619
+ }, function (ret1) {
31620
+ if (ret1.code == 0) {
31621
+ console.log("登录连接完成", ret1.code);
31622
+ resolve(ret1);
31623
+ } else {
31624
+ console.log("登录连接失败", ret1.code);
31625
+ reject(ret1.code);
31626
+ }
31627
+ }, '', 'GET'); //启动心跳保持
31615
31628
  // if(heartTime) {
31616
31629
  // clearInterval(heartTime);
31617
31630
  // }
Binary file