|
|
@@ -808,7 +808,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleChangeConversation(conversation, instance) {
|
|
|
- //console.log(conversation,'conversation')
|
|
|
+ //console.log(conversation,instance,'conversation')
|
|
|
this.showCourseManage=false
|
|
|
if(conversation.isGroup){
|
|
|
// this.contact.extId=conversation.extId
|
|
|
@@ -827,11 +827,17 @@ export default {
|
|
|
this.queryParams.userId = this.qwUser.id
|
|
|
|
|
|
if(conversation.unread>0){
|
|
|
- conversation.unread=0;
|
|
|
- instance.updateContact(conversation);
|
|
|
+ // conversation.unread=0;
|
|
|
+ // instance.updateContact(conversation);
|
|
|
|
|
|
- // 更新缓存中的会话记录
|
|
|
- this.updateSessionConversation(conversation);
|
|
|
+ // // 更新缓存中的会话记录
|
|
|
+ // this.updateSessionConversation(conversation);
|
|
|
+
|
|
|
+ // 先更新UI和缓存,再清零(或在接口回调中清零)
|
|
|
+ instance.updateContact({ ...conversation, unread: 0 });
|
|
|
+ this.updateSessionConversation({ ...conversation, unread: 0 });
|
|
|
+ // 内存中同步更新
|
|
|
+ conversation.unread = 0;
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -857,8 +863,9 @@ export default {
|
|
|
}
|
|
|
getConversationId(data).then(response => {
|
|
|
IMUI.appendConversation(response.data);
|
|
|
- IMUI.changeContact(contact.conversationId);
|
|
|
- IMUI.currentNewContactId=contact.id;
|
|
|
+ IMUI.changeContact(response.data.conversationId);
|
|
|
+ //IMUI.currentContactId=response.data.conversationId;
|
|
|
+ //this.updateSessionConversation(response.data);
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
@@ -1295,8 +1302,9 @@ export default {
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
transition: border-radius 0.2s ease, background 0.2s ease; /* 只过渡需要变化的属性 */
|
|
|
-border-radius: 0 6px 6px 0;
|
|
|
-
|
|
|
+//border-radius: 0 6px 6px 0;
|
|
|
+position: relative;
|
|
|
+z-index: 2;
|
|
|
.el-avatar{
|
|
|
width: 36px;
|
|
|
height: 36px;
|
|
|
@@ -1328,8 +1336,8 @@ border-radius: 0 6px 6px 0;
|
|
|
}
|
|
|
&.active{
|
|
|
background: #F1F4F8;
|
|
|
- border-radius: 6px;
|
|
|
- //border-radius: 6px 0px 0px 6px;
|
|
|
+ border-radius: 8px 0px 0px 8px;
|
|
|
+ box-shadow: 10px 10px 0 0 #F1F4F8, 10px -10px 0 0 #F1F4F8;
|
|
|
position: relative; /* 确保z-index生效 */
|
|
|
z-index: 1; /* 高于相邻元素的默认层级 */
|
|
|
.name{
|
|
|
@@ -1338,27 +1346,29 @@ border-radius: 0 6px 6px 0;
|
|
|
.text{
|
|
|
color: #202124;
|
|
|
}
|
|
|
- // &:before{
|
|
|
- // content: '';
|
|
|
- // position: absolute;
|
|
|
- // z-index: 0;
|
|
|
- // right: 0;
|
|
|
- // width: 10px;
|
|
|
- // height: auto;
|
|
|
- // background: #F1F4F8;
|
|
|
- // }
|
|
|
+ &::before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ right: -10px;
|
|
|
+ top: -10px;
|
|
|
+ width: 72px;
|
|
|
+ height:10px ;
|
|
|
+ background:#409EFF;
|
|
|
+ border-bottom-right-radius:8px ;
|
|
|
+ }
|
|
|
+ &::after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ right: -10px;
|
|
|
+ bottom: -10px;
|
|
|
+ width: 72px;
|
|
|
+ height:10px ;
|
|
|
+ background: #409EFF;
|
|
|
+ border-top-right-radius:8px ;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
- /* 下一个元素:仅保留右上圆角,清除默认的右下圆角 */
|
|
|
- // .q-item.active + .q-item {
|
|
|
- // border-top-right-radius: 6px;
|
|
|
- // border-bottom-right-radius: 0; /* 避免与选中元素底部衔接处的多余圆角 */
|
|
|
- // }
|
|
|
- // /* 上一个元素:仅保留右下圆角,清除默认的右上圆角 */
|
|
|
- // .q-item + .q-item.active {
|
|
|
- // border-bottom-right-radius: 6px;
|
|
|
- // border-top-right-radius: 0; /* 避免与选中元素顶部衔接处的多余圆角 */
|
|
|
- // }
|
|
|
}
|
|
|
.group-item{
|
|
|
padding-left: 12px;
|