This commit is contained in:
魏啾
2024-06-12 14:03:59 +08:00
parent 4582bcac2f
commit 0084a4e91c

View File

@@ -32,6 +32,7 @@ class webSocketUtils {
console.log('正准备建立websocket中...');
// uni.hideLoading();
// 返回实例
uni.hideLoading()
return this.socketTask;
},
});
@@ -135,6 +136,10 @@ class webSocketUtils {
clearInterval(this.heartbeatInterval);
//如果不是人为关闭的话,进行重连
if (!this.is_open_socket) {
uni.showLoading({
title: '加载中',
mask: true
})
console.log('进行重连');
this.canReconnect = true;
this.reconnectTimeOut = setInterval(() => {