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

fix: 修复路由加载

parent 6265a570
Pipeline #42269 passed with stages
in 1 minute 51 seconds
...@@ -209,6 +209,7 @@ export const initMicroApps = () => { ...@@ -209,6 +209,7 @@ export const initMicroApps = () => {
export const defaultApp = () => { export const defaultApp = () => {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
const config = createStoreage.get('globalConfig'); const config = createStoreage.get('globalConfig');
if (config && config.token) { if (config && config.token) {
// const basePath =config.homepage !== '' && FILTER_FOLER_REG.test(config.homepage) ?'civweb4' :'civweb4'; // const basePath =config.homepage !== '' && FILTER_FOLER_REG.test(config.homepage) ?'civweb4' :'civweb4';
...@@ -220,8 +221,13 @@ export const defaultApp = () => { ...@@ -220,8 +221,13 @@ export const defaultApp = () => {
// setDefaultMountApp(`/${pkg.name.toLocaleLowerCase()}/${basePath}${homepage}`); // setDefaultMountApp(`/${pkg.name.toLocaleLowerCase()}/${basePath}${homepage}`);
// createStoreage.set('init_web4', true) // createStoreage.set('init_web4', true)
// } // }
setDefaultMountApp(`/civbase/${config.homepage.replace(/^\//, '')}`); if(/civweb4/.test(config.homepage)) {
setDefaultMountApp(`/civbase/${config.homepage.replace(/^\//, '')}`);
} else {
setDefaultMountApp(`/civbase/${config.home.path.replace(/^\//, '')}`);
}
//setDefaultMountApp(`/civbase/${config.homepage.replace(/^\//, '')}`);
if(config.homepage.indexOf('civweb4') > -1) createStoreage.set('init_web4', true); if(config.homepage.indexOf('civweb4') > -1) createStoreage.set('init_web4', true);
} }
}; };
......
...@@ -62,7 +62,7 @@ const Login = forwardRef((props, _ref) => { ...@@ -62,7 +62,7 @@ const Login = forwardRef((props, _ref) => {
action && action.events.on('loginSuccess', event => { action && action.events.on('loginSuccess', event => {
setSubmitting(false); setSubmitting(false);
props.updateCurrentIndex && props.updateCurrentIndex(0); props.updateCurrentIndex && props.updateCurrentIndex(0);
props.history.push(`/?client=${props.global.client}`); props.history.push(`/`);
// debugger // debugger
// window.share.event.emit('triggerMicro', props.global); // window.share.event.emit('triggerMicro', props.global);
initMicroApps(); initMicroApps();
......
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