From 13cd1c300bae18d061c2a46d327f3bc852d8a926 Mon Sep 17 00:00:00 2001 From: 18796357645 <674126018@qq.com> Date: Sat, 19 Jul 2025 16:54:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=8B=E5=A5=BD=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/deviceBind/index.vue | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pages/deviceBind/index.vue b/pages/deviceBind/index.vue index 1140c36..64961fc 100644 --- a/pages/deviceBind/index.vue +++ b/pages/deviceBind/index.vue @@ -101,15 +101,18 @@ export default { duration: 1500 }); // 调用绑定接口 - this.bindDevice(); + // 1500ms(1.5秒)后执行绑定 + setTimeout(() => { + this.bindDevice(); + }, 1500); // 与 toast 的 duration 保持一致 } }, fail: (err) => { console.error('扫码失败:', err); - // uni.showToast({ - // title: '扫码失败,请重试', - // icon: 'none' - // }); + uni.showToast({ + title: '扫码失败,请重试', + icon: 'none' + }); } }); }, @@ -134,9 +137,9 @@ export default { }); // console.log('res', res); - // if (res.statusCode === 200) { - // uni.showToast({ title: "绑定成功" }); - // } + if (res.statusCode === 200) { + uni.showToast({ title: "绑定成功" }); + } } catch (error) { console.error("设备绑定失败:", error); uni.showToast({ title: "设备绑定失败", icon: "none" });