diff --git a/src/utils/constants.ts b/src/utils/constants.ts
index 2375098ae..a1e2ecb72 100644
--- a/src/utils/constants.ts
+++ b/src/utils/constants.ts
@@ -64,6 +64,15 @@ export const SystemUserSocialTypeEnum = {
}
}
+/**
+ * 用户性别枚举(对齐后端 system_user_sex 字典)
+ */
+export const SystemUserSexEnum = {
+ UNKNOWN: 0, // 未知
+ MALE: 1, // 男
+ FEMALE: 2 // 女
+}
+
// ========== INFRA 模块 ==========
/**
* 代码生成模板类型
diff --git a/src/views/im/home/pages/conversation/components/message/MessageHistory.vue b/src/views/im/home/pages/conversation/components/message/MessageHistory.vue
index 61b35700a..b95944564 100644
--- a/src/views/im/home/pages/conversation/components/message/MessageHistory.vue
+++ b/src/views/im/home/pages/conversation/components/message/MessageHistory.vue
@@ -139,25 +139,22 @@
-
+
- {{ resolveFriendNotificationText(message) }}
+
-
+
- {{ resolveGroupNotificationText(message) }}
+
@@ -194,12 +191,12 @@
-
+
- {{ recallTipOf(message) }}
+
{
/** 点 tab 落筛选;同 kind 重复点击 → 当 toggle 关掉(避免迷惑) */
function setFilter(filter: ActiveFilter) {
- if (activeFilter.value?.kind === filter.kind && filter.kind !== 'date' && filter.kind !== 'member') {
+ if (
+ activeFilter.value?.kind === filter.kind &&
+ filter.kind !== 'date' &&
+ filter.kind !== 'member'
+ ) {
activeFilter.value = null
return
}
@@ -552,11 +569,7 @@ async function loadEarlier() {
}
// 4. 合并到 conversationStore:prependMessages 内部去重 + 升序合并 + 落 IndexedDB;
// 主聊天面板的 messages 是同一份引用,老消息也会一起出现在主面板里(符合预期)
- conversationStore.prependMessages(
- conversation.value.type,
- conversation.value.targetId,
- earlier
- )
+ conversationStore.prependMessages(conversation.value.type, conversation.value.targetId, earlier)
} finally {
loadingMore.value = false
}
@@ -599,9 +612,7 @@ function getAvatar(message: Message): string {
}
if (isGroup.value) {
const group = groupStore.getGroup(conversation.value.targetId)
- return (
- group?.members?.find((member) => member.userId === message.senderId)?.avatar || ''
- )
+ return group?.members?.find((member) => member.userId === message.senderId)?.avatar || ''
}
return conversation.value.avatar || ''
}
@@ -650,7 +661,6 @@ function locateMessage(messageId: number) {
emit('locate', messageId)
visible.value = false
}
-