|
|
<template>
|
|
|
<LayoutApp :show-back="true" :hide-header="hideHeader">
|
|
|
<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" :cur="cur"></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" :cur="cur" @transfer="getIndex"></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,7 +70,7 @@ export default { |
|
|
isShow: false,
|
|
|
total: 0,
|
|
|
marginTop: 0,
|
|
|
cur: 0,
|
|
|
active: 0,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
...
|
...
|
@@ -95,8 +95,7 @@ export default { |
|
|
},
|
|
|
methods: {
|
|
|
getIndex(index) {
|
|
|
this.cur = index;
|
|
|
console.log(this.cur);
|
|
|
this.active = Number(index);
|
|
|
},
|
|
|
scrollHandler({ y }) {
|
|
|
let scrollY = Math.abs(parseInt(y));
|
...
|
...
|
@@ -198,4 +197,7 @@ export default { |
|
|
left: 0;
|
|
|
z-index: 999;
|
|
|
}
|
|
|
.marginTop {
|
|
|
margin-top: 64px;
|
|
|
}
|
|
|
</style> |
...
|
...
|
|