|
@@ -388,6 +388,14 @@
|
|
|
<view class="icon-used">
|
|
|
<template v-if="coupon.couponBtnType == 0">
|
|
|
<template v-if="coupon.moneyCouponFlag == 1">
|
|
|
+ <view class="icon-used-text">1000采美豆</view>
|
|
|
+ <view
|
|
|
+ class="icon-used-btn receive"
|
|
|
+ @click="toDeductCoupon(coupon)"
|
|
|
+ >抵扣</view
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ <template v-else-if="coupon.moneyCouponFlag == 0">
|
|
|
<view class="icon-used-text">购买</view>
|
|
|
<view
|
|
|
class="icon-used-btn receive"
|
|
@@ -1491,6 +1499,25 @@ export default {
|
|
|
this.$util.msg(error.msg, 2000)
|
|
|
})
|
|
|
},
|
|
|
+ toDeductCoupon(coupon) {
|
|
|
+ // 点击采美豆抵扣优惠券
|
|
|
+ if (process.env.NODE_ENV != 'development') {
|
|
|
+ this.$uma.trackEvent('Um_Event_userCouponCollectionBuy', {
|
|
|
+ Um_Key_PageName: '领券中心',
|
|
|
+ Um_Key_EvenName: '抵扣优惠券',
|
|
|
+ Um_Key_CouponId: `${coupon.couponId}`,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.hasLogin) {
|
|
|
+ if (this.userIdentity === 1 || this.userIdentity === 3) {
|
|
|
+ this.$util.msg('您的身份暂不支持领取优惠券', 2000)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.createCouponRecord(coupon)
|
|
|
+ } else {
|
|
|
+ this.$api.navigateTo('/pages/login/login')
|
|
|
+ }
|
|
|
+ },
|
|
|
toPayCoupon(coupon){
|
|
|
// 点击购买优惠券,友盟埋点收集购买优惠券
|
|
|
if (process.env.NODE_ENV != 'development') {
|