Browse Source

fix: 调整路由鉴权触发时机,由父路由进行鉴权

lanjianrong 3 years ago
parent
commit
1f8a48ce56
2 changed files with 3 additions and 6 deletions
  1. 2 2
      .stylelintignore
  2. 1 4
      config/routes.ts

+ 2 - 2
.stylelintignore

@@ -1,4 +1,4 @@
 src/pages/Schema/Base/components/Designable
 dist
-src/.umi
-src/.umi-production
+.umi
+.umi-production

+ 1 - 4
config/routes.ts

@@ -46,13 +46,11 @@ const routes: MenuDataItem[] = [
           {
             path: '/project/management/list',
             name: 'management-list',
-            access: 'authRouteFilter',
             component: './Project/Management/List'
           },
           {
             path: '/project/management/:id',
             name: 'management-detail',
-            access: 'authRouteFilter',
             component: './Project/Management/Detail'
           }
         ]
@@ -84,6 +82,7 @@ const routes: MenuDataItem[] = [
         path: 'company',
         name: 'company',
         hideChildrenInMenu: true,
+        access: 'authRouteFilter',
         routes: [
           {
             path: '/institutions/company',
@@ -92,13 +91,11 @@ const routes: MenuDataItem[] = [
           {
             path: 'list',
             name: 'company-list',
-            access: 'authRouteFilter',
             component: './Institutions/Company/List'
           },
           {
             path: ':id',
             name: 'company-detail',
-            access: 'authRouteFilter',
             component: './Institutions/Company/Detail'
           }
         ]