bing_mac to controlDevice

This commit is contained in:
WindowBird 2025-10-14 09:02:17 +08:00
parent 3ffd4c9ed1
commit bd42b3e2b1
2 changed files with 11 additions and 10 deletions

View File

@ -324,12 +324,12 @@ export default {
duration: 2000, duration: 2000,
}); });
// // //
// setTimeout(() => { setTimeout(() => {
// uni.navigateTo({ uni.navigateTo({
// url: `/page_user/luru/controlDevice?sn=${encodeURIComponent(this.sn)}`, url: `/page_user/luru/controlDevice?sn=${encodeURIComponent(this.mac)}`,
// }) });
// }, 2000) }, 2000);
} else { } else {
throw new Error(res.msg || "绑定失败"); throw new Error(res.msg || "绑定失败");
} }

View File

@ -99,8 +99,9 @@ export default {
}; };
}, },
onLoad(options) { onLoad(options) {
if (options.sn) { if (options.mac) {
this.storeId = options.sn; this.storeId = options.mac;
this.mac = options.mac;
this.getsn(); this.getsn();
} }
}, },
@ -293,11 +294,11 @@ export default {
uni.showLoading({ uni.showLoading({
title: "设备开启中...", title: "设备开启中...",
}); });
try { try {
const res = await sendCommand({ const res = await sendCommand({
command: "11open", command: "11open",
mac: "44D6DA263B38", mac: this.mac,
tryCount: "2", tryCount: "2",
timeout: "10", timeout: "10",
reason: "测试", reason: "测试",