Browse Source

fix: 群聊昵称异常的bug

master
xsx 11 months ago
parent
commit
ab3f4dca7d
  1. 3
      im-platform/src/main/java/com/bx/implatform/service/impl/FileServiceImpl.java
  2. 7
      im-uniapp/pages/chat/chat-box.vue
  3. 18
      im-web/src/components/chat/ChatBox.vue

3
im-platform/src/main/java/com/bx/implatform/service/FileServiceImpl.java → im-platform/src/main/java/com/bx/implatform/service/impl/FileServiceImpl.java

@ -1,4 +1,4 @@
package com.bx.implatform.service;
package com.bx.implatform.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -11,6 +11,7 @@ import com.bx.implatform.enums.FileType;
import com.bx.implatform.enums.ResultCode;
import com.bx.implatform.exception.GlobalException;
import com.bx.implatform.mapper.FileInfoMapper;
import com.bx.implatform.service.FileService;
import com.bx.implatform.session.SessionContext;
import com.bx.implatform.thirdparty.MinioService;
import com.bx.implatform.util.FileUtil;

7
im-uniapp/pages/chat/chat-box.vue

@ -763,7 +763,7 @@ export default {
},
listenKeyBoard() {
// #ifdef H5
if (navigator.platform == "Win32" || navigator.platform == "MacIntel") {
if (navigator.platform == "Win32") {
//
console.log("navigator.platform:", navigator.platform)
return;
@ -805,6 +805,11 @@ export default {
},
resizeListener() {
let keyboardHeight = this.initHeight - window.innerHeight;
// ios
if (window.visualViewport && uni.getSystemInfoSync().platform == 'ios') {
keyboardHeight = this.initHeight - window.visualViewport.height;
}
console.log("resizeListener:",window.visualViewport.height)
this.isShowKeyBoard = keyboardHeight > 150;
if (this.isShowKeyBoard) {
this.keyboardHeight = keyboardHeight;

18
im-web/src/components/chat/ChatBox.vue

@ -3,7 +3,7 @@
<el-container>
<el-header height="50px">
<span>{{ title }}</span>
<span title="群聊信息" v-show="this.chat.type == 'GROUP'" class="btn-side el-icon-more"
<span title="群聊信息" v-show="isGroup" class="btn-side el-icon-more"
@click="showSide = !showSide"></span>
</el-header>
<el-main style="padding: 0;">
@ -41,19 +41,19 @@
<i class="el-icon-wallet"></i>
</file-upload>
</div>
<div title="回执消息" v-show="chat.type == 'GROUP' && memberSize <= 500"
<div title="回执消息" v-show="isGroup && memberSize <= 500"
class="icon iconfont icon-receipt" :class="isReceipt ? 'chat-tool-active' : ''"
@click="onSwitchReceipt">
</div>
<div title="发送语音" class="el-icon-microphone" @click="showRecordBox()">
</div>
<div title="语音通话" v-show="chat.type == 'PRIVATE'" class="el-icon-phone-outline"
<div title="语音通话" v-show="isPrivate" class="el-icon-phone-outline"
@click="showPrivateVideo('voice')">
</div>
<div title="语音通话" v-show="chat.type == 'GROUP'" class="el-icon-phone-outline"
<div title="语音通话" v-show="isGroup" class="el-icon-phone-outline"
@click="onGroupVideo()">
</div>
<div title="视频通话" v-show="chat.type == 'PRIVATE'" class="el-icon-video-camera"
<div title="视频通话" v-show="isPrivate" class="el-icon-video-camera"
@click="showPrivateVideo('video')">
</div>
<div title="聊天记录" class="el-icon-chat-dot-round" @click="showHistoryBox()"></div>
@ -578,7 +578,7 @@ export default {
}
},
headImage(msgInfo) {
if (this.chat.type == 'GROUP') {
if (this.isGroup) {
let member = this.groupMembers.find((m) => m.userId == msgInfo.sendId);
return member ? member.headImage : "";
} else {
@ -689,6 +689,12 @@ export default {
},
memberSize() {
return this.groupMembers.filter(m => !m.quit).length;
},
isGroup() {
return this.chat.type == 'GROUP';
},
isPrivate() {
return this.chat.type == 'PRIVATE';
}
},
watch: {

Loading…
Cancel
Save