Commit 10abb83d by huyue

提交

1 parent fff150df
......@@ -261,7 +261,10 @@ export default {
1: 'unclaimed', // 未领取
2: 'claimed', // 已领取
3: 'expired' // 已过期
}
},
total: 0,
pageNum: 1,
pageSize: 8
}
},
props: {
......@@ -295,14 +298,22 @@ export default {
},
getGrantRecord(couponState) {
console.log('查询优惠券列表');
const { pageNum, pageSize } = this
const params = {
staffPhone: uni.$storage.get('userInfo').phone
staffPhone: uni.$storage.get('userInfo').phone,
pageNum,
pageSize
}
if (couponState) params.couponState = couponState
console.log(params, 'chaxun');
uni.$api.pointApi.getGrantRecord(params).then(res => {
console.log(res, '========================');
this.list = res.list
console.log(res, '========================', pageNum);
if(pageNum == 1) {
this.list = res.list
} else {
this.list = this.list.concat(res.list)
}
this.total = res.total
this.nothing = res.length ? true : false
})
this.statisticsCount()
......@@ -313,6 +324,7 @@ export default {
this.direction = ''
this.nothing = false
this.scrollTop = 1
this.pageNum = 1
setTimeout(() => {
this.scrollTop = 0
}, 100);
......@@ -375,6 +387,7 @@ export default {
this.couponDetailInfo = res
this.show = false
this.showCouponPon = true
this.pageNum = 1
this.getGrantRecord(this.firstIndex)
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!