From 316e1275d36ba9d0bf0181c8d7b6f0636dcde1ea Mon Sep 17 00:00:00 2001 From: datang Date: Wed, 18 May 2022 14:01:02 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D=EF=BC=8C=E6=84=8F?= =?UTF-8?q?=E8=A7=81=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/constants/saas_api.dart | 1 + .../event_activity/event_voting_page.dart | 6 +++--- .../event_activity/voting_detail_page.dart | 19 +++++++++---------- .../geographic_information_page.dart | 2 +- lib/pages/one_alarm/widget/alarm_page.dart | 16 +++++++--------- .../feedback_page/feedback_page.dart | 9 ++++++--- lib/pages/setting_page/settings_page.dart | 10 ++++++---- .../questionnaire_detail_page.dart | 2 +- lib/ui/market/shop_car/shop_car_page.dart | 2 ++ lib/widget/views/horizontal_image_view.dart | 2 +- pubspec.lock | 2 +- pubspec.yaml | 2 +- 12 files changed, 39 insertions(+), 34 deletions(-) diff --git a/lib/constants/saas_api.dart b/lib/constants/saas_api.dart index 5baa0632..614fd26b 100644 --- a/lib/constants/saas_api.dart +++ b/lib/constants/saas_api.dart @@ -358,6 +358,7 @@ class _CommunityIntroduce { class _ConveniencePhone { ///查询app便民电话 String get list => '/app/user/conveniencePhone/list'; + String get recordAlarmInfo => '/app/user/alarm/insertAlarmRecord'; } class _CommitteeStaff { ///查询业委会列表 diff --git a/lib/pages/event_activity/event_voting_page.dart b/lib/pages/event_activity/event_voting_page.dart index d99120ae..fb6516d2 100644 --- a/lib/pages/event_activity/event_voting_page.dart +++ b/lib/pages/event_activity/event_voting_page.dart @@ -1,3 +1,4 @@ +import 'package:aku_new_community/widget/bee_image_network.dart'; import 'package:flutter/material.dart'; import 'package:common_utils/common_utils.dart'; @@ -60,9 +61,8 @@ class _EventVotingPageState extends State { height: 210.w, width: double.infinity, child: ClipRect( - child: FadeInImage.assetNetwork( - placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - image: SAASAPI.image(ImgModel.first(model.imgUrls)), + child: BeeImageNetwork( + imgs: model.imgUrls, fit: BoxFit.cover, ), ), diff --git a/lib/pages/event_activity/voting_detail_page.dart b/lib/pages/event_activity/voting_detail_page.dart index 574b8474..5b394520 100644 --- a/lib/pages/event_activity/voting_detail_page.dart +++ b/lib/pages/event_activity/voting_detail_page.dart @@ -1,3 +1,4 @@ +import 'package:aku_new_community/widget/bee_image_network.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -133,11 +134,8 @@ class _VotingDetailPageState extends State { height: 150.w, child: ClipRRect( borderRadius: BorderRadius.circular(4.w), - child: FadeInImage.assetNetwork( - placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - image: SAASAPI.image( - ImgModel.first(model.imgUrls), - ), + child: BeeImageNetwork( + imgs: model.imgUrls, fit: BoxFit.cover, ), ), @@ -232,9 +230,8 @@ class _VotingDetailPageState extends State { 44.w.heightBox, ClipRRect( borderRadius: BorderRadius.circular(8.w), - child: FadeInImage.assetNetwork( - placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - image: SAASAPI.image(ImgModel.first(_model.imgUrls)), + child: BeeImageNetwork( + imgs: _model.imgUrls, ), ), 44.w.heightBox, @@ -274,10 +271,12 @@ class _VotingDetailPageState extends State { BotToast.showText(text: '投票未开始或已结束'); } : () async { - if (_model.allowVote!) { + if (!_model.allowVote!) { BotToast.showText(text: '投票失败'); + } else if (_model.vote!) { + BotToast.showText(text: '已投过票'); } else if (_selectId == null) { - BotToast.showText(text: '请先选择候选人!'); + BotToast.showText(text: '请先选票!'); } else { BaseModel baseModel = await ManagerFunc.vote(widget.id, _selectId); diff --git a/lib/pages/geographic_information/geographic_information_page.dart b/lib/pages/geographic_information/geographic_information_page.dart index f5021406..363c585d 100644 --- a/lib/pages/geographic_information/geographic_information_page.dart +++ b/lib/pages/geographic_information/geographic_information_page.dart @@ -58,7 +58,7 @@ class _GeographicInformationPageState extends State { _mapController = controller; _mapController!.moveCamera( CameraUpdate.newCameraPosition( - CameraPosition(target: _target, zoom: 14), + CameraPosition(target: _target, zoom: 17), ), ); }, diff --git a/lib/pages/one_alarm/widget/alarm_page.dart b/lib/pages/one_alarm/widget/alarm_page.dart index 7aafc1f4..448710ad 100644 --- a/lib/pages/one_alarm/widget/alarm_page.dart +++ b/lib/pages/one_alarm/widget/alarm_page.dart @@ -14,6 +14,7 @@ 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 '../../../constants/saas_api.dart'; import '../../../widget/others/user_tool.dart'; class PermissionUtil { @@ -76,7 +77,7 @@ class _AlarmPageState extends State { _mapController = controller; _mapController!.moveCamera( CameraUpdate.newCameraPosition( - CameraPosition(target: _target, zoom: 14), + CameraPosition(target: _target, zoom: 17), ), ); }, @@ -227,14 +228,11 @@ class _AlarmPageState extends State { setState(() { _makephonenum('tel:110'); }); - - if (appProvider.selectedHouse != null) { - await NetUtil() - .post(API.manager.recordAlarmInfo, params: { - "estateId": - appProvider.selectedHouse!.estateId, - }); - } + await NetUtil() + .post(SAASAPI.conveniencePhone.recordAlarmInfo, params: { + "longitude": appProvider.location?['longitude']??'', + "latitude": appProvider.location?['latitude']??'', + }); }, child: Icon( Feather.phone_call, diff --git a/lib/pages/setting_page/feedback_page/feedback_page.dart b/lib/pages/setting_page/feedback_page/feedback_page.dart index 44e45bed..4560a742 100644 --- a/lib/pages/setting_page/feedback_page/feedback_page.dart +++ b/lib/pages/setting_page/feedback_page/feedback_page.dart @@ -1,5 +1,6 @@ import 'dart:io'; +import 'package:aku_new_community/constants/saas_api.dart'; import 'package:flutter/material.dart'; import 'package:bot_toast/bot_toast.dart'; @@ -68,13 +69,15 @@ class _FeedBackPageState extends State { return InkWell( onTap: () async { if (_formKey.currentState!.validate()) { - if (_files.isNotEmpty) {} + List urls = + await NetUtil().uploadFiles(_files, SAASAPI.uploadFile.uploadImg); var cancelAction = BotToast.showLoading(); await NetUtil().post( - API.user.feedback, + SAASAPI.advice.insert, params: { + 'type':5, 'content': _ideaContent.text, - 'fileUrls': [], + 'imgUrls': urls, }, showMessage: true, ); diff --git a/lib/pages/setting_page/settings_page.dart b/lib/pages/setting_page/settings_page.dart index 135f787b..935bcd91 100644 --- a/lib/pages/setting_page/settings_page.dart +++ b/lib/pages/setting_page/settings_page.dart @@ -18,6 +18,8 @@ import 'package:aku_new_community/utils/websocket/web_socket_util.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/others/user_tool.dart'; +import 'feedback_page/feedback_page.dart'; + class SettingsPage extends StatefulWidget { SettingsPage({Key? key}) : super(key: key); @@ -136,10 +138,10 @@ class _SettingsPageState extends State { // title: '清除缓存', // onTap: () {}, // ), - // _buildTile( - // title: '意见反馈', - // onTap: () => Get.to(() => FeedBackPage()), - // ), + _buildTile( + title: '意见反馈', + onTap: () => Get.to(() => FeedBackPage()), + ), // _buildTile( // title: '账号管理', // onTap: () => Get.to(() => AccountManagerPage()), diff --git a/lib/ui/manager/questionnaire/questionnaire_detail_page.dart b/lib/ui/manager/questionnaire/questionnaire_detail_page.dart index f5757a50..2353ddbe 100644 --- a/lib/ui/manager/questionnaire/questionnaire_detail_page.dart +++ b/lib/ui/manager/questionnaire/questionnaire_detail_page.dart @@ -267,7 +267,7 @@ class _QuestionnaireDetailPageState extends State { .size(32.sp) .bold .make(), - onPressed: widget.answered != 2 + onPressed: widget.answered! ? () { BotToast.showText(text: '该问卷已填写过'); } diff --git a/lib/ui/market/shop_car/shop_car_page.dart b/lib/ui/market/shop_car/shop_car_page.dart index 847099e4..063d5c77 100644 --- a/lib/ui/market/shop_car/shop_car_page.dart +++ b/lib/ui/market/shop_car/shop_car_page.dart @@ -503,6 +503,7 @@ class _ShopCarPageState extends State { children: [ GestureDetector( onTap: () async { + _refreshController.callRefresh(); if (_controllers[index].text.isEmpty) { _controllers[index].text = '1'; } @@ -558,6 +559,7 @@ class _ShopCarPageState extends State { ), GestureDetector( onTap: () async { + _refreshController.callRefresh(); if (_controllers[index].text.isEmpty) { _controllers[index].text = '0'; } diff --git a/lib/widget/views/horizontal_image_view.dart b/lib/widget/views/horizontal_image_view.dart index af7faa8d..33fe3ae4 100644 --- a/lib/widget/views/horizontal_image_view.dart +++ b/lib/widget/views/horizontal_image_view.dart @@ -33,7 +33,7 @@ class HorizontalImageView extends StatelessWidget { child: ClipRRect( borderRadius: BorderRadius.circular(8.w), child: BeeImageNetwork( - urls:[SAASAPI.image(urls[index]) ?? ''], + urlsWithHost:[SAASAPI.image(urls[index])], height: 184.w, width: 184.w, fit: BoxFit.cover, diff --git a/pubspec.lock b/pubspec.lock index 84ec4bc7..d20c2ce7 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1421,5 +1421,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.17.0-206.0.dev <3.0.0" + dart: ">=2.17.0 <3.0.0" flutter: ">=2.8.0" diff --git a/pubspec.yaml b/pubspec.yaml index 5ceecbb8..a00b5afa 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: "none" version: 1.8.11-dev+51 environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.17.0 <3.0.0" dependencies: flutter: