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 = () => {
export const defaultApp = () => {
// eslint-disable-next-line no-undef
const config = createStoreage.get('globalConfig');
if (config && config.token) {
// const basePath =config.homepage !== '' && FILTER_FOLER_REG.test(config.homepage) ?'civweb4' :'civweb4';
......@@ -220,8 +221,13 @@ export const defaultApp = () => {
// setDefaultMountApp(`/${pkg.name.toLocaleLowerCase()}/${basePath}${homepage}`);
// 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);
}
};
......
......@@ -62,7 +62,7 @@ const Login = forwardRef((props, _ref) => {
action && action.events.on('loginSuccess', event => {
setSubmitting(false);
props.updateCurrentIndex && props.updateCurrentIndex(0);
props.history.push(`/?client=${props.global.client}`);
props.history.push(`/`);
// debugger
// window.share.event.emit('triggerMicro', props.global);
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