|
@@ -345,7 +345,7 @@
|
|
|
uni.$off('refashHome')
|
|
|
uni.$off('refashProm')
|
|
|
},
|
|
|
- onShow() {
|
|
|
+ onHide() {
|
|
|
// 用户头像
|
|
|
this.avatarUrl = uni.getStorageSync('userPhoto');
|
|
|
// 重新刷新
|
|
@@ -398,7 +398,7 @@
|
|
|
// 获取扫描记录
|
|
|
this.getVinLog()
|
|
|
// 商品分类
|
|
|
- this.getGoodType()
|
|
|
+ this.getGoodType(flag)
|
|
|
// 获取推荐产品
|
|
|
this.getHotProductList(flag)
|
|
|
}
|
|
@@ -408,9 +408,7 @@
|
|
|
// 隐藏促销模块
|
|
|
this.hidePromoTab()
|
|
|
// 商品分类
|
|
|
- if(flag!=1){
|
|
|
- this.getGoodType()
|
|
|
- }
|
|
|
+ this.getGoodType(flag)
|
|
|
// 获取推荐产品
|
|
|
this.getHotProductList(flag)
|
|
|
}
|
|
@@ -471,14 +469,13 @@
|
|
|
if(this.hasShopiing){
|
|
|
// 隐藏tab 视频,显示tab购物车
|
|
|
this.showCatTab()
|
|
|
- if(flag!=1){
|
|
|
- // 商品分类
|
|
|
- this.getGoodType()
|
|
|
- }
|
|
|
+ // 商品分类
|
|
|
+ this.getGoodType(flag)
|
|
|
// 获取推荐产品
|
|
|
this.getHotProductList(flag)
|
|
|
}else{
|
|
|
// 没有商城
|
|
|
+ this.productList = []
|
|
|
// 隐藏tab 购物车,显示tab视频
|
|
|
this.showVideoTab()
|
|
|
// 滚动扫描记录
|
|
@@ -491,7 +488,7 @@
|
|
|
})
|
|
|
},
|
|
|
// 商品一级分类
|
|
|
- getGoodType(){
|
|
|
+ getGoodType(flag){
|
|
|
this.productTypeList = []
|
|
|
getShopCategory({categoryLevel: 1}).then(res => {
|
|
|
const list = res.data || []
|
|
@@ -530,7 +527,7 @@
|
|
|
this.productList.forEach(item => {
|
|
|
count += item.length
|
|
|
})
|
|
|
- this.hotProductpageSize = count
|
|
|
+ this.hotProductpageSize = count||10
|
|
|
}
|
|
|
this.getProductList(flag)
|
|
|
},
|