From e42684dc9e8be18d6a5a6cfe0f101053880bc9da Mon Sep 17 00:00:00 2001 From: datang Date: Fri, 20 May 2022 17:17:00 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/sign/login/other_login_page.dart | 2 +- .../facility/facility_appointment_page.dart | 1 + .../community/facility/facility_preorder_page.dart | 12 +++++++++--- .../facility/facility_type_detail_card.dart | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/pages/sign/login/other_login_page.dart b/lib/pages/sign/login/other_login_page.dart index af382525..cf778411 100644 --- a/lib/pages/sign/login/other_login_page.dart +++ b/lib/pages/sign/login/other_login_page.dart @@ -112,8 +112,8 @@ class _OtherLoginPageState extends State { UserTool.appProvider.pickedCityAndCommunity!.communityModel! .id); if (response.data['success']) { - await UserTool.dataProvider.addHistories(); await UserTool.userProvider.setLogin(response.data['data']); + await UserTool.dataProvider.addHistories(); } else { BotToast.showText(text: response.data['msg']); if (response.data['msg'] == '该账户未设置密码,请使用验证码登录') { diff --git a/lib/ui/community/facility/facility_appointment_page.dart b/lib/ui/community/facility/facility_appointment_page.dart index 1b504865..b254d44e 100644 --- a/lib/ui/community/facility/facility_appointment_page.dart +++ b/lib/ui/community/facility/facility_appointment_page.dart @@ -26,6 +26,7 @@ class _FacilityAppointmentPageState extends State _tabController = TabController(length: 2, vsync: this); } + @override void dispose() { _tabController.dispose(); diff --git a/lib/ui/community/facility/facility_preorder_page.dart b/lib/ui/community/facility/facility_preorder_page.dart index 904c0865..74271e73 100644 --- a/lib/ui/community/facility/facility_preorder_page.dart +++ b/lib/ui/community/facility/facility_preorder_page.dart @@ -41,7 +41,7 @@ class _FacilityPreorderPageState extends State { List dateList = []; DateTime? date; - bool get canTap => dateList.isNotEmpty; + bool get canTap => dateList.isNotEmpty&&UserTool.userProvider.defaultHouse!=null; @override Widget build(BuildContext context) { @@ -63,7 +63,7 @@ class _FacilityPreorderPageState extends State { ), onTap: () => Get.to(() => AdviceHousePage()), title: Text( - UserTool.userProvider.userInfoModel!.name??'请先选择房屋', + UserTool.userProvider.userInfoModel!.name??'', style: TextStyle( fontSize: 30.sp, ), @@ -76,7 +76,13 @@ class _FacilityPreorderPageState extends State { color: Colors.black.withOpacity(0.45), fontSize: 26.sp, ), - ):SizedBox(), + ):Text( + '请先绑定房屋', + style: TextStyle( + color: Colors.black.withOpacity(0.45), + fontSize: 26.sp, + ), + ), trailing: Icon( CupertinoIcons.chevron_forward, size: 35.w, diff --git a/lib/ui/community/facility/facility_type_detail_card.dart b/lib/ui/community/facility/facility_type_detail_card.dart index 2d785045..442b0712 100644 --- a/lib/ui/community/facility/facility_type_detail_card.dart +++ b/lib/ui/community/facility/facility_type_detail_card.dart @@ -175,7 +175,7 @@ class MyPainter extends CustomPainter { ..color = dates!.contains(i) ? kPrimaryColor : i < getNum(start!) || - i > getNum(end!) || + i >= getNum(end!) || i < getNum(DateTime.now()) ? ktextThirdColor : Colors.transparent