Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ethan
/
ant-admin-pro
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit c2b6fcd1
authored
2018-01-29 17:48:39 +0800
by
ethanlamzs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
设置默认的首页
1 parent
dbad4e47
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
src/common/menu.js
src/layouts/BasicLayout.js
src/common/menu.js
View file @
c2b6fcd
...
...
@@ -4,6 +4,7 @@ const menuData = [{
name
:
'dashboard'
,
icon
:
'dashboard'
,
path
:
'dashboard'
,
hideInMenu
:
true
,
children
:
[{
name
:
'分析页'
,
path
:
'analysis'
,
...
...
@@ -13,7 +14,7 @@ const menuData = [{
},
{
name
:
'工作台'
,
path
:
'workplace'
,
//
hideInMenu: true,
hideInMenu
:
true
,
}],
},
{
name
:
'表单页'
,
...
...
@@ -35,6 +36,7 @@ const menuData = [{
name
:
'列表页'
,
icon
:
'table'
,
path
:
'list'
,
hideInMenu
:
true
,
children
:
[{
name
:
'查询表格'
,
path
:
'table-list'
,
...
...
src/layouts/BasicLayout.js
View file @
c2b6fcd
...
...
@@ -102,7 +102,7 @@ class BasicLayout extends React.PureComponent {
// According to the url parameter to redirect
// 这里是重定向的,重定向到 url 的 redirect 参数所示地址
const
urlParams
=
new
URL
(
window
.
location
.
href
);
const
redirect
=
urlParams
.
searchParams
.
get
(
'redirect'
)
||
'/d
ashboard/analysis
'
;
const
redirect
=
urlParams
.
searchParams
.
get
(
'redirect'
)
||
'/d
evutil/schoollist
'
;
// Remove the parameters in the url
urlParams
.
searchParams
.
delete
(
'redirect'
);
window
.
history
.
pushState
(
null
,
'redirect'
,
urlParams
.
href
);
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment