|
@@ -1,4 +1,5 @@
|
|
|
<script>
|
|
|
+import { up, down } from '@/api/monitor'
|
|
|
export default {
|
|
|
onLaunch: function () {
|
|
|
console.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!')
|
|
@@ -8,6 +9,9 @@ export default {
|
|
|
onShow: function () {
|
|
|
console.log('App Show')
|
|
|
console.log(this.$fileBasUrl, 'appppp$fileBasUrl')
|
|
|
+ if (wx.getStorageSync('token')) {
|
|
|
+ up()
|
|
|
+ }
|
|
|
// this.connectSocket()
|
|
|
|
|
|
// this.timer = setInterval(() => {
|
|
@@ -20,6 +24,9 @@ export default {
|
|
|
},
|
|
|
onHide: function () {
|
|
|
console.log('App Hide')
|
|
|
+ if (wx.getStorageSync('token')) {
|
|
|
+ down()
|
|
|
+ }
|
|
|
// close socket
|
|
|
// wx.closeSocket()
|
|
|
// clearInterval(this.timer)
|