mirror of
https://gitee.com/lijingbo-2021/open-anylink-web.git
synced 2025-12-30 11:02:25 +00:00
bug fixed
This commit is contained in:
@@ -4,5 +4,6 @@
|
|||||||
"tabWidth": 2,
|
"tabWidth": 2,
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"printWidth": 100,
|
"printWidth": 100,
|
||||||
"trailingComma": "none"
|
"trailingComma": "none",
|
||||||
|
"jsxBracketSameLine": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ export const onReceiveGroupSystemMsg = (updateScroll, capacity) => {
|
|||||||
content: msg.body.content,
|
content: msg.body.content,
|
||||||
msgTime: now
|
msgTime: now
|
||||||
}
|
}
|
||||||
await messageData.preloadResource([showMsg])
|
|
||||||
messageData.addMsgRecords(sessionId, [showMsg])
|
messageData.addMsgRecords(sessionId, [showMsg])
|
||||||
messageData.updateMsgKeySort(sessionId)
|
messageData.updateMsgKeySort(sessionId)
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ export const useAudioStore = defineStore('anylink-audio', () => {
|
|||||||
const audioIds = new Set()
|
const audioIds = new Set()
|
||||||
msgRecords.forEach((item) => {
|
msgRecords.forEach((item) => {
|
||||||
const aar = jsonParseSafe(item.content)
|
const aar = jsonParseSafe(item.content)
|
||||||
|
if (!aar || !Array.isArray(aar)) return
|
||||||
aar.forEach((item) => {
|
aar.forEach((item) => {
|
||||||
if (item.type === msgContentType.AUDIO || item.type === msgContentType.RECORDING) {
|
if (item.type === msgContentType.AUDIO || item.type === msgContentType.RECORDING) {
|
||||||
const objectId = item.value
|
const objectId = item.value
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ export const useDocumentStore = defineStore('anylink-document', () => {
|
|||||||
const documentIds = new Set()
|
const documentIds = new Set()
|
||||||
msgRecords.forEach((item) => {
|
msgRecords.forEach((item) => {
|
||||||
const aar = jsonParseSafe(item.content)
|
const aar = jsonParseSafe(item.content)
|
||||||
|
if (!aar || !Array.isArray(aar)) return
|
||||||
aar.forEach((item) => {
|
aar.forEach((item) => {
|
||||||
if (item.type === msgContentType.DOCUMENT) {
|
if (item.type === msgContentType.DOCUMENT) {
|
||||||
const objectId = item.value
|
const objectId = item.value
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ export const useImageStore = defineStore('anylink-image', () => {
|
|||||||
|
|
||||||
const imageIds = new Set()
|
const imageIds = new Set()
|
||||||
const aar = jsonParseSafe(content)
|
const aar = jsonParseSafe(content)
|
||||||
|
if (!aar || !Array.isArray(aar)) return
|
||||||
aar.forEach((item) => {
|
aar.forEach((item) => {
|
||||||
if (item.type === msgContentType.SCREENSHOT || item.type === msgContentType.IMAGE) {
|
if (item.type === msgContentType.SCREENSHOT || item.type === msgContentType.IMAGE) {
|
||||||
const objectId = item.value
|
const objectId = item.value
|
||||||
@@ -78,6 +79,7 @@ export const useImageStore = defineStore('anylink-image', () => {
|
|||||||
const imageIds = new Set()
|
const imageIds = new Set()
|
||||||
msgRecords.forEach((item) => {
|
msgRecords.forEach((item) => {
|
||||||
const aar = jsonParseSafe(item.content)
|
const aar = jsonParseSafe(item.content)
|
||||||
|
if (!aar || !Array.isArray(aar)) return
|
||||||
aar.forEach((item) => {
|
aar.forEach((item) => {
|
||||||
if (item.type === msgContentType.SCREENSHOT || item.type === msgContentType.IMAGE) {
|
if (item.type === msgContentType.SCREENSHOT || item.type === msgContentType.IMAGE) {
|
||||||
const objectId = item.value
|
const objectId = item.value
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ export const useVideoStore = defineStore('anylink-video', () => {
|
|||||||
const videoIds = new Set()
|
const videoIds = new Set()
|
||||||
msgRecords.forEach((item) => {
|
msgRecords.forEach((item) => {
|
||||||
const aar = jsonParseSafe(item.content)
|
const aar = jsonParseSafe(item.content)
|
||||||
|
if (!aar || !Array.isArray(aar)) return
|
||||||
aar.forEach((item) => {
|
aar.forEach((item) => {
|
||||||
if (item.type === msgContentType.VIDEO) {
|
if (item.type === msgContentType.VIDEO) {
|
||||||
const objectId = item.value
|
const objectId = item.value
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { ref, computed, watch } from 'vue'
|
|||||||
import UserAvatarIcon from '@/components/common/UserAvatarIcon.vue'
|
import UserAvatarIcon from '@/components/common/UserAvatarIcon.vue'
|
||||||
import GroupAvatarIcon from '@/components/common/GroupAvatarIcon.vue'
|
import GroupAvatarIcon from '@/components/common/GroupAvatarIcon.vue'
|
||||||
import SessionTag from './SessionTag.vue'
|
import SessionTag from './SessionTag.vue'
|
||||||
import { sessionShowTime } from '@/js/utils/common'
|
import { jsonParseSafe, sessionShowTime } from '@/js/utils/common'
|
||||||
import { Top, MuteNotification } from '@element-plus/icons-vue'
|
import { Top, MuteNotification } from '@element-plus/icons-vue'
|
||||||
import { MsgType } from '@/proto/msg'
|
import { MsgType } from '@/proto/msg'
|
||||||
import { useUserStore, useMessageStore, useGroupStore } from '@/stores'
|
import { useUserStore, useMessageStore, useGroupStore } from '@/stores'
|
||||||
@@ -225,39 +225,40 @@ const showDetailContent = computed(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sessionInfo.value.sessionType === MsgType.GROUP_CHAT) {
|
if (sessionInfo.value.sessionType === MsgType.GROUP_CHAT) {
|
||||||
|
const jsonContent = jsonParseSafe(lastMsg.value.content)
|
||||||
switch (lastMsg.value.msgType) {
|
switch (lastMsg.value.msgType) {
|
||||||
case MsgType.SYS_GROUP_CREATE:
|
case MsgType.SYS_GROUP_CREATE:
|
||||||
return getSysGroupCreateMsgTips(lastMsg.value.content)
|
return getSysGroupCreateMsgTips(jsonContent)
|
||||||
case MsgType.SYS_GROUP_ADD_MEMBER:
|
case MsgType.SYS_GROUP_ADD_MEMBER:
|
||||||
return getSysGroupAddMemberMsgTips(lastMsg.value.content)
|
return getSysGroupAddMemberMsgTips(jsonContent)
|
||||||
case MsgType.SYS_GROUP_DEL_MEMBER:
|
case MsgType.SYS_GROUP_DEL_MEMBER:
|
||||||
return getSysGroupDelMemberMsgTips(lastMsg.value.content)
|
return getSysGroupDelMemberMsgTips(jsonContent)
|
||||||
case MsgType.SYS_GROUP_UPDATE_ANNOUNCEMENT:
|
case MsgType.SYS_GROUP_UPDATE_ANNOUNCEMENT:
|
||||||
return getSysGroupUpdateAnnouncement(lastMsg.value.content)
|
return getSysGroupUpdateAnnouncement(jsonContent)
|
||||||
case MsgType.SYS_GROUP_UPDATE_NAME:
|
case MsgType.SYS_GROUP_UPDATE_NAME:
|
||||||
return getSysGroupUpdateName(lastMsg.value.content)
|
return getSysGroupUpdateName(jsonContent)
|
||||||
case MsgType.SYS_GROUP_UPDATE_AVATAR:
|
case MsgType.SYS_GROUP_UPDATE_AVATAR:
|
||||||
return getSysGroupUpdateAvatar(lastMsg.value.content)
|
return getSysGroupUpdateAvatar(jsonContent)
|
||||||
case MsgType.SYS_GROUP_SET_ADMIN:
|
case MsgType.SYS_GROUP_SET_ADMIN:
|
||||||
case MsgType.SYS_GROUP_CANCEL_ADMIN:
|
case MsgType.SYS_GROUP_CANCEL_ADMIN:
|
||||||
return getSysGroupChangeRoleMsgTips(lastMsg.value.msgType, lastMsg.value.content)
|
return getSysGroupChangeRoleMsgTips(lastMsg.value.msgType, jsonContent)
|
||||||
case MsgType.SYS_GROUP_SET_ALL_MUTED:
|
case MsgType.SYS_GROUP_SET_ALL_MUTED:
|
||||||
case MsgType.SYS_GROUP_CANCEL_ALL_MUTED:
|
case MsgType.SYS_GROUP_CANCEL_ALL_MUTED:
|
||||||
return getSysGroupUpdateAllMuted(lastMsg.value.msgType, lastMsg.value.content)
|
return getSysGroupUpdateAllMuted(lastMsg.value.msgType, jsonContent)
|
||||||
case MsgType.SYS_GROUP_SET_JOIN_APPROVAL:
|
case MsgType.SYS_GROUP_SET_JOIN_APPROVAL:
|
||||||
case MsgType.SYS_GROUP_CANCEL_JOIN_APPROVAL:
|
case MsgType.SYS_GROUP_CANCEL_JOIN_APPROVAL:
|
||||||
return getSysGroupUpdateJoinApproval(lastMsg.value.msgType, lastMsg.value.content)
|
return getSysGroupUpdateJoinApproval(lastMsg.value.msgType, jsonContent)
|
||||||
case MsgType.SYS_GROUP_SET_HISTORY_BROWSE:
|
case MsgType.SYS_GROUP_SET_HISTORY_BROWSE:
|
||||||
case MsgType.SYS_GROUP_CANCEL_HISTORY_BROWSE:
|
case MsgType.SYS_GROUP_CANCEL_HISTORY_BROWSE:
|
||||||
return getSysGroupUpdateHistoryBrowse(lastMsg.value.msgType, lastMsg.value.content)
|
return getSysGroupUpdateHistoryBrowse(lastMsg.value.msgType, jsonContent)
|
||||||
case MsgType.SYS_GROUP_OWNER_TRANSFER:
|
case MsgType.SYS_GROUP_OWNER_TRANSFER:
|
||||||
return getSysGroupOwnerTransfer(lastMsg.value.content)
|
return getSysGroupOwnerTransfer(jsonContent)
|
||||||
case MsgType.SYS_GROUP_UPDATE_MEMBER_MUTED:
|
case MsgType.SYS_GROUP_UPDATE_MEMBER_MUTED:
|
||||||
return getSysGroupUpdateMemberMuted(lastMsg.value.content)
|
return getSysGroupUpdateMemberMuted(jsonContent)
|
||||||
case MsgType.SYS_GROUP_LEAVE:
|
case MsgType.SYS_GROUP_LEAVE:
|
||||||
return getSysGroupLeave(lastMsg.value.content)
|
return getSysGroupLeave(jsonContent)
|
||||||
case MsgType.SYS_GROUP_DROP:
|
case MsgType.SYS_GROUP_DROP:
|
||||||
return getSysGroupDrop(lastMsg.value.content)
|
return getSysGroupDrop(jsonContent)
|
||||||
case MsgType.GROUP_CHAT:
|
case MsgType.GROUP_CHAT:
|
||||||
return getGroupChatMsgTips(showSimplifyMsgContent(lastMsg.value.content))
|
return getGroupChatMsgTips(showSimplifyMsgContent(lastMsg.value.content))
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user