Commit 4c62134bcce5f6308c67760ccdc5005f141ccbb5
1 parent
996a1d02
切换标签时重新加载Bug处理~
Showing
1 changed file
with
5 additions
and
8 deletions
src/pages/discountList/discountList.vue
| @@ -267,11 +267,11 @@ | @@ -267,11 +267,11 @@ | ||
| 267 | this.initDiscount(); | 267 | this.initDiscount(); |
| 268 | 268 | ||
| 269 | // 根据参数判断请求哪个接口,获取哪个列表 | 269 | // 根据参数判断请求哪个接口,获取哪个列表 |
| 270 | - if (this.tabs.list[this.tabs.active].type == '1') { | 270 | + if (this.tabs.list[this.tabs.active].type == '1' && (!this.tabs.list[this.tabs.active].page || this.tabs.list[this.tabs.active].page == 1)) { |
| 271 | 271 | ||
| 272 | - // 获取店铺首页推荐商品列表 | ||
| 273 | - this.getShopRecommendGoods(this.CALL_STATUS.INIT); | ||
| 274 | - } else { | 272 | + // 获取店铺首页推荐商品列表 |
| 273 | + this.getShopRecommendGoods(this.CALL_STATUS.INIT); | ||
| 274 | + } else if (this.tabs.list[this.tabs.active].type == '0') { | ||
| 275 | 275 | ||
| 276 | // 折扣专区列表 | 276 | // 折扣专区列表 |
| 277 | this.discountGoods(); | 277 | this.discountGoods(); |
| @@ -428,7 +428,7 @@ | @@ -428,7 +428,7 @@ | ||
| 428 | if (res.code == 200) { | 428 | if (res.code == 200) { |
| 429 | 429 | ||
| 430 | // 解构数据 | 430 | // 解构数据 |
| 431 | - let {data: datas} = res; | 431 | + let {data: datas} = res; |
| 432 | 432 | ||
| 433 | // 判断如果有数据 | 433 | // 判断如果有数据 |
| 434 | if (datas.list && datas.list.length) { | 434 | if (datas.list && datas.list.length) { |
| @@ -645,9 +645,6 @@ | @@ -645,9 +645,6 @@ | ||
| 645 | // 只有折扣专区的刷新页面 | 645 | // 只有折扣专区的刷新页面 |
| 646 | if (this.tabs.list[this.tabs.active].type == '0') { | 646 | if (this.tabs.list[this.tabs.active].type == '0') { |
| 647 | 647 | ||
| 648 | - | ||
| 649 | - console.log(this.tabs.list[this.tabs.active].type); | ||
| 650 | - | ||
| 651 | // 请求接口封装 | 648 | // 请求接口封装 |
| 652 | this.request(this.tabs.active); | 649 | this.request(this.tabs.active); |
| 653 | } | 650 | } |