Jelajahi Sumber

聊天室发送消息 网络通信故障或断开时添加提示

zhanglikun 4 tahun lalu
induk
melakukan
a0671c01ac
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      src/apps/mobile/components/header/header.vue

+ 2 - 1
src/apps/mobile/components/header/header.vue

@@ -228,7 +228,8 @@ export default {
         socket.onerror = () => {
             // 重新创建长连接
             this.reconnect();
-            console.log("通信错误")
+            console.log("通信错误");
+            this.$message.error("请检查您的网络连接");
         };
         // 连接建立时触发
         socket.onopen = () => {