优化水摄入页面的确认弹窗逻辑,调整showConfirm状态的设置位置,并移除不必要的代码注释,提升代码可读性和维护性。
| | |
| | | choseCard(event) { |
| | | //显示二次确认弹窗 |
| | | this.setData({ |
| | | // showConfirm: true, |
| | | showConfirm: true, |
| | | choseItem: event.currentTarget.dataset.item, |
| | | allWaterPoints: [] |
| | | |
| | | }) |
| | | this.initDialogData(); |
| | | |
| | | // console.log(intakeId); |
| | | // wx.navigateTo({ |
| | | // url: '/pages/openCard/openCard?intakeId='+intakeId, |
| | | // }) |
| | | |
| | | // 注意:initDialogData的调用移到了confirmDialog方法中 |
| | | }, |
| | | //开泵通信 |
| | | /** |
| | |
| | | this.getcommonWaterPoints(); |
| | | }, |
| | | confirmDialog() { |
| | | // this.setData({ |
| | | // showConfirm: false |
| | | // }) |
| | | // this.postOpenValva(this.data.choseItem.intakeId); |
| | | this.setData({ |
| | | showConfirm: false |
| | | }) |