diff --git a/code/VideoAccess-VCMP/web/client/index.ejs b/code/VideoAccess-VCMP/web/client/index.ejs index ee1e2d7..d70db80 100644 --- a/code/VideoAccess-VCMP/web/client/index.ejs +++ b/code/VideoAccess-VCMP/web/client/index.ejs @@ -4,6 +4,7 @@
+ diff --git a/code/VideoAccess-VCMP/web/client/index.html b/code/VideoAccess-VCMP/web/client/index.html index 2114530..e181401 100644 --- a/code/VideoAccess-VCMP/web/client/index.html +++ b/code/VideoAccess-VCMP/web/client/index.html @@ -4,6 +4,7 @@ + diff --git a/code/VideoAccess-VCMP/web/client/src/sections/monitor/containers/videoPlayCross.jsx b/code/VideoAccess-VCMP/web/client/src/sections/monitor/containers/videoPlayCross.jsx index 5adbff0..8b65616 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/monitor/containers/videoPlayCross.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/monitor/containers/videoPlayCross.jsx @@ -1,5 +1,6 @@ import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; +import qs from "qs"; import { VideoPlay } from '$components' import '../style.less' @@ -7,6 +8,15 @@ const VideoPlayCross = (props) => { const [videoParams, setVideoParams] = useState(null) useEffect(() => { + if (props.location.search) { + const params = qs.parse(props.location.search.slice(1)) + if (params.videoObj) { + params.videoObj = (new Function("return " + params.videoObj))() + setVideoParams(params) + return + } + } + function messageListen (e) { // 此处需做 域名 验证 const { data } = e @@ -16,7 +26,6 @@ const VideoPlayCross = (props) => { } } } - if (window.parent) { window.addEventListener('message', messageListen); }