This commit is contained in:
Iruka 2025-01-02 19:30:28 +08:00
parent fd4652844d
commit b37fe5da7d

View File

@ -120,7 +120,7 @@
},
onShow() {},
mounted() {},
onUnload(){
onUnload() {
getApp().mqttUnsubscribes(this.topics);
},
methods: {
@ -137,12 +137,12 @@
mqttSubscribes(rows) {
if (rows && rows.length) {
const shortTopic = [
"/user/postConfig", //
"jsy/iot/deviceConfig/", //
]
let topic = [];
rows.forEach(item => {
shortTopic.forEach(i => {
topic.push(`/${item.productKey}/${item.deviceCode}${i}`);
topic.push(i + `${item.deviceTypeID}/${item.deviceCcode}`);
});
});
this.topics = topic;