This commit is contained in:
yangzhe 2025-12-16 15:37:49 +08:00
commit 2a7aee3614
1 changed files with 20 additions and 19 deletions

View File

@ -62,7 +62,7 @@ export default {
PageHeader,
},
computed: {
// 使
// 便使
displayChatList() {
return (this.chatList || []).map((item) => ({
...item,
@ -102,10 +102,16 @@ export default {
//
openChat(item) {
console.log('打开聊天:', item);
uni.navigateTo({
url: `/pages/chat/chat-detail?userId=${item.userId}&name=${item.name}`
});
// console.log(':', item);
// uni.navigateTo({
// url: `/pages/chat/chat-detail?userId=${item.userId}&name=${item.name}`
// });
const dialogueManagementId = item.dialogueManagementId
const receiverId = item.receiverId
this.$store.dispatch("selectTeacherChatItem", {
dialogueManagementId,
receiverId,
});
},
//
@ -134,10 +140,9 @@ export default {
refreshChatList() {
this.loadChatList();
},
//
normalizeDialogueList(list = []) {
//
return list.map((item, index) => {
const unread =
typeof item?.unReadCount === "number"
@ -264,23 +269,19 @@ export default {
/* ===== 聊天列表项 ===== */
.chat-item {
display: flex;
align-items: center;
padding: 14px 16px;
background-color: #fff;
border-bottom: 1rpx solid #f1f1f1;
padding: 15px;
background: #fff;
border-bottom: 1rpx solid #f0f0f0;
transition: background-color 0.2s;
}
.chat-item:active {
background-color: #f8f8f8;
background-color: #f5f5f5;
}
.chat-avatar-wrapper {
position: relative;
margin-right: 12px;
width: 50px;
height: 50px;
flex-shrink: 0;
}
.chat-avatar {
@ -324,8 +325,8 @@ export default {
.chat-name {
font-size: 16px;
font-weight: 500;
color: #1f1f1f;
max-width: 70%;
color: #333;
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@ -333,7 +334,7 @@ export default {
.chat-time {
font-size: 12px;
color: #9b9b9b;
color: #999;
flex-shrink: 0;
}
@ -344,7 +345,7 @@ export default {
.preview-text {
font-size: 13px;
color: #9b9b9b;
color: #999;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;