Commit 9a8becb7 by zhangcheng

调整首页

parent dd7c5b76
......@@ -73,7 +73,7 @@
</view>
</view>
</scroll-view>
<shopCar></shopCar>
<shopCar ref="shopbar"></shopCar>
<tabBar :selectedTabbar="selectedTabbar"></tabBar>
</view>
</view>
......@@ -126,7 +126,13 @@ import { $EventBus } from '@/utils/EventBus';
},
async onShow() {
console.log(1243)
// 获取首页菜单数据
let shopInfo = this.$store.getters.shopInfo;
if(shopInfo && shopInfo[0].id){
await this.getMenuList(shopInfo[0].id);
}else{
await this.getMenuList(6);
}
let _this = this;
uni.createSelectorQuery()
.select(".menu-banner")
......@@ -146,17 +152,13 @@ import { $EventBus } from '@/utils/EventBus';
}
this.getHeightList();
},
onHide() {
this.$refs.shopbar.showShopCar=false;
},
onLoad: async function (options) {
if(options.orderId){
this.orderId=options.orderId;
}
// 获取首页菜单数据
let shopInfo = this.$store.getters.shopInfo;
if(shopInfo && shopInfo[0].id){
await this.getMenuList(shopInfo[0].id);
}else{
await this.getMenuList(6);
}
$EventBus.$off('getMenuList')
$EventBus.$on('getMenuList',(data)=>{
this.shopInfo=data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment