|
|
<template>
|
|
|
<LayoutApp :show-back="true">
|
|
|
<div class="scroll-list-wrap">
|
|
|
<template v-if="isShow">
|
|
|
<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" :cur="cur"></ScrollNav>
|
|
|
</div>
|
|
|
</template>
|
|
|
<Scroll
|
...
|
...
|
@@ -23,7 +23,7 @@ |
|
|
<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" :cur="cur" @transfer="getIndex"></ScrollNav>
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|
...
|
...
|
@@ -69,6 +69,7 @@ export default { |
|
|
isShow: false,
|
|
|
total: 0,
|
|
|
marginTop: 0,
|
|
|
cur: 0,
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
...
|
...
|
@@ -81,24 +82,22 @@ export default { |
|
|
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.cur = index;
|
|
|
console.log(this.cur);
|
|
|
},
|
|
|
scrollHandler({ y }) {
|
|
|
let scrollY = Math.abs(parseInt(y));
|
|
|
if(scrollY >= this.navTop) {
|
...
|
...
|
|