Commit eb27f3a0 authored by 耿迪迪's avatar 耿迪迪

消息修改

parent 8e6e78be
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
if(!this.$websocket.isExsitWebsocket()){ if(!this.$websocket.isExsitWebsocket()){
this.$websocket.initWebSocket(process.env.VUE_APP_WEBSOCKET_URL + this.$store.state.user.userId); this.$websocket.initWebSocket(process.env.VUE_APP_WEBSOCKET_URL + this.$store.state.user.userId);
this.$websocket.addEvent("onmessage",(msg) =>{ this.$websocket.addEvent("onmessage",(msg) =>{
console.log("fsfdfd------",msg)
if(msg.data){ if(msg.data){
console.log("您有新的消息请注意接收:", JSON.parse(msg.data)); console.log("您有新的消息请注意接收:", JSON.parse(msg.data));
this.msgInfo = JSON.parse(msg.data); this.msgInfo = JSON.parse(msg.data);
...@@ -78,6 +79,9 @@ ...@@ -78,6 +79,9 @@
this.msgInfo.push(msgData); this.msgInfo.push(msgData);
}*/ }*/
} }
if(msg.data == ""){
this.msgInfo =[];
}
}); });
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment