Compare commits

..

No commits in common. "da2c1ef8c8f6fcd927d243153c9fce6952782112" and "5a39640f74b909d6fbaba8001df14563a9d64b11" have entirely different histories.

3 changed files with 3 additions and 3 deletions

View File

@ -215,7 +215,7 @@ export default class Chat {
await set(data.id, data, this.store)
}
发送消息(text) {
const name = localStorage.getItem('username')
const name = '我'
const id = window.crypto.randomUUID()
const time = new Date().toLocaleString()
const type = 'text'

View File

@ -250,7 +250,7 @@ export default class ClientList {
}
async 用户更新({ id, name, avatar }) {
const client = this.clientlist.find(client => client.id === id)
console.log(name, '更新了身份信息')
console.log('更新用户信息:', name)
document.getElementById(id).querySelector('span').textContent = name
document.getElementById(id).querySelector('img').src = avatar
}

View File

@ -174,7 +174,7 @@ clientList.setChannel('chat', {
return
}
if (data.type === 'list') {
console.log(client.name, `同步来 ${data.list.length} 条消息`, data.list)
console.log(client.name, `同步来 ${data.list.length} 条消息`)
await chat.合并消息列表(data.list)
return
}