增加友好提示
This commit is contained in:
parent
2303d3e193
commit
13cd1c300b
@ -101,15 +101,18 @@ export default {
|
|||||||
duration: 1500
|
duration: 1500
|
||||||
});
|
});
|
||||||
// 调用绑定接口
|
// 调用绑定接口
|
||||||
this.bindDevice();
|
// 1500ms(1.5秒)后执行绑定
|
||||||
|
setTimeout(() => {
|
||||||
|
this.bindDevice();
|
||||||
|
}, 1500); // 与 toast 的 duration 保持一致
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.error('扫码失败:', err);
|
console.error('扫码失败:', err);
|
||||||
// uni.showToast({
|
uni.showToast({
|
||||||
// title: '扫码失败,请重试',
|
title: '扫码失败,请重试',
|
||||||
// icon: 'none'
|
icon: 'none'
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -134,9 +137,9 @@ export default {
|
|||||||
});
|
});
|
||||||
// console.log('res', res);
|
// console.log('res', res);
|
||||||
|
|
||||||
// if (res.statusCode === 200) {
|
if (res.statusCode === 200) {
|
||||||
// uni.showToast({ title: "绑定成功" });
|
uni.showToast({ title: "绑定成功" });
|
||||||
// }
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("设备绑定失败:", error);
|
console.error("设备绑定失败:", error);
|
||||||
uni.showToast({ title: "设备绑定失败", icon: "none" });
|
uni.showToast({ title: "设备绑定失败", icon: "none" });
|
||||||
|
Loading…
Reference in New Issue
Block a user