group buy 8.8
This commit is contained in:
@@ -4,10 +4,12 @@
|
||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
||||
<swiper-item class="swiper-item" v-for="(_, index) in list" :key="index">
|
||||
<scroll-view scroll-y class="scroll-coupon">
|
||||
<view class="coupon-item" v-for="(coupon, c_index) in couponList" :key="c_index">
|
||||
<Coupon :couponInfo="coupon" :status='index' :type="1" @use="useCoupon($event)" :goodsClass="goodsClass"></Coupon>
|
||||
<view v-if="couponList[index]">
|
||||
<view class="coupon-item" v-for="(coupon, c_index) in couponList[index]" :key="c_index">
|
||||
<Coupon :couponInfo="coupon" :status='index' :type="1" @use="useCoupon($event)" :goodsClass="goodsClass"></Coupon>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty text="暂无优惠券" mode="coupon" v-if="!couponList.length"></u-empty>
|
||||
<u-empty text="暂无优惠券" mode="coupon" v-if="!couponList[index] || !couponList[index].length"></u-empty>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
@@ -59,10 +61,11 @@ export default {
|
||||
status: current
|
||||
}).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.couponList = res.data;
|
||||
this.couponList[this.current] = res.data;
|
||||
} else {
|
||||
this.couponList = [];
|
||||
this.couponList[this.current] = [];
|
||||
}
|
||||
this.$forceUpdate();
|
||||
})
|
||||
},
|
||||
useCoupon(id) {
|
||||
|
||||
Reference in New Issue
Block a user