diff --git a/src/components/rightBox/chatBox/ChatMain.vue b/src/components/rightBox/chatBox/ChatMain.vue index adcca90a..1e676804 100644 --- a/src/components/rightBox/chatBox/ChatMain.vue +++ b/src/components/rightBox/chatBox/ChatMain.vue @@ -19,13 +19,13 @@ @mouseenter="isAnnouncementHover = true" @mouseleave="isAnnouncementHover = false"> - +
{{ topAnnouncement.content }}
-
+

查看全部

diff --git a/src/components/rightBox/chatBox/ChatSidebar.vue b/src/components/rightBox/chatBox/ChatSidebar.vue index 823eea76..b526f110 100644 --- a/src/components/rightBox/chatBox/ChatSidebar.vue +++ b/src/components/rightBox/chatBox/ChatSidebar.vue @@ -347,17 +347,10 @@ const handleOpenAnnoun = (isAdd: boolean) => { */ // TODO:这里会出现把上一次的内容连贯起来一起打印,会出现打印好几十次的情况 const handleLoadGroupAnnoun = async (roomId: string, reload: boolean) => { - // 判断是否是群主管理员 - console.log('是否是群主:', isLord.value) - console.log('是否是管理员:', isAdmin.value) // 设置是否可以添加公告 isAddAnnoun.value = isLord.value || isAdmin.value || hasBadge6.value! - console.log('是否可以添加公告:', isAddAnnoun.value) - - console.log('handleLoadGroupAnnoun-获取群公告列表:', roomId) // 获取群公告列表 const data = await groupStore.getGroupAnnouncementList(roomId, 1, 10, reload) - console.log('获取群公告列表:', data) if (data) { announList.value = data.records // 处理置顶公告 diff --git a/src/router/index.ts b/src/router/index.ts index 3668b760..c2d19104 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -220,7 +220,7 @@ const routes: Array = [ { path: '/announList/:roomId/:type', name: 'announList', - component: () => import('@/views/announWindow/AnnounList.vue') + component: () => import('@/views/announWindow/index.vue') } ] diff --git a/src/stores/cached.ts b/src/stores/cached.ts index 28c52134..72472f84 100644 --- a/src/stores/cached.ts +++ b/src/stores/cached.ts @@ -256,11 +256,9 @@ export const useCachedStore = defineStore(StoresEnum.CACHED, () => { * 如果请求失败,则返回空数组 */ const getGroupAnnouncementList = async (roomId: string, page: number, size: number, reload: boolean) => { - console.log('group-获取群公告', roomId, reload) if (localStorage.getItem('GroupAnnouncementList') && !reload) { // 如果有缓存且不需要重新加载,则直接从缓存中获取 const localList = JSON.parse(localStorage.getItem('GroupAnnouncementList') || '{}') - console.log('localList', localList) if (localList[roomId]) { return localList[roomId] || [] } diff --git a/src/styles/scss/chat-main.scss b/src/styles/scss/chat-main.scss index aa3a3dee..66692b74 100644 --- a/src/styles/scss/chat-main.scss +++ b/src/styles/scss/chat-main.scss @@ -179,7 +179,6 @@ border: 1px solid var(--bg-notice, rgba(19, 152, 127, 0.2)); margin: 6px 12px 0 12px; height: 34px; - user-select: none; transition: all 0.3s ease-in-out; z-index: 10; } diff --git a/src/views/announWindow/AnnounList.vue b/src/views/announWindow/index.vue similarity index 99% rename from src/views/announWindow/AnnounList.vue rename to src/views/announWindow/index.vue index 9bd8eefe..64de84ea 100644 --- a/src/views/announWindow/AnnounList.vue +++ b/src/views/announWindow/index.vue @@ -227,7 +227,6 @@ const handleInit = async (reload: boolean) => { pageNum.value = 1 const data = await groupStore.getGroupAnnouncementList(roomId.value, pageNum.value, pageSize, reload) if (data) { - console.log('data', data) announList.value = data.records if (announList.value.length === 0) { viewType.value = '0' @@ -375,7 +374,6 @@ const handleDel = async (announcement: any) => { // 编辑公告 const handleEdit = (announcement: any) => { - console.log('edit:', announcement) isEdit.value = true editAnnoouncement.value = announcement announContent.value = announcement.content @@ -387,7 +385,6 @@ const handleEdit = (announcement: any) => { // 验证公告内容 const validateAnnouncement = (content: string) => { - console.log('content', content) if (content.length < 1) { window.$message.error('公告内容不能为空') return false @@ -480,7 +477,6 @@ onMounted(async () => { await currentWindow.show() await currentWindow.setFocus() title.value = await currentWindow.title() - console.log('title', title.value) }, 200) } catch (error) { console.error('组件挂载初始化失败:', error)