Browse Source

发送优惠券列表获取修改

yuhao 1 year ago
parent
commit
72c44465aa
1 changed files with 7 additions and 3 deletions
  1. 7 3
      src/pages/coupon/index.vue

+ 7 - 3
src/pages/coupon/index.vue

@@ -92,6 +92,7 @@ export default {
92
       coupon: "",
92
       coupon: "",
93
       couponNum: 1, //优惠券数量
93
       couponNum: 1, //优惠券数量
94
       currentPage1: 1,
94
       currentPage1: 1,
95
+      currentPage:1,
95
       total: 0,
96
       total: 0,
96
       limit: 10,
97
       limit: 10,
97
       isCouponPop: false, //发送优惠券开关
98
       isCouponPop: false, //发送优惠券开关
@@ -166,12 +167,15 @@ export default {
166
     // 获取优惠券列表
167
     // 获取优惠券列表
167
     getCouponInfo() {
168
     getCouponInfo() {
168
       let params = {
169
       let params = {
169
-        page: this.currentPage1,
170
-        limit: 100
170
+        page: this.currentPage,
171
+        limit: 200
171
       };
172
       };
172
       api.getCouponInfo(params).then(res => {
173
       api.getCouponInfo(params).then(res => {
173
         if (res.code == 200) {
174
         if (res.code == 200) {
174
-          this.couponList = res.data.list;
175
+          this.couponList.push(...res.data.list);
176
+          if(this.couponList.length<res.data.total){
177
+            this.getCouponInfo(++this.currentPage)
178
+          }
175
         }
179
         }
176
       });
180
       });
177
     },
181
     },