修改用电查询切换电表数据不更新的问题
This commit is contained in:
		@@ -1,5 +1,6 @@
 | 
				
			|||||||
.d-table {
 | 
					.d-table {
 | 
				
			||||||
  display: table !important;
 | 
					  display: table !important;
 | 
				
			||||||
 | 
					  width: 100% !important;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.d-table-row {
 | 
					.d-table-row {
 | 
				
			||||||
  display: table-row !important;
 | 
					  display: table-row !important;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -160,7 +160,18 @@ Page({
 | 
				
			|||||||
      show: false,
 | 
					      show: false,
 | 
				
			||||||
      title: ""
 | 
					      title: ""
 | 
				
			||||||
    }, () => {
 | 
					    }, () => {
 | 
				
			||||||
 | 
					      const { queryType, } = this.data;
 | 
				
			||||||
 | 
					      switch(queryType) {
 | 
				
			||||||
 | 
					        case 1:
 | 
				
			||||||
 | 
					          this.getReadingList();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case 2: 
 | 
				
			||||||
 | 
					          this.getAccountingBalanceList();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        default:
 | 
				
			||||||
          this.init();
 | 
					          this.init();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  onTimeClose() {
 | 
					  onTimeClose() {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -262,13 +262,12 @@ Page({
 | 
				
			|||||||
      wx.setStorageSync('meter', {})
 | 
					      wx.setStorageSync('meter', {})
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    const storageMeter = wx.getStorageSync('meter');
 | 
					 | 
				
			||||||
    this.setData({
 | 
					    this.setData({
 | 
				
			||||||
      meterList: data || [],
 | 
					      meterList: data || [],
 | 
				
			||||||
      meter: storageMeter || (data?.[0] || {})
 | 
					      meter:  (data?.[0] || {})
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
    // if (!storageMeter) {
 | 
					    // if (!storageMeter) {
 | 
				
			||||||
      wx.setStorageSync('meter', data?.[0])
 | 
					      wx.setStorageSync('meter', data?.[0] || {} )
 | 
				
			||||||
    // }
 | 
					    // }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  jumpToElectric() {
 | 
					  jumpToElectric() {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user