|
|
|
@ -1,13 +1,25 @@
|
|
|
|
|
<!--index.wxml-->
|
|
|
|
|
<view>
|
|
|
|
|
<view wx:for="{{tabList}}"
|
|
|
|
|
wx:for-index="index"
|
|
|
|
|
wx:key="index"
|
|
|
|
|
label="{{item.text}}"
|
|
|
|
|
value="{{item.key}}"></view>
|
|
|
|
|
<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">
|
|
|
|
@ -21,4 +33,4 @@
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<tabbar />
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|