xiangpei
2024-10-30 a38e8dc8f74ebd4b5ce49efe5d3d9bce90834968
src/views/meet/index.vue
@@ -278,13 +278,15 @@
    this.jitsiApi.addListener('readyToClose', () => {
      window.close()
    })
    // 初始化
    this.initWebSocket()
    // 每三秒更学员在线状态
    this.intervalId = setInterval(() => {
      this.getRoomInfo()
      // 发送心跳数据
      this.ws.send('ping')
    }, 2500)
    // 初始化
    this.initWebSocket()
  },
  beforeDestroy () {
    // 清除定时器,避免内存泄漏