邹能昇 2 ماه پیش
والد
کامیت
1d14c5f27c
2فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 3 0
      nova-werun/pages/home/statistics/index.js
  2. 1 1
      nova-werun/pages/home/statistics/index.wxml

+ 3 - 0
nova-werun/pages/home/statistics/index.js

@@ -229,6 +229,9 @@ Page({
             this.setData({
                 day: '7'
             })
+            this.echartsComponnet = this.selectComponent('#mychart')
+            this.initChart()
+            this.getweekday()
         }
     },
     //获取目标步数

+ 1 - 1
nova-werun/pages/home/statistics/index.wxml

@@ -120,7 +120,7 @@
             </view>
         </view>
         <view class="card3-bottom">
-            <ec-canvas id="mychart" canvas-id="mychart" ec="{{ec}}"></ec-canvas>
+            <ec-canvas wx:if="{{day=='7'}}" id="mychart" canvas-id="mychart" ec="{{ec}}"></ec-canvas>
         </view>
     </view>
 </view>