推荐商品刷新时机优化

h5
wangdong 7 months ago
parent 7a3be578cb
commit b4ac08ab9b
  1. 13
      pages/cart/index.vue
  2. 10
      pages/index/index.vue
  3. 12
      pages/user/index.vue

@ -277,6 +277,13 @@
setCartTabBadge()
}
},
onLoad() {
this.recommendPage = 1;
this.recommendFinish = false;
this.recommendLoadTitle = '';
this.goodsRecommend = [];
this.getSuggest()
},
/**
* 生命周期函数--监听页面显示
*/
@ -285,12 +292,6 @@
this.checkedIds = uni.getStorageSync(CartIdsIndex)
//
checkLogin() ? this.getCartList() : this.isLoading = false
this.recommendPage = 1;
this.recommendFinish = false;
this.recommendLoadTitle = '';
this.goodsRecommend = [];
this.getSuggest()
},
onReachBottom() {
if (!this.recommendFinish) {

@ -1188,6 +1188,11 @@
this.queryBannerList();
this.getStore();
this.getAuthorize();
this.recommendPage = 1;
this.recommendFinish = false;
this.recommendLoadTitle = '';
this.goodsRecommend = [];
this.getSuggest()
},
onShow() {
if (this.list[this.current].name === '广场') {
@ -1195,11 +1200,6 @@
}
this.getWxAppStyle();
this.isLogin = uni.getStorageSync("AccessToken") ? true : false
this.recommendPage = 1;
this.recommendFinish = false;
this.recommendLoadTitle = '';
this.goodsRecommend = [];
this.getSuggest()
},
onPageScroll(e) {
if (e.scrollTop <= 200) { // true

@ -695,6 +695,13 @@
recommendLoadTitle: ''
}
},
onLoad() {
this.recommendPage = 1;
this.recommendFinish = false;
this.recommendLoadTitle = '';
this.goodsRecommend = [];
this.getSuggest()
},
onShow(options) {
if (uni.getStorageSync("userInfo").user_id) {
this.isLogin = true
@ -710,11 +717,6 @@
recovery_order: {}
}
}
this.recommendPage = 1;
this.recommendFinish = false;
this.recommendLoadTitle = '';
this.goodsRecommend = [];
this.getSuggest()
},
onReachBottom() {
if (!this.recommendFinish) {

Loading…
Cancel
Save