| | |
| | | deep: true |
| | | } |
| | | }, |
| | | onPullDownRefresh() { |
| | | if (!this.globalisconnect && !this.globalisUploadimg && this.globalisLogin) { |
| | | if (!this.is_open_socket) { |
| | | this.$store.dispatch('websocketInit') |
| | | this.changeisconnect(false); |
| | | console.log('称重的ws'); |
| | | uni.stopPullDownRefresh(); |
| | | } else { |
| | | uni.stopPullDownRefresh(); |
| | | } |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.init(); |
| | | // this.realTimeWeigh = 0 |
| | | }, |
| | | computed: { |
| | | ...mapState(['globalweigh', 'globalinfraredStatus', 'globalWarning']), |
| | | ...mapState(['globalweigh', 'globalinfraredStatus', 'globalWarning', 'globalisconnect', 'globalisUploadimg', |
| | | 'globalisLogin', 'is_open_socket' |
| | | ]), |
| | | token() { |
| | | return uni.getStorageSync('token'); |
| | | }, |