From bb487bb22d239957fddec7eadd60815bc24e379c Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Fri, 8 Apr 2022 12:02:39 +0800 Subject: [PATCH 01/13] register adapter --- lib/utils/hive_store.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/hive_store.dart b/lib/utils/hive_store.dart index 08ff7056..5910cf1c 100644 --- a/lib/utils/hive_store.dart +++ b/lib/utils/hive_store.dart @@ -37,7 +37,7 @@ class HiveStore { Hive.registerAdapter(HistoryLoginModelAdapter()); //HiveTypeId:4 Hive.registerAdapter(UserConfigModelAdapter()); //HiveTypeId:5 Hive.registerAdapter(PickedCityModelAdapter()); //HiveTypeId:6 - Hive.registerAdapter(CommunityModelAdapter()); + Hive.registerAdapter(CommunityModelAdapter()); //HiveTypeId:7 _appBox = await Hive.openBox('app'); _userBox = await Hive.openBox('userBox'); _dataBox = await Hive.openBox('dataBox'); From 0df7dfb76c0e7dc198fddee3b61d18edca3c9d3e Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Fri, 8 Apr 2022 14:09:00 +0800 Subject: [PATCH 02/13] fix bugs --- .../announce/announce_view.dart | 19 ++-- .../opening_code_page/opening_code_page.dart | 2 +- lib/pages/personal/personal_page.dart | 5 +- lib/ui/community/activity/activity_card.dart | 87 +++++++++---------- .../activity/activity_list_page.dart | 12 ++- .../work_order/all_order/all_order_view.dart | 72 ++++++++++++++- .../work_order/work_order_page.dart | 69 ++------------- .../work_order/work_order_view.dart | 79 +++++++++++++++++ 8 files changed, 218 insertions(+), 127 deletions(-) create mode 100644 lib/ui/function_and_service/work_order/work_order_view.dart diff --git a/lib/pages/message_center_page/announce/announce_view.dart b/lib/pages/message_center_page/announce/announce_view.dart index 418209c3..4ee74e18 100644 --- a/lib/pages/message_center_page/announce/announce_view.dart +++ b/lib/pages/message_center_page/announce/announce_view.dart @@ -107,13 +107,14 @@ class _AnnounceViewState extends State { header: MaterialHeader(), footer: MaterialFooter(), scrollController: _autoScrollController, + controller: _refreshController, onRefresh: () async { _page = 1; _modelLists.clear(); _innerModelList.clear(); var base = await NetUtil().getList(SAASAPI.announce.list, params: { - 'page': _page, + 'pageNum': _page, 'size': _size, }); _innerModelList = @@ -129,13 +130,19 @@ class _AnnounceViewState extends State { _page++; var base = await NetUtil().getList(SAASAPI.announce.list, params: { - 'page': _page, + 'pageNum': _page, 'size': _size, }); - if (base.total > _innerModelList.length) {} - _innerModelList = - base.rows.map((e) => HomeAnnounceModel.fromJson(e)).toList(); - monthListDepart(_innerModelList); + if (base.total > _modelLists.length) { + _innerModelList = base.rows + .map((e) => HomeAnnounceModel.fromJson(e)) + .toList(); + monthListDepart(_innerModelList); + setState(() {}); + } else { + print('1111111'); + _refreshController.finishLoadCallBack!(noMore: true); + } }, child: _modelLists.isEmpty ? Container() diff --git a/lib/pages/opening_code_page/opening_code_page.dart b/lib/pages/opening_code_page/opening_code_page.dart index d8568dce..7837c110 100644 --- a/lib/pages/opening_code_page/opening_code_page.dart +++ b/lib/pages/opening_code_page/opening_code_page.dart @@ -237,7 +237,7 @@ class _OpeningCodePageState extends State { ? Get.off(() => CertificationPage()) : BotToast.showText(text: '已实名认证'); }, - text: '开门记录', + text: '住户认证', suffix: UserTool.userProvider.userInfoModel! .idCard == null diff --git a/lib/pages/personal/personal_page.dart b/lib/pages/personal/personal_page.dart index ecb2f6c5..c75d5d2a 100644 --- a/lib/pages/personal/personal_page.dart +++ b/lib/pages/personal/personal_page.dart @@ -422,10 +422,7 @@ class _PersonalIndexState extends State // () => HouseOwnersPage( // identify: 4, // ), - '${UserTool.userProvider.defaultHouse?.communityName ?? ''} ' - '${UserTool.userProvider.defaultHouse?.buildingName ?? ''}' - '${UserTool.userProvider.defaultHouse?.unitName ?? ''}' - '${UserTool.userProvider.defaultHouse?.estateName ?? ''}', + '${UserTool.userProvider.defaultHouseString}', ), _function('我的家庭', Assets.newIcon.icWdjt.path, () { Get.to(() => MyFamilyPage()); diff --git a/lib/ui/community/activity/activity_card.dart b/lib/ui/community/activity/activity_card.dart index b2e72ea8..1ae6b365 100644 --- a/lib/ui/community/activity/activity_card.dart +++ b/lib/ui/community/activity/activity_card.dart @@ -9,7 +9,7 @@ import 'package:get/get.dart'; import 'activity_detail_page.dart'; class ActivityCard extends StatelessWidget { - final bool? home; + final bool home; final HomeActivityModel? model; const ActivityCard({ @@ -22,10 +22,9 @@ class ActivityCard extends StatelessWidget { Widget build(BuildContext context) { return ConstrainedBox( - constraints: BoxConstraints(maxHeight: home! ? 450.w : 540.w), + constraints: BoxConstraints(maxHeight: home ? 450.w : 540.w), child: MaterialButton( clipBehavior: Clip.antiAlias, - color: Colors.white, padding: EdgeInsets.zero, onPressed: () => Get.to(() => ActivityDetailPage(id: model!.id)), elevation: 0, @@ -46,7 +45,7 @@ class ActivityCard extends StatelessWidget { child: BeeImageNetwork( imgs: model!.imgList ?? [], width: double.infinity, - height: home! ? 250.w : 340.w, + height: home ? 250.w : 340.w, ), ), ), @@ -78,54 +77,46 @@ class ActivityCard extends StatelessWidget { ], ), 24.hb, - Padding( - padding: EdgeInsets.symmetric(horizontal: 32.w), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - constraints: BoxConstraints(maxWidth: 340.w), - child: Text( - model == null ? '' : model!.title, - maxLines: 2, - overflow: TextOverflow.ellipsis, - style: TextStyle( - color: Color(0xD9000000), - fontSize: 28.sp, - fontWeight: FontWeight.bold), - ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + constraints: BoxConstraints(maxWidth: 340.w), + child: Text( + model == null ? '' : model!.title, + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Color(0xD9000000), + fontSize: 28.sp, + fontWeight: FontWeight.bold), ), - Spacer(), - ], - ), + ), + Spacer(), + ], ), - Spacer(), - - Padding( - padding: home!?EdgeInsets.only(left: 32.w,right: 32.w,): EdgeInsets.only(left: 32.w,right: 32.w,bottom: 32.w), - child: Row( - children: [ - Flexible( - child: AvatarsParticipate( - avatars: - (model?.avatarImgList?.map((e) => e.url).toList() ?? []), - pNum: model?.registrationNum ?? 0, - hasIcon: false, - - ), + 24.hb, + Row( + children: [ + Flexible( + child: AvatarsParticipate( + avatars: + (model?.avatarImgList?.map((e) => e.url).toList() ?? + []), + pNum: model?.registrationNum ?? 0, + hasIcon: false, ), - // Spacer(), - Offstage( - offstage: ActivityFunc.dateCheck(model!.end) == '已结束', - child: ActivityFunc.dateCheck(model!.end) - .text - .size(24.sp) - .black - .make()), - ], - ), + ), + // Spacer(), + Offstage( + offstage: ActivityFunc.dateCheck(model!.end) == '已结束', + child: ActivityFunc.dateCheck(model!.end) + .text + .size(24.sp) + .black + .make()), + ], ) - ], ), ), diff --git a/lib/ui/community/activity/activity_list_page.dart b/lib/ui/community/activity/activity_list_page.dart index 36a9c46a..60a270e1 100644 --- a/lib/ui/community/activity/activity_list_page.dart +++ b/lib/ui/community/activity/activity_list_page.dart @@ -8,7 +8,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; class ActivityListPage extends StatefulWidget { - ActivityListPage({Key? key}) : super(key: key); + ActivityListPage({Key? key}) : super(key: key); @override _ActivityListPageState createState() => _ActivityListPageState(); @@ -44,9 +44,15 @@ class _ActivityListPageState extends State { padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 20.w), itemBuilder: (context, index) { final HomeActivityModel model = items[index]; - return ActivityCard(model: model); + return Container( + padding: + EdgeInsets.symmetric(vertical: 32.w, horizontal: 32.w), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(16.w)), + child: ActivityCard(model: model)); }, - separatorBuilder: (_, __) => 20.hb, + separatorBuilder: (_, __) => 32.hb, itemCount: items.length, ); }, diff --git a/lib/ui/function_and_service/work_order/all_order/all_order_view.dart b/lib/ui/function_and_service/work_order/all_order/all_order_view.dart index 3fa79438..db3259d4 100644 --- a/lib/ui/function_and_service/work_order/all_order/all_order_view.dart +++ b/lib/ui/function_and_service/work_order/all_order/all_order_view.dart @@ -1,15 +1,81 @@ +import 'package:aku_new_community/constants/saas_api.dart'; +import 'package:aku_new_community/saas_model/work_order/work_order_list_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:power_logger/power_logger.dart'; +import 'package:velocity_x/src/extensions/num_ext.dart'; + +import '../work_order_card.dart'; class AllOrderView extends StatefulWidget { - const AllOrderView({Key? key}) : super(key: key); + final EasyRefreshController refreshController; + final int index; + const AllOrderView( + {Key? key, required this.refreshController, required this.index}) + : super(key: key); @override _AllOrderViewState createState() => _AllOrderViewState(); } -class _AllOrderViewState extends State { +class _AllOrderViewState extends State + with SingleTickerProviderStateMixin { + int _page = 1; + int _size = 10; + List _models = []; @override Widget build(BuildContext context) { - return Container(); + return EasyRefresh( + firstRefresh: true, + controller: widget.refreshController, + header: MaterialHeader(), + footer: MaterialFooter(), + onRefresh: () async { + _page = 1; + try { + var base = await NetUtil().getList(SAASAPI.workOrder.list, params: { + 'pageNum': _page, + 'size': _size, + 'status': widget.index == 0 ? null : widget.index, + }); + _models = + base.rows.map((e) => WorkOrderListModel.fromJson(e)).toList(); + } catch (e) { + LoggerData.addData(e.toString()); + } + setState(() {}); + }, + onLoad: () async { + _page++; + var base = await NetUtil().getList(SAASAPI.workOrder.list, params: { + 'pageNum': _page, + 'size': _size, + 'status': widget.index == 0 ? null : widget.index, + }); + if (_models.length < base.total) { + _models.addAll( + base.rows.map((e) => WorkOrderListModel.fromJson(e)).toList()); + setState(() {}); + } else { + widget.refreshController.finishLoad(noMore: true); + } + }, + child: _models.isEmpty + ? Container() + : ListView.separated( + padding: EdgeInsets.all(24.w), + itemBuilder: (context, index) { + return WorkOrderCard( + model: _models[index], + refresh: widget.refreshController.callRefresh, + ); + }, + separatorBuilder: (context, index) { + return 24.w.heightBox; + }, + itemCount: _models.length)); + ; } } diff --git a/lib/ui/function_and_service/work_order/work_order_page.dart b/lib/ui/function_and_service/work_order/work_order_page.dart index ce08179c..e525e28b 100644 --- a/lib/ui/function_and_service/work_order/work_order_page.dart +++ b/lib/ui/function_and_service/work_order/work_order_page.dart @@ -1,8 +1,6 @@ -import 'package:aku_new_community/constants/saas_api.dart'; import 'package:aku_new_community/saas_model/work_order/work_order_list_model.dart'; import 'package:aku_new_community/ui/function_and_service/work_order/publish_work_order_page.dart'; -import 'package:aku_new_community/ui/function_and_service/work_order/work_order_card.dart'; -import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/ui/function_and_service/work_order/work_order_view.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart'; import 'package:flutter/cupertino.dart'; @@ -10,7 +8,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; -import 'package:power_logger/power_logger.dart'; import 'package:velocity_x/velocity_x.dart'; class WorkOrderPage extends StatefulWidget { @@ -62,68 +59,16 @@ class _WorkOrderPageState extends State ], appBarBottom: BeeTabBar( tabs: _tabs, - onTap: (index) { - _models.clear(); - setState(() {}); - }, controller: _tabController, ), body: TabBarView( controller: _tabController, - children: - _tabs.mapIndexed((e, index) => _getOrderView(index)).toList()), + children: _tabs + .mapIndexed((e, index) => WorkOrderView( + refreshController: _refreshControllers[index], + index: index, + )) + .toList()), ); } - - Widget _getOrderView(int index) { - return EasyRefresh( - firstRefresh: true, - controller: _refreshControllers[index], - header: MaterialHeader(), - footer: MaterialFooter(), - onRefresh: () async { - _page = 1; - try { - var base = await NetUtil().getList(SAASAPI.workOrder.list, params: { - 'pageNum': _page, - 'size': _size, - 'status': index == 0 ? null : index, - }); - _models = - base.rows.map((e) => WorkOrderListModel.fromJson(e)).toList(); - } catch (e) { - LoggerData.addData(e.toString()); - } - setState(() {}); - }, - onLoad: () async { - _page++; - var base = await NetUtil().getList(SAASAPI.workOrder.list, params: { - 'pageNum': _page, - 'size': _size, - 'status': index == 0 ? null : index, - }); - if (_models.length < base.total) { - _models.addAll( - base.rows.map((e) => WorkOrderListModel.fromJson(e)).toList()); - setState(() {}); - } else { - _refreshControllers[index].finishLoad(noMore: true); - } - }, - child: _models.isEmpty - ? Container() - : ListView.separated( - padding: EdgeInsets.all(24.w), - itemBuilder: (context, index) { - return WorkOrderCard( - model: _models[index], - refresh: _refreshControllers[index].callRefresh, - ); - }, - separatorBuilder: (context, index) { - return 24.w.heightBox; - }, - itemCount: _models.length)); - } } diff --git a/lib/ui/function_and_service/work_order/work_order_view.dart b/lib/ui/function_and_service/work_order/work_order_view.dart new file mode 100644 index 00000000..c41c4ec7 --- /dev/null +++ b/lib/ui/function_and_service/work_order/work_order_view.dart @@ -0,0 +1,79 @@ +import 'package:aku_new_community/constants/saas_api.dart'; +import 'package:aku_new_community/saas_model/work_order/work_order_list_model.dart'; +import 'package:aku_new_community/ui/function_and_service/work_order/work_order_card.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:power_logger/power_logger.dart'; +import 'package:velocity_x/src/extensions/num_ext.dart'; + +class WorkOrderView extends StatefulWidget { + final EasyRefreshController refreshController; + final int index; + const WorkOrderView( + {Key? key, required this.refreshController, required this.index}) + : super(key: key); + + @override + _WorkOrderViewState createState() => _WorkOrderViewState(); +} + +class _WorkOrderViewState extends State { + int _page = 1; + int _size = 10; + List _models = []; + @override + Widget build(BuildContext context) { + return EasyRefresh( + firstRefresh: true, + controller: widget.refreshController, + header: MaterialHeader(), + footer: MaterialFooter(), + onRefresh: () async { + _page = 1; + try { + var base = await NetUtil().getList(SAASAPI.workOrder.list, params: { + 'pageNum': _page, + 'size': _size, + 'status': widget.index == 0 ? null : widget.index, + }); + _models = + base.rows.map((e) => WorkOrderListModel.fromJson(e)).toList(); + } catch (e) { + LoggerData.addData(e.toString()); + } + setState(() {}); + }, + onLoad: () async { + _page++; + var base = await NetUtil().getList(SAASAPI.workOrder.list, params: { + 'pageNum': _page, + 'size': _size, + 'status': widget.index == 0 ? null : widget.index, + }); + if (_models.length < base.total) { + _models.addAll( + base.rows.map((e) => WorkOrderListModel.fromJson(e)).toList()); + setState(() {}); + } else { + widget.refreshController.finishLoad(noMore: true); + } + }, + child: _models.isEmpty + ? Container() + : ListView.separated( + padding: EdgeInsets.all(24.w), + itemBuilder: (context, index) { + return WorkOrderCard( + model: _models[index], + refresh: widget.refreshController.callRefresh, + ); + }, + separatorBuilder: (context, index) { + return 24.w.heightBox; + }, + itemCount: _models.length)); + ; + } +} From 4c3ea317c3c2daaa0faccac3a3055f45ebd39c59 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Fri, 8 Apr 2022 14:37:28 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20apptheme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/constants/app_theme.dart | 93 ++++++++++++++++++++++++------------ 1 file changed, 63 insertions(+), 30 deletions(-) diff --git a/lib/constants/app_theme.dart b/lib/constants/app_theme.dart index f1ec0a96..eac2a8af 100644 --- a/lib/constants/app_theme.dart +++ b/lib/constants/app_theme.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; class AppTheme { @@ -10,28 +9,63 @@ class AppTheme { ProgressIndicatorThemeData(color: Color(0xFFFFD000)), primaryColor: Color(0xFFFFD000), textTheme: ThemeData.light().textTheme.copyWith( - headline3: TextStyle( - fontSize: 40.sp, - color: Color(0xFF333333), - fontWeight: FontWeight.bold, - ), - subtitle1: TextStyle( - fontSize: 32.sp, - color: Color(0xFF333333), - ), - subtitle2: TextStyle( - fontSize: 28.sp, - color: Color(0xFF333333), - ), - bodyText1: TextStyle( - fontSize: 24.sp, - color: Color(0xFF333333), - ), + caption: TextStyle( + fontSize: 28.sp, + color: Color(0xFF333333), + ), + overline: TextStyle( + fontSize: 32.sp, + color: Color(0xFF333333), + ), + headline1: TextStyle( + fontSize: 28.sp, + color: Color(0xFF333333), + fontWeight: FontWeight.bold, + ), + headline2: TextStyle( + fontSize: 30.sp, + color: Color(0xFF333333), + fontWeight: FontWeight.bold, + ), + headline3: TextStyle( + fontSize: 32.sp, + color: Color(0xFF333333), + fontWeight: FontWeight.bold, + ), + headline4: TextStyle( + fontSize: 36.sp, + color: Color(0xFF333333), + fontWeight: FontWeight.bold, ), + headline5: TextStyle( + fontSize: 40.sp, + color: Color(0xFF333333), + fontWeight: FontWeight.bold, + ), + subtitle1: TextStyle( + fontSize: 32.sp, + color: Color(0xFF333333), + ), + subtitle2: TextStyle( + fontSize: 28.sp, + color: Color(0xFF333333), + ), + bodyText1: TextStyle( + fontSize: 24.sp, + color: Color(0xFF333333), + ), + bodyText2: TextStyle( + fontSize: 28.sp, + color: Color(0xFF333333), + ), + button: TextStyle( + fontSize: 28.sp, + color: Color(0xFF333333), + )), floatingActionButtonTheme: FloatingActionButtonThemeData().copyWith( backgroundColor: Color(0xFFFFD000), ), - appBarTheme: AppBarTheme( + appBarTheme: AppBarTheme().copyWith( elevation: 0, centerTitle: true, iconTheme: IconThemeData( @@ -46,25 +80,24 @@ class AppTheme { ), ).bodyText2, titleTextStyle: TextTheme( - headline6: TextStyle( + headline3: TextStyle( color: Color(0xFF333333), - fontSize: 36.sp, + fontSize: 32.sp, fontWeight: FontWeight.bold, ), - ).headline6, + ).headline3, ), - tabBarTheme: TabBarTheme( + tabBarTheme: TabBarTheme().copyWith( labelColor: Color(0xFF333333), labelStyle: TextStyle( - fontSize: 28.sp, - fontWeight: FontWeight.w600, - ), - unselectedLabelStyle: TextStyle( - fontSize: 28.sp, + fontSize: 30.sp, + fontWeight: FontWeight.bold, ), + unselectedLabelStyle: + TextStyle(fontSize: 28.sp, fontWeight: FontWeight.normal), indicatorSize: TabBarIndicatorSize.label, ), - bottomNavigationBarTheme: BottomNavigationBarThemeData( + bottomNavigationBarTheme: BottomNavigationBarThemeData().copyWith( selectedItemColor: Color(0xFF333333), selectedLabelStyle: TextStyle( fontWeight: FontWeight.bold, @@ -72,7 +105,7 @@ class AppTheme { type: BottomNavigationBarType.fixed, unselectedLabelStyle: TextStyle(), ), - radioTheme: RadioThemeData( + radioTheme: RadioThemeData().copyWith( fillColor: MaterialStateProperty.resolveWith((states) { if (states.contains(MaterialState.selected)) return Color(0xFFFFD000); return null; From a9822f6833a7f04b5589373313bbb08bf9edd622 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Fri, 8 Apr 2022 20:18:56 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E5=95=86=E5=9F=8E=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/constants/application_objects.dart | 4 +- lib/gen/assets.gen.dart | 804 ++++++++++++++++++ .../market/shop_car/shop_car_list_model.dart | 5 +- .../shop_car/shop_car_list_model.g.dart | 2 +- lib/pages/personal/item_my_address.dart | 10 +- lib/provider/app_provider.dart | 27 +- .../home/application/all_application_new.dart | 114 +++ lib/ui/market/search/good_detail_page.dart | 64 +- lib/ui/market/search/search_func.dart | 9 +- lib/ui/market/search/submit_order_page.dart | 4 +- .../search/submit_order_page_normal.dart | 4 +- lib/ui/market/shop_car/shop_car_page.dart | 17 +- lib/utils/application_utils.dart | 308 +++++++ .../picker/bee_house_cascade_picker.dart | 12 +- pubspec.yaml | 2 +- 15 files changed, 1316 insertions(+), 70 deletions(-) create mode 100644 lib/ui/home/application/all_application_new.dart create mode 100644 lib/utils/application_utils.dart diff --git a/lib/constants/application_objects.dart b/lib/constants/application_objects.dart index 0fd2f54d..0fb421d9 100644 --- a/lib/constants/application_objects.dart +++ b/lib/constants/application_objects.dart @@ -25,6 +25,7 @@ import 'package:aku_new_community/ui/community/facility/facility_appointment_pag import 'package:aku_new_community/ui/function_and_service/task/task_page.dart'; import 'package:aku_new_community/ui/function_and_service/work_order/work_order_page.dart'; import 'package:aku_new_community/ui/home/application/all_application.dart'; +import 'package:aku_new_community/ui/home/application/all_application_new.dart'; import 'package:aku_new_community/ui/manager/advice/advice_page.dart'; import 'package:aku_new_community/ui/manager/questionnaire/questionnaire_page.dart'; import 'package:aku_new_community/ui/profile/car/car_manage_page.dart'; @@ -123,7 +124,8 @@ List appObjects = [ AO('共享停车', Assets.icons.sharePark.path, null), AO('二手市场', Assets.icons.secondHandMarket.path, null), AO('共享投屏', Assets.icons.projectionScreen.path, null), - AO('全部应用', Assets.home.icQbyy.path, () => Get.to(() => AllApplicationPage())), + AO('全部应用', Assets.home.icQbyy.path, + () => Get.to(() => AllApplicationNewPage())), // AO( // '小区教育', diff --git a/lib/gen/assets.gen.dart b/lib/gen/assets.gen.dart index 27a6cada..6db5805b 100644 --- a/lib/gen/assets.gen.dart +++ b/lib/gen/assets.gen.dart @@ -3,65 +3,123 @@ /// FlutterGen /// ***************************************************** +// ignore_for_file: directives_ordering,unnecessary_import + import 'package:flutter/widgets.dart'; class $AssetsApplicationsGen { const $AssetsApplicationsGen(); + /// File path: assets/applications/advice.png AssetGenImage get advice => const AssetGenImage('assets/applications/advice.png'); + + /// File path: assets/applications/all_app.png AssetGenImage get allApp => const AssetGenImage('assets/applications/all_app.png'); + + /// File path: assets/applications/borrow.png AssetGenImage get borrow => const AssetGenImage('assets/applications/borrow.png'); + + /// File path: assets/applications/box.png AssetGenImage get box => const AssetGenImage('assets/applications/box.png'); + + /// File path: assets/applications/committee.png AssetGenImage get committee => const AssetGenImage('assets/applications/committee.png'); + + /// File path: assets/applications/community_phone.png AssetGenImage get communityPhone => const AssetGenImage('assets/applications/community_phone.png'); + + /// File path: assets/applications/complaint.png AssetGenImage get complaint => const AssetGenImage('assets/applications/complaint.png'); + + /// File path: assets/applications/decoration.png AssetGenImage get decoration => const AssetGenImage('assets/applications/decoration.png'); + + /// File path: assets/applications/digital.png AssetGenImage get digital => const AssetGenImage('assets/applications/digital.png'); + + /// File path: assets/applications/door_code.png AssetGenImage get doorCode => const AssetGenImage('assets/applications/door_code.png'); + + /// File path: assets/applications/fix.png AssetGenImage get fix => const AssetGenImage('assets/applications/fix.png'); + + /// File path: assets/applications/goods_out.png AssetGenImage get goodsOut => const AssetGenImage('assets/applications/goods_out.png'); + + /// File path: assets/applications/home_live.png AssetGenImage get homeLive => const AssetGenImage('assets/applications/home_live.png'); + + /// File path: assets/applications/hospital.png AssetGenImage get hospital => const AssetGenImage('assets/applications/hospital.png'); + + /// File path: assets/applications/makeup.png AssetGenImage get makeup => const AssetGenImage('assets/applications/makeup.png'); + + /// File path: assets/applications/oepn_door.png AssetGenImage get oepnDoor => const AssetGenImage('assets/applications/oepn_door.png'); + + /// File path: assets/applications/payment.png AssetGenImage get payment => const AssetGenImage('assets/applications/payment.png'); + + /// File path: assets/applications/police.png AssetGenImage get police => const AssetGenImage('assets/applications/police.png'); + + /// File path: assets/applications/question.png AssetGenImage get question => const AssetGenImage('assets/applications/question.png'); + + /// File path: assets/applications/snack.png AssetGenImage get snack => const AssetGenImage('assets/applications/snack.png'); + + /// File path: assets/applications/tool_bmts.png AssetGenImage get toolBmts => const AssetGenImage('assets/applications/tool_bmts.png'); + + /// File path: assets/applications/toy.png AssetGenImage get toy => const AssetGenImage('assets/applications/toy.png'); + + /// File path: assets/applications/transfer.png AssetGenImage get transfer => const AssetGenImage('assets/applications/transfer.png'); + + /// File path: assets/applications/visitor_invite.png AssetGenImage get visitorInvite => const AssetGenImage('assets/applications/visitor_invite.png'); + + /// File path: assets/applications/vote.png AssetGenImage get vote => const AssetGenImage('assets/applications/vote.png'); + + /// File path: assets/applications/wine.png AssetGenImage get wine => const AssetGenImage('assets/applications/wine.png'); } class $AssetsBraceletGen { const $AssetsBraceletGen(); + /// File path: assets/bracelet/x5.png AssetGenImage get x5 => const AssetGenImage('assets/bracelet/x5.png'); + + /// File path: assets/bracelet/x8.png AssetGenImage get x8 => const AssetGenImage('assets/bracelet/x8.png'); + + /// File path: assets/bracelet/xiaomi6.png AssetGenImage get xiaomi6 => const AssetGenImage('assets/bracelet/xiaomi6.png'); } @@ -69,562 +127,1173 @@ class $AssetsBraceletGen { class $AssetsHomeGen { const $AssetsHomeGen(); + /// File path: assets/home/ic_bsbx.png AssetGenImage get icBsbx => const AssetGenImage('assets/home/ic_bsbx.png'); + + /// File path: assets/home/ic_gonggao.png AssetGenImage get icGonggao => const AssetGenImage('assets/home/ic_gonggao.png'); + + /// File path: assets/home/ic_kaimen.png AssetGenImage get icKaimen => const AssetGenImage('assets/home/ic_kaimen.png'); + + /// File path: assets/home/ic_ljcw.png AssetGenImage get icLjcw => const AssetGenImage('assets/home/ic_ljcw.png'); + + /// File path: assets/home/ic_location.png AssetGenImage get icLocation => const AssetGenImage('assets/home/ic_location.png'); + + /// File path: assets/home/ic_message.png AssetGenImage get icMessage => const AssetGenImage('assets/home/ic_message.png'); + + /// File path: assets/home/ic_qbyy.png AssetGenImage get icQbyy => const AssetGenImage('assets/home/ic_qbyy.png'); + + /// File path: assets/home/ic_rwfb.png AssetGenImage get icRwfb => const AssetGenImage('assets/home/ic_rwfb.png'); + + /// File path: assets/home/ic_search.png AssetGenImage get icSearch => const AssetGenImage('assets/home/ic_search.png'); + + /// File path: assets/home/ic_shangc_nor.png AssetGenImage get icShangcNor => const AssetGenImage('assets/home/ic_shangc_nor.png'); + + /// File path: assets/home/ic_shangc_sel.png AssetGenImage get icShangcSel => const AssetGenImage('assets/home/ic_shangc_sel.png'); + + /// File path: assets/home/ic_shequ_nor.png AssetGenImage get icShequNor => const AssetGenImage('assets/home/ic_shequ_nor.png'); + + /// File path: assets/home/ic_shequ_sel.png AssetGenImage get icShequSel => const AssetGenImage('assets/home/ic_shequ_sel.png'); + + /// File path: assets/home/ic_shjf.png AssetGenImage get icShjf => const AssetGenImage('assets/home/ic_shjf.png'); + + /// File path: assets/home/ic_shouye_nor.png AssetGenImage get icShouyeNor => const AssetGenImage('assets/home/ic_shouye_nor.png'); + + /// File path: assets/home/ic_shouye_sel.png AssetGenImage get icShouyeSel => const AssetGenImage('assets/home/ic_shouye_sel.png'); + + /// File path: assets/home/ic_ssyy.png AssetGenImage get icSsyy => const AssetGenImage('assets/home/ic_ssyy.png'); + + /// File path: assets/home/ic_wode_nor.png AssetGenImage get icWodeNor => const AssetGenImage('assets/home/ic_wode_nor.png'); + + /// File path: assets/home/ic_wode_sel.png AssetGenImage get icWodeSel => const AssetGenImage('assets/home/ic_wode_sel.png'); + + /// File path: assets/home/ic_zbfw.png AssetGenImage get icZbfw => const AssetGenImage('assets/home/ic_zbfw.png'); + + /// File path: assets/home/ic_zhyl.png AssetGenImage get icZhyl => const AssetGenImage('assets/home/ic_zhyl.png'); + + /// File path: assets/home/img_fkyq.png AssetGenImage get imgFkyq => const AssetGenImage('assets/home/img_fkyq.png'); + + /// File path: assets/home/img_jyzx.png AssetGenImage get imgJyzx => const AssetGenImage('assets/home/img_jyzx.png'); + + /// File path: assets/home/img_tabdi.png AssetGenImage get imgTabdi => const AssetGenImage('assets/home/img_tabdi.png'); + + /// File path: assets/home/img_yjbj.png AssetGenImage get imgYjbj => const AssetGenImage('assets/home/img_yjbj.png'); } class $AssetsIconsGen { const $AssetsIconsGen(); + /// File path: assets/icons/add.png AssetGenImage get add => const AssetGenImage('assets/icons/add.png'); + + /// File path: assets/icons/alarm.png AssetGenImage get alarm => const AssetGenImage('assets/icons/alarm.png'); + + /// File path: assets/icons/alarm_clock.png AssetGenImage get alarmClock => const AssetGenImage('assets/icons/alarm_clock.png'); + + /// File path: assets/icons/alipay_round.png AssetGenImage get alipayRound => const AssetGenImage('assets/icons/alipay_round.png'); + + /// File path: assets/icons/app_add.png AssetGenImage get appAdd => const AssetGenImage('assets/icons/app_add.png'); + + /// File path: assets/icons/app_alarm.png AssetGenImage get appAlarm => const AssetGenImage('assets/icons/app_alarm.png'); + + /// File path: assets/icons/app_reduce.png AssetGenImage get appReduce => const AssetGenImage('assets/icons/app_reduce.png'); + + /// File path: assets/icons/appointment-address.png AssetGenImage get appointmentAddress => const AssetGenImage('assets/icons/appointment-address.png'); + + /// File path: assets/icons/appointment-code.png AssetGenImage get appointmentCode => const AssetGenImage('assets/icons/appointment-code.png'); + + /// File path: assets/icons/appointment_date.png AssetGenImage get appointmentDate => const AssetGenImage('assets/icons/appointment_date.png'); + + /// File path: assets/icons/article_count.png AssetGenImage get articleCount => const AssetGenImage('assets/icons/article_count.png'); + + /// File path: assets/icons/article_name.png AssetGenImage get articleName => const AssetGenImage('assets/icons/article_name.png'); + + /// File path: assets/icons/bee_task.png AssetGenImage get beeTask => const AssetGenImage('assets/icons/bee_task.png'); + + /// File path: assets/icons/blood_ressure.png AssetGenImage get bloodRessure => const AssetGenImage('assets/icons/blood_ressure.png'); + + /// File path: assets/icons/borrow_failure.png AssetGenImage get borrowFailure => const AssetGenImage('assets/icons/borrow_failure.png'); + + /// File path: assets/icons/borrow_status.png AssetGenImage get borrowStatus => const AssetGenImage('assets/icons/borrow_status.png'); + + /// File path: assets/icons/borrow_success.png AssetGenImage get borrowSuccess => const AssetGenImage('assets/icons/borrow_success.png'); + + /// File path: assets/icons/camera.png AssetGenImage get camera => const AssetGenImage('assets/icons/camera.png'); + + /// File path: assets/icons/cancel_task.png AssetGenImage get cancelTask => const AssetGenImage('assets/icons/cancel_task.png'); + + /// File path: assets/icons/change.png AssetGenImage get change => const AssetGenImage('assets/icons/change.png'); + + /// File path: assets/icons/clock_circle.png AssetGenImage get clockCircle => const AssetGenImage('assets/icons/clock_circle.png'); + + /// File path: assets/icons/clock_success.png AssetGenImage get clockSuccess => const AssetGenImage('assets/icons/clock_success.png'); + + /// File path: assets/icons/collect.png AssetGenImage get collect => const AssetGenImage('assets/icons/collect.png'); + + /// File path: assets/icons/collection_setting.png AssetGenImage get collectionSetting => const AssetGenImage('assets/icons/collection_setting.png'); + + /// File path: assets/icons/collection_share.png AssetGenImage get collectionShare => const AssetGenImage('assets/icons/collection_share.png'); + + /// File path: assets/icons/comment_notice.png AssetGenImage get commentNotice => const AssetGenImage('assets/icons/comment_notice.png'); + + /// File path: assets/icons/commerc.png AssetGenImage get commerc => const AssetGenImage('assets/icons/commerc.png'); + + /// File path: assets/icons/community_comment.png AssetGenImage get communityComment => const AssetGenImage('assets/icons/community_comment.png'); + + /// File path: assets/icons/community_comment_is.png AssetGenImage get communityCommentIs => const AssetGenImage('assets/icons/community_comment_is.png'); + + /// File path: assets/icons/community_like.png AssetGenImage get communityLike => const AssetGenImage('assets/icons/community_like.png'); + + /// File path: assets/icons/community_like_is.png AssetGenImage get communityLikeIs => const AssetGenImage('assets/icons/community_like_is.png'); + + /// File path: assets/icons/complaint.png AssetGenImage get complaint => const AssetGenImage('assets/icons/complaint.png'); + + /// File path: assets/icons/connect.png AssetGenImage get connect => const AssetGenImage('assets/icons/connect.png'); + + /// File path: assets/icons/consult.png AssetGenImage get consult => const AssetGenImage('assets/icons/consult.png'); + + /// File path: assets/icons/contract.png AssetGenImage get contract => const AssetGenImage('assets/icons/contract.png'); + + /// File path: assets/icons/copy.png AssetGenImage get copy => const AssetGenImage('assets/icons/copy.png'); + + /// File path: assets/icons/delete.png AssetGenImage get delete => const AssetGenImage('assets/icons/delete.png'); + + /// File path: assets/icons/device_alarm.png AssetGenImage get deviceAlarm => const AssetGenImage('assets/icons/device_alarm.png'); + + /// File path: assets/icons/dissatisfied.png AssetGenImage get dissatisfied => const AssetGenImage('assets/icons/dissatisfied.png'); + + /// File path: assets/icons/edit.png AssetGenImage get edit => const AssetGenImage('assets/icons/edit.png'); + + /// File path: assets/icons/environment.png AssetGenImage get environment => const AssetGenImage('assets/icons/environment.png'); + + /// File path: assets/icons/examine.png AssetGenImage get examine => const AssetGenImage('assets/icons/examine.png'); + + /// File path: assets/icons/examining.png AssetGenImage get examining => const AssetGenImage('assets/icons/examining.png'); + + /// File path: assets/icons/eye_close.png AssetGenImage get eyeClose => const AssetGenImage('assets/icons/eye_close.png'); + + /// File path: assets/icons/facility.png AssetGenImage get facility => const AssetGenImage('assets/icons/facility.png'); + + /// File path: assets/icons/falldown.png AssetGenImage get falldown => const AssetGenImage('assets/icons/falldown.png'); + + /// File path: assets/icons/file.png AssetGenImage get file => const AssetGenImage('assets/icons/file.png'); + + /// File path: assets/icons/filter.png AssetGenImage get filter => const AssetGenImage('assets/icons/filter.png'); + + /// File path: assets/icons/finish.png AssetGenImage get finish => const AssetGenImage('assets/icons/finish.png'); + + /// File path: assets/icons/finish_order.png AssetGenImage get finishOrder => const AssetGenImage('assets/icons/finish_order.png'); + + /// File path: assets/icons/fire_alarm.png AssetGenImage get fireAlarm => const AssetGenImage('assets/icons/fire_alarm.png'); + + /// File path: assets/icons/foot.png AssetGenImage get foot => const AssetGenImage('assets/icons/foot.png'); + + /// File path: assets/icons/func_all.png AssetGenImage get funcAll => const AssetGenImage('assets/icons/func_all.png'); + + /// File path: assets/icons/func_bmdh.png AssetGenImage get funcBmdh => const AssetGenImage('assets/icons/func_bmdh.png'); + + /// File path: assets/icons/func_bsbx.png AssetGenImage get funcBsbx => const AssetGenImage('assets/icons/func_bsbx.png'); + + /// File path: assets/icons/func_dlxx.png AssetGenImage get funcDlxx => const AssetGenImage('assets/icons/func_dlxx.png'); + + /// File path: assets/icons/func_dzsw.png AssetGenImage get funcDzsw => const AssetGenImage('assets/icons/func_dzsw.png'); + + /// File path: assets/icons/func_fkyq.png AssetGenImage get funcFkyq => const AssetGenImage('assets/icons/func_fkyq.png'); + + /// File path: assets/icons/func_fwll.png AssetGenImage get funcFwll => const AssetGenImage('assets/icons/func_fwll.png'); + + /// File path: assets/icons/func_gife.png AssetGenImage get funcGife => const AssetGenImage('assets/icons/func_gife.png'); + + /// File path: assets/icons/func_hdtp.png AssetGenImage get funcHdtp => const AssetGenImage('assets/icons/func_hdtp.png'); + + /// File path: assets/icons/func_jhgl.png AssetGenImage get funcJhgl => const AssetGenImage('assets/icons/func_jhgl.png'); + + /// File path: assets/icons/func_jyzx.png AssetGenImage get funcJyzx => const AssetGenImage('assets/icons/func_jyzx.png'); + + /// File path: assets/icons/func_jzfw.png AssetGenImage get funcJzfw => const AssetGenImage('assets/icons/func_jzfw.png'); + + /// File path: assets/icons/func_kdbg.png AssetGenImage get funcKdbg => const AssetGenImage('assets/icons/func_kdbg.png'); + + /// File path: assets/icons/func_kmm.png AssetGenImage get funcKmm => const AssetGenImage('assets/icons/func_kmm.png'); + + /// File path: assets/icons/func_shjf.png AssetGenImage get funcShjf => const AssetGenImage('assets/icons/func_shjf.png'); + + /// File path: assets/icons/func_sqjs.png AssetGenImage get funcSqjs => const AssetGenImage('assets/icons/func_sqjs.png'); + + /// File path: assets/icons/func_ssyy.png AssetGenImage get funcSsyy => const AssetGenImage('assets/icons/func_ssyy.png'); + + /// File path: assets/icons/func_tsby.png AssetGenImage get funcTsby => const AssetGenImage('assets/icons/func_tsby.png'); + + /// File path: assets/icons/func_wjdc.png AssetGenImage get funcWjdc => const AssetGenImage('assets/icons/func_wjdc.png'); + + /// File path: assets/icons/func_wpch.png AssetGenImage get funcWpch => const AssetGenImage('assets/icons/func_wpch.png'); + + /// File path: assets/icons/func_yjbj.png AssetGenImage get funcYjbj => const AssetGenImage('assets/icons/func_yjbj.png'); + + /// File path: assets/icons/func_ywh.png AssetGenImage get funcYwh => const AssetGenImage('assets/icons/func_ywh.png'); + + /// File path: assets/icons/func_zbqy.png AssetGenImage get funcZbqy => const AssetGenImage('assets/icons/func_zbqy.png'); + + /// File path: assets/icons/func_zfsm.png AssetGenImage get funcZfsm => const AssetGenImage('assets/icons/func_zfsm.png'); + + /// File path: assets/icons/func_zxgl.png AssetGenImage get funcZxgl => const AssetGenImage('assets/icons/func_zxgl.png'); + + /// File path: assets/icons/goods_borrow.png AssetGenImage get goodsBorrow => const AssetGenImage('assets/icons/goods_borrow.png'); + + /// File path: assets/icons/goods_return.png AssetGenImage get goodsReturn => const AssetGenImage('assets/icons/goods_return.png'); + + /// File path: assets/icons/groupbuy_tab_selected.png AssetGenImage get groupbuyTabSelected => const AssetGenImage('assets/icons/groupbuy_tab_selected.png'); + + /// File path: assets/icons/groupbuy_tab_unselected.png AssetGenImage get groupbuyTabUnselected => const AssetGenImage('assets/icons/groupbuy_tab_unselected.png'); + + /// File path: assets/icons/heartbeat.png AssetGenImage get heartbeat => const AssetGenImage('assets/icons/heartbeat.png'); + + /// File path: assets/icons/hot_fire.png AssetGenImage get hotFire => const AssetGenImage('assets/icons/hot_fire.png'); + + /// File path: assets/icons/house.png AssetGenImage get house => const AssetGenImage('assets/icons/house.png'); + + /// File path: assets/icons/house_keeping.png AssetGenImage get houseKeeping => const AssetGenImage('assets/icons/house_keeping.png'); + + /// File path: assets/icons/icon_address_edit.png AssetGenImage get iconAddressEdit => const AssetGenImage('assets/icons/icon_address_edit.png'); + + /// File path: assets/icons/icon_address_isdefault.png AssetGenImage get iconAddressIsdefault => const AssetGenImage('assets/icons/icon_address_isdefault.png'); + + /// File path: assets/icons/icon_address_not.png AssetGenImage get iconAddressNot => const AssetGenImage('assets/icons/icon_address_not.png'); + + /// File path: assets/icons/icon_back.png AssetGenImage get iconBack => const AssetGenImage('assets/icons/icon_back.png'); + + /// File path: assets/icons/icon_change_grid.png AssetGenImage get iconChangeGrid => const AssetGenImage('assets/icons/icon_change_grid.png'); + + /// File path: assets/icons/icon_change_list.png AssetGenImage get iconChangeList => const AssetGenImage('assets/icons/icon_change_list.png'); + + /// File path: assets/icons/icon_comment.png AssetGenImage get iconComment => const AssetGenImage('assets/icons/icon_comment.png'); + + /// File path: assets/icons/icon_community_push.png AssetGenImage get iconCommunityPush => const AssetGenImage('assets/icons/icon_community_push.png'); + + /// File path: assets/icons/icon_favor_choose.png AssetGenImage get iconFavorChoose => const AssetGenImage('assets/icons/icon_favor_choose.png'); + + /// File path: assets/icons/icon_good_car.png AssetGenImage get iconGoodCar => const AssetGenImage('assets/icons/icon_good_car.png'); + + /// File path: assets/icons/icon_good_favor.png AssetGenImage get iconGoodFavor => const AssetGenImage('assets/icons/icon_good_favor.png'); + + /// File path: assets/icons/icon_good_location.png AssetGenImage get iconGoodLocation => const AssetGenImage('assets/icons/icon_good_location.png'); + + /// File path: assets/icons/icon_good_my.png AssetGenImage get iconGoodMy => const AssetGenImage('assets/icons/icon_good_my.png'); + + /// File path: assets/icons/icon_logistics.png AssetGenImage get iconLogistics => const AssetGenImage('assets/icons/icon_logistics.png'); + + /// File path: assets/icons/icon_main_all.png AssetGenImage get iconMainAll => const AssetGenImage('assets/icons/icon_main_all.png'); + + /// File path: assets/icons/icon_main_consult.png AssetGenImage get iconMainConsult => const AssetGenImage('assets/icons/icon_main_consult.png'); + + /// File path: assets/icons/icon_main_find.png AssetGenImage get iconMainFind => const AssetGenImage('assets/icons/icon_main_find.png'); + + /// File path: assets/icons/icon_main_fix.png AssetGenImage get iconMainFix => const AssetGenImage('assets/icons/icon_main_fix.png'); + + /// File path: assets/icons/icon_main_invite.png AssetGenImage get iconMainInvite => const AssetGenImage('assets/icons/icon_main_invite.png'); + + /// File path: assets/icons/icon_main_location.png AssetGenImage get iconMainLocation => const AssetGenImage('assets/icons/icon_main_location.png'); + + /// File path: assets/icons/icon_main_message.png AssetGenImage get iconMainMessage => const AssetGenImage('assets/icons/icon_main_message.png'); + + /// File path: assets/icons/icon_main_open.png AssetGenImage get iconMainOpen => const AssetGenImage('assets/icons/icon_main_open.png'); + + /// File path: assets/icons/icon_main_pay.png AssetGenImage get iconMainPay => const AssetGenImage('assets/icons/icon_main_pay.png'); + + /// File path: assets/icons/icon_main_police.png AssetGenImage get iconMainPolice => const AssetGenImage('assets/icons/icon_main_police.png'); + + /// File path: assets/icons/icon_main_subscribe.png AssetGenImage get iconMainSubscribe => const AssetGenImage('assets/icons/icon_main_subscribe.png'); + + /// File path: assets/icons/icon_market_success.png AssetGenImage get iconMarketSuccess => const AssetGenImage('assets/icons/icon_market_success.png'); + + /// File path: assets/icons/icon_more.png AssetGenImage get iconMore => const AssetGenImage('assets/icons/icon_more.png'); + + /// File path: assets/icons/icon_more_black.png AssetGenImage get iconMoreBlack => const AssetGenImage('assets/icons/icon_more_black.png'); + + /// File path: assets/icons/icon_my_car.png AssetGenImage get iconMyCar => const AssetGenImage('assets/icons/icon_my_car.png'); + + /// File path: assets/icons/icon_my_carSeat.png AssetGenImage get iconMyCarSeat => const AssetGenImage('assets/icons/icon_my_carSeat.png'); + + /// File path: assets/icons/icon_my_edit.png AssetGenImage get iconMyEdit => const AssetGenImage('assets/icons/icon_my_edit.png'); + + /// File path: assets/icons/icon_my_house.png AssetGenImage get iconMyHouse => const AssetGenImage('assets/icons/icon_my_house.png'); + + /// File path: assets/icons/icon_my_location.png AssetGenImage get iconMyLocation => const AssetGenImage('assets/icons/icon_my_location.png'); + + /// File path: assets/icons/icon_my_setting.png AssetGenImage get iconMySetting => const AssetGenImage('assets/icons/icon_my_setting.png'); + + /// File path: assets/icons/icon_my_visitor.png AssetGenImage get iconMyVisitor => const AssetGenImage('assets/icons/icon_my_visitor.png'); + + /// File path: assets/icons/icon_notification.png AssetGenImage get iconNotification => const AssetGenImage('assets/icons/icon_notification.png'); + + /// File path: assets/icons/icon_price.png AssetGenImage get iconPrice => const AssetGenImage('assets/icons/icon_price.png'); + + /// File path: assets/icons/icon_price_bottom.png AssetGenImage get iconPriceBottom => const AssetGenImage('assets/icons/icon_price_bottom.png'); + + /// File path: assets/icons/icon_price_normal.png AssetGenImage get iconPriceNormal => const AssetGenImage('assets/icons/icon_price_normal.png'); + + /// File path: assets/icons/icon_price_top.png AssetGenImage get iconPriceTop => const AssetGenImage('assets/icons/icon_price_top.png'); + + /// File path: assets/icons/icon_property_location.png AssetGenImage get iconPropertyLocation => const AssetGenImage('assets/icons/icon_property_location.png'); + + /// File path: assets/icons/icon_property_message.png AssetGenImage get iconPropertyMessage => const AssetGenImage('assets/icons/icon_property_message.png'); + + /// File path: assets/icons/icon_property_search.png AssetGenImage get iconPropertySearch => const AssetGenImage('assets/icons/icon_property_search.png'); + + /// File path: assets/icons/icon_setting.png AssetGenImage get iconSetting => const AssetGenImage('assets/icons/icon_setting.png'); + + /// File path: assets/icons/icon_sort.png AssetGenImage get iconSort => const AssetGenImage('assets/icons/icon_sort.png'); + + /// File path: assets/icons/icon_thumbsUp.png AssetGenImage get iconThumbsUp => const AssetGenImage('assets/icons/icon_thumbsUp.png'); + + /// File path: assets/icons/icon_toTop.png AssetGenImage get iconToTop => const AssetGenImage('assets/icons/icon_toTop.png'); + + /// File path: assets/icons/icon_topic_first.png AssetGenImage get iconTopicFirst => const AssetGenImage('assets/icons/icon_topic_first.png'); + + /// File path: assets/icons/icon_topic_second.png AssetGenImage get iconTopicSecond => const AssetGenImage('assets/icons/icon_topic_second.png'); + + /// File path: assets/icons/icon_topic_third.png AssetGenImage get iconTopicThird => const AssetGenImage('assets/icons/icon_topic_third.png'); + + /// File path: assets/icons/identify.png AssetGenImage get identify => const AssetGenImage('assets/icons/identify.png'); + + /// File path: assets/icons/img_add.png AssetGenImage get imgAdd => const AssetGenImage('assets/icons/img_add.png'); + + /// File path: assets/icons/img_qiandao.png AssetGenImage get imgQiandao => const AssetGenImage('assets/icons/img_qiandao.png'); + + /// File path: assets/icons/img_shezhi.png AssetGenImage get imgShezhi => const AssetGenImage('assets/icons/img_shezhi.png'); + + /// File path: assets/icons/intergral.png AssetGenImage get intergral => const AssetGenImage('assets/icons/intergral.png'); + + /// File path: assets/icons/introduce.png AssetGenImage get introduce => const AssetGenImage('assets/icons/introduce.png'); + + /// File path: assets/icons/lease_house.png AssetGenImage get leaseHouse => const AssetGenImage('assets/icons/lease_house.png'); + + /// File path: assets/icons/life_pay_record.png AssetGenImage get lifePayRecord => const AssetGenImage('assets/icons/life_pay_record.png'); + + /// File path: assets/icons/like.png AssetGenImage get like => const AssetGenImage('assets/icons/like.png'); + + /// File path: assets/icons/location.png AssetGenImage get location => const AssetGenImage('assets/icons/location.png'); + + /// File path: assets/icons/manager_order_cancel.png AssetGenImage get managerOrderCancel => const AssetGenImage('assets/icons/manager_order_cancel.png'); + + /// File path: assets/icons/manager_phone_call.png AssetGenImage get managerPhoneCall => const AssetGenImage('assets/icons/manager_phone_call.png'); + + /// File path: assets/icons/market_tab_selected.png AssetGenImage get marketTabSelected => const AssetGenImage('assets/icons/market_tab_selected.png'); + + /// File path: assets/icons/market_tab_unselected.png AssetGenImage get marketTabUnselected => const AssetGenImage('assets/icons/market_tab_unselected.png'); + + /// File path: assets/icons/nearby_pet.png AssetGenImage get nearbyPet => const AssetGenImage('assets/icons/nearby_pet.png'); + + /// File path: assets/icons/nearby_service.png AssetGenImage get nearbyService => const AssetGenImage('assets/icons/nearby_service.png'); + + /// File path: assets/icons/normal.png AssetGenImage get normal => const AssetGenImage('assets/icons/normal.png'); + + /// File path: assets/icons/oxygen.png AssetGenImage get oxygen => const AssetGenImage('assets/icons/oxygen.png'); + + /// File path: assets/icons/pass.png AssetGenImage get pass => const AssetGenImage('assets/icons/pass.png'); + + /// File path: assets/icons/pay.png AssetGenImage get pay => const AssetGenImage('assets/icons/pay.png'); + + /// File path: assets/icons/phone.png AssetGenImage get phone => const AssetGenImage('assets/icons/phone.png'); + + /// File path: assets/icons/phone_circle.png AssetGenImage get phoneCircle => const AssetGenImage('assets/icons/phone_circle.png'); + + /// File path: assets/icons/projection_screen.png AssetGenImage get projectionScreen => const AssetGenImage('assets/icons/projection_screen.png'); + + /// File path: assets/icons/property.png AssetGenImage get property => const AssetGenImage('assets/icons/property.png'); + + /// File path: assets/icons/proposal.png AssetGenImage get proposal => const AssetGenImage('assets/icons/proposal.png'); + + /// File path: assets/icons/provide_aged.png AssetGenImage get provideAged => const AssetGenImage('assets/icons/provide_aged.png'); + + /// File path: assets/icons/record.png AssetGenImage get record => const AssetGenImage('assets/icons/record.png'); + + /// File path: assets/icons/reject.png AssetGenImage get reject => const AssetGenImage('assets/icons/reject.png'); + + /// File path: assets/icons/report.png AssetGenImage get report => const AssetGenImage('assets/icons/report.png'); + + /// File path: assets/icons/reward.png AssetGenImage get reward => const AssetGenImage('assets/icons/reward.png'); + + /// File path: assets/icons/satisfied.png AssetGenImage get satisfied => const AssetGenImage('assets/icons/satisfied.png'); + + /// File path: assets/icons/second_hand.png AssetGenImage get secondHand => const AssetGenImage('assets/icons/second_hand.png'); + + /// File path: assets/icons/second_hand_market.png AssetGenImage get secondHandMarket => const AssetGenImage('assets/icons/second_hand_market.png'); + + /// File path: assets/icons/service.png AssetGenImage get service => const AssetGenImage('assets/icons/service.png'); + + /// File path: assets/icons/share_park.png AssetGenImage get sharePark => const AssetGenImage('assets/icons/share_park.png'); + + /// File path: assets/icons/shield_content.png AssetGenImage get shieldContent => const AssetGenImage('assets/icons/shield_content.png'); + + /// File path: assets/icons/shield_user.png AssetGenImage get shieldUser => const AssetGenImage('assets/icons/shield_user.png'); + + /// File path: assets/icons/shop_car.png AssetGenImage get shopCar => const AssetGenImage('assets/icons/shop_car.png'); + + /// File path: assets/icons/shop_close.png AssetGenImage get shopClose => const AssetGenImage('assets/icons/shop_close.png'); + + /// File path: assets/icons/shop_favorfill.png AssetGenImage get shopFavorfill => const AssetGenImage('assets/icons/shop_favorfill.png'); + + /// File path: assets/icons/shop_laba.png AssetGenImage get shopLaba => const AssetGenImage('assets/icons/shop_laba.png'); + + /// File path: assets/icons/shop_location.png AssetGenImage get shopLocation => const AssetGenImage('assets/icons/shop_location.png'); + + /// File path: assets/icons/shop_notice.png AssetGenImage get shopNotice => const AssetGenImage('assets/icons/shop_notice.png'); + + /// File path: assets/icons/shop_order.png AssetGenImage get shopOrder => const AssetGenImage('assets/icons/shop_order.png'); + + /// File path: assets/icons/shop_search.png AssetGenImage get shopSearch => const AssetGenImage('assets/icons/shop_search.png'); + + /// File path: assets/icons/shop_torb.png AssetGenImage get shopTorb => const AssetGenImage('assets/icons/shop_torb.png'); + + /// File path: assets/icons/shopping_mall.png AssetGenImage get shoppingMall => const AssetGenImage('assets/icons/shopping_mall.png'); + + /// File path: assets/icons/sos.png AssetGenImage get sos => const AssetGenImage('assets/icons/sos.png'); + + /// File path: assets/icons/system_notice.png AssetGenImage get systemNotice => const AssetGenImage('assets/icons/system_notice.png'); + + /// File path: assets/icons/tabbar_home.png AssetGenImage get tabbarHome => const AssetGenImage('assets/icons/tabbar_home.png'); + + /// File path: assets/icons/tabbar_home_no.png AssetGenImage get tabbarHomeNo => const AssetGenImage('assets/icons/tabbar_home_no.png'); + + /// File path: assets/icons/tabbar_house.png AssetGenImage get tabbarHouse => const AssetGenImage('assets/icons/tabbar_house.png'); + + /// File path: assets/icons/tabbar_house_no.png AssetGenImage get tabbarHouseNo => const AssetGenImage('assets/icons/tabbar_house_no.png'); + + /// File path: assets/icons/tabbar_market.png AssetGenImage get tabbarMarket => const AssetGenImage('assets/icons/tabbar_market.png'); + + /// File path: assets/icons/tabbar_market_no.png AssetGenImage get tabbarMarketNo => const AssetGenImage('assets/icons/tabbar_market_no.png'); + + /// File path: assets/icons/tabbar_message.png AssetGenImage get tabbarMessage => const AssetGenImage('assets/icons/tabbar_message.png'); + + /// File path: assets/icons/tabbar_message_no.png AssetGenImage get tabbarMessageNo => const AssetGenImage('assets/icons/tabbar_message_no.png'); + + /// File path: assets/icons/tabbar_user.png AssetGenImage get tabbarUser => const AssetGenImage('assets/icons/tabbar_user.png'); + + /// File path: assets/icons/tabbar_user_no.png AssetGenImage get tabbarUserNo => const AssetGenImage('assets/icons/tabbar_user_no.png'); + + /// File path: assets/icons/tag.png AssetGenImage get tag => const AssetGenImage('assets/icons/tag.png'); + + /// File path: assets/icons/task_location.png AssetGenImage get taskLocation => const AssetGenImage('assets/icons/task_location.png'); + + /// File path: assets/icons/test_kingcion.png AssetGenImage get testKingcion => const AssetGenImage('assets/icons/test_kingcion.png'); + + /// File path: assets/icons/tool_bmdh.png AssetGenImage get toolBmdh => const AssetGenImage('assets/icons/tool_bmdh.png'); + + /// File path: assets/icons/tool_bmts.png AssetGenImage get toolBmts => const AssetGenImage('assets/icons/tool_bmts.png'); + + /// File path: assets/icons/tool_bsbx.png AssetGenImage get toolBsbx => const AssetGenImage('assets/icons/tool_bsbx.png'); + + /// File path: assets/icons/tool_czxs.png AssetGenImage get toolCzxs => const AssetGenImage('assets/icons/tool_czxs.png'); + + /// File path: assets/icons/tool_facility.png AssetGenImage get toolFacility => const AssetGenImage('assets/icons/tool_facility.png'); + + /// File path: assets/icons/tool_fkyq.png AssetGenImage get toolFkyq => const AssetGenImage('assets/icons/tool_fkyq.png'); + + /// File path: assets/icons/tool_fsxb.png AssetGenImage get toolFsxb => const AssetGenImage('assets/icons/tool_fsxb.png'); + + /// File path: assets/icons/tool_hdtp.png AssetGenImage get toolHdtp => const AssetGenImage('assets/icons/tool_hdtp.png'); + + /// File path: assets/icons/tool_jhgl.png AssetGenImage get toolJhgl => const AssetGenImage('assets/icons/tool_jhgl.png'); + + /// File path: assets/icons/tool_jjsh.png AssetGenImage get toolJjsh => const AssetGenImage('assets/icons/tool_jjsh.png'); + + /// File path: assets/icons/tool_jyts.png AssetGenImage get toolJyts => const AssetGenImage('assets/icons/tool_jyts.png'); + + /// File path: assets/icons/tool_kmm.png AssetGenImage get toolKmm => const AssetGenImage('assets/icons/tool_kmm.png'); + + /// File path: assets/icons/tool_mywj.png AssetGenImage get toolMywj => const AssetGenImage('assets/icons/tool_mywj.png'); + + /// File path: assets/icons/tool_qbyy.png AssetGenImage get toolQbyy => const AssetGenImage('assets/icons/tool_qbyy.png'); + + /// File path: assets/icons/tool_shjf.png AssetGenImage get toolShjf => const AssetGenImage('assets/icons/tool_shjf.png'); + + /// File path: assets/icons/tool_smjd.png AssetGenImage get toolSmjd => const AssetGenImage('assets/icons/tool_smjd.png'); + + /// File path: assets/icons/tool_tsby.png AssetGenImage get toolTsby => const AssetGenImage('assets/icons/tool_tsby.png'); + + /// File path: assets/icons/tool_wjdc.png AssetGenImage get toolWjdc => const AssetGenImage('assets/icons/tool_wjdc.png'); + + /// File path: assets/icons/tool_wpcm.png AssetGenImage get toolWpcm => const AssetGenImage('assets/icons/tool_wpcm.png'); + + /// File path: assets/icons/tool_xxfs.png AssetGenImage get toolXxfs => const AssetGenImage('assets/icons/tool_xxfs.png'); + + /// File path: assets/icons/tool_yjbj.png AssetGenImage get toolYjbj => const AssetGenImage('assets/icons/tool_yjbj.png'); + + /// File path: assets/icons/tool_yjkm.png AssetGenImage get toolYjkm => const AssetGenImage('assets/icons/tool_yjkm.png'); + + /// File path: assets/icons/tool_yljs.png AssetGenImage get toolYljs => const AssetGenImage('assets/icons/tool_yljs.png'); + + /// File path: assets/icons/tool_ywh.png AssetGenImage get toolYwh => const AssetGenImage('assets/icons/tool_ywh.png'); + + /// File path: assets/icons/tool_zbbj.png AssetGenImage get toolZbbj => const AssetGenImage('assets/icons/tool_zbbj.png'); + + /// File path: assets/icons/tool_zxgl.png AssetGenImage get toolZxgl => const AssetGenImage('assets/icons/tool_zxgl.png'); + + /// File path: assets/icons/user_icon_dfh.png AssetGenImage get userIconDfh => const AssetGenImage('assets/icons/user_icon_dfh.png'); + + /// File path: assets/icons/user_icon_dfk.png AssetGenImage get userIconDfk => const AssetGenImage('assets/icons/user_icon_dfk.png'); + + /// File path: assets/icons/user_icon_dpj.png AssetGenImage get userIconDpj => const AssetGenImage('assets/icons/user_icon_dpj.png'); + + /// File path: assets/icons/user_icon_dsh.png AssetGenImage get userIconDsh => const AssetGenImage('assets/icons/user_icon_dsh.png'); + + /// File path: assets/icons/user_icon_sh.png AssetGenImage get userIconSh => const AssetGenImage('assets/icons/user_icon_sh.png'); + + /// File path: assets/icons/user_icon_sz.png AssetGenImage get userIconSz => const AssetGenImage('assets/icons/user_icon_sz.png'); + + /// File path: assets/icons/user_icon_vip.png AssetGenImage get userIconVip => const AssetGenImage('assets/icons/user_icon_vip.png'); + + /// File path: assets/icons/user_icon_wdbx.png AssetGenImage get userIconWdbx => const AssetGenImage('assets/icons/user_icon_wdbx.png'); + + /// File path: assets/icons/user_icon_wdc.png AssetGenImage get userIconWdc => const AssetGenImage('assets/icons/user_icon_wdc.png'); + + /// File path: assets/icons/user_icon_wdcw.png AssetGenImage get userIconWdcw => const AssetGenImage('assets/icons/user_icon_wdcw.png'); + + /// File path: assets/icons/user_icon_wddz.png AssetGenImage get userIconWddz => const AssetGenImage('assets/icons/user_icon_wddz.png'); + + /// File path: assets/icons/user_icon_wdfk.png AssetGenImage get userIconWdfk => const AssetGenImage('assets/icons/user_icon_wdfk.png'); + + /// File path: assets/icons/user_icon_wdfw.png AssetGenImage get userIconWdfw => const AssetGenImage('assets/icons/user_icon_wdfw.png'); + + /// File path: assets/icons/user_icon_wdgj.png AssetGenImage get userIconWdgj => const AssetGenImage('assets/icons/user_icon_wdgj.png'); + + /// File path: assets/icons/user_icon_wdjf.png AssetGenImage get userIconWdjf => const AssetGenImage('assets/icons/user_icon_wdjf.png'); + + /// File path: assets/icons/user_icon_wdsqhd.png AssetGenImage get userIconWdsqhd => const AssetGenImage('assets/icons/user_icon_wdsqhd.png'); + + /// File path: assets/icons/vip1.png AssetGenImage get vip1 => const AssetGenImage('assets/icons/vip1.png'); + + /// File path: assets/icons/vip2.png AssetGenImage get vip2 => const AssetGenImage('assets/icons/vip2.png'); + + /// File path: assets/icons/vip3.png AssetGenImage get vip3 => const AssetGenImage('assets/icons/vip3.png'); + + /// File path: assets/icons/vip4.png AssetGenImage get vip4 => const AssetGenImage('assets/icons/vip4.png'); + + /// File path: assets/icons/vip_font.png AssetGenImage get vipFont => const AssetGenImage('assets/icons/vip_font.png'); + + /// File path: assets/icons/watch.png AssetGenImage get watch => const AssetGenImage('assets/icons/watch.png'); + + /// File path: assets/icons/xianshi.png AssetGenImage get xianshi => const AssetGenImage('assets/icons/xianshi.png'); } class $AssetsImagesGen { const $AssetsImagesGen(); + /// File path: assets/images/application.png AssetGenImage get application => const AssetGenImage('assets/images/application.png'); + + /// File path: assets/images/car_header.png AssetGenImage get carHeader => const AssetGenImage('assets/images/car_header.png'); + + /// File path: assets/images/card_blue.png AssetGenImage get cardBlue => const AssetGenImage('assets/images/card_blue.png'); + + /// File path: assets/images/card_pink.png AssetGenImage get cardPink => const AssetGenImage('assets/images/card_pink.png'); + + /// File path: assets/images/card_yellow.png AssetGenImage get cardYellow => const AssetGenImage('assets/images/card_yellow.png'); + + /// File path: assets/images/certification.png AssetGenImage get certification => const AssetGenImage('assets/images/certification.png'); + + /// File path: assets/images/circle_left_bottom.png AssetGenImage get circleLeftBottom => const AssetGenImage('assets/images/circle_left_bottom.png'); + + /// File path: assets/images/circle_right_bottom.png AssetGenImage get circleRightBottom => const AssetGenImage('assets/images/circle_right_bottom.png'); + + /// File path: assets/images/circle_right_top.png AssetGenImage get circleRightTop => const AssetGenImage('assets/images/circle_right_top.png'); + + /// File path: assets/images/circle_text.png AssetGenImage get circleText => const AssetGenImage('assets/images/circle_text.png'); + + /// File path: assets/images/code_logo.png AssetGenImage get codeLogo => const AssetGenImage('assets/images/code_logo.png'); + + /// File path: assets/images/commitment.png AssetGenImage get commitment => const AssetGenImage('assets/images/commitment.png'); + + /// File path: assets/images/community_my_bg.png AssetGenImage get communityMyBg => const AssetGenImage('assets/images/community_my_bg.png'); + + /// File path: assets/images/contact_manager.png AssetGenImage get contactManager => const AssetGenImage('assets/images/contact_manager.png'); + + /// File path: assets/images/drawings.png AssetGenImage get drawings => const AssetGenImage('assets/images/drawings.png'); + + /// File path: assets/images/equipment_empty.png AssetGenImage get equipmentEmpty => const AssetGenImage('assets/images/equipment_empty.png'); + + /// File path: assets/images/good_detail_integral_back.png AssetGenImage get goodDetailIntegralBack => const AssetGenImage('assets/images/good_detail_integral_back.png'); + + /// File path: assets/images/house_attestation.png AssetGenImage get houseAttestation => const AssetGenImage('assets/images/house_attestation.png'); + + /// File path: assets/images/house_empty.png AssetGenImage get houseEmpty => const AssetGenImage('assets/images/house_empty.png'); + + /// File path: assets/images/house_header.png AssetGenImage get houseHeader => const AssetGenImage('assets/images/house_header.png'); + + /// File path: assets/images/license.png AssetGenImage get license => const AssetGenImage('assets/images/license.png'); + + /// File path: assets/images/license_back.png AssetGenImage get licenseBack => const AssetGenImage('assets/images/license_back.png'); + + /// File path: assets/images/lock.png AssetGenImage get lock => const AssetGenImage('assets/images/lock.png'); + + /// File path: assets/images/logo.png AssetGenImage get logo => const AssetGenImage('assets/images/logo.png'); + + /// File path: assets/images/member_bg.png AssetGenImage get memberBg => const AssetGenImage('assets/images/member_bg.png'); + + /// File path: assets/images/mine_bg.png AssetGenImage get mineBg => const AssetGenImage('assets/images/mine_bg.png'); + + /// File path: assets/images/my_bg.png AssetGenImage get myBg => const AssetGenImage('assets/images/my_bg.png'); + + /// File path: assets/images/notice.png AssetGenImage get notice => const AssetGenImage('assets/images/notice.png'); + + /// File path: assets/images/open_door.png AssetGenImage get openDoor => const AssetGenImage('assets/images/open_door.png'); + + /// File path: assets/images/phone_logo.png AssetGenImage get phoneLogo => const AssetGenImage('assets/images/phone_logo.png'); + + /// File path: assets/images/placeholder.webp AssetGenImage get placeholder => const AssetGenImage('assets/images/placeholder.webp'); + + /// File path: assets/images/property_bg.png AssetGenImage get propertyBg => const AssetGenImage('assets/images/property_bg.png'); + + /// File path: assets/images/shop_car_empty.png AssetGenImage get shopCarEmpty => const AssetGenImage('assets/images/shop_car_empty.png'); + + /// File path: assets/images/success.png AssetGenImage get success => const AssetGenImage('assets/images/success.png'); + + /// File path: assets/images/white.png AssetGenImage get white => const AssetGenImage('assets/images/white.png'); + + /// File path: assets/images/wxpay.png AssetGenImage get wxpay => const AssetGenImage('assets/images/wxpay.png'); } @@ -635,109 +1304,237 @@ class $AssetsJsonGen { class $AssetsNewIconGen { const $AssetsNewIconGen(); + /// File path: assets/newIcon/all_classes.png AssetGenImage get allClasses => const AssetGenImage('assets/newIcon/all_classes.png'); + + /// File path: assets/newIcon/avatar_placeholder.png AssetGenImage get avatarPlaceholder => const AssetGenImage('assets/newIcon/avatar_placeholder.png'); + + /// File path: assets/newIcon/hyhd.png AssetGenImage get hyhd => const AssetGenImage('assets/newIcon/hyhd.png'); + + /// File path: assets/newIcon/ic_daifuk.png AssetGenImage get icDaifuk => const AssetGenImage('assets/newIcon/ic_daifuk.png'); + + /// File path: assets/newIcon/ic_daishouh.png AssetGenImage get icDaishouh => const AssetGenImage('assets/newIcon/ic_daishouh.png'); + + /// File path: assets/newIcon/ic_dingdan.png AssetGenImage get icDingdan => const AssetGenImage('assets/newIcon/ic_dingdan.png'); + + /// File path: assets/newIcon/ic_dlxx.png AssetGenImage get icDlxx => const AssetGenImage('assets/newIcon/ic_dlxx.png'); + + /// File path: assets/newIcon/ic_dzsw.png AssetGenImage get icDzsw => const AssetGenImage('assets/newIcon/ic_dzsw.png'); + + /// File path: assets/newIcon/ic_essc.png AssetGenImage get icEssc => const AssetGenImage('assets/newIcon/ic_essc.png'); + + /// File path: assets/newIcon/ic_fwll.png AssetGenImage get icFwll => const AssetGenImage('assets/newIcon/ic_fwll.png'); + + /// File path: assets/newIcon/ic_gouwuc.png AssetGenImage get icGouwuc => const AssetGenImage('assets/newIcon/ic_gouwuc.png'); + + /// File path: assets/newIcon/ic_gxtc.png AssetGenImage get icGxtc => const AssetGenImage('assets/newIcon/ic_gxtc.png'); + + /// File path: assets/newIcon/ic_gxtp.png AssetGenImage get icGxtp => const AssetGenImage('assets/newIcon/ic_gxtp.png'); + + /// File path: assets/newIcon/ic_hdtp.png AssetGenImage get icHdtp => const AssetGenImage('assets/newIcon/ic_hdtp.png'); + + /// File path: assets/newIcon/ic_jhgl.png AssetGenImage get icJhgl => const AssetGenImage('assets/newIcon/ic_jhgl.png'); + + /// File path: assets/newIcon/ic_jifen.png AssetGenImage get icJifen => const AssetGenImage('assets/newIcon/ic_jifen.png'); + + /// File path: assets/newIcon/ic_kdbg.png AssetGenImage get icKdbg => const AssetGenImage('assets/newIcon/ic_kdbg.png'); + + /// File path: assets/newIcon/ic_kmm.png AssetGenImage get icKmm => const AssetGenImage('assets/newIcon/ic_kmm.png'); + + /// File path: assets/newIcon/ic_rwsm.png AssetGenImage get icRwsm => const AssetGenImage('assets/newIcon/ic_rwsm.png'); + + /// File path: assets/newIcon/ic_shdz.png AssetGenImage get icShdz => const AssetGenImage('assets/newIcon/ic_shdz.png'); + + /// File path: assets/newIcon/ic_sqjs.png AssetGenImage get icSqjs => const AssetGenImage('assets/newIcon/ic_sqjs.png'); + + /// File path: assets/newIcon/ic_tsby.png AssetGenImage get icTsby => const AssetGenImage('assets/newIcon/ic_tsby.png'); + + /// File path: assets/newIcon/ic_wdfk.png AssetGenImage get icWdfk => const AssetGenImage('assets/newIcon/ic_wdfk.png'); + + /// File path: assets/newIcon/ic_wdfw.png AssetGenImage get icWdfw => const AssetGenImage('assets/newIcon/ic_wdfw.png'); + + /// File path: assets/newIcon/ic_wdjt.png AssetGenImage get icWdjt => const AssetGenImage('assets/newIcon/ic_wdjt.png'); + + /// File path: assets/newIcon/ic_wjdc.png AssetGenImage get icWjdc => const AssetGenImage('assets/newIcon/ic_wjdc.png'); + + /// File path: assets/newIcon/ic_xmfrw.png AssetGenImage get icXmfrw => const AssetGenImage('assets/newIcon/ic_xmfrw.png'); + + /// File path: assets/newIcon/ic_ywh.png AssetGenImage get icYwh => const AssetGenImage('assets/newIcon/ic_ywh.png'); + + /// File path: assets/newIcon/ic_zbqy.png AssetGenImage get icZbqy => const AssetGenImage('assets/newIcon/ic_zbqy.png'); + + /// File path: assets/newIcon/ic_zysc.png AssetGenImage get icZysc => const AssetGenImage('assets/newIcon/ic_zysc.png'); + + /// File path: assets/newIcon/img_bg.png AssetGenImage get imgBg => const AssetGenImage('assets/newIcon/img_bg.png'); + + /// File path: assets/newIcon/img_bmdh.png AssetGenImage get imgBmdh => const AssetGenImage('assets/newIcon/img_bmdh.png'); + + /// File path: assets/newIcon/img_daifah.png AssetGenImage get imgDaifah => const AssetGenImage('assets/newIcon/img_daifah.png'); + + /// File path: assets/newIcon/img_daipingj.png AssetGenImage get imgDaipingj => const AssetGenImage('assets/newIcon/img_daipingj.png'); + + /// File path: assets/newIcon/img_dengji.png AssetGenImage get imgDengji => const AssetGenImage('assets/newIcon/img_dengji.png'); + + /// File path: assets/newIcon/img_qiandao.png AssetGenImage get imgQiandao => const AssetGenImage('assets/newIcon/img_qiandao.png'); + + /// File path: assets/newIcon/img_shezhi.png AssetGenImage get imgShezhi => const AssetGenImage('assets/newIcon/img_shezhi.png'); + + /// File path: assets/newIcon/img_txmr.png AssetGenImage get imgTxmr => const AssetGenImage('assets/newIcon/img_txmr.png'); + + /// File path: assets/newIcon/img_vip.png AssetGenImage get imgVip => const AssetGenImage('assets/newIcon/img_vip.png'); + + /// File path: assets/newIcon/img_vipbg.png AssetGenImage get imgVipbg => const AssetGenImage('assets/newIcon/img_vipbg.png'); + + /// File path: assets/newIcon/img_wpcm.png AssetGenImage get imgWpcm => const AssetGenImage('assets/newIcon/img_wpcm.png'); + + /// File path: assets/newIcon/img_zxgl.png AssetGenImage get imgZxgl => const AssetGenImage('assets/newIcon/img_zxgl.png'); + + /// File path: assets/newIcon/jfjs.png AssetGenImage get jfjs => const AssetGenImage('assets/newIcon/jfjs.png'); + + /// File path: assets/newIcon/sfbs.png AssetGenImage get sfbs => const AssetGenImage('assets/newIcon/sfbs.png'); + + /// File path: assets/newIcon/srzf.png AssetGenImage get srzf => const AssetGenImage('assets/newIcon/srzf.png'); + + /// File path: assets/newIcon/xcyhm.png AssetGenImage get xcyhm => const AssetGenImage('assets/newIcon/xcyhm.png'); + + /// File path: assets/newIcon/zfyh.png AssetGenImage get zfyh => const AssetGenImage('assets/newIcon/zfyh.png'); } class $AssetsStaticGen { const $AssetsStaticGen(); + /// File path: assets/static/bracelet_header.png AssetGenImage get braceletHeader => const AssetGenImage('assets/static/bracelet_header.png'); + + /// File path: assets/static/car_card_grey.webp AssetGenImage get carCardGrey => const AssetGenImage('assets/static/car_card_grey.webp'); + + /// File path: assets/static/car_card_yellow.webp AssetGenImage get carCardYellow => const AssetGenImage('assets/static/car_card_yellow.webp'); + + /// File path: assets/static/car_park_empty.webp AssetGenImage get carParkEmpty => const AssetGenImage('assets/static/car_park_empty.webp'); + + /// File path: assets/static/family.png AssetGenImage get family => const AssetGenImage('assets/static/family.png'); + + /// File path: assets/static/house_auth_fail.webp AssetGenImage get houseAuthFail => const AssetGenImage('assets/static/house_auth_fail.webp'); + + /// File path: assets/static/house_auth_success.webp AssetGenImage get houseAuthSuccess => const AssetGenImage('assets/static/house_auth_success.webp'); + + /// File path: assets/static/id_card_back.png AssetGenImage get idCardBack => const AssetGenImage('assets/static/id_card_back.png'); + + /// File path: assets/static/id_card_front.png AssetGenImage get idCardFront => const AssetGenImage('assets/static/id_card_front.png'); + + /// File path: assets/static/integral_background.png AssetGenImage get integralBackground => const AssetGenImage('assets/static/integral_background.png'); + + /// File path: assets/static/old_age_back.png AssetGenImage get oldAgeBack => const AssetGenImage('assets/static/old_age_back.png'); + + /// File path: assets/static/parking_grey.webp AssetGenImage get parkingGrey => const AssetGenImage('assets/static/parking_grey.webp'); + + /// File path: assets/static/parking_yellow.webp AssetGenImage get parkingYellow => const AssetGenImage('assets/static/parking_yellow.webp'); + + /// File path: assets/static/review_fail.webp AssetGenImage get reviewFail => const AssetGenImage('assets/static/review_fail.webp'); + + /// File path: assets/static/reviewing.webp AssetGenImage get reviewing => const AssetGenImage('assets/static/reviewing.webp'); + + /// File path: assets/static/rule_explain.png AssetGenImage get ruleExplain => const AssetGenImage('assets/static/rule_explain.png'); + + /// File path: assets/static/sign_in_background.png AssetGenImage get signInBackground => const AssetGenImage('assets/static/sign_in_background.png'); + + /// File path: assets/static/vip_background.png AssetGenImage get vipBackground => const AssetGenImage('assets/static/vip_background.png'); } @@ -745,9 +1542,16 @@ class $AssetsStaticGen { class $AssetsTabGen { const $AssetsTabGen(); + /// File path: assets/tab/bkjh.png AssetGenImage get bkjh => const AssetGenImage('assets/tab/bkjh.png'); + + /// File path: assets/tab/kbhw.png AssetGenImage get kbhw => const AssetGenImage('assets/tab/kbhw.png'); + + /// File path: assets/tab/nanz.png AssetGenImage get nanz => const AssetGenImage('assets/tab/nanz.png'); + + /// File path: assets/tab/nvz.png AssetGenImage get nvz => const AssetGenImage('assets/tab/nvz.png'); } diff --git a/lib/models/market/shop_car/shop_car_list_model.dart b/lib/models/market/shop_car/shop_car_list_model.dart index e14c86c1..32d7c39c 100644 --- a/lib/models/market/shop_car/shop_car_list_model.dart +++ b/lib/models/market/shop_car/shop_car_list_model.dart @@ -1,6 +1,5 @@ -import 'package:json_annotation/json_annotation.dart'; - import 'package:aku_new_community/ui/market/shop_car/shop_car_func.dart'; +import 'package:json_annotation/json_annotation.dart'; part 'shop_car_list_model.g.dart'; @@ -18,7 +17,7 @@ class ShopCarListModel { final double? sellPrice; final double? discountPrice; // 库存状态(1.有货,0.无货) - final int stockStatus; + final int? stockStatus; final String? unit; // 0=未知 1=自营 2=其 他,商品类别 diff --git a/lib/models/market/shop_car/shop_car_list_model.g.dart b/lib/models/market/shop_car/shop_car_list_model.g.dart index c727fecb..b3bc2b2f 100644 --- a/lib/models/market/shop_car/shop_car_list_model.g.dart +++ b/lib/models/market/shop_car/shop_car_list_model.g.dart @@ -15,7 +15,7 @@ ShopCarListModel _$ShopCarListModelFromJson(Map json) => shopStatus: json['shopStatus'] as int?, sellPrice: (json['sellPrice'] as num?)?.toDouble(), discountPrice: (json['discountPrice'] as num?)?.toDouble(), - stockStatus: json['stockStatus'] as int, + stockStatus: json['stockStatus'] as int?, unit: json['unit'] as String?, kind: json['kind'] as int?, weight: (json['weight'] as num?)?.toDouble(), diff --git a/lib/pages/personal/item_my_address.dart b/lib/pages/personal/item_my_address.dart index 403ebb28..7d2f6524 100644 --- a/lib/pages/personal/item_my_address.dart +++ b/lib/pages/personal/item_my_address.dart @@ -63,13 +63,11 @@ class _MyAddressItemState extends State { children: [ GestureDetector( onTap: () async { - bool? result = await Userfunc.setIsDefaultAddress( + bool result = await Userfunc.setIsDefaultAddress( widget.addressModel.id!); - if (result != null) { - if (result) { - await appProvider.getMyAddress(); - widget.refreshController!.callRefresh(); - } + if (result) { + await appProvider.getMyAddress(); + widget.refreshController!.callRefresh(); } }, child: Container( diff --git a/lib/provider/app_provider.dart b/lib/provider/app_provider.dart index b0c33e12..6be5cc64 100644 --- a/lib/provider/app_provider.dart +++ b/lib/provider/app_provider.dart @@ -302,29 +302,34 @@ class AppProvider extends ChangeNotifier { List get addressModels => _addressModels; - AddressModel? _addressModel; + ///默认收货地址 + AddressModel? _defaultAddressModel; - AddressModel? get addressModel => _addressModel; - - ///设置当前选中的房屋 + AddressModel? get defaultAddressModel => _defaultAddressModel; ///保存默认收货地址 Future getMyAddress() async { BaseModel model = await NetUtil().get(SAASAPI.market.address.myAddress); - if (model.data?.length == 0) - return []; - else { + if ((model.data as List).length == 0) { + _addressModels.clear(); + _defaultAddressModel=null; + notifyListeners(); + return ; + } else { _addressModels = (model.data as List).map((e) => AddressModel.fromJson(e)).toList(); if (_addressModels.isEmpty) { - _addressModel = null; + _defaultAddressModel = null; } else { - _addressModels.forEach((element) { + for (var element in _addressModels) { if (element.isDefault == 1) { - _addressModel = element; + _defaultAddressModel = element; + notifyListeners(); + return; } - }); + } + _defaultAddressModel = null; } } notifyListeners(); diff --git a/lib/ui/home/application/all_application_new.dart b/lib/ui/home/application/all_application_new.dart new file mode 100644 index 00000000..b243a94e --- /dev/null +++ b/lib/ui/home/application/all_application_new.dart @@ -0,0 +1,114 @@ +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/utils/application_utils.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:velocity_x/src/extensions/iterable_ext.dart'; +import 'package:velocity_x/src/extensions/string_ext.dart'; + +class AllApplicationNewPage extends StatefulWidget { + const AllApplicationNewPage({Key? key}) : super(key: key); + + @override + _AllApplicationNewPageState createState() => _AllApplicationNewPageState(); +} + +class _AllApplicationNewPageState extends State { + List rootTypes = ['物业服务', '出行安全', '居民生活', '关于社区', '智慧服务', '附近市场']; + + List getApplications(int index) { + switch (index) { + case 0: + return ['报事报修', '设施预约', '生活缴费', '装修管理']; + case 1: + return [ + '开门码', + '物品出门', + '地理信息', + '小蜜蜂任务', + ]; + case 2: + return ['便民电话', '问卷调查', '活动投票', '快递包裹', '投诉表扬', '业委会', '社区介绍', '借还管理']; + case 3: + return ['服务浏览', '周边企业', '住房说明', '电子商务']; + case 4: + return ['智慧养老', '任务发布', '周边服务', '共享投屏']; + case 5: + return ['自营商城', '邻家宠物', '共享停车', '二手市场']; + default: + return []; + } + } + + @override + Widget build(BuildContext context) { + return BeeScaffold( + title: '全部应用', + body: ListView( + padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w), + children: rootTypes + .mapIndexed((e, index) => _applicationTile(index)) + .toList() + .sepWidget(separate: 16.hb), + )); + } + + Container _applicationTile(int index) { + return Container( + width: 686.w, + padding: EdgeInsets.symmetric( + vertical: 32.w, + ), + decoration: BoxDecoration( + color: Colors.white, borderRadius: BorderRadius.circular(16.w)), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: EdgeInsets.only(left: 32.w, bottom: 24.w), + child: rootTypes[index] + .text + .size(32.sp) + .color(Color(0xFF2B2B2B)) + .bold + .make(), + ), + ConstrainedBox( + constraints: BoxConstraints( + maxHeight: getApplications(index).length ~/ 4 * 140.w + + ((getApplications(index).length - 4) ~/ 4 * 30.w)), + child: GridView.count( + shrinkWrap: true, + crossAxisCount: 4, + physics: NeverScrollableScrollPhysics(), + children: ApplicationUtil(getApplications(index)) + .elements + .map((e) => applicationItem(e)) + .toList(), + ), + ), + ], + ), + ); + } + + Widget applicationItem(AppElement appElement) { + return GestureDetector( + onTap: appElement.onTap, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Image.asset( + appElement.imgPath, + width: 96.w, + height: 96.w, + ), + 8.hb, + appElement.title.text.size(24.sp).color(Color(0xFF333333)).make(), + ], + ), + ); + } +} diff --git a/lib/ui/market/search/good_detail_page.dart b/lib/ui/market/search/good_detail_page.dart index 965e3cd4..ce5c7b55 100644 --- a/lib/ui/market/search/good_detail_page.dart +++ b/lib/ui/market/search/good_detail_page.dart @@ -6,7 +6,6 @@ import 'package:aku_new_community/model/user/adress_model.dart'; import 'package:aku_new_community/models/market/good_detail_model.dart'; import 'package:aku_new_community/pages/personal/address/address_list_page.dart'; import 'package:aku_new_community/provider/app_provider.dart'; -import 'package:aku_new_community/ui/market/collection/collection_func.dart'; import 'package:aku_new_community/ui/market/search/search_func.dart'; import 'package:aku_new_community/ui/market/search/submit_order_page_normal.dart'; import 'package:aku_new_community/ui/market/shop_car/shop_car_page.dart'; @@ -69,9 +68,15 @@ class _GoodDetailPageState extends State { Timer? _timer; String get receiveAddress { + final appProvider = Provider.of(Get.context!); if (_addressModel == null) { - return (_goodDetail!.defaultLocation ?? '') + - (_goodDetail!.defaultAddressDetail ?? ''); + print(appProvider.defaultAddressModel?.locationName); + if (appProvider.defaultAddressModel == null) { + return '选择收货地址'; + } else { + return (appProvider.defaultAddressModel!.locationName ?? '') + + (appProvider.defaultAddressModel!.addressDetail ?? ''); + } } else { return (_addressModel!.locationName ?? '') + (_addressModel!.addressDetail ?? ''); @@ -80,16 +85,15 @@ class _GoodDetailPageState extends State { @override void initState() { - final appProvider = Provider.of(Get.context!); super.initState(); _pageController = PageController(); _sliverListController = ScrollController(); _refreshController = EasyRefreshController(); - if (appProvider.addressModel != null) { - _addressModel = appProvider.addressModel!; - } else { - _addressModel = null; - } + // if (appProvider.defaultAddressModel != null) { + // _addressModel = appProvider.defaultAddressModel!; + // } else { + // _addressModel = null; + // } if (widget.integralGood) { _timer = Timer.periodic(Duration(seconds: 1), (timer) { setState(() {}); @@ -413,10 +417,7 @@ class _GoodDetailPageState extends State { Container( width: 430.w, child: Text( - _addressModel == null - ? '请先选择地址' - : (_addressModel!.locationName ?? '') + - (_addressModel!.addressDetail ?? ''), + receiveAddress, style: TextStyle(fontSize: 24.sp, color: ktextPrimary), maxLines: 1, @@ -436,17 +437,21 @@ class _GoodDetailPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ 120.wb, - _goodDetail!.stockStatus == 1 - ? '有货' - .text - .color(Color(0xFFE52E2E)) - .size(28.sp) - .make() - : '无货' - .text - .color(Color(0xFFE52E2E)) - .size(28.sp) - .make(), + 20.hb, + Offstage( + offstage: receiveAddress == '选择收货地址', + child: (_goodDetail!.stockStatus == 1) + ? '有货' + .text + .color(Color(0xFFE52E2E)) + .size(28.sp) + .make() + : '无货' + .text + .color(Color(0xFFE52E2E)) + .size(28.sp) + .make(), + ) ], ), ], @@ -661,7 +666,10 @@ class _GoodDetailPageState extends State { children: [ GestureDetector( onTap: () async { - await SearchFunc.addGoodsCar(_goodDetail!.id); + var re = await SearchFunc.addGoodsCar(_goodDetail!.id); + if (re) { + Get.back(); + } }, child: Container( width: 230.w, @@ -684,7 +692,11 @@ class _GoodDetailPageState extends State { GestureDetector( onTap: () { if (_goodDetail!.stockStatus == 0) { - BotToast.showText(text: '商品库存不足'); + if (receiveAddress == '选择收货地址') { + BotToast.showText(text: '请添加收货地址'); + } else { + BotToast.showText(text: '商品库存不足'); + } } else { Get.to(() => SubmitOrderNormalPage( goodModel: _goodDetail!, diff --git a/lib/ui/market/search/search_func.dart b/lib/ui/market/search/search_func.dart index 909655ce..a2925ed3 100644 --- a/lib/ui/market/search/search_func.dart +++ b/lib/ui/market/search/search_func.dart @@ -78,13 +78,8 @@ class SearchFunc { ///加入购物车 static Future addGoodsCar(int jcookGoodsId) async { - BaseModel model = await NetUtil().get( - SAASAPI.market.shopCart.insert, - params: {'appGoodsPushId': jcookGoodsId}, - ); - if (!model.success) { - BotToast.showText(text: model.msg); - } + BaseModel model = await NetUtil().get(SAASAPI.market.shopCart.insert, + params: {'appGoodsPushId': jcookGoodsId}, showMessage: true); return model.success; } diff --git a/lib/ui/market/search/submit_order_page.dart b/lib/ui/market/search/submit_order_page.dart index e49c2afa..0ac75b72 100644 --- a/lib/ui/market/search/submit_order_page.dart +++ b/lib/ui/market/search/submit_order_page.dart @@ -57,8 +57,8 @@ class _SubmitOrderPageState extends State { SettlementGoodsDTO(appGoodsPushId: element.id, num: element.num)); }); - if (appProvider.addressModel != null) { - _addressModel = appProvider.addressModel!; + if (appProvider.defaultAddressModel != null) { + _addressModel = appProvider.defaultAddressModel!; createOrder(_addressModel!.id!, _goodsList); } else { _addressModel = null; diff --git a/lib/ui/market/search/submit_order_page_normal.dart b/lib/ui/market/search/submit_order_page_normal.dart index ac554f60..f037f56b 100644 --- a/lib/ui/market/search/submit_order_page_normal.dart +++ b/lib/ui/market/search/submit_order_page_normal.dart @@ -59,8 +59,8 @@ class _SubmitOrderNormalPageState extends State { _goodsList .add(SettlementGoodsDTO(appGoodsPushId: widget.goodModel.id, num: 1)); - if (appProvider.addressModel != null) { - _addressModel = appProvider.addressModel!; + if (appProvider.defaultAddressModel != null) { + _addressModel = appProvider.defaultAddressModel!; createOrder(_addressModel!.id!, _goodsList); } else { _addressModel = null; diff --git a/lib/ui/market/shop_car/shop_car_page.dart b/lib/ui/market/shop_car/shop_car_page.dart index 65390060..9f2f5f7a 100644 --- a/lib/ui/market/shop_car/shop_car_page.dart +++ b/lib/ui/market/shop_car/shop_car_page.dart @@ -11,6 +11,7 @@ import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/buttons/bee_check_radio.dart'; import 'package:aku_new_community/widget/buttons/end_button.dart'; import 'package:bot_toast/bot_toast.dart'; +import 'package:common_utils/common_utils.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -293,7 +294,7 @@ class _ShopCarPageState extends State { '¥' .richText .withTextSpanChildren([ - sellPrice + NumUtil.add(sellPrice, 0) .toInt() .toString() .textSpan @@ -326,6 +327,9 @@ class _ShopCarPageState extends State { children: [ GestureDetector( onTap: () { + if (model.goodStatus == GoodStatus.unSell) { + return; + } if (_selectIndex.contains(index)) { _selectIndex.remove(index); _chooseModels.remove(model); @@ -409,6 +413,8 @@ class _ShopCarPageState extends State { ), ), Positioned( + top: 0, + left: 0, child: _getGoodsStatusImg(model.goodStatus) ?? SizedBox()) ], ), @@ -470,9 +476,12 @@ class _ShopCarPageState extends State { switch (status) { case GoodStatus.unSell: return Container( - width: double.infinity, - height: double.infinity, - color: Color(0xFF000000).withOpacity(0.5), + width: 220.w, + height: 220.w, + decoration: BoxDecoration( + color: Color(0xFF000000).withOpacity(0.5), + borderRadius: BorderRadius.circular(16.w), + ), alignment: Alignment.center, child: Text( '已下架', diff --git a/lib/utils/application_utils.dart b/lib/utils/application_utils.dart new file mode 100644 index 00000000..92dd6e52 --- /dev/null +++ b/lib/utils/application_utils.dart @@ -0,0 +1,308 @@ +import 'dart:ui'; + +import 'package:aku_new_community/gen/assets.gen.dart'; +import 'package:aku_new_community/pages/community_introduce/community_introduce_page.dart'; +import 'package:aku_new_community/pages/convenient_phone/convenient_phone_page.dart'; +import 'package:aku_new_community/pages/electronic_commerc/electronic_commerc_page.dart'; +import 'package:aku_new_community/pages/event_activity/event_voting_page.dart'; +import 'package:aku_new_community/pages/express_packages/express_package_page.dart'; +import 'package:aku_new_community/pages/geographic_information/geograhic_information.dart'; +import 'package:aku_new_community/pages/goods_deto_page/goods_deto_page.dart'; +import 'package:aku_new_community/pages/goods_manage_page/select_borrow_return_page.dart'; +import 'package:aku_new_community/pages/house_introduce/house_introduce.dart'; +import 'package:aku_new_community/pages/industry_committee/industry_committee_page.dart'; +import 'package:aku_new_community/pages/life_pay/life_pay_page_new.dart'; +import 'package:aku_new_community/pages/opening_code_page/opening_code_page.dart'; +import 'package:aku_new_community/pages/renovation_manage/new_renovation/new_renovation_page.dart'; +import 'package:aku_new_community/pages/service_browse/service_browse_page.dart'; +import 'package:aku_new_community/pages/services/old_age/old_age_support_page_simple.dart'; +import 'package:aku_new_community/pages/surrounding_enterprises/surrounding_enterprises_page.dart'; +import 'package:aku_new_community/ui/community/facility/facility_appointment_page.dart'; +import 'package:aku_new_community/ui/function_and_service/task/task_page.dart'; +import 'package:aku_new_community/ui/function_and_service/work_order/work_order_page.dart'; +import 'package:aku_new_community/ui/home/application/all_application.dart'; +import 'package:aku_new_community/ui/manager/advice/advice_page.dart'; +import 'package:aku_new_community/ui/manager/questionnaire/questionnaire_page.dart'; +import 'package:bot_toast/bot_toast.dart'; +import 'package:equatable/equatable.dart'; +import 'package:get/get.dart'; + +class ApplicationUtil { + ApplicationUtil(this.titles); + + List titles = []; + + List get elements { + var list = []; + this.titles.forEach((element) { + var re = _findByTitle(element); + if (re != null) { + list.add(re); + } + }); + return list; + } + + AppElement? _findByTitle(String title) { + for (var item in allApplications) { + if (title == item.title) { + return item; + } else if (item.nickTitles.contains(title)) { + return item; + } + } + } + + List get allApplications => [ + AppElement( + title: '开门码', + imgPath: Assets.newIcon.icKmm.path, + onTap: () => Get.to(() => OpeningCodePage())), + // AppElement('访客邀请', R.ASSETS_ICONS_FUNC_FKYQ_PNG, () => Get.to(()=>VisitorAccessPage()), + AppElement( + title: '报事报修', + imgPath: Assets.home.icBsbx.path, + onTap: () => Get.to(() => WorkOrderPage())), + AppElement( + title: '生活缴费', + imgPath: Assets.home.icShjf.path, + onTap: () => Get.to(() => LifePayPageNew())), + AppElement( + title: '业委会', + imgPath: Assets.newIcon.icYwh.path, + onTap: () { + BotToast.showText(text: '此功能暂未上线'); + return; + Get.to(() => IndustryCommitteePage()); + }), + // AppElement('建议咨询', R.ASSETS_ICONS_FUNC_JYZX_PNG, + // () => AdvicePage(type: AdviceType.SUGGESTION)), + AppElement( + title: '便民电话', + imgPath: Assets.newIcon.imgBmdh.path, + onTap: () { + BotToast.showText(text: '此功能暂未上线'); + return; + Get.to(() => ConvenientPhonePage()); + }), + AppElement( + title: '活动投票', + imgPath: Assets.newIcon.icHdtp.path, + onTap: () { + BotToast.showText(text: '此功能暂未上线'); + return; + Get.to(() => EventVotingPage()); + }), + AppElement( + title: '物品出门', + imgPath: Assets.newIcon.imgWpcm.path, + onTap: () { + BotToast.showText(text: '此功能暂未上线'); + return; + Get.to(() => GoodsDetoPage()); + }), + AppElement( + title: '投诉表扬', + imgPath: Assets.newIcon.icTsby.path, + onTap: () { + BotToast.showText(text: '此功能暂未上线'); + return; + Get.to(() => AdvicePage(type: AdviceType.COMPLAIN)); + }), + AppElement( + title: '问卷调查', + imgPath: Assets.newIcon.icWjdc.path, + onTap: () { + BotToast.showText(text: '此功能暂未上线'); + return; + Get.to(() => QuestionnairePage()); + }), + AppElement( + title: '装修管理', + imgPath: Assets.newIcon.imgZxgl.path, + onTap: () { + BotToast.showText(text: '此功能升级中,敬请期待'); + return; + Get.to(() => NewRenovationPage()); + }), + AppElement( + title: '借还管理', + imgPath: Assets.newIcon.icJhgl.path, + onTap: () { + BotToast.showText(text: '此功能暂未上线'); + return; + Get.to(SelectBorrowReturnPage()); + }), + // AppElement('一键报警', Assets.newIcon.yj, () => AlarmPage()), + AppElement( + title: '设施预约', + imgPath: Assets.home.icSsyy.path, + onTap: () { + BotToast.showText(text: '此功能升级中,敬请期待'); + return; + Get.to(() => FacilityAppointmentPage()); + }), + AppElement( + title: '快递包裹', + imgPath: Assets.newIcon.icKdbg.path, + onTap: () { + BotToast.showText(text: '此功能升级中,敬请期待'); + return; + Get.to(() => ExpressPackagePage()); + }), + AppElement( + title: '电子商务', + imgPath: Assets.newIcon.icDzsw.path, + onTap: () { + BotToast.showText(text: '此功能升级中,敬请期待'); + return; + Get.to(() => ElectronicCommercPage()); + }), + AppElement( + title: '服务浏览', + imgPath: Assets.newIcon.icFwll.path, + onTap: () { + BotToast.showText(text: '此功能升级中,敬请期待'); + return; + Get.to(() => ServiceBrowsePage()); + }), + AppElement( + title: '社区介绍', + imgPath: Assets.newIcon.icSqjs.path, + onTap: () { + BotToast.showText(text: '此功能升级中,敬请期待'); + return; + Get.to(() => CommunityIntroducePage()); + }), + // AppElement('家政服务', R.ASSETS_ICONS_FUNC_JZFW_PNG, () => HouseKeepingPage()), + + AppElement( + title: '地理信息', + imgPath: Assets.newIcon.icDlxx.path, + onTap: () { + BotToast.showText(text: '此功能升级中,敬请期待'); + return; + Get.to(() => GeographicInformationPage()); + }), + AppElement( + title: '周边企业', + imgPath: Assets.newIcon.icZbqy.path, + onTap: () { + BotToast.showText(text: '此功能升级中,敬请期待'); + return; + Get.to(() => SurroundingEnterprisesPage()); + }), + AppElement( + title: '住房说明', + imgPath: Assets.newIcon.icRwsm.path, + onTap: () { + BotToast.showText(text: '此功能升级中,敬请期待'); + return; + Get.to(() => HouseIntroducePage()); + }), + AppElement( + title: '智慧养老', + imgPath: Assets.home.icZhyl.path, + onTap: () { + Get.to(() => OldAgeSupportPageSimple()); + }), + AppElement( + title: '周边服务', + imgPath: Assets.home.icZbfw.path, + onTap: () { + BotToast.showText(text: '此功能暂未上线'); + return; + }), + AppElement( + title: '任务发布', + imgPath: Assets.home.icRwfb.path, + onTap: () => Get.to(() => TaskPage()), + nickTitles: ['小蜜蜂任务']), + AppElement( + title: '自营商城', + imgPath: Assets.icons.shoppingMall.path, + onTap: () { + BotToast.showText(text: '此功能暂未上线'); + return; + }), + AppElement( + title: '邻家宠物', + imgPath: Assets.home.icLjcw.path, + onTap: () { + BotToast.showText(text: '此功能暂未上线'); + return; + }), + AppElement( + title: '共享停车', + imgPath: Assets.icons.sharePark.path, + onTap: () { + BotToast.showText(text: '此功能暂未上线'); + return; + }), + AppElement( + title: '二手市场', + imgPath: Assets.icons.secondHandMarket.path, + onTap: () { + BotToast.showText(text: '此功能暂未上线'); + return; + }), + AppElement( + title: '共享投屏', + imgPath: Assets.icons.projectionScreen.path, + onTap: () { + BotToast.showText(text: '此功能暂未上线'); + return; + }), + AppElement( + title: '全部应用', + imgPath: Assets.home.icQbyy.path, + onTap: () => Get.to(() => AllApplicationPage())), + + // AppElement( + // '小区教育', + // R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + // () => BeeScaffold(title: '小区教育'), + // ), + // AppElement( + // '健康运动', + // R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + // () => BeeScaffold(title: '健康运动'), + // ), + // AppElement( + // '家政服务', + // R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + // () => BeeScaffold(title: '家政服务'), + // ), + // AppElement( + // '居家养老', + // R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + // () => BeeScaffold(title: '居家养老'), + // ), + // AppElement( + // '物业租赁', + // R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + // () => BeeScaffold(title: '物业租赁'), + // ), + ]; +} + +class AppElement extends Equatable { + final String title; + final String imgPath; + final VoidCallback onTap; + final List nickTitles; + + const AppElement({ + required this.title, + required this.imgPath, + required this.onTap, + this.nickTitles = const [], + }); + + @override + List get props => [ + title, + imgPath, + onTap, + ]; +} diff --git a/lib/widget/picker/bee_house_cascade_picker.dart b/lib/widget/picker/bee_house_cascade_picker.dart index dc9eab58..c3dfc950 100644 --- a/lib/widget/picker/bee_house_cascade_picker.dart +++ b/lib/widget/picker/bee_house_cascade_picker.dart @@ -88,9 +88,9 @@ class _BeeHouseCascadePickerState extends State { child: CupertinoPicker( onSelectedItemChanged: (int value) { _pickBuildingIndex = value; - // _pickUnitIndex = 0; - // _pickFloorIndex = 0; - // _pickHouseIndex = 0; + _pickUnitIndex = 0; + _pickFloorIndex = 0; + _pickHouseIndex = 0; _unitController.jumpToItem(0); _floorController.jumpToItem(0); _houseController.jumpToItem(0); @@ -111,8 +111,8 @@ class _BeeHouseCascadePickerState extends State { child: CupertinoPicker( onSelectedItemChanged: (int value) { _pickUnitIndex = value; - // _pickFloorIndex = 0; - // _pickHouseIndex = 0; + _pickFloorIndex = 0; + _pickHouseIndex = 0; _floorController.jumpToItem(0); _houseController.jumpToItem(0); setState(() {}); @@ -132,7 +132,7 @@ class _BeeHouseCascadePickerState extends State { child: CupertinoPicker( onSelectedItemChanged: (int value) { _pickFloorIndex = value; - // _pickHouseIndex = 0; + _pickHouseIndex = 0; _houseController.jumpToItem(0); setState(() {}); }, diff --git a/pubspec.yaml b/pubspec.yaml index 2c98c8ea..2e493812 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,7 +20,7 @@ dependencies: #状态管理 provider: ^6.0.0 #屏幕适配 - flutter_screenutil: ^5.0.0+2 + flutter_screenutil: ^5.3.1 #图标集合 cupertino_icons: ^1.0.3 #超链接 跳转拨号等 From 274f77ecb89887d565b64af0f4f550815ef33124 Mon Sep 17 00:00:00 2001 From: meng-fucius <494089941@qq.com> Date: Mon, 11 Apr 2022 16:37:48 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/splash/app_verify_dialog.dart | 147 ++++++++++++++++++++++++ lib/pages/splash/splash_page.dart | 95 +++++++-------- pubspec.yaml | 1 - tool/_build.dart | 14 ++- tool/config.dart | 8 +- 5 files changed, 210 insertions(+), 55 deletions(-) create mode 100644 lib/pages/splash/app_verify_dialog.dart diff --git a/lib/pages/splash/app_verify_dialog.dart b/lib/pages/splash/app_verify_dialog.dart new file mode 100644 index 00000000..61459a6b --- /dev/null +++ b/lib/pages/splash/app_verify_dialog.dart @@ -0,0 +1,147 @@ +import 'package:aku_new_community/base/base_style.dart'; +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/pages/setting_page/agreement_page/agreement_page.dart'; +import 'package:aku_new_community/pages/setting_page/agreement_page/privacy_page.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +class AppVerifyDialog extends StatelessWidget { + const AppVerifyDialog({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Center( + child: Container( + width: 600.w, + height: 700.w, + clipBehavior: Clip.antiAliasWithSaveLayer, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(24.w), + ), + child: Material( + child: Container( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + stops: [ + 0, + 0.3, + ], + colors: [ + Color(0x33FBE541), + Colors.white, + ])), + child: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 40.w), + child: Column( + children: [ + 52.hb, + Text( + '欢迎使用小蜜蜂', + style: TextStyle( + color: Colors.black.withOpacity(0.85), + fontSize: 28.sp, + fontWeight: FontWeight.bold), + ), + 45.hb, + Text( + ''' +在您使用小蜜蜂前,请认真阅读并同意小蜜蜂使用条款和隐私政策,授权位置、设备信息、储存信息等权限,包括: +【地理位置权限】:根据您所处的地理位置提供个性化的内容信息; +【相册访问权限】:在报事报修、社区等功能中需要访问相册上传图片信息; +【其他权限】:使用过程中可能需要调用相机、麦克风、系统通知、及安装的应用列表等权限。 + ''', + style: TextStyle( + color: Colors.black.withOpacity(0.85), + fontSize: 24.sp), + ), + 30.hb, + RichText( + text: TextSpan( + text: '更多详细信息,请您阅读', + style: TextStyle( + color: Colors.black.withOpacity(0.85), + fontSize: 24.sp), + children: [ + TextSpan( + text: '《用户协议》', + style: TextStyle( + color: kPrimaryColor, fontSize: 24.sp), + recognizer: TapGestureRecognizer() + ..onTap = () { + Get.to(() => AgreementPage()); + }, + ), + TextSpan( + text: '、', + style: TextStyle( + color: Colors.black.withOpacity(0.85), + fontSize: 24.sp), + ), + TextSpan( + text: '《小蜜蜂隐私保护政策》', + style: TextStyle( + color: kPrimaryColor, fontSize: 24.sp), + recognizer: TapGestureRecognizer() + ..onTap = () { + Get.to(() => PrivacyPage()); + }, + ), + ]), + ), + ], + ), + ), + Spacer(), + BeeDivider.horizontal(), + ConstrainedBox( + constraints: BoxConstraints(maxHeight: 100.w), + child: Row( + children: [ + Expanded( + child: MaterialButton( + padding: EdgeInsets.symmetric(vertical: 30.w), + onPressed: () { + Get.back(result: false); + }, + child: Text('退出', + style: TextStyle( + + fontSize: 24.sp + ),), + ), + ), + Container( + width: 2.w, + height: double.infinity, + color: Color(0xFFF0F0F0), + ), + Expanded( + child: MaterialButton( + padding: EdgeInsets.symmetric(vertical: 20.w), + onPressed: () { + Get.back(result: true); + }, + child: Text('确认',style: TextStyle( + fontSize: 24.sp + ),), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/splash/splash_page.dart b/lib/pages/splash/splash_page.dart index e546c4d6..9d9f03db 100644 --- a/lib/pages/splash/splash_page.dart +++ b/lib/pages/splash/splash_page.dart @@ -5,6 +5,7 @@ import 'package:aku_new_community/main_initialize.dart'; import 'package:aku_new_community/pages/setting_page/agreement_page/agreement_page.dart'; import 'package:aku_new_community/pages/setting_page/agreement_page/privacy_page.dart'; import 'package:aku_new_community/pages/sign/login/other_login_page.dart'; +import 'package:aku_new_community/pages/splash/app_verify_dialog.dart'; import 'package:aku_new_community/utils/developer_util.dart'; import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/hive_store.dart'; @@ -33,52 +34,54 @@ class _SplashPageState extends State { TapGestureRecognizer _privacyRecognizer = TapGestureRecognizer(); Future _showLoginVerify() async { - return await showCupertinoDialog( - barrierDismissible: false, - context: context, - builder: (context) { - return CupertinoAlertDialog( - title: Text('隐私政策和用户协议'), - content: RichText( - text: TextSpan( - text: '点击登录即表示您已阅读并同意', - style: TextStyle(color: Colors.black), - children: [ - TextSpan( - text: '《用户协议》', - style: TextStyle(color: Colors.blue), - recognizer: _agreementRecognizer - ..onTap = () { - Get.to(() => AgreementPage()); - }), - TextSpan( - text: '《隐私政策》', - style: TextStyle(color: Colors.blue), - recognizer: _privacyRecognizer - ..onTap = () { - Get.to(() => PrivacyPage()); - }), - TextSpan( - style: TextStyle(color: Colors.black), - text: - '(特别是免除或限制责任、管辖等粗体下划线标注的条款)。如您不同意上述协议的任何条款,您应立即停止登录及使用本软件及服务。') - ]), - ), - - // ), - actions: [ - CupertinoDialogAction( - child: Text('拒绝'), - onPressed: () => Get.back(result: false), - ), - CupertinoDialogAction( - child: Text('同意'), - onPressed: () => Get.back(result: true), - ), - ], - ); - }, - ); + var re = await Get.dialog(AppVerifyDialog()); + return re; + // return await showCupertinoDialog( + // barrierDismissible: false, + // context: context, + // builder: (context) { + // return CupertinoAlertDialog( + // title: Text('隐私政策和用户协议'), + // content: RichText( + // text: TextSpan( + // text: '点击登录即表示您已阅读并同意', + // style: TextStyle(color: Colors.black), + // children: [ + // TextSpan( + // text: '《用户协议》', + // style: TextStyle(color: Colors.blue), + // recognizer: _agreementRecognizer + // ..onTap = () { + // Get.to(() => AgreementPage()); + // }), + // TextSpan( + // text: '《隐私政策》', + // style: TextStyle(color: Colors.blue), + // recognizer: _privacyRecognizer + // ..onTap = () { + // Get.to(() => PrivacyPage()); + // }), + // TextSpan( + // style: TextStyle(color: Colors.black), + // text: + // '(特别是免除或限制责任、管辖等粗体下划线标注的条款)。如您不同意上述协议的任何条款,您应立即停止登录及使用本软件及服务。') + // ]), + // ), + // + // // ), + // actions: [ + // CupertinoDialogAction( + // child: Text('拒绝'), + // onPressed: () => Get.back(result: false), + // ), + // CupertinoDialogAction( + // child: Text('同意'), + // onPressed: () => Get.back(result: true), + // ), + // ], + // ); + // }, + // ); } @override diff --git a/pubspec.yaml b/pubspec.yaml index 2e493812..a96f4fae 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -150,7 +150,6 @@ flutter: - assets/tab/ - assets/applications/ - assets/static/ - - assets/json/ - assets/bracelet/ - assets/home/ - assets/newIcon/ diff --git a/tool/_build.dart b/tool/_build.dart index 249976df..8eae5ce4 100644 --- a/tool/_build.dart +++ b/tool/_build.dart @@ -16,11 +16,17 @@ buildApk() async { String date = DateUtil.formatDate(DateTime.now(), format: 'yy_MM_dd_HH_mm'); String version = await getVersion(); - await runAsync('rm', arguments: ['-rf', Config.apkDir]); - await runAsync('mkdir', arguments: ['-p', Config.apkDir]); - await runAsync('mv', arguments: [ + await runAsync('rmdir', arguments: [ Config.apkDir]); + await runAsync('mkdir', arguments: [ Config.apkDir]); + await runAsync('move', arguments: [ Config.buildPath, - '${Config.apkDir}/${Config.packageName}_${version}_release_$date.apk' + '${Config.apkDir}\\${Config.packageName}_${version}_release_$date.apk' + ]); + await runAsync('ren',arguments: [ + + '${Config.apkDir}\\app-release.apk', + + '${Config.apkDir}\\${Config.packageName}_${version}_release_$date.apk', ]); } diff --git a/tool/config.dart b/tool/config.dart index 0839c522..80e38aff 100644 --- a/tool/config.dart +++ b/tool/config.dart @@ -1,19 +1,19 @@ class Config { ///用户根目录 - static const String homeDir = '/users/zhangmeng'; + static const String homeDir = 'G:\\apk'; ///包名 static const String packageName = 'aku_new_community'; ///打包目录 static String get buildPath => - './build/app/outputs/flutter-apk/app-release.apk'; + '\\build\\app\\outputs\\flutter-apk\\app-release.apk'; ///测试包文件夹 static String get apkDevDir => - '/users/zhangmeng/team/bee/app/aku_new_community/dev'; + '$homeDir\\aku_new_community\\dev'; ///正式包文件夹 static String get apkDir => - '/users/zhangmeng/team/bee/app/aku_new_community/release'; + '$homeDir\\aku_new_community\\release'; } From d9d3eaf202395b2667eef3a2c453b95ab7512a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=90=8C?= <494089941@qq.com> Date: Wed, 20 Apr 2022 19:53:55 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E7=A7=AF=E5=88=86=E5=85=85=E5=80=BC?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/newIcon/alipay.png | Bin 0 -> 13927 bytes assets/newIcon/wallet_balance.png | Bin 0 -> 1524 bytes lib/constants/api.dart | 1 - lib/constants/saas_api.dart | 27 + lib/gen/assets.gen.dart | 12 +- lib/main.dart | 4 +- lib/models/user/user_info_model.dart | 4 + lib/models/user/user_info_model.g.dart | 2 + .../wallet/trade_record_list_model.dart | 37 ++ .../wallet/trade_record_list_model.g.dart | 18 + lib/pages/home/home_page.dart | 1 - lib/pages/personal/personal_page.dart | 453 ++++++++++------ .../personal/wallet/balance_record_view.dart | 210 ++++++++ .../wallet/input_pay_password_dialog.dart | 91 ++++ lib/pages/personal/wallet/pay_way_dialog.dart | 240 +++++++++ .../personal/wallet/point_record_view.dart | 210 ++++++++ .../wallet/set_pay_password_dialog.dart | 76 +++ .../set_pay_password_verify_dialog.dart | 118 +++++ .../personal/wallet/wallet_recharge_page.dart | 496 ++++++++++++++++++ .../wallet/wallet_trade_record_page.dart | 44 ++ lib/pages/sign/login/code_message_page.dart | 9 +- lib/pages/sign/login/forgot_psd_page.dart | 5 +- lib/pages/sign/login/forgot_set_psd_page.dart | 7 +- lib/pages/sign/login/other_login_page.dart | 11 +- lib/provider/app_provider.dart | 23 - lib/provider/clock_timer_provider.dart | 30 ++ lib/widget/buttons/bee_check_radio.dart | 14 +- lib/widget/buttons/bee_long_button.dart | 6 +- lib/widget/picker/bee_date_picker.dart | 10 +- lib/widget/picker/bee_month_pick_body.dart | 111 ++++ pubspec.lock | 414 +++++++-------- tool/config.dart | 8 +- 32 files changed, 2270 insertions(+), 422 deletions(-) create mode 100644 assets/newIcon/alipay.png create mode 100644 assets/newIcon/wallet_balance.png create mode 100644 lib/models/wallet/trade_record_list_model.dart create mode 100644 lib/models/wallet/trade_record_list_model.g.dart create mode 100644 lib/pages/personal/wallet/balance_record_view.dart create mode 100644 lib/pages/personal/wallet/input_pay_password_dialog.dart create mode 100644 lib/pages/personal/wallet/pay_way_dialog.dart create mode 100644 lib/pages/personal/wallet/point_record_view.dart create mode 100644 lib/pages/personal/wallet/set_pay_password_dialog.dart create mode 100644 lib/pages/personal/wallet/set_pay_password_verify_dialog.dart create mode 100644 lib/pages/personal/wallet/wallet_recharge_page.dart create mode 100644 lib/pages/personal/wallet/wallet_trade_record_page.dart create mode 100644 lib/provider/clock_timer_provider.dart create mode 100644 lib/widget/picker/bee_month_pick_body.dart diff --git a/assets/newIcon/alipay.png b/assets/newIcon/alipay.png new file mode 100644 index 0000000000000000000000000000000000000000..2f0a94585e07fb80e89d2e4018d78bc13ab4f02e GIT binary patch literal 13927 zcmdse^;=Zk*Y}~jL>fUw5CKUErEdg8L_nBf=s~)>Yb2Fakd_bxWEf!R?(UFIX(S!G zc@OvZd7kTi|AP0ro*%fFvtzBjVy|=d+Mo4F?X4miF(WYm0Axz9UcLhWY}oA|AwJmB zV3s%w{v&dDrR@v=BzJEAutw(mE&<>^p!8B!)8pID9Ld)ouAYyt%_(X0gJi44a489f z#N=M$FlIl%en2SpXkR+qVrl0k157l4qbfu8gA6vaN(p>?1L6HBnX~yOfM4%Xmppw8 zg#UfWC+w&&G0qJBF7>*$se?C1%7!`KH8mFnmGiyp&TrEhC~NcQk%i~u2i|^z_RS$= zOaarASA&HgC+zAWHucBf#h%%Z4&Dg)`OcktcwJvDb{eO+ZW)tM(8-)^*V$fLT@)-A zZ(LoOt9rlok-TZ}2(7xtJYK>yp4L}MJZ#v>Q>VZlr<`@NXZF~d_JD-^Ouv+%z4`mN zcutfxtbo-!(>VbfamTh4(#9g*wp=SM&f>H7Ybots8cih&TFg$$VX&&*wJ;tb>_IYE z&3k=%t@wVb=BT*SH@fZkM0(`7mQ*HnyF|auZl=Apu|WehwZ?!M+>_+F7J0~Wbe}8= z0ci-Po4uRsx3wsCxl6DdT)9A}TfRe%J>+w-L#tW`?>y}|sEoE&mEatpsp?^e$Ng@B zIIe&!e2!|wHo{LjDk2-@0GHRiPa8}UV2vjOj=u(GI>MF}maGO5XH@95jpW+*XN`X1 z^M0+O@6&5pBXWiJ-vUi{4baAym!Ii6Qi~=fd0)J@L^(v7sWv4CqcjVA#onGJ*td82 z`$(saBr=f$&WD-n9sUjbXT?^SW5=`}=nXC^>8Z~G4d#ozBy*#G>l~)9W&sA!f0Z+! zl=kc{#3X6>iC$|Cj;|5HepMZEW6rH7+6Wpv?CZKtaRK^RN!{M#DDe|R=5>~X6bwUx znFjXwBTx_P*S*soxmGklA5XqcksdRv6edG#Y?YA>e#9ejuzA`R>E0<=4*~eS8_T^f zofhVnkiViMDs`mpqDAoYd-o!;m}PN*g9OF%I=A$yk}cW%d@N-&HUewYYiLuaNypq)K=0l~qA?zD z^u@XC`nM@&RmhM!wA^(H9f!r8fO9jbwQRyh2V^wt)2A&{e3bTY^~0>&dME18pm}SB z418Kemp1*+Utj8w*^vW7p%YhTK6{{%z9{Zd8(Q}sS*bMDI6y9U6dUMo`gdgji?mtW z)2M~0Msd4G*HvT`hD_MwE!0x?-1Xedc?z3tv4FM34d3@WiVKt%BK4yA!&qC(mF>0C zXW6G22Hb!}^mf13uij-z`x)u$oIH1AG1k_%t)-e9U){^XdjY_ZRQ0dF(Z|vLetSkt z?u;UDm$9KDB}JDfRgSBh9&Wd5~AD7Y<+>=zHxit^e4M4uo0yv zDB+bZw)i7(IWuSW&r@p$rgNux>CR3*9U6ZVB}$-%orHVA`x&p#QUaz2^qKkbAn}Ed z#N&Uo+7qO_l6=%_j@z$`|b)UaIZaxtmslk%oZu~m6E|Krk|)`X=ZzspjX z+P}2*cKPdWzMLL{8+*Vt`O+YTYdF_Fn&O+c{$;rX9?+*?7TQOd#J=gYXhntI5AcDT zezWYL0r=^X9tbLrvYU`e!ils18HUZfB_Y!*X^IP%JN=H|!I@v#DZ;Lowb~t9C3MU! zu(;hxu0hVfyb1wCiR9Lw;zbHW7JK^f-Inh>RBL@<%wd@Kqbe_bedaKtfJ~gAw+VjUzB!ckRyPeUw~miYCjivCNMp2rAW7aSHN99yR{hSZ zZ0kjyY6E~qH&0B`kFao|zld^2=GKJe)WGZK03g);CT7ZHh|Vell!SDRRw?i$7UD%0 z*!W1O=f3@b49@sOBkRpXlq`_(Rxrgxfni035!UqLV6#e3LmW_3Oi~xjC*8~;djwx) z2uweJcX@rk0bC!0V7`eNLt8uZ%O;)EDgW@B>^)GH(mt*vZG3^CvO|PxOYU;iZM2KK z^2Gvr;*;1*m8TXeM-i?Au8z~D?j1{ljgNt*`=)N)q#A3{oIB|C+1*oB_qJ)*EpF)r zN&s%)HZS6LRO4&xs2%!G0&PgcL2H#P=sC%pLT}8HO6hm4uv9_xGKlbi`1E=o`^`~FnV3N+}<2>}nnxtTNyMW$ke{EJY3510EQk-GMsnaY>4HbF#a5!1SZi{#Ex5*Mn+hXL8sS?ivbI zR;1u^U+$vs0M=IiN$2x4bwEb9|M6De6L_j4M9<;Ew>ZxHE-(a5auq!2TixxqjJZ(0 z7WBh385d{Yc9?}%d@}Sq^2Ll!&9`f7q37M@FS9`JbCESm>ys+2&o3o|krY*PM;%3A z12ylTUG!O%SNgvFd6U=Gi3k~jddMIE4`a(0LqwY;!C+5o! z>p|b9GsW-W8Qs(06Nk_F8P;_R5d#~@DU3t0*oY~fn{vcZ}N;2(a&U^$J*uD%Dr zt%QVYRhiH%9z55h!gxU9^jgVC*}uxn*H;A)dA7XVDhy~|JsQRN3pI(>BU~U+$1J<= zjmA~920rTM)bHDd4mMyj?~-KMgE;bUyw|wn^?6 z?IT;f8=oH5p|wxEmmvI4BQ}Tl+0e({c*X6SRAn6gSd6w64_uOk&t(bp|_k45} z*qAuwIWlQFAD}Sy)}s74Y}#BJ?eqjNGxmv}1}#|4n|9J6 zzh|H>die>HNY&3B*Qx!FS9I=IT)^ny+gvZT={I=)-()X&sz2l=zSHy3HhuUgU#2mh zH%#n;Gr_tfOKWuN7&v+iFQ3(?aJeFGx}2*Rm&Y~hyz}6Hk%>s$BurcJ>Eh1Bz#V$R zym<$^zhZ)cDq3<;_6IW;3~-s>bZwzoy@Lie>So5>u87q{ut*RCy6kXu&|wh+8qJwD zpwFh}+=R(ef`guoapTK2VQ2h0G!!7b?Qq*kE;PjYx2=?iLXh*e&D8U=EEPByWxcyU zDMWwURCb+9Mg@@>=2x1rLtq6n!2By_j*W zou`xR5K;@q6HhBK3gjjmGBAG{4)a40h$(amT@K(0S3M|8WB&&cKjUAlSOxd|j3k5s zPb+%esJ!>Ksd)9AwIuBbb{@mA$|k9lC2E4V>FT#Wc+JvIt2SX<6jSvEs=lkwe2q;j zqkMbTqf(Zv!K)?6i$UNGy=xgu{5J1bfbY%)N>}!EF3@Qfgm z&f2Cget9Zp8}M(#j~lBu&>|M^Oy0_nLQu&%UHiZ3L5TxFl7dsScAgFq*W4kX)-4#u z@&)1v7-+FbGE5H*Ba0=v(6?(ZaZzt8obh}~@?U-O28~6ErJ!U+pj~y^Kx(~#q_H5i zJJsGp|JPHe4vSCBs%!|TPYa@Dh7K5u$s{fhg4W^q_e+oz=m{Bk&nlzO`tE^GQsC2K z#Z=G!Zx5u_=m(IRgLZw1#AGRG*@?}@Onh)=h(9uL`piOb82*&Mp z9fw5RP_J<-3XLwxDeGI<ZD z&l|`N*FRe7e|kc^?DdXfSrab}qR)OGxmL3eNn_>9hAA9fn&jt(RVQ+}L>lV!HJN5! z{jFagDm45cFmUfj9xe*M%WT4@xg59a{wsJIFqEYEko_=&4xD_`H)#I(vOoMwYB(5l$Ghic)4|r^B2t`j-GXd zgFF)<3@4s1ja90{>3-iMZ>rK7T^@GYUN8>Uvg@gQ?cW)~k0&J9sQNM=lYyk^Q^hY3 zIkq*OY1+y4h~zX$l=707v?J+DARY%+!q?jEq2&Q3D-7SxXgVYMXM38)4zqut#)-6y zNoliHG|{hfCWw(5&$>kgZ1N0LzDBR^>8a)F;vQrLKr&0?rydYOxRO_#x0Qai#BYwh z^eVDoqCwqRc|6=3e`2uxVKLu(@?Cv0r~Bt!cY{^&hJt=NSiUs z@&B5~MuYO~62dKAAhrlWef8NMUxZeG5`(XY0!{Q<*NUk{+PCsJNP*Gu?LvNd$?N99 z```JUOKfp25>Nj?qT>QX_r%&Yax=W-Q^2kOGdGJ|q#N7XZ=;T%2E%4tFyA|c8Qwjl zx=1bRJcD63uz|8LBc%uRU-V|cNitQ~94WSwJ&wGh-&O=^HH$W|v8;uHxZxaEK?Oed z97X;lQu9Sttwez_l%5pJnz4n3UsofzfE0SB^H209js63;3V2ps%O})TQo}HRoPRp+%YMl253Y-=Ct@ci&XK7WT zT~u?qVV%1(4GwV-r1kD*|AM7eFp?{l+lZC%#MyaDOinALK+lUOfSzC6t7ro`fRFOQ zk+jw(vwKApgxp_s?JMf`Wvd=d988^4XidP1;g>8@a?v)&fij&JhN)$Hmc7u%B+uTI zy9~p!xp5NM6*h*w5;i*0r&I`DuMON)d1N4XnghIZ2E5@;sBXGO}EzDR`gZ_lw z(d)1(9LBq)7wZjWvJ(SSjVAF<4E%;@(oO3eeT9?_A)D3o^JIUc{KVf6wI4p{7CceST{_Z_KZ{)saI}CqPb1Q*x!P$b$uI*9vXl!JLK?J96@z>MqxcVe} z&+!~|d&X+UoNd~oFjf+qT<3X_?&I!x$I&H5gPINgL)F4eiaM%>;s!d*g~ zEwuWh(}=jS{1-ki24g%!xcRt7Q|CTvK5%C;8!BlIt*|z2LiP^GE{1XRtR9i-XixR% ze*(AE6dzKjh1Pbo2LTD)j03~xT{)F#X_-daKp`ocRbE(8N}22yHk8*HJd7{S<1dDZ z^jJZmp-&$OT6k4h1dijOdgCeFwdJZZcf#1)R@nyRP5uTwO-4e%#In$?n5l=fVO6H} zzWeSeRV`&+2wFb2j0>Jx&h!2ZtMzQk6Mpbu{USTJR?x&UBA2U$)^!32CR6^jp53(_ zpovf)%e1QYLOWizCV#wObv(-p9mho(MVWOu#EBas1iZ@W@r}Z3EL57#+fuyv)*!cs zFA^=XvjMq&8gWWzA}VBzQ9ewetVL!_2h4ZI?n|0$-Z&p592cacuGjz3SlzQaRx%qB z)C%V^O}A+$ z{H#;+;0ZE^%c zdGDE}$A@@qnp~cS>b*X^9+r$GgF&Lq)#?MzdoxVeAGn$-zCU>;0*AO(m2T2J>n*-` z0Z;ZSWh-W4WI`i18wEA*CO>g!F_Z88NU+%#)pl%U(}YCc^bE*aRFJ~VpK1(eUT?p$ zNqCy#VPA5C40DK6by*}%e#(tIgnQOd;po1NHSo$NPyruRPX{@0-q*k#vN6Ax?InM( za{6T=ntY-kU5@d2sj?qA(uaUFhnq@$_q9Tp308dBh>vhVh2T$K%He1tfj@PHb7=*@G)VaY0s#5A9l z%fLWU*0b&jm1Q?7sB6=~+g$Q%b082COnsz3Y#X)1(9i)vBRz&S>jTz$7(82O^b^GI z2zOIxfmaYTayUXqIQ?09_e6vtv6sm5^9uX|M=a}^0{j~xl)l`7g;nS^xL+?S-o&sn zD+g&*so;??vWHSwTZK+>C$F?VIvWw@g_C&&)aDHi@l<10mqd@^Wf9dvN)3A8MO5-l zhBoieD0w!Mw35_&o2opHvuj~4_|CiLvp~k#@6Vk&;Q|g+^xrTl`%?j&WC!Z^M&$pD2Gy5{Su(tBB4% zYlZ&0sKDjP7#GxI=md5qDi(7DEM221w0z*xSfz=~gaat&ESvYxn6Pj*rg?CBMYHhcvK z^Ny#o+}iF;keUfbG(5$!Cca3UNL9a9BWM}xE16jNOd{fI+e381bfK=GC%vHv@zup1 zzq?PJsZORwwuqDt{nmJxk z+5+*1&N5;aQ_N3py7?>KL-gBx<7b+#|tzBe)C$x66i1J+tt1C)7c@AJE`Q^l3wr?R5nxJJ7LLMOM7IY`Pb=A{L{kLq!}eRc=BAI66KOa2jTHJkz}AcKD>} zl1S^S7em~d*eubKO#%S4WVcuV^ERBXMUKvBqz|T>jT2E#U3h-dytO63!eQU)w|*1= zJ&p&Qe^nt|4TIBBB>{2S&hTUKs8O}4CDLVvm-klC;%WfzZ3Uv*O0Nl7E)EqP?g@-g~Kl~>9)*0_SmS#bAa4D@LT=2-i4fj*vANR)c<^B>Y@IwBvnwF2F4z|^(j)Yh+_1_4=; zobf6|9G^lw(RTwU#0J^pqk(#3GlthCPGc(q{BA5QYhaXUr$oZ4XVp8pr-u~Uf#3R9 zQHR+*vYC)4ZY&L}d%|sU-@jm4k5T%4$QLtVOy{HIx`Jcu0UksT> zlEPX~gMNhJQKy#o(T7a+WS8-Nb4)H8w!bnddN4mASA+b5#ch}oG7QTL!!s7gOPDbd z=VmC}Im;MBF z;G-n+yyyp{th(HpLw;D8fkWJ!%rp~P$2=IyI#}DY9;As_+cYsMWO+w4bTjWp{PSXM zMNYVMQ2v;8wU1LIPF7h?!ghQT5odkT`r_lWeAocz50WrH?yJz!ghk|l;_uPm5Rd82 zCpW7Ip#h6cU+?pHs?a+0d3s9vQsuPZQb%q6&6HZ)c4f_JKNXvI)k-P5UcUh^>sn%{ z-n*+QKDJ|nyTxM~DQsBR8E+X|f+J2ct8a#}6z)Rh+@ov#T z{H5M?`QoJyr$+H3G1NkC4s{{^`h2LDQ9hxzTgeD+Bn6B@ipBAgl7MBm+}Pe@UaLX8 zZU#7Toqffpw{yyq;KW-J<9C_sT`x!ac3`kas(`eV{siWsapk&Hqb{>(bWI0ze_dBwI01m~Z3E1X_tSUWsv9Zx2P z`f&|%LGM+>hdTiH|eLmEo8kv*_oJgL5l3=o~t9P z*7Mx?O#UMTQ!>HjjjLjkF1?8K+^>I-ufy6ym(l+i*F?W}QB;CPZ3+gxWe+!cvZlk(1tVWX>W4LFSF11n zQ9bf*ftMizXoOMk+bw>XvK(bRh?nhEUGWUb5RKShS!@M2XuNl;=DshRsNcq~%r^xj zuqT7>@@IITurbp=%A&((>*Uva|5(R-Wlx^+Y|sR3hd4L{0r)&vqQ{e+@n@L*CPE5H?NgL`qGrf0<(JhT%1h7 z&m{v>8fB5o%8t@zP}8pLv6AU2YKoJR_}(&l|%wx9h?<`&lO{|cb~p5zdh~;Z5kLvpYy&)dHIy)oXh`0gi97*fN zDXo|X+|t=wPZu{6i?2*0sTk5|P{T$ldCe7~hujvgz-oSlqp(AoB{*W-xIz zRAUxt5R1H0GX~h?rowmPOr#jtJSGV@Zrzwn9xc-FOTf>Q9 z30Yn*jaQgwdOAQ?`lUVodXraGy6XT}GQm>(vDC9rgfLQRohH73P%odA{>oYZBwnlJ zZaO6Ip_*yc$i)z;c3i(7w{n1sQiB-{877`$OR0%5S4Es;otqn*p-j+aHT`VRHjg}l zLgTEZ?Bt=cpNgpxwez+*|vUL-W+T^~7iE6J%V z?ZANA0t*b^H{^j4~@(tyk+jl<1?z?j9110MI%koL`>)BUno z0g7ML=+`Fu;%~mz;%K1+e-YO-C5C>&MPZ5AJzCn%(s8eZLrXfjybBJsWh?0qhS=a_ zAN50A;)+RR=nwA0$&&FsY92C8mcEbk$Bvk27ofm~;%Syz2sIOLXeD$=5W;AB=20lK zDa%((gwQ5ESEIf_1f*CmR%(k=ZrXyknV3@pS~e}VCfmdq!xNiU-dFOV{{aju@atZ< z_OMm&AMj@UbGdN!FP8M`EK#S$LIR1OO~1=cZ>iw4L!pY~YIM)!Ba z4;5m$^x|1-rI)@vk(xct5Y#p04j)`t)6Q7Z@5hNriBFd%4;Hq*X2KH;$?;h@S)<4A z;>nRxbajo#M-Gi%H84>}3R#0<>5Hr!C-3oy9R`p^`|NlZ50#?N1j|{Ae^d*}C8p?I z_sYbH1HoJf6*8mOm;KmK0*`Z%s3L_+4joI)4G9N=h0_6e4LK9o_pGIiKhxSwq93@u5GG~H=1bZZvUqxrOt03~{2JQx z7rc|LzYhuGVxtD8jmSga@J-UAk0m7ij+WEgu?KP1xF!n0Bw{T8M4_UBoR)5jR&hka zqU9B}aU3Vj6T~iOJcW7UokppLw05Mh#*0OMlJE~)0Z?86+TIAZ<(7$4f5YJJW{a^Z zsh(4BeHTd5pGWwIT?+vUBn?+LgHMqFcT=BNM?# z6;y`x>Vb%yvnPUM9W1EBn8pZ0iNCPKa6EvY;D1m|oLsO!o`au4_1^%9YKHXeG*Xzj z-Mxi>p&({H@r)!e#yJobVgrI(N(i{03le~g{2X>C^Tc!`Zpitr%RT-@0i|{`SpCy9 zeKqBn``=ibAVf9=2>?IlF#ky;3HyHg8(J~NwUj2*abEP^36Hye>8ze=4*>dXx-(Tu ze{o=0|H-Tx1|cc`jqd5o?NGdx;QCEms>q+_*KGbY($y#5JwmpK0seYP_mAm?=f6DG zR&L<2#L)ACx#e&W`O~zfl8}@`3gh##)BFA3$f6$h7MI_KorAl6{Ap`7Al%5RX0c?&igu{kg8R#2L@DT`Ia|`!AHK_GMy}0Tsnug-C_FJ{Hii-6+P= zVB@*XKgXU_0nQI3kzUuq2Hrf=P?)yC<9*;m5(J7tc(LfH!X#ER3oEKW2qQY#r zB*05)P?ypTRz;^Z=9GZUpoK`Xh@Lzv7I)gsH`p$?*u%rvNHd*>v#(0Ufu_FxonQuT z*q_zf&a=WNz>w>eS!M$l%&0^h7;@yB6!7!wO>g^kQBCX%L67*=wm+`*Gr~gbCachH z)&|5G>?dHt30T6PN>&00UhOiK%l-Vl@Z4kXgo{FWHrq**vSbQ~8B4OoPln)e6GS&0 zemh;PIVvSF0|1rsg9=Q(zqh@FdCrv9a=!?tq*vQWRhtlKo3P>SU+z_5&o$8^BcLm} zG~0L=5j*Q_dhbYK+|wX{%uK)VL0=xYfP*ime|ApVp=sKH4AV}fu7u;5_!5J2wY9Sy z)E`v0!5{~aQLq;4x~A9s+Wzd~^t#;o{o_F%AVY=R@Q!rVX+LJRdOq7TQg_li^t5OO z_6Qfyc~q)m_U&vo3&a5aiu$NaG0kmv`~w@9e)ymERL`eWQ92%=ttpss$$)2b8y^P5 z``vcOOibUH_#bxFFY^p?0vUf4g!=1RAYV0`r#FIBJ4N|wg=j@DLC3h~dMH(VoMrz} zvZv}KJN3zF-Fn*tPpGQ)0tJx4m1HE?`}Jt~H3nu%J zEcSyYnz-?L_OyUbQuNySvosC>7x@niRG!JAsmBkcwL|0ola&Pc8QAwINu`Imn?LRY zKFVdydMQTQN886^NE+PA97#%oDWvEBkd+Zw*ZnFA1W9v zo-`BLB?y}2c`U>O1{aMB6A4Qi|<{C51K^$7&_tX|;k zH7BnO$5KRUO==SYnh%6JF$8U|;ug6=)If#DdoMSEmvAZL1w|6Sv4DHUx6Vcq^(l~i zR>&^zoP~n@_sYGidb&Q$s&i`tXTCSD| zkm+4P7V68*c(&EsJ-NYm*ZFPZu_@miHF?eFyzsuWRI#{9hpQi{Sj9aunkxxrQ{I2AJ|w zMK)#tk+kwHU!tx$>;TU^%MFWLVcn$O-*onrbs;);^!FM72!CDNM43ANMJou{ynUMg z()0U%z)rQ?W!WwM{b!QIbxtA3N2i(5d~rsKW%gd3s@QAAijIUcPR*j>xU;h`y)t zV4CluApS~$+2>FSQ_e9r)q#g<@s_3&^*>%%s!TN^1a@MT1N_VUFAuya!dsI)*1=5r zNT+?cyZ^p2Mpiil7-Fe@befaU={;ZJf2pFerwL~NU#!=7%-1Lyk4gKogAgE4^2GmO z@>`3->$e(|9XP;rLNJL|`-0y}IA(#l7zgMtz4Zh4OSj88M>b5St;eYjHTr!S)^&(| z+Za+C7-H5gf3XtmX!473N;DUOmG983;<$TrX7vpvN&;+hdly_cCbWgVmEe49JJSl@ z771JZPhr8NB_UW?AdY+UpTdGt$542dcR|jtHAMMvw&ACVBE5Sz2h+mE8n?)Nm+3|2 zC4#*dV)NG{`o^XyMRHp>&<6=*(v2K%Ypxm`ev<>5HjQ&jpKi+>W~!LQ;s$V0>Li18 zFQgpLQXRj}g#i2>)#85(iasi{4r``I*#}D>oyD z#t;z7G9crnJ_R(mkO0-vk>R>LSKMa-Dy*Kl+TkzBd((+Ph-_2xqm;!PQ`@?OklN*> z@){#RO)j+VzTbXNJ7%%)S<#7dQ?f#odzG7t&u_4{CA@DK8zJz#(`stoas4`cdDhrZ zNNRb+=57}JXJFRoOMTbYh7`gSbrocnM=ePo}zUXYz)o}>KdD}AihXNa4xAVNZd5it_QkQd5 zD+KaN!GD24e3M#3#_~V z@z6|r{*U4dbXmP;PhQ#h->}&>_5!2byfgCK75Wl&pilMdSA@rb0b7cOYT@{{bVwNY zwxD6YM#P{Ttb;myEFIl0eW_$~(jWTXdig$(7_GNCV;t&n`Ft=!(QTSzeETn|>Il*9 zc<{ly<0-FAIWEd;>VHb9QWv@Hr~cnUDkjBqz(s>aw)AQo13SFFF3pu>Z%FeutdrBb pIi<#&8eSUc6>>qSsW3M{TgCKgpin&>SUCnL$-jMB_zyhb{{TsMtFHh6 literal 0 HcmV?d00001 diff --git a/assets/newIcon/wallet_balance.png b/assets/newIcon/wallet_balance.png new file mode 100644 index 0000000000000000000000000000000000000000..934c4b6f3aff627b17ae11e074194b1088451fef GIT binary patch literal 1524 zcmV~#PV$5!UanyFNznS3`dg5 z*&+mgTsS}!Wd*GQOBC7Nndj>cyV=d|&hG5YY-STaRg;;__Ds!py8HEeuX_k7!MEK( z-+>!wysQ{|7$h482^gs>2P_g{5uk^GAKXxYr^{HNo!&#F1R+6;(DHyf3T9W-xQGM6 zWALRM;W7<-i%5_}M3?TkE*v@;TWBlf1;FRY+z!t}0>l!Xy4V%S!`_zNgx)@T88PTe z^y7j%qM5$vmDrUK=)9wX$!?pyLPUzcyGM0E*H=rhLHhb3KcJa%!99pB=(wh>k=mf7 zDf2O838JaowwdFRF6pF@6`ZG8IoyM6a$PHaztiU4RteqMHi&n(Q@Y`d>5gILT8b{+9iKvW`*0Y0#o(R@E6}ug z7k_mR5y?2*zpzhyd|;b*y4jBnqWi5Mhwwlw`e-x5*3i5ipH8g-!G^76rq7%GP*>CC zU)%%i&_%T2v#*}mZ8iDuy*!Q`8E99G5%BoRK&7sx1Ba&C-DUm*XDPQU zMiLM;7`3Ws6EXGG@Fe3?;XZdz5Uz~|YtYrBr4TVP!$XAO7b3?kUGeA<8nM2a^^ooMrzwQEEP}9RuTC)fVB-3wW>ykRtZN~t%{%~%zQ=EKbN z>?WN1W(&ee?Ab^YcAEnQ;z6tuh5HVAiJ4_FdnKOD2-XQ=Cu{}lthk;spM|rh{>0d> zV)Y!;Ca`{~`hVBXN#%Y|wf4q;%oxu^XBkd#fYEk-I0OCKh?@Iu0EItv%^;PNp}JHR zJpZGQIEcS(U1P2TkBD_1*@)EaIlX2a~Y zoF-nl7vS3W@tlTE zxp^yc`gaM_v}@+Hmh;{|PePH4h+LT|*)7AccqNmyC#t@;o$sOLg!o#)xSpb|&SupI z9De;9X~wIsC_J~hcOFG6j8ikZtL<3JqG_Vx+Lb4yZ_h~4eF&j&KZrG6#>G7JUJ*R{ zx(+MG1U|2~dxx7{Ux!@{7|^^NZbcsxw%Vv6p57>hnE7M$H{#UssaDIYnkEtQFM6kC zGCTWYcXLc&aYhe&U$!dH(jq-wB{(C8d(mIa=eEy|g%xO-F0ykzMIPs+<;H!1>Bm~} z2kpv*=E#h2U-gG@5qzuDWs+?ZgT}BK;c|E#*~EC|^G=b+5?c^kOX-d~C9dkxsMn>4 zHCnkHvlCG+ij)EtcWy$4v%?u_?hoWyCZY;9bp1JlWL!=X(LwaS)=dE6X$Ob9{hT4z z1DnNmfkU4@&6}q!-inpKlPd#=s3iA^6442{o15f)QAr&nB(_4LwPTw-V?PD7zsnb} zoF7>dIw#4zGf97qms*pw9-YP>ySzhTx5PYy684NV{p=9@P|hy|gauW`&tfm;(){dj aUGhK5vMRYpM-oN=0000 '/user/articleBorrow/findBorrowByUserId'; - ///生活缴费:查询当前用户的房屋是否缴费 String get findEstatelsPament => '/user/dailyPayment/findEstateIsPayment'; diff --git a/lib/constants/saas_api.dart b/lib/constants/saas_api.dart index 03cf5a29..bbdd5708 100644 --- a/lib/constants/saas_api.dart +++ b/lib/constants/saas_api.dart @@ -1,6 +1,7 @@ import 'package:aku_new_community/widget/others/user_tool.dart'; part 'market_api.dart'; + part 'profile_api.dart'; class SAASAPI { @@ -35,6 +36,7 @@ class SAASAPI { static _WorkOrder workOrder = _WorkOrder(); static _Pay pay = _Pay(); static _LifePay lifePay = _LifePay(); + static _Balance balance = _Balance(); ///二级分类 static _ProfileApi profile = _ProfileApi(); @@ -281,6 +283,20 @@ class _WorkOrder { } class _Pay { + ///app积分充值 + String get createPointsOrder => '/app/user/alipay/createPointsOrder'; + + ///app积分充值 向支付宝发起订单查询请求 + String get pointsOrderCheckAlipay => + '/app/user/alipay/pointsOrderCheckAlipay'; + + ///app余额充值 创建订单 + String get createBalanceOrder => '/app/user/alipay/createBalanceOrder'; + + ///app余额充值 向支付宝发起订单查询请求 + String get balanceOrderCheckAlipay => + '/app/user/alipay/balanceOrderCheckAlipay'; + ///创建商品订单 String get createGoodsOrder => '/app/user/alipay/createGoodsOrder'; @@ -313,3 +329,14 @@ class _LifePay { ///查询预交余额 String get findEstateBalance => '/app/user/livingExpenses/findEstateBalance'; } + +class _Balance { + ///设置余额支付密码 + String get setBalancePayPsd => '/app/user/balance/settingBalancePayPwd'; + + ///购买积分 + String get buyPointsByBalance => '/app/user/balance/buyPoints'; + + ///app用户交易记录 + String get tradeRecordList => '/app/user/tradeRecord/tradeRecordList'; +} diff --git a/lib/gen/assets.gen.dart b/lib/gen/assets.gen.dart index 6db5805b..70ed76dd 100644 --- a/lib/gen/assets.gen.dart +++ b/lib/gen/assets.gen.dart @@ -1297,13 +1297,12 @@ class $AssetsImagesGen { AssetGenImage get wxpay => const AssetGenImage('assets/images/wxpay.png'); } -class $AssetsJsonGen { - const $AssetsJsonGen(); -} - class $AssetsNewIconGen { const $AssetsNewIconGen(); + /// File path: assets/newIcon/alipay.png + AssetGenImage get alipay => const AssetGenImage('assets/newIcon/alipay.png'); + /// File path: assets/newIcon/all_classes.png AssetGenImage get allClasses => const AssetGenImage('assets/newIcon/all_classes.png'); @@ -1457,6 +1456,10 @@ class $AssetsNewIconGen { /// File path: assets/newIcon/srzf.png AssetGenImage get srzf => const AssetGenImage('assets/newIcon/srzf.png'); + /// File path: assets/newIcon/wallet_balance.png + AssetGenImage get walletBalance => + const AssetGenImage('assets/newIcon/wallet_balance.png'); + /// File path: assets/newIcon/xcyhm.png AssetGenImage get xcyhm => const AssetGenImage('assets/newIcon/xcyhm.png'); @@ -1563,7 +1566,6 @@ class Assets { static const $AssetsHomeGen home = $AssetsHomeGen(); static const $AssetsIconsGen icons = $AssetsIconsGen(); static const $AssetsImagesGen images = $AssetsImagesGen(); - static const $AssetsJsonGen json = $AssetsJsonGen(); static const $AssetsNewIconGen newIcon = $AssetsNewIconGen(); static const $AssetsStaticGen static = $AssetsStaticGen(); static const $AssetsTabGen tab = $AssetsTabGen(); diff --git a/lib/main.dart b/lib/main.dart index ed62b44c..b4e4d7a9 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,3 +1,4 @@ +import 'package:aku_new_community/provider/clock_timer_provider.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -42,6 +43,7 @@ class _MyAppState extends State { ChangeNotifierProvider(create: (context) => AppProvider()), ChangeNotifierProvider(create: (context) => SignUpProvider()), ChangeNotifierProvider(create: (context) => DataProvider()), + ChangeNotifierProvider(create: (context) => ClockTimerProvider()), ], child: GestureDetector( onTap: () { @@ -59,7 +61,7 @@ class _MyAppState extends State { designSize: Size(750, 1334), // minTextAdapt: true, // splitScreenMode: true, - builder: () => GetMaterialApp( + builder: (context) => GetMaterialApp( onGenerateTitle: (context) => S.of(context)!.appName, debugShowCheckedModeBanner: false, theme: AppTheme.theme, diff --git a/lib/models/user/user_info_model.dart b/lib/models/user/user_info_model.dart index 3889df5a..eff46d84 100644 --- a/lib/models/user/user_info_model.dart +++ b/lib/models/user/user_info_model.dart @@ -20,6 +20,8 @@ class UserInfoModel { final bool isPointsSignSetting; final bool isSign; final int? points; + final double? balance; + final bool isBalancePayPwd; final List imgList; String get sexValue { @@ -55,6 +57,8 @@ class UserInfoModel { required this.isPointsSignSetting, required this.isSign, this.points, + this.balance, + required this.isBalancePayPwd, required this.imgList, }); } diff --git a/lib/models/user/user_info_model.g.dart b/lib/models/user/user_info_model.g.dart index 5140e033..c30c159e 100644 --- a/lib/models/user/user_info_model.g.dart +++ b/lib/models/user/user_info_model.g.dart @@ -21,6 +21,8 @@ UserInfoModel _$UserInfoModelFromJson(Map json) => isPointsSignSetting: json['isPointsSignSetting'] as bool, isSign: json['isSign'] as bool, points: json['points'] as int?, + balance: (json['balance'] as num?)?.toDouble(), + isBalancePayPwd: json['isBalancePayPwd'] as bool, imgList: (json['imgList'] as List) .map((e) => ImgModel.fromJson(e as Map)) .toList(), diff --git a/lib/models/wallet/trade_record_list_model.dart b/lib/models/wallet/trade_record_list_model.dart new file mode 100644 index 00000000..4a763857 --- /dev/null +++ b/lib/models/wallet/trade_record_list_model.dart @@ -0,0 +1,37 @@ +import 'package:json_annotation/json_annotation.dart'; +import 'package:equatable/equatable.dart'; + +part 'trade_record_list_model.g.dart'; + +@JsonSerializable() +class TradeRecordListModel extends Equatable { + final int id; + final int type; + final String content; + final double payAmount; + final String createName; + final String createDate; + + factory TradeRecordListModel.fromJson(Map json) => + _$TradeRecordListModelFromJson(json); + + + const TradeRecordListModel({ + required this.id, + required this.type, + required this.content, + required this.payAmount, + required this.createName, + required this.createDate, + }); + + @override + List get props => [ + id, + type, + content, + payAmount, + createName, + createDate, + ]; +} diff --git a/lib/models/wallet/trade_record_list_model.g.dart b/lib/models/wallet/trade_record_list_model.g.dart new file mode 100644 index 00000000..9c740f3b --- /dev/null +++ b/lib/models/wallet/trade_record_list_model.g.dart @@ -0,0 +1,18 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'trade_record_list_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +TradeRecordListModel _$TradeRecordListModelFromJson( + Map json) => + TradeRecordListModel( + id: json['id'] as int, + type: json['type'] as int, + content: json['content'] as String, + payAmount: (json['payAmount'] as num).toDouble(), + createName: json['createName'] as String, + createDate: json['createDate'] as String, + ); diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 323a4a53..f38bfaef 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -385,7 +385,6 @@ class _HomePageState extends State suffixTitle: '查看全部', onTap: () => Get.to(() => ActivityListPage()), ), - 24.hb, _activityItemModels == [] ? SizedBox() : Container( diff --git a/lib/pages/personal/personal_page.dart b/lib/pages/personal/personal_page.dart index c75d5d2a..9f2decc7 100644 --- a/lib/pages/personal/personal_page.dart +++ b/lib/pages/personal/personal_page.dart @@ -1,6 +1,8 @@ import 'package:aku_new_community/constants/saas_api.dart'; import 'package:aku_new_community/gen/assets.gen.dart'; import 'package:aku_new_community/pages/personal/user_profile_page.dart'; +import 'package:aku_new_community/pages/personal/wallet/wallet_recharge_page.dart'; +import 'package:aku_new_community/pages/personal/wallet/wallet_trade_record_page.dart'; import 'package:aku_new_community/pages/setting_page/settings_page.dart'; import 'package:aku_new_community/pages/sign/login/other_login_page.dart'; import 'package:aku_new_community/provider/user_provider.dart'; @@ -10,6 +12,7 @@ import 'package:aku_new_community/ui/profile/new_house/my_house_page.dart'; import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:aku_new_community/widget/bee_avatar_widget.dart'; +import 'package:aku_new_community/widget/bee_divider.dart'; import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; @@ -290,172 +293,300 @@ class _PersonalIndexState extends State ], ), ), - Padding( - padding: EdgeInsets.only(top: 600.w), - child: Column( - children: [ - Container( - width: 686.w, - height: 282.w, - decoration: BoxDecoration( - color: Color(0xffffffff), - borderRadius: BorderRadius.all(Radius.circular(8)), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.1), - offset: Offset(1, 1), - ), - ], - ), - margin: EdgeInsets.only(left: 32.w, right: 32.w), - padding: EdgeInsets.only( - top: 24.w, left: 32.w, right: 32.w), - child: Column( - //mainAxisAlignment: MainAxisAlignment.center, - children: [ - _homeTitle('我的订单', () { - Get.to(() => OrderPage(initIndex: 0)); - }, '查看全部'), - 50.hb, - Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - _orderButton( - name: '待付款', - path: Assets.newIcon.icDaifuk.path, - index: 1, - ), - _orderButton( - name: '待发货', - path: Assets.newIcon.imgDaifah.path, - index: 2, - ), - _orderButton( - name: '待收货', - path: Assets.newIcon.icDaishouh.path, - index: 3, - ), - _orderButton( - name: '已完成', - path: Assets.newIcon.imgDaipingj.path, - index: 4, - ), - ], - ), - ], - ), - ), - // Container( - // width: double.infinity, - // height: 100.w, - // clipBehavior: Clip.antiAlias, - // decoration: BoxDecoration( - // // color: Colors.white, - // borderRadius: BorderRadius.circular(16.w)), - // margin: EdgeInsets.symmetric(horizontal: 32.w), - // child: Material( - // color: Colors.white, - // child: InkWell( - // onTap: () { - // Get.to(() => ClockInPage()); - // }, - // borderRadius: BorderRadius.circular(16.w), - // child: Padding( - // padding: EdgeInsets.symmetric( - // horizontal: 32.w, vertical: 24.w), - // child: Row( - // children: [ - // '我的积分'.text.size(30.sp).black.bold.make(), - // Spacer(), - // // Assets.icons.intergral - // // .image(width: 32.w, height: 32.w), - // // 16.w.widthBox, - // // '123'.text.size(28.sp).black.make(), - // // 16.w.widthBox, - // Icon( - // CupertinoIcons.right_chevron, - // size: 24.w, - // ), - // ], - // ), - // ), - // ), - // ), - // ), - Container( - decoration: BoxDecoration( - color: Color(0xffffffff), - borderRadius: BorderRadius.all(Radius.circular(8)), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.1), - offset: Offset(1, 1), - ), - ], - ), - margin: EdgeInsets.all(32.w), - padding: EdgeInsets.all(32.w), - child: Column( - children: [ - Row( - children: [ - 22.wb, - '其他功能' - .text - .size(32.sp) - .color(Color(0xFF2B2B2B)) - .bold - .make(), - Spacer(), - ], - ), - 24.hb, - _function('我的积分', Assets.newIcon.icJifen.path, - () => Get.to(() => ClockInPage()), ''), - _function( - '我的房屋', - Assets.newIcon.icWdfw.path, - () { - Get.to(() => MyHousePage()); - }, - // () => HouseOwnersPage( - // identify: 4, - // ), - '${UserTool.userProvider.defaultHouseString}', - ), - _function('我的家庭', Assets.newIcon.icWdjt.path, () { - Get.to(() => MyFamilyPage()); - }, ''), - // _function('我的车位', R.ASSETS_ICONS_ICON_MY_CARSEAT_PNG, - // () => CarParkingPage(), ''), - // 36.hb, - // _function('我的车', R.ASSETS_ICONS_ICON_MY_CAR_PNG, - // () => CarManagePage(), ''), - // 36.hb, - _function('我的访客', Assets.newIcon.icWdfk.path, () { - BotToast.showText( - text: '本小区尚未配置门禁设备', - align: Alignment(0, 0.5)); - }, ''), - _function( - '收货地址', - Assets.newIcon.icShdz.path, - () => Get.to(() => AddressListPage( - canBack: false, - )), - ''), - ], - ), - ), - ], - ), - ), + _columBody(), ], )), )); } + Padding _columBody() { + var wallet = Container( + margin: EdgeInsets.symmetric(horizontal: 32.w), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8.w), + color: Colors.white, + ), + child: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w), + child: Row( + children: [ + '我的钱包'.text.size(32.sp).color(Colors.black).make(), + Spacer(), + GestureDetector( + onTap: () { + Get.to(() => WalletTradeRecordPage()); + }, + child: Row( + children: [ + '交易记录' + .text + .size(24.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + 8.wb, + Icon( + CupertinoIcons.chevron_right, + color: Colors.black.withOpacity(0.45), + size: 32.w, + ), + ], + ), + ), + ], + ), + ), + BeeDivider.horizontal(), + Padding( + padding: EdgeInsets.symmetric(vertical: 24.w), + child: Row( + children: [ + Expanded( + child: Column( + children: [ + '${UserTool.userProvider.userInfoModel!.points ?? 0}' + .text + .size(40.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + 12.hb, + '积分' + .text + .size(24.sp) + .color(Colors.black.withOpacity(0.65)) + .make(), + ], + ), + ), + Expanded( + child: Column( + children: [ + '${UserTool.userProvider.userInfoModel!.balance ?? 0}' + .text + .size(40.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + 12.hb, + '余额' + .text + .size(24.sp) + .color(Colors.black.withOpacity(0.65)) + .make(), + ], + ), + ) + ], + ), + ), + BeeDivider.horizontal(), + Row( + children: [ + Expanded( + child: GestureDetector( + onTap: () async { + await Get.to(WalletRechargePage( + initIndex: 0, + )); + _refreshController.callRefresh(); + }, + child: Material( + color: Colors.transparent, + child: Center( + child: '充值' + .text + .size(26.sp) + .color(Colors.black.withOpacity(0.65)) + .make(), + ), + ))), + Container( + height: 84.w, + width: 2.w, + color: Colors.black.withOpacity(0.06), + ), + Expanded( + child: GestureDetector( + onTap: () async { + await Get.to(WalletRechargePage( + initIndex: 1, + )); + _refreshController.callRefresh(); + }, + child: Material( + color: Colors.transparent, + child: Center( + child: '购买积分' + .text + .size(26.sp) + .color(Colors.black.withOpacity(0.65)) + .make(), + ), + ))) + ], + ) + ], + ), + ); + var order = Container( + width: 686.w, + height: 282.w, + decoration: BoxDecoration( + color: Color(0xffffffff), + borderRadius: BorderRadius.all(Radius.circular(8)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + offset: Offset(1, 1), + ), + ], + ), + margin: EdgeInsets.only(left: 32.w, right: 32.w), + padding: EdgeInsets.only(top: 24.w, left: 32.w, right: 32.w), + child: Column( + //mainAxisAlignment: MainAxisAlignment.center, + children: [ + _homeTitle('我的订单', () { + Get.to(() => OrderPage(initIndex: 0)); + }, '查看全部'), + 50.hb, + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + _orderButton( + name: '待付款', + path: Assets.newIcon.icDaifuk.path, + index: 1, + ), + _orderButton( + name: '待发货', + path: Assets.newIcon.imgDaifah.path, + index: 2, + ), + _orderButton( + name: '待收货', + path: Assets.newIcon.icDaishouh.path, + index: 3, + ), + _orderButton( + name: '已完成', + path: Assets.newIcon.imgDaipingj.path, + index: 4, + ), + ], + ), + ], + ), + ); + var extra = Container( + decoration: BoxDecoration( + color: Color(0xffffffff), + borderRadius: BorderRadius.all(Radius.circular(8)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + offset: Offset(1, 1), + ), + ], + ), + margin: EdgeInsets.all(32.w), + padding: EdgeInsets.all(32.w), + child: Column( + children: [ + Row( + children: [ + 22.wb, + '其他功能'.text.size(32.sp).color(Color(0xFF2B2B2B)).bold.make(), + Spacer(), + ], + ), + 24.hb, + _function('我的积分', Assets.newIcon.icJifen.path, + () => Get.to(() => ClockInPage()), ''), + _function( + '我的房屋', + Assets.newIcon.icWdfw.path, + () { + Get.to(() => MyHousePage()); + }, + // () => HouseOwnersPage( + // identify: 4, + // ), + '${UserTool.userProvider.defaultHouseString}', + ), + _function('我的家庭', Assets.newIcon.icWdjt.path, () { + Get.to(() => MyFamilyPage()); + }, ''), + // _function('我的车位', R.ASSETS_ICONS_ICON_MY_CARSEAT_PNG, + // () => CarParkingPage(), ''), + // 36.hb, + // _function('我的车', R.ASSETS_ICONS_ICON_MY_CAR_PNG, + // () => CarManagePage(), ''), + // 36.hb, + _function('我的访客', Assets.newIcon.icWdfk.path, () { + BotToast.showText(text: '本小区尚未配置门禁设备', align: Alignment(0, 0.5)); + }, ''), + _function( + '收货地址', + Assets.newIcon.icShdz.path, + () => Get.to(() => AddressListPage( + canBack: false, + )), + ''), + ], + ), + ); + return Padding( + padding: EdgeInsets.only(top: 560.w), + child: Column( + children: [ + wallet, + 48.hb, + order, + // Container( + // width: double.infinity, + // height: 100.w, + // clipBehavior: Clip.antiAlias, + // decoration: BoxDecoration( + // // color: Colors.white, + // borderRadius: BorderRadius.circular(16.w)), + // margin: EdgeInsets.symmetric(horizontal: 32.w), + // child: Material( + // color: Colors.white, + // child: InkWell( + // onTap: () { + // Get.to(() => ClockInPage()); + // }, + // borderRadius: BorderRadius.circular(16.w), + // child: Padding( + // padding: EdgeInsets.symmetric( + // horizontal: 32.w, vertical: 24.w), + // child: Row( + // children: [ + // '我的积分'.text.size(30.sp).black.bold.make(), + // Spacer(), + // // Assets.icons.intergral + // // .image(width: 32.w, height: 32.w), + // // 16.w.widthBox, + // // '123'.text.size(28.sp).black.make(), + // // 16.w.widthBox, + // Icon( + // CupertinoIcons.right_chevron, + // size: 24.w, + // ), + // ], + // ), + // ), + // ), + // ), + // ), + extra, + ], + ), + ); + } + _homeTitle(String title, VoidCallback onTap, String suffixTitle) { return Row( children: [ diff --git a/lib/pages/personal/wallet/balance_record_view.dart b/lib/pages/personal/wallet/balance_record_view.dart new file mode 100644 index 00000000..019f7d05 --- /dev/null +++ b/lib/pages/personal/wallet/balance_record_view.dart @@ -0,0 +1,210 @@ +import 'package:aku_new_community/constants/saas_api.dart'; +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/models/wallet/trade_record_list_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/picker/bee_date_picker.dart'; +import 'package:aku_new_community/widget/picker/bee_picker_box.dart'; +import 'package:common_utils/common_utils.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:flutter_screenutil/src/size_extension.dart'; +import 'package:get/get.dart'; +import 'package:velocity_x/src/extensions/string_ext.dart'; + +class BalanceRecordView extends StatefulWidget { + const BalanceRecordView({Key? key}) : super(key: key); + + @override + _BalanceRecordViewState createState() => _BalanceRecordViewState(); +} + +class _BalanceRecordViewState extends State { + EasyRefreshController _refreshController = EasyRefreshController(); + + List _models = []; + int _pageNum = 1; + int _size = 10; + DateTime _pickTime = DateTime.now(); + int _pickType = 0; + + Map _types = { + 1: '支付', + 2: '退还', + 3: '充值', + 4: '收入', + 5: '提现', + 6: '抵扣', + }; + + @override + void dispose() { + _refreshController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Container( + padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w), + child: Row( + children: [ + GestureDetector( + onTap: () async { + var date = await BeeDatePicker.monthPicker( + DateTime.now().subtract(Duration(days: 365))); + if (date != null) { + _pickTime = date; + } + setState(() {}); + }, + child: Row( + children: [ + '${_pickTime.year}年${_pickTime.month}月' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + Icon( + CupertinoIcons.chevron_down, + size: 32.w, + color: Colors.black.withOpacity(0.45), + ) + ], + ), + ), + Spacer(), + MaterialButton( + color: Colors.black.withOpacity(0.06), + onPressed: () async { + await showModalBottomSheet( + context: context, + builder: (context) { + return BeePickerBox( + onPressed: () { + Get.back(); + setState(() {}); + }, + child: CupertinoPicker.builder( + itemExtent: 60.w, + childCount: _types.values.length, + onSelectedItemChanged: (index) { + _pickType = _types.keys.toList()[index]; + }, + itemBuilder: (context, index) { + var str = _types.values.toList()[index]; + return Center( + child: str.text.size(32.sp).isIntrinsic.make(), + ); + }, + ), + ); + }, + ); + }, + shape: StadiumBorder(), + elevation: 0, + child: Row( + children: [ + '${_pickType == 0 ? '全部类型' : _types[_pickType]}' + .text + .size(24.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + Icon( + CupertinoIcons.chevron_down, + size: 24.w, + color: Colors.black.withOpacity(0.25), + ) + ], + ), + ), + ], + ), + ), + Flexible( + child: Container( + color: Colors.white, + child: EasyRefresh( + header: MaterialHeader(), + footer: MaterialFooter(), + firstRefresh: true, + controller: _refreshController, + onRefresh: () async { + _pageNum = 1; + var baseList = await NetUtil() + .getList(SAASAPI.balance.tradeRecordList, params: { + 'pageNum': _pageNum, + 'size': _size, + 'modelType': 0, + 'type': _pickType, + 'createDate': _pickTime, + }); + + _models = baseList.rows + .map((e) => TradeRecordListModel.fromJson(e)) + .toList(); + }, + onLoad: () async { + _pageNum++; + var baseList = await NetUtil() + .getList(SAASAPI.balance.tradeRecordList, params: { + 'pageNum': _pageNum, + 'size': _size, + 'modelType': 0, + 'type': _pickType, + 'createDate': _pickTime, + }); + if (baseList.total > _models.length) { + _models.addAll(baseList.rows + .map((e) => TradeRecordListModel.fromJson(e)) + .toList()); + } else { + _refreshController.finishLoad(noMore: true); + } + }, + child: ListView( + padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w), + children: _models.map((e) => _buildCard(e)).toList(), + ), + ), + ), + ), + ], + ); + } + + bool incom(type) => [2, 3, 4].contains(type); + + Widget _buildCard(TradeRecordListModel model) { + return Column( + children: [ + Row( + children: [ + '${_types[model.type]}-${model.content}' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + Spacer(), + '${incom(model.type) ? '+' : '-'}¥${model.payAmount}' + .text + .size(28.sp) + .color(incom(model.type) + ? Colors.red + : Colors.black.withOpacity(0.85)) + .make(), + ], + ), + 8.hb, + '${DateUtil.formatDateStr(model.createDate, format: 'MM/dd HH:mm')}' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + ], + ); + } +} diff --git a/lib/pages/personal/wallet/input_pay_password_dialog.dart b/lib/pages/personal/wallet/input_pay_password_dialog.dart new file mode 100644 index 00000000..faeef790 --- /dev/null +++ b/lib/pages/personal/wallet/input_pay_password_dialog.dart @@ -0,0 +1,91 @@ +import 'package:aku_new_community/constants/saas_api.dart'; +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/src/size_extension.dart'; +import 'package:get/get.dart'; +import 'package:sms_autofill/sms_autofill.dart'; +import 'package:velocity_x/src/extensions/string_ext.dart'; + +class InputPayPasswordDialog extends StatefulWidget { + final int balance; + + const InputPayPasswordDialog({ + Key? key, + required this.balance, + }) : super(key: key); + + @override + _InputPayPasswordDialogState createState() => _InputPayPasswordDialogState(); +} + +class _InputPayPasswordDialogState extends State { + String? _currentCode; + + @override + Widget build(BuildContext context) { + return Center( + child: Padding( + padding: EdgeInsets.only(bottom: 300.w), + child: Material( + borderRadius: BorderRadius.circular(24.w), + child: Container( + width: 630.w, + height: 480.w, + padding: EdgeInsets.symmetric(horizontal: 32.w), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(24.w)), + child: Column( + children: [ + 96.hb, + '请输入您的支付密码' + .text + .size(32.sp) + .color(Colors.black.withOpacity(0.85)) + .bold + .make(), + 40.hb, + '支付密码仅用于对钱包余额支付时确认' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + PinFieldAutoFill( + autoFocus: true, + currentCode: _currentCode, + inputFormatters: [FilteringTextInputFormatter.digitsOnly], + codeLength: 6, + onCodeChanged: (code) async { + if ((code?.length ?? 0) >= 6) { + Get.back(); + var base = await NetUtil() + .post(SAASAPI.balance.buyPointsByBalance, params: { + 'balance': widget.balance, + 'balancePayPwd': code + }); + Get.back(); + if (!base.success) { + BotToast.showText(text: base.msg); + } + } + _currentCode = code; + }, + decoration: UnderlineDecoration( + colorBuilder: FixedColorListBuilder([ + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + ])), + ) + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/personal/wallet/pay_way_dialog.dart b/lib/pages/personal/wallet/pay_way_dialog.dart new file mode 100644 index 00000000..9ce8487e --- /dev/null +++ b/lib/pages/personal/wallet/pay_way_dialog.dart @@ -0,0 +1,240 @@ +import 'dart:ui'; + +import 'package:aku_new_community/constants/saas_api.dart'; +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/gen/assets.gen.dart'; +import 'package:aku_new_community/pages/life_pay/pay_util.dart'; +import 'package:aku_new_community/pages/personal/wallet/input_pay_password_dialog.dart'; +import 'package:aku_new_community/pages/personal/wallet/set_pay_password_dialog.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/buttons/bee_check_radio.dart'; +import 'package:aku_new_community/widget/buttons/bee_long_button.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; +import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/src/size_extension.dart'; +import 'package:get/get.dart'; +import 'package:velocity_x/src/extensions/string_ext.dart'; + +class PayWayDialog extends StatefulWidget { + final bool isBalance; + final int amount; + final bool insufficientBalance; + + const PayWayDialog( + {Key? key, + required this.isBalance, + required this.amount, + required this.insufficientBalance}) + : super(key: key); + + @override + _PayWayDialogState createState() => _PayWayDialogState(); +} + +class _PayWayDialogState extends State { + List _payType = []; + + @override + void initState() { + if (widget.isBalance) { + _payType.add(1); + } else { + if (widget.insufficientBalance) { + _payType.add(1); + } else { + _payType.add(0); + } + } + super.initState(); + } + + @override + Widget build(BuildContext context) { + var wallet = GestureDetector( + onTap: () { + if (widget.insufficientBalance) { + return; + } + _payType.clear(); + _payType.add(0); + setState(() {}); + }, + child: ClipRect( + child: Stack( + children: [ + Material( + color: Colors.transparent, + child: Row( + children: [ + Assets.newIcon.walletBalance.image(width: 48.w, height: 48.w), + 8.wb, + '钱包余额' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + 16.wb, + Visibility( + visible: widget.insufficientBalance, + child: + '钱包余额不足'.text.size(24.sp).color(Colors.red).make()), + Spacer(), + BeeCheckRadio( + groupValue: _payType, + value: 0, + size: 36.w, + indent: Icon( + CupertinoIcons.checkmark_alt, + color: Colors.black, + size: 28.w, + ), + ), + ], + ), + ), + BackdropFilter( + filter: ImageFilter.blur( + sigmaX: widget.insufficientBalance ? 1 : 0, + sigmaY: widget.insufficientBalance ? 1 : 0), + child: Container(), + ), + ], + ), + ), + ); + var alipay = GestureDetector( + onTap: () { + _payType.clear(); + _payType.add(1); + setState(() {}); + }, + child: Material( + color: Colors.transparent, + child: Row( + children: [ + Assets.newIcon.alipay.image(width: 48.w, height: 48.w), + 8.wb, + '支付宝'.text.size(28.sp).color(Colors.black.withOpacity(0.85)).make(), + Spacer(), + BeeCheckRadio( + groupValue: _payType, + value: 1, + size: 36.w, + indent: Icon( + CupertinoIcons.checkmark_alt, + color: Colors.black, + size: 28.w, + ), + ), + ], + ), + ), + ); + return Material( + color: Colors.transparent, + child: Container( + padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w), + width: double.infinity, + color: Colors.white, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + '支付' + .text + .size(32.sp) + .bold + .isIntrinsic + .color(Colors.black.withOpacity(0.85)) + .make(), + 48.hb, + Column( + children: [ + '¥' + .richText + .color(Colors.black.withOpacity(0.85)) + .size(26.sp) + .withTextSpanChildren([ + widget.amount + .toString() + .textSpan + .size(40.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + ]).make(), + Offstage( + offstage: widget.isBalance, + child: '总共购买${widget.amount * 10}积分' + .text + .size(32.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + ), + 60.hb, + Offstage( + offstage: widget.isBalance, + child: Column( + children: [ + wallet, + 40.hb, + ], + ), + ), + alipay, + 80.hb, + BeeLongButton( + width: double.infinity, + onPressed: () async { + if (_payType.contains(0)) { + if (!UserTool + .userProvider.userInfoModel!.isBalancePayPwd) { + Get.dialog(SetPayPasswordDialog()); + } else { + Get.back(); + Get.dialog( + InputPayPasswordDialog(balance: widget.amount)); + } + return; + } + if (_payType.contains(1)) { + var cancel = BotToast.showLoading(); + await _alipayFuc(); + cancel(); + Get.back(); + return; + } + }, + text: '确认支付${widget.amount}元'), + ], + ), + ], + ), + ), + ); + } + + Future _alipayFuc() async { + if (widget.isBalance) { + var base = await NetUtil().post(SAASAPI.pay.createBalanceOrder, params: { + 'balance': widget.amount, + }); + if (base.success) { + var re = await PayUtil() + .callAliPay(base.data, SAASAPI.pay.balanceOrderCheckAlipay); + } else { + BotToast.showText(text: base.msg); + } + } else { + var base = await NetUtil().post(SAASAPI.pay.createPointsOrder, params: { + 'payAmount': widget.amount, + }); + if (base.success) { + var re = await PayUtil() + .callAliPay(base.data, SAASAPI.pay.pointsOrderCheckAlipay); + } else { + BotToast.showText(text: base.msg); + } + } + } +} diff --git a/lib/pages/personal/wallet/point_record_view.dart b/lib/pages/personal/wallet/point_record_view.dart new file mode 100644 index 00000000..a5a38329 --- /dev/null +++ b/lib/pages/personal/wallet/point_record_view.dart @@ -0,0 +1,210 @@ +import 'package:aku_new_community/constants/saas_api.dart'; +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/models/wallet/trade_record_list_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/picker/bee_date_picker.dart'; +import 'package:aku_new_community/widget/picker/bee_picker_box.dart'; +import 'package:common_utils/common_utils.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:flutter_screenutil/src/size_extension.dart'; +import 'package:get/get.dart'; +import 'package:velocity_x/src/extensions/string_ext.dart'; + +class PointRecordView extends StatefulWidget { + const PointRecordView({Key? key}) : super(key: key); + + @override + _PointRecordViewState createState() => _PointRecordViewState(); +} + +class _PointRecordViewState extends State { + EasyRefreshController _refreshController = EasyRefreshController(); + + List _models = []; + int _pageNum = 1; + int _size = 10; + DateTime _pickTime = DateTime.now(); + int _pickType = 0; + + Map _types = { + 1: '支付', + 2: '退还', + 3: '充值', + 4: '收入', + 5: '提现', + 6: '抵扣', + }; + + @override + void dispose() { + _refreshController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Container( + padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w), + child: Row( + children: [ + GestureDetector( + onTap: () async { + var date = await BeeDatePicker.monthPicker( + DateTime.now().subtract(Duration(days: 365))); + if (date != null) { + _pickTime = date; + } + setState(() {}); + }, + child: Row( + children: [ + '${_pickTime.year}年${_pickTime.month}月' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + Icon( + CupertinoIcons.chevron_down, + size: 32.w, + color: Colors.black.withOpacity(0.45), + ) + ], + ), + ), + Spacer(), + MaterialButton( + color: Colors.black.withOpacity(0.06), + onPressed: () async { + await showModalBottomSheet( + context: context, + builder: (context) { + return BeePickerBox( + onPressed: () { + Get.back(); + setState(() {}); + }, + child: CupertinoPicker.builder( + itemExtent: 60.w, + childCount: _types.values.length, + onSelectedItemChanged: (index) { + _pickType = _types.keys.toList()[index]; + }, + itemBuilder: (context, index) { + var str = _types.values.toList()[index]; + return Center( + child: str.text.size(32.sp).isIntrinsic.make(), + ); + }, + ), + ); + }, + ); + }, + shape: StadiumBorder(), + elevation: 0, + child: Row( + children: [ + '${_pickType == 0 ? '全部类型' : _types[_pickType]}' + .text + .size(24.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + Icon( + CupertinoIcons.chevron_down, + size: 24.w, + color: Colors.black.withOpacity(0.25), + ) + ], + ), + ), + ], + ), + ), + Flexible( + child: Container( + color: Colors.white, + child: EasyRefresh( + header: MaterialHeader(), + footer: MaterialFooter(), + firstRefresh: true, + controller: _refreshController, + onRefresh: () async { + _pageNum = 1; + var baseList = await NetUtil() + .getList(SAASAPI.balance.tradeRecordList, params: { + 'pageNum': _pageNum, + 'size': _size, + 'modelType': 1, + 'type': _pickType, + 'createDate': _pickTime, + }); + + _models = baseList.rows + .map((e) => TradeRecordListModel.fromJson(e)) + .toList(); + }, + onLoad: () async { + _pageNum++; + var baseList = await NetUtil() + .getList(SAASAPI.balance.tradeRecordList, params: { + 'pageNum': _pageNum, + 'size': _size, + 'modelType': 0, + 'type': _pickType, + 'createDate': _pickTime, + }); + if (baseList.total > _models.length) { + _models.addAll(baseList.rows + .map((e) => TradeRecordListModel.fromJson(e)) + .toList()); + } else { + _refreshController.finishLoad(noMore: true); + } + }, + child: ListView( + padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w), + children: _models.map((e) => _buildCard(e)).toList(), + ), + ), + ), + ), + ], + ); + } + + bool incom(type) => [2, 3, 4].contains(type); + + Widget _buildCard(TradeRecordListModel model) { + return Column( + children: [ + Row( + children: [ + '${_types[model.type]}-${model.content}' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + Spacer(), + '${incom(model.type) ? '+' : '-'}¥${model.payAmount}' + .text + .size(28.sp) + .color(incom(model.type) + ? Colors.red + : Colors.black.withOpacity(0.85)) + .make(), + ], + ), + 8.hb, + '${DateUtil.formatDateStr(model.createDate, format: 'MM/dd HH:mm')}' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + ], + ); + } +} diff --git a/lib/pages/personal/wallet/set_pay_password_dialog.dart b/lib/pages/personal/wallet/set_pay_password_dialog.dart new file mode 100644 index 00000000..dcc458b3 --- /dev/null +++ b/lib/pages/personal/wallet/set_pay_password_dialog.dart @@ -0,0 +1,76 @@ +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/pages/personal/wallet/set_pay_password_verify_dialog.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/src/size_extension.dart'; +import 'package:get/get.dart'; +import 'package:sms_autofill/sms_autofill.dart'; +import 'package:velocity_x/src/extensions/string_ext.dart'; + +class SetPayPasswordDialog extends StatefulWidget { + const SetPayPasswordDialog({Key? key, }) : super(key: key); + + @override + _SetPayPasswordDialogState createState() => _SetPayPasswordDialogState(); +} + +class _SetPayPasswordDialogState extends State { + String? _currentCode; + + @override + Widget build(BuildContext context) { + return Center( + child: Padding( + padding:EdgeInsets.only(bottom: 300.w), + child: Material( + borderRadius: BorderRadius.circular(24.w), + child: Container( + width: 630.w, + height: 480.w, + padding: EdgeInsets.symmetric(horizontal: 32.w), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(24.w)), + child: Column( + children: [ + 96.hb, + '请先设置支付密码' + .text + .size(32.sp) + .color(Colors.black.withOpacity(0.85)) + .bold + .make(), + 40.hb, + '支付密码仅用于对钱包余额支付时确认' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + PinFieldAutoFill( + autoFocus: true, + currentCode: _currentCode, + inputFormatters: [FilteringTextInputFormatter.digitsOnly], + codeLength: 6, + onCodeChanged: (code) async { + if ((code?.length ?? 0) >= 6) { + Get.back(); + Get.dialog(SetPayVerifyPasswordDialog(firstCode:code!,)); + } + _currentCode = code; + }, + decoration: UnderlineDecoration( + colorBuilder: FixedColorListBuilder([ + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + ])), + ) + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/personal/wallet/set_pay_password_verify_dialog.dart b/lib/pages/personal/wallet/set_pay_password_verify_dialog.dart new file mode 100644 index 00000000..262b9bb4 --- /dev/null +++ b/lib/pages/personal/wallet/set_pay_password_verify_dialog.dart @@ -0,0 +1,118 @@ +import 'package:aku_new_community/constants/saas_api.dart'; +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/pages/personal/wallet/input_pay_password_dialog.dart'; +import 'package:aku_new_community/pages/sign/login/psd_verify.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; +import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/src/size_extension.dart'; +import 'package:get/get.dart'; +import 'package:sms_autofill/sms_autofill.dart'; +import 'package:velocity_x/src/extensions/string_ext.dart'; + +class SetPayVerifyPasswordDialog extends StatefulWidget { + final String firstCode; + + const SetPayVerifyPasswordDialog({Key? key, required this.firstCode}) + : super(key: key); + + @override + _SetPayVerifyPasswordDialogState createState() => + _SetPayVerifyPasswordDialogState(); +} + +class _SetPayVerifyPasswordDialogState + extends State { + String _currentCode = ''; + + bool get checkVerify => widget.firstCode == _currentCode; + + @override + Widget build(BuildContext context) { + return Center( + child: Padding( + padding: EdgeInsets.only(bottom: 300.w), + child: Material( + borderRadius: BorderRadius.circular(24.w), + child: Container( + width: 630.w, + height: 480.w, + padding: EdgeInsets.symmetric(horizontal: 32.w), + decoration: + BoxDecoration(borderRadius: BorderRadius.circular(24.w)), + child: Column( + children: [ + 96.hb, + '请再次输入支付密码' + .text + .size(32.sp) + .color(Colors.black.withOpacity(0.85)) + .bold + .make(), + 40.hb, + '支付密码仅用于对钱包余额支付时确认' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + PinFieldAutoFill( + autoFocus: true, + currentCode: _currentCode, + inputFormatters: [FilteringTextInputFormatter.digitsOnly], + codeLength: 6, + onCodeChanged: (code) async { + _currentCode = code ?? ''; + if ((code?.length ?? 0) >= 6) { + print(checkVerify); + if (!checkVerify) { + return; + } + var base = await NetUtil() + .post(SAASAPI.balance.setBalancePayPsd, params: { + 'pwd': widget.firstCode, + 'rePwd': _currentCode, + }); + if (base.success) { + Get.back(); + UserTool.userProvider.updateUserInfo(); + } else { + BotToast.showText(text: base.msg); + Get.back(); + } + } + setState(() {}); + }, + decoration: UnderlineDecoration( + colorBuilder: FixedColorListBuilder([ + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + Colors.black.withOpacity(0.3), + ])), + ), + 24.hb, + Offstage( + offstage: (_currentCode.isEmptyOrNull) || (checkVerify), + child: Row( + children: [ + '密码输入不一致' + .text + .size(24.sp) + .isIntrinsic + .color(Colors.red) + .make(), + ], + ), + ) + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/personal/wallet/wallet_recharge_page.dart b/lib/pages/personal/wallet/wallet_recharge_page.dart new file mode 100644 index 00000000..a0ceadec --- /dev/null +++ b/lib/pages/personal/wallet/wallet_recharge_page.dart @@ -0,0 +1,496 @@ +import 'package:aku_new_community/extensions/num_ext.dart'; +import 'package:aku_new_community/extensions/widget_list_ext.dart'; +import 'package:aku_new_community/gen/assets.gen.dart'; +import 'package:aku_new_community/pages/personal/wallet/pay_way_dialog.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/buttons/bee_long_button.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; +import 'package:bot_toast/bot_toast.dart'; +import 'package:collection/src/iterable_extensions.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/src/size_extension.dart'; +import 'package:get/get.dart'; +import 'package:velocity_x/src/extensions/num_ext.dart'; +import 'package:velocity_x/src/extensions/string_ext.dart'; + +class WalletRechargePage extends StatefulWidget { + final initIndex; + + const WalletRechargePage({Key? key, this.initIndex = 0}) : super(key: key); + + @override + _WalletRechargePageState createState() => _WalletRechargePageState(); +} + +class _WalletRechargePageState extends State + with SingleTickerProviderStateMixin { + int _currentIndex = 0; + int _currentSelect = 0; + late TabController _tabController; + List _tabs = ['余额充值', '积分充值']; + + List _balanceValue = [10, 20, 30, 50, 00, 200, 300, 500]; + List _pointValue = [10, 200, 300, 500, 1000, 2000, 5000, 10000]; + + int _rechargeValue = 0; + + @override + void initState() { + _tabController = + TabController(length: 2, vsync: this, initialIndex: widget.initIndex); + _currentIndex = widget.initIndex; + _rechargeValue = widget.initIndex == 0 ? _balanceValue[0] : _pointValue[0]; + super.initState(); + } + + @override + Widget build(BuildContext context) { + return BeeScaffold( + title: '钱包充值', + actions: [ + TextButton( + onPressed: () {}, + child: '账单' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + ), + ], + body: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w), + child: Row( + children: [ + '余额:${UserTool.userProvider.userInfoModel!.balance ?? 0}' + .text + .size(32.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + 64.wb, + '积分:' + .text + .size(32.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + '${UserTool.userProvider.userInfoModel!.points ?? 0}' + .text + .size(32.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + ], + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w), + decoration: BoxDecoration(color: Colors.white), + child: Column( + children: [ + Row( + children: _tabs + .mapIndexed((index, element) => GestureDetector( + onTap: () { + _currentIndex = index; + _tabController.animateTo(_currentIndex); + setState(() {}); + }, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + element.text + .size(28.sp) + .fontWeight(_currentIndex == index + ? FontWeight.bold + : FontWeight.normal) + .color(Colors.black.withOpacity( + _currentIndex == index ? 0.85 : 0.65)) + .make(), + 8.hb, + AnimatedOpacity( + duration: Duration(microseconds: 500), + opacity: _currentIndex == index ? 1 : 0, + child: Container( + width: 40.w, + height: 8.w, + decoration: BoxDecoration( + color: Colors.black, + borderRadius: + BorderRadius.circular(4.w), + ), + ), + ) + ], + ), + )) + .toList() + .sepWidget(separate: 48.wb), + ), + 48.hb, + Expanded( + child: TabBarView(controller: _tabController, children: [ + _balanceView(), + _pointView(), + ]), + ), + ], + ), + ), + ), + ], + ), + bottomNavi: Padding( + padding: EdgeInsets.only( + left: 32.w, + right: 32.w, + bottom: 32.w + MediaQuery.of(context).padding.bottom), + child: BeeLongButton( + onPressed: () async { + if (_currentSelect == 9) { + _rechargeValue = 0; + Get.bottomSheet(_customValueDialog(_currentIndex == 0)); + } else { + Get.bottomSheet(PayWayDialog( + isBalance: _currentIndex == 0, + amount: _rechargeValue, + insufficientBalance: _rechargeValue > + (UserTool.userProvider.userInfoModel!.balance ?? 0))); + } + }, + text: '下一步'), + ), + ); + } + + Widget _balanceView() { + return GridView.count( + crossAxisCount: 3, + mainAxisSpacing: 20.w, + crossAxisSpacing: 20.w, + children: [ + ..._balanceValue + .mapIndexed((index, e) => _card(index, e, true)) + .toList(), + _customValueCard(9, true) + ], + ); + } + + Widget _pointView() { + return GridView.count( + mainAxisSpacing: 20.w, + crossAxisSpacing: 20.w, + crossAxisCount: 3, + children: [ + ..._pointValue + .mapIndexed((index, element) => _card(index, element, false)) + .toList(), + _customValueCard(9, false) + ], + ); + } + + Widget _card(int index, int value, bool isBalance) { + return GestureDetector( + onTap: () { + _currentSelect = index; + _rechargeValue = isBalance ? _balanceValue[index] : (_pointValue[index]~/10); + setState(() {}); + }, + child: Material( + color: Colors.transparent, + borderRadius: BorderRadius.circular(16.w), + child: Stack( + clipBehavior: Clip.antiAliasWithSaveLayer, + fit: StackFit.passthrough, + children: [ + Container( + width: 214.w, + height: 202.w, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(16.w), + color: + _currentSelect != index ? Color(0xFFF9F9F9) : Colors.black, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Offstage( + offstage: isBalance, + child: Assets.icons.intergral + .image(width: 48.w, height: 48.w)), + 8.hb, + '$value ' + .richText + .withTextSpanChildren([ + '${isBalance ? '元' : '积分'} ' + .textSpan + .size(26.sp) + .color(_currentSelect == index + ? Color(0xFFFBE541) + : Colors.black.withOpacity(0.85)) + .make(), + ]) + .color(_currentSelect == index + ? Color(0xFFFBE541) + : Colors.black.withOpacity(0.85)) + .size(40.w) + .make(), + 16.hb, + Offstage( + offstage: isBalance, + child: '${value ~/ 10}元' + .text + .size(26.sp) + .color(_currentSelect == index + ? Color(0xFFFBE541) + : Colors.black.withOpacity(0.85)) + .make(), + ), + ], + ), + ), + AnimatedPositioned( + bottom: 0, + right: 0, + child: Offstage( + offstage: _currentSelect != index, + child: ClipPath( + clipper: _TriangleClipPath(), + child: Container( + width: 40.w, + height: 48.w, + color: Color(0xFFFBE541), + child: Transform.translate( + offset: Offset(10.w, 12.w), + child: Icon( + CupertinoIcons.checkmark_alt, + size: 24.w, + ), + ), + ), + ), + ), + duration: Duration(microseconds: 500)) + ], + ), + ), + ); + } + + Widget _customValueCard(int index, bool isBalance) { + return GestureDetector( + onTap: () { + _currentSelect = index; + setState(() {}); + }, + child: Material( + color: Colors.transparent, + borderRadius: BorderRadius.circular(16.w), + child: Stack( + clipBehavior: Clip.antiAliasWithSaveLayer, + fit: StackFit.passthrough, + children: [ + Container( + width: 214.w, + height: 202.w, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(16.w), + color: + _currentSelect != index ? Color(0xFFF9F9F9) : Colors.black, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Offstage( + offstage: isBalance, + child: Assets.icons.intergral + .image(width: 48.w, height: 48.w)), + 8.hb, + '' + .richText + .withTextSpanChildren([ + '${isBalance ? '其他金额' : '其他积分'} ' + .textSpan + .size(26.sp) + .color(_currentSelect == index + ? Color(0xFFFBE541) + : Colors.black.withOpacity(0.85)) + .make(), + ]) + .color(_currentSelect == index + ? Color(0xFFFBE541) + : Colors.black.withOpacity(0.85)) + .size(40.w) + .make(), + 16.hb, + Offstage( + offstage: isBalance, + child: '自定义' + .text + .size(26.sp) + .color(_currentSelect == index + ? Color(0xFFFBE541) + : Colors.black.withOpacity(0.85)) + .make(), + ), + ], + ), + ), + AnimatedPositioned( + bottom: 0, + right: 0, + child: Offstage( + offstage: _currentSelect != index, + child: ClipPath( + clipper: _TriangleClipPath(), + child: Container( + width: 40.w, + height: 48.w, + color: Color(0xFFFBE541), + child: Transform.translate( + offset: Offset(10.w, 12.w), + child: Icon( + CupertinoIcons.checkmark_alt, + size: 24.w, + ), + ), + ), + ), + ), + duration: Duration(microseconds: 500)) + ], + ), + ), + ); + } + + Widget _customValueDialog(bool isBalance) { + return StatefulBuilder( + builder: (context, reSet) { + return Material( + color: Colors.transparent, + child: Container( + padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w), + width: double.infinity, + color: Colors.white, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + '${isBalance ? '充值金额' : '充值积分'}' + .text + .size(32.sp) + .bold + .isIntrinsic + .color(Colors.black.withOpacity(0.85)) + .make(), + 48.hb, + Container( + height: 88.w, + decoration: BoxDecoration( + color: Color(0xFFF5F5F5), + borderRadius: BorderRadius.circular(16.w)), + clipBehavior: Clip.antiAliasWithSaveLayer, + child: Row( + children: [ + 24.wb, + '¥' + .text + .size(24.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + 12.wb, + Expanded( + child: TextField( + autofocus: true, + onChanged: (text) { + if (text.trim().isNotEmpty) { + _rechargeValue = int.parse(text); + reSet(() {}); + } + }, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly + ], + keyboardType: TextInputType.number, + decoration: InputDecoration(border: InputBorder.none), + )), + Offstage( + offstage: isBalance, + child: Row( + children: [ + Assets.icons.intergral + .image(width: 32.w, height: 32.w), + 16.wb, + (_rechargeValue * 10) + .text + .size(32.sp) + .color(Colors.black.withOpacity(0.855)) + .make(), + 12.wb, + ], + ), + ), + GestureDetector( + onTap: () { + if (_rechargeValue == 0) { + BotToast.showText(text: '金额不能为0'); + return; + } + Get.back(); + Get.bottomSheet(PayWayDialog( + insufficientBalance: (UserTool.userProvider + .userInfoModel!.balance ?? + 0) < + _rechargeValue, + isBalance: isBalance, + amount: _rechargeValue)); + }, + child: Material( + child: Container( + width: 132.w, + color: Color(0xFFFBE541), + child: Center( + child: '去支付' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.85)) + .make(), + ), + ), + ), + ), + ], + ), + ) + ], + ), + ), + ); + }, + ); + } +} + +class _TriangleClipPath extends CustomClipper { + @override + Path getClip(Size size) { + Path path = Path(); + path.moveTo(0, size.height); + path.lineTo(size.width, size.height); + path.lineTo(size.width, 0 + 5.w); + path.lineTo(0, size.height); + path.close(); + return path; + } + + @override + bool shouldReclip(covariant CustomClipper oldClipper) { + return false; + } +} diff --git a/lib/pages/personal/wallet/wallet_trade_record_page.dart b/lib/pages/personal/wallet/wallet_trade_record_page.dart new file mode 100644 index 00000000..7018c1c0 --- /dev/null +++ b/lib/pages/personal/wallet/wallet_trade_record_page.dart @@ -0,0 +1,44 @@ +import 'package:aku_new_community/pages/personal/wallet/point_record_view.dart'; +import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'balance_record_view.dart'; + +class WalletTradeRecordPage extends StatefulWidget { + const WalletTradeRecordPage({Key? key}) : super(key: key); + + @override + _WalletTradeRecordPageState createState() => _WalletTradeRecordPageState(); +} + +class _WalletTradeRecordPageState extends State + with SingleTickerProviderStateMixin { + List _tabs = ['余额账单', '积分账单']; + late TabController _tabController; + + @override + void initState() { + _tabController = TabController(length: _tabs.length, vsync: this); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return BeeScaffold( + title: BeeTabBar( + controller: _tabController, + tabs: _tabs, + scrollable: true, + ), + body: TabBarView( + controller: _tabController, + children: [ + BalanceRecordView(), + PointRecordView(), + ], + ), + ); + } +} diff --git a/lib/pages/sign/login/code_message_page.dart b/lib/pages/sign/login/code_message_page.dart index 80539cae..6e321201 100644 --- a/lib/pages/sign/login/code_message_page.dart +++ b/lib/pages/sign/login/code_message_page.dart @@ -1,10 +1,12 @@ import 'package:aku_new_community/pages/sign/sign_func.dart'; +import 'package:aku_new_community/provider/clock_timer_provider.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:provider/provider.dart'; import 'package:sms_autofill/sms_autofill.dart'; import 'package:velocity_x/velocity_x.dart'; @@ -38,6 +40,7 @@ class _CodeMessagePageState extends State { @override Widget build(BuildContext context) { + ClockTimerProvider clockTimer = Provider.of(context); return BeeScaffold( title: '', body: SafeArea( @@ -115,14 +118,14 @@ class _CodeMessagePageState extends State { .communityModel!.id); if (base.success) { _errorMessage = null; - UserTool.appProvider.startTimer(); + clockTimer.startTimer(); } else { BotToast.showText(text: base.msg); } }, - child: (UserTool.appProvider.second >= 60 + child: (clockTimer.second >= 60 ? '重新发送验证码' - : '${UserTool.appProvider.second}秒后可重新发送') + : '${clockTimer.second}秒后可重新发送') .text .size(28.sp) .color(Color(0xFF5096F1)) diff --git a/lib/pages/sign/login/forgot_psd_page.dart b/lib/pages/sign/login/forgot_psd_page.dart index 020726d8..22042ee5 100644 --- a/lib/pages/sign/login/forgot_psd_page.dart +++ b/lib/pages/sign/login/forgot_psd_page.dart @@ -1,6 +1,7 @@ import 'package:aku_new_community/pages/sign/login/forgot_set_psd_page.dart'; import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart'; import 'package:aku_new_community/pages/sign/widget/tel_text_field.dart'; +import 'package:aku_new_community/provider/clock_timer_provider.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; @@ -8,6 +9,7 @@ import 'package:common_utils/common_utils.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; import '../sign_func.dart'; @@ -30,6 +32,7 @@ class _ForgotPsdPageState extends State { @override Widget build(BuildContext context) { + ClockTimerProvider clockTimer = Provider.of(context); return BeeScaffold( title: '', bodyColor: Colors.white, @@ -83,7 +86,7 @@ class _ForgotPsdPageState extends State { Get.to(() => ForgotSetPsdPage( tel: _telController.text, )); - UserTool.appProvider.startTimer(); + clockTimer.startTimer(); } else { BotToast.showText(text: base.msg); } diff --git a/lib/pages/sign/login/forgot_set_psd_page.dart b/lib/pages/sign/login/forgot_set_psd_page.dart index bc31c9cf..94677ed5 100644 --- a/lib/pages/sign/login/forgot_set_psd_page.dart +++ b/lib/pages/sign/login/forgot_set_psd_page.dart @@ -3,6 +3,7 @@ import 'package:aku_new_community/pages/sign/login/psd_verify.dart'; import 'package:aku_new_community/pages/sign/sign_func.dart'; import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart'; import 'package:aku_new_community/pages/sign/widget/psd_text_field.dart'; +import 'package:aku_new_community/provider/clock_timer_provider.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; @@ -10,6 +11,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; class ForgotSetPsdPage extends StatefulWidget { @@ -52,6 +54,7 @@ class _ForgotSetPsdPageState extends State { @override Widget build(BuildContext context) { + ClockTimerProvider clockTimer = Provider.of(context); return BeeScaffold( title: '', bodyColor: Colors.white, @@ -129,7 +132,7 @@ class _ForgotSetPsdPageState extends State { Get.to(() => ForgotSetPsdPage( tel: widget.tel, )); - UserTool.appProvider.startTimer(); + clockTimer.startTimer(); } else { BotToast.showText(text: base.msg); } @@ -137,7 +140,7 @@ class _ForgotSetPsdPageState extends State { child: Row( mainAxisSize: MainAxisSize.min, children: [ - '|${UserTool.appProvider.second < 60 ? '${UserTool.appProvider.second}秒后重新获取' : '获取验证码'}' + '|${clockTimer.second < 60 ? '${clockTimer.second}秒后重新获取' : '获取验证码'}' .text .size(28.sp) .color(Color(0xFF5096F1)) diff --git a/lib/pages/sign/login/other_login_page.dart b/lib/pages/sign/login/other_login_page.dart index 0071da3a..2739d0b8 100644 --- a/lib/pages/sign/login/other_login_page.dart +++ b/lib/pages/sign/login/other_login_page.dart @@ -6,6 +6,7 @@ import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart'; import 'package:aku_new_community/pages/sign/widget/psd_text_field.dart'; import 'package:aku_new_community/pages/sign/widget/tel_text_field.dart'; import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/provider/clock_timer_provider.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; @@ -153,7 +154,7 @@ class _OtherLoginPageState extends State { } Widget _verificationView() { - AppProvider appProvider = Provider.of(context); + ClockTimerProvider clockTimer = Provider.of(context); return ListView( padding: EdgeInsets.symmetric(horizontal: 32.w), children: [ @@ -170,7 +171,7 @@ class _OtherLoginPageState extends State { ), 100.w.heightBox, LoginButtonWidget( - onTap: UserTool.appProvider.second < 60 + onTap: clockTimer.second < 60 ? () {} : () async { var check = checkInput(); @@ -183,13 +184,13 @@ class _OtherLoginPageState extends State { .communityModel!.id); if (base.success) { Get.to(() => CodeMessagePage(tel: _tel.text)); - appProvider.startTimer(); + clockTimer.startTimer(); } else { BotToast.showText(text: base.msg); } }, - text: appProvider.timerStart - ? '${appProvider.second}秒后重新获取' + text: clockTimer.timerStart + ? '${clockTimer.second}秒后重新获取' : '获取验证码'), 24.w.heightBox, Row( diff --git a/lib/provider/app_provider.dart b/lib/provider/app_provider.dart index 6be5cc64..68f34fec 100644 --- a/lib/provider/app_provider.dart +++ b/lib/provider/app_provider.dart @@ -355,30 +355,7 @@ class AppProvider extends ChangeNotifier { notifyListeners(); } - ///登录页验证码计时器 - int second = 60; - bool timerStart = false; - Timer? timer; - - void startTimer() { - timerStart = true; - timer = Timer.periodic(Duration(seconds: 1), (timer) { - if (second > 0) { - second--; - notifyListeners(); - } else { - stopTimer(); - } - }); - } - void stopTimer() { - second = 60; - timerStart = false; - timer?.cancel(); - timer = null; - notifyListeners(); - } notifyListeners(); } diff --git a/lib/provider/clock_timer_provider.dart b/lib/provider/clock_timer_provider.dart new file mode 100644 index 00000000..aa33dd8b --- /dev/null +++ b/lib/provider/clock_timer_provider.dart @@ -0,0 +1,30 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; + +class ClockTimerProvider extends ChangeNotifier{ + ///登录页验证码计时器 + int second = 60; + bool timerStart = false; + Timer? timer; + + void startTimer() { + timerStart = true; + timer = Timer.periodic(Duration(seconds: 1), (timer) { + if (second > 0) { + second--; + notifyListeners(); + } else { + stopTimer(); + } + }); + } + + void stopTimer() { + second = 60; + timerStart = false; + timer?.cancel(); + timer = null; + notifyListeners(); + } +} \ No newline at end of file diff --git a/lib/widget/buttons/bee_check_radio.dart b/lib/widget/buttons/bee_check_radio.dart index 410399ba..c5f4b285 100644 --- a/lib/widget/buttons/bee_check_radio.dart +++ b/lib/widget/buttons/bee_check_radio.dart @@ -9,9 +9,15 @@ class BeeCheckRadio extends StatefulWidget { final List? groupValue; final Widget? indent; final Color? backColor; + final double? size; BeeCheckRadio( - {Key? key, this.value, this.groupValue, this.indent, this.backColor}) + {Key? key, + this.value, + this.groupValue, + this.indent, + this.backColor, + this.size}) : super(key: key); @override @@ -30,8 +36,8 @@ class _BeeCheckRadioState extends State { @override Widget build(BuildContext context) { return AnimatedContainer( - height: 40.w, - width: 40.w, + height: widget.size ?? 40.w, + width: widget.size ?? 40.w, decoration: BoxDecoration( color: widget.backColor ?? kPrimaryColor.withOpacity(_selected ? 1 : 0), border: Border.all( @@ -40,7 +46,7 @@ class _BeeCheckRadioState extends State { : (_selected ? kPrimaryColor : Color(0xFF979797)), width: 3.w, ), - borderRadius: BorderRadius.circular(20.w), + borderRadius: BorderRadius.circular((widget.size??40.w)/2), ), duration: Duration(milliseconds: 300), curve: Curves.easeInOutCubic, diff --git a/lib/widget/buttons/bee_long_button.dart b/lib/widget/buttons/bee_long_button.dart index 094c761a..e7cb7c98 100644 --- a/lib/widget/buttons/bee_long_button.dart +++ b/lib/widget/buttons/bee_long_button.dart @@ -8,13 +8,14 @@ class BeeLongButton extends StatelessWidget { final String text; final Color backColor; final BorderSide border; + final double? width; - const BeeLongButton({Key? key, required this.onPressed, required this.text}) + const BeeLongButton({Key? key, required this.onPressed, required this.text, this.width}) : backColor = kPrimaryColor, border = BorderSide.none, super(key: key); - BeeLongButton.white({Key? key, required this.onPressed, required this.text}) + BeeLongButton.white({Key? key, required this.onPressed, required this.text, this.width}) : backColor = Colors.white, border = BorderSide(color: Colors.black.withOpacity(0.45)), super(key: key); @@ -24,6 +25,7 @@ class BeeLongButton extends StatelessWidget { return MaterialButton( elevation: 0, height: 93.w, + minWidth: width, disabledColor: Colors.black.withOpacity(0.06), disabledTextColor: Colors.black.withOpacity(0.25), textColor: Colors.black.withOpacity(0.85), diff --git a/lib/widget/picker/bee_date_picker.dart b/lib/widget/picker/bee_date_picker.dart index 15b0be1b..93ab0871 100644 --- a/lib/widget/picker/bee_date_picker.dart +++ b/lib/widget/picker/bee_date_picker.dart @@ -1,3 +1,4 @@ +import 'package:aku_new_community/widget/picker/bee_month_pick_body.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -7,8 +8,7 @@ import 'package:velocity_x/velocity_x.dart'; import 'package:aku_new_community/widget/picker/bee_custom_picker.dart'; class BeeDatePicker { - static Future pick( - DateTime initDate, { + static Future pick(DateTime initDate, { CupertinoDatePickerMode mode = CupertinoDatePickerMode.date, DateTime? min, DateTime? max, @@ -29,6 +29,12 @@ class BeeDatePicker { mode: CupertinoDatePickerMode.dateAndTime, )); } + + static Future monthPicker(DateTime initDate) async { + return await Get.bottomSheet( + BeeMonthPickBody(initTime: initDate) + ); + } } class _BeeDatePicker extends StatefulWidget { diff --git a/lib/widget/picker/bee_month_pick_body.dart b/lib/widget/picker/bee_month_pick_body.dart new file mode 100644 index 00000000..9dd5e5a9 --- /dev/null +++ b/lib/widget/picker/bee_month_pick_body.dart @@ -0,0 +1,111 @@ +import 'package:aku_new_community/saas_model/login/china_region_model.dart'; +import 'package:aku_new_community/saas_model/login/picked_city_model.dart'; +import 'package:aku_new_community/utils/hive_store.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +import 'bee_picker_box.dart'; + +class BeeMonthPickBody extends StatefulWidget { + final DateTime initTime; + + BeeMonthPickBody({Key? key, required this.initTime}) : super(key: key); + + @override + _BeeMonthPickBodyState createState() => _BeeMonthPickBodyState(); +} + +class _BeeMonthPickBodyState extends State { + final FixedExtentScrollController _yearController = + FixedExtentScrollController(); + final FixedExtentScrollController _monthController = + FixedExtentScrollController(); + DateTime get _pickedTime => DateTime(_pickYear,_pickMonth) ; + + List get _years => List.generate( + DateTime.now().year - widget.initTime.year+1, + (index) => widget.initTime.year + index); + late int _pickYear; + late int _pickMonth; + + List get _months => List.generate( + _pickYear == DateTime.now().year ? DateTime.now().month : 12, + (index) => index + 1); + + @override + void initState() { + _pickYear = widget.initTime.year; + _pickMonth = 1; + super.initState(); + } + + @override + void dispose() { + _yearController.dispose(); + _monthController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return BeePickerBox( + onPressed: () { + Navigator.pop(context, _pickedTime); + }, + child: Row( + children: [ + Expanded( + child: CupertinoPicker( + itemExtent: 80.w, + magnification: 1.0, + looping: false, + scrollController: _yearController, + onSelectedItemChanged: (index) { + _pickYear = _years[index]; + _pickMonth = 1; + setState(() {}); + }, + children: _years + .map((e) => Center( + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 20.w), + child: + Text(e.toString()+'年', textAlign: TextAlign.center), + ), + )) + .toList()), + ), + Expanded( + child: CupertinoPicker( + itemExtent: 80.w, + magnification: 1.0, + // offAxisFraction: 0.6, + looping: true, + scrollController: _monthController, + onSelectedItemChanged: (index) { + _pickMonth = _months[index]; + setState(() {}); + }, + children: _months.isEmpty + ? [Container()] + : _months + .map((e) => Center( + child: Padding( + padding: EdgeInsets.only( + left: 20.w, + right: 20.w, + top: 10.w, + bottom: 10.w), + child: Text(e.toString()+'月', + textAlign: TextAlign.center), + ), + )) + .toList(), + ), + ), + ], + ), + ); + } +} diff --git a/pubspec.lock b/pubspec.lock index 1a6974c6..d4e08ca8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,252 +5,252 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "38.0.0" advance_pdf_viewer: dependency: "direct main" description: name: advance_pdf_viewer - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" amap_flutter_base: dependency: "direct main" description: name: amap_flutter_base - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" amap_flutter_location: dependency: "direct main" description: name: amap_flutter_location - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" amap_flutter_map: dependency: "direct main" description: name: amap_flutter_map - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.4.1" animated_text_kit: dependency: "direct main" description: name: animated_text_kit - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.2.1" archive: dependency: transitive description: name: archive - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.3.0" args: dependency: transitive description: name: args - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.3.0" async: dependency: transitive description: name: async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.8.2" audio_session: dependency: transitive description: name: audio_session - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.6+1" auto_size_text_pk: dependency: transitive description: name: auto_size_text_pk - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" badges: dependency: "direct main" description: name: badges - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" bot_toast: dependency: "direct main" description: name: bot_toast - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.1" build: dependency: transitive description: name: build - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.2.1" + version: "2.3.0" build_config: dependency: transitive description: name: build_config - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" build_daemon: dependency: transitive description: name: build_daemon - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.1.0" build_resolvers: dependency: transitive description: name: build_resolvers - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.8" build_runner: dependency: "direct dev" description: name: build_runner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.1.8" + version: "2.1.10" build_runner_core: dependency: transitive description: name: build_runner_core - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "7.2.3" built_collection: dependency: transitive description: name: built_collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.1.1" built_value: dependency: transitive description: name: built_value - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "8.1.4" + version: "8.2.0" cached_network_image: dependency: "direct main" description: name: cached_network_image - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.2.0" cached_network_image_platform_interface: dependency: transitive description: name: cached_network_image_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" cached_network_image_web: dependency: transitive description: name: cached_network_image_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" card_swiper: dependency: "direct main" description: name: card_swiper - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.3" carousel_slider: dependency: "direct main" description: name: carousel_slider - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.0" characters: dependency: transitive description: name: characters - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.1" checked_yaml: dependency: transitive description: name: checked_yaml - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" cli_util: dependency: transitive description: name: cli_util - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.3.5" clock: dependency: transitive description: name: clock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" code_builder: dependency: transitive description: name: code_builder - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.1.0" collection: dependency: "direct main" description: name: collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.15.0" color: dependency: transitive description: name: color - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" common_utils: @@ -266,154 +266,154 @@ packages: dependency: transitive description: name: convert - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.1" cross_file: dependency: transitive description: name: cross_file - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.3.2" crypto: dependency: transitive description: name: crypto - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.1" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.4" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.2.2" + version: "2.2.3" dartx: dependency: transitive description: name: dartx - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" decimal: dependency: transitive description: name: decimal - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" device_info_plus: dependency: transitive description: name: device_info_plus - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" device_info_plus_linux: dependency: transitive description: name: device_info_plus_linux - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.1" device_info_plus_macos: dependency: transitive description: name: device_info_plus_macos - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.2.2" + version: "2.2.3" device_info_plus_platform_interface: dependency: transitive description: name: device_info_plus_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.3.0+1" device_info_plus_web: dependency: transitive description: name: device_info_plus_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" device_info_plus_windows: dependency: transitive description: name: device_info_plus_windows - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.1" dio: dependency: "direct main" description: name: dio - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.6" dotted_border: dependency: "direct main" description: name: dotted_border - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0+2" equatable: dependency: "direct main" description: name: equatable - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.3" expandable: dependency: "direct main" description: name: expandable - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.0.1" extended_list_library: dependency: transitive description: name: extended_list_library - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" ffi: dependency: transitive description: name: ffi - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.2" file: dependency: transitive description: name: file - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "6.1.2" fixnum: dependency: transitive description: name: fixnum - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" flutter: @@ -425,42 +425,42 @@ packages: dependency: transitive description: name: flutter_blurhash - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "0.6.4" + version: "0.6.6" flutter_cache_manager: dependency: transitive description: name: flutter_cache_manager - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.3.0" flutter_easyrefresh: dependency: "direct main" description: name: flutter_easyrefresh - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.1" flutter_gen_core: dependency: transitive description: name: flutter_gen_core - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.1.6" flutter_gen_runner: dependency: "direct dev" description: name: flutter_gen_runner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.1.6" flutter_highlight: dependency: transitive description: name: flutter_highlight - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.7.0" flutter_icons: @@ -481,51 +481,51 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.5" flutter_rating_bar: dependency: "direct main" description: name: flutter_rating_bar - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.0" flutter_screenutil: dependency: "direct main" description: name: flutter_screenutil - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "5.3.1" + version: "5.4.0" flutter_slidable: dependency: "direct main" description: name: flutter_slidable - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.0" flutter_sound: dependency: "direct main" description: name: flutter_sound - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "9.1.9" + version: "9.2.2" flutter_sound_platform_interface: dependency: transitive description: name: flutter_sound_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "9.1.9" + version: "9.2.2" flutter_sound_web: dependency: transitive description: name: flutter_sound_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "9.1.9" + version: "9.2.2" flutter_test: dependency: "direct dev" description: flutter @@ -540,504 +540,504 @@ packages: dependency: "direct main" description: name: fluwx - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "3.8.2+1" + version: "3.8.4" frontend_server_client: dependency: transitive description: name: frontend_server_client - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.2" get: dependency: "direct main" description: name: get - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.6.1" glob: dependency: transitive description: name: glob - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" graphs: dependency: transitive description: name: graphs - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" grinder: dependency: "direct dev" description: name: grinder - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.9.1" highlight: dependency: transitive description: name: highlight - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.7.0" hive: dependency: "direct main" description: name: hive - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" hive_flutter: dependency: "direct main" description: name: hive_flutter - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" hive_generator: dependency: "direct dev" description: name: hive_generator - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.2" http: dependency: transitive description: name: http - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.13.4" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.2.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.0" image: dependency: transitive description: name: image - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.3" image_picker: dependency: "direct main" description: name: image_picker - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.7.5+4" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.6" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.4.4" import_sorter: dependency: "direct dev" description: name: import_sorter - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.6.0" infinite_listview: dependency: transitive description: name: infinite_listview - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" intl: dependency: "direct main" description: name: intl - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.17.0" io: dependency: transitive description: name: io - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.3" jpush_flutter: dependency: "direct main" description: name: jpush_flutter - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.2.4" + version: "2.2.5" js: dependency: transitive description: name: js - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.3" json_annotation: dependency: "direct main" description: name: json_annotation - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.4.0" json_serializable: dependency: "direct dev" description: name: json_serializable - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "6.1.5" + version: "6.1.6" just_audio: dependency: "direct main" description: name: just_audio - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.9.20" just_audio_platform_interface: dependency: transitive description: name: just_audio_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.1.0" just_audio_web: dependency: transitive description: name: just_audio_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.4.7" like_button: dependency: "direct main" description: name: like_button - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.4" logger: dependency: transitive description: name: logger - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" logging: dependency: transitive description: name: logging - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.2" matcher: dependency: transitive description: name: matcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.11" meta: dependency: transitive description: name: meta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.7.0" mime: dependency: transitive description: name: mime - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" nested: dependency: transitive description: name: nested - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" numberpicker: dependency: transitive description: name: numberpicker - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.1" octo_image: dependency: transitive description: name: octo_image - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" open_file: dependency: "direct main" description: name: open_file - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.2.1" package_config: dependency: transitive description: name: package_config - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" package_info: dependency: "direct main" description: name: package_info - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" package_info_plus: dependency: transitive description: name: package_info_plus - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.4.2" package_info_plus_linux: dependency: transitive description: name: package_info_plus_linux - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.5" package_info_plus_macos: dependency: transitive description: name: package_info_plus_macos - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.2" package_info_plus_web: dependency: transitive description: name: package_info_plus_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.5" package_info_plus_windows: dependency: transitive description: name: package_info_plus_windows - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.5" path: dependency: transitive description: name: path - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" path_drawing: dependency: transitive description: name: path_drawing - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" path_parsing: dependency: transitive description: name: path_parsing - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" path_provider: dependency: "direct main" description: name: path_provider - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.9" path_provider_android: dependency: transitive description: name: path_provider_android - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.12" path_provider_ios: dependency: transitive description: name: path_provider_ios - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.8" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.5" path_provider_macos: dependency: transitive description: name: path_provider_macos - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.5" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.3" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.5" pedantic: dependency: transitive description: name: pedantic - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.11.1" permission_handler: dependency: "direct main" description: name: permission_handler - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "7.2.0" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.7.0" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.4.0" pin_input_text_field: dependency: transitive description: name: pin_input_text_field - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.1.2" platform: dependency: transitive description: name: platform - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.2" pool: dependency: transitive description: name: pool - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.5.0" power_logger: dependency: "direct main" description: name: power_logger - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.2" process: dependency: transitive description: name: process - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.2.4" provider: dependency: "direct main" description: name: provider - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "6.0.2" pub_semver: dependency: "direct dev" description: name: pub_semver - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.1" pubspec_parse: dependency: transitive description: name: pubspec_parse - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" qr: dependency: transitive description: name: qr - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" qr_code_scanner: dependency: "direct main" description: name: qr_code_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.4.0" qr_flutter: dependency: "direct main" description: name: qr_flutter - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.0" random_character: @@ -1053,63 +1053,63 @@ packages: dependency: transitive description: name: rational - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" recase: dependency: transitive description: name: recase - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.0.0" rxdart: dependency: transitive description: name: rxdart - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.27.3" scroll_to_index: dependency: "direct main" description: name: scroll_to_index - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.1" share: dependency: "direct main" description: name: share - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.4" shelf: dependency: transitive description: name: shelf - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" shimmer: dependency: "direct main" description: name: shimmer - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" signature: dependency: "direct main" description: name: signature - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.1.1" sky_engine: @@ -1121,259 +1121,259 @@ packages: dependency: "direct main" description: name: sms_autofill - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" source_gen: dependency: transitive description: name: source_gen - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "1.2.2" source_helper: dependency: transitive description: name: source_helper - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "1.3.1" + version: "1.3.2" source_span: dependency: transitive description: name: source_span - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.1" sqflite: dependency: transitive description: name: sqflite - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" sqflite_common: dependency: transitive description: name: sqflite_common - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" synchronized: dependency: transitive description: name: synchronized - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0+2" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.4.3" time: dependency: transitive description: name: time - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" timing: dependency: transitive description: name: timing - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" tint: dependency: transitive description: name: tint - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" tobias: dependency: "direct main" description: name: tobias - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.4.0+2" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" url_launcher: dependency: "direct main" description: name: url_launcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "6.0.20" url_launcher_android: dependency: transitive description: name: url_launcher_android - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "6.0.15" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "6.0.15" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.5" url_launcher_web: dependency: transitive description: name: url_launcher_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.6" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" uuid: dependency: transitive description: name: uuid - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.6" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.1" velocity_x: dependency: "direct main" description: name: velocity_x - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.4.0" vxstate: dependency: transitive description: name: vxstate - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" watcher: dependency: transitive description: name: watcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" waterfall_flow: dependency: "direct main" description: name: waterfall_flow - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.2" web_socket_channel: dependency: "direct main" description: name: web_socket_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" win32: dependency: transitive description: name: win32 - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.5.1" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.0+1" xml: dependency: transitive description: name: xml - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.3.1" yaml: dependency: "direct dev" description: name: yaml - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.0" sdks: diff --git a/tool/config.dart b/tool/config.dart index 80e38aff..36daa606 100644 --- a/tool/config.dart +++ b/tool/config.dart @@ -1,19 +1,19 @@ class Config { ///用户根目录 - static const String homeDir = 'G:\\apk'; + static const String homeDir = '/users/zhangmeng'; ///包名 static const String packageName = 'aku_new_community'; ///打包目录 static String get buildPath => - '\\build\\app\\outputs\\flutter-apk\\app-release.apk'; + './build/app/outputs/flutter-apk/app-release.apk'; ///测试包文件夹 static String get apkDevDir => - '$homeDir\\aku_new_community\\dev'; + '$homeDir/team/bee/aku_new_community_manager/dev'; ///正式包文件夹 static String get apkDir => - '$homeDir\\aku_new_community\\release'; + '$homeDir/team/bee/aku_new_community_manager/release'; } From 6195daa49cf4ba32d47b3a30d3a862bd5b04f897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=90=8C?= <494089941@qq.com> Date: Wed, 20 Apr 2022 20:15:18 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E4=BB=8B=E7=BB=8D?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/constants/saas_api.dart | 12 +++++++++++ .../community_introduce_model.dart | 20 +++++++------------ .../community_introduce_model.g.dart | 2 -- .../community_introduce_page.dart | 2 +- .../task/publish_task_page.dart | 1 - lib/utils/application_utils.dart | 4 ++-- 6 files changed, 22 insertions(+), 19 deletions(-) diff --git a/lib/constants/saas_api.dart b/lib/constants/saas_api.dart index bbdd5708..e3110241 100644 --- a/lib/constants/saas_api.dart +++ b/lib/constants/saas_api.dart @@ -37,6 +37,8 @@ class SAASAPI { static _Pay pay = _Pay(); static _LifePay lifePay = _LifePay(); static _Balance balance = _Balance(); + static _CommunityIntroduce communityIntroduce = _CommunityIntroduce(); + static _ConveniencePhone conveniencePhone = _ConveniencePhone(); ///二级分类 static _ProfileApi profile = _ProfileApi(); @@ -340,3 +342,13 @@ class _Balance { ///app用户交易记录 String get tradeRecordList => '/app/user/tradeRecord/tradeRecordList'; } + +class _CommunityIntroduce { + ///社区介绍 + String get info => '/app/user/communityIntroduction/introductionInfo'; +} + +class _ConveniencePhone { + ///查询app便民电话 + String get list => '/app/user/conveniencePhone/list'; +} diff --git a/lib/models/community_introduce/community_introduce_model.dart b/lib/models/community_introduce/community_introduce_model.dart index d7cbc9bd..98f8f983 100644 --- a/lib/models/community_introduce/community_introduce_model.dart +++ b/lib/models/community_introduce/community_introduce_model.dart @@ -7,34 +7,28 @@ part 'community_introduce_model.g.dart'; @JsonSerializable() class CommunityIontroduceModel extends Equatable { - final int id; final String name; final String content; - final String createDate; final List? imgList; - CommunityIontroduceModel({ - required this.id, - required this.name, - required this.content, - required this.createDate, - this.imgList, - }); - factory CommunityIontroduceModel.fromJson(Map json) => _$CommunityIontroduceModelFromJson(json); factory CommunityIontroduceModel.init() => - CommunityIontroduceModel(id: -1, name: '', content: '', createDate: ''); + CommunityIontroduceModel(name: '', content: '', imgList: []); @override List get props { return [ - id, name, content, - createDate, imgList, ]; } + + const CommunityIontroduceModel({ + required this.name, + required this.content, + this.imgList, + }); } diff --git a/lib/models/community_introduce/community_introduce_model.g.dart b/lib/models/community_introduce/community_introduce_model.g.dart index 4b874e03..cb4e3805 100644 --- a/lib/models/community_introduce/community_introduce_model.g.dart +++ b/lib/models/community_introduce/community_introduce_model.g.dart @@ -9,10 +9,8 @@ part of 'community_introduce_model.dart'; CommunityIontroduceModel _$CommunityIontroduceModelFromJson( Map json) => CommunityIontroduceModel( - id: json['id'] as int, name: json['name'] as String, content: json['content'] as String, - createDate: json['createDate'] as String, imgList: (json['imgList'] as List?) ?.map((e) => ImgModel.fromJson(e as Map)) .toList(), diff --git a/lib/pages/community_introduce/community_introduce_page.dart b/lib/pages/community_introduce/community_introduce_page.dart index 05e95dbf..9e5a00d3 100644 --- a/lib/pages/community_introduce/community_introduce_page.dart +++ b/lib/pages/community_introduce/community_introduce_page.dart @@ -33,7 +33,7 @@ class _CommunityIntroducePageState extends State { header: MaterialHeader(), onRefresh: () async { BaseModel baseModel = - await NetUtil().get(API.manager.communityIntroduceInfo); + await NetUtil().get(SAASAPI.communityIntroduce.info); if (baseModel.success && baseModel.data != null) { _model = CommunityIontroduceModel.fromJson(baseModel.data); } diff --git a/lib/ui/function_and_service/task/publish_task_page.dart b/lib/ui/function_and_service/task/publish_task_page.dart index 90d959fc..ae2e9a86 100644 --- a/lib/ui/function_and_service/task/publish_task_page.dart +++ b/lib/ui/function_and_service/task/publish_task_page.dart @@ -130,7 +130,6 @@ class _PublishTaskPageState extends State { BotToast.showText(text: base.msg); } } catch (e) { - print(22222); print(e.toString()); } } diff --git a/lib/utils/application_utils.dart b/lib/utils/application_utils.dart index 92dd6e52..df6f6d29 100644 --- a/lib/utils/application_utils.dart +++ b/lib/utils/application_utils.dart @@ -170,8 +170,8 @@ class ApplicationUtil { title: '社区介绍', imgPath: Assets.newIcon.icSqjs.path, onTap: () { - BotToast.showText(text: '此功能升级中,敬请期待'); - return; + // BotToast.showText(text: '此功能升级中,敬请期待'); + // return; Get.to(() => CommunityIntroducePage()); }), // AppElement('家政服务', R.ASSETS_ICONS_FUNC_JZFW_PNG, () => HouseKeepingPage()), From c5feb7e9b72566c2209dc604ec25b769399b7ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=90=8C?= <494089941@qq.com> Date: Wed, 20 Apr 2022 20:39:19 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E4=BE=BF=E6=B0=91=E7=94=B5=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/model/user/convenient_phone_model.dart | 21 ----- .../convenience_phone_model.dart | 26 ++++++ .../convenience_phone_model.g.dart | 16 ++++ .../convenient_phone_page.dart | 80 ++++++++++--------- .../personal/wallet/balance_record_view.dart | 3 + .../personal/wallet/point_record_view.dart | 6 +- lib/utils/application_utils.dart | 4 - 7 files changed, 92 insertions(+), 64 deletions(-) delete mode 100644 lib/model/user/convenient_phone_model.dart create mode 100644 lib/models/convenience_phone/convenience_phone_model.dart create mode 100644 lib/models/convenience_phone/convenience_phone_model.g.dart diff --git a/lib/model/user/convenient_phone_model.dart b/lib/model/user/convenient_phone_model.dart deleted file mode 100644 index dd99cf34..00000000 --- a/lib/model/user/convenient_phone_model.dart +++ /dev/null @@ -1,21 +0,0 @@ -class ConvenientPhoneModel { - int? id; - String? name; - String? tel; - - ConvenientPhoneModel({this.id, this.name, this.tel}); - - ConvenientPhoneModel.fromJson(Map json) { - id = json['id']; - name = json['name']; - tel = json['tel']; - } - - Map toJson() { - final Map data = new Map(); - data['id'] = this.id; - data['name'] = this.name; - data['tel'] = this.tel; - return data; - } -} diff --git a/lib/models/convenience_phone/convenience_phone_model.dart b/lib/models/convenience_phone/convenience_phone_model.dart new file mode 100644 index 00000000..a0288753 --- /dev/null +++ b/lib/models/convenience_phone/convenience_phone_model.dart @@ -0,0 +1,26 @@ +import 'package:json_annotation/json_annotation.dart'; +import 'package:equatable/equatable.dart'; + +part 'convenience_phone_model.g.dart'; + + +@JsonSerializable() +class ConveniencePhoneModel extends Equatable { + final int id; + final String name; + final String tel; + final int type; + + factory ConveniencePhoneModel.fromJson(Map json) => + _$ConveniencePhoneModelFromJson(json); + + const ConveniencePhoneModel({ + required this.id, + required this.name, + required this.tel, + required this.type, + }); + + @override + List get props => [id, name, tel, type,]; +} \ No newline at end of file diff --git a/lib/models/convenience_phone/convenience_phone_model.g.dart b/lib/models/convenience_phone/convenience_phone_model.g.dart new file mode 100644 index 00000000..e09ab5c1 --- /dev/null +++ b/lib/models/convenience_phone/convenience_phone_model.g.dart @@ -0,0 +1,16 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'convenience_phone_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ConveniencePhoneModel _$ConveniencePhoneModelFromJson( + Map json) => + ConveniencePhoneModel( + id: json['id'] as int, + name: json['name'] as String, + tel: json['tel'] as String, + type: json['type'] as int, + ); diff --git a/lib/pages/convenient_phone/convenient_phone_page.dart b/lib/pages/convenient_phone/convenient_phone_page.dart index 0e954537..6c03a7ed 100644 --- a/lib/pages/convenient_phone/convenient_phone_page.dart +++ b/lib/pages/convenient_phone/convenient_phone_page.dart @@ -1,7 +1,7 @@ import 'package:aku_new_community/const/resource.dart'; -import 'package:aku_new_community/constants/api.dart'; -import 'package:aku_new_community/model/user/convenient_phone_model.dart'; -import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart'; +import 'package:aku_new_community/constants/saas_api.dart'; +import 'package:aku_new_community/models/convenience_phone/convenience_phone_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -19,8 +19,10 @@ class ConvenientPhonePage extends StatefulWidget { } class _ConvenientPhonePageState extends State { - EasyRefreshController? _easyRefreshController; - TextEditingController? _textEditingController; + late EasyRefreshController _easyRefreshController; + late TextEditingController _textEditingController; + + List _models = []; @override void initState() { @@ -31,12 +33,12 @@ class _ConvenientPhonePageState extends State { @override void dispose() { - _easyRefreshController?.dispose(); - _textEditingController?.dispose(); + _easyRefreshController.dispose(); + _textEditingController.dispose(); super.dispose(); } - Widget _buildTile(ConvenientPhoneModel model) { + Widget _buildTile(ConveniencePhoneModel model) { return Column( children: [ Row( @@ -45,9 +47,9 @@ class _ConvenientPhonePageState extends State { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - model.name!.text.black.size(32.sp).make(), + model.name.text.black.size(32.sp).make(), 12.w.heightBox, - model.tel!.text.color(Color(0xFF999999)).size(28.sp).make(), + model.tel.text.color(Color(0xFF999999)).size(28.sp).make(), ], ).expand(), IconButton( @@ -58,7 +60,7 @@ class _ConvenientPhonePageState extends State { ), onPressed: () async { bool? result = await Get.dialog(CupertinoAlertDialog( - title: model.tel!.text.isIntrinsic.make(), + title: '是否拨打电话 ${model.tel}'.text.isIntrinsic.make(), actions: [ CupertinoDialogAction( child: '取消'.text.isIntrinsic.make(), @@ -99,8 +101,8 @@ class _ConvenientPhonePageState extends State { ), child: TextField( controller: _textEditingController, - onSubmitted: (value) { - _easyRefreshController!.callRefresh(); + onChanged: (value) { + _easyRefreshController.callRefresh(); setState(() {}); }, decoration: InputDecoration( @@ -119,32 +121,36 @@ class _ConvenientPhonePageState extends State { ), ), Expanded( - child: BeeListView( - extraParams: {'name': _textEditingController!.text}, + child: EasyRefresh( + firstRefresh: true, + header: MaterialHeader(), controller: _easyRefreshController, - path: API.manager.convenientPhone, - convert: (model) { - return model.rows - .map((e) => ConvenientPhoneModel.fromJson(e)) - .toList(); - }, - builder: (items) { - return ListView.separated( - padding: - EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w), - itemBuilder: (context, index) { - return _buildTile(items[index]); - }, - separatorBuilder: (context, index) { - return Divider( - thickness: 1.w, - height: 40.w, - color: Color(0xFFD8D8D8), - ); - }, - itemCount: items.length, - ); + onRefresh: () async { + var base = + await NetUtil().get(SAASAPI.conveniencePhone.list, params: { + 'name': _textEditingController.text, + }); + if (base.success) { + _models = (base.data as List) + .map((e) => ConveniencePhoneModel.fromJson(e)) + .toList(); + } + setState(() {}); }, + child: ListView.separated( + padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w), + itemBuilder: (context, index) { + return _buildTile(_models[index]); + }, + separatorBuilder: (context, index) { + return Divider( + thickness: 1.w, + height: 40.w, + color: Color(0xFFD8D8D8), + ); + }, + itemCount: _models.length, + ), ), ), ], diff --git a/lib/pages/personal/wallet/balance_record_view.dart b/lib/pages/personal/wallet/balance_record_view.dart index 019f7d05..0a3a4fe4 100644 --- a/lib/pages/personal/wallet/balance_record_view.dart +++ b/lib/pages/personal/wallet/balance_record_view.dart @@ -146,6 +146,8 @@ class _BalanceRecordViewState extends State { _models = baseList.rows .map((e) => TradeRecordListModel.fromJson(e)) .toList(); + + setState(() {}); }, onLoad: () async { _pageNum++; @@ -164,6 +166,7 @@ class _BalanceRecordViewState extends State { } else { _refreshController.finishLoad(noMore: true); } + setState(() {}); }, child: ListView( padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w), diff --git a/lib/pages/personal/wallet/point_record_view.dart b/lib/pages/personal/wallet/point_record_view.dart index a5a38329..d3e8bf54 100644 --- a/lib/pages/personal/wallet/point_record_view.dart +++ b/lib/pages/personal/wallet/point_record_view.dart @@ -146,6 +146,7 @@ class _PointRecordViewState extends State { _models = baseList.rows .map((e) => TradeRecordListModel.fromJson(e)) .toList(); + setState(() {}); }, onLoad: () async { _pageNum++; @@ -164,6 +165,7 @@ class _PointRecordViewState extends State { } else { _refreshController.finishLoad(noMore: true); } + setState(() {}); }, child: ListView( padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w), @@ -193,8 +195,8 @@ class _PointRecordViewState extends State { .text .size(28.sp) .color(incom(model.type) - ? Colors.red - : Colors.black.withOpacity(0.85)) + ? Colors.red + : Colors.black.withOpacity(0.85)) .make(), ], ), diff --git a/lib/utils/application_utils.dart b/lib/utils/application_utils.dart index df6f6d29..1d61f98a 100644 --- a/lib/utils/application_utils.dart +++ b/lib/utils/application_utils.dart @@ -81,8 +81,6 @@ class ApplicationUtil { title: '便民电话', imgPath: Assets.newIcon.imgBmdh.path, onTap: () { - BotToast.showText(text: '此功能暂未上线'); - return; Get.to(() => ConvenientPhonePage()); }), AppElement( @@ -170,8 +168,6 @@ class ApplicationUtil { title: '社区介绍', imgPath: Assets.newIcon.icSqjs.path, onTap: () { - // BotToast.showText(text: '此功能升级中,敬请期待'); - // return; Get.to(() => CommunityIntroducePage()); }), // AppElement('家政服务', R.ASSETS_ICONS_FUNC_JZFW_PNG, () => HouseKeepingPage()), From 11172fd6a24fee7db0ad0413687cdffed2dff63d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=90=8C?= <494089941@qq.com> Date: Wed, 20 Apr 2022 20:48:01 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E5=9C=B0=E7=90=86=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../geograhic_information.dart | 73 ------------ .../geographic_information_page.dart | 109 +++++++++--------- lib/utils/application_utils.dart | 4 +- 3 files changed, 54 insertions(+), 132 deletions(-) delete mode 100644 lib/pages/geographic_information/geograhic_information.dart diff --git a/lib/pages/geographic_information/geograhic_information.dart b/lib/pages/geographic_information/geograhic_information.dart deleted file mode 100644 index 6707b934..00000000 --- a/lib/pages/geographic_information/geograhic_information.dart +++ /dev/null @@ -1,73 +0,0 @@ -import 'package:aku_new_community/base/base_style.dart'; -import 'package:aku_new_community/const/resource.dart'; -import 'package:aku_new_community/constants/api.dart'; -import 'package:aku_new_community/constants/saas_api.dart'; -import 'package:aku_new_community/model/common/img_model.dart'; -import 'package:aku_new_community/models/geographic_information/geographic_information_model.dart'; -import 'package:aku_new_community/utils/network/base_model.dart'; -import 'package:aku_new_community/utils/network/net_util.dart'; -import 'package:aku_new_community/widget/bee_scaffold.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:velocity_x/velocity_x.dart'; - -class GeographicInformationPage extends StatefulWidget { - GeographicInformationPage({ - Key? key, - }) : super(key: key); - - @override - _GeographicInformationPageState createState() => - _GeographicInformationPageState(); -} - -class _GeographicInformationPageState extends State { - GeographicInformationModel _model = GeographicInformationModel.init(); - bool _onload = true; - - @override - Widget build(BuildContext context) { - return BeeScaffold( - bodyColor: Colors.white, - title: '地理信息', - body: EasyRefresh( - firstRefresh: true, - header: MaterialHeader(), - onRefresh: () async { - BaseModel baseModel = - await NetUtil().get(API.manager.geographyInformation); - if (baseModel.success && baseModel.data != null) { - _model = GeographicInformationModel.fromJson(baseModel.data); - } - _onload = false; - setState(() {}); - }, - child: _onload - ? Container() - : ListView( - children: [ - SizedBox( - child: FadeInImage.assetNetwork( - placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - fit: BoxFit.cover, - image: SAASAPI.image(ImgModel.first(_model.imgUrls))), - width: double.infinity, - height: 424.w, - ), - 24.w.heightBox, - Padding( - padding: - EdgeInsets.only(left: 32.w, right: 32.w, top: 40.w), - child: Text( - _model.content ?? '', - style: TextStyle( - fontSize: 26.sp, - color: (ktextSubColor), - fontWeight: FontWeight.bold), - )), - ], - ), - )); - } -} diff --git a/lib/pages/geographic_information/geographic_information_page.dart b/lib/pages/geographic_information/geographic_information_page.dart index 63196d11..1437da76 100644 --- a/lib/pages/geographic_information/geographic_information_page.dart +++ b/lib/pages/geographic_information/geographic_information_page.dart @@ -1,73 +1,70 @@ -import 'package:aku_new_community/base/base_style.dart'; -import 'package:aku_new_community/const/resource.dart'; import 'package:aku_new_community/constants/api.dart'; -import 'package:aku_new_community/constants/saas_api.dart'; -import 'package:aku_new_community/model/common/img_model.dart'; -import 'package:aku_new_community/models/geographic_information/geographic_information_model.dart'; -import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/pages/one_alarm/alarm_detail_page.dart'; +import 'package:aku_new_community/pages/one_alarm/widget/alarm_page.dart'; +import 'package:aku_new_community/provider/app_provider.dart'; +import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart'; +import 'package:amap_flutter_base/amap_flutter_base.dart'; +import 'package:amap_flutter_map/amap_flutter_map.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_easyrefresh/easy_refresh.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:velocity_x/velocity_x.dart'; +import 'package:flutter_icons/flutter_icons.dart'; +import 'package:get/get.dart'; +import 'package:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; + class GeographicInformationPage extends StatefulWidget { - GeographicInformationPage({ - Key? key, - }) : super(key: key); + GeographicInformationPage({Key? key}) : super(key: key); @override - _GeographicInformationPageState createState() => - _GeographicInformationPageState(); + _GeographicInformationPageState createState() => _GeographicInformationPageState(); } class _GeographicInformationPageState extends State { - GeographicInformationModel _model = GeographicInformationModel.init(); - bool _onload = false; + AMapController? _mapController; + + @override + void initState() { + super.initState(); + PermissionUtil.getLocationPermission(); + } + + @override + void dispose() { + super.dispose(); + _mapController?.disponse(); + } @override Widget build(BuildContext context) { + final appProvider = Provider.of(context); return BeeScaffold( - bodyColor: Colors.white, - title: '地理信息', - body: EasyRefresh( - firstRefresh: true, - header: MaterialHeader(), - onRefresh: () async { - BaseModel baseModel = - await NetUtil().get(API.manager.geographyInformation); - if (baseModel.success && baseModel.data != null) { - _model = GeographicInformationModel.fromJson(baseModel.data); - } - _onload = false; - setState(() {}); - }, - child: _onload - ? Container() - : ListView( - children: [ - SizedBox( - child: FadeInImage.assetNetwork( - placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - fit: BoxFit.cover, - image: SAASAPI.image(ImgModel.first(_model.imgUrls))), - width: double.infinity, - height: 424.w, - ), - 24.w.heightBox, - Padding( - padding: - EdgeInsets.only(left: 32.w, right: 32.w, top: 40.w), - child: Text( - _model.content ?? '', - style: TextStyle( - fontSize: 26.sp, - color: (ktextSubColor), - fontWeight: FontWeight.bold), - )), - ], - ), - )); + title: '地理信息', + body: AMapWidget( + privacyStatement: AMapPrivacyStatement( + hasContains: true, hasShow: true, hasAgree: true), + onMapCreated: (controller) { + final appProvider = + Provider.of(context, listen: false); + LatLng _target = LatLng( + (appProvider.location?['latitude'] ?? 0) as double, + (appProvider.location?['longitude'] ?? 0) as double, + ); + _mapController = controller; + _mapController!.moveCamera( + CameraUpdate.newCameraPosition( + CameraPosition(target: _target, zoom: 18), + ), + ); + }, + myLocationStyleOptions: MyLocationStyleOptions( + true, + circleFillColor: Theme.of(context).primaryColor.withOpacity(0.2), + circleStrokeColor: Theme.of(context).primaryColor, + ), + ), + ); } } diff --git a/lib/utils/application_utils.dart b/lib/utils/application_utils.dart index 1d61f98a..83c5c1d1 100644 --- a/lib/utils/application_utils.dart +++ b/lib/utils/application_utils.dart @@ -6,7 +6,7 @@ import 'package:aku_new_community/pages/convenient_phone/convenient_phone_page.d import 'package:aku_new_community/pages/electronic_commerc/electronic_commerc_page.dart'; import 'package:aku_new_community/pages/event_activity/event_voting_page.dart'; import 'package:aku_new_community/pages/express_packages/express_package_page.dart'; -import 'package:aku_new_community/pages/geographic_information/geograhic_information.dart'; +import 'package:aku_new_community/pages/geographic_information/geographic_information_page.dart'; import 'package:aku_new_community/pages/goods_deto_page/goods_deto_page.dart'; import 'package:aku_new_community/pages/goods_manage_page/select_borrow_return_page.dart'; import 'package:aku_new_community/pages/house_introduce/house_introduce.dart'; @@ -176,8 +176,6 @@ class ApplicationUtil { title: '地理信息', imgPath: Assets.newIcon.icDlxx.path, onTap: () { - BotToast.showText(text: '此功能升级中,敬请期待'); - return; Get.to(() => GeographicInformationPage()); }), AppElement( From 450b0a2e866182d98b515f92ca5a7ea4f66ec441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=90=8C?= <494089941@qq.com> Date: Wed, 20 Apr 2022 20:53:16 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/utils/application_utils.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/utils/application_utils.dart b/lib/utils/application_utils.dart index 83c5c1d1..2b21d711 100644 --- a/lib/utils/application_utils.dart +++ b/lib/utils/application_utils.dart @@ -214,7 +214,7 @@ class ApplicationUtil { nickTitles: ['小蜜蜂任务']), AppElement( title: '自营商城', - imgPath: Assets.icons.shoppingMall.path, + imgPath: Assets.newIcon.icZysc.path, onTap: () { BotToast.showText(text: '此功能暂未上线'); return; @@ -228,21 +228,21 @@ class ApplicationUtil { }), AppElement( title: '共享停车', - imgPath: Assets.icons.sharePark.path, + imgPath: Assets.newIcon.icGxtc.path, onTap: () { BotToast.showText(text: '此功能暂未上线'); return; }), AppElement( title: '二手市场', - imgPath: Assets.icons.secondHandMarket.path, + imgPath: Assets.newIcon.icEssc.path, onTap: () { BotToast.showText(text: '此功能暂未上线'); return; }), AppElement( title: '共享投屏', - imgPath: Assets.icons.projectionScreen.path, + imgPath: Assets.newIcon.icGxtp.path, onTap: () { BotToast.showText(text: '此功能暂未上线'); return; From 2266db00cf014c897bc9d078dc328ed4c3bd5117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=90=8C?= <494089941@qq.com> Date: Wed, 20 Apr 2022 21:37:59 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E7=A7=AF=E5=88=86=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/constants/market_api.dart | 10 +++ .../market/integral_goods_list_model.dart | 33 ++++++++ .../market/integral_goods_list_model.g.dart | 17 ++++ lib/ui/community/community_func.dart | 12 +++ .../integral/integral_exchange_page.dart | 83 ++++++++++++++----- .../market/integral/integral_sku_model.dart | 80 ------------------ lib/ui/market/market_page.dart | 24 +++--- lib/ui/market/search/good_detail_page.dart | 1 - .../search/submit_order_page_normal.dart | 3 +- 9 files changed, 149 insertions(+), 114 deletions(-) create mode 100644 lib/models/market/integral_goods_list_model.dart create mode 100644 lib/models/market/integral_goods_list_model.g.dart delete mode 100644 lib/ui/market/integral/integral_sku_model.dart diff --git a/lib/constants/market_api.dart b/lib/constants/market_api.dart index 561f7c8e..14c78bc8 100644 --- a/lib/constants/market_api.dart +++ b/lib/constants/market_api.dart @@ -9,6 +9,7 @@ class _MarketApi { _ShopCart shopCart = _ShopCart(); _Address address = _Address(); _Order order = _Order(); + _IntegralGood integralGood = _IntegralGood(); } class _ShopCart { @@ -101,3 +102,12 @@ class _Order { ///我的订单 String get myOrder => '/app/user/shop/order/myOrder'; } + +class _IntegralGood { + ///查询积分商品列表 + String get list => '/app/user/shop/pointsGoods/list'; + + ///创建积分兑换积分商品订单 + String get createPointsOrder => + '/app/user/shop/pointsGoods/createPointsGoodsOrder'; +} diff --git a/lib/models/market/integral_goods_list_model.dart b/lib/models/market/integral_goods_list_model.dart new file mode 100644 index 00000000..22d16d30 --- /dev/null +++ b/lib/models/market/integral_goods_list_model.dart @@ -0,0 +1,33 @@ +import 'package:json_annotation/json_annotation.dart'; +import 'package:equatable/equatable.dart'; + +part 'integral_goods_list_model.g.dart'; + +@JsonSerializable() +class IntegralGoodsListModel extends Equatable { + final int id; + final String skuName; + final String mainPhoto; + final int points; + final int? saleNum; + + factory IntegralGoodsListModel.fromJson(Map json) => + _$IntegralGoodsListModelFromJson(json); + + const IntegralGoodsListModel({ + required this.id, + required this.skuName, + required this.mainPhoto, + required this.points, + this.saleNum, + }); + + @override + List get props => [ + id, + skuName, + mainPhoto, + points, + saleNum, + ]; +} diff --git a/lib/models/market/integral_goods_list_model.g.dart b/lib/models/market/integral_goods_list_model.g.dart new file mode 100644 index 00000000..f0a0ba01 --- /dev/null +++ b/lib/models/market/integral_goods_list_model.g.dart @@ -0,0 +1,17 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'integral_goods_list_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +IntegralGoodsListModel _$IntegralGoodsListModelFromJson( + Map json) => + IntegralGoodsListModel( + id: json['id'] as int, + skuName: json['skuName'] as String, + mainPhoto: json['mainPhoto'] as String, + points: json['points'] as int, + saleNum: json['saleNum'] as int?, + ); diff --git a/lib/ui/community/community_func.dart b/lib/ui/community/community_func.dart index 5e0827c8..9be46071 100644 --- a/lib/ui/community/community_func.dart +++ b/lib/ui/community/community_func.dart @@ -7,6 +7,7 @@ import 'package:aku_new_community/models/home/home_activity_model.dart'; import 'package:aku_new_community/models/home/home_announce_model.dart'; import 'package:aku_new_community/models/home/home_swiper_model.dart'; import 'package:aku_new_community/models/market/goods_popular_model.dart'; +import 'package:aku_new_community/models/market/integral_goods_list_model.dart'; import 'package:aku_new_community/models/market/market_all_category_model.dart'; import 'package:aku_new_community/models/market/market_category_model.dart'; import 'package:aku_new_community/models/market/market_statistics_model.dart'; @@ -106,6 +107,17 @@ class CommunityFunc { .toList(); } + ///查询积分商品 + static Future> getIntegralGoods(int num) async { + var baseList = await NetUtil().getList( + SAASAPI.market.integralGood.list, + params: {'pageNum': 1, 'size': num}, + ); + return baseList.rows + .map((e) => IntegralGoodsListModel.fromJson(e)) + .toList(); + } + ///获取所有商品的分类 static Future> getCategory() async { BaseModel model = await NetUtil().get( diff --git a/lib/ui/market/integral/integral_exchange_page.dart b/lib/ui/market/integral/integral_exchange_page.dart index 41ea33cf..e36d701b 100644 --- a/lib/ui/market/integral/integral_exchange_page.dart +++ b/lib/ui/market/integral/integral_exchange_page.dart @@ -1,11 +1,14 @@ +import 'package:aku_new_community/constants/saas_api.dart'; +import 'package:aku_new_community/models/market/integral_goods_list_model.dart'; +import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; import 'package:aku_new_community/gen/assets.gen.dart'; -import 'package:aku_new_community/ui/market/integral/integral_sku_model.dart'; import 'package:aku_new_community/ui/market/search/good_detail_page.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart'; @@ -17,33 +20,74 @@ class IntegralExchangePage extends StatefulWidget { } class _IntegralExchangePageState extends State { - List _models = IntegralSkuModel.examples; + List _models = []; + int _pageNum = 1; + int _size = 10; + EasyRefreshController _easyRefreshController = EasyRefreshController(); + + @override + void dispose() { + _easyRefreshController.dispose(); + super.dispose(); + } @override Widget build(BuildContext context) { return BeeScaffold( title: '积分商城', body: SafeArea( - child: GridView.builder( - padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w), - itemCount: _models.length, - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 2, - childAspectRatio: 332 / 480, - mainAxisSpacing: 16.w, - crossAxisSpacing: 24.w), - itemBuilder: (context, index) { - return _card(_models[index]); - })), + child: EasyRefresh( + firstRefresh: true, + header: MaterialHeader(), + footer: MaterialFooter(), + controller: _easyRefreshController, + onRefresh: () async { + _pageNum = 1; + var baseList = await NetUtil().getList( + SAASAPI.market.integralGood.list, + params: {'pageNum': _pageNum, 'size': _size}, + ); + _models = baseList.rows + .map((e) => IntegralGoodsListModel.fromJson(e)) + .toList(); + setState(() {}); + }, + onLoad: () async { + _pageNum++; + var baseList = await NetUtil().getList( + SAASAPI.market.integralGood.list, + params: {'pageNum': _pageNum, 'size': _size}, + ); + if (baseList.total > _models.length) { + _models.addAll(baseList.rows + .map((e) => IntegralGoodsListModel.fromJson(e)) + .toList()); + } else { + _easyRefreshController.finishLoad(noMore: true); + } + setState(() {}); + }, + child: GridView.builder( + padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w), + itemCount: _models.length, + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + childAspectRatio: 332 / 480, + mainAxisSpacing: 16.w, + crossAxisSpacing: 24.w), + itemBuilder: (context, index) { + return _card(_models[index]); + }), + )), ); } - Widget _card(IntegralSkuModel model) { + Widget _card(IntegralGoodsListModel model) { return GestureDetector( onTap: () { Get.to(() => GoodDetailPage( - goodId: model.goodId, - integral: model.integral, + goodId: model.id, + integral: model.points, integralGood: true, )); }, @@ -51,7 +95,8 @@ class _IntegralExchangePageState extends State { children: [ Container( color: Color(0xFFF9F9F), - child: Image.network(model.imgPath, width: 332.w, height: 332.w)), + child: + Image.network(model.mainPhoto, width: 332.w, height: 332.w)), 16.w.heightBox, '${model.skuName}' .text @@ -65,9 +110,9 @@ class _IntegralExchangePageState extends State { children: [ Assets.icons.intergral.image(width: 24.w, height: 24.w), 4.w.widthBox, - '${model.integral}'.text.size(24.sp).color(Colors.red).make(), + '${model.points}'.text.size(24.sp).color(Colors.red).make(), Spacer(), - '已售${model.sold}份' + '已售${model.saleNum ?? 0}份' .text .size(24.sp) .color(Color(0xFFBDBDBD)) diff --git a/lib/ui/market/integral/integral_sku_model.dart b/lib/ui/market/integral/integral_sku_model.dart deleted file mode 100644 index 8309ce0b..00000000 --- a/lib/ui/market/integral/integral_sku_model.dart +++ /dev/null @@ -1,80 +0,0 @@ -class IntegralSkuModel { - final String imgPath; - final String skuName; - final int integral; - final int sold; - final int skuId; - final int goodId; - - static List get examples => [ - IntegralSkuModel( - imgPath: 'http://oss.jcook.com.cn/file5/1509704/1509704_0.jpg', - skuName: '3M 耳塞 降噪睡眠 弹性舒适1100耳塞一副', - integral: 1050, - skuId: 1509704, - goodId: 438052, - sold: 89), - IntegralSkuModel( - imgPath: 'http://oss.jcook.com.cn/file5/5059614/5059614_0.jpg', - skuName: '一品巷子 休闲零食 泡面搭档 卤蛋32g/个', - integral: 1060, - skuId: 5059614, - goodId: 451850, - sold: 156), - IntegralSkuModel( - imgPath: 'http://oss.jcook.com.cn/file5/1146553/1146553_0.jpg', - skuName: '齐心(Comix)美工刀/裁纸刀/壁纸刀工具 小号9mm 颜色随机', - integral: 1750, - skuId: 1146553, - goodId: 435913, - sold: 34), - IntegralSkuModel( - imgPath: - 'http://oss.jcook.com.cn/file5/100014750256/100014750256_0.jpg', - skuName: '公牛(BULL)118型开关插座布线盒 六孔插座暗盒墙插底盒2位暗盒H14(适用120mm面板)', - integral: 1910, - skuId: 100014750256, - goodId: 562798, - sold: 49), - IntegralSkuModel( - imgPath: 'http://oss.jcook.com.cn/file5/1033528/1033528_0.jpg', - skuName: '广博(GuangBo)0.5mm黑色中性笔 经典子弹头签字笔 水笔 12支装', - integral: 6250, - skuId: 1033528, - goodId: 435216, - sold: 298), - IntegralSkuModel( - imgPath: - 'http://oss.jcook.com.cn/file5/100017573108/100017573108_0.jpg', - skuName: '惠寻 100ml小白鞋清洁剂擦洗鞋清洗剂 1瓶', - integral: 6250, - skuId: 100017573108, - goodId: 572690, - sold: 74), - IntegralSkuModel( - imgPath: - 'http://oss.jcook.com.cn/file4/100009789209/100009789209_0.jpg', - skuName: '东园(TONGGARDEN)蚕豆 泰国进口 兰花豆盐焗味每日坚果炒货休闲零食非油炸', - integral: 6250, - skuId: 10009789209, - goodId: 535330, - sold: 330), - IntegralSkuModel( - imgPath: - 'http://oss.jcook.com.cn/file5/100010670794/100010670794_0.jpg', - skuName: '伊利 优酸乳 蓝莓味 250g*24盒/箱 乳饮料 聚会乐享 春节年货礼盒装早餐伴侣', - integral: 35680, - skuId: 100010670794, - goodId: 539334, - sold: 25), - ]; - - const IntegralSkuModel({ - required this.imgPath, - required this.skuName, - required this.integral, - required this.sold, - required this.skuId, - required this.goodId, - }); -} diff --git a/lib/ui/market/market_page.dart b/lib/ui/market/market_page.dart index 5bde1219..711a5933 100644 --- a/lib/ui/market/market_page.dart +++ b/lib/ui/market/market_page.dart @@ -7,6 +7,7 @@ import 'package:aku_new_community/constants/saas_api.dart'; import 'package:aku_new_community/gen/assets.gen.dart'; import 'package:aku_new_community/model/good/market_swiper_model.dart'; import 'package:aku_new_community/models/market/goods_popular_model.dart'; +import 'package:aku_new_community/models/market/integral_goods_list_model.dart'; import 'package:aku_new_community/models/market/market_all_category_model.dart'; import 'package:aku_new_community/models/market/market_category_model.dart'; import 'package:aku_new_community/models/market/market_statistics_model.dart'; @@ -14,7 +15,6 @@ import 'package:aku_new_community/models/market/order/goods_home_model.dart'; import 'package:aku_new_community/provider/app_provider.dart'; import 'package:aku_new_community/ui/community/community_func.dart'; import 'package:aku_new_community/ui/market/integral/integral_exchange_page.dart'; -import 'package:aku_new_community/ui/market/integral/integral_sku_model.dart'; import 'package:aku_new_community/ui/market/search/good_detail_page.dart'; import 'package:aku_new_community/ui/market/search/search_goods_page.dart'; import 'package:aku_new_community/ui/market/shop_car/shop_car_page.dart'; @@ -75,7 +75,7 @@ class _MarketPageState extends State List _goodsPopularModelList = []; - List get _integralModelList => IntegralSkuModel.examples; + List _integralModelList = []; int? orderBySalesVolume; int? orderByPrice; @@ -204,7 +204,7 @@ class _MarketPageState extends State print(_goodsClassificationList.length); _goodsPopularModelList = await CommunityFunc.getGoodsPopularModel(6); - + _integralModelList = await CommunityFunc.getIntegralGoods(6); setState(() {}); } @@ -321,9 +321,9 @@ class _MarketPageState extends State tabBarHeight + hotGoodHeight + ScreenUtil().statusBarHeight + - kToolbarHeight, - //积分商城高度 - // 172 * 2.w, + kToolbarHeight + + //积分商城高度 + 172 * 2.w, flexibleSpace: _flexibleSpaceBar(context), bottom: PreferredSize( preferredSize: Size.fromHeight(tabBarHeight), @@ -483,8 +483,8 @@ class _MarketPageState extends State _buttonTitle(), 20.hb, _recommend(), - // 20.hb, - // _integralMarket(), + 20.hb, + _integralMarket(), ], ), ], @@ -556,14 +556,14 @@ class _MarketPageState extends State separatorBuilder: (_, __) { return 24.wb; }, - itemCount: 4), + itemCount: _integralModelList.length), ), ], ), ); } - Widget _horizontalListCard(IntegralSkuModel model) { + Widget _horizontalListCard(IntegralGoodsListModel model) { return GestureDetector( onTap: () {}, child: SizedBox( @@ -571,7 +571,7 @@ class _MarketPageState extends State child: Column( children: [ Image.network( - model.imgPath, + model.mainPhoto, width: 148.w, height: 148.w, ), @@ -587,7 +587,7 @@ class _MarketPageState extends State children: [ Assets.icons.intergral.image(width: 24.w, height: 24.w), 4.wb, - '${model.integral}'.text.size(24.sp).color(Colors.red).make() + '${model.points}'.text.size(24.sp).color(Colors.red).make() ], ) ], diff --git a/lib/ui/market/search/good_detail_page.dart b/lib/ui/market/search/good_detail_page.dart index ce5c7b55..4b8bd85e 100644 --- a/lib/ui/market/search/good_detail_page.dart +++ b/lib/ui/market/search/good_detail_page.dart @@ -780,5 +780,4 @@ class _GoodDetailPageState extends State { return count + '折'; } - _getSpecifications() {} } diff --git a/lib/ui/market/search/submit_order_page_normal.dart b/lib/ui/market/search/submit_order_page_normal.dart index f037f56b..570a5da7 100644 --- a/lib/ui/market/search/submit_order_page_normal.dart +++ b/lib/ui/market/search/submit_order_page_normal.dart @@ -153,12 +153,11 @@ class _SubmitOrderNormalPageState extends State { } Function cancel = BotToast.showLoading(); BaseModel baseModel = await NetUtil() - .post(API.pay.jcookOrderCreateByIntegral, params: { + .post(SAASAPI.market.integralGood.createPointsOrder, params: { "addressId": _addressModel!.id!, "settlementGoodsDTOList": _goodsList.map((v) => v.toJson()).toList(), "payType": 10, //暂时写死 等待后续补充 - "payPrice": totalPrice, 'points': widget.integral, }); if (baseModel.success) { From 052302c2a62ba06ebc6b28e050cc05d18f58201b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=90=8C?= <494089941@qq.com> Date: Thu, 21 Apr 2022 11:26:26 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E6=9C=AA=E5=AE=9E=E5=90=8D=E6=8B=A6?= =?UTF-8?q?=E6=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/home/home_page.dart | 2 +- .../wallet/input_pay_password_dialog.dart | 14 +------------ lib/pages/personal/wallet/pay_way_dialog.dart | 11 ++++++++-- lib/pages/tab_navigator.dart | 5 +---- .../task/hall/hall_card.dart | 3 +++ .../task/publish_task_page.dart | 21 ++++++++++++++++++- .../function_and_service/task/task_func.dart | 2 ++ lib/ui/home/application/all_application.dart | 2 +- lib/ui/profile/new_house/my_family_page.dart | 4 ---- lib/ui/profile/new_house/my_house_page.dart | 5 +---- lib/ui/search/bee_search.dart | 2 +- lib/utils/login_util.dart | 20 +++++++++--------- lib/utils/network/net_util.dart | 9 +++++--- lib/widget/views/application_view.dart | 2 +- tool/_build.dart | 2 +- 15 files changed, 58 insertions(+), 46 deletions(-) diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index f38bfaef..718db230 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -563,7 +563,7 @@ class _HomePageState extends State child: GestureDetector( onTap: () { if (LoginUtil.isNotLogin) return; - if (ao.title != '全部应用' && !LoginUtil.haveRealName(ao.title)) return; + // if (ao.title != '全部应用' && !LoginUtil.haveRealName(ao.title)) return; if (ao.callback == null) { BotToast.showText( text: '该功能正在准备上线中,敬请期待', align: Alignment(0, 0.5)); diff --git a/lib/pages/personal/wallet/input_pay_password_dialog.dart b/lib/pages/personal/wallet/input_pay_password_dialog.dart index faeef790..5c0f85aa 100644 --- a/lib/pages/personal/wallet/input_pay_password_dialog.dart +++ b/lib/pages/personal/wallet/input_pay_password_dialog.dart @@ -10,11 +10,8 @@ import 'package:sms_autofill/sms_autofill.dart'; import 'package:velocity_x/src/extensions/string_ext.dart'; class InputPayPasswordDialog extends StatefulWidget { - final int balance; - const InputPayPasswordDialog({ Key? key, - required this.balance, }) : super(key: key); @override @@ -58,16 +55,7 @@ class _InputPayPasswordDialogState extends State { codeLength: 6, onCodeChanged: (code) async { if ((code?.length ?? 0) >= 6) { - Get.back(); - var base = await NetUtil() - .post(SAASAPI.balance.buyPointsByBalance, params: { - 'balance': widget.balance, - 'balancePayPwd': code - }); - Get.back(); - if (!base.success) { - BotToast.showText(text: base.msg); - } + Get.back(result: code!); } _currentCode = code; }, diff --git a/lib/pages/personal/wallet/pay_way_dialog.dart b/lib/pages/personal/wallet/pay_way_dialog.dart index 9ce8487e..1eb75380 100644 --- a/lib/pages/personal/wallet/pay_way_dialog.dart +++ b/lib/pages/personal/wallet/pay_way_dialog.dart @@ -192,8 +192,15 @@ class _PayWayDialogState extends State { Get.dialog(SetPayPasswordDialog()); } else { Get.back(); - Get.dialog( - InputPayPasswordDialog(balance: widget.amount)); + var psd = await Get.dialog( + InputPayPasswordDialog()); + await NetUtil().post( + SAASAPI.balance.buyPointsByBalance, + params: { + 'balance': widget.amount, + 'balancePayPwd': psd + }, + showMessage: true); } return; } diff --git a/lib/pages/tab_navigator.dart b/lib/pages/tab_navigator.dart index c7618b58..56c12d21 100644 --- a/lib/pages/tab_navigator.dart +++ b/lib/pages/tab_navigator.dart @@ -138,13 +138,10 @@ class _TabNavigatorState extends State //暂时隐去一键登录页 Get.offAll(() => OtherLoginPage()); } else {} - if (UserTool.userProvider.userInfoModel?.name == null) { - Get.dialog(CertificationDialog()); - } else { _tabController!.animateTo(2, curve: Curves.easeInOutCubic); _currentIndex = 2; setState(() {}); - } + }, child: Material( color: Colors.transparent, diff --git a/lib/ui/function_and_service/task/hall/hall_card.dart b/lib/ui/function_and_service/task/hall/hall_card.dart index fcd33591..a0773b69 100644 --- a/lib/ui/function_and_service/task/hall/hall_card.dart +++ b/lib/ui/function_and_service/task/hall/hall_card.dart @@ -1,3 +1,4 @@ +import 'package:aku_new_community/extensions/num_ext.dart'; import 'package:aku_new_community/gen/assets.gen.dart'; import 'package:aku_new_community/saas_model/task/hall_list_model.dart'; import 'package:aku_new_community/widget/bee_divider.dart'; @@ -98,6 +99,7 @@ class HallCard extends StatelessWidget { ), padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w), child: Column( + crossAxisAlignment: CrossAxisAlignment.end, children: [ head, 24.w.heightBox, @@ -164,6 +166,7 @@ class HallCard extends StatelessWidget { ), 24.w.heightBox, BeeDivider.horizontal(), + 20.hb, _cardBottom() ], ), diff --git a/lib/ui/function_and_service/task/publish_task_page.dart b/lib/ui/function_and_service/task/publish_task_page.dart index ae2e9a86..fee02160 100644 --- a/lib/ui/function_and_service/task/publish_task_page.dart +++ b/lib/ui/function_and_service/task/publish_task_page.dart @@ -3,6 +3,8 @@ import 'dart:io'; import 'package:aku_new_community/base/base_style.dart'; import 'package:aku_new_community/constants/saas_api.dart'; import 'package:aku_new_community/gen/assets.gen.dart'; +import 'package:aku_new_community/pages/personal/wallet/input_pay_password_dialog.dart'; +import 'package:aku_new_community/pages/personal/wallet/set_pay_password_dialog.dart'; import 'package:aku_new_community/ui/function_and_service/task/task_func.dart'; import 'package:aku_new_community/ui/function_and_service/task/task_map.dart'; import 'package:aku_new_community/ui/function_and_service/task/task_remark_page.dart'; @@ -12,6 +14,7 @@ import 'package:aku_new_community/widget/bee_divider.dart'; import 'package:aku_new_community/widget/bee_record_voice_widget.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/buttons/bee_long_button.dart'; +import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:aku_new_community/widget/picker/bee_date_picker.dart'; import 'package:aku_new_community/widget/picker/bee_pick_image_widget.dart'; import 'package:aku_new_community/widget/picker/bee_picker_box.dart'; @@ -118,6 +121,21 @@ class _PublishTaskPageState extends State { if (!canTap) { return; } + + var psdCode = ''; + if (_rewardType == 1) { + var balance = int.parse(_rewardController.text.trim()); + if (balance > + (UserTool.userProvider.userInfoModel!.balance ?? 0)) { + BotToast.showText(text: '余额不足,请前往充值'); + } else { + if (!UserTool.userProvider.userInfoModel!.isBalancePayPwd) { + Get.dialog(SetPayPasswordDialog()); + } else { + psdCode = await Get.dialog(InputPayPasswordDialog()); + } + } + } var cancel = BotToast.showLoading(); var _voiceUrl; if (_voiceUri != null) { @@ -159,7 +177,8 @@ class _PublishTaskPageState extends State { voiceUrl: _voiceUrl, imgUrls: imgs, rewardType: _rewardType, - reward: _rewardController.text); + reward: _rewardController.text, + psd: psdCode); if (re) { Get.back(); } diff --git a/lib/ui/function_and_service/task/task_func.dart b/lib/ui/function_and_service/task/task_func.dart index 327cf486..1ac5fc61 100644 --- a/lib/ui/function_and_service/task/task_func.dart +++ b/lib/ui/function_and_service/task/task_func.dart @@ -20,6 +20,7 @@ class TaskFunc { required List imgUrls, required int rewardType, required String reward, + required String psd, }) async { var base = await NetUtil().post(SAASAPI.task.insert, params: { @@ -39,6 +40,7 @@ class TaskFunc { 'imgUrls': imgUrls, 'rewardType': rewardType, 'reward': reward, + 'balancePayPwd':psd, }, showMessage: true); return base.success; diff --git a/lib/ui/home/application/all_application.dart b/lib/ui/home/application/all_application.dart index 26d04316..5e7fe458 100644 --- a/lib/ui/home/application/all_application.dart +++ b/lib/ui/home/application/all_application.dart @@ -38,7 +38,7 @@ class _AllApplicationPageState extends State { ? null : () { if (LoginUtil.isNotLogin) return; - if (!LoginUtil.haveRealName(object.title)) return; + // if (!LoginUtil.haveRealName(object.title)) return; if (object.callback == null || !online) { BotToast.showText( text: '正在准备上线中,敬请期待', align: Alignment(0, 0.5)); diff --git a/lib/ui/profile/new_house/my_family_page.dart b/lib/ui/profile/new_house/my_family_page.dart index 8a38fb86..4628f2a2 100644 --- a/lib/ui/profile/new_house/my_family_page.dart +++ b/lib/ui/profile/new_house/my_family_page.dart @@ -140,11 +140,7 @@ class _MyFamilyPageState extends State child: AddHouseButton( text: '添加房屋', onTap: () async { - if (UserTool.userProvider.userInfoModel?.name == null) { - await Get.dialog(CertificationDialog()); - } else { Get.to(() => AddHousePage()); - } }), ) : SizedBox(), diff --git a/lib/ui/profile/new_house/my_house_page.dart b/lib/ui/profile/new_house/my_house_page.dart index faa074c8..42650ef2 100644 --- a/lib/ui/profile/new_house/my_house_page.dart +++ b/lib/ui/profile/new_house/my_house_page.dart @@ -76,11 +76,8 @@ class _MyHousePageState extends State { padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w), child: AddHouseButton( onTap: () async { - if (UserTool.userProvider.userInfoModel?.name == null) { - await Get.dialog(CertificationDialog()); - } else { Get.to(() => AddHousePage()); - } + }, text: '添加房屋', ), diff --git a/lib/ui/search/bee_search.dart b/lib/ui/search/bee_search.dart index 60c6587f..16a6c348 100644 --- a/lib/ui/search/bee_search.dart +++ b/lib/ui/search/bee_search.dart @@ -77,7 +77,7 @@ class _BeeSearchState extends State { return MaterialButton( onPressed: () { if (LoginUtil.isNotLogin) return; - if (!LoginUtil.haveRealName(e.title)) return; + // if (!LoginUtil.haveRealName(e.title)) return; if (e.callback == null) { BotToast.showText(text: '该功能正在准备上线中,敬请期待', align: Alignment(0, 0.5)); } else { diff --git a/lib/utils/login_util.dart b/lib/utils/login_util.dart index efee6a57..6b42186c 100644 --- a/lib/utils/login_util.dart +++ b/lib/utils/login_util.dart @@ -30,16 +30,16 @@ class LoginUtil { /// 未登陆状态用户跳转到登录页面 static bool get isNotLogin => !isLogin; - static bool haveRealName(String name) { - // if (!name.contains(RegExp('访客邀请|报事报修|建议咨询|生活缴费|物品出门|投诉表扬|我的访客|我的报修|我的缴费'))) - // return true; - final userProvider = Provider.of(Get.context!, listen: false); - if (userProvider.userInfoModel!.name == null) { - Get.dialog(CertificationDialog()); - return false; - } - return true; - } + // static bool haveRealName(String name) { + // // if (!name.contains(RegExp('访客邀请|报事报修|建议咨询|生活缴费|物品出门|投诉表扬|我的访客|我的报修|我的缴费'))) + // // return true; + // final userProvider = Provider.of(Get.context!, listen: false); + // if (userProvider.userInfoModel!.name == null) { + // Get.dialog(CertificationDialog()); + // return false; + // } + // return true; + // } static bool haveRoom(String name) { // if (!name.contains(RegExp('访客邀请|报事报修|建议咨询|生活缴费|物品出门|投诉表扬|我的访客|我的报修|我的缴费'))) diff --git a/lib/utils/network/net_util.dart b/lib/utils/network/net_util.dart index 2de11a94..69ecba6f 100644 --- a/lib/utils/network/net_util.dart +++ b/lib/utils/network/net_util.dart @@ -3,10 +3,12 @@ import 'dart:typed_data'; import 'package:aku_new_community/constants/saas_api.dart'; import 'package:aku_new_community/pages/sign/login/other_login_page.dart'; +import 'package:aku_new_community/pages/splash/app_verify_dialog.dart'; import 'package:aku_new_community/provider/user_provider.dart'; import 'package:aku_new_community/utils/developer_util.dart'; import 'package:aku_new_community/utils/network/base_list_model.dart'; import 'package:aku_new_community/utils/network/base_model.dart'; +import 'package:aku_new_community/widget/dialog/certification_dialog.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:common_utils/common_utils.dart'; import 'package:dio/dio.dart'; @@ -212,9 +214,10 @@ class NetUtil { userProvider.logout(); //暂时隐去一键登录页 Get.offAll(() => OtherLoginPage()); - if (userProvider.isLogin) { - BotToast.showText(text: model.msg); - } + } + if (model.code==10100) { + BotToast.showText(text: '请先实名认证'); + Get.dialog(CertificationDialog()); } } } diff --git a/lib/widget/views/application_view.dart b/lib/widget/views/application_view.dart index edf907eb..d3536472 100644 --- a/lib/widget/views/application_view.dart +++ b/lib/widget/views/application_view.dart @@ -34,7 +34,7 @@ class _ApplicationViewState extends State { padding: EdgeInsets.zero, onPressed: () { if (LoginUtil.isNotLogin) return; - if (!LoginUtil.haveRealName(object.title)) return; + // if (!LoginUtil.haveRealName(object.title)) return; if (object.callback == null) { BotToast.showText(text: '该功能正在准备上线中,敬请期待', align: Alignment(0, 0.5)); } else { diff --git a/tool/_build.dart b/tool/_build.dart index 8eae5ce4..4e95b2d9 100644 --- a/tool/_build.dart +++ b/tool/_build.dart @@ -16,7 +16,7 @@ buildApk() async { String date = DateUtil.formatDate(DateTime.now(), format: 'yy_MM_dd_HH_mm'); String version = await getVersion(); - await runAsync('rmdir', arguments: [ Config.apkDir]); + await runAsync('rmdir', arguments: ['-f', Config.apkDir]); await runAsync('mkdir', arguments: [ Config.apkDir]); await runAsync('move', arguments: [ Config.buildPath, From 1f2854181c3615e67b5ced86895e7f9be25efc05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=90=8C?= <494089941@qq.com> Date: Thu, 21 Apr 2022 11:39:41 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E5=BF=BD=E7=95=A5=20config.dart?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/_build.dart | 14 ++++---------- tool/config.dart | 19 ------------------- 2 files changed, 4 insertions(+), 29 deletions(-) delete mode 100644 tool/config.dart diff --git a/tool/_build.dart b/tool/_build.dart index 4e95b2d9..249976df 100644 --- a/tool/_build.dart +++ b/tool/_build.dart @@ -16,17 +16,11 @@ buildApk() async { String date = DateUtil.formatDate(DateTime.now(), format: 'yy_MM_dd_HH_mm'); String version = await getVersion(); - await runAsync('rmdir', arguments: ['-f', Config.apkDir]); - await runAsync('mkdir', arguments: [ Config.apkDir]); - await runAsync('move', arguments: [ + await runAsync('rm', arguments: ['-rf', Config.apkDir]); + await runAsync('mkdir', arguments: ['-p', Config.apkDir]); + await runAsync('mv', arguments: [ Config.buildPath, - '${Config.apkDir}\\${Config.packageName}_${version}_release_$date.apk' - ]); - await runAsync('ren',arguments: [ - - '${Config.apkDir}\\app-release.apk', - - '${Config.apkDir}\\${Config.packageName}_${version}_release_$date.apk', + '${Config.apkDir}/${Config.packageName}_${version}_release_$date.apk' ]); } diff --git a/tool/config.dart b/tool/config.dart deleted file mode 100644 index 36daa606..00000000 --- a/tool/config.dart +++ /dev/null @@ -1,19 +0,0 @@ -class Config { - ///用户根目录 - static const String homeDir = '/users/zhangmeng'; - - ///包名 - static const String packageName = 'aku_new_community'; - - ///打包目录 - static String get buildPath => - './build/app/outputs/flutter-apk/app-release.apk'; - - ///测试包文件夹 - static String get apkDevDir => - '$homeDir/team/bee/aku_new_community_manager/dev'; - - ///正式包文件夹 - static String get apkDir => - '$homeDir/team/bee/aku_new_community_manager/release'; -}