From 70256b00ea3a11087d4752a16ba7f14e6999a544 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Wed, 16 Sep 2020 14:27:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=97=E9=93=BA=20"=E6=9C=AC=E8=80=83?= =?UTF-8?q?=E6=A0=B8=E6=9C=9F=E6=88=AA=E6=AD=A2=E8=87=B32021-01-01,=20?= =?UTF-8?q?=E5=B0=86=E4=BA=8E2021-01-22=E8=BF=9B=E8=A1=8C=E8=80=83?= =?UTF-8?q?=E6=A0=B8"=20=E8=AF=B4=E6=98=8E=EF=BC=8C=E8=AF=A5=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E7=94=B1=E5=90=8E=E7=AB=AF=E6=8F=90=E4=BE=9B=E2=80=9C?= =?UTF-8?q?content=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/models/shop_summary_model.dart | 16 ++++++++++++++-- .../shop_page_upgrade_progress_widget.dart | 7 +++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/lib/models/shop_summary_model.dart b/lib/models/shop_summary_model.dart index 0ef553f..7a03e5b 100644 --- a/lib/models/shop_summary_model.dart +++ b/lib/models/shop_summary_model.dart @@ -256,6 +256,7 @@ class MyShoppingWithTime { return data; } } + class TeamIncomeWithTime { TeamInToday today; TeamInToday thisMonth; @@ -264,7 +265,8 @@ class TeamIncomeWithTime { TeamIncomeWithTime({this.today, this.thisMonth, this.prevMonth}); TeamIncomeWithTime.fromJson(Map json) { - today = json['today'] != null ? new TeamInToday.fromJson(json['today']) : null; + today = + json['today'] != null ? new TeamInToday.fromJson(json['today']) : null; thisMonth = json['thisMonth'] != null ? new TeamInToday.fromJson(json['thisMonth']) : null; @@ -370,8 +372,16 @@ class Assessment { UpStandard keepStandard; Upper upper; Upper keeper; + String content; - Assessment({this.aTime, this.upStandard, this.keepStandard, this.upper, this.keeper}); + Assessment({ + this.aTime, + this.upStandard, + this.keepStandard, + this.upper, + this.keeper, + this.content, + }); Assessment.fromJson(Map json) { aTime = json['aTime']; @@ -383,6 +393,7 @@ class Assessment { : null; upper = json['upper'] != null ? new Upper.fromJson(json['upper']) : null; keeper = json['keeper'] != null ? new Upper.fromJson(json['keeper']) : null; + content = json['content']; } Map toJson() { @@ -400,6 +411,7 @@ class Assessment { data['keeper'] = this.keeper.toJson(); } data['aTime'] = this.aTime; + data['content'] = this.content; return data; } } diff --git a/lib/pages/shop/widget/shop_page_upgrade_progress_widget.dart b/lib/pages/shop/widget/shop_page_upgrade_progress_widget.dart index 636209c..8968cd2 100644 --- a/lib/pages/shop/widget/shop_page_upgrade_progress_widget.dart +++ b/lib/pages/shop/widget/shop_page_upgrade_progress_widget.dart @@ -94,7 +94,6 @@ class _ShopPageUpgradeProgressState String goldIconPersonKeep = "assets/shop_page_progress_icon_gold_person.png"; List returnList = []; - DateTime date = DateTime.parse(_shopSummaryModel.data.assessment.aTime); double upSale = double.parse(_shopSummaryModel.data.assessment.upper.sale); int upPerson = int.parse(_shopSummaryModel.data.assessment.upper.developNew); double keepSale = double.parse(_shopSummaryModel.data.assessment.keeper.sale); @@ -105,7 +104,7 @@ class _ShopPageUpgradeProgressState int standardPerson = _shopSummaryModel.data.assessment.upStandard.role300.person.toInt(); bool fullSale = upSale >= standardSale; bool fullPerson = upPerson>=standardPerson; - String expireDate = "在" + "${date.year}-${date.month}-${date.day}前完成升级"; + String expireDate = _shopSummaryModel.data.assessment.content; returnList.add( Expanded( child: _itemWidget( @@ -135,7 +134,7 @@ class _ShopPageUpgradeProgressState int standardPerson = _shopSummaryModel.data.assessment.keepStandard.role200.person.toInt(); bool fullSale = keepSale >= standardSale; bool fullPerson = keepPerson>=standardPerson; - String expireDate = "在" + "${date.year}-${date.month}-${date.day}前完成保级"; + String expireDate = _shopSummaryModel.data.assessment.content; returnList.add( Expanded( child: _itemWidget( @@ -170,7 +169,7 @@ class _ShopPageUpgradeProgressState int keepStandardPerson = _shopSummaryModel.data.assessment.keepStandard.role300.person.toInt(); bool fullKeepSale = keepSale >= keepStandardSale; bool fullKeepPerson = keepPerson >= keepStandardPerson; - String expireDate = "在" + "${date.year}-${date.month}-${date.day}前完成升级"; + String expireDate = _shopSummaryModel.data.assessment.content; returnList.add( Expanded( child: _itemWidget(