|
@@ -710,6 +710,7 @@ export default {
|
|
|
/** ----------------------------------weosocket开始------------------------------------- */
|
|
|
destroyed() { //离开页面关闭Socket连接
|
|
|
if (this.websock) {
|
|
|
+ clearInterval(this.setIntervalWesocketPush)
|
|
|
this.websock.close()
|
|
|
this.websock = null
|
|
|
}
|
|
@@ -718,7 +719,7 @@ export default {
|
|
|
methods: {
|
|
|
/** ----------------------------------weosocket开始------------------------------------- */
|
|
|
initWebSocket() { //初始化weosocket
|
|
|
- const wsuri = 'ws://192.168.1.103:10012/websocket/forest-' + Cookies.get('username')
|
|
|
+ const wsuri = 'wss://www.hmzzxc.com:10012/websocket/forest-' + Cookies.get('username')
|
|
|
this.websock = new WebSocket(wsuri)
|
|
|
console.log('建立websocket连接')
|
|
|
this.websock.onopen = this.websocketonopen
|