南昌市物联网技防平台-前端
zengh
2021-03-24 117aadb12c2bb9867b0e48939ee1a412eef5a7b9
webSocket调整,改为在请求页调用,防止关闭后自动登录的情况
1 files modified
17 ■■■■■ changed files
src/page/index/logo.vue 17 ●●●●● patch | view | raw | blame | history
src/page/index/logo.vue
@@ -358,22 +358,6 @@
      }
      if (window.WebSocket) {
        that.socket = new WebSocket("ws://36.134.81.48:9034/websocket");
        that.socket.onmessage = function (event) {};
        that.socket.onopen = function (event) {};
        that.socket.onclose = function (event) {};
      } else {
        console.log("您的浏览器不支持WebSocket");
      }
      setTimeout(function () {
        if (!window.WebSocket) {
          return;
        }
        if (window.WebSocket) {
          window.socket = new WebSocket("ws://36.134.81.48:9034/websocket");
          window.socket.onmessage = function (event) {
          };
@@ -399,6 +383,7 @@
        }, 2000);
      setTimeout(function () {
        axios({
          url: "/api/blade-jfpts/alarm/alarm/selecttx?id=" + that.deviceId,
          method: "post",