Commit ca83ff97 by 李伟康

commit 修复

1 parent c5dbdc71
......@@ -9,7 +9,7 @@ module.exports = Behavior({
this.setData({
track_timerFlag: false,
track_batchId: null,
track_page_view_flag: false
track_page_view_flag: false,
})
},
onPageShow() {
......@@ -24,16 +24,19 @@ module.exports = Behavior({
this.setBrowseTrackData()
},
onPageHide() {
if (this.timer) clearTimeout(this.timer)
this.setData({
track_timerFlag: false,
track_batchId: null,
track_page_view_flag: false
})
this.timer = null
},
setBrowseTrackData() {
try {
if (!this.data.track_timerFlag) return
else setTimeout(() => {
if (!this.data.track_timerFlag) return this.onPageHide()
else this.timer = setTimeout(() => {
this.setBrowseTrackData()
}, 10e3)
wx.$track.setTrackData(2, this.data.track_event_code, this.track_businessParam, this.data.track_batchId)
......
......@@ -1327,6 +1327,8 @@ Component({
wx.$router.go('packageEquity.receptionRecords')
wx.$track.setTrackData(0, 'see_more')
},
onHide(){
this.onPageHide()
}
},
});
\ No newline at end of file
......@@ -162,7 +162,6 @@ Page({
record: options
}, () => {
this.setAudio()
this.onPageShow()
})
}
......@@ -258,7 +257,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.onPageShow()
},
/**
......
......@@ -145,6 +145,7 @@ class TRACK {
prePagePath: prePagePath ? prePagePath.route : '/',
pagePath: route
}
// console.log(new Date().format('yyyy-MM-dd hh:mm:ss'),'当前页:',route,'=========')
if (batchId) item.batchId = batchId
if (eventCode) item.eventCode = eventCode
if (businessParam) item.businessParam = JSON.stringify(businessParam)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!