Browse Source

!145 fix: 群聊昵称异常的bug

Merge pull request !145 from blue/v_3.0.0
master
blue 11 months ago
committed by Gitee
parent
commit
d46aeffe9b
No known key found for this signature in database GPG Key ID: 173E9B9CA92EEF8F
  1. 3
      im-platform/src/main/java/com/bx/implatform/service/impl/FileServiceImpl.java
  2. 7
      im-uniapp/pages/chat/chat-box.vue
  3. 4
      im-uniapp/pages/friend/friend.vue
  4. 4
      im-uniapp/uni_modules/uview-plus/components/u-index-list/u-index-list.vue
  5. 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;

4
im-uniapp/pages/friend/friend.vue

@ -119,8 +119,8 @@ export default {
}
:deep(.u-index-list__letter__item) {
width: 48rpx !important;
height: 48rpx !important;
width: 40rpx !important;
height: 40rpx !important;
}
:deep(.u-index-list__letter__item__index) {

4
im-uniapp/uni_modules/uview-plus/components/u-index-list/u-index-list.vue

@ -265,8 +265,8 @@
customNavHeight = sysData.windowTop
// #endif
// #ifndef H5
// H5windowHeight
customNavHeight = -(sysData.statusBarHeight + 44)
// H5windowHeight
customNavHeight = sysData.statusBarHeight
// #endif
} else {
customNavHeight = getPx(this.customNavHeight)

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