refactor(map): 7月28日需求修改
parent
4ce4e42c1d
commit
854fbeff50
|
|
@ -1,13 +1,13 @@
|
|||
import {Connect} from "@cqsjjb/jjb-dva-runtime";
|
||||
import {useEffect, useState} from "react";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { useEffect, useState } from "react";
|
||||
import AliPlayer from "zy-react-library/components/Video/AliPlayer";
|
||||
import {NS_BI_MARK_INFO} from "~/enumerate/namespace";
|
||||
import { NS_BI_MARK_INFO } from "~/enumerate/namespace";
|
||||
|
||||
const VideoPlay = (props) => {
|
||||
const [playUrl, setPlayUrl] = useState("");
|
||||
|
||||
const getData = async () => {
|
||||
const {data, success} = await props.getFixedCameraPlayUrl({indexCode: props.cameraNumber});
|
||||
const { data, success } = await props.getFixedCameraPlayUrl({ indexCode: props.cameraNumber });
|
||||
if (success && data)
|
||||
setPlayUrl(data.url);
|
||||
};
|
||||
|
|
@ -20,11 +20,11 @@ const VideoPlay = (props) => {
|
|||
<div>
|
||||
{playUrl
|
||||
? (
|
||||
<AliPlayer source={playUrl} height="500px" isLive/>
|
||||
)
|
||||
<AliPlayer source={playUrl} height="500px" isLive />
|
||||
)
|
||||
: (
|
||||
<div style={{color: "#fff", textAlign: "center"}}>暂无视频</div>
|
||||
)}
|
||||
<div style={{ color: "#fff", textAlign: "center" }}>暂无视频</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue