|
@@ -779,18 +779,10 @@ export default {
|
|
|
try {
|
|
|
const devItem = this.parseDeviceItem(options.devItem);
|
|
|
const { devId, clientId } = devItem;
|
|
|
- Promise.all([this.getdevInfo(devId), this.getdevRoomInfo(devId)])
|
|
|
- .then(() => {
|
|
|
- this.connectMQTT(clientId, devId);
|
|
|
- this.getFrequency(devId);
|
|
|
- })
|
|
|
- .catch((error) => {
|
|
|
- // console.error("初始化失败:", error);
|
|
|
- uni.showToast({
|
|
|
- title: "初始化设备信息失败",
|
|
|
- icon: "none",
|
|
|
- });
|
|
|
- });
|
|
|
+ this.connectMQTT(clientId, devId);
|
|
|
+ this.getFrequency(devId);
|
|
|
+ this.getdevInfo(devId);
|
|
|
+ this.getdevRoomInfo(devId);
|
|
|
} catch (error) {
|
|
|
uni.showToast({
|
|
|
title: "设备信息格式错误",
|
|
@@ -815,7 +807,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
- this.$refs.alarModel.connectMQTTwo();
|
|
|
+ // this.$refs.alarModel.connectMQTTwo();
|
|
|
},
|
|
|
};
|
|
|
</script>
|