暂存c端账号管理和商户信息
This commit is contained in:
@@ -128,26 +128,50 @@ Component({
|
||||
const that = this;
|
||||
const { park, tenement } = this.data;
|
||||
const { address, id } = e.currentTarget.dataset;
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: `确认要解绑${address}吗?`,
|
||||
complete: async (res) => {
|
||||
if (res.cancel) {
|
||||
|
||||
}
|
||||
|
||||
if (res.confirm) {
|
||||
const { code, message, } = await unbindMeter(park, tenement, id);
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return
|
||||
}
|
||||
alertSuccess("解绑成功")
|
||||
that.getTenementMeters();
|
||||
return
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
unbindVisible: true,
|
||||
meterId: id,
|
||||
meterAddress: address
|
||||
})
|
||||
// wx.showModal({
|
||||
// title: '提示',
|
||||
// content: `确认要解绑${address}吗?`,
|
||||
// complete: async (res) => {
|
||||
// if (res.cancel) {
|
||||
|
||||
// }
|
||||
|
||||
// if (res.confirm) {
|
||||
// const { code, message, } = await unbindMeter(park, tenement, id);
|
||||
// if (code !== OK) {
|
||||
// alertInfo(message)
|
||||
// return
|
||||
// }
|
||||
// alertSuccess("解绑成功")
|
||||
// that.getTenementMeters();
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
},
|
||||
onUnbindOk() {
|
||||
this.setData({
|
||||
unbindVisible: false,
|
||||
meterId: "",
|
||||
meterAddress: "",
|
||||
})
|
||||
this.getTenementMeters();
|
||||
},
|
||||
startBind() {
|
||||
this.setData({
|
||||
bindVisible: true
|
||||
})
|
||||
},
|
||||
onBindOk() {
|
||||
this.setData({
|
||||
bindVisible: false,
|
||||
})
|
||||
this.getTenementMeters();
|
||||
}
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user