.
This commit is contained in:
parent
fd4652844d
commit
b37fe5da7d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user