Commit 2e314445d4f6e6dadd63532e7c035764330dcb89
1 parent
4c62134b
优选库——优选——折扣专区,“平台补贴会场”添加已结束状态判断和显示,目前结束后不能跳转详情页面~
Showing
2 changed files
with
9 additions
and
2 deletions
src/components/goodsItem_8/goodsItem_8.vue
| @@ -26,6 +26,7 @@ | @@ -26,6 +26,7 @@ | ||
| 26 | </div> | 26 | </div> |
| 27 | <div class="icon-box" @click.stop.prevent="primary(item)"> | 27 | <div class="icon-box" @click.stop.prevent="primary(item)"> |
| 28 | <img src="static/img/icon_list_arrow_right.png" class="icon-img" v-if="sty == 2" /> | 28 | <img src="static/img/icon_list_arrow_right.png" class="icon-img" v-if="sty == 2" /> |
| 29 | + <div class="btn btn-disabled" v-else-if="sty == '1' && discountType == '2'">已结束</div> | ||
| 29 | <div class="btn btn-disabled" v-else-if="sty == '1' && (item.num == '2' || (item.num == '1' && item.stock == '0'))">已抢光</div> | 30 | <div class="btn btn-disabled" v-else-if="sty == '1' && (item.num == '2' || (item.num == '1' && item.stock == '0'))">已抢光</div> |
| 30 | <img src="static/img/icon_shopping_cart_active.png" class="icon-img" v-else /> | 31 | <img src="static/img/icon_shopping_cart_active.png" class="icon-img" v-else /> |
| 31 | 32 | ||
| @@ -45,7 +46,7 @@ | @@ -45,7 +46,7 @@ | ||
| 45 | 46 | ||
| 46 | } | 47 | } |
| 47 | }, | 48 | }, |
| 48 | - props: ["item", "sty"], | 49 | + props: ["item", "sty", "discountType"], |
| 49 | computed: { | 50 | computed: { |
| 50 | 51 | ||
| 51 | /** | 52 | /** |
src/pages/discountList/discountList.vue
| @@ -65,7 +65,8 @@ | @@ -65,7 +65,8 @@ | ||
| 65 | <!-- 商品列表 --> | 65 | <!-- 商品列表 --> |
| 66 | <goods-item-8 v-for="(item, index) in lists[tabs.active]" :key="index" @jump="toDetail" @primary="primary" | 66 | <goods-item-8 v-for="(item, index) in lists[tabs.active]" :key="index" @jump="toDetail" @primary="primary" |
| 67 | :item="item" | 67 | :item="item" |
| 68 | - sty="1"> | 68 | + sty="1" |
| 69 | + :discountType="tabs.list[tabs.active].discountType"> | ||
| 69 | 70 | ||
| 70 | <!-- 折扣角标 --> | 71 | <!-- 折扣角标 --> |
| 71 | <div class="discount-flag" slot="flag" v-if="tabs.list[tabs.active].type == '0' && (parseFloat(item.price) < parseFloat(item.prices))"> | 72 | <div class="discount-flag" slot="flag" v-if="tabs.list[tabs.active].type == '0' && (parseFloat(item.price) < parseFloat(item.prices))"> |
| @@ -492,6 +493,11 @@ | @@ -492,6 +493,11 @@ | ||
| 492 | return false; | 493 | return false; |
| 493 | } | 494 | } |
| 494 | 495 | ||
| 496 | + // 已结束,不跳转 | ||
| 497 | + if (this.tabs.list[this.tabs.active].type == '0' && this.tabs.list[this.tabs.active].discountType == '2') { | ||
| 498 | + return false; | ||
| 499 | + } | ||
| 500 | + | ||
| 495 | // 已抢光,不跳转 | 501 | // 已抢光,不跳转 |
| 496 | if (this.tabs.list[this.tabs.active].type == '0' && (item.num == '2' || (item.num == '1' && item.stock == '0'))) { | 502 | if (this.tabs.list[this.tabs.active].type == '0' && (item.num == '2' || (item.num == '1' && item.stock == '0'))) { |
| 497 | return false; | 503 | return false; |