diff --git a/src/router/index.js b/src/router/index.js index 6378d4b..fae932d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -57,39 +57,53 @@ export const asyncRoutes = [ children: [ { path: 'topic', - name: 'RatingTopicIndex', - component: () => import('@/views/rating/topic/index'), - meta: { title: '评分话题' }, - }, - { - path: 'topic-recommend', - name: 'RatingTopicRecommendIndex', - component: () => import('@/views/rating/topicRecommend/index'), - meta: { title: '话题推荐' }, - }, - { - path: 'topic-item', - name: 'RatingTopicItemIndex', - component: () => import('@/views/rating/topicItem/index'), - meta: { title: '评分项' }, - }, - { - path: 'topic-record', - name: 'RatingTopicRecordIndex', - component: () => import('@/views/rating/topicScoreRecord/index'), - meta: { title: '用户评分记录' }, - }, - { - path: 'topic-comment', - name: 'RatingTopicCommentIndex', - component: () => import('@/views/rating/topicCommentRecord/index'), - meta: { title: '用户评论记录' }, - }, - { - path: 'topic-category', - name: 'RatingTopicCategoryIndex', - component: () => import('@/views/rating/topicCategory/index'), - meta: { title: '评分话题分类' }, + component: EmptyLayout, + alwaysShow: true, + redirect: 'noRedirect', + name: 'TopicIndex', + meta: { + title: '评分话题', + icon: 'clover', + permissions: ['admin'], + }, + children: [ + { + path: 'recommend', + name: 'RatingTopicRecommendIndex', + component: () => import('@/views/rating/topicRecommend/index'), + meta: { title: '话题推荐' }, + }, + { + path: 'category', + name: 'RatingTopicCategoryIndex', + component: () => import('@/views/rating/topicCategory/index'), + meta: { title: '评分话题分类' }, + }, + { + path: 'list', + name: 'RatingTopicIndex', + component: () => import('@/views/rating/topic/index'), + meta: { title: '评分话题' }, + }, + { + path: 'item', + name: 'RatingTopicItemIndex', + component: () => import('@/views/rating/topicItem/index'), + meta: { title: '评分项' }, + }, + { + path: 'record', + name: 'RatingTopicRecordIndex', + component: () => import('@/views/rating/topicScoreRecord/index'), + meta: { title: '用户评分记录' }, + }, + { + path: 'comment', + name: 'RatingTopicCommentIndex', + component: () => import('@/views/rating/topicCommentRecord/index'), + meta: { title: '用户评论记录' }, + }, + ], }, { path: 'pk',