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

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

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