diff --git a/lib/mine/mine_wallet_page.dart b/lib/mine/mine_wallet_page.dart index 1adc710a..04226422 100644 --- a/lib/mine/mine_wallet_page.dart +++ b/lib/mine/mine_wallet_page.dart @@ -370,7 +370,7 @@ class _MineWalletPage extends State { } List calculateBalance(UserBill userBill, int index) { - double tbalance = double.tryParse(userBill.balance ?? "0");/// 总余额 + double tbalance = double.tryParse(userBill.number ?? "0");/// 总余额 String surplusGreenMoney = userBill.surplusGreenMoney; String surplusActivityMoney = userBill.surplusActivityMoney; double surplusMoney = double.tryParse(surplusGreenMoney ?? "0"); @@ -402,7 +402,7 @@ class _MineWalletPage extends State { "${userBill.pm == 0 ? '-' : '+'}$activity" ]; } - if (money > 0) { + if (money > 0 && (balance - money) > 0) { return [ S.of(context).yue, "${userBill.pm == 0 ? '-' : '+'}${(balance - money)}"