Browse Source

埋点

master
chenkainan 10 months ago
parent
commit
fbf28d7cfe
  1. 1
      main.js
  2. 10
      subPackages/eventCalendar/detail.vue
  3. 8
      subPackages/eventCalendar/eventCalendar.vue
  4. 4
      subPackages/search/search.vue

1
main.js

@ -56,6 +56,7 @@ QDTracker.track('navButtonClick', {buttonName: '123', buttonSort: '123'});
// 小程序与web统一变量 // 小程序与web统一变量
qdTracker = QDTracker; qdTracker = QDTracker;
// a 事件code b 对象参数
Vue.prototype.qdTracker = (a, b) => { Vue.prototype.qdTracker = (a, b) => {
QDTracker.track(a, b); QDTracker.track(a, b);
} }

10
subPackages/eventCalendar/detail.vue

@ -81,6 +81,16 @@
} }
// res.data.is_collect = 0 // // res.data.is_collect = 0 //
this.info = res.data; this.info = res.data;
let param = {
title: this.info.title,
activityID: this.info.id,
ActivityCategory: uni.getStorageSync('ActivityCategory'),
ActivityDate: this.info.start_time,
visitSource: this.getVisitSource()
}
this.qdTracker('viewProductDetail', param)
}); });
}, },
// //

8
subPackages/eventCalendar/eventCalendar.vue

@ -44,11 +44,12 @@
<view class="box"> <view class="box">
<view class="search-box"> <view class="search-box">
<img src="https://static.ticket.sz-trip.com/yandu/images/eventCalendar/search.png" class="search-img" /> <img src="https://static.ticket.sz-trip.com/yandu/images/eventCalendar/search.png" class="search-img" />
<input type="text" placeholder="搜索" v-model="keywords" @confirm="getList()"/> <input type="text" placeholder="搜索" v-model="keywords" @confirm="getList();qdTracker('searchActivity', {searchKeyword: keywords})"/>
</view> </view>
<view class="type-box flex-between"> <view class="type-box flex-between">
<view :class="['type-item',{'type-active': index == typeIndex}]" v-for="(item,index) in typeList" :key="index" @click="typeIndex = index;getList()"> <view :class="['type-item',{'type-active': index == typeIndex}]" v-for="(item,index) in typeList" :key="index"
@click="typeIndex = index;getList();qdTracker('activityCategoryClick', {buttonName: item.title, buttonSort: index})">
{{item.title}} {{item.title}}
</view> </view>
</view> </view>
@ -357,11 +358,14 @@
this.pageNo = 0 this.pageNo = 0
this.list = [] this.list = []
this.getList() this.getList()
this.qdTracker('activityCalendarClick', {CalendarDate: this.selectDay})
} }
}, },
viewDetail (item) { viewDetail (item) {
this.goOtherDetail(item) this.goOtherDetail(item)
if(!item.link_type) { if(!item.link_type) {
uni.setStorageSync('ActivityCategory', this.typeList[this.typeIndex].title)
uni.navigateTo({ uni.navigateTo({
url:'/subPackages/eventCalendar/detail?id='+item.id url:'/subPackages/eventCalendar/detail?id='+item.id
}) })

4
subPackages/search/search.vue

@ -3,8 +3,8 @@
<title-header title='搜索'></title-header> <title-header title='搜索'></title-header>
<div class="search-box"> <div class="search-box">
<img src="https://static.ticket.sz-trip.com/taizhou/images/search.png" alt=""> <img src="https://static.ticket.sz-trip.com/taizhou/images/search.png" alt="">
<input type="text" class="input" placeholder="请输入关键字" v-model="keywords" @confirm="search" /> <input type="text" class="input" placeholder="请输入关键字" v-model="keywords" @confirm="search();qdTracker('searchContent', {searchKeyword: keywords})" />
<div class="btn" @click="search()">搜索</div> <div class="btn" @click="search();qdTracker('searchContent', {searchKeyword: keywords})">搜索</div>
</div> </div>
<div class="search-title com-flex-tao"> <div class="search-title com-flex-tao">
搜索历史 搜索历史

Loading…
Cancel
Save