Commit 67762bd1 by 谢中龙

福利优惠券活动分页

parent 75499858
......@@ -272,10 +272,9 @@ wxService.page({
mask: true
});
let pageNum = this.data.coupons.pageNum,
pageSize = this.data.coupons.pageSize;
wxService.post(`/marketing/shoppingguide/coupon/page4c?pageSize=${pageSize}&pageNo=${pageNum}`,
{couponName: ''}
).then(res => {
pageSize = this.data.coupons.pageSize,
param = { couponName: ''};
wxService.post(`/marketing/shoppingguide/coupon/page4c?pageSize=${pageSize}&pageNo=${pageNum}`, param).then(res => {
if (res) {
//https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/coupon_bg.png 正常
//https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/coupon_bg_cantUse.png //不可使用
......@@ -290,7 +289,7 @@ wxService.page({
item.price = parseFloat(item.couponSetting.faceAmount / 100).toFixed(2);
item.couponType = item.couponSetting.type;
});
this.data.coupons.totalPage = Math.ceil(data.totalElements / this.data.coupons.pageSize);
this.data.coupons.list = this.data.coupons.list.concat(list);
if(this.data.coupons.list.length == 0){
this.data.coupons.noData = true;
......@@ -338,7 +337,10 @@ wxService.page({
}
else if (this.data.current == 3){ //优惠券福利
if (this.data.coupons.pageNum < this.data.coupons.totalPage){
this.data.coupons.pageNum ++ ;
this.getCouponActivityList();
}
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment