Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
sales-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e866833a
authored
Oct 31, 2025
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
埋点
1 parent
037447bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
11 deletions
pages/tab/customer/customer.js
pages/tab/index/index.js
pages/tab/tool/tool.js
pages/tab/customer/customer.js
View file @
e866833
...
...
@@ -78,13 +78,13 @@ Page({
navigationBarHeight
:
0
,
scrollTop
:
0
,
setScrollTop
:
0
,
track_event_code
:
'customer_view_page'
,
track_event_code
:
'
sales_
customer_view_page'
,
personParams
:
{}
// 总监通过销售人员进入参数
},
// 总监有查看某个员工的潜客数据,手动触发时,将员工过滤条件清除
onTabItemTap
(
e
)
{
// 点击埋点
wx
.
$track
.
setTrackData
(
0
,
'customer_page'
,
{},
''
)
wx
.
$track
.
setTrackData
(
0
,
'
sales_
customer_page'
,
{},
''
)
// 重新加载数据
this
.
setData
({
myTabIdx
:
0
,
...
...
pages/tab/index/index.js
View file @
e866833
import
{
getUserInfo
}
from
'~/utils/cache/userInfo'
import
reportPageTrackMixin
from
'~/mixins/reportPageTrackMixin'
Page
({
// behaviors: [kfMixin],
behaviors
:
[
reportPageTrackMixin
],
/**
* 页面的初始数据
*/
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高度设置
// navbarReady(e) {
...
...
@@ -14,6 +17,10 @@ Page({
// headerHeight: height / 2 + statusBarHeight
// })
// },
onTabItemTap
(
e
)
{
// 点击埋点
wx
.
$track
.
setTrackData
(
0
,
'sales_index_page'
,
{},
''
)
},
navbarReady
(
e
)
{
let
navBarHeight
=
e
.
detail
.
height
this
.
setData
({
...
...
@@ -25,7 +32,7 @@ Page({
*/
onLoad
:
function
(
options
)
{
const
userInfo
=
getUserInfo
()
wx
.
$track
.
setTrackData
(
0
,
'sales_index_page'
,
{},
''
)
//解决因为使用await 异步导致数据没同步已经开始调用onshow方法
this
.
setData
({
userInfo
,
...
...
@@ -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
View file @
e866833
// pages/tab/tool/tool.js
import
reportPageTrackMixin
from
'~/mixins/reportPageTrackMixin'
Page
({
behaviors
:
[
reportPageTrackMixin
],
/**
* 页面的初始数据
*/
data
:
{
toolsList
:
[{
name
:
'销售日报'
,
url
:
'/pages/tool/qrcode/qrcode'
}]
toolsList
:
[{
name
:
'销售日报'
,
url
:
'/pages/tool/qrcode/qrcode'
}],
track_event_code
:
'sales_tool_view_page'
},
toSalesDailyReport
()
{
let
{
loginRole
}
=
wx
.
$storage
.
get
(
'userInfo'
)
...
...
@@ -18,6 +21,10 @@ Page({
}[
loginRole
]
wx
.
$router
.
go
(
path
)
},
onTabItemTap
(
e
)
{
// 点击埋点
wx
.
$track
.
setTrackData
(
0
,
'sales_tool_page'
,
{},
''
)
},
/**
* 生命周期函数--监听页面加载
*/
...
...
@@ -31,17 +38,23 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{},
onShow
()
{
this
.
onPageShow
()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{},
onHide
()
{
this
.
onPageHide
()
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{},
onUnload
()
{
this
.
onPageHide
()
},
/**
* 页面相关事件处理函数--监听用户下拉动作
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment