pull/1/head
张萌 3 years ago
parent 450e0117bf
commit c0bda239e2

@ -260,7 +260,7 @@ class _LifePayPageState extends State<LifePayPage> {
Future<double> _dailyPaymentPrePay() async { Future<double> _dailyPaymentPrePay() async {
BaseModel baseModel = BaseModel baseModel =
await NetUtil().get(API.manager.dailyPaymentPrePay, params: { await NetUtil().get(API.manager.dailyPaymentPrePay, params: {
"estateId": UserTool.appProveider.selectedHouse!.estateId, "estateId": UserTool.appProvider.selectedHouse!.estateId,
}); });
if (baseModel.success) { if (baseModel.success) {
return (baseModel.data as num).toDouble(); return (baseModel.data as num).toDouble();

@ -44,9 +44,7 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
title: '生活缴费', title: '生活缴费',
body: BeeListView( body: BeeListView(
path: API.manager.paymentRecord, path: API.manager.paymentRecord,
extraParams: { extraParams: {"estateId": UserTool.appProvider.selectedHouse!.estateId},
"estateId": UserTool.appProveider.selectedHouse!.estateId
},
controller: _refreshController, controller: _refreshController,
convert: (models) { convert: (models) {
return models.rows return models.rows

@ -157,7 +157,7 @@ class _LifePrePayPageState extends State<LifePrePayPage> {
try { try {
BaseModel baseModel = BaseModel baseModel =
await NetUtil().post(API.pay.dailPaymentPrePay, params: { await NetUtil().post(API.pay.dailPaymentPrePay, params: {
"estateId": UserTool.appProveider.selectedHouse!.estateId, "estateId": UserTool.appProvider.selectedHouse!.estateId,
"payType": 1, "payType": 1,
"payPrice": _editingController.text "payPrice": _editingController.text
}); });

@ -8,7 +8,7 @@ class PropertyFunc {
static Future<double> getDailyPaymentPrePay() async { static Future<double> getDailyPaymentPrePay() async {
BaseModel baseModel = BaseModel baseModel =
await NetUtil().get(API.manager.dailyPaymentPrePay, params: { await NetUtil().get(API.manager.dailyPaymentPrePay, params: {
"estateId": UserTool.appProveider.selectedHouse!.estateId, "estateId": UserTool.appProvider.selectedHouse!.estateId,
}); });
if (baseModel.success) { if (baseModel.success) {
return (baseModel.data as num).toDouble(); return (baseModel.data as num).toDouble();
@ -21,7 +21,7 @@ class PropertyFunc {
static Future<double> getFindUnpaidAmount() async { static Future<double> getFindUnpaidAmount() async {
BaseModel baseModel = BaseModel baseModel =
await NetUtil().get(API.manager.findUnpaidAmount, params: { await NetUtil().get(API.manager.findUnpaidAmount, params: {
"estateId": UserTool.appProveider.selectedHouse!.estateId, "estateId": UserTool.appProvider.selectedHouse!.estateId,
}); });
if (baseModel.success) { if (baseModel.success) {
return (baseModel.data as num).toDouble(); return (baseModel.data as num).toDouble();

@ -58,12 +58,12 @@ class _NewRenovationAddPageState extends State<NewRenovationAddPage> {
), ),
bottomNavi: BottomButton( bottomNavi: BottomButton(
onPressed: () async { onPressed: () async {
if (UserTool.appProveider.selectedHouse != null) { if (UserTool.appProvider.selectedHouse != null) {
BaseModel baseModel = BaseModel baseModel =
await NetUtil().post(API.manager.insertNewRenovation, await NetUtil().post(API.manager.insertNewRenovation,
params: { params: {
"estateId": "estateId":
UserTool.appProveider.selectedHouse!.estateId, UserTool.appProvider.selectedHouse!.estateId,
"constructionUnit": _unitController.text, "constructionUnit": _unitController.text,
"director": _directorController.text, "director": _directorController.text,
"directorTel": _telController.text, "directorTel": _telController.text,

@ -1,11 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/base/base_style.dart'; import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/extensions/num_ext.dart'; import 'package:aku_new_community/extensions/num_ext.dart';
import 'package:aku_new_community/extensions/widget_list_ext.dart'; import 'package:aku_new_community/extensions/widget_list_ext.dart';
@ -20,6 +12,12 @@ import 'package:aku_new_community/utils/developer_util.dart';
import 'package:aku_new_community/utils/websocket/web_socket_util.dart'; 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/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
class SettingsPage extends StatefulWidget { class SettingsPage extends StatefulWidget {
SettingsPage({Key? key}) : super(key: key); SettingsPage({Key? key}) : super(key: key);
@ -179,7 +177,7 @@ class _SettingsPageState extends State<SettingsPage> {
children: [ children: [
'接收火灾报警通知'.text.size(28.sp).color(ktextPrimary).bold.make().expand(), '接收火灾报警通知'.text.size(28.sp).color(ktextPrimary).bold.make().expand(),
CupertinoSwitch( CupertinoSwitch(
value: UserTool.appProveider.fireAlert, value: UserTool.appProvider.fireAlert,
onChanged: (value) { onChanged: (value) {
if (value) { if (value) {
WebSocketUtil().startWebSocket(); WebSocketUtil().startWebSocket();

@ -281,7 +281,7 @@ class _SharePayPageState extends State<SharePayPage> {
onRefresh: () async { onRefresh: () async {
BaseModel baseModel = BaseModel baseModel =
await NetUtil().get(API.manager.sharePayList, params: { await NetUtil().get(API.manager.sharePayList, params: {
'estateId': UserTool.appProveider.selectedHouse?.estateId, 'estateId': UserTool.appProvider.selectedHouse?.estateId,
}); });
_models = (baseModel.data as List) _models = (baseModel.data as List)
.map((e) => SharePayListModel.fromJson(e)) .map((e) => SharePayListModel.fromJson(e))

@ -79,7 +79,7 @@ class _CodeMessagePageState extends State<CodeMessagePage> {
var re = await SignFunc.loginBySms( var re = await SignFunc.loginBySms(
widget.tel, widget.tel,
code, code,
UserTool.appProveider.pickedCityAndCommunity! UserTool.appProvider.pickedCityAndCommunity!
.communityModel!.id); .communityModel!.id);
if (re.data['success']) { if (re.data['success']) {
await UserTool.userProvider await UserTool.userProvider
@ -111,18 +111,18 @@ class _CodeMessagePageState extends State<CodeMessagePage> {
onPressed: () async { onPressed: () async {
var base = await SignFunc.sendMessageCode( var base = await SignFunc.sendMessageCode(
widget.tel, widget.tel,
UserTool.appProveider.pickedCityAndCommunity! UserTool.appProvider.pickedCityAndCommunity!
.communityModel!.id); .communityModel!.id);
if (base.success) { if (base.success) {
_errorMessage = null; _errorMessage = null;
UserTool.appProveider.startTimer(); UserTool.appProvider.startTimer();
} else { } else {
BotToast.showText(text: base.msg); BotToast.showText(text: base.msg);
} }
}, },
child: (UserTool.appProveider.second >= 60 child: (UserTool.appProvider.second >= 60
? '重新发送验证码' ? '重新发送验证码'
: '${UserTool.appProveider.second}秒后可重新发送') : '${UserTool.appProvider.second}秒后可重新发送')
.text .text
.size(28.sp) .size(28.sp)
.color(Color(0xFF5096F1)) .color(Color(0xFF5096F1))

@ -1,16 +1,15 @@
import 'package:flutter/material.dart'; import 'package:aku_new_community/pages/sign/login/forgot_set_psd_page.dart';
import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart';
import 'package:aku_new_community/pages/sign/widget/tel_text_field.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/pages/sign/login/forgot_set_psd_page.dart';
import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart';
import 'package:aku_new_community/pages/sign/widget/tel_text_field.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import '../sign_func.dart'; import '../sign_func.dart';
class ForgotPsdPage extends StatefulWidget { class ForgotPsdPage extends StatefulWidget {
@ -74,13 +73,13 @@ class _ForgotPsdPageState extends State<ForgotPsdPage> {
} }
var base = await SignFunc.sendForgotMessageCode( var base = await SignFunc.sendForgotMessageCode(
_telController.text, _telController.text,
UserTool.appProveider.pickedCityAndCommunity! UserTool.appProvider.pickedCityAndCommunity!
.communityModel!.id); .communityModel!.id);
if (base.success) { if (base.success) {
Get.to(() => ForgotSetPsdPage( Get.to(() => ForgotSetPsdPage(
tel: _telController.text, tel: _telController.text,
)); ));
UserTool.appProveider.startTimer(); UserTool.appProvider.startTimer();
} else { } else {
BotToast.showText(text: base.msg); BotToast.showText(text: base.msg);
} }

@ -1,17 +1,16 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/pages/sign/login/psd_verify.dart'; import 'package:aku_new_community/pages/sign/login/psd_verify.dart';
import 'package:aku_new_community/pages/sign/sign_func.dart'; import 'package:aku_new_community/pages/sign/sign_func.dart';
import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart'; import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart';
import 'package:aku_new_community/pages/sign/widget/psd_text_field.dart'; import 'package:aku_new_community/pages/sign/widget/psd_text_field.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'login_page.dart'; import 'login_page.dart';
class ForgotSetPsdPage extends StatefulWidget { class ForgotSetPsdPage extends StatefulWidget {
@ -125,13 +124,13 @@ class _ForgotSetPsdPageState extends State<ForgotSetPsdPage> {
onTap: () async { onTap: () async {
var base = await SignFunc.sendMessageCode( var base = await SignFunc.sendMessageCode(
widget.tel, widget.tel,
UserTool.appProveider.pickedCityAndCommunity! UserTool.appProvider.pickedCityAndCommunity!
.communityModel!.id); .communityModel!.id);
if (base.success) { if (base.success) {
Get.to(() => ForgotSetPsdPage( Get.to(() => ForgotSetPsdPage(
tel: widget.tel, tel: widget.tel,
)); ));
UserTool.appProveider.startTimer(); UserTool.appProvider.startTimer();
} else { } else {
BotToast.showText(text: base.msg); BotToast.showText(text: base.msg);
} }
@ -139,7 +138,7 @@ class _ForgotSetPsdPageState extends State<ForgotSetPsdPage> {
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
'${UserTool.appProveider.second < 60 ? '${UserTool.appProveider.second}秒后重新获取' : '获取验证码'}' '${UserTool.appProvider.second < 60 ? '${UserTool.appProvider.second}秒后重新获取' : '获取验证码'}'
.text .text
.size(28.sp) .size(28.sp)
.color(Color(0xFF5096F1)) .color(Color(0xFF5096F1))

@ -102,7 +102,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
_tel.text, _tel.text,
_psd.text, _psd.text,
UserTool UserTool
.appProveider.pickedCityAndCommunity!.communityModel!.id); .appProvider.pickedCityAndCommunity!.communityModel!.id);
if (response.data['success']) { if (response.data['success']) {
await UserTool.userProvider.setLogin(response.data['data']); await UserTool.userProvider.setLogin(response.data['data']);
await UserTool.dataProvider.addHistories(); await UserTool.dataProvider.addHistories();
@ -127,7 +127,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
BotToast.showText(text: '请输入正确的手机号!'); BotToast.showText(text: '请输入正确的手机号!');
return false; return false;
} }
if (UserTool.appProveider.pickedCityAndCommunity == null) { if (UserTool.appProvider.pickedCityAndCommunity == null) {
BotToast.showText(text: '请先选择小区!'); BotToast.showText(text: '请先选择小区!');
return false; return false;
} }
@ -151,7 +151,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
TelTextField(controller: _tel), TelTextField(controller: _tel),
100.w.heightBox, 100.w.heightBox,
LoginButtonWidget( LoginButtonWidget(
onTap: UserTool.appProveider.second < 60 onTap: UserTool.appProvider.second < 60
? () {} ? () {}
: () async { : () async {
var check = checkInput(); var check = checkInput();
@ -160,7 +160,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
} }
var base = await SignFunc.sendMessageCode( var base = await SignFunc.sendMessageCode(
_tel.text, _tel.text,
UserTool.appProveider.pickedCityAndCommunity! UserTool.appProvider.pickedCityAndCommunity!
.communityModel!.id); .communityModel!.id);
if (base.success) { if (base.success) {
Get.to(() => CodeMessagePage(tel: _tel.text)); Get.to(() => CodeMessagePage(tel: _tel.text));

@ -1,11 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/constants/api.dart';
import 'package:aku_new_community/constants/saas_api.dart'; import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/models/login/community_model.dart'; import 'package:aku_new_community/models/login/community_model.dart';
import 'package:aku_new_community/models/login/history_login_model.dart'; import 'package:aku_new_community/models/login/history_login_model.dart';
@ -14,6 +6,11 @@ import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:aku_new_community/widget/picker/bee_city_picker.dart'; import 'package:aku_new_community/widget/picker/bee_city_picker.dart';
import 'package:aku_new_community/widget/picker/bee_community_picker.dart'; import 'package:aku_new_community/widget/picker/bee_community_picker.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class SelectCommunity extends StatefulWidget { class SelectCommunity extends StatefulWidget {
const SelectCommunity({ const SelectCommunity({
@ -26,7 +23,7 @@ class SelectCommunity extends StatefulWidget {
class _SelectCommunityState extends State<SelectCommunity> { class _SelectCommunityState extends State<SelectCommunity> {
String get cityName { String get cityName {
var _model = UserTool.appProveider.pickedCityAndCommunity; var _model = UserTool.appProvider.pickedCityAndCommunity;
if (_model == null) { if (_model == null) {
return '请选择省、市、县/区'; return '请选择省、市、县/区';
} else { } else {
@ -38,7 +35,7 @@ class _SelectCommunityState extends State<SelectCommunity> {
String get communityName { String get communityName {
var _community = var _community =
UserTool.appProveider.pickedCityAndCommunity?.communityModel; UserTool.appProvider.pickedCityAndCommunity?.communityModel;
if (_community == null) { if (_community == null) {
return '请选择小区'; return '请选择小区';
} else { } else {
@ -54,10 +51,9 @@ class _SelectCommunityState extends State<SelectCommunity> {
@override @override
void deactivate() { void deactivate() {
Future.delayed(Duration(milliseconds: 0), () async { Future.delayed(Duration(milliseconds: 0), () async {
if (UserTool.appProveider.pickedCityAndCommunity != null && if (UserTool.appProvider.pickedCityAndCommunity != null &&
UserTool.appProveider.pickedCityAndCommunity?.communityModel == UserTool.appProvider.pickedCityAndCommunity?.communityModel == null) {
null) { UserTool.appProvider.resetPickedCity();
UserTool.appProveider.resetPickedCity();
} }
}); });
super.deactivate(); super.deactivate();
@ -69,7 +65,7 @@ class _SelectCommunityState extends State<SelectCommunity> {
onTap: () async { onTap: () async {
var _city = await BeeCityPicker.pick(context); var _city = await BeeCityPicker.pick(context);
if (_city != null) { if (_city != null) {
UserTool.appProveider.setPickedCity(city: _city); UserTool.appProvider.setPickedCity(city: _city);
} }
setState(() {}); setState(() {});
}, },
@ -98,7 +94,7 @@ class _SelectCommunityState extends State<SelectCommunity> {
List<CommunityModel> _communities = []; List<CommunityModel> _communities = [];
var base = await NetUtil().get(SAASAPI.login.allCommunity, params: { var base = await NetUtil().get(SAASAPI.login.allCommunity, params: {
'cityId': UserTool 'cityId': UserTool
.appProveider.pickedCityAndCommunity!.cityModel.district.id, .appProvider.pickedCityAndCommunity!.cityModel.district.id,
}); });
if (base.success) { if (base.success) {
_communities = (base.data as List) _communities = (base.data as List)
@ -109,7 +105,7 @@ class _SelectCommunityState extends State<SelectCommunity> {
var _community = await BeeCommunityPicker.pick(context, _communities); var _community = await BeeCommunityPicker.pick(context, _communities);
print(_community?.name); print(_community?.name);
if (_community != null) { if (_community != null) {
UserTool.appProveider.setPickedCity(community: _community); UserTool.appProvider.setPickedCity(community: _community);
} }
setState(() {}); setState(() {});
}, },
@ -152,9 +148,8 @@ class _SelectCommunityState extends State<SelectCommunity> {
); );
return WillPopScope( return WillPopScope(
onWillPop: () async { onWillPop: () async {
var bool = UserTool.appProveider.pickedCityAndCommunity != null && var bool = UserTool.appProvider.pickedCityAndCommunity != null &&
UserTool.appProveider.pickedCityAndCommunity?.communityModel == UserTool.appProvider.pickedCityAndCommunity?.communityModel == null;
null;
if (bool) { if (bool) {
BotToast.showText(text: '请选择小区'); BotToast.showText(text: '请选择小区');
return false; return false;

@ -146,7 +146,7 @@ class SignFunc {
'tel': tel, 'tel': tel,
'telCode': telcode, 'telCode': telcode,
'communityId': 'communityId':
UserTool.appProveider.pickedCityAndCommunity!.communityModel!.id UserTool.appProvider.pickedCityAndCommunity!.communityModel!.id
}, },
showMessage: true); showMessage: true);
if (baseModel.data == null || !baseModel.success) return false; if (baseModel.data == null || !baseModel.success) return false;

@ -9,6 +9,7 @@ import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/hive_store.dart'; import 'package:aku_new_community/utils/hive_store.dart';
import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:amap_flutter_location/amap_flutter_location.dart'; import 'package:amap_flutter_location/amap_flutter_location.dart';
import 'package:equatable/equatable.dart';
// import 'package:amap_search_fluttify/amap_search_fluttify.dart'; // import 'package:amap_search_fluttify/amap_search_fluttify.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
@ -108,13 +109,14 @@ class _SplashPageState extends State<SplashPage> {
await Permission.locationWhenInUse.request(); await Permission.locationWhenInUse.request();
} }
// //
EquatableConfig.stringify = true;
AMapFlutterLocation.updatePrivacyShow(true, true); AMapFlutterLocation.updatePrivacyShow(true, true);
AMapFlutterLocation.updatePrivacyAgree(true); AMapFlutterLocation.updatePrivacyAgree(true);
MainInitialize.initTheme(); MainInitialize.initTheme();
MainInitialize.initWechat(); MainInitialize.initWechat();
MainInitialize.initWebSocket(); MainInitialize.initWebSocket();
UserTool.appProveider.startLocation(); UserTool.appProvider.startLocation();
UserTool.appProveider.initApplications(); UserTool.appProvider.initApplications();
// //
await UserTool.dataProvider.init(); await UserTool.dataProvider.init();
// //

@ -330,6 +330,7 @@ class AppProvider extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
///
HistoryLoginModel? _pickedCityAndCommunity; HistoryLoginModel? _pickedCityAndCommunity;
HistoryLoginModel? get pickedCityAndCommunity => _pickedCityAndCommunity; HistoryLoginModel? get pickedCityAndCommunity => _pickedCityAndCommunity;

@ -43,7 +43,7 @@ class DataProvider extends ChangeNotifier {
List<HistoryLoginModel> get loginHistories => _loginHistories; List<HistoryLoginModel> get loginHistories => _loginHistories;
Future addHistories() async { Future addHistories() async {
_loginHistories.insert(0, UserTool.appProveider.pickedCityAndCommunity!); _loginHistories.insert(0, UserTool.appProvider.pickedCityAndCommunity!);
if (_loginHistories.length > 4) { if (_loginHistories.length > 4) {
_loginHistories.removeAt(_loginHistories.length - 1); _loginHistories.removeAt(_loginHistories.length - 1);
} }

@ -27,8 +27,8 @@ class _LocationViewState extends State<LocationView> {
await Permission.locationWhenInUse.request(); await Permission.locationWhenInUse.request();
} }
_target = LatLng( _target = LatLng(
(UserTool.appProveider.location?['latitude'] ?? 0) as double, (UserTool.appProvider.location?['latitude'] ?? 0) as double,
(UserTool.appProveider.location?['longitude'] ?? 0) as double, (UserTool.appProvider.location?['longitude'] ?? 0) as double,
); );
// poiList = await search.AmapSearch.instance.searchAround(search.LatLng( // poiList = await search.AmapSearch.instance.searchAround(search.LatLng(
// (UserTool.appProveider.location?['latitude'] ?? 0) as double, // (UserTool.appProveider.location?['latitude'] ?? 0) as double,

@ -65,7 +65,7 @@ class _AddHouseKeepingPageState extends State<AddHouseKeepingPage> {
List<String> urls = await NetUtil() List<String> urls = await NetUtil()
.uploadFiles(_files, API.upload.uploadHouseKeepingPhotos); .uploadFiles(_files, API.upload.uploadHouseKeepingPhotos);
bool result = await HouseKeepingFunc.submitHouseKeeping( bool result = await HouseKeepingFunc.submitHouseKeeping(
UserTool.appProveider.selectedHouse!.estateId, UserTool.appProvider.selectedHouse!.estateId,
_selectType! + 1, _selectType! + 1,
_editingController.text, _editingController.text,
urls); urls);

@ -1,15 +1,5 @@
import 'dart:io'; import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:open_file/open_file.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/base/base_style.dart'; import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/extensions/widget_list_ext.dart'; import 'package:aku_new_community/extensions/widget_list_ext.dart';
import 'package:aku_new_community/ui/profile/house/house_func.dart'; import 'package:aku_new_community/ui/profile/house/house_func.dart';
@ -21,6 +11,14 @@ import 'package:aku_new_community/widget/others/upload_widget.dart';
import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:aku_new_community/widget/picker/bee_date_picker.dart'; import 'package:aku_new_community/widget/picker/bee_date_picker.dart';
import 'package:aku_new_community/widget/views/doc_view.dart'; import 'package:aku_new_community/widget/views/doc_view.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:open_file/open_file.dart';
import 'package:velocity_x/velocity_x.dart';
class UploadEmptyListPage extends StatefulWidget { class UploadEmptyListPage extends StatefulWidget {
UploadEmptyListPage({Key? key}) : super(key: key); UploadEmptyListPage({Key? key}) : super(key: key);
@ -33,7 +31,7 @@ class _UploadEmptyListPageState extends State<UploadEmptyListPage> {
List<File> _files = []; List<File> _files = [];
List<String> _urls = []; List<String> _urls = [];
int get sysLeaseId => UserTool.appProveider.selectedHouse!.sysLeaseId ?? 0; int get sysLeaseId => UserTool.appProvider.selectedHouse!.sysLeaseId ?? 0;
DateTime? _date = DateTime.now(); DateTime? _date = DateTime.now();
@override @override

@ -1,13 +1,3 @@
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:power_logger/power_logger.dart';
import 'package:provider/provider.dart';
import 'package:aku_new_community/base/base_style.dart'; import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/const/resource.dart'; import 'package:aku_new_community/const/resource.dart';
import 'package:aku_new_community/models/house/lease_detail_model.dart'; import 'package:aku_new_community/models/house/lease_detail_model.dart';
@ -26,6 +16,14 @@ import 'package:aku_new_community/ui/profile/house/my_house_list.dart';
import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:power_logger/power_logger.dart';
import 'package:provider/provider.dart';
class HouseOwnersPage extends StatefulWidget { class HouseOwnersPage extends StatefulWidget {
final int identify; final int identify;
@ -45,11 +43,11 @@ class _HouseOwnersPageState extends State<HouseOwnersPage> {
} }
int get currentSysLeaseId { int get currentSysLeaseId {
if (UserTool.appProveider.selectedHouse!.sysLeaseId == null) { if (UserTool.appProvider.selectedHouse!.sysLeaseId == null) {
BotToast.showText(text: '无租赁合同!请先签订租赁合同'); BotToast.showText(text: '无租赁合同!请先签订租赁合同');
return -1; return -1;
} }
return UserTool.appProveider.selectedHouse!.sysLeaseId!; return UserTool.appProvider.selectedHouse!.sysLeaseId!;
} }
/// ///
@ -109,7 +107,7 @@ class _HouseOwnersPageState extends State<HouseOwnersPage> {
Function cancel = BotToast.showLoading(); Function cancel = BotToast.showLoading();
try { try {
await UserTool.userProvider.updateMyHouseInfo(); await UserTool.userProvider.updateMyHouseInfo();
UserTool.appProveider.updateHouses(await HouseFunc.passedHouses); UserTool.appProvider.updateHouses(await HouseFunc.passedHouses);
} catch (e) { } catch (e) {
LoggerData.addData(e); LoggerData.addData(e);
} }

@ -1,13 +1,5 @@
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:get/get.dart';
import 'package:power_logger/power_logger.dart';
import 'package:aku_new_community/base/base_style.dart'; import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/constants/api.dart'; import 'package:aku_new_community/constants/api.dart';
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/models/house/lease_fee_list_model.dart'; import 'package:aku_new_community/models/house/lease_fee_list_model.dart';
import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart'; import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart';
import 'package:aku_new_community/pages/life_pay/pay_util.dart'; import 'package:aku_new_community/pages/life_pay/pay_util.dart';
@ -17,6 +9,11 @@ import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/buttons/bottom_button.dart'; import 'package:aku_new_community/widget/buttons/bottom_button.dart';
import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:power_logger/power_logger.dart';
class LeasePayQueryDetailPage extends StatefulWidget { class LeasePayQueryDetailPage extends StatefulWidget {
final LeaseFeeListModel model; final LeaseFeeListModel model;
@ -62,7 +59,7 @@ class _LeasePayQueryDetailPageState extends State<LeasePayQueryDetailPage> {
bool result = false; bool result = false;
try { try {
String code = await HouseFunc().leaseRentBillOrder( String code = await HouseFunc().leaseRentBillOrder(
UserTool.appProveider.selectedHouse!.sysLeaseId!, UserTool.appProvider.selectedHouse!.sysLeaseId!,
1, // 1, //
widget.model.price.toDouble()); widget.model.price.toDouble());
result = await PayUtil() result = await PayUtil()
@ -133,7 +130,7 @@ class _LeasePayQueryDetailPageState extends State<LeasePayQueryDetailPage> {
children: [ children: [
'对应房屋'.text.size(28.sp).color(ktextSubColor).make(), '对应房屋'.text.size(28.sp).color(ktextSubColor).make(),
Spacer(), Spacer(),
'${S.of(context)!.tempPlotName}·${UserTool.appProveider.selectedHouse!.roomName}' '${S.of(context)!.tempPlotName}·${UserTool.appProvider.selectedHouse!.roomName}'
.text .text
.size(28.sp) .size(28.sp)
.black .black

@ -186,7 +186,7 @@ class _LeasePayQueryPageState extends State<LeasePayQueryPage> {
children: [ children: [
model.typeString.text.size(28.sp).black.bold.make(), model.typeString.text.size(28.sp).black.bold.make(),
Spacer(), Spacer(),
'${S.of(context)!.tempPlotName} ${UserTool.appProveider.selectedHouse!.roomName}' '${S.of(context)!.tempPlotName} ${UserTool.appProvider.selectedHouse!.roomName}'
.text .text
.size(24.sp) .size(24.sp)
.color(ktextSubColor) .color(ktextSubColor)

@ -1,12 +1,11 @@
import 'dart:async'; import 'dart:async';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:power_logger/power_logger.dart'; import 'package:power_logger/power_logger.dart';
import 'package:web_socket_channel/io.dart'; import 'package:web_socket_channel/io.dart';
import 'package:web_socket_channel/web_socket_channel.dart'; import 'package:web_socket_channel/web_socket_channel.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
const String baseUri = 'wss://shop.kaidalai.cn/websocket/app'; const String baseUri = 'wss://shop.kaidalai.cn/websocket/app';
enum SOCKETSTATUS { enum SOCKETSTATUS {
CONNECTED, // CONNECTED, //
@ -108,7 +107,7 @@ class WebSocketUtil {
} }
WebSocketUtil().setPrintHeart(true); WebSocketUtil().setPrintHeart(true);
UserTool.appProveider.setFireAlert(true); UserTool.appProvider.setFireAlert(true);
} }
// //
@ -183,7 +182,7 @@ class WebSocketUtil {
} }
endReconnect(); endReconnect();
destoryHeart(); destoryHeart();
UserTool.appProveider.setFireAlert(false); UserTool.appProvider.setFireAlert(false);
_socketStatus = SOCKETSTATUS.CLOSED; _socketStatus = SOCKETSTATUS.CLOSED;
} }

@ -1,15 +1,14 @@
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:aku_new_community/provider/app_provider.dart'; import 'package:aku_new_community/provider/app_provider.dart';
import 'package:aku_new_community/provider/data_provider.dart'; import 'package:aku_new_community/provider/data_provider.dart';
import 'package:aku_new_community/provider/user_provider.dart'; import 'package:aku_new_community/provider/user_provider.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
class UserTool { class UserTool {
static UserProvider get userProvider => static UserProvider get userProvider =>
Provider.of<UserProvider>(Get.context!, listen: false); Provider.of<UserProvider>(Get.context!, listen: false);
static AppProvider get appProveider => static AppProvider get appProvider =>
Provider.of<AppProvider>(Get.context!, listen: false); Provider.of<AppProvider>(Get.context!, listen: false);
static DataProvider get dataProvider => static DataProvider get dataProvider =>
Provider.of<DataProvider>(Get.context!, listen: false); Provider.of<DataProvider>(Get.context!, listen: false);

Loading…
Cancel
Save