优惠券:完善优惠券领取接口
parent
810f311a13
commit
78da791d4c
|
@ -80,7 +80,7 @@
|
|||
methods: {
|
||||
close: function() {
|
||||
this.type = 1
|
||||
this.$emit('ChangCouponsClone');
|
||||
this.$emit('ChangCouponsClose');
|
||||
},
|
||||
/**
|
||||
* 选择优惠劵
|
||||
|
|
|
@ -226,7 +226,7 @@
|
|||
<!-- 优惠劵弹窗 -->
|
||||
<couponListWindow
|
||||
:coupon='coupon'
|
||||
@ChangCouponsClone="ChangCouponsClone"
|
||||
@ChangCouponsClose="ChangCouponsClose"
|
||||
@ChangCoupons="ChangCoupons"
|
||||
@tabCouponType="tabCouponType"
|
||||
/>
|
||||
|
@ -837,7 +837,7 @@
|
|||
/**
|
||||
* 关闭优惠劵弹窗
|
||||
*/
|
||||
ChangCouponsClone: function() {
|
||||
ChangCouponsClose: function() {
|
||||
this.$set(this.coupon, 'coupon', false)
|
||||
},
|
||||
/**
|
||||
|
|
|
@ -394,7 +394,8 @@
|
|||
*/
|
||||
getCoupon: function(id, index) {
|
||||
CouponApi.takeCoupon(id).then(res => {
|
||||
this.$set(this.couponList[index], 'takeStatus', true);
|
||||
// 设置已领取,即不能再领取
|
||||
this.$set(this.couponList[index], 'takeStatus', res.data !== true);
|
||||
this.$util.Tips({
|
||||
title: '领取成功'
|
||||
});
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
<!-- 优惠劵的弹窗选择 -->
|
||||
<couponListWindow
|
||||
:coupon='coupon'
|
||||
@ChangCouponsClone="ChangCouponsClone"
|
||||
@ChangCouponsClose="ChangCouponsClose"
|
||||
:openType='openType'
|
||||
@ChangCoupons="ChangCoupons"
|
||||
:orderShow="orderShow"
|
||||
|
@ -441,7 +441,7 @@
|
|||
/**
|
||||
* 关闭 coupon 优惠劵的选择弹窗
|
||||
*/
|
||||
ChangCouponsClone: function() {
|
||||
ChangCouponsClose: function() {
|
||||
this.$set(this.coupon, 'coupon', false);
|
||||
},
|
||||
|
||||
|
|
|
@ -111,8 +111,8 @@
|
|||
getCoupon: function(id, index) {
|
||||
// 领取优惠券
|
||||
CouponApi.takeCoupon(id).then(res => {
|
||||
// todo 会导致take_limit_count失效
|
||||
this.couponsList[index].takeStatus = true;
|
||||
// 设置已领取,即不能再领取
|
||||
this.couponsList[index].takeStatus = res.data !== true;
|
||||
this.$set(this, 'couponsList', this.couponsList);
|
||||
this.$util.Tips({
|
||||
title: '领取成功'
|
||||
|
|
Loading…
Reference in New Issue