qingyiay
2023-07-14 f5d9fc10d155aed63fdf91217380610faa60f9e0
pages/tabbar-page/index-tabbar/index-tabbar.vue
@@ -57,7 +57,7 @@
      //首页下拉刷新
      onPullDownRefresh() {
         uni.showLoading({ title: '加载中...' });
         // 获取历史提煤单
         // 获取历史通知单
         if (this.roleType == 1 || this.roleType == 2) {
            this.$reqGet('getJhOrderPlanDataPage', { current: 1, size: 10 }).then(res => {
               if (res.data.records) {
@@ -150,9 +150,13 @@
                  if (nowWeighObj.eqInfraredStatus) {
                     this.changeinfraredStatus(true);
                     this.changeWeigh(nowWeighObj.weigh);
                     let warningState = nowWeighObj.warning == 1
                     this.changeWarning(warningState)
                  } else {
                     this.changeinfraredStatus(false);
                     this.changeWeigh(nowWeighObj.weigh);
                     let warningState = nowWeighObj.warning == 1
                     this.changeWarning(warningState)
                  }
               }
            } else if (v.startsWith('msg')) {
@@ -171,10 +175,10 @@
      },
      onShow() {
         this.init();
         console.log(this.globalisconnect);
         if (this.globalisconnect) {
            this.$store.dispatch('websocketInit')
            this.changeisconnect(false)
            this.changeisLogin(true)
            console.log(this.globalisconnect, 'index的ws数据’');
         }
         this.userAuthorization();
@@ -187,7 +191,9 @@
         this.changeisconnect(true)
      },
      methods: {
         ...mapMutations(['pushMessage', 'changeWeigh', 'changeinfraredStatus', 'changeisconnect', 'websocketInit']),
         ...mapMutations(['pushMessage', 'changeWeigh', 'changeinfraredStatus', 'changeisconnect', 'websocketInit',
            'changeisLogin', 'changeWarning'
         ]),
         messagePage() {
            uni.navigateTo({
               url: '/pages/public-page/message/message'