|
|
|
@ -14,7 +14,8 @@ import {
|
|
|
|
updateCurrentAppData,
|
|
|
|
updateCurrentAppData,
|
|
|
|
updateInfo,
|
|
|
|
updateInfo,
|
|
|
|
updateProjectComponentData,
|
|
|
|
updateProjectComponentData,
|
|
|
|
updateEventList
|
|
|
|
updateEventList,
|
|
|
|
|
|
|
|
updateGlobalVarList
|
|
|
|
} from '@/store/ideContainer';
|
|
|
|
} from '@/store/ideContainer';
|
|
|
|
import { getAppListBySceneId } from '@/api/apps';
|
|
|
|
import { getAppListBySceneId } from '@/api/apps';
|
|
|
|
import { getProjectComp } from '@/api/scene';
|
|
|
|
import { getProjectComp } from '@/api/scene';
|
|
|
|
@ -32,6 +33,7 @@ import ComponentTest from '@/pages/componentDevelopment/componentTest';
|
|
|
|
import { getUserToken } from '@/api/user';
|
|
|
|
import { getUserToken } from '@/api/user';
|
|
|
|
import { Message } from '@arco-design/web-react';
|
|
|
|
import { Message } from '@arco-design/web-react';
|
|
|
|
import { queryEventItemBySceneId, queryEventItemBySceneIdOld } from '@/api/event';
|
|
|
|
import { queryEventItemBySceneId, queryEventItemBySceneIdOld } from '@/api/event';
|
|
|
|
|
|
|
|
import { getGlobalList } from '@/api/global';
|
|
|
|
|
|
|
|
|
|
|
|
type UrlParamsOptions = {
|
|
|
|
type UrlParamsOptions = {
|
|
|
|
identity?: string;
|
|
|
|
identity?: string;
|
|
|
|
@ -225,6 +227,11 @@ function IDEContainer() {
|
|
|
|
if (res1.code === 200) dispatch(updateEventListOld(res1.data));
|
|
|
|
if (res1.code === 200) dispatch(updateEventListOld(res1.data));
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getGlobalVar = async () => {
|
|
|
|
|
|
|
|
const res: any = await getGlobalList(urlParams.id);
|
|
|
|
|
|
|
|
if (res.code === 200) dispatch(updateGlobalVarList(res.data));
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
setUrlParams(getUrlParams(window.location.href) as UrlParamsOptions);
|
|
|
|
setUrlParams(getUrlParams(window.location.href) as UrlParamsOptions);
|
|
|
|
dispatch(updateInfo(getUrlParams(window.location.href) as UrlParamsOptions));
|
|
|
|
dispatch(updateInfo(getUrlParams(window.location.href) as UrlParamsOptions));
|
|
|
|
@ -241,6 +248,7 @@ function IDEContainer() {
|
|
|
|
if (urlParams.identity && urlParams.identity === 'scene') {
|
|
|
|
if (urlParams.identity && urlParams.identity === 'scene') {
|
|
|
|
connectWS();
|
|
|
|
connectWS();
|
|
|
|
getEvent();
|
|
|
|
getEvent();
|
|
|
|
|
|
|
|
getGlobalVar();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, [urlParams.identity]);
|
|
|
|
}, [urlParams.identity]);
|
|
|
|
|
|
|
|
|
|
|
|
|