|
@@ -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;
|
|
|
}
|