Feat(商品详情&店铺):来源模块数据埋点

This commit is contained in:
lifizer
2024-06-24 15:15:20 +08:00
parent 2226d665ad
commit 9ab00a372e
5 changed files with 131 additions and 8 deletions
+40 -3
View File
@@ -428,11 +428,13 @@ import {getUrlParam} from "@/utils/common.js"
import imgBox from '@/components/imageTypeSet/imagebox.vue'
import cookie from "@/utils/store/cookie"
import {addStore, removeStore} from "@/api/favorite"
import { pageListenMixins } from '@/mixins/pageListenMixins'
export default {
components: {
imgBox
},
mixins: [pageListenMixins],
data() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
@@ -469,7 +471,8 @@ export default {
{ text: '商家资质', value: 3, isShow: true }
],
isLoadGoodListoSuccess: false,
isLoadInfoListSuccess: false
isLoadInfoListSuccess: false,
pageKeyId: ''
}
},
// 必须在页面加 onPageScroll(e){} ,才能滑动显示背景
@@ -477,8 +480,42 @@ export default {
this.scrollData = e
},
onLoad(options) {
if (options.id) {
this.id = options.id || null
const id = options.id || ''
const from = options.from
switch (from) {
// 特产
case 'techan':
this.pageKeyId = `hotel_from_techan_hotelId_${id}`
break
// 千县
case 'famous':
this.pageKeyId = `hotel_from_famous_hotelId_${id}`
break
// 特色礼品
case 'gift':
this.pageKeyId = `hotel_from_gift_hotelId_${id}`
break
// 文玩
case 'wenwan':
this.pageKeyId = `hotel_from_wenwan_hotelId_${id}`
break
// 寻趣味
case 'fun':
this.pageKeyId = `hotel_from_findFun_hotelId_${id}`
break
// 养生圣地
case 'wellness':
this.pageKeyId = `hotel_from_wellnessPlace_hotelId_${id}`
break
// 民宿
case 'homestay':
this.pageKeyId = `product_from_countyFamous_productId_${id}`
break
default:
break
}
if (id) {
this.id = id || null
this.partnerId = options.partnerId || null
} else {
let obj = uni.getEnterOptionsSync()