groupcard和通讯录可以调整到群组的聊天窗口

This commit is contained in:
bob
2024-11-21 18:07:03 +08:00
parent bf2e0bf620
commit ae65985f60
3 changed files with 41 additions and 12 deletions

View File

@@ -356,6 +356,12 @@ const pullMsg = async (mode = 0, ref = -1) => {
const handleSelectedSession = async (sessionId) => {
if (selectedSessionId.value !== sessionId) {
selectedSessionId.value = sessionId
router.push({
path: '/message',
query: {
sessionId: sessionId
}
})
initSession(sessionId)
locateSession(sessionId)
@@ -600,6 +606,15 @@ watch(
}
)
watch(
() => router.currentRoute.value.query.sessionId,
(newValue) => {
if (newValue) {
handleSelectedSession(newValue)
}
}
)
const sessionItemRefCollection = ref({})
const setSessionItemRef = (sessionId, el) => {
sessionItemRefCollection.value[sessionId] = el