Commit 3c59bbbb140a58aa080cf152ca215afa5b099260
1 parent
4b4a5255
全部商品数据绑定
Showing
1 changed file
with
7 additions
and
8 deletions
src/components/tabBox/tabBox.vue
| ... | ... | @@ -89,7 +89,7 @@ |
| 89 | 89 | return item.title === title |
| 90 | 90 | }); |
| 91 | 91 | if(title==='全部商品'){ |
| 92 | - // 店铺商品推荐 | |
| 92 | + // 爱心屋项目全部商品 | |
| 93 | 93 | this.shopRecommendGoods(this.paging.commodity.page); |
| 94 | 94 | } |
| 95 | 95 | |
| ... | ... | @@ -123,13 +123,12 @@ |
| 123 | 123 | this.toDetail(item); |
| 124 | 124 | }, |
| 125 | 125 | /** |
| 126 | - * 店铺商品推荐 | |
| 126 | + * 爱心屋项目全部商品 | |
| 127 | 127 | * @param {int} page [页码] |
| 128 | 128 | */ |
| 129 | 129 | shopRecommendGoods(page) { |
| 130 | - console.log(this.tabbaromponents) | |
| 131 | 130 | // 判断必要参数 |
| 132 | - if (this.tabbaromponents.ads[0].id) { | |
| 131 | + if (this.tabbaromponents.shop_id) { | |
| 133 | 132 | |
| 134 | 133 | // 加载中 |
| 135 | 134 | this.$set(this.paging.commodity, "loading", true); |
| ... | ... | @@ -139,7 +138,7 @@ |
| 139 | 138 | |
| 140 | 139 | // 请求接口 |
| 141 | 140 | this.http("/Api/" + (this.getApiVersion().index) + "/shopGoodsList", { |
| 142 | - shop_id: this.tabbaromponents.ads[0].id, | |
| 141 | + shop_id: this.tabbaromponents.shop_id, | |
| 143 | 142 | page: page |
| 144 | 143 | }, this.shopRecommendGoodsCallback, { |
| 145 | 144 | method: "POST" |
| ... | ... | @@ -148,7 +147,7 @@ |
| 148 | 147 | }, |
| 149 | 148 | |
| 150 | 149 | /** |
| 151 | - * 店铺商品推荐回调 | |
| 150 | + * 爱心屋项目全部商品回调 | |
| 152 | 151 | * @param {object} res [服务器返回数据] |
| 153 | 152 | * @param {object} ext [扩展参数] |
| 154 | 153 | */ |
| ... | ... | @@ -192,12 +191,12 @@ |
| 192 | 191 | }, |
| 193 | 192 | |
| 194 | 193 | /** |
| 195 | - * 上拉加载“商品推荐” | |
| 194 | + * 上拉加载“爱心屋项目全部商品” | |
| 196 | 195 | */ |
| 197 | 196 | loadCommodity() { |
| 198 | 197 | |
| 199 | 198 | // 判断是“精品推荐”页才加载 |
| 200 | - if (this.activeTabIndex === 2 && this.shopId) { | |
| 199 | + if (this.tabbaromponents.title === '全部商品' && this.tabbaromponents.shop_id) { | |
| 201 | 200 | |
| 202 | 201 | // 设置“精品推荐”页码 |
| 203 | 202 | this.$set(this.paging.commodity, "page", ++this.paging.commodity.page); | ... | ... |