Commit 7815eecd authored by afc163's avatar afc163

404 page for /xxx/whatever

parent c0c65a0f
......@@ -8,12 +8,13 @@ import moment from 'moment';
import groupBy from 'lodash/groupBy';
import { ContainerQuery } from 'react-container-query';
import classNames from 'classnames';
import styles from './BasicLayout.less';
import HeaderSearch from '../components/HeaderSearch';
import NoticeIcon from '../components/NoticeIcon';
import GlobalFooter from '../components/GlobalFooter';
import { getNavData } from '../common/nav';
import { getRouteData } from '../utils/utils';
import NotFound from '../routes/Exception/404';
import styles from './BasicLayout.less';
const { Header, Sider, Content } = Layout;
const { SubMenu } = Menu;
......@@ -356,7 +357,8 @@ class BasicLayout extends React.PureComponent {
)
)
}
<Redirect to="/dashboard/analysis" />
<Redirect exact from="/" to="/dashboard/analysis" />
<Route component={NotFound} />
</Switch>
<GlobalFooter
links={[{
......
import React from 'react';
import { Router, Route, Switch, Redirect } from 'dva/router';
import { Router, Route, Switch } from 'dva/router';
import { LocaleProvider } from 'antd';
import zhCN from 'antd/lib/locale-provider/zh_CN';
import BasicLayout from './layouts/BasicLayout';
......@@ -12,7 +12,6 @@ function RouterConfig({ history }) {
<Switch>
<Route path="/user" component={UserLayout} />
<Route path="/" component={BasicLayout} />
<Redirect to="/" />
</Switch>
</Router>
</LocaleProvider>
......
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