浏览代码

分享领取优惠券 添加shopid

twt 1 天之前
父节点
当前提交
7c2d93ad1c
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      pages/index/couponShare.vue

+ 6 - 2
pages/index/couponShare.vue

@@ -109,6 +109,7 @@
 				wxOpenData:'',
 				scene:'',
 				spShopShow:false,
+				ShopID:'',
 			}
 		},
 		onLoad(opt) {
@@ -117,13 +118,14 @@
 			this.type=opt.type;
 			this.userInfo=this.$store.state.userInfo;
 			this.ext=this.$common.getExtStoreId();
-			//scene=2E03F5108B434EFABD70F2D208890209
+			
 			if(this.userInfo){
+				//this.scene='2E03F5108B434EFABD70F2D208890209'
 				if(opt.scene&&opt.scene!='undefined'){
 					this.scene=opt.scene;
 					this.getShareParams()
 				}else{
-				 this.getData();
+				    this.getData();
 				}
 				
 			}else{
@@ -161,6 +163,7 @@
 					 var data= JSON.parse(res.data) ;
 					 console.log(data)
 					 this.id=data.couponId;
+					 this.ShopID=data.ShopID
 					 this.getData(); 
 				 })
 			},
@@ -170,6 +173,7 @@
 				})
 				this.$http('opencoupon/getCoupons', {
 				      id: this.id,
+					  ShopID:this.ShopID
 				}, 'GET').then(res => {
 					/* uni.hideLoading();
 					uni.showToast({