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

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

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