From 8e13cfbb0ebf4dad984d755b2b6d4dcf14d19b5e Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Mon, 25 Jan 2021 13:11:58 +0800 Subject: [PATCH] fixed some issues --- lib/constants/api.dart | 3 +++ lib/pages/manager_func.dart | 1 - lib/pages/things_page/fixed_submit_page.dart | 6 +++--- lib/pages/things_page/widget/add_fixed_submit_page.dart | 2 +- lib/utils/network/net_util.dart | 7 ++++--- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/constants/api.dart b/lib/constants/api.dart index 5c32fcc3..f98cac43 100644 --- a/lib/constants/api.dart +++ b/lib/constants/api.dart @@ -87,6 +87,9 @@ class _Manager { ///咨询建议/投诉表扬:查询所有的app建议咨询/投诉表扬 信息(包含条件搜索 type 【类型(1.咨询,2.建议,3.投诉,4.表扬)】) String get advice => '/user/advice/list'; + + ///报事报修:app根据用户id和报事报修主键id查询报事报修详情(报修信息详情) + String get reportRepairFindBYLD => '/user/reportRepair/findById'; } class _Upload { diff --git a/lib/pages/manager_func.dart b/lib/pages/manager_func.dart index 22026628..08ba4b5c 100644 --- a/lib/pages/manager_func.dart +++ b/lib/pages/manager_func.dart @@ -1,4 +1,3 @@ -import 'dart:io'; import 'package:akuCommunity/constants/api.dart'; import 'package:akuCommunity/utils/network/base_model.dart'; diff --git a/lib/pages/things_page/fixed_submit_page.dart b/lib/pages/things_page/fixed_submit_page.dart index 1a68d7c4..cac0cd42 100644 --- a/lib/pages/things_page/fixed_submit_page.dart +++ b/lib/pages/things_page/fixed_submit_page.dart @@ -78,7 +78,7 @@ class _FixedSubmitPageState extends State { Widget _buildCard(FixedSubmitModel model) { return AnimatedPositioned( top: 0, - left: (_canSkew(model.status) && _isEdit) ? 55.w : 0, + left: (_canSkew(4) && _isEdit) ? 55.w : 0, bottom: 0, duration: Duration(milliseconds: 300), curve: Curves.easeInOutCubic, @@ -179,8 +179,8 @@ class _FixedSubmitPageState extends State { .bold .isIntrinsic .make(), - onPressed: () { - ManagerFunc.reportRepairDelete(_selected); + onPressed: () async{ + await ManagerFunc.reportRepairDelete(_selected); Get.back(); _selected.clear(); _easyRefreshController.callRefresh(); diff --git a/lib/pages/things_page/widget/add_fixed_submit_page.dart b/lib/pages/things_page/widget/add_fixed_submit_page.dart index 9ec02801..83ac5be0 100644 --- a/lib/pages/things_page/widget/add_fixed_submit_page.dart +++ b/lib/pages/things_page/widget/add_fixed_submit_page.dart @@ -32,7 +32,7 @@ class _AddFixedSubmitPageState extends State { String reportText; List _buttons = ['公区保修', '家庭维修']; int _selectType; - List _files; + List _files=[]; @override void initState() { super.initState(); diff --git a/lib/utils/network/net_util.dart b/lib/utils/network/net_util.dart index f10debb9..942bc99c 100644 --- a/lib/utils/network/net_util.dart +++ b/lib/utils/network/net_util.dart @@ -144,13 +144,14 @@ class NetUtil { Future> uploadFiles(List files, String api) async { List urls = []; - if (urls.isEmpty) { + if (files.isEmpty) { + return []; + } else { for (var item in files) { BaseFileModel model = await NetUtil().upload(api, item); urls.add(model.url); } - } else - return []; + } return urls; }