diff --git a/im-uniapp/components/chat-item/chat-item.vue b/im-uniapp/components/chat-item/chat-item.vue index d697e87..2b7fc18 100644 --- a/im-uniapp/components/chat-item/chat-item.vue +++ b/im-uniapp/components/chat-item/chat-item.vue @@ -79,6 +79,9 @@ export default { return ""; }, isTextMessage() { + if (this.chat.messages.length == 0) { + return false; + } let idx = this.chat.messages.length - 1; let messageType = this.chat.messages[idx].type; return messageType == this.$enums.MESSAGE_TYPE.TEXT; diff --git a/im-uniapp/components/long-press-menu/long-press-menu.vue b/im-uniapp/components/long-press-menu/long-press-menu.vue index 8760ecd..22b7c8a 100644 --- a/im-uniapp/components/long-press-menu/long-press-menu.vue +++ b/im-uniapp/components/long-press-menu/long-press-menu.vue @@ -57,7 +57,7 @@ export default { } }) }, - onTouchMove() { + onTouchMove(e) { this.isTouchMove = true; let touches = e.touches[0]; // 屏幕拖动大于50px时,取消菜单 diff --git a/im-uniapp/pages/chat/chat-box.vue b/im-uniapp/pages/chat/chat-box.vue index be729e1..6f05b40 100644 --- a/im-uniapp/pages/chat/chat-box.vue +++ b/im-uniapp/pages/chat/chat-box.vue @@ -646,7 +646,9 @@ export default { // #endif // #ifdef H5 // 防止滚动条定格在顶部,不能一直往上滚,h5采用scroll-top定位 - this.holdingScrollBar(this.scrollViewHeight); + if (uni.getSystemInfoSync().platform == 'ios') { + this.holdingScrollBar(this.scrollViewHeight); + } // #endif // 多展示20条信息 this.showMinIdx = this.showMinIdx > 20 ? this.showMinIdx - 20 : 0;