Commit eb8e1c43fab5f3628f66103afd0534489eabe295

Authored by zhiyangdu
1 parent 28985070

去除上拉加载限制

src/components/tabBox/tabBox.vue
... ... @@ -99,13 +99,15 @@
99 99 // 初始化的时选中关爱屋
100 100 if(this.tabbar&&this.tabbar[0]&&this.tabbar[0].ads){
101 101 this.tabbaromponents = this.tabbar[0]
102   - for (let i = 0; i < this.tabbar[0].ads.length; i++) {
103   - if (this.tabbar[0].ads[i].style==15) {
  102 + }
  103 + for (let i = 0; i < this.tabbar.length; i++) {
  104 + for (let j = 0; j < this.tabbar[i].ads.length; j++) {
  105 + if (this.tabbar[i].ads[j].style==15) {
104 106 // 获取爱心屋全部商品数据
105   - this.shopRecommendGoods(this.paging.commodity.page,this.tabbar[0].ads[i].shop_id)
  107 + this.shopRecommendGoods(this.paging.commodity.page,this.tabbar[i].shop_id)
106 108 }
107   - }
108   - }
  109 + }
  110 + }
109 111 },
110 112 methods: {
111 113 onChange(name, title) {
... ... @@ -211,14 +213,13 @@
211 213 */
212 214 loadCommodity() {
213 215 // 判断是“精品推荐”页才加载
214   - if (this.tabbaromponents.title === '全部商品' && this.tabbaromponents.shop_id) {
  216 + if (this.tabbaromponents.shop_id) {
215 217 // 设置“精品推荐”页码
216 218 this.$set(this.paging.commodity, "page", ++this.paging.commodity.page);
217 219 // 调用接口
218   - this.shopRecommendGoods(this.paging.commodity.page);
  220 + this.shopRecommendGoods(this.paging.commodity.page,this.tabbaromponents.shop_id);
219 221 }
220 222 },
221   -
222 223 }
223 224 }
224 225 </script>
... ...