<view id="green" class="scroll-view-item {{ current == index ? 'active' :'' }} " bindtap="yearselect" wx:for="{{year}}" wx:key="{{index}}" data-year="{{item}}" data-index="{{index}}">{{item}}</view>
yearselect(e){
this.setData({
yearselect:e.currentTarget.dataset.year,
current:e.currentTarget.dataset.index
})
},
.active{
background: #62B0F2;
color: #fff;
}