Преглед изворни кода

Merge branch 'master' of http://git.huaml.com/zhh/front-end

shish пре 10 месеци
родитељ
комит
4bc2fb0b48
2 измењених фајлова са 12 додато и 10 уклоњено
  1. 6 5
      hdApp/src/admin/chat/chatPage.vue
  2. 6 5
      mallApp/src/pages/chat/chatPage.vue

+ 6 - 5
hdApp/src/admin/chat/chatPage.vue

@@ -446,10 +446,11 @@ export default {
             }, 3000);
           }
 
+          this.isConnected = false;
           // 尝试重新连接超过 maxReconnectCount 次才标记为未连接状态
-          if (!this.isManualDisconnect && this.reconnectCount >= this.maxReconnectCount) {
-            this.isConnected = false;
-          }
+          // if (!this.isManualDisconnect && this.reconnectCount >= this.maxReconnectCount) {
+          //   this.isConnected = false;
+          // }
         });
 
         // 监听WebSocket错误
@@ -831,7 +832,7 @@ export default {
 
       if (!this.isConnected) {
         uni.showToast({
-          title: 'WebSocket未连接',
+          title: '未连接到网络',
           icon: 'none'
         });
         return;
@@ -1048,7 +1049,7 @@ export default {
     sendMessageOfGoodsPrice(currentGoodsInfo) {
       if (!this.isConnected) {
         uni.showToast({
-          title: 'WebSocket未连接',
+          title: '未连接到网络',
           icon: 'none'
         });
         return;

+ 6 - 5
mallApp/src/pages/chat/chatPage.vue

@@ -530,10 +530,11 @@ export default {
             }, 3000);
           }
 
+          this.isConnected = false;
           // 尝试重新连接超过 maxReconnectCount 次才标记为未连接状态
-          if (!this.isManualDisconnect && this.reconnectCount >= this.maxReconnectCount) {
-            this.isConnected = false;
-          }
+          // if (!this.isManualDisconnect && this.reconnectCount >= this.maxReconnectCount) {
+          //   this.isConnected = false;
+          // }
         });
 
         // 监听WebSocket错误
@@ -907,7 +908,7 @@ export default {
 
       if (!this.isConnected) {
         uni.showToast({
-          title: "WebSocket未连接",
+          title: "未连接到网络",
           icon: "none",
         });
         return;
@@ -1052,7 +1053,7 @@ export default {
     sendMessageOfGoodsInfo() {
       if (!this.isConnected) {
         uni.showToast({
-          title: "WebSocket未连接",
+          title: "未连接到网络",
           icon: "none",
         });
         return;