邹能昇 2 сар өмнө
parent
commit
276ea40af1

+ 1 - 1
nova-werun/pages/home/medal/index.js

@@ -138,7 +138,7 @@ Page({
         await this.lossMedal(alreadyList);
     },
 
-    // 获得勋章
+    // 获得勋章
     async lossMedal(alreadyList) {
         let Medalquery = new Parse.Query('Medal');
         Medalquery.equalTo('company', company);

+ 9 - 2
nova-werun/pages/home/statistics/index.js

@@ -47,6 +47,14 @@ Page({
         //
         average:0,
         totle:0,
+
+        //显示日历
+        minDate: new Date(2025, 0, 1).getTime(),
+        maxDate: new Date(2025, 0, 31).getTime(),
+        formatter(day) {        
+            day.topInfo = '11111'    
+            return day;
+          },
     },
 
     /**
@@ -223,7 +231,7 @@ Page({
     changeday() {
         if (this.data.day == '7') {
             this.setData({
-                day: '30'
+                day: '30',
             })
         } else {
             this.setData({
@@ -462,5 +470,4 @@ Page({
             console.error('Error fetching today\'s data:', error);
         }
     },
-
 })

+ 2 - 1
nova-werun/pages/home/statistics/index.json

@@ -2,6 +2,7 @@
   "usingComponents": {
     "van-tabbar": "@vant/weapp/tabbar/index",
     "van-tabbar-item": "@vant/weapp/tabbar-item/index",
-    "ec-canvas":"../../../components/ec-canvas/ec-canvas"
+    "ec-canvas":"../../../components/ec-canvas/ec-canvas",
+    "van-calendar": "@vant/weapp/calendar/index"
   }
 }

+ 7 - 1
nova-werun/pages/home/statistics/index.less

@@ -291,7 +291,7 @@
     }
     .card3{
         width: 100%;
-        height: 538rpx;
+        min-height: 538rpx;
         padding: 20rpx;
         padding-bottom: 0rpx;
         border: solid #015EEA 2px;
@@ -368,5 +368,11 @@
             left: 20rpx;
             bottom: 0;
         }
+        .card4-bottom{
+            width: 100%;
+            height: auto;
+            padding-bottom: 30rpx;
+            margin-top: 20rpx;
+        }
     }
 }

+ 6 - 3
nova-werun/pages/home/statistics/index.wxml

@@ -49,8 +49,8 @@
         <view class="text2">|</view>
         <view class="text3">本周记录</view>
     </view>
-    <view class="chart">      
-     <ec-canvas id="mychart" canvas-id="mychart" ec="{{ec}}"></ec-canvas>
+    <view class="chart">
+        <ec-canvas id="mychart" canvas-id="mychart" ec="{{ec}}"></ec-canvas>
     </view>
 </view>
 <view class="all2" style="height: {{contentHeight}}rpx;" wx:if="{{active==1}}">
@@ -119,9 +119,12 @@
                 <view class="card3-midintex">总计</view>
             </view>
         </view>
-        <view class="card3-bottom">
+        <view class="card3-bottom" wx:if="{{day=='7'}}">
             <ec-canvas wx:if="{{day=='7'}}" id="mychart" canvas-id="mychart" ec="{{ec}}"></ec-canvas>
         </view>
+        <view class="card4-bottom" wx:if="{{day=='30'}}">
+            <van-calendar title='运动数据' poppable="{{ false }}" show-confirm="{{ false }}"  min-date="{{ minDate }}" readonly="{{true}}" max-date="{{ maxDate }}"  formatter="{{ formatter }}" color='#015EEA' />
+        </view>
     </view>
 </view>
 <van-tabbar active="{{ active }}" bind:change="onChange" placeholder='true'>

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
nova-werun/pages/home/statistics/index.wxss


Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно