ソースを参照

bug修改,优惠券领取提示

twt 2 年 前
コミット
74bd99cd99
共有4 個のファイルを変更した27 個の追加17 個の削除を含む
  1. 10 3
      pages/index/couponShare.vue
  2. 1 1
      pages/index/index.vue
  3. 10 7
      pages/index/receiveCoupon.vue
  4. 6 6
      utils/common.js

+ 10 - 3
pages/index/couponShare.vue

@@ -138,13 +138,20 @@
 				this.$http('opencoupon/getCoupons', {
 				      id: this.id,
 				}, 'GET').then(res => {
-					uni.hideLoading();
+					/* uni.hideLoading();
 					uni.showToast({
 						 title: '领取成功',
 						 icon:'none',
 						 duration: 3000
-					});
-					this.getData();
+					}); */
+					if(res.code==0){
+						uni.showToast({
+							 title: '领取成功',
+							 icon:'none',
+							 duration: 3000
+						});
+					}
+					//this.getData();
 					
 				
 				})

+ 1 - 1
pages/index/index.vue

@@ -417,7 +417,7 @@
 				})
 			},
 			changeCar(){
-			   /* uni.scanCode({
+			    /* uni.scanCode({
 				 	success: function (res) {
 				 		console.log('条码类型:' + res.scanType);
 						console.log( res);

+ 10 - 7
pages/index/receiveCoupon.vue

@@ -87,12 +87,15 @@
 				this.$http('opencoupon/getCoupons', {
 				      id: id,
 				}, 'GET').then(res => {
-					uni.hideLoading();
-					uni.showToast({
-						 title: '领取成功',
-						 icon:'none',
-						 duration: 3000
-					});
+					//uni.hideLoading();
+					if(res.code==0){
+						uni.showToast({
+							 title: '领取成功',
+							 icon:'none',
+							 duration: 3000
+						});
+					}
+					
 					this.getCouponCenterList();
 					
 				
@@ -101,7 +104,7 @@
 			getCouponCenterList(){
 				var params={}
 				this.$http('opencoupon/getCouponCenterList', params, 'GET').then(res => {
-					uni.hideLoading();
+					//uni.hideLoading();
 					this.list = res.data.list;
 					this.comment=res.data.comment;
 				

+ 6 - 6
utils/common.js

@@ -73,12 +73,12 @@ function noMultipleClicks(methods, info) {
 function getExtStoreId(type){
 	try{
 		var extConfig = uni.getExtConfigSync ? uni.getExtConfigSync() : {shopId:'默认的门店id'};
-		 // extConfig={
-		 // 	"shopId": "9D723F77-C1A9-4728-933B-5AF653772557",
-		 // 	"url":"https://apidms.66km.com",
-		 // 	"unionId":"66649854-64B9-4668-A59C-DFF1D33EEA50",
-		 // 	"appId":"wx699857c5dd55a509"
-	  //    }
+		/* extConfig={
+		  	"shopId": "1F12DB68-D8E8-4B76-9E20-287ACB72889F",
+		  	"url":"https://apidms.66km.com",
+		  	"unionId":"EF7981B9-2D1D-4006-9C0A-66CE7177134D",
+		  	"appId":"wx2c6f04c0dcd15984"
+	      } */
 		console.log(extConfig,'extJson对象');
 		//return extConfig[type];
 		return extConfig