Authored by baoss

优化首页商品列表及点击埋点

... ... @@ -25,9 +25,9 @@
<div ref="scrollNav" class="scroll-nav-wrap" v-if="navList.length">
<ScrollNav :list="navList" :current="active" @transfer="getIndex"></ScrollNav>
</div>
<div class="list-wrap">
<ProductList ref="product" :list="productList.list" :yasParams="listYasParams" v-if="productList.list.length > 0"></ProductList>
<UfoNoItem class="channel-no-item" :style="noItemStyle" :tip="`暂无数据`" v-else></UfoNoItem>
<div class="list-wrap" :style="minHeight">
<ProductList ref="product" :list="productList.list" yasEventName="XY_UFO_MAIN_EVENT" :yasParams="listYasParams" v-if="productList.list.length > 0"></ProductList>
<UfoNoItem class="channel-no-item" :tip="`暂无数据`" v-else></UfoNoItem>
</div>
</div>
</LayoutScroll>
... ... @@ -122,9 +122,9 @@ export default {
F_INDEX: index + 1
};
},
noItemStyle() {
minHeight() {
return {
height: this.total + 'px'
minHeight: this.total + 'px'
};
}
},
... ... @@ -306,7 +306,7 @@ export default {
this.guessLikeListParams({index, ...params});
// 商品列表曝光
this.listScrollY > 0 && this.$refs.product && this.$refs.product.yasShowEvent(this.yasHeight);
this.productList.list.length > 0 && this.listScrollY > 0 && this.$refs.product && this.$refs.product.yasShowEvent(this.yasHeight);
},
scrollEndHandler({y}) {
let scrollHeight = Math.abs(y);
... ... @@ -453,7 +453,6 @@ export default {
.yohoufo-channel-page {
background-color: #fefefe;
}
.scroll-nav-wrap {
position: relative;
... ...
... ... @@ -22,6 +22,10 @@ export default {
props: {
list: Array,
yasParams: Object,
yasEventName: {
type: String,
default: 'XY_UFO_PRD_LIST_C'
},
priceKey: {
type: String,
default: 'available_now_price',
... ... @@ -114,7 +118,7 @@ export default {
this.$store.dispatch('reportYas', {
params: {
param: {...this.yasParams, I_INDEX: index + 1, PRD_ID: id },
appop: 'XY_UFO_PRD_LIST_C'
appop: this.yasEventName
}
});
}
... ...