...
|
...
|
@@ -70,6 +70,7 @@ export default { |
|
|
isShow: false,
|
|
|
total: 0,
|
|
|
active: 0,
|
|
|
yasHeight: 0,
|
|
|
listBaseParams: {
|
|
|
isHome: true,
|
|
|
},
|
...
|
...
|
@@ -107,18 +108,19 @@ export default { |
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['channelList','contentCode']),
|
|
|
...mapState(['channelList', 'contentCode']),
|
|
|
navList() {
|
|
|
return get(find(this.channelList.list, ['template_name', 'guessLike']), 'data') || [];
|
|
|
},
|
|
|
navInfo() {
|
|
|
let index = findIndex(this.channelList.list, ['template_name', 'guessLike'])
|
|
|
let id = get(find(this.channelList.list, ['template_name', 'guessLike']), 'template_id')
|
|
|
let index = findIndex(this.channelList.list, ['template_name', 'guessLike']);
|
|
|
let id = get(find(this.channelList.list, ['template_name', 'guessLike']), 'template_id');
|
|
|
|
|
|
return {
|
|
|
F_ID: id,
|
|
|
F_NAME: 'guessLike',
|
|
|
F_INDEX: index + 1
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
noItemStyle() {
|
|
|
return {
|
...
|
...
|
@@ -167,7 +169,7 @@ export default { |
|
|
this.refreshProductList(this.active);
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['fetchChannelList','getAllInboxCatInfo']),
|
|
|
...mapActions(['fetchChannelList', 'getAllInboxCatInfo']),
|
|
|
...mapActionsList(['fetchProductList']),
|
|
|
init() {
|
|
|
this.$nextTick(() => {
|
...
|
...
|
@@ -295,26 +297,30 @@ export default { |
|
|
I_INDEX: Number(params.index) + 1,
|
|
|
TAB_ID: Number(params.index) + 1,
|
|
|
TAB_NAME: params.title});
|
|
|
console.log(this.listYasParams)
|
|
|
}
|
|
|
},
|
|
|
getIndex({index, params}) {
|
|
|
this.selectedCategory = params;
|
|
|
this.active = Number(index);
|
|
|
this.isShow && this.$refs.scroll.scrollTo(this.navTop);
|
|
|
|
|
|
// this.setYasParam({index, ...params});
|
|
|
this.guessLikeListParams({index, ...params});
|
|
|
|
|
|
// 商品列表曝光
|
|
|
this.listScrollY > 0 && this.$refs.product && this.$refs.product.yasShowEvent(this.listScrollY);
|
|
|
this.listScrollY > 0 && this.$refs.product && this.$refs.product.yasShowEvent(this.yasHeight);
|
|
|
},
|
|
|
scrollEndHandler({y}) {
|
|
|
let scrollHeight = Math.abs(y);
|
|
|
let viewHeight = this.$refs.scroll.$el.offsetHeight;
|
|
|
let productListTop = this.$refs.product && this.$refs.product.$el.offsetTop || this.navTop + this.navHeight;
|
|
|
let listScrollY = scrollHeight + viewHeight - productListTop;
|
|
|
this.listScrollY = listScrollY
|
|
|
|
|
|
this.listScrollY = listScrollY;
|
|
|
this.yasHeight = scrollHeight - this.navTop;
|
|
|
|
|
|
// 商品列表曝光
|
|
|
listScrollY > 0 && this.$refs.product && this.$refs.product.yasShowEvent(listScrollY);
|
|
|
listScrollY > 0 && this.$refs.product && this.$refs.product.yasShowEvent(this.yasHeight);
|
|
|
if (scrollHeight >= this.navTop) {
|
|
|
return;
|
|
|
}
|
...
|
...
|
|