From c3689900accd577f77c11ba801f4001dd1374b6a Mon Sep 17 00:00:00 2001 From: laiiihz Date: Thu, 11 Mar 2021 15:56:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=97=E4=B8=BB=E5=8D=87=E7=BA=A7=E5=88=B0?= =?UTF-8?q?=E9=BB=84=E9=87=91=E6=B2=A1=E6=9C=89=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/home/home_page.dart | 6 ++++-- lib/pages/shop/cumulative_income_page.dart | 1 + lib/pages/user/model/user_month_income_model.dart | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index ec4d177..21415cd 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -1456,7 +1456,8 @@ class _HomePageState extends BaseStoreState await UserManager.instance.updateUserBriefInfo(getStore()); } String img; - if (oldLevel < nowLevel) { + //用户升级 + if (oldLevel > nowLevel) { switch (UserLevelTool.roleLevelEnum(nowLevel)) { case UserRoleLevel.Diamond_1: case UserRoleLevel.Diamond_2: @@ -1473,7 +1474,8 @@ class _HomePageState extends BaseStoreState break; } } - if (oldLevel > nowLevel) { + //用户降级 + if (oldLevel < nowLevel) { switch (UserLevelTool.roleLevelEnum(nowLevel)) { case UserRoleLevel.Silver: img = R.ASSETS_USER_DOWNGRADE_SILVER_PNG_WEBP; diff --git a/lib/pages/shop/cumulative_income_page.dart b/lib/pages/shop/cumulative_income_page.dart index 2c03e3f..0067b40 100644 --- a/lib/pages/shop/cumulative_income_page.dart +++ b/lib/pages/shop/cumulative_income_page.dart @@ -37,6 +37,7 @@ class _CumulativeIncomePageState extends BaseStoreState ///选择的年份 String get _selectYearValue => _selectYear.year.toString(); + /// 年度收益 double get _yearIncome { double result = 0; _models.forEach((element) { diff --git a/lib/pages/user/model/user_month_income_model.dart b/lib/pages/user/model/user_month_income_model.dart index 99d79c2..5393876 100644 --- a/lib/pages/user/model/user_month_income_model.dart +++ b/lib/pages/user/model/user_month_income_model.dart @@ -15,7 +15,8 @@ class UserMonthIncomeModel { (guideAmount ?? 0) + (teamAmount ?? 0) + (recommendAmount ?? 0) + - (rewardAmount ?? 0); + (rewardAmount ?? 0) + + .0; UserMonthIncomeModel( {this.id,