97 lines
3.9 KiB
Plaintext
97 lines
3.9 KiB
Plaintext
![]() |
<!--subpackage/train/bluetooth/train.wxml-->
|
||
|
<view class="page-container page-content">
|
||
|
<mp-bar background="linear-gradient(190deg, #49a5fc 0%, #f7f7f7 800rpx, #f7f7f7 100%)" title="训练" ></mp-bar>
|
||
|
|
||
|
<view class="homeWork" wx:if="{{homeWorkId}}">
|
||
|
<view class="homework-item">
|
||
|
<view>模式</view>
|
||
|
<text class="detail">{{tabName == 'time'?'定时计数':'定数计时'}}</text>
|
||
|
</view>
|
||
|
|
||
|
<view class="homework-item" wx:if="{{tabName == 'time'}}">
|
||
|
<view>时长</view>
|
||
|
<text class="detail">{{totalTime/60}}分钟</text>
|
||
|
</view>
|
||
|
<view class="homework-item" wx:else>
|
||
|
<view>数量</view>
|
||
|
<text class="detail">{{number}}个</text>
|
||
|
</view>
|
||
|
<view class="homework-item">
|
||
|
<view>组数</view>
|
||
|
<text class="detail">{{groupNumber}}组</text>
|
||
|
</view>
|
||
|
<view class="homework-item">
|
||
|
<view>已完成组数</view>
|
||
|
<text class="finish">{{nowGroup - 1}}组</text>
|
||
|
</view>
|
||
|
</view>
|
||
|
|
||
|
|
||
|
<view class="action-panel" style="height:{{isStarting?'0rpx':isRunning? '220rpx': '600rpx'}};">
|
||
|
|
||
|
|
||
|
<view class="title" wx:if="{{!homeWorkId}}">
|
||
|
<view class="title-before"></view>{{tabName== 'time'?'定时计数':tabName== 'num'?'定数计时':'自由训练'}}
|
||
|
</view>
|
||
|
<view class="title" wx:else>
|
||
|
<view class="title-before"></view>{{tabName== 'time'?'倒计时':tabName== 'num'?'本组剩余数':'自由训练'}}
|
||
|
</view>
|
||
|
|
||
|
<view class="count" >
|
||
|
<text wx:if="{{tabName == 'time'}}">{{timeStr}}</text>
|
||
|
<text wx:if="{{tabName == 'num'}}">{{(number - counts) < 0 ? 0 : (number - counts)}}</text>
|
||
|
<text wx:if="{{tabName == 'nothing'}}">∞</text>
|
||
|
</view>
|
||
|
|
||
|
<view class="ddd" wx:if="{{homeWorkId}}">
|
||
|
<view class="showDetail" wx:if="{{tabName== 'time'}}">
|
||
|
已完成 <text class="shengyu">{{counts - (totalCount || 0)}}</text>
|
||
|
</view>
|
||
|
<view class="showDetail" wx:else>
|
||
|
计时 <text class="shengyu">{{timeStr}}</text>
|
||
|
</view>
|
||
|
</view>
|
||
|
|
||
|
<view class="stat-item" wx:if="{{tabName == 'num' && !homeWorkId}}">
|
||
|
<image src="https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/train/naozhong-icon.png" class="stat-img" />
|
||
|
{{timeStr}}
|
||
|
</view>
|
||
|
|
||
|
<view class="stat-item" wx:if="{{tabName != 'num' &&!homeWorkId}}">
|
||
|
<image src="https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/train/geshu-icon.png" class="stat-img" />
|
||
|
<view>{{counts}}<text class="unit">个</text></view>
|
||
|
</view>
|
||
|
|
||
|
<view class="stat" wx:if="{{!homeWorkId}}">
|
||
|
<view class="stat-item">
|
||
|
<image src="https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/train/jishi-icon.png" class="stat-img" />
|
||
|
<view>{{speed || 0}}<text class="unit">个/秒</text></view>
|
||
|
</view>
|
||
|
|
||
|
|
||
|
|
||
|
<view class="stat-item">
|
||
|
<image src="https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/train/kaluli-icon.png" class="stat-img" />
|
||
|
<view>{{counts/10}}<text class="unit">千卡</text></view>
|
||
|
</view>
|
||
|
</view>
|
||
|
|
||
|
<view class="button-list">
|
||
|
<button class="control-button go-b" bind:tap="beginCountdown" wx:if="{{(!isRunning || isStart) && canSport}}">
|
||
|
<mp-icon icon="play" color="#fff" type="field" size="{{40}}"></mp-icon>
|
||
|
</button>
|
||
|
|
||
|
<button class="control-button back-b" bind:tap="stop" wx:if="{{isRunning}}">
|
||
|
<mp-icon icon="pause" color="#fff" type="field" size="{{40}}"></mp-icon>
|
||
|
</button>
|
||
|
|
||
|
<button class="control-button stop-b" bind:tap="handleLongPressEnd" bindtouchstart="handleTouchStart" bindtouchend="handleTouchEnd" wx:if="{{!isRunning&&!isStart && (!homeWorkId || ((nowGroup - 1) == groupNumber))}}">
|
||
|
<view class="stop-b-v"></view>
|
||
|
<view class="ripple" wx:if="{{showRipple}}"></view>
|
||
|
</button>
|
||
|
</view>
|
||
|
</view>
|
||
|
<view class="timeout" wx:if="{{isStarting}}">
|
||
|
{{countdown == 0 ?'GO!' : countdown}}
|
||
|
</view>
|
||
|
</view>
|