| | |
| | | this.websock.closeMyself() |
| | | this.websock = null |
| | | window.removeEventListener('resize', this.resize); |
| | | }, |
| | | stop() { |
| | | this.websock.status = "close" |
| | | this.websock.stop() |
| | | }, |
| | | open() { |
| | | this.websock.status = "start" |
| | | this.websock.start() |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | screenTitleBg: null, |
| | | screenBg: null, |
| | | isHeader: true, |
| | | isNow: true |
| | | isNow: true, |
| | | state: 1, |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | }, 0) |
| | | |
| | | }) |
| | | |
| | | window.addEventListener("message", (msg) => { |
| | | // 处理数据 |
| | | this.state = msg.data.state |
| | | if (this.state == 1) { |
| | | this.modularArr.map(item => { |
| | | if (item.postData) { |
| | | item.postData() |
| | | } |
| | | }) |
| | | } else if (this.state == 0) { |
| | | this.modularArr.map(item => { |
| | | if (item.outClear) { |
| | | item.outClear() |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | }).catch((err) => { |
| | | console.log(err) |