From b45a01a8bee4a9bff5f9c248ead301b8675d1099 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 28 十月 2022 17:22:35 +0800
Subject: [PATCH] 2022.10.28
---
pages/home/home.js | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/pages/home/home.js b/pages/home/home.js
index 479c736..42c3a83 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -232,8 +232,8 @@
}
});
- monthInfo.percent = Math.round(monthInfo.finishedMust / monthInfo.totalMust * 100)
- monthInfo.percent2 = Math.round(monthInfo.finishedSelf / monthInfo.totalSelf * 100)
+ monthInfo.percent = monthInfo.totalMust == 0 ? 0 : Math.round(monthInfo.finishedMust / monthInfo.totalMust * 100)
+ monthInfo.percent2 = monthInfo.totalSelf == 0 ? 0 : Math.round(monthInfo.finishedSelf / monthInfo.totalSelf * 100)
this.setData({monthInfo})
},
@@ -302,6 +302,13 @@
wx.navigateTo({
url: url
})
+ } else {
+ wx.showToast({
+ title: '鍔熻兘鏁鏈熷緟',
+ duration: 1000,
+ icon: 'none',
+ mask: true,
+ })
}
}
})
\ No newline at end of file
--
Gitblit v1.9.3