From e39d0454a029242f67fb4eee32eaea081a38c7e1 Mon Sep 17 00:00:00 2001 From: yulixing Date: Fri, 11 Oct 2019 14:41:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=AF=E7=94=B1=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/ad.js | 1 + src/router/index.js | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/router/ad.js b/src/router/ad.js index 38a890f..9b4b42a 100644 --- a/src/router/ad.js +++ b/src/router/ad.js @@ -22,6 +22,7 @@ const adRouter = { path: 'edit', component: () => import('@/views/ad/edit'), // Parent router-view name: 'adEdit', + hidden: true, meta: { title: '广告编辑', }, diff --git a/src/router/index.js b/src/router/index.js index 85f8236..07ed88e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -42,7 +42,7 @@ import errRouter from './error' export const constantRoutes = [ { path: '/', - redirect: '/admin/ad-list' + redirect: '/admin/ad-list', }, { path: '/login', @@ -62,6 +62,9 @@ export const constantRoutes = [ // adminRouter, errRouter, userRouter, + adminRouter, + // 404 page must be placed at the end !!! + {path: '*', redirect: '/404', hidden: true}, ] /** @@ -69,9 +72,9 @@ export const constantRoutes = [ * the routes that need to be dynamically loaded based on user roles */ export const asyncRoutes = [ - adminRouter, - // 404 page must be placed at the end !!! - {path: '*', redirect: '/404', hidden: true}, + // adminRouter, + // // 404 page must be placed at the end !!! + // {path: '*', redirect: '/404', hidden: true}, ] const createRouter = () =>