Commit d592f91c authored by 周宏民's avatar 周宏民

fix: 修改引导页

parent 8077ea6e
Pipeline #89599 passed with stages
......@@ -50,8 +50,7 @@ const IframeContainer = props => {
};
}, [linkUrl, onError, onMessage, onMessageBack]);
return (
// style={{ left: loading ? '-100%' : '' }}
<div className={styles['tab-iframe']}>
<div className={styles['tab-iframe']} style={{ left: loading ? '-100%' : '0' }}>
{linkUrl ? (
<Iframe
url={linkUrl}
......
......@@ -4,6 +4,7 @@
position: relative;
overflow: hidden;
z-index: 100;
transition: all 0.2s;
iframe {
border: none;
......
......@@ -119,15 +119,16 @@ const Demonstration = props => {
jumpProgressEnd();
};
const onMessageBack = info => {
if (info?.type === 'runAfterFirstMounted' || info?.type === 'loginSuccess') {
const { data } = info || {};
if (data?.type === 'runAfterFirstMounted' || data?.type === 'loginSuccess') {
jumpProgressEnd();
setTimeout(() => {
setJumpLoading(true);
setJumpLoading(false);
}, 200);
} else if (info?.type === 'loginError') {
} else if (data?.type === 'loginError') {
message.warning('登录失败,请联系管理人员');
handError();
} else if (info?.type === '无法连接') {
} else if (data?.type === '无法连接') {
message.warning('该站点无法连接,请联系管理人员');
handError();
}
......@@ -388,7 +389,7 @@ const Demonstration = props => {
</div>
</>
);
}, [linkUrl]);
}, [linkUrl, jumpLoading]);
useEffect(() => {
if (loading && !timer.current) {
......@@ -431,7 +432,7 @@ const Demonstration = props => {
window.share.event.removeListener('loginError', handError);
window.share.event.removeListener('onendLoading', onendLoading);
};
}, [jumpLoading]);
}, []);
useEffect(() => {
getData();
......
......@@ -6,6 +6,7 @@ import { dynamic } from '@wisdom-utils/runtime';
import BasicLayout from '../layouts/BasicLayout';
import HomePage from '../layouts/TransitionPage';
import BootPage from '../pages/bootpage';
import Demonstration from '../pages/demonstration'; // 引导页
import UsingAnalysis from '../pages/cloud/analysis/using';
import NewProducts from '../pages/cloud/introduction/newproducts';
import CommonMenu from '../pages/commonMenu';
......@@ -53,8 +54,16 @@ export const dyRoutes = (routes, layout, theme) => {
},
{
path: '/industry',
component: BootPage,
component: Demonstration,
},
// {
// path: '/demonstration',
// component: Demonstration,
// },
// {
// path: '/industry',
// component: BootPage,
// },
{
path: '/cloud/analysis/using',
component: UsingAnalysis,
......
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