Commit e866833a by zhangxw

埋点

1 parent 037447bf
...@@ -78,13 +78,13 @@ Page({ ...@@ -78,13 +78,13 @@ Page({
navigationBarHeight: 0, navigationBarHeight: 0,
scrollTop: 0, scrollTop: 0,
setScrollTop: 0, setScrollTop: 0,
track_event_code: 'customer_view_page', track_event_code: 'sales_customer_view_page',
personParams: {} // 总监通过销售人员进入参数 personParams: {} // 总监通过销售人员进入参数
}, },
// 总监有查看某个员工的潜客数据,手动触发时,将员工过滤条件清除 // 总监有查看某个员工的潜客数据,手动触发时,将员工过滤条件清除
onTabItemTap(e) { onTabItemTap(e) {
// 点击埋点 // 点击埋点
wx.$track.setTrackData(0, 'customer_page', {}, '') wx.$track.setTrackData(0, 'sales_customer_page', {}, '')
// 重新加载数据 // 重新加载数据
this.setData({ this.setData({
myTabIdx: 0, myTabIdx: 0,
......
import { getUserInfo } from '~/utils/cache/userInfo' import { getUserInfo } from '~/utils/cache/userInfo'
import reportPageTrackMixin from '~/mixins/reportPageTrackMixin'
Page({ Page({
// behaviors: [kfMixin], // behaviors: [kfMixin],
behaviors: [reportPageTrackMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
navStyle: 'background-color: rgba(0,0,0,0);' navStyle: 'background-color: rgba(0,0,0,0);',
track_event_code: 'sales_index_view_page'
}, },
// navbar高度设置 // navbar高度设置
// navbarReady(e) { // navbarReady(e) {
...@@ -14,6 +17,10 @@ Page({ ...@@ -14,6 +17,10 @@ Page({
// headerHeight: height / 2 + statusBarHeight // headerHeight: height / 2 + statusBarHeight
// }) // })
// }, // },
onTabItemTap(e) {
// 点击埋点
wx.$track.setTrackData(0, 'sales_index_page', {}, '')
},
navbarReady(e) { navbarReady(e) {
let navBarHeight = e.detail.height let navBarHeight = e.detail.height
this.setData({ this.setData({
...@@ -25,7 +32,7 @@ Page({ ...@@ -25,7 +32,7 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
const userInfo = getUserInfo() const userInfo = getUserInfo()
wx.$track.setTrackData(0, 'sales_index_page', {}, '')
//解决因为使用await 异步导致数据没同步已经开始调用onshow方法 //解决因为使用await 异步导致数据没同步已经开始调用onshow方法
this.setData({ this.setData({
userInfo, userInfo,
...@@ -43,16 +50,22 @@ Page({ ...@@ -43,16 +50,22 @@ Page({
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: async function () {}, onShow: async function () {
this.onPageShow()
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () {}, onHide: function () {
this.onPageHide()
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () {}, onUnload: function () {
this.onPageHide()
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
......
// pages/tab/tool/tool.js // pages/tab/tool/tool.js
import reportPageTrackMixin from '~/mixins/reportPageTrackMixin'
Page({ Page({
behaviors: [reportPageTrackMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
toolsList: [{ name: '销售日报', url: '/pages/tool/qrcode/qrcode' }] toolsList: [{ name: '销售日报', url: '/pages/tool/qrcode/qrcode' }],
track_event_code: 'sales_tool_view_page'
}, },
toSalesDailyReport() { toSalesDailyReport() {
let { loginRole } = wx.$storage.get('userInfo') let { loginRole } = wx.$storage.get('userInfo')
...@@ -18,6 +21,10 @@ Page({ ...@@ -18,6 +21,10 @@ Page({
}[loginRole] }[loginRole]
wx.$router.go(path) wx.$router.go(path)
}, },
onTabItemTap(e) {
// 点击埋点
wx.$track.setTrackData(0, 'sales_tool_page', {}, '')
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -31,17 +38,23 @@ Page({ ...@@ -31,17 +38,23 @@ Page({
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() {}, onShow() {
this.onPageShow()
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() {
this.onPageHide()
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() {
this.onPageHide()
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!