fix(浮动导航): 只能在create生命周期中初始化必要信息
This commit is contained in:
@@ -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',
|
||||||
@@ -81,7 +80,7 @@ export default {
|
|||||||
// 从店铺信息中获取是否启用语言切换
|
// 从店铺信息中获取是否启用语言切换
|
||||||
this.isLanguageSwitchEnabled = e.data.ischina;
|
this.isLanguageSwitchEnabled = e.data.ischina;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
currentLangDisplayName() {
|
currentLangDisplayName() {
|
||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user