|
@@ -45,7 +45,7 @@
|
|
|
onLoad(opt) {
|
|
|
this.jfgoodsDetail=uni.getStorageSync("jfgoodsDetail");
|
|
|
this.shopName=opt.shopName;
|
|
|
- this.shopId=opt.shopId;
|
|
|
+ this.shopId=opt.shopID;
|
|
|
this.avaIntegral=opt.avaIntegral;
|
|
|
this.goodsnum=opt.goodsnum;
|
|
|
},
|
|
@@ -55,6 +55,32 @@
|
|
|
uni.navigateTo({
|
|
|
url:'integralgoodsDetail'
|
|
|
})
|
|
|
+ },
|
|
|
+ goBuy(){
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
+ this.$http('openIntegralMall/exchangeApply', {
|
|
|
+ shopId:this.shopId,
|
|
|
+ goodsID:this.jfgoodsDetail.id,
|
|
|
+ qty:this.goodsnum
|
|
|
+ },'POST').then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ if(res.code==0){
|
|
|
+ this.orderData=res.data
|
|
|
+ uni.showToast({
|
|
|
+ title: '兑换成功',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 3000
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 3000
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|