liwei19941102 2 лет назад
Родитель
Сommit
cc00f346cb
1 измененных файлов с 10 добавлено и 6 удалено
  1. 10 6
      src/components/Map/videoMap.vue

+ 10 - 6
src/components/Map/videoMap.vue

@@ -15,6 +15,7 @@ import { shallowRef } from '@vue/reactivity';
 import { ref } from "vue";
 import { getDicts } from '@/api/system/dict/data'
 import { getGpsData } from '@/api/gpsData/index'
+import { getCameraPlayerConfig } from '@/api/gpsData';
 import carImage from "@/assets/images/icon/小货车.png";
 import add from '@/views/car/carInfo/add.vue';
 import EZUIKit from 'ezuikit-js';
@@ -217,13 +218,16 @@ const addLine = (list) => {
 const emit = defineEmits(['childToParent']);
 
 const clickMarker = (e) => {
-    var data = {accessToken: 'at.6h0xghjr5mahrhd85kn05wtv4mzyvrus-9gweoezcyb-1973cy2-jw97mtyh8', url: 'ezopen://open.ys7.com/AY6646079/1.hd.live'}
+    console.log(e)
     allInfoWindow.value.open(mapObj.value, e.target.getPosition());
-    var player = new EZUIKit.EZUIKitPlayer({
-        template: "pcLive",
-        id: 'video-container',// 视频容器ID
-        ...data
-    })
+    getCameraPlayerConfig('FD1958046').then(res => {
+        console.log(res.data);
+        var player = new EZUIKit.EZUIKitPlayer({
+          template: "pcLive",
+          id: 'video-container', // 视频容器ID
+          ...res.data
+        })
+      })
     // emit('childToParent', e.target.getPosition())
 }