Commit 1afefc08 authored by 任建锋's avatar 任建锋

优化埋点\抽卡开合

parent 5f59df14
export let DataCenter={
}
import API from './api';
export let BuriedType={
MY_CARD_BTN:1,
TASK_BTN:2,
INVITE_BTN:3,
HELP_BTN:4,
HELP_PRIZE_BTN:5,
GIVING_CARD_BTN:6,
GIVING_CARD_PRIZE_BTN:7,
COLLECT_GOODS_BTN:8,
ORDER_GOODS_BTN:9,
}
export function BuriedClick(type){
const { activityId } = getApp();
API.addStat({activityId,type})
}
\ No newline at end of file
......@@ -16,7 +16,6 @@
width: 96rpx;
height: 34rpx;
right: 10rpx;
pointer-events: none;
}
.goods-modal-container__title {
width: 355rpx;
......@@ -87,7 +86,7 @@
-webkit-box-orient: vertical;
}
.goods-modal-container__content-item__price {
padding: 0 31rpx 0 24rpx;
padding: 0 21rpx 0 20rpx;
display: flex;
justify-content: space-between;
}
......@@ -96,14 +95,15 @@
font-family:PingFang SC;
font-weight:600;
color:rgba(255,42,0,1);
width: 240rpx;
}
.goods-modal-container__content-item__price-num text {
font-size: 24rpx;
margin-right: 2rpx;
}
.goods-modal-container__content-item__price-collect {
width: 118rpx;
height: 31rpx;
width: 30rpx;
height: 30rpx;
background-size: 100% 100%;
}
.goods-modal-container__content-item__price-collect image {
......@@ -113,6 +113,7 @@
.goods-modal-container__content-item__price-no-collect {
width: 30rpx;
height: 30rpx;
margin-top: 4rpx;
}
.goods-modal-container__content-item__price-no-collect image {
width: 100%;
......
......@@ -12,7 +12,7 @@
<image mode="scaleToFill" src="{{item.image}}"/>
</view>
<view class="goods-modal-container__content-item__name" style="{{{'color':task.color}}}">{{item.name}}</view>
<image class="gotobuybtn" src="//yun.duiba.com.cn/aurora/assets/fb4321a6e0283d4b4ef7f982918370567a6255c8.png"/>
<image a:if={{task.taskType == 'orderGoods'||task.taskType == 'orderDepositGoods'}} onTap="goToGoodsDetail" data-item="{{item}}" class="gotobuybtn" src="//yun.duiba.com.cn/aurora/assets/fb4321a6e0283d4b4ef7f982918370567a6255c8.png"/>
<view class="goods-modal-container__content-item__price">
<view class="goods-modal-container__content-item__price-num"><text>¥</text>{{item.price}}</view>
<view a:if="{{task.taskType == 'collectGoods'}}"
......
......@@ -143,6 +143,11 @@ const apiList = {
method: 'get',
isShowLoading: false
},
addStat: {
handle: 'addStat',
method: 'get',
isShowLoading: false
},
/**获取用户信息 */
getUserInfo: {
handle: 'getUserInfo',
......
<view class="getcardpanel ">
<view class={{showCardBody?"p_show":"p_hide"}}>
<image class="getcardcontinuebtn " a:if={{doJoinData.drawLotteryStatus==1}} onTap="hiddenPanelEvent" data-value="getcardpanel" src={{resList['48d28917-741f-45d4-bcc9-322f29bcf5d8'].url}} />
<image class="getcardopenboxbtn " a:if={{doJoinData.drawLotteryStatus==2}} src={{resList['65d0f064-2527-4aef-8563-858eaf7ccf1e'].url}} />
<image class="dim51 " src={{resList['8c31274b-1016-4b8c-b413-9fc98174e118'].url}} />
<image class="xi_you_qia_dim50 " src={{resList['a47a9645-1d0d-482b-af10-154def15e9f9'].url}} />
<image class="getcardimg " src={{doJoinData.image}} />
<text class="getcardtitle comWinTitle" a:if={{doJoinData.isNewCard&&doJoinData.drawLotteryStatus==1}}> 运气爆棚!\n解锁一张新卡牌</text>
<text class="getcardtitle comWinTitle" a:if={{doJoinData.isNewCard&&doJoinData.drawLotteryStatus==2}}> 恭喜你解锁{{doJoinData.cardTypeCollectedCount}}张卡牌</text>
<text class="getcardtitle comWinTitle" a:if={{!doJoinData.isNewCard}}> 恭喜你获得以下卡牌</text>
<image class="getcardclosebtn "onTap="hiddenPanelEvent" data-value="{{'getcardpanel'}}" src={{resList['878b3751-e6b3-4ae6-9811-77e938801873'].url}} />
<view class="fu_biao_ti45 ">
<image class="yuan_jiao_ju368847 " src={{resList['d7329665-f4f6-42bc-ab46-0af63a0837eb'].url}} />
<text class="getcardcontenttext ">再抽取{{doJoinData.restCardTypeCount}}张不同卡牌即可领取奖励</text>
</view>
<view class="getcardclosebtn " onTap="hiddenPanelEvent" data-value="{{'getcardpanel'}}"></view>
<image class="getcardimg " src={{doJoinData.image}} />
<image class="getcardcontinuebtn " a:if={{doJoinData.drawLotteryStatus==1}} onTap="hiddenPanelEvent" data-value="getcardpanel" src={{resList['48d28917-741f-45d4-bcc9-322f29bcf5d8'].url}} />
<image class="getcardopenboxbtn " a:if={{doJoinData.drawLotteryStatus==2}} onTap="doBoxDraw" data-value="getcardpanel" src={{resList['65d0f064-2527-4aef-8563-858eaf7ccf1e'].url}} />
</view>
</view>
\ No newline at end of file
......@@ -11,6 +11,10 @@ Component({
hiddenPanelEvent(e){
this.props.onTapHiddenPanelEvent(e);
},
doBoxDraw(e){
this.props.onTapHiddenPanelEvent(e);
this.props.onDoBoxDraw()
}
},
didMount(props) {
console.log(DataCenter.doJoinData)
......
......@@ -26,3 +26,10 @@
.p_hide{
opacity:0;
}
.getcardpanel .getcardclosebtn {
width: 100%!important;
height: 100%!important;
left: 0!important;
top: 0!important;
position: fixed!important;
}
\ No newline at end of file
<view class="getgivingcardpanel ">
<image class="dim66 " src={{resList['76a9cc41-7074-45cc-ab2f-c5dd47e07058'].url}} />
<image class="getgivingcardalsobtn " src={{resList['c83cb68d-c685-4a21-987d-f374d903c006'].url}} />
<image class="getgivingcardalsobtn " onTap="onTapGetGivingCardAlsoBtn" data-value="getgivingcardpanel" src={{resList['c83cb68d-c685-4a21-987d-f374d903c006'].url}} />
<image class="xiao_biao_ti64 " src={{resList['71cc94bd-5822-4f37-9824-94634cceacfe'].url}} />
<image class="getgivingcardimg " src={{GiftCard.image}} />
<image class="getgivingcardclosebtn " onTap="hiddenPanelEvent" data-value="getgivingcardpanel" src={{resList['878b3751-e6b3-4ae6-9811-77e938801873'].url}} />
......
'use strict';
import { DataCenter } from '../../DataCenter';
import { BuriedClick, BuriedType, DataCenter } from '../../DataCenter';
import resList from '../../resconfig/resList';
Component({
props: {},
......@@ -8,6 +8,10 @@ Component({
methods: {
hiddenPanelEvent(e){
this.props.onTapHiddenPanelEvent(e);
},
onTapGetGivingCardAlsoBtn(e){
BuriedClick(BuriedType.GIVING_CARD_PRIZE_BTN)
this.props.onTapHiddenPanelEvent(e);
}
},
didMount(props) {
......
<view class="helpprizepanel ">
<image class="dim91 " src={{resList['12e4a261-7106-4bec-b9e9-6df026fcd440'].url}} />
<image class="helpprizealsojoinbtn " onTap="hiddenPanelEvent" data-value="helpprizepanel" src={{resList['27a7f1d2-f272-4f12-8ff5-2cde96d149fd'].url}} />
<image class="helpprizealsojoinbtn " onTap="onTapHelpPrizeAlsoJoinBtn" data-value="helpprizepanel" src={{resList['27a7f1d2-f272-4f12-8ff5-2cde96d149fd'].url}} />
<view class="xiao_biao_ti88 ">
<text class="gong_xi_ni_huo_de_yi_xia_jiang_li ">恭喜你获得以下奖励</text>
<text class="jiang_pin_yi_fa_fang_ke_zai_jiang_pin_zhong_cha_kan89 ">奖品已发放,可在【奖品】中查看</text>
......
'use strict';
import { DataCenter } from '../../DataCenter';
import { BuriedClick, BuriedType, DataCenter } from '../../DataCenter';
import resList from '../../resconfig/resList';
Component({
props: {},
......@@ -8,6 +8,10 @@ Component({
methods: {
hiddenPanelEvent(e){
this.props.onTapHiddenPanelEvent(e);
},
onTapHelpPrizeAlsoJoinBtn(e){
BuriedClick(BuriedType.HELP_PRIZE_BTN)
this.props.onTapHiddenPanelEvent(e);
}
},
didMount(props) {
......
......@@ -18,4 +18,4 @@
</view>
<image class="mycardclosebtn " onTap="hiddenPanelEvent" data-value="mycardpanel" src={{resList['4d74c7bc-4af0-494d-809a-73090d99ff25'].url}} />
</view>
</view>
\ No newline at end of file
</view>
\ No newline at end of file
'use strict';
import { DataCenter } from '../../DataCenter';
import { BuriedClick, BuriedType, DataCenter } from '../../DataCenter';
import resList from '../../resconfig/resList';
const app = getApp();
const { tbcc } = app;
......@@ -98,10 +98,12 @@ Component({
}else if(taskType=="jumpLink"){
this.jumpLinkTask(taskType,e.target.dataset.value.url)
}else if(taskType=="collectGoods"){
BuriedClick(BuriedType.COLLECT_GOODS_BTN)
my.navigateTo({
url:"/pages/collectGoods/collectGoods?itemIds="+e.target.dataset.value.itemIds
});
}else if(taskType=="orderGoods"){
BuriedClick(BuriedType.ORDER_GOODS_BTN)
my.navigateTo({
url:"/pages/orderGoods/orderGoods?itemIds="+e.target.dataset.value.itemIds
});
......
<view class="win_bg" a:if={{showWinLists.length>0}}>
<sorrypanel a:if={{showWinLists.indexOf("sorrypanel")!=-1}} onTapHiddenPanelEvent="hiddenPanelEvent" />
<rulepanel a:if={{showWinLists.indexOf("rulepanel")!=-1}} onTapHiddenPanelEvent="hiddenPanelEvent" />
<getcardpanel a:if={{showWinLists.indexOf("getcardpanel")!=-1}} onTapHiddenPanelEvent="hiddenPanelEvent" />
<getcardpanel a:if={{showWinLists.indexOf("getcardpanel")!=-1}} onDoBoxDraw="doBoxDraw" onTapHiddenPanelEvent="hiddenPanelEvent" />
<joinmemberpanel a:if={{showWinLists.indexOf("joinmemberpanel")!=-1}} onTapHiddenPanelEvent="hiddenPanelEvent" />
<nonumberpanel a:if={{showWinLists.indexOf("nonumberpanel")!=-1}} onOpenTaskPanel="openTaskPanel" onTapHiddenPanelEvent="hiddenPanelEvent" />
<mycardpanel a:if={{showWinLists.indexOf("mycardpanel")!=-1}} onGivingCard="givingCard" CollectCardInfo={{CollectCardInfo}} onTapHiddenPanelEvent="hiddenPanelEvent" />
......
......@@ -22,6 +22,9 @@ Component({
},
showPanel(name){
this.props.onShowPanel(name)
},
doBoxDraw(){
this.props.onDoBoxDraw()
}
},
});
\ No newline at end of file
......@@ -39,9 +39,9 @@ Page({
image: {
bg: '//yun.duiba.com.cn/spark/assets/bd40dc26018211c59d937ad8e1ddd7ae1de09db6.png',
banner: '//yun.duiba.com.cn/taobaomini/clientCTest/goods_banner@2x.png',
title: '//yun.duiba.com.cn/spark/assets/7ac9b1ca4bdea23b5f8b69b46e373900d56562e2.png',
collect: '//yun.duiba.com.cn/taobaomini/clientCTest/goods_collection@2x.png',
no_collect: '//yun.duiba.com.cn/taobaomini/clientCTest/collection_no_collect@2x.png',
title: '//yun.duiba.com.cn/aurora/assets/28b3862c8fd0a47037bac8a6e7539d5a56472fb0.png',
collect: '//yun.duiba.com.cn/aurora/assets/15d31b576527d126556cf46080604a2a5937698f.png',
no_collect: '//yun.duiba.com.cn/aurora/assets/a5d18c8d319a2bb358784401a50f3e108800bb65.png',
img: '//yun.duiba.com.cn/taobaomini/clientCTest/goods_img@2x.png',
},
color: '#181818'
......
......@@ -35,7 +35,7 @@ Page({
init() {
this.setData({
task: {
taskType: 'orderGoods',
taskType: 'orderDepositGoods',
type: '01',
image: {
bg: '//yun.duiba.com.cn/spark/assets/bd40dc26018211c59d937ad8e1ddd7ae1de09db6.png',
......
......@@ -90,6 +90,7 @@
onGivingCard="givingCard"
onIndexDoHelp="indexDoHelp"
onShowPanel="showPanel"
onDoBoxDraw="doBoxDraw"
onTapHiddenPanelEvent="hiddenPanelEvent"/>
<canvas id="canvas" type="2d" onReady="onCanvasReady"></canvas>
<view a:if={{disibleAll}} class="disibleAll"></view>
......
......@@ -6,7 +6,7 @@ const app = getApp();
const { tbcc } = app;
const { SHARE_CONFIG, REDIRECT_URL } = tbcc.constants;
import API from '../../api';
import { DataCenter } from '../../DataCenter';
import { BuriedClick, BuriedType, DataCenter } from '../../DataCenter';
const { commonToast, getAuthUserInfo, navigateToOutside,checkShopFavoredStatus } = tbcc.tb;
import lottie from '@tbminiapp/lottie-miniapp'
import events from '../../events';
......@@ -141,6 +141,7 @@ Page({
if (this.inviteId) {
// commonToast('首页助力类型,这是被邀请人页面'+this.inviteId)
events.emit("doDisibleAll",true)
BuriedClick(BuriedType.HELP_BTN)
const { activityId } = getApp();
//获取活动基础信息
let doHelp = await API.doHelp({ activityId,inviteId:this.inviteId }).catch(res => {
......@@ -289,17 +290,38 @@ Page({
this.showPanel("invitesuccesspanel")
}
},
//需要卡牌种类的数量
onTapUnlockPrizesItem(e){
//如果活动结束或者为开始就中断点击事件
let needCardTypes = e.target.dataset.value;
this.drawLotteryPrize(7,needCardTypes)
},
//需要的抽卡次数
onTapIndexDrawItem(e){
//如果活动结束或者为开始就中断点击事件
let needTimes = e.target.dataset.value;
this.drawLotteryPrize(8,needTimes)
},
doBoxDraw(){
let {
joinedTimesPrizeList,
collectedCardTypePrizeList,
} = DataCenter.CollectCardInfo;
//先查找种类奖池
for(let item of collectedCardTypePrizeList.reverse()){
if(item.status==2){
this.drawLotteryPrize(7,item.needCardTypes)
return false;
}
}
//再查找次数解锁奖池
for(let item of joinedTimesPrizeList.reverse()){
if(item.status==2){
this.drawLotteryPrize(8,item.needTimes)
return false;
}
}
},
inviteTask(){
BuriedClick(BuriedType.INVITE_BTN)
DataCenter.shareType="invite";
DataCenter.shareData={
shareImage:DataCenter.BaseInfo.tasks.invites.shareImage,
......@@ -313,6 +335,7 @@ Page({
if(this.isNotBegin()||this.isEnd()){
return false;
}
BuriedClick(BuriedType.GIVING_CARD_BTN)
DataCenter.shareType="givingCard";
DataCenter.shareData={
shareImage:DataCenter.BaseInfo.shareImage,
......@@ -407,6 +430,7 @@ Page({
if(this.isNotBegin()||this.isEnd()){
return false;
}
BuriedClick(BuriedType.MY_CARD_BTN)
events.emit("doDisibleAll",true)
const { activityId } = getApp();
//获取中奖轮播
......@@ -426,6 +450,7 @@ Page({
if(this.isNotBegin()||this.isEnd()){
return false;
}
BuriedClick(BuriedType.TASK_BTN)
events.emit("doDisibleAll",true)
const { activityId } = getApp();
//获取中奖轮播
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment