From b3f53cd43773bf74b8286ee2cd504e7606d79d12 Mon Sep 17 00:00:00 2001 From: iven Date: Fri, 22 May 2026 20:06:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(mp):=20=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E5=BA=95=E9=83=A8=E6=93=8D=E4=BD=9C=E6=A0=8F=20fixed?= =?UTF-8?q?=20=E5=9B=BA=E5=AE=9A=E5=AE=9A=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - footer 改为 position: fixed 固定在视口底部,不随页面滚动 - 内容区添加 padding-bottom 留出 footer 高度 + 安全区域 - 移除不可靠的 flex + overflow 方案 --- .../src/pages/pkg-mall/product/index.scss | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/apps/miniprogram/src/pages/pkg-mall/product/index.scss b/apps/miniprogram/src/pages/pkg-mall/product/index.scss index 369da76..f92fee7 100644 --- a/apps/miniprogram/src/pages/pkg-mall/product/index.scss +++ b/apps/miniprogram/src/pages/pkg-mall/product/index.scss @@ -5,9 +5,6 @@ .product-detail { background: $bg; - display: flex; - flex-direction: column; - height: 100%; &__loading, &__empty { @include flex-center; @@ -32,9 +29,7 @@ } &__scroll { - flex: 1; - overflow-y: auto; - -webkit-overflow-scrolling: touch; + padding-bottom: calc(70px + env(safe-area-inset-bottom)); } // 商品大图 @@ -171,9 +166,12 @@ line-height: 1.6; } - // 底部操作栏 + // 底部操作栏 — fixed 固定在视口底部 &__footer { - flex-shrink: 0; + position: fixed; + bottom: 0; + left: 0; + right: 0; background: $card; border-top: 1px solid $bd; padding: $sp-sm $sp-section;