|
@@ -3,7 +3,7 @@
|
|
|
<van-swipe :autoplay="3000" class="lottery-swipe" vertical :show-indicators="false">
|
|
|
<van-swipe-item v-for="item in carousel" :key="item.mealId">有{{item.count}}个用户 {{['', '抽奖', '购买'][item.type]}}{{item.title}}</van-swipe-item>
|
|
|
</van-swipe>
|
|
|
- <img class="w51h26" src="~/assets/image/activity/lottery/rule.png" alt="" @click="showRule=true">
|
|
|
+ <img class="w51h26" src="~/assets/image/activity/lottery/rule.png" alt="" @click="showRule=true;makePoint('activity_购买协议')">
|
|
|
<div class="roulette">
|
|
|
<div class="arrow" @click="startRotation"></div>
|
|
|
<img class="start-btn" src="~/assets/image/activity/lottery/start-btn.png" alt="" @click="startRotation">
|
|
@@ -27,14 +27,14 @@
|
|
|
<div class="txt4">年卡(已获得)</div>
|
|
|
<img class="w253h73" src="~/assets/image/activity/lottery/coupon-1.png" alt="">
|
|
|
</div>
|
|
|
- <div v-for="item in mealList" :key="item.id" :class="selMealId===item.id ? 'coupon-2 active' : 'coupon-2'" @click="selMealId=item.id">
|
|
|
+ <div v-for="item in mealList" :key="item.id" :class="selMealId===item.id ? 'coupon-2 active' : 'coupon-2'" @click="selMealId=item.id;makePoint(item.day === 30 ? 'activity_38月卡' : 'activity_268年卡')">
|
|
|
<img v-if="selMealId===item.id" class="coupon-select-icon" src="~/assets/image/activity/lottery/select-icon.png" alt="">
|
|
|
<img v-else class="coupon-select-icon" src="~/assets/image/activity/lottery/unselect-icon.png" alt="">
|
|
|
<div class="coupon-title"><span class="txt2">{{item.actualPrice}}</span><span>会员</span></div>
|
|
|
<div class="txt4">{{item.day === 30 ? '月卡' : '年卡'}}</div>
|
|
|
<img class="w111h73" src="~/assets/image/activity/lottery/coupon-2.png" alt="">
|
|
|
</div>
|
|
|
- <div v-for="item in paySupportType" :key="item" class="fnbc" @click="payType = item">
|
|
|
+ <div v-for="item in paySupportType" :key="item" class="fnbc" @click="payType = item;makePoint(item === 'aliPay' ? 'activity_支付宝' : 'activity_微信')">
|
|
|
<div v-if="item === 'aliPay'" class="fnc">
|
|
|
<van-icon class="icon-pay" :name="require('~/assets/image/activity/lottery/alipay.png')" />
|
|
|
<span class="txt5">支付宝支付</span>
|
|
@@ -46,10 +46,10 @@
|
|
|
<van-icon :name="payType === item ? require('~/assets/image/activity/lottery/select-round-icon.png') : require('~/assets/image/activity/lottery/unselect-round-icon.png')" size="24" />
|
|
|
</div>
|
|
|
<img class="w304h62" src="~/assets/image/activity/lottery/pay-btn.png" alt="" @click="createOrder">
|
|
|
- <div class="txt6">开通前阅读并同意<a @click="showRule=true">购买协议</a></div>
|
|
|
+ <div class="txt6">开通前阅读并同意<a @click="showRule=true;makePoint('activity_购买协议')">购买协议</a></div>
|
|
|
</div>
|
|
|
</van-popup>
|
|
|
- <van-popup v-model="show" closeable close-icon-position="top-right" round>
|
|
|
+ <van-popup v-model="show" closeable close-icon-position="top-right" round @closed="makePoint('activity_关闭弹窗')">
|
|
|
<div class="popup-view popup-view-leave">
|
|
|
<div class="txt1">确定离开吗</div>
|
|
|
<div class="txt6">离开后您将失去{{actualPrice}}年卡,24小时付款有效</div>
|
|
@@ -60,7 +60,7 @@
|
|
|
<img class="w253h73" src="~/assets/image/activity/lottery/coupon-1.png" alt="">
|
|
|
</div>
|
|
|
<div class="fnbc">
|
|
|
- <div class="btn-leave" @click="show=false">狠心离开</div>
|
|
|
+ <div class="btn-leave" @click="show=false;makePoint('activity_狠心离开')">狠心离开</div>
|
|
|
<div class="btn-pay" @click="createOrder">立即购买</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -157,7 +157,8 @@ export default {
|
|
|
mealList: [],
|
|
|
status: 0,
|
|
|
carousel: [],
|
|
|
- phoneType: 'SVIP'
|
|
|
+ phoneType: 'SVIP',
|
|
|
+ client: 0
|
|
|
}
|
|
|
},
|
|
|
async fetch() {
|
|
@@ -171,6 +172,15 @@ export default {
|
|
|
title: '年卡抽奖活动'
|
|
|
},
|
|
|
created() {
|
|
|
+ if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
|
|
|
+ this.client = 1
|
|
|
+ } else if (this.$userAgent.isSzx && this.$userAgent.isIos) {
|
|
|
+ this.client = 2
|
|
|
+ } else if (this.$userAgent.isMiniProgram) {
|
|
|
+ this.client = 5
|
|
|
+ } else {
|
|
|
+ this.client = 7
|
|
|
+ }
|
|
|
this.getLuckDrawActivity()
|
|
|
this.getMealInfo()
|
|
|
this.getCarouselList()
|
|
@@ -190,6 +200,7 @@ export default {
|
|
|
duration: 0,
|
|
|
forbidClick: true,
|
|
|
});
|
|
|
+ this.makePoint('activity_立即购买')
|
|
|
let taocan = {
|
|
|
buyType: 1,
|
|
|
couponId: 0,
|
|
@@ -286,6 +297,7 @@ export default {
|
|
|
if (!this.canBeRotated()) {
|
|
|
return false;
|
|
|
}
|
|
|
+ this.makePoint('activity_立即抽奖')
|
|
|
// 开始转动
|
|
|
// 先上锁
|
|
|
this.isLocking = true;
|
|
@@ -294,11 +306,15 @@ export default {
|
|
|
if (res.status === 0) {
|
|
|
const index = this.prizeData.findIndex(item => item.level === res.data.actualPrice)
|
|
|
this.actualPrice = res.data.actualPrice
|
|
|
- if (Number(localStorage.getItem('year-15-9')) !== 2 && this.actualPrice === 15.9) {
|
|
|
- localStorage.setItem('year-15-9', 1)
|
|
|
+ if (this.actualPrice === 15.9) {
|
|
|
+ this.makePoint('activity_15.9年卡')
|
|
|
+ if (Number(localStorage.getItem('year-15-9')) !== 2)
|
|
|
+ localStorage.setItem('year-15-9', 1)
|
|
|
}
|
|
|
- if (Number(localStorage.getItem('year-9-9')) !== 2 && this.actualPrice === 9.9) {
|
|
|
- localStorage.setItem('year-9-9', 1)
|
|
|
+ if (this.actualPrice === 9.9) {
|
|
|
+ if (Number(localStorage.getItem('year-9-9')) !== 2)
|
|
|
+ this.makePoint('activity_9.9年卡')
|
|
|
+ localStorage.setItem('year-9-9', 1)
|
|
|
}
|
|
|
this.mealId = res.data.mealId
|
|
|
this.selMealId = res.data.mealId
|
|
@@ -315,6 +331,10 @@ export default {
|
|
|
// 告诉子组件,开始转动了
|
|
|
this.$refs.roundTurntable.rotate(this.prizeIndex);
|
|
|
},
|
|
|
+ makePoint(positionButton) {
|
|
|
+ const now = new Date()
|
|
|
+ this.$axios.$post('/public/v5/buriedPointRecord/reportRecords', [{client: this.client, eventCode: 'eventCode传27_抽奖流程', positionButton, operationTime: now.toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') }])
|
|
|
+ },
|
|
|
// 已经转动完转盘触发的函数
|
|
|
endRotation() {
|
|
|
// 提示中奖
|
|
@@ -351,6 +371,7 @@ export default {
|
|
|
return true;
|
|
|
},
|
|
|
closed() {
|
|
|
+ this.makePoint('activity_关闭抽奖', 'eventCode传27_抽奖流程')
|
|
|
if (Number(localStorage.getItem('year-15-9')) !== 2) {
|
|
|
this.show = true
|
|
|
localStorage.setItem('year-15-9', 2)
|