Commit 6db8af2d authored by 邓晓峰's avatar 邓晓峰

fix: 处理当没有配置首页的时候, 优化url匹配规则

parent 00b4b569
Pipeline #46822 skipped with stages
......@@ -211,13 +211,14 @@ export const defaultApp = () => {
// createStoreage.set('init_web4', true)
// }
// let homepage = config.homepage.replace('civweb4/', '');
let url = !config.home ? `/civbase/civweb4/${config.homepage.replace(/^\//, '').replace(/^civweb4\//, '')}` : `/civbase/${config.homepage.replace(/^\//, '')}`;
let url = !config.home ? (config.homepage === '' ? `/civbase/civweb4`: `/civbase/civweb4/${config.homepage.replace(/^\//, '').replace(/^civweb4\//, '')}`) : `/civbase/${config.homepage.replace(/^\//, '')}`;
/**
* issue 处理监听路由规则
*/
if(url === '/civbase/civweb4/') {
url = url.replace(/civweb4\//, 'civweb4');
}
// if(url === '/civbase/civweb4/') {
// url = url.replace(/civweb4\//, 'civweb4');
// }
setDefaultMountApp(url);
// 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