修正开关判断逻辑

This commit is contained in:
WindowBird 2025-10-14 10:00:05 +08:00
parent bd42b3e2b1
commit 000395a22a
2 changed files with 4 additions and 3 deletions

View File

@ -327,7 +327,7 @@ export default {
//
setTimeout(() => {
uni.navigateTo({
url: `/page_user/luru/controlDevice?sn=${encodeURIComponent(this.mac)}`,
url: `/page_user/luru/controlDevice?mac=${encodeURIComponent(this.mac)}`,
});
}, 2000);
} else {

View File

@ -297,7 +297,7 @@ export default {
try {
const res = await sendCommand({
command: "11open",
command: "open",
mac: this.mac,
tryCount: "2",
timeout: "10",
@ -307,7 +307,8 @@ export default {
console.log("open-res", res);
uni.hideLoading();
if (res.code === 200) {
if (res.code === 200 && res.data.code === "0") {
//0
uni.showToast({
title: "开启成功",
icon: "success",