Commit 10abb83d by huyue

提交

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