소스 검색

sport-start page

邹能昇 3 달 전
부모
커밋
a08eb8cef0

+ 9 - 0
nova-werun/pages/home/sport/sport-start/index.js

@@ -17,6 +17,8 @@ Page({
         longitude: 0,
         latitude: 0,
         markers: [],
+        //是否暂停
+        isstop:false,
     },
 
     /**
@@ -158,4 +160,11 @@ Page({
             }
         });
     },
+    stop(){
+       
+        this.setData({
+            isstop:!this.data.isstop
+        })
+        console.log(this.data.isstop);
+    },
 })

+ 24 - 1
nova-werun/pages/home/sport/sport-start/index.less

@@ -61,7 +61,7 @@
     }
     .btn{
         width: 350rpx;
-        height: 350rpx;
+        height: 320rpx;
         display: flex;
         justify-content: center;
         align-items: center;
@@ -76,5 +76,28 @@
             margin-top: 20rpx;
         }
     }
+    .stop{
+        width: 100%;
+        height: 320rpx;
+        display: flex;
+        justify-content: center;
+        .btn{
+            width: 300rpx;
+            height: 320rpx;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            flex-direction: column;
+            .pause{
+                width: 200rpx;
+                height: 200rpx;
+                margin-top: 25rpx;
+            }
+            .btn-text{
+                font-size: 30rpx;
+                margin-top: 20rpx;
+            }
+        }
+    }
 
 }

+ 13 - 2
nova-werun/pages/home/sport/sport-start/index.wxml

@@ -23,10 +23,21 @@
                 <view class="num-text">千卡</view>
             </view>
         </view>
-        <view class="btn">
-            <image class="pause" src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241112/but91q052754552.png?imageView2/1/w/200/h/200"></image>
+        <view class="btn" wx:if="{{!isstop}}">
+            <image class="pause" src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241112/but91q052754552.png?imageView2/1/w/200/h/200"  bindtap="stop"></image>
             <view class="btn-text">暂停</view>
         </view>
+        <view class="stop" wx:if="{{isstop}}">
+            <view class="btn">
+                <image class="pause" src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241113/0juf14093957533.png?imageView2/1/w/200/h/200" bindtap="stop"></image>
+                <view class="btn-text">继续</view>
+            </view>
+            <view class="btn">
+                <image class="pause" src="https://file-cloud.fmode.cn/qpFbRRSZrO/20241113/1lva96094128884.png?imageView2/1/w/200/h/200"></image>
+                <view class="btn-text">长按结束</view>
+            </view>
+        </view>
+
 
     </view>
 </view>

+ 1 - 1
nova-werun/pages/home/sport/sport-start/index.wxss

@@ -1 +1 @@
-.all{width:100vw}.all .map{width:100%;height:600rpx}.all .numberbox{width:100%;height:780rpx;display:flex;align-items:center;flex-direction:column}.all .numberbox .distance{display:flex;align-items:flex-end;margin-top:20rpx}.all .numberbox .distance .dis-num{height:132rpx;font-size:100rpx;display:flex;align-items:flex-end}.all .numberbox .distance .dis-text{height:132rpx;font-size:35rpx;display:flex;align-items:flex-end;padding-bottom:18rpx;margin-left:10rpx}.all .numberbox .number{width:100%;height:200rpx;display:flex;justify-content:space-between;margin-top:30rpx}.all .numberbox .number .num{height:100%;width:255rpx;display:flex;flex-direction:column;justify-content:center;align-items:center}.all .numberbox .number .num .num-num{font-size:50rpx;margin-bottom:18rpx}.all .numberbox .number .num .num-text{width:100%;display:flex;justify-content:center;align-items:center;font-size:28rpx}.all .btn{width:350rpx;height:350rpx;display:flex;justify-content:center;align-items:center;flex-direction:column}.all .btn .pause{width:200rpx;height:200rpx;margin-top:25rpx}.all .btn .btn-text{font-size:30rpx;margin-top:20rpx}
+.all{width:100vw}.all .map{width:100%;height:600rpx}.all .numberbox{width:100%;height:780rpx;display:flex;align-items:center;flex-direction:column}.all .numberbox .distance{display:flex;align-items:flex-end;margin-top:20rpx}.all .numberbox .distance .dis-num{height:132rpx;font-size:100rpx;display:flex;align-items:flex-end}.all .numberbox .distance .dis-text{height:132rpx;font-size:35rpx;display:flex;align-items:flex-end;padding-bottom:18rpx;margin-left:10rpx}.all .numberbox .number{width:100%;height:200rpx;display:flex;justify-content:space-between;margin-top:30rpx}.all .numberbox .number .num{height:100%;width:255rpx;display:flex;flex-direction:column;justify-content:center;align-items:center}.all .numberbox .number .num .num-num{font-size:50rpx;margin-bottom:18rpx}.all .numberbox .number .num .num-text{width:100%;display:flex;justify-content:center;align-items:center;font-size:28rpx}.all .btn{width:350rpx;height:320rpx;display:flex;justify-content:center;align-items:center;flex-direction:column}.all .btn .pause{width:200rpx;height:200rpx;margin-top:25rpx}.all .btn .btn-text{font-size:30rpx;margin-top:20rpx}.all .stop{width:100%;height:320rpx;display:flex;justify-content:center}.all .stop .btn{width:300rpx;height:320rpx;display:flex;justify-content:center;align-items:center;flex-direction:column}.all .stop .btn .pause{width:200rpx;height:200rpx;margin-top:25rpx}.all .stop .btn .btn-text{font-size:30rpx;margin-top:20rpx}