From c8132478f5d9197332dd652fad343275548b1b84 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Mon, 28 Mar 2022 17:37:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=88=BF=E5=B1=8B=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E6=B5=81=E7=A8=8B=20=E9=94=99=E8=AF=AF=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E8=AF=B7=E9=80=89=E6=8B=A9=E6=88=BF=E5=B1=8B=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20=E4=BF=AE=E5=A4=8D=20=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E5=8A=A8=E6=80=81=20=E5=8F=AF=E4=BB=A5=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=83=AD=E9=97=A8=E8=AF=9D=E9=A2=98=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AD=BE=E5=88=B0=E9=A1=B5=20=E5=9C=86?= =?UTF-8?q?=E8=A7=92=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=8F=91=E5=B8=83=E4=BB=BB=E5=8A=A1=E6=97=B6=20?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E6=A1=86=E6=97=A0=E6=B3=95=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../personal/clock_in/clock_in_page.dart | 28 +++-------- .../community_views/add_new_event_page.dart | 16 ++++++- .../task/publish_task_page.dart | 47 ++++++++++--------- lib/ui/profile/new_house/add_house_page.dart | 2 +- 4 files changed, 49 insertions(+), 44 deletions(-) diff --git a/lib/pages/personal/clock_in/clock_in_page.dart b/lib/pages/personal/clock_in/clock_in_page.dart index 9eb034ea..2f31e8aa 100644 --- a/lib/pages/personal/clock_in/clock_in_page.dart +++ b/lib/pages/personal/clock_in/clock_in_page.dart @@ -8,6 +8,7 @@ import 'package:aku_new_community/models/integral/clocked_record_list_model.dart import 'package:aku_new_community/models/integral/integral_info_model.dart'; import 'package:aku_new_community/pages/personal/clock_in/clock_success_dialog.dart'; import 'package:aku_new_community/utils/network/net_util.dart'; +import 'package:aku_new_community/widget/beeImageNetwork.dart'; import 'package:aku_new_community/widget/bee_back_button.dart'; import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:bot_toast/bot_toast.dart'; @@ -75,26 +76,11 @@ class _ClockInPageState extends State { Hero( tag: 'AVATAR', child: ClipOval( - // child: FadeInImage.assetNetwork( - // placeholder: Assets.images.placeholder.path, - // image: SARSAPI.image( - // (UserTool.userProvider.userInfoModel?.imgUrls ?? []) - // .isNotEmpty - // ? UserTool - // .userProvider.userInfoModel!.imgUrls.first.url - // : ''), - // height: 106.w, - // width: 106.w, - // fit: BoxFit.cover, - // imageErrorBuilder: (context, error, stackTrace) { - // return Image.asset( - // Assets.icons.iconMySetting.path, - // height: 106.w, - // width: 106.w, - // ); - // }, - // ), - ), + child: BeeImageNetwork( + height: 106.w, + width: 106.w, + ), + ), ), Container( margin: EdgeInsets.only(left: 16.w), @@ -254,7 +240,7 @@ class _ClockInPageState extends State { width: double.infinity, decoration: BoxDecoration( color: Colors.white, - borderRadius: BorderRadius.circular(30.w), + borderRadius: BorderRadius.vertical(top: Radius.circular(30.w)), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/ui/community/community_views/add_new_event_page.dart b/lib/ui/community/community_views/add_new_event_page.dart index 1cf61347..727b709a 100644 --- a/lib/ui/community/community_views/add_new_event_page.dart +++ b/lib/ui/community/community_views/add_new_event_page.dart @@ -155,7 +155,10 @@ class _AddNewEventPageState extends State { GestureDetector( onTap: () async { var res = await Get.to(() => TopicSearchPage()); - _hotTopicModels.add(res as TopicListModel); + var _repeat = _checkRepeatTopic(res as TopicListModel); + if (!_repeat) { + _hotTopicModels.add(res); + } setState(() {}); }, child: Container( @@ -215,6 +218,15 @@ class _AddNewEventPageState extends State { ), ); } + + bool _checkRepeatTopic(TopicListModel model) { + for (var item in _hotTopicModels) { + if (item.id == model.id) { + return true; + } + } + return false; + } } class TopicWidgets extends StatelessWidget { @@ -227,8 +239,10 @@ class TopicWidgets extends StatelessWidget { final List? hotTopicModels; final List? topicTags; + List get models => hotTopicModels == null ? topicTags! : hotTopicModels!; + @override Widget build(BuildContext context) { return Wrap( 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 a8f699ac..f1a869b2 100644 --- a/lib/ui/function_and_service/task/publish_task_page.dart +++ b/lib/ui/function_and_service/task/publish_task_page.dart @@ -21,9 +21,8 @@ import 'package:common_utils/common_utils.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; -import 'package:velocity_x/velocity_x.dart'; +import 'package:power_logger/power_logger.dart'; import 'add_appointment_address_page.dart'; @@ -75,6 +74,7 @@ class _PublishTaskPageState extends State { _rewardController.dispose(); _nameController.dispose(); _telController.dispose(); + BotToast.closeAllLoading(); super.dispose(); } @@ -142,25 +142,30 @@ class _PublishTaskPageState extends State { print(e.toString()); } } - var re = await TaskFunc.publish( - type: _type, - sex: _sex, - servicePersonnel: _service, - readyStartTime: _appointDate.toString(), - readyEndTime: _appointEndDate.toString(), - contact: _nameController.text, - tel: _telController.text, - accessAddress: _accessAddress!, - accessAddressDetail: _accessAddressDetail!, - serviceAddress: _serviceAddress, - serviceAddressDetail: _serviceAddressDetail, - remarks: _content, - voiceUrl: _voiceUrl, - imgUrls: imgs, - rewardType: _rewardType, - reward: _rewardController.text); - if (re) { - Get.back(); + try { + var re = await TaskFunc.publish( + type: _type, + sex: _sex, + servicePersonnel: _service, + readyStartTime: _appointDate.toString(), + readyEndTime: _appointEndDate.toString(), + contact: _nameController.text, + tel: _telController.text, + accessAddress: _accessAddress!, + accessAddressDetail: _accessAddressDetail!, + serviceAddress: _serviceAddress, + serviceAddressDetail: _serviceAddressDetail, + remarks: _content, + voiceUrl: _voiceUrl, + imgUrls: imgs, + rewardType: _rewardType, + reward: _rewardController.text); + if (re) { + Get.back(); + } + } catch (e) { + print(e.toString()); + LoggerData.addData(e.toString()); } cancel(); }, diff --git a/lib/ui/profile/new_house/add_house_page.dart b/lib/ui/profile/new_house/add_house_page.dart index 86c32f3a..525440f8 100644 --- a/lib/ui/profile/new_house/add_house_page.dart +++ b/lib/ui/profile/new_house/add_house_page.dart @@ -34,7 +34,7 @@ class _AddHousePageState extends State { TextEditingController _telController = TextEditingController(); List get manageEstateIds { - if (_otherPickHouse == null || _pickedHouses.first.house == null) { + if (_otherPickHouse == null && _pickedHouses.first.house == null) { return []; } if (_identify == Identify.OWNER) {