Commit a9c3df42 authored by 邓晓峰's avatar 邓晓峰

fix: 修复首页加载

parent 85480033
Pipeline #42465 passed with stages
in 3 minutes 56 seconds
/* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
const proxyURL = 'http://192.168.10.156:8666';
const proxyURL = 'https://panda-water.com';
module.exports = {
assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './',
......
......@@ -35,8 +35,9 @@ class SecurityLayout extends React.Component {
let client = global.client || Cookies.get('city');
client = client !== 'undefined' || !_.isNull(client) || !_.isUndefined(client) ? client: 'city';
// event.emit(?'event:initConfig');
return (
<Redirect to={`/user/login?client=${client}`} />
<Redirect to={`/user/login?client=${client}`} render={() => window.location.reload()}/>
);
}
......
......@@ -126,7 +126,8 @@ export const initMicroApps = () => {
global: globalStore.global
});
const globalConfig = window.globalConfig;
globalConfig.homepage = globalConfig.homepage && /civweb4/.test(globalConfig.homepage) ? config.homepage.replace(/civweb4\//, ''): globalConfig.homepage
globalConfig.homepage = globalConfig.homepage && /civweb4/.test(globalConfig.homepage) ? config.homepage.replace(/civweb4\//, ''): globalConfig.homepage;
console.log(globalConfig);
setGlobalState({
// eslint-disable-next-line no-undef
globalConfig: globalConfig,
......@@ -229,7 +230,7 @@ export const defaultApp = () => {
// let homepage = config.homepage.replace('civweb4/', '');
const url = !config.home ? `/civbase/civweb4/${config.homepage.replace(/^\//, '')}`: `/civbase/${config.homepage.replace(/^\//, '')}`;
setDefaultMountApp(url);
if(config.homepage.indexOf('civweb4') > -1) createStoreage.set('init_web4', true);
// if(config.homepage.indexOf('civweb4') > -1) createStoreage.set('init_web4', true);
}
};
......
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