...
|
...
|
@@ -30,7 +30,7 @@ |
|
|
</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" :tip="`暂无数据`" v-else></UfoNoItem>
|
|
|
<UfoNoItem class="channel-no-item" :style="noItemStyle" :tip="`暂无数据`" v-else></UfoNoItem>
|
|
|
</div>
|
|
|
</div>
|
|
|
</Scroll>
|
...
|
...
|
@@ -115,6 +115,11 @@ export default { |
|
|
...mapState(['channelList']),
|
|
|
navList() {
|
|
|
return get(find(this.channelList.list, ['template_name', 'guessLike']), 'data') || [];
|
|
|
},
|
|
|
noItemStyle() {
|
|
|
return {
|
|
|
height: this.total + 'px'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
...
|
...
|
@@ -211,6 +216,7 @@ export default { |
|
|
});
|
|
|
},
|
|
|
setYasParam: function(params) {
|
|
|
console.log('setYas')
|
|
|
let {total, list} = this.productList;
|
|
|
|
|
|
if (params && typeof params === 'object' && Object.keys(params).length) {
|
...
|
...
|
@@ -249,14 +255,17 @@ export default { |
|
|
},
|
|
|
getIndex({index,params}) {
|
|
|
this.selectedCategory = params;
|
|
|
this.setYasParam({index,...params});
|
|
|
this.active = Number(index);
|
|
|
this.$refs.scroll.scrollTo(0, -this.navTop, 300);
|
|
|
this.setYasParam({index,...params});
|
|
|
},
|
|
|
scrollEndHandler({y}) {
|
|
|
let scrollHeight = Math.abs(y)
|
|
|
this.reportYas(scrollHeight)
|
|
|
this.$refs.product && this.$refs.product.yasShowEvent(scrollHeight+this.navTop);
|
|
|
if(scrollHeight === this.navTop) {
|
|
|
return
|
|
|
}
|
|
|
this.reportYas(scrollHeight)
|
|
|
},
|
|
|
scrollHandler({ y }) {
|
|
|
|
...
|
...
|
@@ -457,14 +466,13 @@ export default { |
|
|
|
|
|
.list-wrap {
|
|
|
background: #f2f2f2;
|
|
|
|
|
|
/deep/ .item {
|
|
|
position: relative;
|
|
|
z-index: 1;
|
|
|
}
|
|
|
|
|
|
.channel-no-item {
|
|
|
padding-top: 200px;
|
|
|
margin: 0 auto;
|
|
|
}
|
|
|
}
|
|
|
.yohoufo-channel-page {
|
...
|
...
|
|