...
|
...
|
@@ -3,7 +3,7 @@ |
|
|
<div class="scroll-list-wrap">
|
|
|
<template v-if="isShow">
|
|
|
<div v-for="(item, index) in channelList.list" v-if="item.template_name == 'guessLike'">
|
|
|
<ScrollNav :list="item.data.list"></ScrollNav>
|
|
|
<ScrollNav :list="item.data.list" :current="active"></ScrollNav>
|
|
|
</div>
|
|
|
</template>
|
|
|
<Scroll
|
...
|
...
|
@@ -23,12 +23,12 @@ |
|
|
<TwoBanner :list="item.data" v-if="item.template_name == 'twoPicture'"/>
|
|
|
<template v-if="!isShow">
|
|
|
<div ref="sss" v-if="item.template_name == 'guessLike'">
|
|
|
<ScrollNav :list="item.data.list"></ScrollNav>
|
|
|
<ScrollNav :list="item.data.list" :current="active" @transfer="getIndex"></ScrollNav>
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div :style="{minHeight: total + 'px'}">
|
|
|
<div :style="{minHeight: total + 'px'}" :class="{marginTop: isShow}">
|
|
|
<ProductList :list="productList.list" v-if="productList.list.length > 0" class="bgColor"></ProductList>
|
|
|
<UfoNoItem :tip="`暂无数据`" v-else></UfoNoItem>
|
|
|
</div>
|
...
|
...
|
@@ -70,6 +70,7 @@ export default { |
|
|
isShow: false,
|
|
|
total: 0,
|
|
|
marginTop: 0,
|
|
|
active: 0,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
...
|
...
|
@@ -80,26 +81,22 @@ export default { |
|
|
const params = {
|
|
|
isPage: true,
|
|
|
isHome: true,
|
|
|
};
|
|
|
}
|
|
|
this.fetchChannelList().then((res) => {
|
|
|
let windowH = document.documentElement.clientHeight || document.body.clientHeight;
|
|
|
this.navTop = this.$refs.sss[0].offsetTop;
|
|
|
this.navHeight = this.$refs.sss[0].offsetHeight;
|
|
|
|
|
|
let windowH = document.documentElement.clientHeight || document.body.clientHeight;
|
|
|
this.total = windowH - this.navHeight;
|
|
|
console.log(windowH);
|
|
|
console.log(this.navHeight);
|
|
|
console.log(this.total);
|
|
|
console.log('______');
|
|
|
|
|
|
});
|
|
|
this.fetchProductList(params);
|
|
|
|
|
|
},
|
|
|
created() {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
getIndex(index) {
|
|
|
this.active = Number(index);
|
|
|
},
|
|
|
scrollHandler({ y }) {
|
|
|
let scrollY = Math.abs(parseInt(y));
|
|
|
if (scrollY >= this.navTop) {
|
...
|
...
|
@@ -200,4 +197,7 @@ export default { |
|
|
left: 0;
|
|
|
z-index: 999;
|
|
|
}
|
|
|
.marginTop {
|
|
|
margin-top: 64px;
|
|
|
}
|
|
|
</style> |
...
|
...
|
|