From 7389eb88b24639bde6ac62dcd3c334ae6ceb8710 Mon Sep 17 00:00:00 2001 From: chen <2659004835@qq.com> Date: Fri, 19 Aug 2022 15:11:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 4 +- components/city/city.vue | 233 ----------------------------- pages/tabbar/pagehome/pagehome.vue | 13 +- 3 files changed, 9 insertions(+), 241 deletions(-) delete mode 100644 components/city/city.vue diff --git a/App.vue b/App.vue index 51f8e2a..7024795 100644 --- a/App.vue +++ b/App.vue @@ -15,7 +15,9 @@ // #ifdef MP-WEIXIN this.globalData.bgmMusic = wx.createInnerAudioContext(); // #endif - this.checkNotification(); + // #ifdef APP-PLUS + // this.checkNotification(); + // #endif }, onShow: function() { if(uni.getStorageSync('token')){ diff --git a/components/city/city.vue b/components/city/city.vue deleted file mode 100644 index 4aab069..0000000 --- a/components/city/city.vue +++ /dev/null @@ -1,233 +0,0 @@ - - - - - diff --git a/pages/tabbar/pagehome/pagehome.vue b/pages/tabbar/pagehome/pagehome.vue index eb306a0..5fc176f 100644 --- a/pages/tabbar/pagehome/pagehome.vue +++ b/pages/tabbar/pagehome/pagehome.vue @@ -34,7 +34,7 @@ {{project_count || 0}} - + 实时工单 {{project_error_count || 0}} @@ -352,6 +352,10 @@ // 调用首页信息查询事件 this.checkHome(); console.log(this.role,'角色id') + // 刷新连接 + if(!this.ifConnect && this.uid){ + this.connect(); + } }, onLoad(options) { // #ifdef H5 || APP-PLUS @@ -370,9 +374,7 @@ this.getFaultsList(); // 获取设置信息 this.getSettings(); - if(!this.ifConnect && this.uid){ - this.connect(); - } + }, methods: { // 获取设置信息 @@ -388,9 +390,6 @@ } }) }, - connectEv(){ - socket.io.reconnect(); - }, connect() { const socket = io("ws://7and5.cn:2120",{ query: {},