Authored by baoss

去掉多余代码

... ... @@ -17,10 +17,10 @@
<input class="search-input" type="search" disabled="true" placeholder="搜索商品名称或货号"/>
</div>
<template v-for="(item, index) in channelList.list">
<Swiper @click="getParams" :list="item.data" :ref="index" :key="index" v-if="item.template_name == 'threePicture'"/>
<Hot :list="item.data" :ref="index" :key="index" v-if="item.template_name == 'image_list'"/>
<Banner :list="item.data" :ref="index" :key="index" v-if="item.template_name == 'single_image'"/>
<TwoBanner :list="item.data" :ref="index" :key="index" v-if="item.template_name == 'twoPicture'"/>
<Swiper @click="getParams" :list="item.data" :key="index" v-if="item.template_name == 'threePicture'"/>
<Hot :list="item.data" :key="index" v-if="item.template_name == 'image_list'"/>
<Banner :list="item.data" :key="index" v-if="item.template_name == 'single_image'"/>
<TwoBanner :list="item.data" :key="index" v-if="item.template_name == 'twoPicture'"/>
</template>
</div>
<div ref="scrollNav" class="scroll-nav-wrap" v-if="navList.length">
... ... @@ -134,16 +134,8 @@ export default {
this.navHeight = get(this.$refs, 'scrollNav.offsetHeight') || 0;
this.total = this.$refs.scroll.$el.offsetHeight - this.navHeight;
this.refreshProductList(this.active);
this.getReportEle()
});
},
// 曝光上报
getReportEle() {
this.channelList.list.forEach((item, index) => {
console.log(this.$refs[index])
})
},
getIndex(index) {
this.active = Number(index);
this.$refs.scroll.scrollTo(0, -this.navTop, 300);
... ...