邹能昇 2 сар өмнө
parent
commit
1d14c5f27c

+ 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>