Feat(页面):页面埋点配置
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
<script>
|
||||
import {getSeason, getSeasonPoster} from "@/api/product";
|
||||
import cookie from "@/utils/store/cookie";
|
||||
import {getUrlParam} from "@/utils/common.js";
|
||||
import {getSeason, getSeasonPoster} from '@/api/product'
|
||||
import cookie from '@/utils/store/cookie'
|
||||
import {getUrlParam} from '@/utils/common.js'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
@@ -12,15 +14,18 @@ export default {
|
||||
info: null,
|
||||
current: 0,
|
||||
showShare: false,
|
||||
posterUrl: "", // 分享海报
|
||||
posterUrl: '', // 分享海报
|
||||
pageKeyId: ''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.id) {
|
||||
this.id = options.id || null;
|
||||
this.partnerId = options.partnerId || null;
|
||||
const id = options.id
|
||||
if (id) {
|
||||
this.id = id || null
|
||||
this.pageKeyId = `seasonalFoodContent_id_${id}`
|
||||
this.partnerId = options.partnerId || null
|
||||
} else {
|
||||
let obj = uni.getEnterOptionsSync();
|
||||
const obj = uni.getEnterOptionsSync()
|
||||
if (options.scene || obj.query.scene) {
|
||||
let query = options ? decodeURIComponent(options.scene) : decodeURIComponent(obj.query.scene);
|
||||
this.id = getUrlParam(query, "id") || null;
|
||||
@@ -131,7 +136,12 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
goGoods(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/shop/GoodsCon/index?id=${id}&from=season`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -168,7 +178,7 @@ export default {
|
||||
<image class="bg-img" :src="info.productImage" mode="widthFix"/>
|
||||
<!-- <scroll-view scroll-y class="product-list" :style="{backgroundImage:'url(' + info.productImage + ')'}">-->
|
||||
<scroll-view scroll-y class="product-list">
|
||||
<image class="item" :src="item.image" mode="widthFix" @click="$global.navToGoods(item.id)"
|
||||
<image class="item" :src="item.image" mode="widthFix" @click="goGoods(item.id)"
|
||||
v-for="(item,index) in info.products" :key="index"/>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user