ll
liukangdong
2024-10-22 85b460b57cd7e9ad935042df74f40e1bbdfa3408
h5_meeting/pages/index/index.vue
@@ -98,20 +98,24 @@
               4: '即将开始',
               5: '已撤销',
            },
            meetingInfo: {}
            meetingInfo: {},
            timer: null
         }
      },
      onShow() {
         this.initDatetime()
         this.param = uni.getStorageSync('param') || {}
         if (!this.param.code) {
            return uni.navigateTo({
               url: '/pages/index/config'
            })
         }
         this.getData()
      },
      onReady() {},
      onReady() {},
      onHide(){
         if(this.timer){
            clearInterval(this.timer)
         }
      },
      methods: {
         getData() {
            this.showQrbg = false
@@ -173,8 +177,13 @@
            this.timer = setInterval(() => {
               this.time = dayjs().format('HH:mm')
               this.date = dayjs().format('YYYY-MM-DD') + ' ' + weeks[new Date().getDay()]
            }, 1000)
            setInterval(() => {
            }, 1000)
            this.param = uni.getStorageSync('param') || {}
            if(this.timer){
               clearInterval(this.timer)
            }
            this.getData()
            this.timer = setInterval(() => {
               this.getData()
            }, this.param.time ? this.param.time * 1000 : 60 * 1000)
         }