diff --git a/Zhibo/admin/src/api/group.js b/Zhibo/admin/src/api/group.js new file mode 100644 index 00000000..eedd6d23 --- /dev/null +++ b/Zhibo/admin/src/api/group.js @@ -0,0 +1,43 @@ +import request from '@/utils/request' + +/** + * 群组列表 + */ +export function groupListApi(params) { + return request({ + url: '/admin/group/list', + method: 'get', + params + }) +} + +/** + * 群组统计 + */ +export function groupStatisticsApi() { + return request({ + url: '/admin/group/statistics', + method: 'get' + }) +} + +/** + * 群组成员列表 + */ +export function groupMembersApi(groupId, params) { + return request({ + url: `/admin/group/${groupId}/members`, + method: 'get', + params + }) +} + +/** + * 解散群组 + */ +export function groupDeleteApi(id) { + return request({ + url: `/admin/group/${id}`, + method: 'delete' + }) +} diff --git a/Zhibo/admin/src/api/streamer.js b/Zhibo/admin/src/api/streamer.js new file mode 100644 index 00000000..4044ce4b --- /dev/null +++ b/Zhibo/admin/src/api/streamer.js @@ -0,0 +1,77 @@ +import request from '@/utils/request' + +// 获取用户列表(用于选择主播) +export function getUserList(keyword) { + return request({ + url: '/admin/streamer/users', + method: 'get', + params: { keyword } + }) +} + +// 获取主播下拉列表(用于创建直播间) +export function getStreamerOptions() { + return request({ + url: '/admin/streamer/streamers', + method: 'get' + }) +} + +// 获取主播列表 +export function getStreamerList(params) { + return request({ + url: '/admin/streamer/list', + method: 'get', + params + }) +} + +// 获取主播详情(包含直播统计) +export function getStreamerDetail(userId) { + return request({ + url: `/admin/streamer/detail/${userId}`, + method: 'get' + }) +} + +// 获取主播统计 +export function getStreamerStatistics() { + return request({ + url: '/admin/streamer/statistics', + method: 'get' + }) +} + +// 设置用户为主播 +export function setStreamer(userId, data) { + return request({ + url: `/admin/streamer/set/${userId}`, + method: 'post', + data + }) +} + +// 取消主播资格 +export function cancelStreamer(userId) { + return request({ + url: `/admin/streamer/cancel/${userId}`, + method: 'post' + }) +} + +// 封禁主播 +export function banStreamer(userId, data) { + return request({ + url: `/admin/streamer/ban/${userId}`, + method: 'post', + data + }) +} + +// 解封主播 +export function unbanStreamer(userId) { + return request({ + url: `/admin/streamer/unban/${userId}`, + method: 'post' + }) +} diff --git a/Zhibo/admin/src/router/modules/liveManage.js b/Zhibo/admin/src/router/modules/liveManage.js index e183b109..f646be0d 100644 --- a/Zhibo/admin/src/router/modules/liveManage.js +++ b/Zhibo/admin/src/router/modules/liveManage.js @@ -60,6 +60,13 @@ const liveManageRouter = { name: 'FanGroupList', meta: { title: '粉丝团管理', icon: '' }, }, + // 主播管理 + { + path: 'streamer/list', + component: () => import('@/views/streamer/list/index'), + name: 'StreamerList', + meta: { title: '主播管理', icon: '' }, + }, ], }; diff --git a/Zhibo/admin/src/router/modules/socialManage.js b/Zhibo/admin/src/router/modules/socialManage.js index 3e9b46a1..949aae8b 100644 --- a/Zhibo/admin/src/router/modules/socialManage.js +++ b/Zhibo/admin/src/router/modules/socialManage.js @@ -61,39 +61,19 @@ const socialManageRouter = { name: 'SessionList', meta: { title: '会话管理', icon: '' }, }, - // 聊天常用语 + // 敏感词管理 { - path: 'chatPhrase/list', - component: () => import('@/views/chatphrase/list/index'), - name: 'ChatPhraseList', - meta: { title: '聊天常用语', icon: '' }, + path: 'sensitiveWord/list', + component: () => import('@/views/sensitiveWord/list/index'), + name: 'SensitiveWordList', + meta: { title: '敏感词管理', icon: '' }, }, - // 评论管理 + // 群组管理 { - path: 'comment/dynamic', - component: () => import('@/views/comment/dynamic/index'), - name: 'CommentDynamic', - meta: { title: '动态评论', icon: '' }, - }, - { - path: 'comment/reply', - component: () => import('@/views/comment/reply/index'), - name: 'CommentReply', - meta: { title: '评论回复', icon: '' }, - }, - // 动态管理 - { - path: 'dynamic/list', - component: () => import('@/views/dynamic/list/index'), - name: 'DynamicList', - meta: { title: '动态列表', icon: '' }, - }, - // 互动管理 - { - path: 'interact/index', - component: () => import('@/views/interact/index'), - name: 'InteractList', - meta: { title: '互动列表', icon: '' }, + path: 'group/list', + component: () => import('@/views/group/list/index'), + name: 'GroupList', + meta: { title: '群组管理', icon: '' }, }, ], }; diff --git a/Zhibo/admin/src/views/group/list/index.vue b/Zhibo/admin/src/views/group/list/index.vue new file mode 100644 index 00000000..29ce26a1 --- /dev/null +++ b/Zhibo/admin/src/views/group/list/index.vue @@ -0,0 +1,261 @@ + + + + + diff --git a/Zhibo/admin/src/views/room/list/index.vue b/Zhibo/admin/src/views/room/list/index.vue index 32bf5110..722d1fdf 100644 --- a/Zhibo/admin/src/views/room/list/index.vue +++ b/Zhibo/admin/src/views/room/list/index.vue @@ -144,8 +144,16 @@ - - + + + +
+ + {{ item.nickname }} + ID: {{ item.userId }} +
+
+