Sfoglia il codice sorgente

发送优惠券列表获取修改

yuhao 1 anno fa
parent
commit
72c44465aa
1 ha cambiato i file con 7 aggiunte e 3 eliminazioni
  1. 7 3
      src/pages/coupon/index.vue

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

@@ -92,6 +92,7 @@ export default {
92 92
       coupon: "",
93 93
       couponNum: 1, //优惠券数量
94 94
       currentPage1: 1,
95
+      currentPage:1,
95 96
       total: 0,
96 97
       limit: 10,
97 98
       isCouponPop: false, //发送优惠券开关
@@ -166,12 +167,15 @@ export default {
166 167
     // 获取优惠券列表
167 168
     getCouponInfo() {
168 169
       let params = {
169
-        page: this.currentPage1,
170
-        limit: 100
170
+        page: this.currentPage,
171
+        limit: 200
171 172
       };
172 173
       api.getCouponInfo(params).then(res => {
173 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
     },