Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pro-blocks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
pro-blocks
Commits
7815eecd
Commit
7815eecd
authored
Nov 13, 2017
by
afc163
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
404 page for /xxx/whatever
parent
c0c65a0f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
src/layouts/BasicLayout.js
src/layouts/BasicLayout.js
+4
-2
src/router.js
src/router.js
+1
-2
No files found.
src/layouts/BasicLayout.js
View file @
7815eecd
...
...
@@ -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
=
{[{
...
...
src/router.js
View file @
7815eecd
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
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment