feat:教师端在线咨询会话对接
This commit is contained in:
parent
38154d6306
commit
17a5a736dd
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue