设备控制
parent
2a34df477f
commit
237ab647ab
10
App.vue
10
App.vue
|
|
@ -124,13 +124,13 @@ export default {
|
|||
}
|
||||
var clientId = mqttUtil.getMqttState().clientId;
|
||||
const subscribeList = [
|
||||
`frontend/${clientId}/dtu/864865085016294/listener`,
|
||||
`frontend/${clientId}/dtu/864536071808560/listener`,
|
||||
`frontend/${clientId}/dtu/864865085008135/listener`,
|
||||
`frontend/${clientId}/dtu/862538065276939/listener`
|
||||
`frontend/${clientId}/dtu/864865085016294/+`,
|
||||
`frontend/${clientId}/dtu/864536071808560/+`,
|
||||
`frontend/${clientId}/dtu/864865085008135/+`,
|
||||
`frontend/${clientId}/dtu/862538065276939/+`
|
||||
];
|
||||
if (store.getters && store.getters.name === 'admin') {
|
||||
subscribeList.push(`frontend/${clientId}/dtu/862538065276061/listener`);
|
||||
subscribeList.push(`frontend/${clientId}/dtu/862538065276061/+`);
|
||||
}
|
||||
this.globalData.mqtt.subscribeList = subscribeList || []
|
||||
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ const SENSOR_MAP = {
|
|||
temp1: "201", temp2: "202", temp3: "203", temp4: "204",
|
||||
humi1: "101", humi2: "102", humi3: "103", humi4: "104"
|
||||
};
|
||||
const MQTT_TOPIC_SUFFIX = { UP: "/listener", DOWN: "/control" };
|
||||
const MQTT_TOPIC_SUFFIX = { UP: "/+", DOWN: "/control" };
|
||||
|
||||
import UniDatetimePicker from "../../uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue";
|
||||
import UniPopup from "../../uni_modules/uni-popup/components/uni-popup/uni-popup.vue"; // 引入弹窗组件
|
||||
|
|
|
|||
Loading…
Reference in New Issue