|
@@ -264,7 +264,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <alarModel />
|
|
|
|
|
|
+ <!-- <alarModel /> -->
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
@@ -413,9 +413,10 @@ export default {
|
|
};
|
|
};
|
|
let client = "";
|
|
let client = "";
|
|
let selectedService = uni.getStorageSync("sercviceChoice");
|
|
let selectedService = uni.getStorageSync("sercviceChoice");
|
|
- if (!selectedService || selectedService == "aloneServe") {
|
|
|
|
- client = mqtt.connect("wxs://radar-power.cn:8084/mqtt", params);
|
|
|
|
- }
|
|
|
|
|
|
+ // if (!selectedService || selectedService == "aloneServe") {
|
|
|
|
+ // client = mqtt.connect("wxs://radar-power.cn:8084/mqtt", params);
|
|
|
|
+ // }
|
|
|
|
+ client = mqtt.connect("wxs://radar-power.cn:8084/mqtt", params);
|
|
// 存储client引用以便后续操作
|
|
// 存储client引用以便后续操作
|
|
this.mqttClient = client;
|
|
this.mqttClient = client;
|
|
|
|
|
|
@@ -498,7 +499,16 @@ export default {
|
|
this.targetPoints[id].displayY = y;
|
|
this.targetPoints[id].displayY = y;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ this.targetPoints.forEach((key) => {
|
|
|
|
+ const id = key;
|
|
|
|
+ if (!currentIds.has(id)) {
|
|
|
|
+ delete this.targetPoints[id];
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
console.log("🚀🚀🚀🚀targets", this.targetPoints);
|
|
console.log("🚀🚀🚀🚀targets", this.targetPoints);
|
|
|
|
+ } else {
|
|
|
|
+ this.targetPoints.forEach((key) => delete targets[key]);
|
|
}
|
|
}
|
|
} catch (e) {
|
|
} catch (e) {
|
|
// console.error("MQTT消息解析失败", e);
|
|
// console.error("MQTT消息解析失败", e);
|