From f925c7bf9f695ddaf59a7552194bee98fbd0fa62 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Thu, 25 Mar 2021 15:31:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=88=91=E7=9A=84=E6=88=BF?= =?UTF-8?q?=E5=B1=8B=E9=A1=B5=E9=9D=A2=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E9=A1=B5=E9=9D=A2=E6=8C=89=E9=92=AE=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/constants/app_theme.dart | 1 + lib/constants/application_objects.dart | 58 +++--- .../house_authenticate_page.dart | 127 -------------- .../mine_house_page/mine_house_page.dart | 166 ------------------ lib/ui/home/application/all_application.dart | 2 +- lib/ui/profile/house_owners_page.dart | 16 ++ lib/ui/search/bee_search.dart | 2 +- lib/widget/views/application_view.dart | 4 +- 8 files changed, 51 insertions(+), 325 deletions(-) delete mode 100644 lib/pages/mine_house_page/house_authenticate_page/house_authenticate_page.dart delete mode 100644 lib/pages/mine_house_page/mine_house_page.dart create mode 100644 lib/ui/profile/house_owners_page.dart diff --git a/lib/constants/app_theme.dart b/lib/constants/app_theme.dart index 3d9c7662..0d54d446 100644 --- a/lib/constants/app_theme.dart +++ b/lib/constants/app_theme.dart @@ -18,6 +18,7 @@ class AppTheme { headline6: TextStyle( color: Color(0xFF333333), fontSize: 36.sp, + fontWeight: FontWeight.bold, ), ), ), diff --git a/lib/constants/application_objects.dart b/lib/constants/application_objects.dart index 99c244ec..7dc72014 100644 --- a/lib/constants/application_objects.dart +++ b/lib/constants/application_objects.dart @@ -1,3 +1,4 @@ +import 'package:akuCommunity/ui/profile/house_owners_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; @@ -5,13 +6,11 @@ import 'package:akuCommunity/const/resource.dart'; import 'package:akuCommunity/pages/address_page/address_page.dart'; import 'package:akuCommunity/pages/convenient_phone/convenient_phone_page.dart'; import 'package:akuCommunity/pages/event_activity/event_voting_page.dart'; -import 'package:akuCommunity/pages/fitup_manage/fitup_manage_page.dart'; import 'package:akuCommunity/pages/goods_deto_page/goods_deto_page.dart'; import 'package:akuCommunity/pages/goods_manage_page/goods_manage_page.dart'; import 'package:akuCommunity/pages/industry_committee/industry_committee_page.dart'; import 'package:akuCommunity/pages/life_pay/life_pay_page.dart'; import 'package:akuCommunity/pages/mine_car_page/mine_car_page.dart'; -import 'package:akuCommunity/pages/mine_house_page/mine_house_page.dart'; import 'package:akuCommunity/pages/one_alarm/widget/alarm_page.dart'; import 'package:akuCommunity/pages/open_door_page/open_door_page.dart'; import 'package:akuCommunity/pages/opening_code_page/opening_code_page.dart'; @@ -28,7 +27,7 @@ import 'package:akuCommunity/ui/manager/questionnaire/questionnaire_page.dart'; class AO { String title = ''; String path = ''; - Widget page = Scaffold(); + dynamic page = () => Scaffold(); AO( this.title, @@ -56,40 +55,43 @@ class AO { ///所有应用 List appObjects = [ - AO('一键开门', R.ASSETS_APPLICATIONS_OEPN_DOOR_PNG, OpenDoorPage()), - AO('开门码', R.ASSETS_APPLICATIONS_DOOR_CODE_PNG, OpeningCodePage()), - AO('访客邀请', R.ASSETS_APPLICATIONS_VISITOR_INVITE_PNG, VisitorAccessPage()), - AO('报事报修', R.ASSETS_APPLICATIONS_FIX_PNG, FixedSubmitPage()), - AO('生活缴费', R.ASSETS_APPLICATIONS_PAYMENT_PNG, LifePayPage()), - AO('业委会', R.ASSETS_APPLICATIONS_COMMITTEE_PNG, IndustryCommitteePage()), + AO('一键开门', R.ASSETS_APPLICATIONS_OEPN_DOOR_PNG, () => OpenDoorPage()), + AO('开门码', R.ASSETS_APPLICATIONS_DOOR_CODE_PNG, () => OpeningCodePage()), + AO('访客邀请', R.ASSETS_APPLICATIONS_VISITOR_INVITE_PNG, + () => VisitorAccessPage()), + AO('报事报修', R.ASSETS_APPLICATIONS_FIX_PNG, () => FixedSubmitPage()), + AO('生活缴费', R.ASSETS_APPLICATIONS_PAYMENT_PNG, () => LifePayPage()), + AO('业委会', R.ASSETS_APPLICATIONS_COMMITTEE_PNG, () => IndustryCommitteePage()), AO('建议咨询', R.ASSETS_APPLICATIONS_ADVICE_PNG, - AdvicePage(type: AdviceType.SUGGESTION)), - AO('便民电话', R.ASSETS_APPLICATIONS_COMMUNITY_PHONE_PNG, ConvenientPhonePage()), - AO('活动投票', R.ASSETS_APPLICATIONS_VOTE_PNG, EventVotingPage()), - AO('物品出门', R.ASSETS_APPLICATIONS_GOODS_OUT_PNG, GoodsDetoPage()), + () => AdvicePage(type: AdviceType.SUGGESTION)), + AO('便民电话', R.ASSETS_APPLICATIONS_COMMUNITY_PHONE_PNG, + () => ConvenientPhonePage()), + AO('活动投票', R.ASSETS_APPLICATIONS_VOTE_PNG, () => EventVotingPage()), + AO('物品出门', R.ASSETS_APPLICATIONS_GOODS_OUT_PNG, () => GoodsDetoPage()), AO('投诉表扬', R.ASSETS_APPLICATIONS_COMPLAINT_PNG, - AdvicePage(type: AdviceType.COMPLAIN)), - AO('问卷调查', R.ASSETS_APPLICATIONS_QUESTION_PNG, QuestionnairePage()), + () => AdvicePage(type: AdviceType.COMPLAIN)), + AO('问卷调查', R.ASSETS_APPLICATIONS_QUESTION_PNG, () => QuestionnairePage()), // AO('装修管理', R.ASSETS_APPLICATIONS_DECORATION_PNG, FitupManagePage()), - AO('借还管理', R.ASSETS_APPLICATIONS_BORROW_PNG, GoodsManagePage()), - AO('一键报警', R.ASSETS_APPLICATIONS_POLICE_PNG, AlarmPage()), + AO('借还管理', R.ASSETS_APPLICATIONS_BORROW_PNG, () => GoodsManagePage()), + AO('一键报警', R.ASSETS_APPLICATIONS_POLICE_PNG, () => AlarmPage()), ]; List userAppObjects = [ - AO('我的房屋', R.ASSETS_ICONS_USER_ICON_WDFW_PNG, MineHousePage()), - AO('我的车位', R.ASSETS_ICONS_USER_ICON_WDCW_PNG, MineCarPage()), - AO('我的车', R.ASSETS_ICONS_USER_ICON_WDC_PNG, MineCarPage()), - AO('社区活动', R.ASSETS_ICONS_USER_ICON_WDSQHD_PNG, ActivityListPage()), - AO('我的缴费', R.ASSETS_ICONS_USER_ICON_WDJF_PNG, LifePayPage()), - AO('我的报修', R.ASSETS_ICONS_USER_ICON_WDBX_PNG, FixedSubmitPage()), - AO('我的地址', R.ASSETS_ICONS_USER_ICON_WDDZ_PNG, AddressPage()), - AO('我的管家', R.ASSETS_ICONS_USER_ICON_WDGJ_PNG, Scaffold()), - AO('我的访客', R.ASSETS_ICONS_USER_ICON_WDFK_PNG, VisitorAccessPage()), - AO('设置', R.ASSETS_ICONS_USER_ICON_SZ_PNG, SettingsPage()), + AO('我的房屋', R.ASSETS_ICONS_USER_ICON_WDFW_PNG, () => HouseOwnersPage()), + AO('我的车位', R.ASSETS_ICONS_USER_ICON_WDCW_PNG, () => MineCarPage()), + AO('我的车', R.ASSETS_ICONS_USER_ICON_WDC_PNG, () => MineCarPage()), + AO('社区活动', R.ASSETS_ICONS_USER_ICON_WDSQHD_PNG, () => ActivityListPage()), + AO('我的缴费', R.ASSETS_ICONS_USER_ICON_WDJF_PNG, () => LifePayPage()), + AO('我的报修', R.ASSETS_ICONS_USER_ICON_WDBX_PNG, () => FixedSubmitPage()), + AO('我的地址', R.ASSETS_ICONS_USER_ICON_WDDZ_PNG, () => AddressPage()), + AO('我的管家', R.ASSETS_ICONS_USER_ICON_WDGJ_PNG, () => Scaffold()), + AO('我的访客', R.ASSETS_ICONS_USER_ICON_WDFK_PNG, () => VisitorAccessPage()), + AO('设置', R.ASSETS_ICONS_USER_ICON_SZ_PNG, () => SettingsPage()), ]; ///全部应用按钮 -AO allApp = AO('全部应用', R.ASSETS_APPLICATIONS_ALL_APP_PNG, AllApplicationPage()); +AO allApp = + AO('全部应用', R.ASSETS_APPLICATIONS_ALL_APP_PNG, () => AllApplicationPage()); ///为您推荐 original value List _recommendApp = [ diff --git a/lib/pages/mine_house_page/house_authenticate_page/house_authenticate_page.dart b/lib/pages/mine_house_page/house_authenticate_page/house_authenticate_page.dart deleted file mode 100644 index e2ac8270..00000000 --- a/lib/pages/mine_house_page/house_authenticate_page/house_authenticate_page.dart +++ /dev/null @@ -1,127 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; -import 'package:akuCommunity/widget/common_input.dart'; - -class HouseAuthenticatePage extends StatefulWidget { - HouseAuthenticatePage({Key key}) : super(key: key); - - @override - _HouseAuthenticatePageState createState() => _HouseAuthenticatePageState(); -} - -class _HouseAuthenticatePageState extends State { - TextEditingController _userName = new TextEditingController(); - TextEditingController _userIDCard = new TextEditingController(); - TextEditingController _userPhone = new TextEditingController(); - - List> _inputList = []; - - @override - void initState() { - super.initState(); - _inputList = [ - {'title': '您的姓名', 'hintText': '请输入您的姓名', 'inputController': _userName}, - {'title': '身份证', 'hintText': '请输入您的身份证号', 'inputController': _userIDCard}, - {'title': '手机号', 'hintText': '请输入您的手机号码', 'inputController': _userPhone}, - ]; - } - - Widget _inkWellSave() { - return InkWell( - child: Container( - padding: EdgeInsets.only( - top: 19.w, - bottom: 21.w, - ), - alignment: Alignment.center, - width: 686.w, - decoration: BoxDecoration( - color: Color(0xffffd000), - borderRadius: BorderRadius.all(Radius.circular(4)), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.1), - offset: Offset(1.1, 1.1), - blurRadius: 10.0), - ], - ), - child: Text( - '保存', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 32.w, - color: Color(0xff333333), - ), - ), - ), - ); - } - - @override - Widget build(BuildContext context) { - return BeeScaffold( - title: '房屋认证', - body: Container( - color: Colors.white, - child: SingleChildScrollView( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - FocusScope.of(context).requestFocus(FocusNode()); - }, - child: Container( - margin: EdgeInsets.only( - top: 32.w, - left: 32.w, - right: 32.w, - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Column( - children: List.generate( - _inputList.length, - (index) => Container( - padding: EdgeInsets.only( - top: 23.w, - bottom: 24.w, - ), - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Color(0xffeeeeee), width: 0.5)), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - _inputList[index]['title'], - style: TextStyle( - fontSize: 28.sp, color: Color(0xff333333)), - ), - SizedBox(height: 25.w), - CommonInput( - hintText: _inputList[index]['hintText'], - inputController: _inputList[index] - ['inputController'], - ) - // item['widget'], - ], - ), - ), - ), - ), - SizedBox(height: 89.w), - _inkWellSave(), - ], - ), - ), - ), - ), - ), - ); - } -} diff --git a/lib/pages/mine_house_page/mine_house_page.dart b/lib/pages/mine_house_page/mine_house_page.dart deleted file mode 100644 index d9a13e7d..00000000 --- a/lib/pages/mine_house_page/mine_house_page.dart +++ /dev/null @@ -1,166 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - -import 'package:akuCommunity/base/assets_image.dart'; -import 'package:akuCommunity/pages/mine_house_page/house_authenticate_page/house_authenticate_page.dart'; -import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/widget/bee_scaffold.dart'; - -class MineHousePage extends StatefulWidget { - MineHousePage({Key key}) : super(key: key); - - @override - _MineHousePageState createState() => _MineHousePageState(); -} - -class _MineHousePageState extends State { - List> _listHouse = [ - {'title': '深圳华茂悦峰', 'subtitle': '1幢-1单元-702室'}, - ]; - - Widget _containerHouseCard(String title, subtitle) { - return Container( - margin: EdgeInsets.only( - top: 24.w, - left: 32.w, - right: 32.w, - ), - child: Container( - padding: EdgeInsets.only( - top: 41.w, - bottom: 41.w, - left: 27.w, - ), - decoration: BoxDecoration( - border: - Border(bottom: BorderSide(color: Color(0xffeeeeee), width: 0.5)), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - AssetsImage.HOUSEATTESTATION, - height: 48.w, - width: 48.w, - ), - SizedBox(width: 20.w), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - title, - style: TextStyle( - fontSize: 32.sp, - color: Color(0xff474747), - ), - ), - SizedBox(height: 10.w), - Text( - subtitle, - style: TextStyle( - fontSize: 32.sp, - color: Color(0xff474747), - ), - ) - ], - ), - ], - ), - ), - ); - } - - Widget _inkWellCheck() { - return InkWell( - onTap: () { - HouseAuthenticatePage().to; - }, - child: Container( - padding: EdgeInsets.only( - top: 11.w, - bottom: 10.w, - ), - alignment: Alignment.center, - width: 167.w, - decoration: BoxDecoration( - color: Color(0xffffd000), - borderRadius: BorderRadius.all(Radius.circular(4)), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.1), - offset: Offset(1.1, 1.1), - blurRadius: 10.0), - ], - ), - child: Text( - '去认证', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 32.sp, - color: Color(0xff333333), - ), - ), - ), - ); - } - - Widget _containerAttestation() { - return Container( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - AssetsImage.HOUSEHEADER, - height: 124.w, - width: 124.w, - ), - SizedBox(height: 24.w), - Text( - '马泽鹏', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 32.sp, - color: Color(0xff474747), - ), - ), - SizedBox(height: 8.w), - Text( - '经过产权人审核成为住户,开启更多功能', - style: TextStyle( - fontSize: 24.sp, - color: Color(0xff999999), - ), - ), - SizedBox(height: 39.w), - _inkWellCheck(), - ], - ), - ); - } - - @override - Widget build(BuildContext context) { - return BeeScaffold( - title: '我的房屋', - body: Container( - color: Colors.white, - child: ListView( - children: [ - Column( - children: _listHouse - .map((item) => _containerHouseCard( - item['title'], - item['subtitle'], - )) - .toList(), - ), - SizedBox(height: 156.w), - _containerAttestation(), - ], - ), - ), - ); - } -} diff --git a/lib/ui/home/application/all_application.dart b/lib/ui/home/application/all_application.dart index 7515e751..b54b488a 100644 --- a/lib/ui/home/application/all_application.dart +++ b/lib/ui/home/application/all_application.dart @@ -35,7 +35,7 @@ class _AllApplicationPageState extends State { ? null : () { if (LoginUtil.isNotLogin) return; - Get.to(() => object.page); + Get.to(object.page); }, child: Column( mainAxisAlignment: MainAxisAlignment.center, diff --git a/lib/ui/profile/house_owners_page.dart b/lib/ui/profile/house_owners_page.dart new file mode 100644 index 00000000..76b27bc5 --- /dev/null +++ b/lib/ui/profile/house_owners_page.dart @@ -0,0 +1,16 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; +import 'package:flutter/material.dart'; + +class HouseOwnersPage extends StatefulWidget { + HouseOwnersPage({Key key}) : super(key: key); + + @override + _HouseOwnersPageState createState() => _HouseOwnersPageState(); +} + +class _HouseOwnersPageState extends State { + @override + Widget build(BuildContext context) { + return BeeScaffold(title: '我的房屋'); + } +} diff --git a/lib/ui/search/bee_search.dart b/lib/ui/search/bee_search.dart index 7eafaf07..e4e47d5b 100644 --- a/lib/ui/search/bee_search.dart +++ b/lib/ui/search/bee_search.dart @@ -40,7 +40,7 @@ class _BeeSearchState extends State { return MaterialButton( onPressed: () { if (LoginUtil.isNotLogin) return; - Get.to(() => e.page); + Get.to(e.page); }, shape: StadiumBorder(), child: Column( diff --git a/lib/widget/views/application_view.dart b/lib/widget/views/application_view.dart index 5e0e7e4d..0c398e6b 100644 --- a/lib/widget/views/application_view.dart +++ b/lib/widget/views/application_view.dart @@ -35,7 +35,7 @@ class _ApplicationViewState extends State { padding: EdgeInsets.zero, onPressed: () { if (LoginUtil.isNotLogin) return; - Get.to(() => object.page); + Get.to(object.page); }, child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -46,7 +46,7 @@ class _ApplicationViewState extends State { width: 75.w, ), 8.hb, - object.title.text.size(24.sp).make(), + object.title.text.size(24.sp).bold.make(), ], ), );