|
|
@@ -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;
|