From da2c1ef8c8f6fcd927d243153c9fce6952782112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A7=89?= Date: Sat, 21 Oct 2023 19:31:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=AD=A3=E7=A1=AE=E7=9A=84?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chat.js | 2 +- src/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chat.js b/src/chat.js index 0aaf93d..6ac6e4a 100644 --- a/src/chat.js +++ b/src/chat.js @@ -215,7 +215,7 @@ export default class Chat { await set(data.id, data, this.store) } 发送消息(text) { - const name = '我' + const name = localStorage.getItem('username') const id = window.crypto.randomUUID() const time = new Date().toLocaleString() const type = 'text' diff --git a/src/main.js b/src/main.js index 12c7d38..3631f5c 100644 --- a/src/main.js +++ b/src/main.js @@ -174,7 +174,7 @@ clientList.setChannel('chat', { return } if (data.type === 'list') { - console.log(client.name, `同步来 ${data.list.length} 条消息`) + console.log(client.name, `同步来 ${data.list.length} 条消息`, data.list) await chat.合并消息列表(data.list) return }