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