|
|
@ -35,6 +35,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
makeSocket({ pageInfo: 'page-view', retry: true }).then((res) => { |
|
|
makeSocket({ pageInfo: 'page-view', retry: true }).then((res) => { |
|
|
|
|
|
this.destroySocket() |
|
|
this.socket = res |
|
|
this.socket = res |
|
|
this.socket.onMessage(this.getMessage) |
|
|
this.socket.onMessage(this.getMessage) |
|
|
}) |
|
|
}) |
|
|
@ -70,9 +71,9 @@ export default { |
|
|
}, |
|
|
}, |
|
|
destroyed() { |
|
|
destroyed() { |
|
|
this.destroySocket() |
|
|
this.destroySocket() |
|
|
}, |
|
|
|
|
|
onHide() { |
|
|
|
|
|
this.destroySocket() |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
// onHide() { |
|
|
|
|
|
// this.destroySocket() |
|
|
|
|
|
// } |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |