|
@@ -218,7 +218,14 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
toPayCoupon(coupon) {
|
|
toPayCoupon(coupon) {
|
|
- // 点击购买优惠券
|
|
|
|
|
|
+ // 点击购买优惠券,友盟埋点收集购买优惠券
|
|
|
|
+ if (process.env.NODE_ENV != 'development') {
|
|
|
|
+ this.$uma.trackEvent('Um_Event_meibohuiCouponBuy', {
|
|
|
|
+ Um_Key_PageName: '美博会优惠券活动页',
|
|
|
|
+ Um_Key_EvenName: '购买优惠券',
|
|
|
|
+ Um_Key_CouponId: `${coupon.couponId}`,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
if (this.hasLogin) {
|
|
if (this.hasLogin) {
|
|
if (this.userIdentity === 1 || this.userIdentity === 3) {
|
|
if (this.userIdentity === 1 || this.userIdentity === 3) {
|
|
this.$util.msg('您的身份暂不支持领取优惠券', 2000)
|
|
this.$util.msg('您的身份暂不支持领取优惠券', 2000)
|
|
@@ -230,7 +237,14 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
receiveCoupon(coupon) {
|
|
receiveCoupon(coupon) {
|
|
- // 点击优惠券领取按钮
|
|
|
|
|
|
+ // 点击优惠券领取按钮,友盟埋点收集领取优惠券
|
|
|
|
+ if (process.env.NODE_ENV != 'development') {
|
|
|
|
+ this.$uma.trackEvent('Um_Event_meibohuiCouponReceive', {
|
|
|
|
+ Um_Key_PageName: '美博会优惠券活动页',
|
|
|
|
+ Um_Key_EvenName: '领取优惠券',
|
|
|
|
+ Um_Key_CouponId: `${coupon.couponId}`,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
if (this.hasLogin) {
|
|
if (this.hasLogin) {
|
|
if (this.userIdentity === 1 || this.userIdentity === 3) {
|
|
if (this.userIdentity === 1 || this.userIdentity === 3) {
|
|
this.$util.msg('您的身份暂不支持领取优惠券', 2000)
|
|
this.$util.msg('您的身份暂不支持领取优惠券', 2000)
|
|
@@ -261,8 +275,14 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
toUseCoupon(coupon) {
|
|
toUseCoupon(coupon) {
|
|
- // 去使用跳转路径
|
|
|
|
- console.log('coupon', coupon)
|
|
|
|
|
|
+ // 去使用跳转路径,友盟埋点收集去使用优惠券
|
|
|
|
+ if (process.env.NODE_ENV != 'development') {
|
|
|
|
+ this.$uma.trackEvent('Um_Event_meibohuiCouponToUseCoupon', {
|
|
|
|
+ Um_Key_PageName: '美博会优惠券活动页',
|
|
|
|
+ Um_Key_EvenName: '使用优惠券',
|
|
|
|
+ Um_Key_CouponId: `${coupon.couponId}`,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
switch (coupon.couponType) {
|
|
switch (coupon.couponType) {
|
|
case 0: // 活动券:跳转到商城首页 / 或者活动页(看是否指定了商品)
|
|
case 0: // 活动券:跳转到商城首页 / 或者活动页(看是否指定了商品)
|
|
if (coupon.productType == 1) {
|
|
if (coupon.productType == 1) {
|
|
@@ -297,11 +317,11 @@ export default {
|
|
.then(response => {
|
|
.then(response => {
|
|
// 友盟埋点收集微信支付
|
|
// 友盟埋点收集微信支付
|
|
if (process.env.NODE_ENV != 'development') {
|
|
if (process.env.NODE_ENV != 'development') {
|
|
- this.$uma.trackEvent('Um_Event_ConfirmWechatPay', {
|
|
|
|
- Um_Key_PageName: '微信支付',
|
|
|
|
- Um_Key_SourcePage: '线上支付',
|
|
|
|
- Um_Key_PayName: `${this.buttonText}`,
|
|
|
|
- Um_Key_PayOrderID: `${this.orderId}`
|
|
|
|
|
|
+ this.$uma.trackEvent('Um_Event_meibohuiCouponPay', {
|
|
|
|
+ Um_Key_PageName: '美博会优惠券活动页',
|
|
|
|
+ Um_Key_SourcePage: '线上支付优惠券',
|
|
|
|
+ Um_Key_CouponId: `${coupon.couponId}`,
|
|
|
|
+ Um_Key_userId: `${this.userId}`
|
|
})
|
|
})
|
|
}
|
|
}
|
|
let PayInfo = JSON.parse(response.data.data.payInfo)
|
|
let PayInfo = JSON.parse(response.data.data.payInfo)
|