diff --git a/src/api/rating/topicCategory.js b/src/api/rating/topicCategory.js index ebfbefe..d341be8 100644 --- a/src/api/rating/topicCategory.js +++ b/src/api/rating/topicCategory.js @@ -12,3 +12,43 @@ export function getList(data) { params: data, }) } + +/** + * 切换话题分类状态 + * @param {*} id + * @param {*} enable + * @returns + */ +export function toggleEnable(id, enable) { + return request({ + url: `/management/api/rating/topic_category/toggle/${id}`, + method: 'patch', + data: { enable }, + }) +} + +/** + * 移动话题分类 + * @param {*} id + * @param {*} to + * @returns + */ +export function moveTo(id, to) { + return request({ + url: `/management/api/rating/topic_category/move_to/${id}`, + method: 'patch', + data: { to }, + }) +} +/** + * 编辑话题分类 + * @param {*} id + * @returns + */ +export function doEdit(id, data) { + return request({ + url: `/management/api/rating/topic_category/${id}`, + method: 'put', + data, + }) +} diff --git a/src/router/index.js b/src/router/index.js index 21ed2e0..ba7f2c4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -79,6 +79,12 @@ export const asyncRoutes = [ component: () => import('@/views/rating/topicCommentRecord/index'), meta: { title: '用户评论记录' }, }, + { + path: 'topic-category', + name: 'RatingTopicCategoryIndex', + component: () => import('@/views/rating/topicCategory/index'), + meta: { title: '评分话题分类' }, + }, ], }, { diff --git a/src/views/rating/topicCategory/components/TopicCategoryEdit.vue b/src/views/rating/topicCategory/components/TopicCategoryEdit.vue new file mode 100644 index 0000000..264d8bb --- /dev/null +++ b/src/views/rating/topicCategory/components/TopicCategoryEdit.vue @@ -0,0 +1,85 @@ + + + diff --git a/src/views/rating/topicCategory/index.vue b/src/views/rating/topicCategory/index.vue new file mode 100644 index 0000000..8c7aaca --- /dev/null +++ b/src/views/rating/topicCategory/index.vue @@ -0,0 +1,141 @@ + + + + +