修正开关判断逻辑
This commit is contained in:
parent
bd42b3e2b1
commit
000395a22a
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user