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