From c0e64437f0025114d4e497a91f41af6d8bbb4cbc Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Tue, 16 Jun 2026 14:29:09 +0800 Subject: [PATCH] =?UTF-8?q?refactor(promotion=20pages):=20=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E5=88=86=E9=94=80=E5=92=8C=E5=95=86=E5=93=81=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E9=A1=B5=E7=9A=84=E5=BA=95=E9=83=A8=E9=80=82=E9=85=8D?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 重构了全局配置里的底部边距计算方式,替换原有tabBarPaddingStyleValue为tabBarPagePaddingStyle,同时调整了tabBarHeight的取值逻辑,适配是否显示tabBar的场景,移除冗余的计算属性 --- common/js/golbalConfig.js | 10 +++------- pages_promotion/fenxiao/index.vue | 2 +- pages_promotion/merch/merchcategory.vue | 10 +--------- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/common/js/golbalConfig.js b/common/js/golbalConfig.js index d93018c..a74d5ab 100644 --- a/common/js/golbalConfig.js +++ b/common/js/golbalConfig.js @@ -65,14 +65,10 @@ export default { }, tabBarPagePaddingStyle() { return this.$util.objToStyle({ - paddingBottom: this.shouldShowTabBar ? '112rpx' : '0' + height: `calc(100vh - ${this.tabBarHeight})`, + paddingBottom: this.tabBarHeight }); }, - tabBarPaddingStyleValue() { - return { - paddingBottom: this.shouldShowTabBar ? '112rpx' : '0' - }; - }, siteInfo() { return this.$store.state.siteInfo; }, @@ -132,7 +128,7 @@ export default { return this.$store.state.diySeckillInterval; }, tabBarHeight() { - return this.$store.state.tabBarHeight; + return this.shouldShowTabBar ? this.$store.state.tabBarHeight : '0rpx'; }, mapConfig() { return this.$store.state.mapConfig; diff --git a/pages_promotion/fenxiao/index.vue b/pages_promotion/fenxiao/index.vue index 5d895b7..8381b7f 100644 --- a/pages_promotion/fenxiao/index.vue +++ b/pages_promotion/fenxiao/index.vue @@ -581,7 +581,7 @@ export default { }, fenxiaoIndexPageStyle() { const style = { - ...this.tabBarPaddingStyleValue + ...this.tabBarPagePaddingStyle }; if (this.$util && this.$util.img) { style.background = 'url(' + this.$util.img('public/uniapp/fenxiao/index/commissionFission-background.png') + ')'; diff --git a/pages_promotion/merch/merchcategory.vue b/pages_promotion/merch/merchcategory.vue index 7fcad86..db0de4c 100644 --- a/pages_promotion/merch/merchcategory.vue +++ b/pages_promotion/merch/merchcategory.vue @@ -1,6 +1,6 @@