|
@@ -494,6 +494,10 @@ export default {
|
|
|
client.on("close", () => {});
|
|
|
|
|
|
client.on("message", (topic, message) => {
|
|
|
+ let userId = uni.getStorageSync("userId");
|
|
|
+ const noticeMatch = /^\/mps\/wx_(.+)\/notice$/;
|
|
|
+ const match = topic.match(noticeMatch);
|
|
|
+ if (!match) return;
|
|
|
this.alarmModel = true;
|
|
|
const data = JSON.parse(message.toString());
|
|
|
this.clientId = data.clientId;
|
|
@@ -501,7 +505,7 @@ export default {
|
|
|
this.sn = data.clientId;
|
|
|
this.eventListId = data.eventListId;
|
|
|
|
|
|
- console.log(data, "接收到消息222:");
|
|
|
+ console.log(data, topic, "接收到消息222:");
|
|
|
console.log(
|
|
|
"接收到消息:",
|
|
|
this.clientId,
|