Commit 43f2a4ee authored by 周宏民's avatar 周宏民

fix: 修改刷新时无法直接到集成登录页的问题

parent 27dcc564
Pipeline #96435 passed with stages
......@@ -492,7 +492,7 @@ const Layout = props => {
// localStorage.removeItem('integrationData');
}
// window.qiankunIsCache = false;
history.push('/Industry');
history.push('/industry');
}
// 非云平台不做响应
if (!props.global.get('userInfo.site')) {
......@@ -512,7 +512,7 @@ const Layout = props => {
const Industries = props.global.get('userInfo.Industries');
if (Industries && Industries.length > 1) {
window.qiankunIsCache = false;
history.push('/Industry');
history.push('/industry');
}
};
// useEffect(async () => {
......
......@@ -392,7 +392,7 @@ export const defaultApp = (setUrl) => {
const config = window.globalConfig;
if (config && config.token) {
let url = !config.home ?
((config.homepage === '' || _.isNull(config.homepage)) ? `/civbase/civweb4`: (`/civbase/${config.homepage.replace(/^\//, '')}`)) : `/civbase/${config.homepage.replace(/^\//, '')}`;
((!config.homepage || _.isNull(config.homepage)) ? `/civbase/civweb4`: (`/civbase/${config.homepage.replace(/^\//, '')}`)) : `/civbase/${config.homepage.replace(/^\//, '')}`;
if(/civweb4/.test(setUrl || url)) {
window.qiankunIsCache = false;
console.log("请升级首页功能");
......
......@@ -227,6 +227,10 @@ const IntegrationNew = props => {
jumpProgressStart();
startTiming(loadingTime);
window.jumpLoadingProgress = 99;
// if (loginA.globalConfig?.size === 0 && window.globalConfig) {
// loginA.updateConfig(window.globalConfig);
// }
loginA && loginA.getUserInfoAndConfig('', true, item.type);
};
const onLink = (item, loginA) => {
......@@ -381,6 +385,7 @@ const IntegrationNew = props => {
const handleError = () => {
setJumpLoading(false);
jumpProgressEnd();
window.jumpLoadingProgress = 0;
};
loginAction.events.on('toggleIndustry', handleToggleIndustry);
loginAction.events.on('loginError', handleError);
......
......@@ -9,6 +9,8 @@ import { appService, noticeService } from '@/api';
import { getUserInfo, getWebSiteConfig } from '@/api/service/base';
import { SERVICE_APP_LOGIN_MODE, SERVICE_INTERFACE_SUCCESS_CODE, WX_REDIRECT_URI } from '@/constants';
import store from '@/stores';
import { defaultApp } from '@/micro';
import {
DEFAULT_MQTT_PATH,
DEFAULT_TCP_IP,
......@@ -308,7 +310,7 @@ class Login {
self.globalConfig.userInfo = window?.globalConfig?.transformUserInfo?.(response.data) ?? {};
self.updateConfig && self.updateConfig(self.globalConfig);
let flag = true;
let flag = false;
const loginMode = Cookies.get('loginMode');
if (loginMode === 'qywx') {
flag = false;
......@@ -393,7 +395,9 @@ class Login {
if (this.globalConfig.isIntegration >= 1 && this.integratedNum >= 2) {
this.createContext(this);
this.updateConfig && this.updateConfig(this.globalConfig);
this.events && this.events.emit('loginIndustry');
// this.events && this.events.emit('loginIndustry');
// 修改刷新时,this.events.emit('loginIndustry') 无法跳转到过渡页
defaultApp(`/civbase/industry`);
return false;
}
}
......
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