fix(浮动导航): 只能在create生命周期中初始化必要信息
This commit is contained in:
@@ -66,9 +66,8 @@ export default {
|
||||
|
||||
this.kefuimg = this.$util.getDefaultImage().kefu
|
||||
this.phoneimg = this.$util.getDefaultImage().phone
|
||||
},
|
||||
onShow() {
|
||||
this.pageCount = getCurrentPages().length;
|
||||
|
||||
// 从店铺信息中获取相关信息
|
||||
uni.getStorage({
|
||||
key: 'shopInfo',
|
||||
@@ -81,7 +80,7 @@ export default {
|
||||
// 从店铺信息中获取是否启用语言切换
|
||||
this.isLanguageSwitchEnabled = e.data.ischina;
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
computed: {
|
||||
currentLangDisplayName() {
|
||||
@@ -203,6 +202,7 @@ export default {
|
||||
margin: 14rpx 0;
|
||||
transition: 0.1s;
|
||||
background: #c6251b;
|
||||
// background: var(--hover-nav-bg-color);
|
||||
color: #fff;
|
||||
border-radius: 40rpx;
|
||||
width: 80rpx;
|
||||
|
||||
Reference in New Issue
Block a user