From fa83f8f41ed7ce2c700c3761d0e4a5eafbe4490d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Tue, 24 Mar 2026 21:04:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?JLBA202505130001=5F=E5=85=B3=E4=BA=8E?= =?UTF-8?q?=E5=90=89=E6=9E=97=E9=93=B6=E8=A1=8C=E6=96=B0=E5=BB=BAAI?= =?UTF-8?q?=E6=99=BA=E8=83=BD=E5=9F=B9=E8=AE=AD=E7=B3=BB=E7=BB=9F=E7=9A=84?= =?UTF-8?q?=E9=9C=80=E6=B1=82=5Ffix=EF=BC=9A=20pdf=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/preview.vue | 8 ++++++-- src/static/view-pdf/pdf.html | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pages/index/preview.vue b/src/pages/index/preview.vue index 94ed0383..2a5c0f2d 100644 --- a/src/pages/index/preview.vue +++ b/src/pages/index/preview.vue @@ -10,7 +10,7 @@ :fullscreen="true" :webview-styles="{ width: '100%', - height: '100%' + height: windowHeight }"> @@ -32,7 +32,8 @@ export default { viewerUrl: '/static/view-pdf/pdf.html', showView: true, wv: null, - userParams: '' + userParams: '', + windowHeight: '100%' } }, onLoad(params) { @@ -42,6 +43,9 @@ export default { } const userInfo = getUserInfo(); this.userParams = '/' + (userInfo?.loginName??'') + '?tk=' + getToken() + const windowInfo = uni.getWindowInfo() + console.log(windowInfo.screenHeight) + this.windowHeight = windowInfo.screenHeight - 100 + 'px' }, onShow() { if (getPhoneEnvBool('AND')) { diff --git a/src/static/view-pdf/pdf.html b/src/static/view-pdf/pdf.html index c34e2b08..8e250935 100644 --- a/src/static/view-pdf/pdf.html +++ b/src/static/view-pdf/pdf.html @@ -20,9 +20,9 @@ height: 100%; } - body { + /* body { padding-bottom: 100px; - } + } */ .operate { position: fixed; From 1ff072ba32ff369a38684e978fda80ec9f9909c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Tue, 24 Mar 2026 21:37:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix":=20=E6=B5=8B=E8=AF=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/preview.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/pages/index/preview.vue b/src/pages/index/preview.vue index 2a5c0f2d..b622e637 100644 --- a/src/pages/index/preview.vue +++ b/src/pages/index/preview.vue @@ -22,6 +22,7 @@ import { getToken, getPhoneEnvBool, getUserInfo } from '@/common/common' import { downloadFile } from '@/api/common.js' import { get_base_url } from '@/api/request.js' var wv +var windowInfo = uni.getWindowInfo() export default { data() { return { @@ -33,7 +34,8 @@ export default { showView: true, wv: null, userParams: '', - windowHeight: '100%' + windowHeight: '100%', + topHeight: 100 } }, onLoad(params) { @@ -43,9 +45,9 @@ export default { } const userInfo = getUserInfo(); this.userParams = '/' + (userInfo?.loginName??'') + '?tk=' + getToken() - const windowInfo = uni.getWindowInfo() console.log(windowInfo.screenHeight) - this.windowHeight = windowInfo.screenHeight - 100 + 'px' + this.topHeight = windowInfo.statusBarHeight + 45 + this.windowHeight = windowInfo.screenHeight - this.topHeight + 'px' }, onShow() { if (getPhoneEnvBool('AND')) { @@ -75,10 +77,11 @@ export default { methods: { setHeight(res){ //#ifdef APP-PLUS - if(!wv) return + if(!wv) return wv.setStyle({ top: res.height + 40 }) + this.windowHeight = windowInfo.screenHeight - this.topHeight + 'px' // #endif }, backRouter() {