From 169e9b4d59bdd763bb5bd1b5a9b092a1200e327b Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期一, 17 四月 2023 17:37:18 +0800
Subject: [PATCH] 增加原发信息,修复bug
---
pages/tabbar-page/index-tabbar/index-tabbar.vue | 17 +----------------
1 files changed, 1 insertions(+), 16 deletions(-)
diff --git a/pages/tabbar-page/index-tabbar/index-tabbar.vue b/pages/tabbar-page/index-tabbar/index-tabbar.vue
index a42f5ec..8b873b4 100644
--- a/pages/tabbar-page/index-tabbar/index-tabbar.vue
+++ b/pages/tabbar-page/index-tabbar/index-tabbar.vue
@@ -115,18 +115,12 @@
isconnect: false
};
},
- beforeDestroy() {
- this.closeSocket();
- },
onShow() {
this.init();
if (!this.isconnect) {
this.initWebsocket();
}
this.userAuthorization();
- },
- onBackPress() {
- this.closeSocket();
},
methods: {
...mapMutations(['pushMessage', 'changeWeigh', 'changeinfraredStatus']),
@@ -236,20 +230,11 @@
});
socket.onClose(() => {
console.log('webSocketClose');
+ this.isconnect = false;
});
socket.onError(err => {
console.log('socket鎶ラ敊', err);
this.$u.toast('鍑虹幇閿欒锛岃閲嶆柊杩涘叆璇ラ〉闈紝閲嶈瘯锛侊紒');
- });
- },
- closeSocket() {
- socket.close({
- success(res) {
- console.log('鍏抽棴鎴愬姛', res);
- },
- fail(err) {
- console.log('鍏抽棴澶辫触', err);
- }
});
},
messageconfirm() {
--
Gitblit v1.9.1