Remove console.log statements in Chat class

This commit is contained in:
2023-10-24 06:59:14 +08:00
parent a641b07de1
commit 018246e6dc
1 changed files with 0 additions and 2 deletions

View File

@ -233,7 +233,6 @@ export default class Chat {
} }
// 如果和上一条消息是同一人, 且时间间隔小于1小时, 则向上合并 // 如果和上一条消息是同一人, 且时间间隔小于1小时, 则向上合并
console.log('添加一条消息', this.last, data)
if (this.last && this.last.name === data.name && new Date(data.time).getTime() - new Date(this.last.time).getTime() < 1000 * 60 * 60) { if (this.last && this.last.name === data.name && new Date(data.time).getTime() - new Date(this.last.time).getTime() < 1000 * 60 * 60) {
this.last.item.querySelector('ul').appendChild(ListItem({ textContent: data.text })) this.last.item.querySelector('ul').appendChild(ListItem({ textContent: data.text }))
this.last = { ...data, item: this.last.item } this.last = { ...data, item: this.last.item }
@ -322,7 +321,6 @@ export default class Chat {
] ]
})) }))
if (scroll) { if (scroll) {
console.log('滚动到底部')
this.ul.scrollTop = this.ul.scrollHeight this.ul.scrollTop = this.ul.scrollHeight
} }
// 记录到上一条消息 // 记录到上一条消息