From bd42b3e2b17500c9770fc92ae06168203661b99e Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Tue, 14 Oct 2025 09:02:17 +0800 Subject: [PATCH] bing_mac to controlDevice --- page_user/luru/bind_mac.vue | 12 ++++++------ page_user/luru/controlDevice.vue | 9 +++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/page_user/luru/bind_mac.vue b/page_user/luru/bind_mac.vue index 27f4257..f49c23c 100644 --- a/page_user/luru/bind_mac.vue +++ b/page_user/luru/bind_mac.vue @@ -324,12 +324,12 @@ export default { duration: 2000, }); - // // 延迟跳转,让用户看到成功提示 - // setTimeout(() => { - // uni.navigateTo({ - // url: `/page_user/luru/controlDevice?sn=${encodeURIComponent(this.sn)}`, - // }) - // }, 2000) + // 延迟跳转,让用户看到成功提示 + setTimeout(() => { + uni.navigateTo({ + url: `/page_user/luru/controlDevice?sn=${encodeURIComponent(this.mac)}`, + }); + }, 2000); } else { throw new Error(res.msg || "绑定失败"); } diff --git a/page_user/luru/controlDevice.vue b/page_user/luru/controlDevice.vue index 2b8e46b..662583d 100644 --- a/page_user/luru/controlDevice.vue +++ b/page_user/luru/controlDevice.vue @@ -99,8 +99,9 @@ export default { }; }, onLoad(options) { - if (options.sn) { - this.storeId = options.sn; + if (options.mac) { + this.storeId = options.mac; + this.mac = options.mac; this.getsn(); } }, @@ -293,11 +294,11 @@ export default { uni.showLoading({ title: "设备开启中...", }); - + try { const res = await sendCommand({ command: "11open", - mac: "44D6DA263B38", + mac: this.mac, tryCount: "2", timeout: "10", reason: "测试",