From cc8a9bcdeb7442db614ea545bee9492d03cfb453 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Fri, 1 Apr 2022 10:16:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=A8=E9=83=A8=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E4=B8=AD=E7=9A=84=E8=B7=B3=E8=BD=AC=E6=8B=A6=E6=88=AA?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/constants/application_objects.dart | 2 +- lib/ui/home/application/all_application.dart | 4 ++-- lib/utils/login_util.dart | 21 +++++++++----------- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/lib/constants/application_objects.dart b/lib/constants/application_objects.dart index ff4d346f..3e826d71 100644 --- a/lib/constants/application_objects.dart +++ b/lib/constants/application_objects.dart @@ -185,7 +185,7 @@ List _recommendApp = [ '共享投屏', ]; -///为您推荐 +///暂未上线 List get recommendApp => _recommendApp.map((e) => AO.fromRaw(e)).toList(); ///智慧管家 original value diff --git a/lib/ui/home/application/all_application.dart b/lib/ui/home/application/all_application.dart index cc2ba32f..62d0127a 100644 --- a/lib/ui/home/application/all_application.dart +++ b/lib/ui/home/application/all_application.dart @@ -210,8 +210,8 @@ class _AllApplicationPageState extends State { child: ListView( padding: EdgeInsets.zero, children: [ - _buildListTile('智慧管家', 1), - _buildListTile('暂未上线', 0), + _buildListTile('智慧管家', 0), + _buildListTile('暂未上线', 1), // _buildListTile('商城购物', 2), ], ), diff --git a/lib/utils/login_util.dart b/lib/utils/login_util.dart index 894473cf..e7d79215 100644 --- a/lib/utils/login_util.dart +++ b/lib/utils/login_util.dart @@ -1,8 +1,7 @@ import 'package:aku_new_community/pages/sign/login/other_login_page.dart'; -import 'package:aku_new_community/provider/app_provider.dart'; import 'package:aku_new_community/provider/user_provider.dart'; -import 'package:aku_new_community/ui/profile/house/add_house_page.dart'; -import 'package:aku_new_community/ui/profile/house/house_owners_page.dart'; +import 'package:aku_new_community/ui/profile/new_house/my_house_page.dart'; +import 'package:aku_new_community/widget/dialog/certification_dialog.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; @@ -34,17 +33,15 @@ class LoginUtil { static bool haveRoom(String name) { if (!name.contains(RegExp('访客邀请|报事报修|建议咨询|生活缴费|物品出门|投诉表扬|我的访客|我的报修|我的缴费'))) return true; - final appProvider = Provider.of(Get.context!, listen: false); - if (appProvider.selectedHouse == null) { - BotToast.showText(text: '请先添加房屋'); - Get.to(() => AddHousePage()); + final userProvider = Provider.of(Get.context!, listen: false); + if (userProvider.userInfoModel!.name == null) { + BotToast.showText(text: '请先实名认证'); + Get.dialog(CertificationDialog()); return false; } - if (appProvider.selectedHouse == null) { - BotToast.showText(text: '房屋审核中或审核失败'); - Get.to(() => HouseOwnersPage( - identify: 4, - )); + if (userProvider.defaultHouse == null) { + BotToast.showText(text: '请先选择默认房屋'); + Get.to(() => MyHousePage()); return false; } return true;