| | |
| | | }, |
| | | onShow() { |
| | | console.log('appvue显示'); |
| | | if (!this.globalisconnect && !this.globalisUploadimg) { |
| | | this.$store.dispatch('websocketInit') |
| | | this.changeisconnect(false); |
| | | console.log('appvue的ws'); |
| | | if (!this.globalisconnect && !this.globalisUploadimg && this.globalisLogin) { |
| | | if (!this.is_open_socket) { |
| | | this.$store.dispatch('websocketInit') |
| | | this.changeisconnect(false); |
| | | console.log('appvue的ws'); |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapMutations(['changeisconnect']) |
| | | }, |
| | | computed: { |
| | | ...mapState(['globalisconnect', 'globalisUploadimg', 'globalisLogin']) |
| | | ...mapState(['globalisconnect', 'globalisUploadimg', 'globalisLogin', 'is_open_socket']) |
| | | } |
| | | }; |
| | | </script> |