seimin 5 maanden geleden
bovenliggende
commit
baf08954dc
1 gewijzigde bestanden met toevoegingen van 9 en 7 verwijderingen
  1. 9 7
      src/app/views/fuwutai/fuwutai.component.ts

+ 9 - 7
src/app/views/fuwutai/fuwutai.component.ts

@@ -831,14 +831,16 @@ export class FuwutaiComponent implements OnInit {
831 831
     let timer = null;
832 832
     TLWSA.onClosed = () => {
833 833
       _this.getState(0);
834
-      console.log('与服务器网络连接中断-----seimin');
835
-      _this.msg.info('与服务器网络连接中断,2分钟后重连')
836
-      console.log('2分钟后自动重连-----seimin')
837 834
       clearTimeout(timer);
838
-      timer = setTimeout(function () {
839
-        //连接
840
-        tlwsa.tlaOpen(_this.incomingService.getSocketUrl());
841
-      }, 120000)
835
+      if(location.hash === '#/dispatchingDesk'){
836
+        console.log('与服务器网络连接中断-----seimin');
837
+        _this.msg.info('与服务器网络连接中断,2分钟后重连')
838
+        console.log('2分钟后自动重连-----seimin')
839
+        timer = setTimeout(function () {
840
+          //连接
841
+          tlwsa.tlaOpen(_this.incomingService.getSocketUrl());
842
+        }, 120000)
843
+      }
842 844
     }
843 845
     //签入回调函数
844 846
     TLWSA.onLoginreturn = function (err) {