Authored by QC-L

更新轮播图效果 review by 黄敬囿

... ... @@ -63,29 +63,20 @@ export default class Focus extends Component {
return (
<View className='swiper-bg'>
<ScrollView
scrollX
className='index-swiper'
onScroll={this.onScroll}
scrollWithAnimation
scrollLeft={scrollTop}
scrollIntoView={focusID}
>
{
floor.map((item, index) => {
return (
<Image
key={ index }
id={ 'focus' + index }
onClick={ this.goToResource.bind(this, item) }
src={ getImgUrl(item.src, 670, 280) }
mode="aspectFill"
/>
)
})
}
<View className="noneView"></View>
</ScrollView>
<Swiper
className='index-swiper'
>
{
floor.map((item, index) => {
return (
<SwiperItem key={index}>
<Image onClick={this.goToResource.bind(this, item)} src={getImgUrl(item.src, 670, 280)} mode="aspectFill" />
</SwiperItem>
)
})
}
</Swiper>
</View>
)
}
... ...
... ... @@ -20,15 +20,13 @@
}
image {
width: 670px;
width: 655px;
height: 280px;
margin-right: 20px;
}
.noneView {
width: 60px;
height: 280px;
display: inline-block;
wx-swiper-item {
width: 91% !important;
margin-right: 40px !important;
}
}
... ...