|
|
|
@ -375,7 +375,7 @@ export default { |
|
|
|
this.libinfoData() |
|
|
|
|
|
|
|
// websocket |
|
|
|
// this.getsckdata() |
|
|
|
this.getsckdata() |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@ -1019,12 +1019,12 @@ export default { |
|
|
|
const evturl = publicConfig.EVTWH |
|
|
|
hws = new EventSource(evturl); |
|
|
|
// hws = new WebSocket(publicConfig.WS_URL_WH); |
|
|
|
hws.onopen = function () { |
|
|
|
// console.log("ws connected success!") |
|
|
|
}; |
|
|
|
hws.onclose = function (event) { |
|
|
|
// console.log('WebSocket连接已关闭'); |
|
|
|
}; |
|
|
|
// hws.onopen = function () { |
|
|
|
// // console.log("ws connected success!") |
|
|
|
// }; |
|
|
|
// hws.onclose = function (event) { |
|
|
|
// // console.log('WebSocket连接已关闭'); |
|
|
|
// }; |
|
|
|
hws.onmessage = (e) => { |
|
|
|
var jstr = JSON.parse(e.data); |
|
|
|
if (!jstr) { |
|
|
|
@ -1083,8 +1083,8 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
beforeUnmount() { |
|
|
|
hws.close(); |
|
|
|
} |
|
|
|
// beforeUnmount() { |
|
|
|
// hws.close(); |
|
|
|
// } |
|
|
|
} |
|
|
|
</script> |