Browse Source

电视墙

彭宇 2 năm trước cách đây
mục cha
commit
04b60a962d
1 tập tin đã thay đổi với 24 bổ sung23 xóa
  1. 24 23
      src/components/TVWall.vue

+ 24 - 23
src/components/TVWall.vue

@@ -237,29 +237,7 @@
       }
     },
     created() {
-      /** ----------------------------------摄像头预览开始------------------------------------- */
-      const DHWsInstance = DHWs.getInstance()
-      this.ws = DHWsInstance
-      this.ws.addEventListener('connectStateChange', data => {
-        if (data) {
-          console.log('连接成功')
-        } else {
-          console.log('连接失败,下载客户端')
-          this.alertReinstall()
-          // this.isShowTipe && this.$modal.confirm({
-          //   title: '下载客户端',
-          //   content: '检测到您未安装部分插件,将影响部分功能使用,请下载后使用?',
-          //   onOk: () => {
-          //     //这里写下载方法
-          //     this.isShowTipe = false
-          //   },
-          //   onCancel: () => {
-          //     this.isShowTipe = false
-          //   }
-          // });
-        }
-      })
-      /** ----------------------------------摄像头预览结束------------------------------------- */
+
     },
     methods: {
       cancelEventLocationShow() {
@@ -268,6 +246,29 @@
         this.destroy()
       },
        showTVWall() {
+         /** ----------------------------------摄像头预览开始------------------------------------- */
+         const DHWsInstance = DHWs.getInstance()
+         this.ws = DHWsInstance
+         this.ws.addEventListener('connectStateChange', data => {
+           if (data) {
+             console.log('连接成功')
+           } else {
+             console.log('连接失败,下载客户端')
+             this.alertReinstall()
+             // this.isShowTipe && this.$modal.confirm({
+             //   title: '下载客户端',
+             //   content: '检测到您未安装部分插件,将影响部分功能使用,请下载后使用?',
+             //   onOk: () => {
+             //     //这里写下载方法
+             //     this.isShowTipe = false
+             //   },
+             //   onCancel: () => {
+             //     this.isShowTipe = false
+             //   }
+             // });
+           }
+         })
+         /** ----------------------------------摄像头预览结束------------------------------------- */
          this.preview()
          this.TVWallVisible = true
        },