From 92549b979e65a8c8843f1f5d74bbd1317e7f7f64 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Fri, 29 May 2026 14:23:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(promotion=20merch=20detail):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85=E9=A1=B5=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E9=94=99=E4=BD=8D=E9=97=AE=E9=A2=98=E5=B9=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=95=86=E5=93=81=E6=8F=8F=E8=BF=B0=E7=9C=81=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 添加商品描述文本的多行省略显示样式 2. 动态计算顶部header高度替代固定值,解决页面滚动错位问题 3. 监听merch数据变化重新计算头部高度 --- pages_promotion/merch/detail.vue | 35 +++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/pages_promotion/merch/detail.vue b/pages_promotion/merch/detail.vue index 2e2c183..c5c770f 100644 --- a/pages_promotion/merch/detail.vue +++ b/pages_promotion/merch/detail.vue @@ -23,6 +23,7 @@ + {{ merch.desc }} @@ -58,7 +59,7 @@ - + { + this.initHeaderHeight(); + }); + }, + deep: true + } + }, + methods: { + initHeaderHeight() { + setTimeout(() => { + const query = uni.createSelectorQuery().in(this); + query.select('.head-wrap').boundingClientRect(rect => { + if (rect) { + this.headerHeight = (rect.height / this.screenWidth) * 750; + } + }).exec(); + }, 100); + } + }, + mounted() { + this.initHeaderHeight(); + } };