| | |
| | | lastIntakeName: "", |
| | | isLogin: false, //是否已经登录 |
| | | showInfoDialog: false, |
| | | |
| | | showTipDialog: false, |
| | | options: '', |
| | | }, |
| | | |
| | | openValve: function (e) { |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | // 使用 wx.nextTick 等待页面渲染完成 |
| | | wx.nextTick(() => { |
| | | this.calculateScrollViewHeight(); |
| | | }); |
| | | //当开阀成功后调用刷新 |
| | | console.log("onLoad:" + options.param); |
| | | if (options.param) { |
| | | wx.showToast({ |
| | | title: '开阀成功', |
| | | icon: 'success', |
| | | duration: 3000 |
| | | this.setData({ |
| | | options: options, |
| | | isLogin: true, |
| | | }) |
| | | this.getOpenList(); |
| | | } |
| | | |
| | | }, |
| | |
| | | } else { |
| | | //本地没有缓存微信登录 |
| | | this.wxLogin(); |
| | | } |
| | | if (this.data.options.param) { |
| | | this.setData({ |
| | | |
| | | showTipDialog: true, |
| | | tipData: "开阀命令下发成功,稍后请刷新快速关阀列表查看执行结果。" |
| | | }) |
| | | this.getOpenList(); |
| | | } |
| | | }, |
| | | wxLogin() { |
| | |
| | | this.setData({ |
| | | showConfirm: false, |
| | | showErrorDialog: false, |
| | | showForceConfirm: false |
| | | showForceConfirm: false, |
| | | showTipDialog: false |
| | | }); |
| | | }, |
| | | cancelDialog() { |
| | | this.setData({ |
| | | showForceConfirm: false, |
| | | showConfirm: false |
| | | showConfirm: false, |
| | | showTipDialog: false |
| | | }); |
| | | }, |
| | | /** |
| | |
| | | wx.hideLoading(); |
| | | this.getOpenList(); |
| | | if (response.content.data.success) { |
| | | wx.showToast({ |
| | | title: '关阀成功', |
| | | icon: 'success', |
| | | duration: 3000 |
| | | this.setData({ |
| | | isLogin: true, |
| | | showTipDialog: true, |
| | | tipData: "关阀命令下发成功,稍后请刷新快速关阀列表查看执行结果。" |
| | | }) |
| | | this.getOpenList(); |
| | | } else { |
| | | wx.showToast({ |
| | | title: '关阀失败', |
| | | title: '命令执行失败', |
| | | icon: 'error', |
| | | duration: 3000 |
| | | }) |
| | |
| | | unbind() { |
| | | //清空数据 |
| | | this.setData({ |
| | | userPhone: "请登录", |
| | | userName: "未登录", |
| | | userPhone: "未登录", |
| | | userName: "请登录", |
| | | listData: [] |
| | | }) |
| | | wx.showLoading({ |