添加设备已绑定提示
This commit is contained in:
@@ -43,9 +43,15 @@ const handleScan = () => {
|
||||
|
||||
const confirmBind = async () => {
|
||||
if (!justBind.value && addDevice.value.id) {
|
||||
await bindDeviceAPI(addDevice.value);
|
||||
updateDevice(addDevice.value.id, addDevice.value.name);
|
||||
const result = await bindDeviceAPI(addDevice.value);
|
||||
confirmBindTip.value = false;
|
||||
if (result.binded) {
|
||||
return uni.showToast({
|
||||
title: "设备已绑定其他账号,请解绑后再绑定",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
updateDevice(addDevice.value.id, addDevice.value.name);
|
||||
justBind.value = true;
|
||||
uni.showToast({
|
||||
title: "绑定成功",
|
||||
@@ -235,7 +241,7 @@ const backToHome = () => {
|
||||
.confirm-bind > view:last-child {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.confirm-bind > view:last-child > view {
|
||||
width: 48%;
|
||||
|
||||
Reference in New Issue
Block a user