From c99b553dfa8010c502130e83b14501bace1f8b4b Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Thu, 8 Apr 2021 13:49:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=B7=A1=E6=A3=80?= =?UTF-8?q?=E7=82=B9=E6=97=A0=E5=86=85=E5=AE=B9=E6=97=B6=E4=B8=80=E7=9B=B4?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspection_point_detail_page.dart | 10 ++++++++-- lib/ui/sub_pages/manage_func.dart | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/ui/manage_pages/inspection_manage/inspection_point_detail_page.dart b/lib/ui/manage_pages/inspection_manage/inspection_point_detail_page.dart index 8416b89..68907a8 100644 --- a/lib/ui/manage_pages/inspection_manage/inspection_point_detail_page.dart +++ b/lib/ui/manage_pages/inspection_manage/inspection_point_detail_page.dart @@ -4,6 +4,7 @@ import 'package:aku_community_manager/style/app_style.dart'; import 'package:aku_community_manager/ui/manage_pages/inspection_manage/inspection_utils.dart'; import 'package:aku_community_manager/ui/sub_pages/manage_func.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; +import 'package:aku_community_manager/utils/network/base_model.dart'; import 'package:common_utils/common_utils.dart'; import 'package:dotted_border/dotted_border.dart'; import 'package:flutter/material.dart'; @@ -58,13 +59,18 @@ class _InspectionPointDetailPageState extends State { return AkuScaffold( title: '巡检点', body: EasyRefresh( + enableControlFinishLoad: true, header: MaterialHeader(valueColor: AlwaysStoppedAnimation(kPrimaryColor)), firstRefresh: true, onRefresh: () async { - _detialModel = await ManageFunc.getInspectionPointCheckDetail( + BaseModel baseModel = await ManageFunc.getInspectionPointCheckDetail( widget.executePointId); - _onload = false; + if (baseModel.data != null) { + _detialModel = InspectionCheckDetialModel.fromJson(baseModel.data); + _onload = false; + _easyRefreshController.finishLoad(success: false, noMore: true); + } setState(() {}); }, controller: _easyRefreshController, diff --git a/lib/ui/sub_pages/manage_func.dart b/lib/ui/sub_pages/manage_func.dart index e2363de..1968a88 100644 --- a/lib/ui/sub_pages/manage_func.dart +++ b/lib/ui/sub_pages/manage_func.dart @@ -84,13 +84,13 @@ class ManageFunc { return baseModel; } - static Future getInspectionPointCheckDetail( + static Future getInspectionPointCheckDetail( int executePointId) async { BaseModel baseModel = await NetUtil().get(API.manage.inspectionPointCheckDetail, params: { "executePointId": executePointId, }); - return InspectionCheckDetialModel.fromJson(baseModel.data); + return baseModel; } static Future uploadFace(File file) async {