Commit c2b6fcd1 by ethanlamzs

设置默认的首页

1 parent dbad4e47
...@@ -4,6 +4,7 @@ const menuData = [{ ...@@ -4,6 +4,7 @@ const menuData = [{
name: 'dashboard', name: 'dashboard',
icon: 'dashboard', icon: 'dashboard',
path: 'dashboard', path: 'dashboard',
hideInMenu: true,
children: [{ children: [{
name: '分析页', name: '分析页',
path: 'analysis', path: 'analysis',
...@@ -13,7 +14,7 @@ const menuData = [{ ...@@ -13,7 +14,7 @@ const menuData = [{
}, { }, {
name: '工作台', name: '工作台',
path: 'workplace', path: 'workplace',
// hideInMenu: true, hideInMenu: true,
}], }],
}, { }, {
name: '表单页', name: '表单页',
...@@ -35,6 +36,7 @@ const menuData = [{ ...@@ -35,6 +36,7 @@ const menuData = [{
name: '列表页', name: '列表页',
icon: 'table', icon: 'table',
path: 'list', path: 'list',
hideInMenu: true,
children: [{ children: [{
name: '查询表格', name: '查询表格',
path: 'table-list', path: 'table-list',
......
...@@ -102,7 +102,7 @@ class BasicLayout extends React.PureComponent { ...@@ -102,7 +102,7 @@ class BasicLayout extends React.PureComponent {
// According to the url parameter to redirect // According to the url parameter to redirect
// 这里是重定向的,重定向到 url 的 redirect 参数所示地址 // 这里是重定向的,重定向到 url 的 redirect 参数所示地址
const urlParams = new URL(window.location.href); const urlParams = new URL(window.location.href);
const redirect = urlParams.searchParams.get('redirect') || '/dashboard/analysis'; const redirect = urlParams.searchParams.get('redirect') || '/devutil/schoollist';
// Remove the parameters in the url // Remove the parameters in the url
urlParams.searchParams.delete('redirect'); urlParams.searchParams.delete('redirect');
window.history.pushState(null, 'redirect', urlParams.href); window.history.pushState(null, 'redirect', urlParams.href);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!