From 4d7d64cbbdbcf2b09caeb872af8d30a1da5297fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=93=88=E5=93=88=E5=93=88?= Date: Mon, 5 Sep 2022 14:27:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=84=89=E9=8C=A2=E5=8C=85=EF=BC=8CUI?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/mine/mine_wallet_page.dart | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/mine/mine_wallet_page.dart b/lib/mine/mine_wallet_page.dart index 2bd5475c..c05015f3 100644 --- a/lib/mine/mine_wallet_page.dart +++ b/lib/mine/mine_wallet_page.dart @@ -376,7 +376,7 @@ class _MineWalletPage extends State { double surplusMoney = double.tryParse(surplusGreenMoney ?? "0"); double surplusActivity = double.tryParse(surplusActivityMoney ?? "0"); - double balance = tbalance - (surplusMoney ?? 0) - (surplusActivity ?? 0); + // double balance = tbalance - (surplusMoney ?? 0) - (surplusActivity ?? 0); String greenMoney = userBill.greenMoney; String activityMoney = userBill.activityMoney; @@ -392,21 +392,21 @@ class _MineWalletPage extends State { "${userBill.pm == 0 ? '-' : '+'}$activity" ]; } - if (balance > 0) { - return [S.of(context).yue, "${userBill.pm == 0 ? '-' : '+'}$balance"]; + if (tbalance > 0) { + return [S.of(context).yue, "${userBill.pm == 0 ? '-' : '+'}$tbalance"]; } return []; } else if (index == 1) { - if (activity > 0) { + if (money > 0 && activity > 0) { return [ S.of(context).huodongyue, "${userBill.pm == 0 ? '-' : '+'}$activity" ]; } - if (money > 0 && (balance - money) > 0) { + if (money > 0 && (tbalance - money) > 0) { return [ S.of(context).yue, - "${userBill.pm == 0 ? '-' : '+'}${(balance - money)}" + "${userBill.pm == 0 ? '-' : '+'}${(tbalance - money)}" ]; } else { return []; @@ -415,7 +415,7 @@ class _MineWalletPage extends State { if (activity > 0 && money > 0) { return [ S.of(context).yue, - "${userBill.pm == 0 ? '-' : '+'}${(balance - money - activity)}" + "${userBill.pm == 0 ? '-' : '+'}${(tbalance - money - activity)}" ]; } else { return [];