Browse Source

前端加前缀

zhaojijng 2 years ago
parent
commit
ea356a6062
2 changed files with 6 additions and 6 deletions
  1. 5 5
      config/routes.ts
  2. 1 1
      src/components/navMenu/index.tsx

+ 5 - 5
config/routes.ts

@@ -19,7 +19,7 @@
     ],
   },
   {
-    path: '/',
+    path: '/sgadmin',
     component: '../layouts',
     routes: [
       //   {
@@ -27,22 +27,22 @@
       //     redirect: '/environment',
       //   },
       {
-        path: '/environment',
+        path: '/sgadmin/environment',
         name: 'environment',
         component: './Environment',
       },
       {
-        path: '/equipment',
+        path: '/sgadmin/equipment',
         name: 'equipment',
         component: './Equipment',
       },
       {
-        path: '/runtime',
+        path: '/sgadmin/runtime',
         name: 'runtime',
         component: './Runtime',
       },
       {
-        path: '/runtime/recordList',
+        path: '/sgadmin/runtime/recordList',
         name: 'recordList',
         component: './Runtime/RecordList',
       },

+ 1 - 1
src/components/navMenu/index.tsx

@@ -11,7 +11,7 @@ const NavMenu: React.FC = () => {
   //debugger;
   const menuClick = (item: menutype) => {
     closeMenu();
-    history.push(`/${item.id}`);
+    history.push(`/sgadmin/${item.id}`);
   };
   //   console.log('navMenu');