ContactsUser应该只过滤sessionType === MsgType.CHAT的数据; 微调样式

This commit is contained in:
bob
2024-10-24 21:23:42 +08:00
parent 8a64abb573
commit f514b5d740
2 changed files with 10 additions and 3 deletions

View File

@@ -128,8 +128,9 @@ const goToSessionTab = () => {
.last-time {
justify-content: start;
border-radius: 4px;
padding: 4px;
background: #c8c9cc;
padding-left: 5px;
padding-right: 5px;
background: rgb(221.7, 222.6, 224.4);
flex-shrink: 0;
}
.last-content {

View File

@@ -12,6 +12,7 @@ import { ElLoading } from 'element-plus'
import { el_loading_options } from '@/const/commonConst'
import { Search } from '@element-plus/icons-vue'
import HashNoData from '@/components/common/HasNoData.vue'
import { MsgType } from '@/proto/msg'
const messageData = messageStore()
const indexActive = ref('last')
@@ -56,7 +57,12 @@ const initLastData = async () => {
Object.keys(messageData.sessionList).forEach((key) => {
const lastMsgTime = messageData.sessionList[key].lastMsgTime
if (lastMsgTime && Date.now() - new Date(lastMsgTime).getTime() < 7 * 24 * 60 * 60 * 1000) {
const sessionType = messageData.sessionList[key].sessionType
if (
sessionType === MsgType.CHAT &&
lastMsgTime &&
Date.now() - new Date(lastMsgTime).getTime() < 7 * 24 * 60 * 60 * 1000
) {
lastData.value[key] = messageData.sessionList[key]
}
})