diff --git a/src/router/index.js b/src/router/index.js index 2cf898887..2e7181bd1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -677,16 +677,22 @@ export const publicAsyncRoute = [ hidden: true }, { - path: '/contest/list', - component: ContestList, - hidden: true - }, - { - path: '/contest/detail', - component: ContestDetail, - hidden: true + path: '/contest', + component: Layout, + hidden: true, + children: [ + { + path: 'list', + component: ContestList, + hidden: true + }, + { + path: 'detail', + component: ContestDetail, + hidden: true + } + ] } - ]; // 城市轨道项目 export const asyncRouter = [ diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 5b771ceb4..da3a97803 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -40,7 +40,9 @@ function hasPermission(roles, route, parentsRoles) { */ function resetAsyncRouter() { let list = publicAsyncRoute; - list = [...list, ...asyncRouter]; + if (getSessionStorage('project') !== 'dsxl') { + list = [...list, ...asyncRouter]; + } return list; }