mirror of
https://gitee.com/lijingbo-2021/open-anylink-web.git
synced 2026-05-18 05:07:56 +00:00
ContactsUser应该只过滤sessionType === MsgType.CHAT的数据; 微调样式
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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]
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user