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