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) {