|
@@ -8,24 +8,24 @@ export default {
|
|
onShow: function () {
|
|
onShow: function () {
|
|
console.log('App Show')
|
|
console.log('App Show')
|
|
console.log(this.$fileBasUrl, 'appppp$fileBasUrl')
|
|
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()
|
|
// uni.hideTabBar()
|
|
},
|
|
},
|
|
onHide: function () {
|
|
onHide: function () {
|
|
console.log('App Hide')
|
|
console.log('App Hide')
|
|
// close socket
|
|
// 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: {
|
|
globalData: {
|
|
fileBasUrl: 'https://mall.rongtongh.cn/storage/img',
|
|
fileBasUrl: 'https://mall.rongtongh.cn/storage/img',
|