|
@@ -289,13 +289,13 @@ const scrollToBottom = () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const getMList = async () => {
|
|
|
+const getMList = async (type) => {
|
|
|
try {
|
|
|
const res = await getList({
|
|
|
system: 3
|
|
|
})
|
|
|
filteredUsers.value = res.rows;
|
|
|
- res.rows[0] && selectUser(res.rows[0])
|
|
|
+ type && res.rows[0] && selectUser(res.rows[0])
|
|
|
} catch (error) {
|
|
|
|
|
|
}
|
|
@@ -336,11 +336,9 @@ const soketInit = () => {
|
|
|
nextTick(() => {
|
|
|
scrollToBottom()
|
|
|
})
|
|
|
- }else{
|
|
|
- getMList();//获取用户列表
|
|
|
}
|
|
|
- if(res.type ==='msgUnreadCount'){
|
|
|
- getMList();//获取用户列表
|
|
|
+ if(res.type ==='msgUnreadCount' || currentUser.value.conversationRecordId !== res.data.conversationRecordId){
|
|
|
+ getMList(false);//获取用户列表
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -352,7 +350,7 @@ const soketInit = () => {
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
- getMList();//获取用户列表
|
|
|
+ getMList(true);//获取用户列表
|
|
|
|
|
|
setTimeout(() => {
|
|
|
// 添加滚动监听
|