Commit 43e884bd by Lin

fix:更新索引并在 HomeFrame 组件中添加预览点击埋点跟踪

1 parent c7bbaeab
...@@ -368,6 +368,7 @@ export default { ...@@ -368,6 +368,7 @@ export default {
tipsObject: {}, tipsObject: {},
autoplay: true, autoplay: true,
previewOff: false, previewOff: false,
previewClickIndex: -1,
showStudyPopup: false, showStudyPopup: false,
showExamPopup: false, showExamPopup: false,
examPopInfo: { examPopInfo: {
...@@ -973,6 +974,7 @@ export default { ...@@ -973,6 +974,7 @@ export default {
uni.$track.add({ uni.$track.add({
eventCode: 'app_product_Introduction' eventCode: 'app_product_Introduction'
}) //轻改场景不埋点 }) //轻改场景不埋点
this.previewClickIndex = e
this.previewOff = true this.previewOff = true
this.$emit('swiperClick', e) this.$emit('swiperClick', e)
}, },
...@@ -982,6 +984,15 @@ export default { ...@@ -982,6 +984,15 @@ export default {
}) })
}, },
previewHandler(name, off = false) { previewHandler(name, off = false) {
const item = this.moduleList[this.previewClickIndex]
if (name === 'preview' && item?.id) {
const businessParam = {
materialId: item.id,
title: item.title || item.detailTitle || item.materialTitle
}
console.log('previewHandler 埋点:', { eventCode: 'app-longImage-click', businessParam })
uni.$track.add({ eventCode: 'app-longImage-click', businessParam })
}
this.previewOff = off this.previewOff = off
this.$emit(name) this.$emit(name)
}, },
......
const target = ['ip', 'dev', 'uat', 'prod', 'beta'] const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 2 const index = 1
/** /**
* *
0本地 0本地
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!