|
@@ -180,10 +180,12 @@ Page({
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (actualAmount > 0 && amount + balance < actualAmount) {
|
|
|
- const minPayment = (actualAmount - balance).toFixed(2);
|
|
|
+ if (actualAmount > 0 && amount * 1000 + balance * 1000 < actualAmount * 1000) {
|
|
|
+ // 先转整数计算,再转回浮点数
|
|
|
+ const minPayment = (actualAmount * 1000 - balance * 1000) / 1000;
|
|
|
+ const formattedMinPayment = minPayment.toFixed(2);
|
|
|
wx.showToast({
|
|
|
- title: '最低缴费金额:'+ minPayment + '元',
|
|
|
+ title: '最低缴费金额:' + formattedMinPayment + '元',
|
|
|
icon: 'none'
|
|
|
});
|
|
|
return;
|