refactor(map): 7月28日需求修改

master
LiuJiaNan 2026-07-28 16:34:13 +08:00
parent 4ce4e42c1d
commit 854fbeff50
1 changed files with 8 additions and 8 deletions

View File

@ -1,13 +1,13 @@
import {Connect} from "@cqsjjb/jjb-dva-runtime"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import {useEffect, useState} from "react"; import { useEffect, useState } from "react";
import AliPlayer from "zy-react-library/components/Video/AliPlayer"; 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 VideoPlay = (props) => {
const [playUrl, setPlayUrl] = useState(""); const [playUrl, setPlayUrl] = useState("");
const getData = async () => { const getData = async () => {
const {data, success} = await props.getFixedCameraPlayUrl({indexCode: props.cameraNumber}); const { data, success } = await props.getFixedCameraPlayUrl({ indexCode: props.cameraNumber });
if (success && data) if (success && data)
setPlayUrl(data.url); setPlayUrl(data.url);
}; };
@ -20,10 +20,10 @@ const VideoPlay = (props) => {
<div> <div>
{playUrl {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> </div>
); );