Commit 67762bd1 by 谢中龙

福利优惠券活动分页

parent 75499858
...@@ -272,10 +272,9 @@ wxService.page({ ...@@ -272,10 +272,9 @@ wxService.page({
mask: true mask: true
}); });
let pageNum = this.data.coupons.pageNum, let pageNum = this.data.coupons.pageNum,
pageSize = this.data.coupons.pageSize; pageSize = this.data.coupons.pageSize,
wxService.post(`/marketing/shoppingguide/coupon/page4c?pageSize=${pageSize}&pageNo=${pageNum}`, param = { couponName: ''};
{couponName: ''} wxService.post(`/marketing/shoppingguide/coupon/page4c?pageSize=${pageSize}&pageNo=${pageNum}`, param).then(res => {
).then(res => {
if (res) { if (res) {
//https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/coupon_bg.png 正常 //https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/coupon_bg.png 正常
//https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/coupon_bg_cantUse.png //不可使用 //https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/coupon_bg_cantUse.png //不可使用
...@@ -290,7 +289,7 @@ wxService.page({ ...@@ -290,7 +289,7 @@ wxService.page({
item.price = parseFloat(item.couponSetting.faceAmount / 100).toFixed(2); item.price = parseFloat(item.couponSetting.faceAmount / 100).toFixed(2);
item.couponType = item.couponSetting.type; 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); this.data.coupons.list = this.data.coupons.list.concat(list);
if(this.data.coupons.list.length == 0){ if(this.data.coupons.list.length == 0){
this.data.coupons.noData = true; this.data.coupons.noData = true;
...@@ -338,7 +337,10 @@ wxService.page({ ...@@ -338,7 +337,10 @@ wxService.page({
} }
else if (this.data.current == 3){ //优惠券福利 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