Pārlūkot izejas kodu

commit -m 美博会优惠券

zhengjinyi 3 gadi atpakaļ
vecāks
revīzija
cdd2603b0b

+ 27 - 0
components/cm-module/cart-components/index.vue

@@ -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') {

+ 2 - 2
components/cm-module/cm-seller/user.vue

@@ -82,12 +82,12 @@
 			</view>
 			<!-- 底部跳转 -->
 			<view class="foot-list">
-<!-- 				<view class="list-cell-image" @click="navigator('/pages/user/coupon/coupon-activity')">
+				<view class="list-cell-image" @click="navigator('/pages/user/coupon/coupon-activity')">
 					<view class="text">
 						<view class="h1">美博会</view>
 						<view class="p">大额好券等你来领~</view>
 					</view>
-				</view> -->
+				</view>
 				<view class="list-cell-item">
 					<view class="list-cell"  v-for="(item, index) in firstList" :key="index" @click="navigator(item.path)" hover-class="cell-hover" :hover-stay-time="50">
 						<view class="cell-icon">

+ 27 - 0
pages/goods/product.vue

@@ -423,6 +423,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"
@@ -1136,6 +1144,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') {

+ 8 - 2
pages/seller/cart/coupon-share.vue

@@ -30,8 +30,14 @@
 						<view class="list-cell-time">{{ coupon.startDate }} - {{ coupon.endDate }}</view>
 					</view>
 					<view class="list-cell-ri">
-						<view class="coupon-minMoney">售价</view>
-						<view class="coupon-maxMoney"> <text class="small">¥</text> {{ coupon.moneyCouponPrice }} </view>
+						<template  v-if="coupon.couponBtnType == 1">
+							<view class="coupon-minMoney">售价</view>
+							<view class="coupon-maxMoney"> <text class="small">¥</text> {{ coupon.moneyCouponPrice }} </view>
+						</template>
+						<template v-else>
+							<view class="coupon-minMoney">售价</view>
+							<view class="coupon-maxMoney">1000采美豆 </view>
+						</template>
 					</view>
 				</view>
 			</view>

+ 2 - 1
pages/seller/cart/coupon.vue

@@ -7,7 +7,8 @@
 			</view>
 			<template v-else>
 				<view v-for="(coupon, index) in coupinList" :key="index" :id="coupon.id" class="coupon-list">
-					<view class="list-cell-tag">售价¥{{ coupon.moneyCouponPrice }}</view>
+					<view class="list-cell-tag" v-if="coupon.couponBtnType == 1">售价¥{{ coupon.moneyCouponPrice }}</view>
+					<view class="list-cell-tag" v-else>售价1000采美豆</view>
 					<view class="list-cell-le">
 						<view class="coupon-maxMoney"> <text class="small">¥</text> {{ coupon.couponAmount }} </view>
 						<view class="coupon-minMoney"> 满{{ coupon.touchPrice }}可用 </view>

+ 26 - 1
pages/user/coupon/coupon-activity.vue

@@ -54,7 +54,13 @@
 								</view>
 								<view class="list-cell-btn">
 									<view class="icon-used">
-										<template v-if="coupon.moneyCouponFlag == 1">
+										<template v-if="coupon.moneyCouponFlag == 0">
+											<view class="icon-used-text">1000采美豆</view>
+											<view class="icon-used-btn buy" @click="toDeductCoupon(coupon)"
+												>抵扣</view
+											>
+										</template>								
+										<template v-else-if="coupon.moneyCouponFlag == 1">
 											<view class="icon-used-text">购买</view>
 											<view class="icon-used-btn buy" @click="toPayCoupon(coupon)"
 												>¥{{ coupon.moneyCouponPrice }}</view
@@ -324,6 +330,25 @@ export default {
 					break
 			}
 		},
+		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') {

+ 25 - 0
pages/user/coupon/coupon-collection.vue

@@ -45,6 +45,12 @@
 							<view class="list-cell-btn">
 								<view class="icon-used">
 									<template v-if="coupon.moneyCouponFlag == 1">
+										<view class="icon-used-text">1000采美豆</view>
+										<view class="icon-used-btn buy" @click="toDeductCoupon(coupon)"
+											>抵扣</view
+										>
+									</template>								
+									<template v-else-if="coupon.moneyCouponFlag == 0">
 										<view class="icon-used-text">购买</view>
 										<view class="icon-used-btn buy" @click="toPayCoupon(coupon)"
 											>¥{{ coupon.moneyCouponPrice }}</view
@@ -302,6 +308,25 @@ export default {
 					break
 			}
 		},
+		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') {