dedsudiyu 5 日 前
親
コミット
462c99626d
共有2 個のファイルを変更した、39 個の追加 と 9 個の削除を含む
  1. 9 1
      src/api/index.js
  2. 30 8
      src/components/LabStats/videoStats.vue

+ 9 - 1
src/api/index.js

@@ -386,10 +386,18 @@ export function iotDeviceList(data = {}) {
     data
   })
 }
+// //查询第三方flv视频
+// export function laboratorySignInCheckGetKunYunToken(params) {
+//   return request({
+//     url: '/laboratory/signIn/check/getKunYunToken',
+//     method: 'get',
+//     params
+//   })
+// }
 //查询第三方flv视频
 export function laboratorySignInCheckGetKunYunToken(params) {
   return request({
-    url: '/laboratory/signIn/check/getKunYunToken',
+    url: '/laboratory/signIn/check/getKunYunFixedUrl',
     method: 'get',
     params
   })

+ 30 - 8
src/components/LabStats/videoStats.vue

@@ -90,20 +90,42 @@
       async laboratorySignInCheckGetKunYunToken(){
         const res = await laboratorySignInCheckGetKunYunToken();
         if (res.code === 200) {
-          this.$set(this,'mpegtsList',[
-            {
+          let list = [];
+          if(res.data[0]){
+            list.push({
               width: 470, //(宽度:非必传-默认600)
               height: 280, //(高度:非必传-默认338)
-              url: 'wss://192.168.166.11/zlmedia/gpfas/e6ba259ca65e47c3bd8c8ff357ab07ed-e31734aa19e342f198d56d3335e82b39-7.live.flv?token='+res.data,
+              url: res.data[0].streamUrl,
               cameraIndexCode: '4012',
-            },
-            {
+            })
+          }
+          if(res.data[1]){
+            list.push({
               width: 470, //(宽度:非必传-默认600)
               height: 280, //(高度:非必传-默认338)
-              url: 'wss://192.168.166.11/zlmedia/gpfas/e6ba259ca65e47c3bd8c8ff357ab07ed-bfb405ce0991426ca8ef611a60e7a483-7.live.flv?token='+res.data,
+              url: res.data[1].streamUrl,
               cameraIndexCode: '4211',
-            },
-          ]);
+            })
+          }
+          this.$set(this,'mpegtsList',list);
+
+
+          // this.$set(this,'mpegtsList',[
+          //   {
+          //     width: 470, //(宽度:非必传-默认600)
+          //     height: 280, //(高度:非必传-默认338)
+          //     // url: 'wss://192.168.166.11/zlmedia/gpfas/e6ba259ca65e47c3bd8c8ff357ab07ed-e31734aa19e342f198d56d3335e82b39-7.live.flv?token='+res.data,
+          //     url: res.data[0].streamUrl,
+          //     cameraIndexCode: '4012',
+          //   },
+          //   {
+          //     width: 470, //(宽度:非必传-默认600)
+          //     height: 280, //(高度:非必传-默认338)
+          //     // url: 'wss://192.168.166.11/zlmedia/gpfas/e6ba259ca65e47c3bd8c8ff357ab07ed-bfb405ce0991426ca8ef611a60e7a483-7.live.flv?token='+res.data,
+          //     url: res.data,
+          //     cameraIndexCode: '4211',
+          //   },
+          // ]);
 
         }
       },