Commit ca83ff97 by 李伟康

commit 修复

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