From 5feb7179dc8b55cf94900247c6035bf46e54e4bb Mon Sep 17 00:00:00 2001 From: xsx <825657193@qq.com> Date: Mon, 14 Apr 2025 00:35:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=91=E9=80=81=E5=9B=BE?= =?UTF-8?q?=E6=96=87=E3=80=81=E6=96=87=E4=BB=B6=E6=97=B6=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E5=AF=BC=E8=87=B4=E5=BC=82=E5=B8=B8=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- im-uniapp/pages/chat/chat-box.vue | 10 ++++--- im-uniapp/pages/common/user-info.vue | 21 ++++---------- im-uniapp/pages/mine/mine-edit.vue | 4 +-- im-uniapp/pages/mine/mine.vue | 35 ++++++++++------------- im-web/src/components/chat/ChatBox.vue | 14 +++++---- im-web/src/components/setting/Setting.vue | 2 +- 6 files changed, 38 insertions(+), 48 deletions(-) diff --git a/im-uniapp/pages/chat/chat-box.vue b/im-uniapp/pages/chat/chat-box.vue index d5d90eb..3626bf7 100644 --- a/im-uniapp/pages/chat/chat-box.vue +++ b/im-uniapp/pages/chat/chat-box.vue @@ -418,6 +418,7 @@ export default { this.moveChatToTop(); // 借助file对象保存 file.msgInfo = msgInfo; + file.chat = this.chat; // 滚到最低部 this.scrollToBottom(); return true; @@ -430,13 +431,13 @@ export default { msgInfo.loadStatus = 'ok'; msgInfo.id = m.id; this.isReceipt = false; - this.chatStore.insertMessage(msgInfo, this.chat); + this.chatStore.insertMessage(msgInfo, file.chat); }) }, onUploadImageFail(file, err) { let msgInfo = JSON.parse(JSON.stringify(file.msgInfo)); msgInfo.loadStatus = 'fail'; - this.chatStore.insertMessage(msgInfo, this.chat); + this.chatStore.insertMessage(msgInfo, file.chat); }, onUploadFileBefore(file) { // 检查是否被封禁 @@ -469,6 +470,7 @@ export default { this.moveChatToTop(); // 借助file对象保存 file.msgInfo = msgInfo; + file.chat = this.chat; // 滚到最低部 this.scrollToBottom(); return true; @@ -486,13 +488,13 @@ export default { msgInfo.loadStatus = 'ok'; msgInfo.id = m.id; this.isReceipt = false; - this.chatStore.insertMessage(msgInfo, this.chat); + this.chatStore.insertMessage(msgInfo, file.chat); }) }, onUploadFileFail(file, res) { let msgInfo = JSON.parse(JSON.stringify(file.msgInfo)); msgInfo.loadStatus = 'fail'; - this.chatStore.insertMessage(msgInfo, this.chat); + this.chatStore.insertMessage(msgInfo, file.chat); }, onDeleteMessage(msgInfo) { uni.showModal({ diff --git a/im-uniapp/pages/common/user-info.vue b/im-uniapp/pages/common/user-info.vue index 0db26a7..47e4ca7 100644 --- a/im-uniapp/pages/common/user-info.vue +++ b/im-uniapp/pages/common/user-info.vue @@ -8,28 +8,18 @@ - - {{ userInfo.nickName }} - + {{ userInfo.nickName }} - - 用户名: - - - {{ userInfo.userName }} - + 用户名: + {{ userInfo.userName }} - - 签名: - - - {{ userInfo.signature }} - + 签名: + {{ userInfo.signature }} @@ -183,6 +173,7 @@ export default { .content-text { font-size: $im-font-size-small; color: $im-text-color-light; + margin-left: 10rpx; } .info-primary { diff --git a/im-uniapp/pages/mine/mine-edit.vue b/im-uniapp/pages/mine/mine-edit.vue index c0d9517..164c92d 100644 --- a/im-uniapp/pages/mine/mine-edit.vue +++ b/im-uniapp/pages/mine/mine-edit.vue @@ -9,7 +9,7 @@ - 账号 + 用户名 {{userInfo.userName}} @@ -25,7 +25,7 @@ 个性签名 - diff --git a/im-uniapp/pages/mine/mine.vue b/im-uniapp/pages/mine/mine.vue index d6c2c2d..266e73a 100644 --- a/im-uniapp/pages/mine/mine.vue +++ b/im-uniapp/pages/mine/mine.vue @@ -6,31 +6,24 @@ - - {{ userInfo.userName }} + + {{ userInfo.nickName }} - - 昵称: - - - {{ userInfo.nickName }} - + 用户名: + {{ userInfo.userName }} - - 签名: - - - {{ userInfo.signature }} - + 签名: + {{ userInfo.signature }} + @@ -75,19 +68,18 @@ export default { return this.userStore.userInfo; } } - - }