Merge branch 'main' of http://sl.vrgon.com:3000/JiXinHui/YingXingAI
This commit is contained in:
commit
2a7aee3614
|
|
@ -62,7 +62,7 @@ export default {
|
||||||
PageHeader,
|
PageHeader,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 补充展示字段,模板直接使用
|
// 补充展示字段,便于模板直接使用
|
||||||
displayChatList() {
|
displayChatList() {
|
||||||
return (this.chatList || []).map((item) => ({
|
return (this.chatList || []).map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
|
|
@ -102,9 +102,15 @@ export default {
|
||||||
|
|
||||||
// 打开聊天页面
|
// 打开聊天页面
|
||||||
openChat(item) {
|
openChat(item) {
|
||||||
console.log('打开聊天:', item);
|
// console.log('打开聊天:', item);
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url: `/pages/chat/chat-detail?userId=${item.userId}&name=${item.name}`
|
// 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,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -137,7 +143,6 @@ export default {
|
||||||
|
|
||||||
// 规范化接口返回的会话列表数据
|
// 规范化接口返回的会话列表数据
|
||||||
normalizeDialogueList(list = []) {
|
normalizeDialogueList(list = []) {
|
||||||
// 后续接口字段若变更,仅需调整此处映射
|
|
||||||
return list.map((item, index) => {
|
return list.map((item, index) => {
|
||||||
const unread =
|
const unread =
|
||||||
typeof item?.unReadCount === "number"
|
typeof item?.unReadCount === "number"
|
||||||
|
|
@ -264,23 +269,19 @@ export default {
|
||||||
/* ===== 聊天列表项 ===== */
|
/* ===== 聊天列表项 ===== */
|
||||||
.chat-item {
|
.chat-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
padding: 15px;
|
||||||
padding: 14px 16px;
|
background: #fff;
|
||||||
background-color: #fff;
|
border-bottom: 1rpx solid #f0f0f0;
|
||||||
border-bottom: 1rpx solid #f1f1f1;
|
|
||||||
transition: background-color 0.2s;
|
transition: background-color 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-item:active {
|
.chat-item:active {
|
||||||
background-color: #f8f8f8;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-avatar-wrapper {
|
.chat-avatar-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
width: 50px;
|
|
||||||
height: 50px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-avatar {
|
.chat-avatar {
|
||||||
|
|
@ -324,8 +325,8 @@ export default {
|
||||||
.chat-name {
|
.chat-name {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #1f1f1f;
|
color: #333;
|
||||||
max-width: 70%;
|
max-width: 200px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
@ -333,7 +334,7 @@ export default {
|
||||||
|
|
||||||
.chat-time {
|
.chat-time {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #9b9b9b;
|
color: #999;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -344,7 +345,7 @@ export default {
|
||||||
|
|
||||||
.preview-text {
|
.preview-text {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #9b9b9b;
|
color: #999;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue