lihongxiao 1 жил өмнө
parent
commit
7676845e4a

+ 2 - 2
common/service/config.service.js

@@ -2,9 +2,9 @@ let BASE_URL = ''
 
 
 if (process.env.NODE_ENV == 'development') {
-	BASE_URL = 'https://test.baoxianzhanggui.com/locallive-java' // 测试环境
+	// BASE_URL = 'https://test.baoxianzhanggui.com/locallive-java' // 测试环境
 	// BASE_URL = 'http://192.168.0.36:8080/jeecg-boot' // 开发环境
-    // BASE_URL = 'http://192.168.0.52:8081/jeecg-boot' // 开发环境
+    BASE_URL = 'http://192.168.0.52:8081/jeecg-boot' // 开发环境
 
 } else {
 	BASE_URL = 'https://test.baoxianzhanggui.com/locallive-java' // 测试环境

+ 10 - 2
pages/coupon/coupon.vue

@@ -189,7 +189,13 @@ export default {
                     pageNo: page.num 
                  }).then(res => {
                 if (res.data.success) {
-					this.dataList.couponList0 = this.dataList.couponList0.concat(res.data.result.records)
+                    if( res.data.result.records==null && page.num==1){
+                        this.dataList.couponList0=[]
+                    }
+                    else{
+                        this.dataList.couponList0 =res.data.result.pages? this.dataList.couponList0.concat(res.data.result.records) : this.dataList.couponList0
+                    }
+
                     this.mescroll.endSuccess(res.data.result.records.length, res.data.result.total);
 						uni.showTabBar()
 					}
@@ -207,7 +213,7 @@ export default {
                 pageNo: page.num 
             }).then(res => {
                 if (res.data.success) {
-                    this.dataList['couponList' + this.currentTab] = res.data.result.records
+                    this.dataList['couponList' + this.currentTab] =res.data.result.pages? this.dataList['couponList' + this.currentTab].concat(res.data.result.records) : this.dataList['couponList' + this.currentTab]
                 }
                 else {
                     this.$tip.error(res.data.message);
@@ -239,9 +245,11 @@ export default {
                                         size: 10
                                     }
                                     if (this.currentTab == 0) {
+                                        this.dataList.couponList0 = []
                                         this.getList(page)
                                     }
                                     else {
+                                        this.dataList['couponList' + this.currentTab] =[]
                                         this.getList1(page)
                                     }
                                 }