<view class="top-nav"> <scroll-view class="scroll-wrapper" scroll-x scroll-with-animation="true" scroll-into-view="item{{currentTab < 4 ? 0 : currentTab - 3}}" catchtouchmove="preventTouchMove" > <view class="navigate-item" id="item{{index}}" wx:for="{{navTitle}}" wx:key="{{index}}" data-index="{{index}}" bindtap="handleClick"> <view class="names {{currentTab === index ? 'active' : ''}}">{{item.title}}</view> <view class="currtline {{currentTab === index ? 'active' : ''}}"></view> </view> </scroll-view> <!-- 下拉按钮 --> <view class="pull-down" bindtap="pullDown"> <view class="icon-right"></view> </view> </view> <!-- 对应的内容区 --> <block wx:for="{{list}}" wx:key="{{index}}"> <view class="content"> <view class="indexNumber"> <!-- 此处写法不对,到了两位数的时候就不行了,并无好的方法,这里应该是后端给的数据 --> <view>0{{index}}</view> </view> <image src="{{item.albumCoverUrl290}}"></image> <view class="content-left"> <view class="content-title">{{item.title}}</view> <view class="content-text">{{item.trackTitle}}</view> <view class="count"> <view style="margin-right:25rpx;"> <!-- 本例中33.2亿的单位是写死的,此处应该是后端返回数据吧 --> <text class="icon"></text> <text class="">33.2亿</text> </view> <view> <text class="icon"></text> <text class="">44集</text> </view> </view> </view> </view> </block> <!-- 蒙布 --> <!-- <view class="cover"> <view class=""> <view class=""> 撒大赛 </view> </view> </view> -->