fixing bug coupon
This commit is contained in:
parent
627cfc4aa0
commit
4e842b127c
@ -10,7 +10,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-empty text="暂无优惠券" mode="coupon" v-if="!couponList[index] || !couponList[index].length"></u-empty>
|
<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>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
@ -33,6 +33,7 @@ export default {
|
|||||||
swiperHeight: '',
|
swiperHeight: '',
|
||||||
couponList: [],
|
couponList: [],
|
||||||
goodsClass: [],
|
goodsClass: [],
|
||||||
|
pageSize: 6,
|
||||||
page: 0,
|
page: 0,
|
||||||
timer: true,
|
timer: true,
|
||||||
loadStatus: ['loadmore', 'loadmore', 'loadmore'],
|
loadStatus: ['loadmore', 'loadmore', 'loadmore'],
|
||||||
@ -65,11 +66,10 @@ export default {
|
|||||||
page: this.page,
|
page: this.page,
|
||||||
})
|
})
|
||||||
this.timer = true;
|
this.timer = true;
|
||||||
if(res.errCode == 0) {
|
if(load == 'reload') this.couponList[this.current] = res.data;
|
||||||
if(load == 'reload') this.couponList[this.current] = res.data;
|
else if(load == 'loadmore') this.couponList[this.current].push(...res.data);
|
||||||
else if(load == 'loadmore') this.couponList[this.current].push(...res.data);
|
|
||||||
}
|
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
|
// console.log(this.couponList);
|
||||||
return res.data.length;
|
return res.data.length;
|
||||||
},
|
},
|
||||||
onreachBottom() {
|
onreachBottom() {
|
||||||
@ -87,7 +87,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
useCoupon(coupon) {
|
useCoupon(coupon) {
|
||||||
console.log(coupon);
|
// console.log(coupon);
|
||||||
// if(coupon.type == 1) {
|
// if(coupon.type == 1) {
|
||||||
// this.$u.route({
|
// this.$u.route({
|
||||||
// type: 'switchTab',
|
// type: 'switchTab',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user