|
|
@ -9,14 +9,20 @@ import request from "@/utils/request"; |
|
|
|
* @param {1 | 2 | 3} media 参数说明: 1: http+flv; 2: rtmp; 3: hls |
|
|
|
* @returns |
|
|
|
*/ |
|
|
|
export function getCameraStream(camId, media = 1) { |
|
|
|
return request({ |
|
|
|
url: "/video/externalVideoStreaming", |
|
|
|
method: "get", |
|
|
|
params: { |
|
|
|
camId, |
|
|
|
}, |
|
|
|
}); |
|
|
|
export async function getCameraStream(camId, media = 1) { |
|
|
|
let data = await request({ |
|
|
|
url: "/video/externalVideoStreaming", |
|
|
|
method: "get", |
|
|
|
params: { |
|
|
|
camId, |
|
|
|
}, |
|
|
|
}); |
|
|
|
|
|
|
|
if (data.code == 200){ |
|
|
|
data.data.liveUrl = "https://10.0.81.202/camera?target=" + data.data.liveUrl.substring(7); |
|
|
|
} |
|
|
|
|
|
|
|
return data; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -276,7 +282,7 @@ export function getEventTopicList(eventType) { |
|
|
|
|
|
|
|
request({ |
|
|
|
url: `/business/trafficIncidents/getEventList/${eventType}`, |
|
|
|
method: "get", |
|
|
|
method: "post", |
|
|
|
}) |
|
|
|
.then(({ code, data }) => { |
|
|
|
if (code != 200) { |
|
|
|