Commit 3755c17f by 姜雷

添加其他处理

parent 8693b0fd
...@@ -233,12 +233,24 @@ class Connect extends Component { ...@@ -233,12 +233,24 @@ class Connect extends Component {
Taro.showModal({ Taro.showModal({
title: '提示', title: '提示',
content: '设备正在使用', content: '设备正在使用',
}); })
.then(() => {
this.gobackHandle();
})
.catch(() => {
this.gobackHandle();
});
} else if (msgObj.contorlCode === ContorlCode.broken) { } else if (msgObj.contorlCode === ContorlCode.broken) {
Taro.showModal({ Taro.showModal({
title: '提示', title: '提示',
content: '设备已损坏', content: '设备已损坏',
}); })
.then(() => {
this.gobackHandle();
})
.catch(() => {
this.gobackHandle();
});
} else if (msgObj.contorlCode === ContorlCode.usable) { } else if (msgObj.contorlCode === ContorlCode.usable) {
console.log('in setState', currentThis.canPay); console.log('in setState', currentThis.canPay);
currentThis && currentThis.setState({ canPay: true }); currentThis && currentThis.setState({ canPay: true });
...@@ -246,7 +258,13 @@ class Connect extends Component { ...@@ -246,7 +258,13 @@ class Connect extends Component {
Taro.showModal({ Taro.showModal({
title: '提示', title: '提示',
content: '设备已启动', content: '设备已启动',
}); })
.then(() => {
this.gobackHandle();
})
.catch(() => {
this.gobackHandle();
});
} else { } else {
} }
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment