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

fix: 修改引导页

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