From 41965c4fa4a355c431a9300877d7ca4140564241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E7=A3=8A?= <45566618@qq.com> Date: Wed, 28 Aug 2024 23:37:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=9C=8D=E5=9C=A8=E7=BA=BF=E8=81=8A?= =?UTF-8?q?=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/msg/im.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pages/msg/im.vue b/pages/msg/im.vue index 7f0b064..6455ed7 100644 --- a/pages/msg/im.vue +++ b/pages/msg/im.vue @@ -173,7 +173,8 @@ }, mounted() { this.timer = setInterval(() => { - this.getTimeOrListItem1() + this.getTimeOrListItem1(); + this.connect(); }, 3000); }, onUnload() { @@ -255,11 +256,11 @@ connect() { let that = this; let userId = that.$queue.getData('userId'); - if (that.connected || that.connecting) { - uni.showModal({ - content: '正在连接或者已经连接,请勿重复连接', - showCancel: false - }) + if (that.connected && that.connecting) { + // uni.showModal({ + // content: '正在连接或者已经连接,请勿重复连接', + // showCancel: false + // }) return false } that.connecting = true @@ -390,7 +391,7 @@ }, 50); }, fail(err) { - that.connect() + that.connect(); console.log(err); } })