andy 1 рік тому
батько
коміт
053dc75434
1 змінених файлів з 11 додано та 11 видалено
  1. 11 11
      App.vue

+ 11 - 11
App.vue

@@ -8,24 +8,24 @@ export default {
   onShow: function () {
     console.log('App Show')
     console.log(this.$fileBasUrl, 'appppp$fileBasUrl')
-    this.connectSocket()
+    // this.connectSocket()
 
-    this.timer = setInterval(() => {
-      wx.request({
-        url: 'http://192.168.0.109:3000/heartbeat?userId=' + wx.getStorageSync('userId'),
-      })
-    }, 5000)
+    // this.timer = setInterval(() => {
+    //   wx.request({
+    //     url: 'http://192.168.0.109:3000/heartbeat?userId=' + wx.getStorageSync('userId'),
+    //   })
+    // }, 5000)
 
     // uni.hideTabBar()
   },
   onHide: function () {
     console.log('App Hide')
     // close socket
-    wx.closeSocket()
-    clearInterval(this.timer)
-    wx.request({
-      url: 'http://192.168.0.109:3000/hide?userId=' + wx.getStorageSync('userId'),
-    })
+    // wx.closeSocket()
+    // clearInterval(this.timer)
+    // wx.request({
+    //   url: 'http://192.168.0.109:3000/hide?userId=' + wx.getStorageSync('userId'),
+    // })
   },
   globalData: {
     fileBasUrl: 'https://mall.rongtongh.cn/storage/img',