diff --git a/src/api/rating/pk.js b/src/api/rating/pk.js new file mode 100644 index 0000000..80d6f9e --- /dev/null +++ b/src/api/rating/pk.js @@ -0,0 +1,25 @@ +import request from '@/utils/request' + +/** + * 获取PK赛列表 + * @param {pageNo: number, pageSize: number, topicId?: string, itemId?: string} data + */ +export function getList(data) { + return request({ + url: 'management/api/rating/pk/list', + method: 'get', + params: data, + }) +} + +/** + * 生成PK赛 + * @param {topicId: string, leftItemId: string, rightItemId: string} data + */ +export function generate(data) { + return request({ + url: 'management/api/rating/pk/generate', + method: 'post', + data, + }) +} diff --git a/src/router/index.js b/src/router/index.js index 7d8c780..d8deee6 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -85,6 +85,32 @@ export const asyncRoutes = [ component: () => import('@/views/rating/topicCategory/index'), meta: { title: '评分话题分类' }, }, + { + path: 'pk', + component: EmptyLayout, + alwaysShow: true, + redirect: 'noRedirect', + name: 'PkIndex', + meta: { + title: 'PK赛', + icon: 'clover', + permissions: ['admin'], + }, + children: [ + { + path: 'list', + name: 'List', + component: () => import('@/views/rating/pk/list/index'), + meta: { title: 'PK赛列表', icon: 'setting' }, + }, + { + path: 'pkRecord', + name: 'PkRecord', + component: () => import('@/views/rating/pk/record/index'), + meta: { title: 'PK赛记录', icon: 'setting' }, + }, + ], + }, { path: 'topic-review', name: 'RatingTopicReviewIndex', diff --git a/src/views/index/utils/index.js b/src/views/index/utils/index.js index 42a6b8f..0bc81f1 100644 --- a/src/views/index/utils/index.js +++ b/src/views/index/utils/index.js @@ -27,6 +27,7 @@ export const eventTypeMap = { export const appMap = { '69665538a49b8ae3be50fe5d': '新春祝福', + '6a0d7dbe4c5de50f2ba66475': '夯拉评', } export const userMap = { diff --git a/src/views/rating/pk/list/components/PkGenerate.vue b/src/views/rating/pk/list/components/PkGenerate.vue new file mode 100644 index 0000000..f20d206 --- /dev/null +++ b/src/views/rating/pk/list/components/PkGenerate.vue @@ -0,0 +1,210 @@ + + + diff --git a/src/views/rating/pk/list/index.vue b/src/views/rating/pk/list/index.vue new file mode 100644 index 0000000..374bc30 --- /dev/null +++ b/src/views/rating/pk/list/index.vue @@ -0,0 +1,336 @@ + + + + + diff --git a/src/views/rating/pk/record/index.vue b/src/views/rating/pk/record/index.vue new file mode 100644 index 0000000..e69de29