Commit 1bda202a authored by 周宏民's avatar 周宏民

fix: 修改 弥勒集成登录 切换client 中间 loading会重置的bug

parent 477baa3d
Pipeline #92684 passed with stages
...@@ -62,8 +62,9 @@ const IntegrationMile = props => { ...@@ -62,8 +62,9 @@ const IntegrationMile = props => {
const [integrationData, setIntegrationData] = useState({}); const [integrationData, setIntegrationData] = useState({});
const [linkUrl, setLinkUrl] = useState(''); const [linkUrl, setLinkUrl] = useState('');
const [jumpLoading, setJumpLoading] = useState(false); // 解决 切换 client 时,updateConfig时,页会刷新,loading会重置
const [progressValue2, setProgressValue2] = useState(0); const [jumpLoading, setJumpLoading] = useState(!!window.jumpLoadingProgress);
const [progressValue2, setProgressValue2] = useState(window.jumpLoadingProgress || 0);
const [showBackBtn, setShowBackBtn] = useState(true); // 是否显示iframe 返回按钮,三维平台用 const [showBackBtn, setShowBackBtn] = useState(true); // 是否显示iframe 返回按钮,三维平台用
const configName = '弥勒集成配置文件'; const configName = '弥勒集成配置文件';
...@@ -305,6 +306,7 @@ const IntegrationMile = props => { ...@@ -305,6 +306,7 @@ const IntegrationMile = props => {
setJumpLoading(true); setJumpLoading(true);
jumpProgressStart(); jumpProgressStart();
startTiming(15); startTiming(15);
window.jumpLoadingProgress = 99;
getWebSiteConfig({ getWebSiteConfig({
identity: token, identity: token,
client, client,
...@@ -335,6 +337,7 @@ const IntegrationMile = props => { ...@@ -335,6 +337,7 @@ const IntegrationMile = props => {
}); });
setJumpLoading(false); setJumpLoading(false);
jumpProgressEnd(); jumpProgressEnd();
window.jumpLoadingProgress = 0;
return; return;
} }
loginAction.updateConfig && loginAction.updateConfig(config); loginAction.updateConfig && loginAction.updateConfig(config);
...@@ -343,6 +346,7 @@ const IntegrationMile = props => { ...@@ -343,6 +346,7 @@ const IntegrationMile = props => {
.catch(err => { .catch(err => {
setJumpLoading(false); setJumpLoading(false);
jumpProgressEnd(); jumpProgressEnd();
window.jumpLoadingProgress = 0;
}); });
} }
} }
...@@ -388,6 +392,7 @@ const IntegrationMile = props => { ...@@ -388,6 +392,7 @@ const IntegrationMile = props => {
const handleToggleIndustry = event => { const handleToggleIndustry = event => {
setJumpLoading(false); setJumpLoading(false);
jumpProgressEnd(); jumpProgressEnd();
window.jumpLoadingProgress = 0;
props.updateCurrentIndex && props.updateCurrentIndex(0); props.updateCurrentIndex && props.updateCurrentIndex(0);
props.history.push(`/?client=${mClient || props.global.client}`); props.history.push(`/?client=${mClient || props.global.client}`);
......
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