You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<!--index.wxml-->
|
|
|
|
<view class="container">
|
|
|
|
<scroll-view scroll-x="true" class="nav" scroll-left="{{navScrollLeft}}" scroll-with-animation="{{true}}">
|
|
|
|
<block wx:for="{{navData}}" wx:for-index="idx" wx:for-item="navItem" wx:key="idx">
|
|
|
|
<!-- 判断是否选中,选中设置样式 -->
|
|
|
|
<!-- switchNav -->
|
|
|
|
<view class="nav-item {{currentTab == idx ?'active':''}}" data-current="{{idx}}" bindtap="switchNav">
|
|
|
|
{{navItem.text}}</view>
|
|
|
|
</block>
|
|
|
|
</scroll-view>
|
|
|
|
<scroll-view class="scrollList" scroll-x="true" enable-flex="true">
|
|
|
|
<text wx:for="{{condition}}" class="{{index === 0 ? 'actived' : ''}}" wx:key="index">{{item}}</text>
|
|
|
|
</scroll-view>
|
|
|
|
<!-- 页面内容 -->
|
|
|
|
<!-- duration="300":滑动动画时长 -->
|
|
|
|
<!-- switchTab -->
|
|
|
|
<swiper class="tab-box" current="{{currentTab}}" duration="300" bindchange="switchTab">
|
|
|
|
<swiper-item wx:for="{{[0,1,2,3,4,5,6]}}" wx:for-item="tabItem" wx:for-index="idx" wx:key="idx"
|
|
|
|
class="tab-content">
|
|
|
|
{{tabItem}}
|
|
|
|
</swiper-item>
|
|
|
|
</swiper>
|
|
|
|
<view class="top">
|
|
|
|
<view wx:for="{{toplist}}" wx:key="url" class="top_box">
|
|
|
|
<!-- <view class="box_image">
|
|
|
|
<image style="width: 100%;height: 100%;" src="{{item.url}}"></image>
|
|
|
|
</view> -->
|
|
|
|
<view class="box_bot">
|
|
|
|
<image style="width: 100%;height: 100%;" src="{{item.url}}"></image>
|
|
|
|
<view class="box_title">{{item.title}}</view>
|
|
|
|
<view class="box_num">{{item.num}}</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<tabbar />
|
|
|
|
</view>
|