fix(浮动导航): 只能在create生命周期中初始化必要信息

This commit is contained in:
2025-12-31 17:29:08 +08:00
parent 3acd3870b6
commit 94c9d1c556

View File

@@ -66,9 +66,8 @@ export default {
this.kefuimg = this.$util.getDefaultImage().kefu this.kefuimg = this.$util.getDefaultImage().kefu
this.phoneimg = this.$util.getDefaultImage().phone this.phoneimg = this.$util.getDefaultImage().phone
},
onShow() {
this.pageCount = getCurrentPages().length; this.pageCount = getCurrentPages().length;
// 从店铺信息中获取相关信息 // 从店铺信息中获取相关信息
uni.getStorage({ uni.getStorage({
key: 'shopInfo', key: 'shopInfo',
@@ -203,6 +202,7 @@ export default {
margin: 14rpx 0; margin: 14rpx 0;
transition: 0.1s; transition: 0.1s;
background: #c6251b; background: #c6251b;
// background: var(--hover-nav-bg-color);
color: #fff; color: #fff;
border-radius: 40rpx; border-radius: 40rpx;
width: 80rpx; width: 80rpx;