浏览代码

重定向问题

lifanagju_citu 10 月之前
父节点
当前提交
213d461b82
共有 1 个文件被更改,包括 13 次插入19 次删除
  1. 13 19
      src/router/modules/remaining.js

+ 13 - 19
src/router/modules/remaining.js

@@ -45,16 +45,23 @@ const remainingRouter = [
   },
   {
     path: '',
-    component: Layout,
-    redirect: '/home',
+    redirect: '/entrances',
     children: [
+      { path: '/', redirect: '/entrances' },
       {
-        path: '/personal',
-        redirect: '/home',
+        path: '/entrances',
+        component: () => import('@/views/entrances/index'),
         meta: {
-          title: '首页'
+          title: '门墩儿应用中心'
         }
-      },
+      }
+    ]
+  },
+  {
+    path: '/home',
+    component: Layout,
+    children: [
+      { path: '/personal', redirect: '/home' }, 
       {
         path: '/home',
         component: () => import('@/views/Home/index'),
@@ -66,7 +73,6 @@ const remainingRouter = [
   },
   {
     path: '/mall',
-    // component: Layout,
     children: [
       {
         path: '/mall',
@@ -77,18 +83,6 @@ const remainingRouter = [
       }
     ]
   },
-  {
-    path: '/entrances',
-    children: [
-      {
-        path: '/entrances',
-        component: () => import('@/views/entrances/index'),
-        meta: {
-          title: '门墩儿应用中心'
-        }
-      }
-    ]
-  },
 ]
 
 setLoginType(remainingRouter, 'noLogin')