| | |
| | | }; |
| | | }, |
| | | created() { |
| | | //this.getData(); |
| | | this.getData(); |
| | | this.websocketStart(); |
| | | }, |
| | | computed: { |
| | |
| | | url: "/api/blade-jfpts/alarm/alarm/selecttx?id=" + that.deviceId, |
| | | method: "post", |
| | | }).then(function (response) { |
| | | console.log(response, 11111111); |
| | | var userId = JSON.parse( |
| | | window.localStorage.getItem("物联网安保云服务平台-userInfo") |
| | | ).content.user_id; |
| | |
| | | window.WebSocket = window.MozWebSocket; |
| | | } |
| | | if (window.WebSocket) { |
| | | //https |
| | | //window.socket = new WebSocket("wss://web.byisf.com/wss/websocket/"); |
| | | // https |
| | | window.socket = new WebSocket("wss://web.byisf.com/wss/websocket/"); |
| | | |
| | | //http |
| | | window.socket = new WebSocket("ws://localhost:9034/websocket"); |
| | | // window.socket = new WebSocket("ws://localhost:9034/websocket"); |
| | | |
| | | window.socket.onmessage = function (event) { |
| | | }; |