Commit a4a846fa authored by 李纪文's avatar 李纪文

feat: 视频控制增加手持

parent 5ec2a2ec
......@@ -3,7 +3,7 @@ import { request } from '@wisdom-utils/utils';
const REQUEST_METHOD_GET = 'get';
const REQUEST_METHOD_POST = 'post';
// eslint-disable-next-line no-undef
const navigatorAgent = /(iPhone|iOS|Android|Windows Phone)/i.test(navigator.userAgent);
const navigatorAgent = /(iPhone|iOS|Android|Windows Phone)/i.test(navigator?.userAgent);
const baseURI = typeof DUMI_TYPE !== 'undefined' && DUMI_TYPE === 'dumi' ? '/api' : '';
const CommonPath = navigatorAgent ? '/PandaCore/GateWay' : '';
......
......@@ -27,10 +27,12 @@ const CloudPlate = (props) => {
// 触发控制接口
const handleControl = async (num) => {
var formData = new FormData();
const navigatorAgent = /(iPhone|iOS|Android|Windows Phone)/i.test(navigator?.userAgent);
const userInfo = localStorage.getItem("userInfo") ? JSON.parse(localStorage.getItem("userInfo")) : {};
const data = {
id: videoInfo.id,
direction: num,
'site-code': window?.globalConfig?.userInfo?.LocalSite || '',
'site-code': !navigatorAgent ? window?.globalConfig?.userInfo?.LocalSite || '' : userInfo?.LocalSite || '',
};
for (const key in data) {
formData.append(key, data[key]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment