邹能昇 2 сар өмнө
parent
commit
224a1f5ae6

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

@@ -99,7 +99,7 @@ Page({
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad: function (options) {
+     onLoad: async function (options) {
         // 计算
         const systemInfo = wx.getSystemInfoSync();
         const statusBarHeight = systemInfo.statusBarHeight || 0;
@@ -118,8 +118,8 @@ Page({
             contentpadding,
             contentHeight
         });
-        this.gettarget()
-        this.order()
+        await this.gettarget()
+        await this.order()
         this.allorder()
     },
 
@@ -300,6 +300,7 @@ Page({
         const steps = this.data.sharList[0].steps || 0;
 
         let percent = (steps / this.data.target) * 100;
+        console.log('目标', percent);
         if (percent > 100) {
             percent = 100;
         }