新增临时角色页面

This commit is contained in:
2025-02-24 21:25:49 +08:00
parent 53d1a19475
commit ec98add5b2
31 changed files with 194 additions and 66 deletions

View File

@@ -77,7 +77,6 @@ export default {
methods: {
// 打开聊天窗口
openChat() {
console.log("窗口打开")
this.drawerVisible = true;
},
@@ -91,7 +90,6 @@ export default {
selectContact(contact) {
this.selectedContact = contact;
this.chatHistory = []; // 清空当前聊天记录
console.log(contact);
this.loadMessage(contact.id);
},
@@ -121,7 +119,6 @@ export default {
this.msgListLoading = true;
getContact(concatId).then(response => {
if (response.code === 200) {
console.log(response.data)
this.currentContact = response.data;
this.contactUser = response.data.user;
this.chatHistory = response.data.messages;

View File

@@ -193,7 +193,7 @@ export default {
this.currentContact = response.data;
this.contactUser = response.data.user;
this.msgList = response.data.messages;
console.log(this.msgList);
}
this.msgListLoading = false;
this.fleshScroll();
@@ -243,12 +243,9 @@ export default {
this.msgList.push(message);
this.fleshLastMsg();
this.fleshScroll();
}
},
fleshLastMsg() {
console.log(this.contactList)
const index = this.contactList.findIndex(e => e.id === this.currentContact.id);
this.contactList[index].endMsg = this.msgList[this.msgList.length - 1].content;
},