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

fix: 修复首页路由匹配

parent 7278f663
Pipeline #42236 passed with stages
in 1 minute 50 seconds
......@@ -3,10 +3,10 @@ import { message } from 'antd';
import _, { words } from 'lodash';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { loadMicroApp } from 'qiankun';
import { useIntl } from '@/locales/localeExports';
import Icon from '@ant-design/icons';
import { setDefaultMountApp } from 'qiankun'
import { actionCreators } from '../../containers/App/store';
import HeaderSearch from '../HeaderSearch';
import Avatar from './AvatarDropdown';
......@@ -126,6 +126,9 @@ const GlobalHeaderRight = props => {
? props.global.get('homepage')
: props.global.get('homepage.url');
window.share.event.emit('goHome', `/${url}`);
// setDefaultMountApp()
// 1、window.globalConfig product
// 2. 拿到当前product
url ? (
window.share.event.emit('listenerMointer', {
label: '首页',
......
......@@ -352,13 +352,19 @@ const BasicLayout = props => {
// setChildrenRoutes(currentChildrenRoute)
window.share.event.on('goHome', url => {
setChildrenRoutes([
{
icon: <HomeIcon/>,
path: url,
name: '首页'
}
])
]);
setTabActiveKey(url);
window.history.pushState(null, '', `/civbase${url}`);
});
/**
* web4全屏退出,切换三级菜单高亮
......@@ -435,6 +441,7 @@ const BasicLayout = props => {
}
const handleSelectMenuItem = (item) => {
debugger
setTabActiveKey(item);
if(item.indexOf('web_console') === -1) {
window.history.pushState(null, '', `/civbase${item}`);
......
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