|
@@ -1,9 +1,16 @@
|
|
|
<!--nova-werun/pages/home/sport/sport-home/index.wxml-->
|
|
|
<nav type="back" title="运动" background-color="{{'#4F9AF7'}}" front-color="{{'#333333'}}"></nav>
|
|
|
<view class="all" style="height: {{contentHeight}}rpx;">
|
|
|
+ <view class="tab-bar">
|
|
|
+ <view style="margin-left: 66rpx;" class="tab-item {{currentTab == 0? 'active' : ''}}" bindtap="switchTab" data-index="0">
|
|
|
+ 步行
|
|
|
+ </view>
|
|
|
+ <view style="margin-left: 44rpx;" class="tab-item {{currentTab == 1? 'active' : ''}}" bindtap="switchTab" data-index="1">
|
|
|
+ 跑步
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<!-- 走路 -->
|
|
|
- <van-tabs tab-class='tab' active="{{ active }}" color='#0178EE' title-active-color='#0178EE' title-inactive-color='black'>
|
|
|
- <van-tab title="步行">
|
|
|
+ <view wx:if="{{currentTab == 0}}">
|
|
|
<view class="textbox">
|
|
|
<view class="text">今日积累行走</view>
|
|
|
<view class="number" data-url="../../statistics/index" bindtap="gourl">7公里 ></view>
|
|
@@ -14,9 +21,9 @@
|
|
|
</view>
|
|
|
<view class="button" data-url="../sport-start/index" bindtap="gourl">GO</view>
|
|
|
</view>
|
|
|
- </van-tab>
|
|
|
- <!-- 跑步 -->
|
|
|
- <van-tab title="跑步">
|
|
|
+ </view>
|
|
|
+ <!-- 跑步 -->
|
|
|
+ <view wx:if="{{currentTab == 1}}">
|
|
|
<view class="textbox">
|
|
|
<view class="text">今日积累跑步</view>
|
|
|
<view class="number" data-url="../../statistics/index" bindtap="gourl">10公里 ></view>
|
|
@@ -27,6 +34,5 @@
|
|
|
</view>
|
|
|
<view class="button" data-url="../sport-start/index" bindtap="gourl">GO</view>
|
|
|
</view>
|
|
|
- </van-tab>
|
|
|
- </van-tabs>
|
|
|
+ </view>
|
|
|
</view>
|