fix some issues

hmxc
张萌 3 years ago
parent 749fa1c9e9
commit 7987d41f41

@ -2,51 +2,51 @@ PODS:
- advance_pdf_viewer (1.0.5):
- Flutter
- AlipaySDK-iOS (15.7.9)
- AMap3DMap (7.8.0):
- AMapFoundation (~> 1.6.4)
- AMap3DMap (8.0.0):
- AMapFoundation (~> 1.6.8)
- amap_flutter_location (0.0.1):
- AMapLocation (~> 2.6.7)
- Flutter
- amap_flutter_map (0.0.1):
- AMap3DMap
- Flutter
- AMapFoundation (1.6.5.1)
- AMapLocation (2.6.7):
- AMapFoundation (~> 1.6.4)
- AMapFoundation (1.6.8)
- AMapLocation (2.6.9):
- AMapFoundation (~> 1.6.8)
- device_info_plus (0.0.1):
- Flutter
- Firebase/CoreOnly (7.11.0):
- FirebaseCore (= 7.11.0)
- Firebase/Crashlytics (7.11.0):
- Firebase/CoreOnly (8.3.0):
- FirebaseCore (= 8.3.0)
- Firebase/Crashlytics (8.3.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 7.11.0)
- firebase_core (1.1.1):
- Firebase/CoreOnly (= 7.11.0)
- FirebaseCrashlytics (~> 8.3.0)
- firebase_core (1.4.0):
- Firebase/CoreOnly (= 8.3.0)
- Flutter
- firebase_crashlytics (2.0.3):
- Firebase/Crashlytics (= 7.11.0)
- firebase_crashlytics (2.1.1):
- Firebase/Crashlytics (= 8.3.0)
- firebase_core
- Flutter
- FirebaseCore (7.11.0):
- FirebaseCoreDiagnostics (~> 7.4)
- GoogleUtilities/Environment (~> 7.0)
- GoogleUtilities/Logger (~> 7.0)
- FirebaseCoreDiagnostics (7.11.0):
- GoogleDataTransport (~> 8.4)
- GoogleUtilities/Environment (~> 7.0)
- GoogleUtilities/Logger (~> 7.0)
- FirebaseCore (8.3.0):
- FirebaseCoreDiagnostics (~> 8.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/Logger (~> 7.4)
- FirebaseCoreDiagnostics (8.6.0):
- GoogleDataTransport (~> 9.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/Logger (~> 7.4)
- nanopb (~> 2.30908.0)
- FirebaseCrashlytics (7.11.0):
- FirebaseCore (~> 7.0)
- FirebaseInstallations (~> 7.0)
- GoogleDataTransport (~> 8.4)
- FirebaseCrashlytics (8.3.0):
- FirebaseCore (~> 8.0)
- FirebaseInstallations (~> 8.0)
- GoogleDataTransport (~> 9.0)
- nanopb (~> 2.30908.0)
- PromisesObjC (~> 1.2)
- FirebaseInstallations (7.11.0):
- FirebaseCore (~> 7.0)
- GoogleUtilities/Environment (~> 7.0)
- GoogleUtilities/UserDefaults (~> 7.0)
- PromisesObjC (~> 1.2)
- FirebaseInstallations (8.6.0):
- FirebaseCore (~> 8.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/UserDefaults (~> 7.4)
- PromisesObjC (< 3.0, >= 1.2)
- Flutter (1.0.0)
- fluwx (0.0.1):
- Flutter
@ -54,25 +54,25 @@ PODS:
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- GoogleDataTransport (8.4.0):
- GoogleDataTransport (9.1.0):
- GoogleUtilities/Environment (~> 7.2)
- nanopb (~> 2.30908.0)
- PromisesObjC (~> 1.2)
- GoogleUtilities/Environment (7.5.0):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.5.0):
- GoogleUtilities/Environment (7.5.1):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.5.1):
- GoogleUtilities/Environment
- GoogleUtilities/UserDefaults (7.5.0):
- GoogleUtilities/UserDefaults (7.5.1):
- GoogleUtilities/Logger
- image_picker (0.0.1):
- Flutter
- JCore (2.4.0)
- JPush (3.4.0):
- JCore (2.7.1)
- JPush (3.7.0):
- JCore (< 3.0.0, >= 2.0.0)
- jpush_flutter (0.0.2):
- Flutter
- JCore (= 2.4.0)
- JPush (= 3.4.0)
- JCore (= 2.7.1)
- JPush (= 3.7.0)
- MTBBarcodeScanner (5.0.11)
- nanopb (2.30908.0):
- nanopb/decode (= 2.30908.0)
@ -198,28 +198,28 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
advance_pdf_viewer: 5c832f382b4ca84fe735f893b7e91aa830c27d7b
AlipaySDK-iOS: 94ff4c0e17c5e7d126b8207596d5033006534c25
AMap3DMap: 3e4fac78e3e023cefd47e7d7715ef5ea69bfd0fa
AMap3DMap: 89b82eaad00f9246f59d2a6103eff18be5b9dd4f
amap_flutter_location: 3e33b57f1aad80b0dfb4b399de857a1a9f071e62
amap_flutter_map: 979e54d227cedac6c7504a2151bfbf3bcf96760a
AMapFoundation: b67560a6f21aab81c8c12f84616b55a3833b6253
AMapLocation: a46c30d9930d0f3a3bd21139d8f845d10ac3f01d
AMapFoundation: 32e9a0264ee62f5aa2aaf82bdafdda7985ce09c7
AMapLocation: 3ec0e9bf53800b40cceb313cbd047743f75e2483
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
Firebase: c121feb35e4126c0b355e3313fa9b487d47319fd
firebase_core: 54856a8a39b8f3e35f34fdd3373f3b92a1daa68b
firebase_crashlytics: 1e72fe7a913faa6bc73f75794a5f68947e26623e
FirebaseCore: 907447d8917a4d3eb0cce2829c5a0ad21d90b432
FirebaseCoreDiagnostics: 68ad972f99206cef818230f3f3179d52ccfb7f8c
FirebaseCrashlytics: 272b675aa9d1e9bae1f9e1449fcc1f2cf6042806
FirebaseInstallations: a58d4f72ec5861840b84df489f2668d970df558a
Firebase: 817b9171d0d51dccc458b94a5e8edff6b1dd323d
firebase_core: 72374607c8c6f5a0adc0559e5c5bf57deda975e3
firebase_crashlytics: f5c47b951fb9b494f2bc4212c8aa8de3ed8417cf
FirebaseCore: a6dba751680d7033b9d3831e1cfc95ead0605118
FirebaseCoreDiagnostics: 3721920bde3a9a6d5aa093c1d25e9d3e47f694af
FirebaseCrashlytics: 3d83f2e8a47f476f47c82ff4536b169df6781271
FirebaseInstallations: 0ede6ffcd215b8f93c19d9b06c1c54e2d4107e98
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
fluwx: 07a55ed66bf3a4961e836a2a411b02dcada32902
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
GoogleDataTransport: cd9db2180fcecd8da1b561aea31e3e56cf834aa7
GoogleUtilities: eea970f4a389963963bffe8d8fabe43540678b9c
GoogleDataTransport: 85fd18ff3019bb85d3f2c551d04c481dedf71fc9
GoogleUtilities: 3df19e3c24f7bbc291d8b5809aa6b0d41e642437
image_picker: 50e7c7ff960e5f58faa4d1f4af84a771c671bc4a
JCore: a29e4b0ee54e1301446dc02d8e1c350404108b34
JPush: defaa108c38806f6efdcfaf4c416854d25fca8e5
jpush_flutter: 364b245849348e05377d67295d0896ddd664a896
JCore: 9d5bda3a172c65bbe14f2806ab0f6246f8a06065
JPush: 1fd7a326e7e6588eba517659ce1b79a144e54938
jpush_flutter: d5fd523a73277ed66d453fc7ac1c981d1fa525e2
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d
@ -238,4 +238,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: fe0e1ee7f3d1f7d00b11b474b62dd62134535aea
COCOAPODS: 1.10.1
COCOAPODS: 1.11.0

@ -1,14 +1,5 @@
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:amap_flutter_location/amap_flutter_location.dart';
import 'package:amap_flutter_location/amap_location_option.dart';
import 'package:collection/collection.dart' show IterableExtension;
import 'package:dio/dio.dart';
import 'package:power_logger/power_logger.dart';
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/constants/application_objects.dart';
import 'package:aku_community/constants/config.dart';
@ -20,6 +11,13 @@ import 'package:aku_community/models/user/passed_house_list_model.dart';
import 'package:aku_community/utils/hive_store.dart';
import 'package:aku_community/utils/network/base_model.dart';
import 'package:aku_community/utils/network/net_util.dart';
import 'package:amap_flutter_location/amap_flutter_location.dart';
import 'package:amap_flutter_location/amap_location_option.dart';
import 'package:collection/collection.dart' show IterableExtension;
import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:power_logger/power_logger.dart';
class AppProvider extends ChangeNotifier {
///
@ -79,7 +77,9 @@ class AppProvider extends ChangeNotifier {
}
List<HotTopicModel> _hotTopicModels = [];
List<HotTopicModel> get hotTopicModels => _hotTopicModels;
updateHotTopicModel() async {
BaseModel model = await NetUtil().get(API.community.hotTopic);
_hotTopicModels =
@ -88,6 +88,7 @@ class AppProvider extends ChangeNotifier {
}
RealTimeWeatherModel? _weatherModel;
RealTimeWeatherModel? get weatherModel => _weatherModel;
String get weatherTemp =>
@ -140,6 +141,7 @@ class AppProvider extends ChangeNotifier {
}
Map<String, dynamic>? _location;
Map<String, dynamic>? get location => _location;
late AMapFlutterLocation _aMapFlutterLocation;
@ -188,8 +190,10 @@ class AppProvider extends ChangeNotifier {
///
MessageCenterModel? _messageCenterModel;
MessageCenterModel get messageCenterModel =>
_messageCenterModel ?? MessageCenterModel.zero();
getMessageCenter() async {
Response response = await NetUtil().dio!.get(API.message.center);
_messageCenterModel = MessageCenterModel.fromJson(response.data);
@ -205,7 +209,7 @@ class AppProvider extends ChangeNotifier {
updateHouses(List<PassedHouseListModel> items) {
if (items.isEmpty) return;
_selectedHouse = items.firstWhereOrNull(
(element) => element.id == (_selectedHouse?.id ?? -1),
(element) => element.id == _selectedHouseId,
);
_houses = items;
notifyListeners();
@ -213,21 +217,43 @@ class AppProvider extends ChangeNotifier {
PassedHouseListModel? _selectedHouse;
///id
int _selectedHouseId = -1;
int get selectHouseId => _selectedHouseId;
void setCurrentHouseId(int? id) {
if (id != null) {
_selectedHouseId = id;
}
}
///
PassedHouseListModel? get selectedHouse {
if (_selectedHouse == null) {
if (_houses.isEmpty) return null;
if (_selectedHouse == null) _selectedHouse = _houses.first;
if (_selectedHouseId != -1) {
_selectedHouse = _houses.firstWhereOrNull(
(element) => element.estateId == _selectedHouseId);
} else {
_selectedHouseId = _houses.first.estateId;
_selectedHouse = _houses.first;
}
}
return _selectedHouse;
}
///
setCurrentHouse(PassedHouseListModel? model) {
_selectedHouse = model;
_selectedHouseId = model!.estateId;
notifyListeners();
}
List<CarParkingModel> _carParkingModels = [];
List<CarParkingModel> get carParkingModels => _carParkingModels;
Future updateCarParkingModels() async {
BaseModel baseModel = await NetUtil().get(API.user.carParkingList);
if (baseModel.data == null) return [];
@ -238,7 +264,9 @@ class AppProvider extends ChangeNotifier {
}
List<CarParkingModel> _carModels = [];
List<CarParkingModel> get carModels => _carModels;
Future updateCarModels() async {
BaseModel baseModel = await NetUtil().get(
API.user.carList,
@ -253,7 +281,9 @@ class AppProvider extends ChangeNotifier {
//
bool _fireAlert = true;
bool get fireAlert => _fireAlert;
void setFireAlert(bool value) {
_fireAlert = value;
notifyListeners();

@ -1,14 +1,5 @@
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flustars/flustars.dart';
import 'package:get/get.dart';
import 'package:jpush_flutter/jpush_flutter.dart';
import 'package:power_logger/power_logger.dart';
import 'package:provider/provider.dart';
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/model/user/user_detail_model.dart';
import 'package:aku_community/model/user/user_info_model.dart';
@ -19,6 +10,14 @@ import 'package:aku_community/utils/hive_store.dart';
import 'package:aku_community/utils/network/base_model.dart';
import 'package:aku_community/utils/network/net_util.dart';
import 'package:aku_community/utils/websocket/web_socket_util.dart';
import 'package:aku_community/widget/others/user_tool.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:jpush_flutter/jpush_flutter.dart';
import 'package:power_logger/power_logger.dart';
import 'package:provider/provider.dart';
class UserProvider extends ChangeNotifier {
bool _isLogin = false;
@ -81,6 +80,7 @@ class UserProvider extends ChangeNotifier {
UserDetailModel? _model = await SignFunc.getUserDetail();
if (_model != null) {
_userDetailModel = _model;
UserTool.appProveider.setCurrentHouseId(_model.nowEstateExamineId);
}
notifyListeners();
}

@ -1,13 +1,5 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:power_logger/power_logger.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/extensions/widget_list_ext.dart';
@ -20,6 +12,12 @@ import 'package:aku_community/widget/buttons/bottom_button.dart';
import 'package:aku_community/widget/others/house_head_card.dart';
import 'package:aku_community/widget/others/user_tool.dart';
import 'package:aku_community/widget/picker/grid_image_picker.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:power_logger/power_logger.dart';
import 'package:velocity_x/velocity_x.dart';
class AddHouseKeepingPage extends StatefulWidget {
AddHouseKeepingPage({Key? key}) : super(key: key);
@ -30,7 +28,7 @@ class AddHouseKeepingPage extends StatefulWidget {
class _AddHouseKeepingPageState extends State<AddHouseKeepingPage> {
late TextEditingController _editingController;
List<String> _buttons = ['公区保修', '家庭维修'];
List<String> _buttons = ['室内清洁', '洗涤护理'];
int? _selectType;
List<File> _files = [];
@override

@ -42,6 +42,14 @@ class _HouseOwnersPageState extends State<HouseOwnersPage> {
return appProvider.houses.isEmpty;
}
int get currentSysLeaseId {
if (UserTool.appProveider.selectedHouse!.sysLeaseId == null) {
BotToast.showText(text: '无租赁合同!请先签订租赁合同');
return -1;
}
return UserTool.appProveider.selectedHouse!.sysLeaseId!;
}
///
bool get _haveAuthedHouse {
final appProvider = Provider.of<AppProvider>(context, listen: false);
@ -207,30 +215,28 @@ class _HouseOwnersPageState extends State<HouseOwnersPage> {
children: [
_cardBuild(R.ASSETS_ICONS_PAY_PNG, '缴费查询', '查看租金及保证金情况', () {
Get.to(() => LeasePayQueryPage(
id: UserTool.appProveider.selectedHouse!.sysLeaseId!,
id: currentSysLeaseId,
));
}),
_cardBuild(R.ASSETS_ICONS_CHANGE_PNG, '合同变更', '变更合同信息、重新签约', () {
Get.to(() => TenantHouseListPage(
leaseId: -UserTool.appProveider.selectedHouse!.sysLeaseId!,
leaseId: currentSysLeaseId,
));
}),
_cardBuild(R.ASSETS_ICONS_CONTRACT_PNG, '合同续签', '到期前线上办理续签手续', () {
Get.to(() => TenantHouseListPage(
leaseId: UserTool.appProveider.selectedHouse!.sysLeaseId!,
leaseId: currentSysLeaseId,
));
}),
_cardBuild(R.ASSETS_ICONS_FINISH_PNG, '合同终止', '线上申请终止合同', () async {
await stopContract();
})
_cardBuild(R.ASSETS_ICONS_FINISH_PNG, '合同终止', '线上申请终止合同',
() => stopContract())
],
),
);
}
Future stopContract() async {
LeaseDetailModel? model = await HouseFunc()
.leaseDetail(UserTool.appProveider.selectedHouse!.sysLeaseId!);
LeaseDetailModel? model = await HouseFunc().leaseDetail(currentSysLeaseId);
if (model != null) {
switch (model.status) {
case 1:

@ -1,12 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/constants/app_theme.dart';
import 'package:aku_community/models/user/passed_house_list_model.dart';
@ -16,6 +7,13 @@ import 'package:aku_community/ui/profile/house/house_func.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/utils/network/net_util.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
class PickMyHousePage extends StatefulWidget {
PickMyHousePage({Key? key}) : super(key: key);
@ -41,7 +39,8 @@ class _PickMyHousePageState extends State<PickMyHousePage> {
final appProvider = Provider.of<AppProvider>(context, listen: false);
List<PassedHouseListModel> models = List.from(appProvider.houses);
models.removeWhere(
(element) => element.id == (appProvider.selectedHouse?.id ?? -1),
(element) =>
element.estateId == (appProvider.selectedHouse?.estateId ?? -1),
);
if (models.isEmpty) return [];
return models;

Loading…
Cancel
Save