From 3932c9f04b2c7e45b28112725cbc214d57e9e089 Mon Sep 17 00:00:00 2001 From: "xie.bx" Date: Sat, 12 Nov 2022 21:36:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BE=A4=E6=98=B5=E7=A7=B0?= =?UTF-8?q?=E5=A4=B4=E5=83=8F=E6=98=BE=E7=A4=BA=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-platform/src/main/resources/application.yml | 2 +- im-ui/src/components/chat/ChatBox.vue | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/im-platform/src/main/resources/application.yml b/im-platform/src/main/resources/application.yml index 7237f51..bb22378 100644 --- a/im-platform/src/main/resources/application.yml +++ b/im-platform/src/main/resources/application.yml @@ -5,7 +5,7 @@ server: spring: datasource: driver-class-name: com.mysql.jdbc.Driver - url: jdbc:mysql://localhost:3306/box-im?useSSL=false&useUnicode=true&characterEncoding=utf-8 + url: jdbc:mysql://localhost:3306/box-im?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true username: root password: root diff --git a/im-ui/src/components/chat/ChatBox.vue b/im-ui/src/components/chat/ChatBox.vue index 477c900..bc5ffde 100644 --- a/im-ui/src/components/chat/ChatBox.vue +++ b/im-ui/src/components/chat/ChatBox.vue @@ -328,8 +328,9 @@ }) }, showName(msgInfo) { - if (this.chat.type == 'Group') { + if (this.chat.type == 'GROUP') { let member = this.groupMembers.find((m) => m.userId == msgInfo.sendId); + console.log(member.aliasName) return member ? member.aliasName : ""; } else { return msgInfo.sendId == this.mine.id ? this.mine.nickName : this.chat.showName @@ -337,7 +338,7 @@ }, headImage(msgInfo) { - if (this.chat.type == 'Group') { + if (this.chat.type == 'GROUP') { let member = this.groupMembers.find((m) => m.userId == msgInfo.sendId); return member ? member.headImage : ""; } else {