From de0cfa0b5aebc7b603070ddfb2136b13a35e7d23 Mon Sep 17 00:00:00 2001 From: xsx <825657193@qq.com> Date: Mon, 1 Dec 2025 00:11:42 +0800 Subject: [PATCH] =?UTF-8?q?ios=E9=94=AE=E7=9B=98=E9=AB=98=E5=BA=A6?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- im-uniapp/manifest.json | 4 ++-- im-uniapp/pages/chat/chat-box.vue | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/im-uniapp/manifest.json b/im-uniapp/manifest.json index ff617c0..213d246 100644 --- a/im-uniapp/manifest.json +++ b/im-uniapp/manifest.json @@ -2,8 +2,8 @@ "name" : "盒子IM", "appid" : "__UNI__69DD57A", "description" : "", - "versionName" : "3.4.0", - "versionCode" : 3400, + "versionName" : "3.10.0", + "versionCode" : 31000, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/im-uniapp/pages/chat/chat-box.vue b/im-uniapp/pages/chat/chat-box.vue index ff3b7e7..8a9ac3d 100644 --- a/im-uniapp/pages/chat/chat-box.vue +++ b/im-uniapp/pages/chat/chat-box.vue @@ -848,12 +848,6 @@ export default { h -= 50; // 减去键盘高度 if (this.isShowKeyBoard || this.chatTabBox != 'none') { - // ios app的键盘高度不准,需要减去屏幕和窗口差 - // #ifdef APP-PLUS - if (sysInfo.platform == 'ios') { - h += this.screenHeight - this.windowHeight; - } - // #endif h -= this.keyboardHeight; this.scrollToBottom(); } @@ -922,6 +916,13 @@ export default { this.isShowKeyBoard = res.height > 0; if (this.isShowKeyBoard) { this.keyboardHeight = res.height; // 获取并保存键盘高度 + // #ifdef APP-PLUS + // ios app的键盘高度不准,需要减去屏幕和窗口差 + let sysInfo = uni.getSystemInfoSync(); + if (sysInfo.platform == 'ios') { + this.keyboardHeight -= this.screenHeight - this.windowHeight; + } + // #endif } setTimeout(() => this.reCalChatMainHeight(), 30); },