Browse Source

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

master
xie.bx 3 years ago
parent
commit
3932c9f04b
  1. 2
      im-platform/src/main/resources/application.yml
  2. 5
      im-ui/src/components/chat/ChatBox.vue

2
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

5
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 {

Loading…
Cancel
Save