mo-bai 4 years ago
parent
commit
59a92f4446
1 changed files with 6 additions and 5 deletions
  1. 11
      pages/page-view/index.vue

11
pages/page-view/index.vue

@ -18,8 +18,8 @@ export default {
onLoad(option) {
if (option) {
// this.url = decodeURIComponent(option.url)
this.url = option.url
this.params = option.params? JSON.parse(option.params) : ''
this.url = option.url
this.params = option.params ? JSON.parse(option.params) : ''
console.log('params', option.params)
} else {
uni.showToast({
@ -35,6 +35,7 @@ export default {
},
created() {
makeSocket({ pageInfo: 'page-view', retry: true }).then((res) => {
this.destroySocket()
this.socket = res
this.socket.onMessage(this.getMessage)
})
@ -70,9 +71,9 @@ export default {
},
destroyed() {
this.destroySocket()
},
onHide() {
this.destroySocket()
}
// onHide() {
// this.destroySocket()
// }
}
</script>
Loading…
Cancel
Save