|
@@ -10,7 +10,7 @@
|
|
|
<couponTpl :list="couponList"></couponTpl>
|
|
|
<u-empty :text="noDataText" img-width="120" v-if="couponList.length==0 && status!='loading'" mode="list"></u-empty>
|
|
|
<view style="padding: 20upx;">
|
|
|
- <u-loadmore v-if="total>pageSize || status=='loading'" :status="status" />
|
|
|
+ <u-loadmore v-if="count>pageSize || status=='loading'" :status="status" />
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</swiper-item>
|
|
@@ -55,7 +55,6 @@
|
|
|
pageInit () {
|
|
|
this.current = 0 // tabs组件的current值,表示当前活动的tab选项
|
|
|
this.swiperCurrent = 0
|
|
|
- this.count = 0
|
|
|
this.couponList = []
|
|
|
this.pageNo = 1
|
|
|
this.status = 'loading'
|
|
@@ -65,8 +64,6 @@
|
|
|
tabsChange(index) {
|
|
|
this.swiperCurrent = index;
|
|
|
this.couponList = []
|
|
|
- this.count = 0
|
|
|
- this.pageNo = 1
|
|
|
this.status = 'loading'
|
|
|
},
|
|
|
// swiper-item左右移动,通知tabs的滑块跟随移动
|
|
@@ -77,8 +74,6 @@
|
|
|
swiperChange(event){
|
|
|
console.log(event.detail)
|
|
|
this.couponList = []
|
|
|
- this.count = 0
|
|
|
- this.pageNo = 1
|
|
|
this.status = 'loading'
|
|
|
},
|
|
|
// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
|
|
@@ -88,10 +83,13 @@
|
|
|
this.$refs.uTabs.setFinishCurrent(current);
|
|
|
this.swiperCurrent = current;
|
|
|
this.current = current;
|
|
|
- this.getList()
|
|
|
+ this.getList(1)
|
|
|
},
|
|
|
// 获取优惠卷列表
|
|
|
- getList(){
|
|
|
+ getList(num){
|
|
|
+ if(num) {
|
|
|
+ this.pageNo = num
|
|
|
+ }
|
|
|
let item = this.tabsList[this.swiperCurrent]
|
|
|
let params = {
|
|
|
pageNo: this.pageNo,
|