新增临时角色页面
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user