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 {