Explorar el Código

修复群昵称头像显示异常的bug

xie.bx hace 3 años
padre
commit
3932c9f04b

+ 1 - 1
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
 

+ 3 - 2
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 {