|
@@ -46,7 +46,7 @@ export default class Websocket {
|
|
|
// 监听websocket连接关闭
|
|
|
onSocketClosed(options) {
|
|
|
uni.onSocketError(err => {
|
|
|
- // console.log('当前websocket连接已关闭,错误信息为:' + JSON.stringify(err));
|
|
|
+ console.log('当前websocket连接已关闭,错误信息为:' + JSON.stringify(err));
|
|
|
// 停止心跳连接
|
|
|
if (this._heartCheck) {
|
|
|
this._reset();
|
|
@@ -54,7 +54,7 @@ export default class Websocket {
|
|
|
// 关闭已登录开关
|
|
|
this._isLogin = false;
|
|
|
// 检测是否是用户自己退出小程序
|
|
|
- // console.log('------------------开启重连--------------------------------')
|
|
|
+ console.log('------------------开启重连--------------------------------')
|
|
|
if (!this._isClosed) {
|
|
|
// 进行重连
|
|
|
if (this._isReconnection) {
|
|
@@ -116,7 +116,7 @@ export default class Websocket {
|
|
|
success(result) {
|
|
|
if (result.networkType != 'none') {
|
|
|
// 开始建立连接
|
|
|
- // console.log('建立websocket连接' + options.url);
|
|
|
+ console.log('建立websocket连接' + options.url);
|
|
|
uni.connectSocket({
|
|
|
url: options.url,
|
|
|
success(res) {
|