Commit 2f730748 authored by 崔佳豪's avatar 崔佳豪

fix: 初始首页错误问题

parent 485212a1
......@@ -299,10 +299,16 @@ const BasicLayout = props => {
currentChildrenRoute && currentChildrenRoute.routes ? setChildrenRoutes(currentChildrenRoute.routes): setChildrenRoutes([currentChildrenRoute]);
} else {
let url = _.isString(props.global.get('homepage'))
? props.global.get('homepage')
: props.global.get('homepage.url');
if(!props.global.get('home')) {
url = `civweb4/${url.replace(/^\//, '').replace(/^civweb4\//, '')}`
}
setChildrenRoutes([
{
icon: <HomeIcon/>,
path: props.location && props.location.pathname,
path: `/${url}`,
name: '首页'
}
])
......
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