Browse Source

优惠劵使用bug修改

feature/3.0.0-推广员
lfs3 6 years ago
parent
commit
3b4f86276e
1 changed files with 38 additions and 8 deletions
  1. 46
      src/view/month-card.vue

46
src/view/month-card.vue

@ -124,11 +124,24 @@ export default {
} }
}); });
}, },
countExtend() {
return new Promise((resolve, reject) => {
var params = {
buryingPointType: 0,
salesmanUniqueIdentity: this.uniqueId,
timeStr: this.getTime(Date.now())
};
homeApi.countExtend(params).then(res => {
resolve();
});
});
},
// 使 // 使
handleUseCoupon() { handleUseCoupon() {
window.location.href = window.location.href =
locationUrl + "/mall/web/vgoods/detail/" + this.getData.goodsNo+ '?uniqueId='+ uniqueId;
locationUrl + "/mall/web/vgoods/detail/" + this.getData.goodsNo+ '?uniqueId='+ this.uniqueId;
}, },
// //
@ -187,16 +200,33 @@ export default {
let uuniqueId = Qs.parse(location.search.substring(1)).uniqueId let uuniqueId = Qs.parse(location.search.substring(1)).uniqueId
var url = location.href.split('?')[0] var url = location.href.split('?')[0]
if(this.uniqueId !== undefined && this.uniqueId !== null && this.uniqueId !== ""){ if(this.uniqueId !== undefined && this.uniqueId !== null && this.uniqueId !== ""){
this.uniqueId = ''
} }
// //
this.handleInit(); this.handleInit();
console.log('url:'+ url.split('?')[0])
this.wxShare({
couponNo: this.batchNo,
source: 20,
url: encodeURIComponent(url)
});
return new Promise((resolve, reject) => {
var params = {
salesmanUniqueIdentity: this.uniqueId,
};
homeApi.updateUniqueId(params).then(res => {
this.showLoading = false;
if (res.code == 0) {
this.uniqueId=this.$cookies.get('1hjz_mall_unique_id')
if(this.uniqueId !== undefined && this.uniqueId !== null && this.uniqueId !== ""){
this.countExtend();
}
this.wxShare({
couponNo: this.batchNo,
source: 20,
url: encodeURIComponent(url)
});
} else {
this.$vux.toast.text(res.msg, "middle");
}
resolve();
});
});
} }
}; };
</script> </script>

Loading…
Cancel
Save