zhy #254
@ -10,7 +10,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<u-empty text="暂无优惠券" mode="coupon" v-if="!couponList[index] || !couponList[index].length"></u-empty>
|
||||
<u-loadmore :status="loadStatus[current]" bgColor="#FFFFFF" font-size="14" margin-top="20" margin-bottom="20" @loadmore="onreachBottom"></u-loadmore>
|
||||
<u-loadmore :status="loadStatus[current]" bgColor="#FFFFFF" font-size="14" margin-top="20" margin-bottom="20" @loadmore="onreachBottom" v-if="!couponList[index] || couponList[index].length>=pageSize"></u-loadmore>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
@ -33,6 +33,7 @@ export default {
|
||||
swiperHeight: '',
|
||||
couponList: [],
|
||||
goodsClass: [],
|
||||
pageSize: 6,
|
||||
page: 0,
|
||||
timer: true,
|
||||
loadStatus: ['loadmore', 'loadmore', 'loadmore'],
|
||||
@ -65,11 +66,10 @@ export default {
|
||||
page: this.page,
|
||||
})
|
||||
this.timer = true;
|
||||
if(res.errCode == 0) {
|
||||
if(load == 'reload') this.couponList[this.current] = res.data;
|
||||
else if(load == 'loadmore') this.couponList[this.current].push(...res.data);
|
||||
}
|
||||
if(load == 'reload') this.couponList[this.current] = res.data;
|
||||
else if(load == 'loadmore') this.couponList[this.current].push(...res.data);
|
||||
this.$forceUpdate();
|
||||
// console.log(this.couponList);
|
||||
return res.data.length;
|
||||
},
|
||||
onreachBottom() {
|
||||
@ -87,7 +87,7 @@ export default {
|
||||
})
|
||||
},
|
||||
useCoupon(coupon) {
|
||||
console.log(coupon);
|
||||
// console.log(coupon);
|
||||
// if(coupon.type == 1) {
|
||||
// this.$u.route({
|
||||
// type: 'switchTab',
|
||||
|
Loading…
Reference in New Issue
Block a user