替换netutil model

完成登录注册页面及接口
master
张萌 3 years ago
parent b4f9982603
commit 883013fef0

@ -0,0 +1,10 @@
part of 'saas_api.dart';
class _OtherApi {
_File file = _File();
}
class _File {
///app
String get uploadImg => '/butlerApp/user/upload/uploadImg';
}

@ -0,0 +1,115 @@
import 'package:aku_new_community_manager/tools/user_tool.dart';
part 'other_api.dart';
class SAASAPI {
///HOST
static const String host = 'http://121.41.26.225:8006';
///
static const String baseURL = '$host';
///
static String get resource =>
'https://saas.kaidalai.cn/resource/${UserTool.userProvider.infoModel!.id}/';
static String image(String? path) => '$resource$path';
static String file(String? path) => '$resource$path';
static const int networkTimeOut = 10000;
///
static _Login login = _Login();
static _Inspection inspection = _Inspection();
static _City city = _City();
static _User user = _User();
///
static _OtherApi other = _OtherApi();
}
class _Login {
///
String get allCommunity => '/butlerApp/login/findAllCommunity';
///
String get login => '/butlerApp/login/loginTelPwd';
///
String get sendSMSCode => '/butlerApp/login/sendTelCode';
///app
String get loginTelCode => '/butlerApp/login/loginTelCode';
}
class _Inspection {
///
String get getLocation => '/butlerApp/user/inspection/getLocation';
///
String get uploadLocation => '/butlerApp/user/inspection/uploadLocation';
///
String get list => '/butlerApp/user/inspection/list';
///id
String get detail => '/butlerApp/user/inspection/detail';
///id
String get findPointByPlanId =>
'/butlerApp/user/inspection/findPointByPlanId';
///id
String get findPointByExecuteId =>
'/butlerApp/user/inspection/findPointByExecuteId';
///
String get startInspection => '/butlerApp/user/inspection/startInspection';
///
String get findCheckDetailByQR =>
'/butlerApp/user/inspection/findCheckDetailByQR';
///
String get submit => '/butlerApp/user/inspection/submit';
///2.3.
String get findExecutePointInfo =>
'/butlerApp/user/inspection/findExecutePointInfo';
///1.4.
String get findPlanPointInfo =>
'/butlerApp/user/inspection/findPlanPointInfo';
}
class _City {
///
String get allCity => '/app/city/allCity';
}
class _User {
///
String get userProfile => '/app/user/findDetail';
///
String get settingPsd => '/app/user/settingPassword';
///
String get settingForgotPsd => '/app/user/forgetPassword';
///app()
String get sendForgotTelCode => '/app/user/sendTelCodeForgetPwd';
///
String get checkNickRepeat => '/app/user/checkNickNameRepeat';
///
String get setNickName => '/app/user/settingNickName';
///
String get certification => '/app/user/verified';
///
String get updateAvatar => '/app/user/updateAvatarImg';
}

@ -0,0 +1,506 @@
/// GENERATED CODE - DO NOT MODIFY BY HAND
/// *****************************************************
/// FlutterGen
/// *****************************************************
// ignore_for_file: directives_ordering,unnecessary_import
import 'package:flutter/widgets.dart';
class $AssetsHomeGen {
const $AssetsHomeGen();
/// File path: assets/home/app_alarm.png
AssetGenImage get appAlarm =>
const AssetGenImage('assets/home/app_alarm.png');
/// File path: assets/home/bee_task.png
AssetGenImage get beeTask => const AssetGenImage('assets/home/bee_task.png');
/// File path: assets/home/clock_in_out.png
AssetGenImage get clockInOut =>
const AssetGenImage('assets/home/clock_in_out.png');
/// File path: assets/home/device_alarm.png
AssetGenImage get deviceAlarm =>
const AssetGenImage('assets/home/device_alarm.png');
/// File path: assets/home/facilities.png
AssetGenImage get facilities =>
const AssetGenImage('assets/home/facilities.png');
/// File path: assets/home/fire_alarm.png
AssetGenImage get fireAlarm =>
const AssetGenImage('assets/home/fire_alarm.png');
/// File path: assets/home/house_keeping.png
AssetGenImage get houseKeeping =>
const AssetGenImage('assets/home/house_keeping.png');
/// File path: assets/home/hygienice.png
AssetGenImage get hygienice =>
const AssetGenImage('assets/home/hygienice.png');
/// File path: assets/home/ic_Patrol.png
AssetGenImage get icPatrol =>
const AssetGenImage('assets/home/ic_Patrol.png');
/// File path: assets/home/ic_activity.png
AssetGenImage get icActivity =>
const AssetGenImage('assets/home/ic_activity.png');
/// File path: assets/home/ic_all.png
AssetGenImage get icAll => const AssetGenImage('assets/home/ic_all.png');
/// File path: assets/home/ic_article.png
AssetGenImage get icArticle =>
const AssetGenImage('assets/home/ic_article.png');
/// File path: assets/home/ic_borrow.png
AssetGenImage get icBorrow =>
const AssetGenImage('assets/home/ic_borrow.png');
/// File path: assets/home/ic_decoration.png
AssetGenImage get icDecoration =>
const AssetGenImage('assets/home/ic_decoration.png');
/// File path: assets/home/ic_facilities.png
AssetGenImage get icFacilities =>
const AssetGenImage('assets/home/ic_facilities.png');
/// File path: assets/home/ic_greening.png
AssetGenImage get icGreening =>
const AssetGenImage('assets/home/ic_greening.png');
/// File path: assets/home/ic_news.png
AssetGenImage get icNews => const AssetGenImage('assets/home/ic_news.png');
/// File path: assets/home/ic_police.png
AssetGenImage get icPolice =>
const AssetGenImage('assets/home/ic_police.png');
/// File path: assets/home/ic_scan.png
AssetGenImage get icScan => const AssetGenImage('assets/home/ic_scan.png');
/// File path: assets/home/ic_search.png
AssetGenImage get icSearch =>
const AssetGenImage('assets/home/ic_search.png');
/// File path: assets/home/ic_service.png
AssetGenImage get icService =>
const AssetGenImage('assets/home/ic_service.png');
/// File path: assets/home/ic_visitors.png
AssetGenImage get icVisitors =>
const AssetGenImage('assets/home/ic_visitors.png');
/// File path: assets/home/interview.png
AssetGenImage get interview =>
const AssetGenImage('assets/home/interview.png');
/// File path: assets/home/key.png
AssetGenImage get key => const AssetGenImage('assets/home/key.png');
/// File path: assets/home/nearby_pet.png
AssetGenImage get nearbyPet =>
const AssetGenImage('assets/home/nearby_pet.png');
/// File path: assets/home/nearby_service.png
AssetGenImage get nearbyService =>
const AssetGenImage('assets/home/nearby_service.png');
/// File path: assets/home/package.png
AssetGenImage get package => const AssetGenImage('assets/home/package.png');
/// File path: assets/home/provide_aged.png
AssetGenImage get provideAged =>
const AssetGenImage('assets/home/provide_aged.png');
/// File path: assets/home/rules.png
AssetGenImage get rules => const AssetGenImage('assets/home/rules.png');
/// File path: assets/home/second_hand_market.png
AssetGenImage get secondHandMarket =>
const AssetGenImage('assets/home/second_hand_market.png');
/// File path: assets/home/share_park.png
AssetGenImage get sharePark =>
const AssetGenImage('assets/home/share_park.png');
/// File path: assets/home/shopping_mall.png
AssetGenImage get shoppingMall =>
const AssetGenImage('assets/home/shopping_mall.png');
/// File path: assets/home/sos.png
AssetGenImage get sos => const AssetGenImage('assets/home/sos.png');
}
class $AssetsInspectionGen {
const $AssetsInspectionGen();
/// File path: assets/inspection/ic_date.png
AssetGenImage get icDate =>
const AssetGenImage('assets/inspection/ic_date.png');
/// File path: assets/inspection/ic_inspection_name.png
AssetGenImage get icInspectionName =>
const AssetGenImage('assets/inspection/ic_inspection_name.png');
/// File path: assets/inspection/ic_pattern.png
AssetGenImage get icPattern =>
const AssetGenImage('assets/inspection/ic_pattern.png');
/// File path: assets/inspection/ic_station.png
AssetGenImage get icStation =>
const AssetGenImage('assets/inspection/ic_station.png');
/// File path: assets/inspection/ic_way.png
AssetGenImage get icWay =>
const AssetGenImage('assets/inspection/ic_way.png');
/// File path: assets/inspection/ic_xunjian.png
AssetGenImage get icXunjian =>
const AssetGenImage('assets/inspection/ic_xunjian.png');
/// File path: assets/inspection/inspection_station.png
AssetGenImage get inspectionStation =>
const AssetGenImage('assets/inspection/inspection_station.png');
}
class $AssetsManageGen {
const $AssetsManageGen();
/// File path: assets/manage/add.png
AssetGenImage get add => const AssetGenImage('assets/manage/add.png');
/// File path: assets/manage/address.png
AssetGenImage get address => const AssetGenImage('assets/manage/address.png');
/// File path: assets/manage/article.png
AssetGenImage get article => const AssetGenImage('assets/manage/article.png');
/// File path: assets/manage/borrow.png
AssetGenImage get borrow => const AssetGenImage('assets/manage/borrow.png');
/// File path: assets/manage/check.png
AssetGenImage get check => const AssetGenImage('assets/manage/check.png');
/// File path: assets/manage/circuit.png
AssetGenImage get circuit => const AssetGenImage('assets/manage/circuit.png');
/// File path: assets/manage/clock.png
AssetGenImage get clock => const AssetGenImage('assets/manage/clock.png');
/// File path: assets/manage/decoration.png
AssetGenImage get decoration =>
const AssetGenImage('assets/manage/decoration.png');
/// File path: assets/manage/dingwei.png
AssetGenImage get dingwei => const AssetGenImage('assets/manage/dingwei.png');
/// File path: assets/manage/estate.png
AssetGenImage get estate => const AssetGenImage('assets/manage/estate.png');
/// File path: assets/manage/home.png
AssetGenImage get home => const AssetGenImage('assets/manage/home.png');
/// File path: assets/manage/ic_announce.png
AssetGenImage get icAnnounce =>
const AssetGenImage('assets/manage/ic_announce.png');
/// File path: assets/manage/ic_car.png
AssetGenImage get icCar => const AssetGenImage('assets/manage/ic_car.png');
/// File path: assets/manage/ic_daofang.png
AssetGenImage get icDaofang =>
const AssetGenImage('assets/manage/ic_daofang.png');
/// File path: assets/manage/ic_guoqi.png
AssetGenImage get icGuoqi =>
const AssetGenImage('assets/manage/ic_guoqi.png');
/// File path: assets/manage/ic_image.png
AssetGenImage get icImage =>
const AssetGenImage('assets/manage/ic_image.png');
/// File path: assets/manage/ic_renwu.png
AssetGenImage get icRenwu =>
const AssetGenImage('assets/manage/ic_renwu.png');
/// File path: assets/manage/ic_time.png
AssetGenImage get icTime => const AssetGenImage('assets/manage/ic_time.png');
/// File path: assets/manage/ic_wancheng.png
AssetGenImage get icWancheng =>
const AssetGenImage('assets/manage/ic_wancheng.png');
/// File path: assets/manage/ic_weidao.png
AssetGenImage get icWeidao =>
const AssetGenImage('assets/manage/ic_weidao.png');
/// File path: assets/manage/ic_zhuangxiu.png
AssetGenImage get icZhuangxiu =>
const AssetGenImage('assets/manage/ic_zhuangxiu.png');
/// File path: assets/manage/ic_zuofei.png
AssetGenImage get icZuofei =>
const AssetGenImage('assets/manage/ic_zuofei.png');
/// File path: assets/manage/info.png
AssetGenImage get info => const AssetGenImage('assets/manage/info.png');
/// File path: assets/manage/key.png
AssetGenImage get key => const AssetGenImage('assets/manage/key.png');
/// File path: assets/manage/location.png
AssetGenImage get location =>
const AssetGenImage('assets/manage/location.png');
/// File path: assets/manage/lock.png
AssetGenImage get lock => const AssetGenImage('assets/manage/lock.png');
/// File path: assets/manage/police.png
AssetGenImage get police => const AssetGenImage('assets/manage/police.png');
/// File path: assets/manage/remaining.png
AssetGenImage get remaining =>
const AssetGenImage('assets/manage/remaining.png');
/// File path: assets/manage/security.png
AssetGenImage get security =>
const AssetGenImage('assets/manage/security.png');
/// File path: assets/manage/status.png
AssetGenImage get status => const AssetGenImage('assets/manage/status.png');
/// File path: assets/manage/submit_success.png
AssetGenImage get submitSuccess =>
const AssetGenImage('assets/manage/submit_success.png');
/// File path: assets/manage/wall.png
AssetGenImage get wall => const AssetGenImage('assets/manage/wall.png');
/// File path: assets/manage/warning.png
AssetGenImage get warning => const AssetGenImage('assets/manage/warning.png');
/// File path: assets/manage/waterway.png
AssetGenImage get waterway =>
const AssetGenImage('assets/manage/waterway.png');
/// File path: assets/manage/window.png
AssetGenImage get window => const AssetGenImage('assets/manage/window.png');
}
class $AssetsMessageGen {
const $AssetsMessageGen();
/// File path: assets/message/ic_area.png
AssetGenImage get icArea => const AssetGenImage('assets/message/ic_area.png');
/// File path: assets/message/ic_people.png
AssetGenImage get icPeople =>
const AssetGenImage('assets/message/ic_people.png');
/// File path: assets/message/ic_phone.png
AssetGenImage get icPhone =>
const AssetGenImage('assets/message/ic_phone.png');
/// File path: assets/message/ic_pinglun.png
AssetGenImage get icPinglun =>
const AssetGenImage('assets/message/ic_pinglun.png');
/// File path: assets/message/ic_star.png
AssetGenImage get icStar => const AssetGenImage('assets/message/ic_star.png');
/// File path: assets/message/ic_tongzhi.png
AssetGenImage get icTongzhi =>
const AssetGenImage('assets/message/ic_tongzhi.png');
}
class $AssetsOutdoorGen {
const $AssetsOutdoorGen();
/// File path: assets/outdoor/ic_address.png
AssetGenImage get icAddress =>
const AssetGenImage('assets/outdoor/ic_address.png');
/// File path: assets/outdoor/ic_chuhu.png
AssetGenImage get icChuhu =>
const AssetGenImage('assets/outdoor/ic_chuhu.png');
/// File path: assets/outdoor/ic_goout.png
AssetGenImage get icGoout =>
const AssetGenImage('assets/outdoor/ic_goout.png');
/// File path: assets/outdoor/ic_home.png
AssetGenImage get icHome => const AssetGenImage('assets/outdoor/ic_home.png');
/// File path: assets/outdoor/ic_image.png
AssetGenImage get icImage =>
const AssetGenImage('assets/outdoor/ic_image.png');
/// File path: assets/outdoor/ic_people.png
AssetGenImage get icPeople =>
const AssetGenImage('assets/outdoor/ic_people.png');
/// File path: assets/outdoor/ic_phoneblue.png
AssetGenImage get icPhoneblue =>
const AssetGenImage('assets/outdoor/ic_phoneblue.png');
/// File path: assets/outdoor/ic_time.png
AssetGenImage get icTime => const AssetGenImage('assets/outdoor/ic_time.png');
/// File path: assets/outdoor/ic_transport.png
AssetGenImage get icTransport =>
const AssetGenImage('assets/outdoor/ic_transport.png');
/// File path: assets/outdoor/ic_weight.png
AssetGenImage get icWeight =>
const AssetGenImage('assets/outdoor/ic_weight.png');
/// File path: assets/outdoor/item2.png
AssetGenImage get item2 => const AssetGenImage('assets/outdoor/item2.png');
/// File path: assets/outdoor/item3.png
AssetGenImage get item3 => const AssetGenImage('assets/outdoor/item3.png');
/// File path: assets/outdoor/itme1.png
AssetGenImage get itme1 => const AssetGenImage('assets/outdoor/itme1.png');
}
class $AssetsStaticFixGen {
const $AssetsStaticFixGen();
/// File path: assets/static_fix/air1.png
AssetGenImage get air1 => const AssetGenImage('assets/static_fix/air1.png');
/// File path: assets/static_fix/air2.png
AssetGenImage get air2 => const AssetGenImage('assets/static_fix/air2.png');
/// File path: assets/static_fix/food.png
AssetGenImage get food => const AssetGenImage('assets/static_fix/food.png');
/// File path: assets/static_fix/food2.png
AssetGenImage get food2 => const AssetGenImage('assets/static_fix/food2.png');
/// File path: assets/static_fix/light1.png
AssetGenImage get light1 =>
const AssetGenImage('assets/static_fix/light1.png');
/// File path: assets/static_fix/light2.png
AssetGenImage get light2 =>
const AssetGenImage('assets/static_fix/light2.png');
/// File path: assets/static_fix/light3.png
AssetGenImage get light3 =>
const AssetGenImage('assets/static_fix/light3.png');
}
class $AssetsStaticTempGen {
const $AssetsStaticTempGen();
/// File path: assets/static_temp/drill.png
AssetGenImage get drill =>
const AssetGenImage('assets/static_temp/drill.png');
/// File path: assets/static_temp/f1.webp
AssetGenImage get f1 => const AssetGenImage('assets/static_temp/f1.webp');
/// File path: assets/static_temp/f2.webp
AssetGenImage get f2 => const AssetGenImage('assets/static_temp/f2.webp');
/// File path: assets/static_temp/f3.webp
AssetGenImage get f3 => const AssetGenImage('assets/static_temp/f3.webp');
/// File path: assets/static_temp/f4.webp
AssetGenImage get f4 => const AssetGenImage('assets/static_temp/f4.webp');
/// File path: assets/static_temp/f5.webp
AssetGenImage get f5 => const AssetGenImage('assets/static_temp/f5.webp');
/// File path: assets/static_temp/hammer.png
AssetGenImage get hammer =>
const AssetGenImage('assets/static_temp/hammer.png');
/// File path: assets/static_temp/ladder.png
AssetGenImage get ladder =>
const AssetGenImage('assets/static_temp/ladder.png');
}
class $AssetsUserGen {
const $AssetsUserGen();
/// File path: assets/user/ic_kefu.png
AssetGenImage get icKefu => const AssetGenImage('assets/user/ic_kefu.png');
/// File path: assets/user/ic_person.png
AssetGenImage get icPerson =>
const AssetGenImage('assets/user/ic_person.png');
/// File path: assets/user/ic_setup.png
AssetGenImage get icSetup => const AssetGenImage('assets/user/ic_setup.png');
}
class Assets {
Assets._();
static const $AssetsHomeGen home = $AssetsHomeGen();
static const $AssetsInspectionGen inspection = $AssetsInspectionGen();
static const $AssetsManageGen manage = $AssetsManageGen();
static const $AssetsMessageGen message = $AssetsMessageGen();
static const $AssetsOutdoorGen outdoor = $AssetsOutdoorGen();
static const AssetGenImage placeholder =
AssetGenImage('assets/placeholder.webp');
static const $AssetsStaticFixGen staticFix = $AssetsStaticFixGen();
static const $AssetsStaticTempGen staticTemp = $AssetsStaticTempGen();
static const $AssetsUserGen user = $AssetsUserGen();
}
class AssetGenImage extends AssetImage {
const AssetGenImage(String assetName) : super(assetName);
Image image({
Key? key,
ImageFrameBuilder? frameBuilder,
ImageLoadingBuilder? loadingBuilder,
ImageErrorWidgetBuilder? errorBuilder,
String? semanticLabel,
bool excludeFromSemantics = false,
double? width,
double? height,
Color? color,
BlendMode? colorBlendMode,
BoxFit? fit,
AlignmentGeometry alignment = Alignment.center,
ImageRepeat repeat = ImageRepeat.noRepeat,
Rect? centerSlice,
bool matchTextDirection = false,
bool gaplessPlayback = false,
bool isAntiAlias = false,
FilterQuality filterQuality = FilterQuality.low,
}) {
return Image(
key: key,
image: this,
frameBuilder: frameBuilder,
loadingBuilder: loadingBuilder,
errorBuilder: errorBuilder,
semanticLabel: semanticLabel,
excludeFromSemantics: excludeFromSemantics,
width: width,
height: height,
color: color,
colorBlendMode: colorBlendMode,
fit: fit,
alignment: alignment,
repeat: repeat,
centerSlice: centerSlice,
matchTextDirection: matchTextDirection,
gaplessPlayback: gaplessPlayback,
isAntiAlias: isAntiAlias,
filterQuality: filterQuality,
);
}
String get path => assetName;
}

@ -0,0 +1,13 @@
/// GENERATED CODE - DO NOT MODIFY BY HAND
/// *****************************************************
/// FlutterGen
/// *****************************************************
// ignore_for_file: directives_ordering,unnecessary_import
class FontFamily {
FontFamily._();
/// Font family: Bebas
static const String bebas = 'Bebas';
}

@ -7,20 +7,19 @@ part of 'today_clock_record_model.dart';
// **************************************************************************
TodayClockRecordModel _$TodayClockRecordModelFromJson(
Map<String, dynamic> json) {
return TodayClockRecordModel(
id: json['id'] as int,
startClockDate: json['startClockDate'] as String?,
endClockDate: json['endClockDate'] as String?,
cardReplacementDate: json['cardReplacementDate'] as String?,
operatorName: json['operatorName'] as String?,
clockName: json['clockName'] as String,
clockTel: json['clockTel'] as String,
createDate: json['createDate'] as String,
status: json['status'] as int,
firstTimeStart: json['firstTimeStart'] as String?,
firstTimeEnd: json['firstTimeEnd'] as String?,
secondTimeStart: json['secondTimeStart'] as String?,
secondTimeEnd: json['secondTimeEnd'] as String?,
);
}
Map<String, dynamic> json) =>
TodayClockRecordModel(
id: json['id'] as int,
startClockDate: json['startClockDate'] as String?,
endClockDate: json['endClockDate'] as String?,
cardReplacementDate: json['cardReplacementDate'] as String?,
operatorName: json['operatorName'] as String?,
clockName: json['clockName'] as String,
clockTel: json['clockTel'] as String,
createDate: json['createDate'] as String,
status: json['status'] as int,
firstTimeStart: json['firstTimeStart'] as String?,
firstTimeEnd: json['firstTimeEnd'] as String?,
secondTimeStart: json['secondTimeStart'] as String?,
secondTimeEnd: json['secondTimeEnd'] as String?,
);

@ -7,33 +7,32 @@ part of 'engineer_repair_detail_model.dart';
// **************************************************************************
EngineerRepairDetailModel _$EngineerRepairDetailModelFromJson(
Map<String, dynamic> json) {
return EngineerRepairDetailModel(
json['id'] as int,
json['createName'] as String,
json['createTel'] as String,
json['repairArea'] as String,
json['code'] as String,
json['type'] as int,
json['reportDetail'] as String,
json['status'] as int,
json['organizationId'] as int?,
json['organizationName'] as String?,
json['organizationLeadingName'] as String?,
json['organizationLeadingTel'] as String?,
json['maintenanceStaff'] as int?,
json['maintenanceStaffOrganizationName'] as String?,
json['maintenanceStaffName'] as String?,
json['maintenanceStaffTel'] as String?,
json['maintenanceStaffPickSingleDate'] as String?,
json['maintenanceCompanySendSingle'] as int?,
json['maintenanceCompanySendSingleDate'] as String?,
json['maintenancePersonnelSendSingle'] as int?,
json['maintenancePersonnelSendSingleDate'] as String?,
(json['imgUrls'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
json['createId'] as int,
json['createDate'] as String,
);
}
Map<String, dynamic> json) =>
EngineerRepairDetailModel(
json['id'] as int,
json['createName'] as String,
json['createTel'] as String,
json['repairArea'] as String,
json['code'] as String,
json['type'] as int,
json['reportDetail'] as String,
json['status'] as int,
json['organizationId'] as int?,
json['organizationName'] as String?,
json['organizationLeadingName'] as String?,
json['organizationLeadingTel'] as String?,
json['maintenanceStaff'] as int?,
json['maintenanceStaffOrganizationName'] as String?,
json['maintenanceStaffName'] as String?,
json['maintenanceStaffTel'] as String?,
json['maintenanceStaffPickSingleDate'] as String?,
json['maintenanceCompanySendSingle'] as int?,
json['maintenanceCompanySendSingleDate'] as String?,
json['maintenancePersonnelSendSingle'] as int?,
json['maintenancePersonnelSendSingleDate'] as String?,
(json['imgUrls'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
json['createId'] as int,
json['createDate'] as String,
);

@ -7,16 +7,15 @@ part of 'engineer_repair_list_model.dart';
// **************************************************************************
EngineerRepairListModel _$EngineerRepairListModelFromJson(
Map<String, dynamic> json) {
return EngineerRepairListModel(
id: json['id'] as int,
code: json['code'] as String,
type: json['type'] as int,
reportDetail: json['reportDetail'] as String,
status: json['status'] as int,
imgUrls: (json['imgUrls'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
createDate: json['createDate'] as String,
);
}
Map<String, dynamic> json) =>
EngineerRepairListModel(
id: json['id'] as int,
code: json['code'] as String,
type: json['type'] as int,
reportDetail: json['reportDetail'] as String,
status: json['status'] as int,
imgUrls: (json['imgUrls'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
createDate: json['createDate'] as String,
);

@ -8,24 +8,23 @@ part of 'engineer_repair_new_acceptance_record_model.dart';
EngineerRepairNewAcceptanceRecordModel
_$EngineerRepairNewAcceptanceRecordModelFromJson(
Map<String, dynamic> json) {
return EngineerRepairNewAcceptanceRecordModel(
json['id'] as int,
json['repairEngineeringId'] as int,
json['content'] as String?,
json['billMaterials'] as String?,
(json['maintenanceImgLists'] as List<dynamic>?)
?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
json['createName'] as String,
json['createDate'] as String,
json['results'] as int,
json['advice'] as String,
json['acceptancePeople'] as int,
json['acceptancePeopleName'] as String,
json['acceptanceDate'] as String,
(json['acceptanceImgLists'] as List<dynamic>?)
?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
);
}
Map<String, dynamic> json) =>
EngineerRepairNewAcceptanceRecordModel(
json['id'] as int,
json['repairEngineeringId'] as int,
json['content'] as String?,
json['billMaterials'] as String?,
(json['maintenanceImgLists'] as List<dynamic>?)
?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
json['createName'] as String,
json['createDate'] as String,
json['results'] as int,
json['advice'] as String,
json['acceptancePeople'] as int,
json['acceptancePeopleName'] as String,
json['acceptanceDate'] as String,
(json['acceptanceImgLists'] as List<dynamic>?)
?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
);

@ -7,20 +7,19 @@ part of 'engineer_repair_organization_model.dart';
// **************************************************************************
EngineerRepairOrganizationModel _$EngineerRepairOrganizationModelFromJson(
Map<String, dynamic> json) {
return EngineerRepairOrganizationModel(
json['id'] as int,
json['name'] as String,
json['code'] as String?,
json['parentId'] as int,
json['leadingId'] as int?,
json['status'] as int,
json['sort'] as int,
json['remake'] as String?,
json['categoryId'] as int,
json['createId'] as int,
json['createDate'] as String,
json['modifyId'] as int?,
json['modifyDate'] as String?,
);
}
Map<String, dynamic> json) =>
EngineerRepairOrganizationModel(
json['id'] as int,
json['name'] as String,
json['code'] as String?,
json['parentId'] as int,
json['leadingId'] as int?,
json['status'] as int,
json['sort'] as int,
json['remake'] as String?,
json['categoryId'] as int,
json['createId'] as int,
json['createDate'] as String,
json['modifyId'] as int?,
json['modifyDate'] as String?,
);

@ -7,35 +7,34 @@ part of 'engineer_repair_person_model.dart';
// **************************************************************************
EngineerRepairPersonModel _$EngineerRepairPersonModelFromJson(
Map<String, dynamic> json) {
return EngineerRepairPersonModel(
json['id'] as int,
json['userName'] as String?,
json['pwd'] as String?,
json['actualName'] as String,
json['tel'] as String,
json['sex'] as int?,
json['userCode'] as String?,
json['birthday'] as String?,
json['email'] as String?,
json['idCard'] as String?,
json['organizationId'] as int?,
json['organizationPath'] as String?,
json['positionId'] as int?,
json['roleId'] as int?,
json['status'] as int?,
json['isDelete'] as int?,
json['createId'] as int?,
json['createDate'] as String?,
json['modifyId'] as int?,
json['modifyDate'] as String?,
json['lastLoginIp'] as int?,
json['lastLoginDate'] as String?,
json['nickName'] as String?,
json['code'] as String?,
json['codeSendDate'] as String?,
json['remake'] as String?,
json['reportTo'] as int?,
json['entryDate'] as String?,
);
}
Map<String, dynamic> json) =>
EngineerRepairPersonModel(
json['id'] as int,
json['userName'] as String?,
json['pwd'] as String?,
json['actualName'] as String,
json['tel'] as String,
json['sex'] as int?,
json['userCode'] as String?,
json['birthday'] as String?,
json['email'] as String?,
json['idCard'] as String?,
json['organizationId'] as int?,
json['organizationPath'] as String?,
json['positionId'] as int?,
json['roleId'] as int?,
json['status'] as int?,
json['isDelete'] as int?,
json['createId'] as int?,
json['createDate'] as String?,
json['modifyId'] as int?,
json['modifyDate'] as String?,
json['lastLoginIp'] as int?,
json['lastLoginDate'] as String?,
json['nickName'] as String?,
json['code'] as String?,
json['codeSendDate'] as String?,
json['remake'] as String?,
json['reportTo'] as int?,
json['entryDate'] as String?,
);

@ -7,14 +7,13 @@ part of 'engineer_repair_process_model.dart';
// **************************************************************************
EngineerRepairProcessModel _$EngineerRepairProcessModelFromJson(
Map<String, dynamic> json) {
return EngineerRepairProcessModel(
json['id'] as int,
json['repairEngineeringId'] as int,
json['operationDate'] as String,
json['operationType'] as int,
json['operator'] as int,
json['operatorType'] as int,
json['operatorContent'] as String,
);
}
Map<String, dynamic> json) =>
EngineerRepairProcessModel(
json['id'] as int,
json['repairEngineeringId'] as int,
json['operationDate'] as String,
json['operationType'] as int,
json['operator'] as int,
json['operatorType'] as int,
json['operatorContent'] as String,
);

@ -7,16 +7,15 @@ part of 'engineer_repair_result_model.dart';
// **************************************************************************
EngineerRepairResultModel _$EngineerRepairResultModelFromJson(
Map<String, dynamic> json) {
return EngineerRepairResultModel(
json['id'] as int,
json['repairEngineeringId'] as int,
json['content'] as String?,
json['billMaterials'] as String?,
(json['maintenanceImgLists'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
json['createName'] as String,
json['createDate'] as String,
);
}
Map<String, dynamic> json) =>
EngineerRepairResultModel(
json['id'] as int,
json['repairEngineeringId'] as int,
json['content'] as String?,
json['billMaterials'] as String?,
(json['maintenanceImgLists'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
json['createName'] as String,
json['createDate'] as String,
);

@ -7,16 +7,15 @@ part of 'engineer_repair_work_report_model.dart';
// **************************************************************************
EngineerRepairWorkReportModel _$EngineerRepairWorkReportModelFromJson(
Map<String, dynamic> json) {
return EngineerRepairWorkReportModel(
json['id'] as int,
json['repairEngineeringId'] as int,
json['content'] as String,
json['createId'] as int,
json['createName'] as String,
json['createDate'] as String,
(json['workReportImgLists'] as List<dynamic>?)
?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
);
}
Map<String, dynamic> json) =>
EngineerRepairWorkReportModel(
json['id'] as int,
json['repairEngineeringId'] as int,
json['content'] as String,
json['createId'] as int,
json['createName'] as String,
json['createDate'] as String,
(json['workReportImgLists'] as List<dynamic>?)
?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
);

@ -7,33 +7,32 @@ part of 'house_keeping_list_model.dart';
// **************************************************************************
HouseKeepingListModel _$HouseKeepingListModelFromJson(
Map<String, dynamic> json) {
return HouseKeepingListModel(
id: json['id'] as int,
proposerName: json['proposerName'] as String,
proposerTel: json['proposerTel'] as String,
roomName: json['roomName'] as String,
type: json['type'] as int,
content: json['content'] as String,
status: json['status'] as int,
completion: json['completion'] as int?,
handlerName: json['handlerName'] as String?,
handlerTel: json['handlerTel'] as String?,
processDescription: json['processDescription'] as String?,
handlingTime: json['handlingTime'] as String?,
handlerImgList: (json['handlerImgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
payFee: json['payFee'] as num?,
evaluation: json['evaluation'] as int?,
evaluationContent: json['evaluationContent'] as String?,
evaluationTime: json['evaluationTime'] as String?,
evaluationImgList: (json['evaluationImgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
createDate: json['createDate'] as String,
submitImgList: (json['submitImgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
);
}
Map<String, dynamic> json) =>
HouseKeepingListModel(
id: json['id'] as int,
proposerName: json['proposerName'] as String,
proposerTel: json['proposerTel'] as String,
roomName: json['roomName'] as String,
type: json['type'] as int,
content: json['content'] as String,
status: json['status'] as int,
completion: json['completion'] as int?,
handlerName: json['handlerName'] as String?,
handlerTel: json['handlerTel'] as String?,
processDescription: json['processDescription'] as String?,
handlingTime: json['handlingTime'] as String?,
handlerImgList: (json['handlerImgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
payFee: json['payFee'] as num?,
evaluation: json['evaluation'] as int?,
evaluationContent: json['evaluationContent'] as String?,
evaluationTime: json['evaluationTime'] as String?,
evaluationImgList: (json['evaluationImgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
createDate: json['createDate'] as String,
submitImgList: (json['submitImgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
);

@ -7,35 +7,34 @@ part of 'house_keeping_pick_staff_model.dart';
// **************************************************************************
HouseKeepingPickStaffModel _$HouseKeepingPickStaffModelFromJson(
Map<String, dynamic> json) {
return HouseKeepingPickStaffModel(
id: json['id'] as int,
userName: json['userName'] as String?,
pwd: json['pwd'] as String?,
actualName: json['actualName'] as String,
tel: json['tel'] as String,
sex: json['sex'] as int?,
userCode: json['userCode'] as String?,
birthday: json['birthday'] as String?,
email: json['email'] as String?,
idCard: json['idCard'] as String?,
organizationId: json['organizationId'] as int?,
organizationIdPath: json['organizationIdPath'] as String?,
positionId: json['positionId'] as int?,
roleId: json['roleId'] as int?,
status: json['status'] as int?,
isDelete: json['isDelete'] as int?,
createId: json['createId'] as int?,
createDate: json['createDate'] as String?,
modifyId: json['modifyId'] as int?,
modifyDate: json['modifyDate'] as String?,
lastLoginIp: json['lastLoginIp'] as String?,
lastLoginDate: json['lastLoginDate'] as String?,
nickName: json['nickName'] as String?,
code: json['code'] as String?,
codeSendDate: json['codeSendDate'] as String?,
remake: json['remake'] as String?,
reportTo: json['reportTo'] as String?,
entryDate: json['entryDate'] as String?,
);
}
Map<String, dynamic> json) =>
HouseKeepingPickStaffModel(
id: json['id'] as int,
userName: json['userName'] as String?,
pwd: json['pwd'] as String?,
actualName: json['actualName'] as String,
tel: json['tel'] as String,
sex: json['sex'] as int?,
userCode: json['userCode'] as String?,
birthday: json['birthday'] as String?,
email: json['email'] as String?,
idCard: json['idCard'] as String?,
organizationId: json['organizationId'] as int?,
organizationIdPath: json['organizationIdPath'] as String?,
positionId: json['positionId'] as int?,
roleId: json['roleId'] as int?,
status: json['status'] as int?,
isDelete: json['isDelete'] as int?,
createId: json['createId'] as int?,
createDate: json['createDate'] as String?,
modifyId: json['modifyId'] as int?,
modifyDate: json['modifyDate'] as String?,
lastLoginIp: json['lastLoginIp'] as String?,
lastLoginDate: json['lastLoginDate'] as String?,
nickName: json['nickName'] as String?,
code: json['code'] as String?,
codeSendDate: json['codeSendDate'] as String?,
remake: json['remake'] as String?,
reportTo: json['reportTo'] as String?,
entryDate: json['entryDate'] as String?,
);

@ -7,14 +7,13 @@ part of 'house_keeping_process_model.dart';
// **************************************************************************
HouseKeepingProcessModel _$HouseKeepingProcessModelFromJson(
Map<String, dynamic> json) {
return HouseKeepingProcessModel(
id: json['id'] as int,
housekeepingServiceId: json['housekeepingServiceId'] as int,
operationDate: json['operationDate'] as String,
operationType: json['operationType'] as int,
opName: json['operator'] as int,
operatorType: json['operatorType'] as int,
operatorContent: json['operatorContent'] as String,
);
}
Map<String, dynamic> json) =>
HouseKeepingProcessModel(
id: json['id'] as int,
housekeepingServiceId: json['housekeepingServiceId'] as int,
operationDate: json['operationDate'] as String,
operationType: json['operationType'] as int,
opName: json['operator'] as int,
operatorType: json['operatorType'] as int,
operatorContent: json['operatorContent'] as String,
);

@ -7,17 +7,16 @@ part of 'key_manage_record_list_model.dart';
// **************************************************************************
KeyManageRecordListModel _$KeyManageRecordListModelFromJson(
Map<String, dynamic> json) {
return KeyManageRecordListModel(
id: json['id'] as int,
code: json['code'] as String,
status: json['status'] as int,
facilityName: json['facilityName'] as String?,
correspondingPosition: json['correspondingPosition'] as String?,
storageLocation: json['storageLocation'] as String?,
auditDate: json['auditDate'] as String?,
reason: json['reason'] as String?,
returnAuditDate: json['returnAuditDate'] as String?,
returnReason: json['returnReason'] as String?,
);
}
Map<String, dynamic> json) =>
KeyManageRecordListModel(
id: json['id'] as int,
code: json['code'] as String,
status: json['status'] as int,
facilityName: json['facilityName'] as String?,
correspondingPosition: json['correspondingPosition'] as String?,
storageLocation: json['storageLocation'] as String?,
auditDate: json['auditDate'] as String?,
reason: json['reason'] as String?,
returnAuditDate: json['returnAuditDate'] as String?,
returnReason: json['returnReason'] as String?,
);

@ -7,11 +7,10 @@ part of 'system_message_green_model.dart';
// **************************************************************************
SystemMessageGreenModel _$SystemMessageGreenModelFromJson(
Map<String, dynamic> json) {
return SystemMessageGreenModel(
id: json['id'] as int,
name: json['name'] as String,
tel: json['tel'] as String,
areaName: json['areaName'] as String,
);
}
Map<String, dynamic> json) =>
SystemMessageGreenModel(
id: json['id'] as int,
name: json['name'] as String,
tel: json['tel'] as String,
areaName: json['areaName'] as String,
);

@ -7,33 +7,32 @@ part of 'system_message_house_keeping_model.dart';
// **************************************************************************
SystemMessageHouseKeepingModel _$SystemMessageHouseKeepingModelFromJson(
Map<String, dynamic> json) {
return SystemMessageHouseKeepingModel(
id: json['id'] as int,
proposerName: json['proposerName'] as String,
proposerTel: json['proposerTel'] as String,
roomName: json['roomName'] as String,
type: json['type'] as int,
content: json['content'] as String,
status: json['status'] as int,
completion: json['completion'] as int?,
handlerName: json['handlerName'] as String?,
handlerTel: json['handlerTel'] as String?,
processDescription: json['processDescription'] as String?,
handlingTime: json['handlingTime'] as String?,
handlerImgList: (json['handlerImgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
payFee: json['payFee'] as num?,
evaluation: json['evaluation'] as int?,
evaluationContent: json['evaluationContent'] as String?,
evaluationTime: json['evaluationTime'] as String?,
evaluationImgList: (json['evaluationImgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
createDate: json['createDate'] as String,
submitImgList: (json['submitImgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
);
}
Map<String, dynamic> json) =>
SystemMessageHouseKeepingModel(
id: json['id'] as int,
proposerName: json['proposerName'] as String,
proposerTel: json['proposerTel'] as String,
roomName: json['roomName'] as String,
type: json['type'] as int,
content: json['content'] as String,
status: json['status'] as int,
completion: json['completion'] as int?,
handlerName: json['handlerName'] as String?,
handlerTel: json['handlerTel'] as String?,
processDescription: json['processDescription'] as String?,
handlingTime: json['handlingTime'] as String?,
handlerImgList: (json['handlerImgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
payFee: json['payFee'] as num?,
evaluation: json['evaluation'] as int?,
evaluationContent: json['evaluationContent'] as String?,
evaluationTime: json['evaluationTime'] as String?,
evaluationImgList: (json['evaluationImgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
createDate: json['createDate'] as String,
submitImgList: (json['submitImgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
);

@ -7,11 +7,10 @@ part of 'system_message_hygience_model.dart';
// **************************************************************************
SystemMessageHygineceModel _$SystemMessageHygineceModelFromJson(
Map<String, dynamic> json) {
return SystemMessageHygineceModel(
id: json['id'] as int,
name: json['name'] as String,
tel: json['tel'] as String,
areaName: json['areaName'] as String,
);
}
Map<String, dynamic> json) =>
SystemMessageHygineceModel(
id: json['id'] as int,
name: json['name'] as String,
tel: json['tel'] as String,
areaName: json['areaName'] as String,
);

@ -24,7 +24,8 @@ enum ERAUTH {
HIDE
}
class UserInfoModel {
@Deprecated('逐步删除')
class UserInformationModel {
int? id;
String? roleId;
String? nickName;
@ -77,10 +78,10 @@ class UserInfoModel {
}
}
UserInfoModel(
UserInformationModel(
{required this.id, this.roleId, this.nickName, this.jurisdiction});
UserInfoModel.fromJson(Map<String, dynamic> json) {
UserInformationModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
roleId = json['roleId'];
nickName = json['nickName'];

@ -1,6 +1,7 @@
// Project imports:
import 'package:aku_new_community_manager/models/common/img_model.dart';
@Deprecated('逐步删除')
class UserProfileModel {
int? id;
List<ImgModel>? imgUrls;

@ -0,0 +1,138 @@
import 'package:aku_new_community_manager/new_ui/auth/sign_func.dart';
import 'package:aku_new_community_manager/tools/user_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.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:sms_autofill/sms_autofill.dart';
import 'package:velocity_x/velocity_x.dart';
class CodeMessagePage extends StatefulWidget {
final String tel;
const CodeMessagePage({Key? key, required this.tel}) : super(key: key);
@override
_CodeMessagePageState createState() => _CodeMessagePageState();
}
class _CodeMessagePageState extends State<CodeMessagePage> {
String? _errorMessage;
TextEditingController _controller = TextEditingController();
String? _currentCode;
@override
void initState() {
Future.delayed(Duration(milliseconds: 0), () async {
await SmsAutoFill().listenForCode();
});
super.initState();
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return AkuScaffold(
title: '',
body: SafeArea(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 48.w, vertical: 24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
46.w.heightBox,
'请输入验证码'
.text
.size(36.sp)
.color(Colors.black.withOpacity(0.65))
.bold
.make(),
16.w.heightBox,
_errorMessage != null
? '${_errorMessage}'.text.color(Colors.red).size(28.sp).make()
: '验证码已发送至'
.richText
.withTextSpanChildren([
'${widget.tel}'
.textSpan
.size(28.sp)
.color(Color(0xFFCF1322).withOpacity(0.8))
.make(),
])
.size(28.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
80.w.heightBox,
PinFieldAutoFill(
autoFocus: true,
currentCode: _currentCode,
inputFormatters: [FilteringTextInputFormatter.digitsOnly],
codeLength: 6,
onCodeChanged: (code) async {
if (code!.length >= 6) {
var re = await SignFunc.loginBySms(
widget.tel,
code,
UserTool.appProvider.pickedCityAndCommunity!
.communityModel!.id);
if (re.data['success']) {
await UserTool.userProvider
.setLogin(re.data['data'] as int);
await UserTool.dataProvider.addHistories();
} else {
_errorMessage = re.data['msg'];
BotToast.showText(text: re.data['msg']);
_controller.clear();
}
}
_currentCode = code;
},
decoration: UnderlineDecoration(
colorBuilder: FixedColorListBuilder([
Colors.black.withOpacity(0.3),
Colors.black.withOpacity(0.3),
Colors.black.withOpacity(0.3),
Colors.black.withOpacity(0.3),
Colors.black.withOpacity(0.3),
Colors.black.withOpacity(0.3),
])),
),
24.w.heightBox,
Row(
children: [
Spacer(),
TextButton(
onPressed: () async {
var base = await SignFunc.sendMessageCode(
widget.tel,
UserTool.appProvider.pickedCityAndCommunity!
.communityModel!.id);
if (base.success) {
_errorMessage = null;
UserTool.appProvider.startTimer();
} else {
BotToast.showText(text: base.msg);
}
},
child: (UserTool.appProvider.second >= 60
? '重新发送验证码'
: '${UserTool.appProvider.second}秒后可重新发送')
.text
.size(28.sp)
.color(Color(0xFF5096F1))
.make()),
],
)
],
),
),
),
);
}
}

@ -0,0 +1,93 @@
import 'package:aku_new_community_manager/new_ui/auth/sign_func.dart';
import 'package:aku_new_community_manager/new_ui/auth/widget/login_button_widget.dart';
import 'package:aku_new_community_manager/new_ui/auth/widget/tel_textfield.dart';
import 'package:aku_new_community_manager/tools/user_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'forgot_set_psd_page.dart';
class ForgotPsdPage extends StatefulWidget {
const ForgotPsdPage({Key? key}) : super(key: key);
@override
_ForgotPsdPageState createState() => _ForgotPsdPageState();
}
class _ForgotPsdPageState extends State<ForgotPsdPage> {
TextEditingController _telController = TextEditingController();
@override
void dispose() {
_telController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return AkuScaffold(
title: '',
backgroundColor: Colors.white,
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
24.w.heightBox,
Row(
children: [
48.w.widthBox,
'忘记密码'
.text
.size(36.sp)
.bold
.color(Colors.black.withOpacity(0.65))
.make(),
Spacer(),
],
),
16.w.heightBox,
Row(
children: [
48.w.widthBox,
'为了安全,我们会向你的手机发送验证码'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
Spacer(),
],
),
144.w.heightBox,
TelTextField(controller: _telController),
100.w.heightBox,
LoginButtonWidget(
onTap: _telController.text.isNotEmpty
? () async {
if (!RegexUtil.isMobileSimple(_telController.text)) {
BotToast.showText(text: '请输入正确的手机号!');
return;
}
var base = await SignFunc.sendForgotMessageCode(
_telController.text,
UserTool.appProvider.pickedCityAndCommunity!
.communityModel!.id);
if (base.success) {
Get.to(() => ForgotSetPsdPage(
tel: _telController.text,
));
UserTool.appProvider.startTimer();
} else {
BotToast.showText(text: base.msg);
}
}
: null,
text: '下一步'),
],
),
);
}
}

@ -0,0 +1,183 @@
import 'package:aku_new_community_manager/new_ui/auth/psd_verify.dart';
import 'package:aku_new_community_manager/new_ui/auth/sign_func.dart';
import 'package:aku_new_community_manager/new_ui/auth/widget/login_button_widget.dart';
import 'package:aku_new_community_manager/new_ui/auth/widget/psd_textfield.dart';
import 'package:aku_new_community_manager/tools/user_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.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_root_page.dart';
class ForgotSetPsdPage extends StatefulWidget {
final String tel;
const ForgotSetPsdPage({Key? key, required this.tel}) : super(key: key);
@override
_ForgotSetPsdPageState createState() => _ForgotSetPsdPageState();
}
class _ForgotSetPsdPageState extends State<ForgotSetPsdPage> {
TextEditingController _psdController = TextEditingController();
TextEditingController _confirmPsdController = TextEditingController();
TextEditingController _codeController = TextEditingController();
PSDVERIFY get psdCheck =>
PsdVerify.check(_psdController.text, _confirmPsdController.text);
@override
void initState() {
_psdController.addListener(() {
setState(() {});
});
_confirmPsdController.addListener(() {
setState(() {});
});
super.initState();
}
@override
void dispose() {
_psdController.removeListener(() {});
_confirmPsdController.removeListener(() {});
_psdController.dispose();
_confirmPsdController.dispose();
_codeController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return AkuScaffold(
title: '',
backgroundColor: Colors.white,
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
24.w.heightBox,
Row(
children: [
48.w.widthBox,
'已向 '
.richText
.withTextSpanChildren([
widget.tel.textSpan
.size(36.sp)
.color(Colors.red)
.bold
.make(),
' 发送验证码'
.textSpan
.size(36.sp)
.color(Colors.black.withOpacity(0.65))
.bold
.make()
])
.size(36.sp)
.bold
.color(Colors.black.withOpacity(0.65))
.make(),
Spacer(),
],
),
16.w.heightBox,
Row(
children: [
48.w.widthBox,
'密码需由6-20位数字、字母、或符号组成至少两种'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
Spacer(),
],
),
144.w.heightBox,
Container(
width: 686.w,
height: 94.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(60.w),
color: Colors.black.withOpacity(0.06),
),
child: TextField(
onChanged: (text) {
setState(() {});
},
keyboardType: TextInputType.number,
inputFormatters: [FilteringTextInputFormatter.digitsOnly],
controller: _codeController,
decoration: InputDecoration(
isDense: false,
contentPadding:
EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
border: InputBorder.none,
hintText: '请输入验证码',
suffixIconConstraints:
BoxConstraints(minHeight: 100.w, maxHeight: 100.w),
suffixIcon: GestureDetector(
onTap: () async {
var base = await SignFunc.sendMessageCode(
widget.tel,
UserTool.appProvider.pickedCityAndCommunity!
.communityModel!.id);
if (base.success) {
Get.to(() => ForgotSetPsdPage(
tel: widget.tel,
));
UserTool.appProvider.startTimer();
} else {
BotToast.showText(text: base.msg);
}
},
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
'${UserTool.appProvider.second < 60 ? '${UserTool.appProvider.second}秒后重新获取' : '获取验证码'}'
.text
.size(28.sp)
.color(Color(0xFF5096F1))
.make(),
20.w.widthBox,
],
),
),
hintStyle: TextStyle(
color: Colors.black.withOpacity(0.25), fontSize: 28.sp)),
),
),
24.w.heightBox,
PsdTextField(controller: _psdController, hintText: '请输入密码'),
24.w.heightBox,
PsdTextField(controller: _confirmPsdController, hintText: '请再次输入密码'),
16.w.heightBox,
PsdVerify.checkString(psdCheck)
.text
.size(28.sp)
.color(Color(0xFFCF1322).withOpacity(0.8))
.make(),
37.w.heightBox,
LoginButtonWidget(
onTap: (psdCheck == PSDVERIFY.correct &&
_codeController.text.isNotEmpty)
? () async {
var result = await SignFunc.settingForgotPsd(
_psdController.text,
widget.tel,
_codeController.text);
if (result) {
Get.offAll(() => LoginPage());
}
}
: null,
text: '确认'),
],
),
);
}
}

@ -0,0 +1,147 @@
import 'package:aku_new_community_manager/new_ui/auth/select_community_page.dart';
import 'package:aku_new_community_manager/provider/app_provider.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.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 'other_login_page.dart';
class LoginPage extends StatefulWidget {
const LoginPage({Key? key}) : super(key: key);
@override
_LoginPageState createState() => _LoginPageState();
}
class _LoginPageState extends State<LoginPage> {
@override
Widget build(BuildContext context) {
return AkuScaffold(
title: '',
backgroundColor: Colors.white,
body: SafeArea(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
44.w.heightBox,
'登录解锁更多功能'.text.size(36.sp).color(kPrimaryColor).bold.make(),
144.w.heightBox,
Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
CommunityWidget(),
80.w.heightBox,
'${'1547***93018'}'
.text
.size(36.sp)
.color(kTextPrimaryColor)
.bold
.make(),
40.w.heightBox,
MaterialButton(
onPressed: () {},
elevation: 0,
height: 100.w,
minWidth: 686.w,
color: kPrimaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(60.w)),
child: '本机号码一键登录'.text.size(32.sp).black.bold.make(),
),
24.w.heightBox,
InkWell(
onTap: () {
Get.to(() => OtherLoginPage());
},
child: Text(
'其他登录方式',
style: TextStyle(
color: Color(0xFF5096F1),
fontSize: 28.sp,
),
),
)
],
),
Spacer(),
BottomTip(),
],
),
),
);
}
}
class BottomTip extends StatelessWidget {
const BottomTip({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.only(bottom: 100.w),
child: RichText(
text: TextSpan(
style: TextStyle(
fontSize: 24.sp,
color: kTextSubColor,
),
text: '注册/登记即代表同意',
children: [
WidgetSpan(
child: InkWell(
onTap: () {
//TODO:
},
child: '《小蜜蜂隐私政策及用户协议》'
.text
.size(24.sp)
.color(Color(0xFF5096F1))
.make(),
)),
])),
);
}
}
class CommunityWidget extends StatelessWidget {
final MainAxisAlignment? align;
const CommunityWidget({
Key? key,
this.align,
}) : super(key: key);
@override
Widget build(BuildContext context) {
AppProvider appProveider = Provider.of<AppProvider>(context, listen: true);
var hasSelect = appProveider.pickedCityAndCommunity != null &&
appProveider.pickedCityAndCommunity!.communityModel != null;
return GestureDetector(
onTap: () async {
await Get.to(() => SelectCommunity());
},
child: Row(
mainAxisAlignment: align ?? MainAxisAlignment.center,
children: [
(hasSelect
? '${appProveider.pickedCityAndCommunity!.cityModel.district.name} ${appProveider.pickedCityAndCommunity!.communityModel!.name}'
: '')
.text
.color(Colors.black)
.make(),
'${hasSelect ? ' 切换' : '请先选择小区'}'
.text
.size(32.sp)
.color(Color(0xFF5096F1))
.make(),
],
),
);
}
}

@ -0,0 +1,207 @@
import 'package:aku_new_community_manager/new_ui/auth/sign_func.dart';
import 'package:aku_new_community_manager/new_ui/auth/widget/login_button_widget.dart';
import 'package:aku_new_community_manager/new_ui/auth/widget/psd_textfield.dart';
import 'package:aku_new_community_manager/new_ui/auth/widget/tel_textfield.dart';
import 'package:aku_new_community_manager/provider/app_provider.dart';
import 'package:aku_new_community_manager/tools/user_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.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 'code_message_page.dart';
import 'forgot_psd_page.dart';
import 'login_root_page.dart';
class OtherLoginPage extends StatefulWidget {
const OtherLoginPage({Key? key}) : super(key: key);
@override
_OtherLoginPageState createState() => _OtherLoginPageState();
}
class _OtherLoginPageState extends State<OtherLoginPage> {
PageController _controller = PageController();
List<String> _tabs = ['账号登录', '验证码登录'];
int _currentIndex = 0;
TextEditingController _tel = TextEditingController();
TextEditingController _psd = TextEditingController();
@override
void initState() {
super.initState();
}
@override
void dispose() {
_controller.dispose();
_tel.dispose();
_psd.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return AkuScaffold(
title: '',
backgroundColor: Colors.white,
body: Column(
children: [
Row(
children: [
24.w.widthBox,
..._tabs
.mapIndexed((e, index) => _tab(e, index, onTap: (value) {
_currentIndex = value;
_controller.jumpToPage(_currentIndex);
setState(() {});
}))
.toList(),
],
),
Flexible(
child: PageView(
controller: _controller,
children: [_accountView(), _verificationView()],
),
),
BottomTip(),
],
),
);
}
Widget _accountView() {
return ListView(
padding: EdgeInsets.symmetric(horizontal: 32.w),
children: [
140.w.heightBox,
CommunityWidget(
align: MainAxisAlignment.start,
),
40.w.heightBox,
TelTextField(
controller: _tel,
),
40.w.heightBox,
PsdTextField(
controller: _psd,
),
100.w.heightBox,
LoginButtonWidget(
onTap: () async {
var check = checkInput();
if (!check) {
return;
}
var cancel = BotToast.showLoading();
var response = await SignFunc.login(
_tel.text,
_psd.text,
UserTool
.appProvider.pickedCityAndCommunity!.communityModel!.id);
if (response.data['success']) {
await UserTool.userProvider.setLogin(response.data['data']);
await UserTool.dataProvider.addHistories();
} else {
BotToast.showText(text: response.data['message']);
}
cancel();
},
text: '登录'),
24.w.heightBox,
TextButton(
onPressed: () {
Get.to(() => ForgotPsdPage());
},
child: '忘记密码'.text.size(28.sp).color(Color(0xFF5096F1)).make())
],
);
}
bool checkInput() {
if (!RegexUtil.isMobileSimple(_tel.text)) {
BotToast.showText(text: '请输入正确的手机号!');
return false;
}
if (UserTool.appProvider.pickedCityAndCommunity == null) {
BotToast.showText(text: '请先选择小区!');
return false;
}
if (_currentIndex == 0 && _psd.text.isEmpty) {
BotToast.showText(text: '密码不能为空');
return false;
}
return true;
}
Widget _verificationView() {
AppProvider appProvider = Provider.of<AppProvider>(context);
return ListView(
padding: EdgeInsets.symmetric(horizontal: 32.w),
children: [
140.w.heightBox,
CommunityWidget(
align: MainAxisAlignment.start,
),
40.w.heightBox,
TelTextField(controller: _tel),
100.w.heightBox,
LoginButtonWidget(
onTap: UserTool.appProvider.second < 60
? () {}
: () async {
var check = checkInput();
if (!check) {
return;
}
var base = await SignFunc.sendMessageCode(
_tel.text,
UserTool.appProvider.pickedCityAndCommunity!
.communityModel!.id);
if (base.success) {
Get.to(() => CodeMessagePage(tel: _tel.text));
appProvider.startTimer();
} else {
BotToast.showText(text: base.msg);
}
},
text: appProvider.timerStart
? '${appProvider.second}秒后重新获取'
: '获取验证码'),
24.w.heightBox,
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
'未注册的手机验证后会自动创建账号'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.25))
.make(),
],
),
],
);
}
Widget _tab(String text, int index, {required Function(int) onTap}) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () => onTap(index),
child: Container(
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
alignment: Alignment.center,
child: text.text
.size(_currentIndex == index ? 36.sp : 32.sp)
.lineHeight(_currentIndex == index ? 1.2 : 1.2)
.color(
Colors.black.withOpacity(_currentIndex == index ? 0.65 : 0.45))
.make(),
),
);
}
}

@ -0,0 +1,36 @@
import 'package:common_utils/common_utils.dart';
enum PSDVERIFY { shorLength, Insufficient, different, correct, empty }
class PsdVerify {
//
static String reg = r'^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).*';
static PSDVERIFY check(String psd, String confirmPsd) {
if (psd.isEmpty || confirmPsd.isEmpty) {
return PSDVERIFY.empty;
} else if (psd != confirmPsd) {
return PSDVERIFY.different;
} else if (psd.length < 6) {
return PSDVERIFY.shorLength;
} else if (!RegexUtil.matches(reg, psd)) {
return PSDVERIFY.Insufficient;
} else {
return PSDVERIFY.correct;
}
}
static String checkString(PSDVERIFY enu) {
switch (enu) {
case PSDVERIFY.shorLength:
return '密码不能小于6位';
case PSDVERIFY.Insufficient:
return '密码至少由两种类型组成';
case PSDVERIFY.different:
return '您输入的确认密码和新密码不一致,请检查后重新输入';
case PSDVERIFY.correct:
return '';
case PSDVERIFY.empty:
return '';
}
}
}

@ -0,0 +1,194 @@
import 'package:aku_new_community_manager/const/saas_api.dart';
import 'package:aku_new_community_manager/saas_models/login/community_model.dart';
import 'package:aku_new_community_manager/saas_models/login/history_login_model.dart';
import 'package:aku_new_community_manager/tools/user_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/ui/widgets/common/bee_city_picker.dart';
import 'package:aku_new_community_manager/ui/widgets/common/bee_community_picker.dart';
import 'package:aku_new_community_manager/utils/network/net_util.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 {
const SelectCommunity({
Key? key,
}) : super(key: key);
@override
_SelectCommunityState createState() => _SelectCommunityState();
}
class _SelectCommunityState extends State<SelectCommunity> {
String get cityName {
var _model = UserTool.appProvider.pickedCityAndCommunity;
if (_model == null) {
return '请选择省、市、县/区';
} else {
return _model.cityModel.province.name +
_model.cityModel.city.name +
_model.cityModel.district.name;
}
}
String get communityName {
var _community =
UserTool.appProvider.pickedCityAndCommunity?.communityModel;
if (_community == null) {
return '请选择小区';
} else {
return _community.name;
}
}
@override
void initState() {
super.initState();
}
@override
void deactivate() {
Future.delayed(Duration(milliseconds: 0), () async {
if (UserTool.appProvider.pickedCityAndCommunity != null &&
UserTool.appProvider.pickedCityAndCommunity?.communityModel == null) {
UserTool.appProvider.resetPickedCity();
}
});
super.deactivate();
}
@override
Widget build(BuildContext context) {
var selectCity = GestureDetector(
onTap: () async {
var _city = await BeeCityPicker.pick(context);
if (_city != null) {
UserTool.appProvider.setPickedCity(city: _city);
}
setState(() {});
},
child: Container(
color: Colors.white,
width: double.infinity,
height: 88.w,
padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w),
child: Row(
children: [
'选择城市'.text.size(28.sp).black.make(),
Spacer(),
'${cityName}'.text.black.make(),
32.w.widthBox,
Icon(
CupertinoIcons.right_chevron,
size: 20.w,
)
],
),
),
);
var selectCommunity = GestureDetector(
onTap: () async {
var cancel = BotToast.showLoading();
List<CommunityModel> _communities = [];
var base = await NetUtil().get(SAASAPI.login.allCommunity, params: {
'cityId': UserTool
.appProvider.pickedCityAndCommunity!.cityModel.district.id,
});
if (base.success) {
_communities = (base.data as List)
.map((e) => CommunityModel.fromJson(e))
.toList();
}
cancel();
var _community = await BeeCommunityPicker.pick(context, _communities);
print(_community?.name);
if (_community != null) {
UserTool.appProvider.setPickedCity(community: _community);
}
setState(() {});
},
child: Container(
color: Colors.white,
width: double.infinity,
height: 88.w,
padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w),
child: Row(
children: [
'选择小区'.text.size(28.sp).black.make(),
Spacer(),
'${communityName}'.text.black.make(),
32.w.widthBox,
Icon(
CupertinoIcons.right_chevron,
size: 20.w,
)
],
),
),
);
var history = Offstage(
offstage: UserTool.dataProvider.loginHistories.length == 0,
child: Container(
width: double.infinity,
color: Colors.white,
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
'历史登录'.text.size(28.sp).color(Colors.black.withOpacity(0.2)).make(),
24.w.widthBox,
...UserTool.dataProvider.loginHistories
.map((e) => _historyTile(e))
.toList(),
],
),
),
);
return WillPopScope(
onWillPop: () async {
var bool = UserTool.appProvider.pickedCityAndCommunity != null &&
UserTool.appProvider.pickedCityAndCommunity?.communityModel == null;
if (bool) {
BotToast.showText(text: '请选择小区');
return false;
} else {
return true;
}
},
child: AkuScaffold(
title: '选择登录小区',
body: ListView(
children: [
selectCity,
selectCommunity,
10.w.heightBox,
history,
],
),
),
);
}
Widget _historyTile(HistoryLoginModel model) {
return Container(
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w),
child: Row(
children: [
Icon(
CupertinoIcons.search,
size: 30.w,
color: Colors.black.withOpacity(0.2),
),
24.w.widthBox,
'${model.communityModel!.name}(${model.cityModel.province.name}·${model.cityModel.city.name}·${model.cityModel.district.name})'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.2))
.make(),
],
),
);
}
}

@ -0,0 +1,150 @@
import 'package:aku_new_community_manager/new_ui/auth/sign_func.dart';
import 'package:aku_new_community_manager/new_ui/auth/widget/login_button_widget.dart';
import 'package:aku_new_community_manager/tools/user_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class SetNickNamePage extends StatefulWidget {
const SetNickNamePage({Key? key}) : super(key: key);
@override
_SetNickNamePageState createState() => _SetNickNamePageState();
}
class _SetNickNamePageState extends State<SetNickNamePage> {
TextEditingController _nickController = TextEditingController();
bool _nickIsRepeat = false;
@override
void dispose() {
_nickController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return AkuScaffold(
title: '',
backgroundColor: Colors.white,
body: ListView(
children: [
24.w.heightBox,
Row(
children: [
48.w.widthBox,
'请设置您的昵称'
.text
.size(36.sp)
.bold
.color(Colors.black.withOpacity(0.65))
.make(),
Spacer(),
],
),
16.w.heightBox,
Row(
children: [
48.w.widthBox,
'昵称不可设置侮辱性词汇、特殊符号、敏感字符'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
Spacer(),
],
),
95.w.heightBox,
Container(
width: 686.w,
height: 94.w,
margin: EdgeInsets.symmetric(horizontal: 32.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(60.w),
color: Colors.black.withOpacity(0.06),
),
child: TextField(
onChanged: (text) async {
_nickIsRepeat = !(await SignFunc.checkNickRepeat(text));
setState(() {});
},
maxLength: 20,
controller: _nickController,
decoration: InputDecoration(
isDense: false,
contentPadding:
EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
border: InputBorder.none,
counterText: '',
hintText: '请输入您的昵称不超过20个字符',
hintStyle: TextStyle(
color: Colors.black.withOpacity(0.25), fontSize: 28.sp)),
),
),
_nickIsRepeat ? _nickRepeat() : 100.w.heightBox,
Padding(
padding: EdgeInsets.symmetric(horizontal: 24.w),
child: LoginButtonWidget(
onTap: () async {
var result = await SignFunc.setNickName(_nickController.text);
if (result) {
await UserTool.userProvider.updateUserInfo();
}
},
text: '确定'),
),
],
),
);
}
Widget _nickRepeat() {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 48.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
24.w.heightBox,
'该昵称已有人注册,请重新输入'.text.size(28.sp).color(Colors.red).make(),
50.w.heightBox,
'试试以下昵称'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
24.w.heightBox,
otherNick('123'),
24.w.heightBox,
otherNick('321'),
24.w.heightBox,
otherNick('231'),
100.w.heightBox,
],
),
);
}
Widget otherNick(String extra) {
return GestureDetector(
onTap: () {
_nickController.text = '${_nickController.text}$extra';
},
child: Material(
child: Container(
height: 70.w,
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 16.w),
alignment: Alignment.centerLeft,
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.03),
borderRadius: BorderRadius.circular(42.sp)),
child: '${_nickController.text}$extra'
.text
.size(28.sp)
.color(Color(0xFF5096F1))
.make(),
),
),
);
}
}

@ -0,0 +1,104 @@
import 'package:aku_new_community_manager/new_ui/auth/psd_verify.dart';
import 'package:aku_new_community_manager/new_ui/auth/sign_func.dart';
import 'package:aku_new_community_manager/new_ui/auth/widget/login_button_widget.dart';
import 'package:aku_new_community_manager/new_ui/auth/widget/psd_textfield.dart';
import 'package:aku_new_community_manager/tools/user_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class SetPsdPage extends StatefulWidget {
const SetPsdPage({Key? key}) : super(key: key);
@override
_SetPsdPageState createState() => _SetPsdPageState();
}
class _SetPsdPageState extends State<SetPsdPage> {
TextEditingController _psdController = TextEditingController();
TextEditingController _confirmPsdController = TextEditingController();
PSDVERIFY get psdCheck =>
PsdVerify.check(_psdController.text, _confirmPsdController.text);
@override
void initState() {
_psdController.addListener(() {
setState(() {});
});
_confirmPsdController.addListener(() {
setState(() {});
});
super.initState();
}
@override
void dispose() {
_psdController.removeListener(() {});
_confirmPsdController.removeListener(() {});
_psdController.dispose();
_confirmPsdController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return AkuScaffold(
title: '',
backgroundColor: Colors.white,
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
24.w.heightBox,
Row(
children: [
48.w.widthBox,
'首次登陆,请设置账号密码'
.text
.size(36.sp)
.bold
.color(Colors.black.withOpacity(0.65))
.make(),
Spacer(),
],
),
16.w.heightBox,
Row(
children: [
48.w.widthBox,
'密码需由6-20位数字、字母、或符号组成至少两种'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
Spacer(),
],
),
144.w.heightBox,
PsdTextField(controller: _psdController, hintText: '请输入密码'),
24.w.heightBox,
PsdTextField(controller: _confirmPsdController, hintText: '请再次输入密码'),
16.w.heightBox,
PsdVerify.checkString(psdCheck)
.text
.size(28.sp)
.color(Color(0xFFCF1322).withOpacity(0.8))
.make(),
37.w.heightBox,
LoginButtonWidget(
onTap: psdCheck == PSDVERIFY.correct
? () async {
var result =
await SignFunc.settingPsd(_psdController.text);
if (result) {
await UserTool.userProvider.updateUserInfo();
}
}
: null,
text: '确认'),
],
),
);
}
}

@ -0,0 +1,122 @@
import 'package:aku_new_community_manager/const/saas_api.dart';
import 'package:aku_new_community_manager/models/user/user_info_model.dart';
import 'package:aku_new_community_manager/new_ui/auth/set_nick_nage_page.dart';
import 'package:aku_new_community_manager/new_ui/auth/set_psd_page.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/tools/user_tool.dart';
import 'package:aku_new_community_manager/ui/home/home_page.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:dio/dio.dart';
import 'package:get/get.dart' hide Response;
class SignFunc {
//
static Future<BaseModel> sendMessageCode(
String phone, int communityId) async {
BaseModel baseModel = await NetUtil().post(
SAASAPI.login.sendSMSCode,
params: {'tel': phone, 'communityId': communityId},
showMessage: true,
);
return baseModel;
} //
static Future<BaseModel> sendForgotMessageCode(
String phone, int communityId) async {
BaseModel baseModel = await NetUtil().post(
SAASAPI.user.sendForgotTelCode,
params: {'tel': phone, 'communityId': communityId},
showMessage: true,
);
return baseModel;
}
//
static Future<Response> loginBySms(
String phone, String code, int communityId) async {
Response response = await NetUtil().dio!.post(
SAASAPI.login.loginTelCode,
data: {
'tel': phone,
'code': code,
'communityId': communityId,
},
);
return response;
}
///
static Future<UserInformationModel?> getUserInfo() async {
BaseModel baseModel = await NetUtil().get(SAASAPI.user.userProfile);
if (baseModel.data == null || !baseModel.success) return null;
return UserInformationModel.fromJson(baseModel.data);
}
///
static Future<bool> settingPsd(String psd) async {
BaseModel baseModel = await NetUtil().get(SAASAPI.user.settingPsd,
params: {'password': psd}, showMessage: true);
if (baseModel.data == null || !baseModel.success) return false;
return true;
}
///
static Future<bool> settingForgotPsd(
String psd, String tel, String telcode) async {
BaseModel baseModel = await NetUtil().get(SAASAPI.user.settingForgotPsd,
params: {
'newPassword': psd,
'tel': tel,
'telCode': telcode,
'communityId':
UserTool.appProvider.pickedCityAndCommunity!.communityModel!.id
},
showMessage: true);
if (baseModel.data == null || !baseModel.success) return false;
return true;
}
//
static Future<Response> login(
String phone, String code, int communityId) async {
Response response = await NetUtil().dio!.post(
SAASAPI.login.login,
data: {
'tel': phone,
'password': code,
'communityId': communityId,
},
);
return response;
}
static Future checkNameAndAccount() async {
if (!UserTool.userProvider.userInfoModel!.isExistPassword) {
await Get.to(() => SetPsdPage());
} else if (UserTool.userProvider.userInfoModel!.nickName == null) {
await Get.to(() => SetNickNamePage());
} else {
Get.offAll(() => HomePage());
}
}
///
static Future<bool> checkNickRepeat(String nick) async {
BaseModel baseModel = await NetUtil().get(SAASAPI.user.checkNickRepeat,
params: {
'nickName': nick,
},
showMessage: true);
return baseModel.msg == '昵称可用';
}
///
static Future<bool> setNickName(String nick) async {
BaseModel baseModel = await NetUtil().get(SAASAPI.user.setNickName,
params: {
'nickName': nick,
},
showMessage: true);
return baseModel.msg == '设置成功';
}
}

@ -0,0 +1,29 @@
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:flutter/material.dart';
class LoginButtonWidget extends StatelessWidget {
final VoidCallback? onTap;
final String text;
const LoginButtonWidget({Key? key, required this.onTap, required this.text})
: super(key: key);
@override
Widget build(BuildContext context) {
return MaterialButton(
minWidth: 686.w,
height: 97.w,
onPressed: onTap,
elevation: 0,
child: Text(
text,
style: TextStyle(
fontSize: 32.sp,
),
),
disabledTextColor: Colors.black.withOpacity(0.45),
disabledColor: Colors.black.withOpacity(0.06),
color: kPrimaryColor,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(60.w)),
);
}
}

@ -0,0 +1,66 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class PsdTextField extends StatefulWidget {
final TextEditingController controller;
final String? hintText;
const PsdTextField({
Key? key,
required this.controller,
this.hintText,
}) : super(key: key);
@override
_PsdTextFieldState createState() => _PsdTextFieldState();
}
class _PsdTextFieldState extends State<PsdTextField> {
bool visible = false;
@override
Widget build(BuildContext context) {
return Container(
width: 686.w,
height: 94.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(60.w),
color: Colors.black.withOpacity(0.06),
),
child: TextField(
maxLength: 20,
onChanged: (text) {
setState(() {});
},
controller: widget.controller,
obscureText: !visible,
obscuringCharacter: '*',
decoration: InputDecoration(
isDense: false,
contentPadding:
EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
border: InputBorder.none,
hintText: widget.hintText ?? '请输入密码',
counterText: '',
suffixIconConstraints:
BoxConstraints(minHeight: 50.w, maxHeight: 50.w),
suffixIcon: GestureDetector(
onTap: () {
visible = !visible;
setState(() {});
},
child: Padding(
padding: EdgeInsets.only(right: 20.w),
child: Icon(
visible ? CupertinoIcons.eye : CupertinoIcons.eye_slash,
color: Colors.black.withOpacity(0.4),
),
),
),
hintStyle: TextStyle(
color: Colors.black.withOpacity(0.25), fontSize: 28.sp)),
),
);
}
}

@ -0,0 +1,41 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class TelTextField extends StatefulWidget {
final TextEditingController controller;
const TelTextField({Key? key, required this.controller}) : super(key: key);
@override
_TelTextFieldState createState() => _TelTextFieldState();
}
class _TelTextFieldState extends State<TelTextField> {
@override
Widget build(BuildContext context) {
return Container(
width: 686.w,
height: 94.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(60.w),
color: Colors.black.withOpacity(0.06),
),
child: TextField(
inputFormatters: [FilteringTextInputFormatter.digitsOnly],
keyboardType: TextInputType.number,
controller: widget.controller,
decoration: InputDecoration(
isDense: true,
border: InputBorder.none,
prefixIcon: Center(child: '+86'.text.black.make()),
prefixIconConstraints: BoxConstraints.loose(Size(60, 60)),
contentPadding: EdgeInsets.symmetric(vertical: 30.w),
hintText: '点击输入手机号',
hintStyle:
TextStyle(color: Colors.black.withOpacity(0.25), fontSize: 28.sp),
),
),
);
}
}

@ -1,13 +1,16 @@
// Flutter imports:
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:aku_new_community_manager/saas_models/login/community_model.dart';
import 'package:aku_new_community_manager/saas_models/login/history_login_model.dart';
import 'package:aku_new_community_manager/saas_models/login/picked_city_model.dart';
// Project imports:
import 'package:aku_new_community_manager/ui/home/application/applications_page.dart';
// Package imports:
import 'package:amap_flutter_location/amap_flutter_location.dart';
import 'package:amap_flutter_location/amap_location_option.dart';
// Project imports:
import 'package:aku_new_community_manager/ui/home/application/applications_page.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:power_logger/power_logger.dart';
enum WORKCLOCK {
@ -122,4 +125,50 @@ class AppProvider extends ChangeNotifier {
_clockStatus = WORKCLOCK.NOTIN;
notifyListeners();
}
///saas
///
HistoryLoginModel? _pickedCityAndCommunity;
HistoryLoginModel? get pickedCityAndCommunity => _pickedCityAndCommunity;
void setPickedCity({PickedCityModel? city, CommunityModel? community}) {
if (city != null) {
_pickedCityAndCommunity = HistoryLoginModel(cityModel: city);
}
if (community != null) {
_pickedCityAndCommunity!.communityModel = community;
}
notifyListeners();
}
void resetPickedCity() {
_pickedCityAndCommunity = null;
notifyListeners();
}
///
int second = 60;
bool timerStart = false;
Timer? timer;
void startTimer() {
timerStart = true;
timer = Timer.periodic(Duration(seconds: 1), (timer) {
if (second > 0) {
second--;
notifyListeners();
} else {
stopTimer();
}
});
}
void stopTimer() {
second = 60;
timerStart = false;
timer?.cancel();
timer = null;
notifyListeners();
}
}

@ -0,0 +1,52 @@
import 'package:aku_new_community_manager/const/saas_api.dart';
import 'package:aku_new_community_manager/saas_models/login/china_region_model.dart';
import 'package:aku_new_community_manager/saas_models/login/history_login_model.dart';
import 'package:aku_new_community_manager/tools/user_tool.dart';
import 'package:aku_new_community_manager/utils/hive_store.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:flutter/material.dart';
class DataProvider extends ChangeNotifier {
Future init() async {
_loginHistories = HiveStore.dataBox!
.get('historyLogin')
?.cast<HistoryLoginModel>()
.toList() ??
[];
_cityModel =
HiveStore.dataBox!.get('cities')?.cast<ChinaRegionModel>().toList() ??
[];
if (_cityModel.isEmpty) {
updateCityList();
}
}
List<ChinaRegionModel> _cityModel = [];
List<ChinaRegionModel> get cityModel => _cityModel;
Future<bool> updateCityList() async {
var model = await NetUtil().get(SAASAPI.city.allCity);
if (model.success) {
_cityModel = (model.data as List)
.map((e) => ChinaRegionModel.fromJson(e))
.toList();
HiveStore.dataBox!.put('cities', _cityModel);
return true;
} else {
return false;
}
}
List<HistoryLoginModel> _loginHistories = [];
List<HistoryLoginModel> get loginHistories => _loginHistories;
Future addHistories() async {
_loginHistories.insert(0, UserTool.appProvider.pickedCityAndCommunity!);
if (_loginHistories.length > 4) {
_loginHistories.removeAt(_loginHistories.length - 1);
}
HiveStore.dataBox!.put('historyLogin', _loginHistories);
}
}

@ -3,13 +3,14 @@ import 'dart:io';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/const/saas_api.dart';
// Flutter imports:
import 'package:aku_new_community_manager/models/user/user_info_model.dart';
import 'package:aku_new_community_manager/models/user/user_profile_model.dart';
import 'package:aku_new_community_manager/provider/message_provider.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/saas_models/user/user_info_model.dart';
import 'package:aku_new_community_manager/utils/hive_store.dart';
import 'package:aku_new_community_manager/utils/network/base_file_model.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:aku_new_community_manager/utils/websocket/web_socket_util.dart';
// Package imports:
@ -46,9 +47,9 @@ class UserProvider extends ChangeNotifier {
UserProfileModel? _profileModel;
UserProfileModel? get profileModel => _profileModel;
UserInfoModel? _infoModel;
UserInformationModel? _infoModel;
UserInfoModel? get infoModel => _infoModel;
UserInformationModel? get infoModel => _infoModel;
///profile
Future<UserProfileModel?> updateProfile() async {
@ -62,13 +63,13 @@ class UserProvider extends ChangeNotifier {
return UserProfileModel.fromJson(model.data);
}
Future<UserInfoModel?> updateUserInfo() async {
Future<UserInformationModel?> updateUserInfo() async {
BaseModel? model = await NetUtil().get(API.user.info);
if (model.data == null)
return null;
else {
var userModel = UserInfoModel.fromJson(model.data);
var userModel = UserInformationModel.fromJson(model.data);
JPush().setAlias(userModel.id.toString());
print('jpush alias is ${userModel.id}');
return userModel;
@ -106,12 +107,12 @@ class UserProvider extends ChangeNotifier {
///
setAvatar(File file) async {
Function cancel = BotToast.showLoading();
BaseFileModel fileModel = await NetUtil().upload(API.upload.avatar, file);
if (fileModel.status == true) {
BaseModel fileModel = await NetUtil().upload(API.upload.avatar, file);
if (fileModel.success) {
await NetUtil().post(
API.user.updateAvatar,
params: {
'fileUrls': [fileModel.url],
'fileUrls': [fileModel.data],
},
showMessage: true,
);
@ -126,4 +127,24 @@ class UserProvider extends ChangeNotifier {
_profileModel!.tel = tel;
notifyListeners();
}
///saas
UserInfoModel? _userInfoModel;
UserInfoModel? get userInfoModel => _userInfoModel;
///
Future updateAvatar(String? path) async {
BaseModel model = await NetUtil().post(
SAASAPI.user.updateAvatar,
params: {
'fileUrls': [path]
},
showMessage: true,
);
if (model.success) {
await updateUserInfo();
}
}
}

@ -0,0 +1,48 @@
import 'package:equatable/equatable.dart';
import 'package:hive/hive.dart';
import 'package:json_annotation/json_annotation.dart';
part 'china_region_model.g.dart';
@JsonSerializable()
@HiveType(typeId: 3)
class ChinaRegionModel extends Equatable {
@HiveField(0)
final int id;
@HiveField(1)
final String name;
@HiveField(2)
final int parentId;
@HiveField(3)
final List<ChinaRegionModel>? cityList;
factory ChinaRegionModel.fromJson(Map<String, dynamic> json) =>
_$ChinaRegionModelFromJson(json);
static ChinaRegionModel empty(int parentId) {
return ChinaRegionModel(id: 0, name: '', cityList: [], parentId: 0);
}
ChinaRegionModel({
required this.id,
required this.name,
required this.parentId,
this.cityList,
});
@override
List<Object?> get props => [id, name, parentId, cityList];
ChinaRegionModel copyWith({
int? id,
String? name,
int? parentId,
List<ChinaRegionModel>? cityList,
}) {
return ChinaRegionModel(
id: id ?? this.id,
name: name ?? this.name,
parentId: parentId ?? this.parentId,
cityList: cityList ?? this.cityList,
);
}
}

@ -0,0 +1,64 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'china_region_model.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class ChinaRegionModelAdapter extends TypeAdapter<ChinaRegionModel> {
@override
final int typeId = 3;
@override
ChinaRegionModel read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return ChinaRegionModel(
id: fields[0] as int,
name: fields[1] as String,
parentId: fields[2] as int,
cityList: (fields[3] as List?)?.cast<ChinaRegionModel>(),
);
}
@override
void write(BinaryWriter writer, ChinaRegionModel obj) {
writer
..writeByte(4)
..writeByte(0)
..write(obj.id)
..writeByte(1)
..write(obj.name)
..writeByte(2)
..write(obj.parentId)
..writeByte(3)
..write(obj.cityList);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is ChinaRegionModelAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
ChinaRegionModel _$ChinaRegionModelFromJson(Map<String, dynamic> json) =>
ChinaRegionModel(
id: json['id'] as int,
name: json['name'] as String,
parentId: json['parentId'] as int,
cityList: (json['cityList'] as List<dynamic>?)
?.map((e) => ChinaRegionModel.fromJson(e as Map<String, dynamic>))
.toList(),
);

@ -0,0 +1,28 @@
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
part 'community_model.g.dart';
@JsonSerializable()
class CommunityModel extends Equatable {
final int id;
final String name;
final String address;
final String addressDetails;
factory CommunityModel.fromJson(Map<String, dynamic> json) =>
_$CommunityModelFromJson(json);
const CommunityModel({
required this.id,
required this.name,
required this.address,
required this.addressDetails,
});
@override
List<Object?> get props => [
id,
name,
address,
addressDetails,
];
}

@ -0,0 +1,15 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'community_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
CommunityModel _$CommunityModelFromJson(Map<String, dynamic> json) =>
CommunityModel(
id: json['id'] as int,
name: json['name'] as String,
address: json['address'] as String,
addressDetails: json['addressDetails'] as String,
);

@ -0,0 +1,27 @@
import 'package:aku_new_community_manager/saas_models/login/picked_city_model.dart';
import 'package:equatable/equatable.dart';
import 'package:hive/hive.dart';
import 'package:json_annotation/json_annotation.dart';
import 'community_model.dart';
part 'history_login_model.g.dart';
@JsonSerializable()
@HiveType(typeId: 4)
class HistoryLoginModel extends Equatable {
@HiveField(0)
PickedCityModel cityModel;
@HiveField(1)
CommunityModel? communityModel;
factory HistoryLoginModel.fromJson(Map<String, dynamic> json) =>
_$HistoryLoginModelFromJson(json);
HistoryLoginModel({
required this.cityModel,
this.communityModel,
});
@override
List<Object?> get props => [cityModel, communityModel];
}

@ -0,0 +1,58 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'history_login_model.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class HistoryLoginModelAdapter extends TypeAdapter<HistoryLoginModel> {
@override
final int typeId = 4;
@override
HistoryLoginModel read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return HistoryLoginModel(
cityModel: fields[0] as PickedCityModel,
communityModel: fields[1] as CommunityModel?,
);
}
@override
void write(BinaryWriter writer, HistoryLoginModel obj) {
writer
..writeByte(2)
..writeByte(0)
..write(obj.cityModel)
..writeByte(1)
..write(obj.communityModel);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is HistoryLoginModelAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
HistoryLoginModel _$HistoryLoginModelFromJson(Map<String, dynamic> json) =>
HistoryLoginModel(
cityModel:
PickedCityModel.fromJson(json['cityModel'] as Map<String, dynamic>),
communityModel: json['communityModel'] == null
? null
: CommunityModel.fromJson(
json['communityModel'] as Map<String, dynamic>),
);

@ -0,0 +1,53 @@
import 'package:aku_new_community_manager/utils/hive_store.dart';
import 'package:equatable/equatable.dart';
import 'package:hive/hive.dart';
import 'package:json_annotation/json_annotation.dart';
import 'china_region_model.dart';
part 'picked_city_model.g.dart';
@JsonSerializable()
@HiveType(typeId: 6)
class PickedCityModel extends Equatable {
@HiveField(0)
final ChinaRegionModel province;
@HiveField(1)
final ChinaRegionModel city;
@HiveField(2)
final ChinaRegionModel district;
factory PickedCityModel.fromJson(Map<String, dynamic> json) =>
_$PickedCityModelFromJson(json);
const PickedCityModel({
required this.province,
required this.city,
required this.district,
});
factory PickedCityModel.fromId(
{required int provinceId, required int cityId, required int distrctId}) {
var provinces =
HiveStore.dataBox!.get('cities').cast<ChinaRegionModel>().toList();
final _province =
provinces.firstWhere((element) => element.id == provinceId);
final _city =
_province.cityList.firstWhere((element) => element.id == cityId);
final _district =
_city.cityList.firstWhere((element) => element.id == distrctId);
return PickedCityModel(
province: _province,
city: _city,
district: _district,
);
}
String get address => province.name + city.name + district.name;
int get id => district.id;
@override
List<Object?> get props => [province, city, district];
}

@ -0,0 +1,60 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'picked_city_model.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class PickedCityModelAdapter extends TypeAdapter<PickedCityModel> {
@override
final int typeId = 6;
@override
PickedCityModel read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return PickedCityModel(
province: fields[0] as ChinaRegionModel,
city: fields[1] as ChinaRegionModel,
district: fields[2] as ChinaRegionModel,
);
}
@override
void write(BinaryWriter writer, PickedCityModel obj) {
writer
..writeByte(3)
..writeByte(0)
..write(obj.province)
..writeByte(1)
..write(obj.city)
..writeByte(2)
..write(obj.district);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is PickedCityModelAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
PickedCityModel _$PickedCityModelFromJson(Map<String, dynamic> json) =>
PickedCityModel(
province:
ChinaRegionModel.fromJson(json['province'] as Map<String, dynamic>),
city: ChinaRegionModel.fromJson(json['city'] as Map<String, dynamic>),
district:
ChinaRegionModel.fromJson(json['district'] as Map<String, dynamic>),
);

@ -0,0 +1,29 @@
import 'package:json_annotation/json_annotation.dart';
part 'base_list_model.g.dart';
@JsonSerializable()
class BaseListModel {
final int pages;
final List<dynamic> rows;
final int total;
BaseListModel.zero({
this.total = 0,
this.pages = 0,
this.rows = const [],
});
BaseListModel.err({
this.pages = 0,
this.total = 0,
this.rows = const [],
});
factory BaseListModel.fromJson(Map<String, dynamic> json) =>
_$BaseListModelFromJson(json);
const BaseListModel({
required this.pages,
required this.rows,
required this.total,
});
}

@ -0,0 +1,14 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'base_list_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
BaseListModel _$BaseListModelFromJson(Map<String, dynamic> json) =>
BaseListModel(
pages: json['pages'] as int,
rows: json['rows'] as List<dynamic>,
total: json['total'] as int,
);

@ -0,0 +1,26 @@
import 'package:json_annotation/json_annotation.dart';
part 'base_model.g.dart';
@JsonSerializable(includeIfNull: false)
class BaseModel {
final int code;
final String msg;
final bool success;
final dynamic data;
factory BaseModel.fromJson(Map<String, dynamic> json) =>
_$BaseModelFromJson(json);
static BaseModel error(
{String? message, bool? success, dynamic data, int? code}) =>
BaseModel(
code: code ?? 0, msg: message ?? '未知错误', success: success ?? false);
BaseModel({
required this.code,
required this.msg,
required this.success,
this.data,
});
}

@ -0,0 +1,14 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'base_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
BaseModel _$BaseModelFromJson(Map<String, dynamic> json) => BaseModel(
code: json['code'] as int,
msg: json['msg'] as String,
success: json['success'] as bool,
data: json['data'],
);

@ -0,0 +1,58 @@
import 'package:aku_new_community_manager/models/common/img_model.dart';
import 'package:json_annotation/json_annotation.dart';
part 'user_info_model.g.dart';
@JsonSerializable()
class UserInfoModel {
final int id;
final int communityId;
final String communityCode;
final String? name;
final String? idCard;
final String tel;
// 1. 2. 3.
final int? sex;
final String? nickName;
final bool isExistPassword;
final bool isPointsSignSetting;
final bool isSign;
final int? points;
final List<ImgModel> imgList;
String get sexValue {
if (sex == 1) return '';
if (sex == 2) return '';
if (sex == 3) return '保密';
return '未设置';
}
// DateTime? get birthdayDate => DateUtil.getDateTime(birthday ?? '');
// String get birthdayValue {
// if (TextUtil.isEmpty(birthday))
// return '未设置';
// else
// return DateUtil.formatDate(birthdayDate, format: 'yyyy-MM-dd');
// }
factory UserInfoModel.fromJson(Map<String, dynamic> json) =>
_$UserInfoModelFromJson(json);
const UserInfoModel({
required this.id,
required this.communityId,
required this.communityCode,
this.name,
this.idCard,
required this.tel,
this.sex,
this.nickName,
required this.isExistPassword,
required this.isPointsSignSetting,
required this.isSign,
this.points,
required this.imgList,
});
}

@ -0,0 +1,26 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'user_info_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
UserInfoModel _$UserInfoModelFromJson(Map<String, dynamic> json) =>
UserInfoModel(
id: json['id'] as int,
communityId: json['communityId'] as int,
communityCode: json['communityCode'] as String,
name: json['name'] as String?,
idCard: json['idCard'] as String?,
tel: json['tel'] as String,
sex: json['sex'] as int?,
nickName: json['nickName'] as String?,
isExistPassword: json['isExistPassword'] as bool,
isPointsSignSetting: json['isPointsSignSetting'] as bool,
isSign: json['isSign'] as bool,
points: json['points'] as int?,
imgList: (json['imgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
);

@ -1,11 +1,11 @@
// Package imports:
import 'package:aku_new_community_manager/provider/message_provider.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
// Project imports:
import 'package:aku_new_community_manager/provider/app_provider.dart';
import 'package:aku_new_community_manager/provider/data_provider.dart';
import 'package:aku_new_community_manager/provider/message_provider.dart';
import 'package:aku_new_community_manager/provider/user_provider.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
///
class UserTool {
@ -18,7 +18,12 @@ class UserTool {
Provider.of<UserProvider>(Get.context!, listen: false);
///
static MessageProvider get messageProvider => Provider.of<MessageProvider>(Get.context!,listen: false);
static MessageProvider get messageProvider =>
Provider.of<MessageProvider>(Get.context!, listen: false);
///
static DataProvider get dataProvider =>
Provider.of<DataProvider>(Get.context!, listen: false);
UserTool();
}

@ -1,27 +1,24 @@
// Dart imports:
import 'dart:ui';
// Flutter imports:
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/const/resource.dart';
import 'package:aku_new_community_manager/models/announce/announcement_detail_model.dart';
import 'package:aku_new_community_manager/models/announce/announcement_list_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/tools/widget_tool.dart';
import 'package:aku_new_community_manager/ui/home/announcement/anouncement_details.dart';
// Flutter imports:
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/ui/widgets/common/bee_list_view.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
class AllAnouncement extends StatefulWidget {
AllAnouncement({Key? key}) : super(key: key);
@ -146,7 +143,7 @@ class AllAnouncementState extends State<AllAnouncement> {
path: API.message.announcementList,
controller: _refreshController,
convert: (models) {
return models.tableList!
return models.rows
.map((e) => AnnouncementListModel.fromJson(e))
.toList();
},

@ -12,6 +12,7 @@ import 'package:aku_new_community_manager/models/todo_bussiness/todo_outdoor_mod
import 'package:aku_new_community_manager/provider/app_provider.dart';
import 'package:aku_new_community_manager/provider/message_provider.dart';
import 'package:aku_new_community_manager/provider/user_provider.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_list_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/tools/screen_tool.dart';
import 'package:aku_new_community_manager/tools/user_tool.dart';
@ -33,7 +34,6 @@ import 'package:aku_new_community_manager/ui/tool_pages/warning/warning_page.dar
import 'package:aku_new_community_manager/ui/widgets/app_widgets/aku_avatar.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_material_button.dart';
import 'package:aku_new_community_manager/utils/network/base_list_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:aku_new_community_manager/utils/websocket/web_socket_util.dart';
// Package imports:
@ -172,7 +172,7 @@ class _HomePageState extends State<HomePage> {
"pageNum": 1,
"size": 3,
}));
List<AnnouncementListModel> anounceModels = baseListModel.tableList!
List<AnnouncementListModel> anounceModels = baseListModel.rows
.map((e) => AnnouncementListModel.fromJson(e))
.toList();
return anounceModels;

@ -1,11 +1,4 @@
// Flutter imports:
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/message/comment_message_item_model.dart';
@ -13,6 +6,11 @@ import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/ui/home/messages/comment_message_card.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/ui/widgets/common/bee_list_view.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class CommentMessage extends StatefulWidget {
CommentMessage({Key? key}) : super(key: key);
@ -31,9 +29,8 @@ class _CommentMessageState extends State<CommentMessage> {
body: BeeListView(
controller: _refreshController,
path: API.message.commentList,
convert: (model) => model.tableList!
.map((e) => CommentMessageItemModel.fromJson(e))
.toList(),
convert: (model) =>
model.rows.map((e) => CommentMessageItemModel.fromJson(e)).toList(),
builder: (items) {
return ListView.separated(
padding: EdgeInsets.symmetric(horizontal: 32.w),

@ -1,20 +1,17 @@
// Flutter imports:
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:flutter/material.dart';
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
// Package imports:
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shimmer/shimmer.dart';
import 'package:velocity_x/velocity_x.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/message/comment_message_detail_model.dart';
import 'package:aku_new_community_manager/models/message/comment_message_item_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
// Package imports:
import 'package:shimmer/shimmer.dart';
import 'package:velocity_x/velocity_x.dart';
class CommentMessageCard extends StatefulWidget {
final CommentMessageItemModel itemModel;
@ -295,7 +292,7 @@ class _CommentMessageCardState extends State<CommentMessageCard> {
// color: AppStyle.primaryTextColor,
// fontSize: 28.sp)),
RatingBar.builder(
ignoreGestures: true,
ignoreGestures: true,
initialRating: model.level!.toDouble(),
itemSize: 40.w,
allowHalfRating: true,

@ -8,7 +8,7 @@ import 'package:aku_new_community_manager/ui/home/messages/comment_message.dart'
import 'package:aku_new_community_manager/ui/home/messages/system/system_message.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
// Package imports:
import 'package:dio/dio.dart';
@ -162,7 +162,7 @@ class _MessageState extends State<Message> {
onpressed: () async {
BaseModel baseModel =
await NetUtil().get(API.message.allReadSysMes);
if (baseModel.status ?? false) {
if (baseModel.success ?? false) {
messageProvider.updateMessage();
Get.to(() => SystemMessage());
}
@ -180,7 +180,7 @@ class _MessageState extends State<Message> {
onpressed: () async {
BaseModel baseModel =
await NetUtil().get(API.message.allReadCommentMes);
if (baseModel.status ?? false) {
if (baseModel.success ?? false) {
messageProvider.updateMessage();
Get.to(() => CommentMessage());
}

@ -1,22 +1,20 @@
// Flutter imports:
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/message/system_message_item_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/ui/home/messages/system/system_message_card.dart';
import 'package:aku_new_community_manager/ui/home/messages/system/system_message_green_card.dart';
import 'package:aku_new_community_manager/ui/home/messages/system/system_message_hygience_card.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/ui/widgets/common/bee_list_view.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/message/system_message_item_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/ui/home/messages/system/system_message_card.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/ui/widgets/common/bee_list_view.dart';
class SystemMessage extends StatefulWidget {
SystemMessage({Key? key}) : super(key: key);
@ -46,9 +44,8 @@ class _SystemMessageState extends State<SystemMessage> {
itemCount: items.length);
},
path: API.message.systemList,
convert: (model) => model.tableList!
.map((e) => SystemMessageItemModel.fromJson(e))
.toList(),
convert: (model) =>
model.rows.map((e) => SystemMessageItemModel.fromJson(e)).toList(),
),
);
}
@ -77,7 +74,7 @@ class _SystemMessageState extends State<SystemMessage> {
return SystemMessageHygienceCard(
relationId: model.relationId!, date: _date, type: 4);
case 5:
return SystemMessageHygienceCard(
return SystemMessageHygienceCard(
relationId: model.relationId!, date: _date, type: 5);
default:
return Container();

@ -1,23 +1,20 @@
// Flutter imports:
import 'dart:async';
import 'package:aku_new_community_manager/ui/home/messages/message_map.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:shimmer/shimmer.dart';
import 'package:velocity_x/velocity_x.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/message/system_message_detail_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/ui/home/messages/message_map.dart';
import 'package:aku_new_community_manager/ui/sub_pages/business_and_fix/business_and_fix_page.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:get/get.dart';
import 'package:shimmer/shimmer.dart';
import 'package:velocity_x/src/extensions/num_ext.dart';
class SystemMessageCard extends StatefulWidget {
final int relationId;
@ -26,7 +23,8 @@ class SystemMessageCard extends StatefulWidget {
SystemMessageCard({
Key? key,
required this.relationId,
required this.date, required this.type,
required this.date,
required this.type,
}) : super(key: key);
@override
@ -189,152 +187,145 @@ class _SystemMessageCardState extends State<SystemMessageCard> {
Widget _messageList(SystemMessageDetailModel? model) {
return Column(
children: [
widget.date == null ? 16.w.heightBox : SizedBox(),
widget.date == null
? SizedBox()
: Container(
margin: EdgeInsets.only(top: 24.w, bottom: 24.w),
alignment: Alignment.center,
width: double.infinity,
child: Text(
widget.date!,
style: TextStyle(
color: AppStyle.minorTextColor, fontSize: 24.sp),
),
),
Container(
padding: EdgeInsets.only(top: 24.w, left: 24.w, right: 24.w),
color: Color(0xFFFFFFFF),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
widget.date==null?16.w.heightBox:SizedBox(),
widget.date == null
? SizedBox()
: Container(
margin: EdgeInsets.only(top: 24.w, bottom: 24.w),
alignment: Alignment.center,
width: double.infinity,
child: Text(
widget.date!,
style: TextStyle(
color: AppStyle.minorTextColor, fontSize: 24.sp),
),
),
Container(
padding: EdgeInsets.only(top:24.w,left: 24.w, right: 24.w),
color: Color(0xFFFFFFFF),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(children: [
// Container(
// width: 16.w,
// height: 16.w,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8.w),
// color: Color(0xFFFF4501)),
// ),
// SizedBox(
// width: 16.w,
// ),
Row(children: [
// Container(
// width: 16.w,
// height: 16.w,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8.w),
// color: Color(0xFFFF4501)),
// ),
// SizedBox(
// width: 16.w,
// ),
Text(
'系统通知',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 32.sp,
fontWeight: FontWeight.w600),
),
SizedBox(height: 8.w),
]),
Text(
'你有一条新的${MessageMap.sysType(widget.type)},请立即处理',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp,
fontWeight: FontWeight.bold),
),
SizedBox(height: 24.w),
Row(
children: [
Image.asset(
R.ASSETS_MESSAGE_IC_PEOPLE_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
),
Text(
'报修人员',
style: TextStyle(
color: AppStyle.minorTextColor, fontSize: 28.sp),
),
Spacer(),
Text(
model!.name!,
style: TextStyle(
color: AppStyle.primaryTextColor, fontSize: 28.sp),
),
],
),
SizedBox(height: 16.w),
Row(
children: [
Image.asset(
R.ASSETS_MESSAGE_IC_PHONE_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
),
Text('联系电话',
style: TextStyle(
color: AppStyle.minorTextColor, fontSize: 28.sp)),
Spacer(),
Text(model.tel!,
style: TextStyle(
color: AppStyle.primaryTextColor, fontSize: 28.sp)),
],
),
SizedBox(height: 16.w),
Row(
children: [
Image.asset(
R.ASSETS_MESSAGE_IC_AREA_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
),
Text('服务类型',
style: TextStyle(
color: AppStyle.minorTextColor, fontSize: 28.sp)),
Spacer(),
Text('${model.typeString}',
style: TextStyle(
color: AppStyle.primaryTextColor, fontSize: 28.sp)),
],
),
SizedBox(height: 16.w),
Divider(
height: 1.w,
),
AkuButton(
onPressed: () {
Get.to(() => BusinessAndFixPage());
},
child: Container(
height: 88.w,
alignment: Alignment.center,
child: Row(
children: [
Text(
'系统通知',
'查看详情',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 32.sp,
fontWeight: FontWeight.w600),
),
SizedBox(height: 8.w),
]),
Text(
'你有一条新的${MessageMap.sysType(widget.type)},请立即处理',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp,
fontWeight: FontWeight.bold),
),
SizedBox(height: 24.w),
Row(
children: [
Image.asset(
R.ASSETS_MESSAGE_IC_PEOPLE_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
),
Text(
'报修人员',
style: TextStyle(
color: AppStyle.minorTextColor, fontSize: 28.sp),
),
Spacer(),
Text(
model!.name!,
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp),
),
],
),
SizedBox(height: 16.w),
Row(
children: [
Image.asset(
R.ASSETS_MESSAGE_IC_PHONE_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
),
Text('联系电话',
style: TextStyle(
color: AppStyle.minorTextColor,
fontSize: 28.sp)),
Spacer(),
Text(model.tel!,
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp)),
],
),
SizedBox(height: 16.w),
Row(
children: [
Image.asset(
R.ASSETS_MESSAGE_IC_AREA_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
),
Text('服务类型',
style: TextStyle(
color: AppStyle.minorTextColor,
fontSize: 28.sp)),
Spacer(),
Text('${model.typeString}',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp)),
],
),
SizedBox(height: 16.w),
Divider(
height: 1.w,
),
AkuButton(
onPressed: () {
Get.to(() => BusinessAndFixPage());
},
child: Container(
height: 88.w,
alignment: Alignment.center,
child: Row(
children: [
Text(
'查看详情',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp),
),
Spacer(),
Icon(Icons.arrow_forward_ios, size: 22.w),
],
),
color: AppStyle.primaryTextColor, fontSize: 28.sp),
),
),
],
Spacer(),
Icon(Icons.arrow_forward_ios, size: 22.w),
],
),
),
),
],
);
),
),
],
);
}
}

@ -1,24 +1,22 @@
// Flutter imports:
import 'dart:async';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/json_models/message/system_message_green_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/ui/home/messages/message_map.dart';
import 'package:aku_new_community_manager/ui/manage_pages/green_manage/green_manage_page.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:shimmer/shimmer.dart';
import 'package:velocity_x/velocity_x.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
class SystemMessageGreenCard extends StatefulWidget {
final int relationId;
final String? date;
@ -51,7 +49,7 @@ class _SystemMessageGreenCardState extends State<SystemMessageGreenCard> {
Widget build(BuildContext context) {
return (_systemModel == null || _onLoad)
? _loadingWidget()
:_messageList(_systemModel!);
: _messageList(_systemModel!);
}
Future<SystemMessageGreenModel> getSystemMessage(int repairId) async {
@ -59,7 +57,7 @@ class _SystemMessageGreenCardState extends State<SystemMessageGreenCard> {
await NetUtil().get(API.message.getSysGreenMessageById, params: {
"greenTaskId": repairId,
});
if (baseModel.status ?? false) {
if (baseModel.success ?? false) {
return SystemMessageGreenModel.fromJson(baseModel.data);
} else {
return SystemMessageGreenModel.fail();
@ -193,153 +191,146 @@ class _SystemMessageGreenCardState extends State<SystemMessageGreenCard> {
}
Widget _messageList(SystemMessageGreenModel model) {
return Column(
return Column(
children: [
widget.date == null ? 16.w.heightBox : SizedBox(),
widget.date == null
? SizedBox()
: Container(
margin: EdgeInsets.only(top: 24.w, bottom: 24.w),
alignment: Alignment.center,
width: double.infinity,
child: Text(
widget.date!,
style: TextStyle(
color: AppStyle.minorTextColor, fontSize: 24.sp),
),
),
Container(
padding: EdgeInsets.only(top: 24.w, left: 24.w, right: 24.w),
color: Color(0xFFFFFFFF),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
widget.date==null?16.w.heightBox:SizedBox(),
widget.date == null
? SizedBox()
: Container(
margin: EdgeInsets.only(top: 24.w, bottom: 24.w),
alignment: Alignment.center,
width: double.infinity,
child: Text(
widget.date!,
style: TextStyle(
color: AppStyle.minorTextColor, fontSize: 24.sp),
),
),
Container(
padding: EdgeInsets.only(top:24.w,left: 24.w, right: 24.w),
color: Color(0xFFFFFFFF),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(children: [
// Container(
// width: 16.w,
// height: 16.w,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8.w),
// color: Color(0xFFFF4501)),
// ),
// SizedBox(
// width: 16.w,
// ),
Row(children: [
// Container(
// width: 16.w,
// height: 16.w,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8.w),
// color: Color(0xFFFF4501)),
// ),
// SizedBox(
// width: 16.w,
// ),
Text(
'系统通知',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 32.sp,
fontWeight: FontWeight.w600),
),
SizedBox(height: 8.w),
]),
Text(
'你有一条新的${MessageMap.sysType(widget.type)},请立即处理',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp,
fontWeight: FontWeight.bold),
),
SizedBox(height: 24.w),
Row(
children: [
Image.asset(
R.ASSETS_MESSAGE_IC_PEOPLE_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
),
Text(
'保修人',
style: TextStyle(
color: AppStyle.minorTextColor, fontSize: 28.sp),
),
Spacer(),
Text(
model.name,
style: TextStyle(
color: AppStyle.primaryTextColor, fontSize: 28.sp),
),
],
),
SizedBox(height: 16.w),
Row(
children: [
Image.asset(
R.ASSETS_MESSAGE_IC_PHONE_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
),
Text('联系电话',
style: TextStyle(
color: AppStyle.minorTextColor, fontSize: 28.sp)),
Spacer(),
Text(model.tel,
style: TextStyle(
color: AppStyle.primaryTextColor, fontSize: 28.sp)),
],
),
SizedBox(height: 16.w),
Row(
children: [
Image.asset(
R.ASSETS_MESSAGE_IC_AREA_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
),
Text('报修区域',
style: TextStyle(
color: AppStyle.minorTextColor, fontSize: 28.sp)),
Spacer(),
Text('area',
style: TextStyle(
color: AppStyle.primaryTextColor, fontSize: 28.sp)),
],
),
SizedBox(height: 16.w),
Divider(
height: 1.w,
),
AkuButton(
onPressed: () {
Get.to(() => GreenManagePage());
},
child: Container(
height: 88.w,
alignment: Alignment.center,
child: Row(
children: [
Text(
'系统通知',
'查看详情',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 32.sp,
fontWeight: FontWeight.w600),
color: AppStyle.primaryTextColor, fontSize: 28.sp),
),
SizedBox(height: 8.w),
]),
Text(
'你有一条新的${MessageMap.sysType(widget.type)},请立即处理',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp,
fontWeight: FontWeight.bold),
),
SizedBox(height: 24.w),
Row(
children: [
Image.asset(
R.ASSETS_MESSAGE_IC_PEOPLE_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
),
Text(
'保修人',
style: TextStyle(
color: AppStyle.minorTextColor, fontSize: 28.sp),
),
Spacer(),
Text(
model.name,
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp),
),
],
),
SizedBox(height: 16.w),
Row(
children: [
Image.asset(
R.ASSETS_MESSAGE_IC_PHONE_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
),
Text('联系电话',
style: TextStyle(
color: AppStyle.minorTextColor,
fontSize: 28.sp)),
Spacer(),
Text(model.tel,
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp)),
],
),
SizedBox(height: 16.w),
Row(
children: [
Image.asset(
R.ASSETS_MESSAGE_IC_AREA_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
),
Text('报修区域',
style: TextStyle(
color: AppStyle.minorTextColor,
fontSize: 28.sp)),
Spacer(),
Text('area',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp)),
],
),
SizedBox(height: 16.w),
Divider(
height: 1.w,
),
AkuButton(
onPressed: () {
Get.to(() => GreenManagePage());
},
child: Container(
height: 88.w,
alignment: Alignment.center,
child: Row(
children: [
Text(
'查看详情',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp),
),
Spacer(),
Icon(Icons.arrow_forward_ios, size: 22.w),
],
),
),
),
],
Spacer(),
Icon(Icons.arrow_forward_ios, size: 22.w),
],
),
),
),
],
);
),
),
],
);
}
}

@ -4,7 +4,7 @@ import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/ui/home/messages/message_map.dart';
import 'package:aku_new_community_manager/ui/manage_pages/house_keeping/house_keeping_page.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@ -51,7 +51,7 @@ class _SystemMessageHouseKeepingCardState
await NetUtil().get(API.message.getSysHygienceMessageById, params: {
"housekeepingServiceId": relationId,
});
if (baseModel.status ?? false) {
if (baseModel.success ?? false) {
return SystemMessageHouseKeepingModel.fromJson(baseModel.data);
}
}

@ -1,23 +1,21 @@
// Flutter imports:
import 'dart:async';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/json_models/message/system_message_hygience_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/ui/home/messages/message_map.dart';
import 'package:aku_new_community_manager/ui/manage_pages/hygience_manage/hygience_manage_page.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:shimmer/shimmer.dart';
import 'package:velocity_x/velocity_x.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:velocity_x/src/extensions/num_ext.dart';
class SystemMessageHygienceCard extends StatefulWidget {
final int relationId;
@ -60,7 +58,7 @@ class _SystemMessageHygienceCardState extends State<SystemMessageHygienceCard> {
await NetUtil().get(API.message.getSysHygienceMessageById, params: {
"hygieneTaskId": repairId,
});
if (baseModel.status ?? false) {
if (baseModel.success ?? false) {
return SystemMessageHygineceModel.fromJson(baseModel.data);
}
}

@ -1,7 +1,7 @@
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/json_models/clock_in_out/today_clock_record_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
@ -10,10 +10,10 @@ import 'package:flutter/material.dart';
class ClockFunc {
static Future initClockInfo() async {
BaseModel baseModel = await NetUtil().get(API.manage.todayClockRecord);
if (baseModel.status! && baseModel.data != null) {
if (baseModel.success! && baseModel.data != null) {
return TodayClockRecordModel.fromJson(baseModel.data);
} else {
BotToast.showText(text: baseModel.message!);
BotToast.showText(text: baseModel.msg);
}
}
@ -50,7 +50,7 @@ class ClockFunc {
"endDate": DateUtil.formatDate(end, format: 'yyyy-MM-dd HH:mm:ss')
},
showMessage: true);
return baseModel.status;
return baseModel.success;
}
static Color lateOrLeaveEarlyColor(

@ -43,7 +43,7 @@ class _ClockInOutViewState extends State<ClockInOutView> {
path: API.manage.clockRecord,
controller: _refreshController,
convert: (models) {
return models.tableList!
return models.rows
.map((e) => ClockRecordListModel.fromJson(e))
.toList();
},
@ -65,7 +65,7 @@ class _ClockInOutViewState extends State<ClockInOutView> {
path: API.manage.clockApplyRecord,
controller: _refreshController,
convert: (models) {
return models.tableList!
return models.rows
.map((e) => ClockApplyRecordListModel.fromJson(e))
.toList();
},

@ -20,7 +20,7 @@ class EngineerRepairFunc {
'reportDetail': reportDetail,
'fileUrls': urls,
});
return model.status ?? false;
return model.success;
}
static Future<EngineerRepairDetailModel?> getEngineerRepairDetail(
@ -28,7 +28,7 @@ class EngineerRepairFunc {
var model = await NetUtil().get(API.engineerRepair.detail,
params: {'repairEngineeringId': repairEngineeringId});
if (model.status ?? false) {
if (model.success) {
return EngineerRepairDetailModel.fromJson(model.data);
} else {
return null;
@ -40,7 +40,7 @@ class EngineerRepairFunc {
var model = await NetUtil().get(API.engineerRepair.process,
params: {'repairEngineeringId': repairEngineeringId});
if (model.status ?? false) {
if (model.success) {
return (model.data as List)
.map((e) => EngineerRepairProcessModel.fromJson(e))
.toList();
@ -54,7 +54,7 @@ class EngineerRepairFunc {
var model = await NetUtil().get(API.engineerRepair.workReport,
params: {'repairEngineeringId': repairEngineeringId});
if (model.status ?? false) {
if (model.success) {
return (model.data as List)
.map((e) => EngineerRepairWorkReportModel.fromJson(e))
.toList();
@ -68,7 +68,7 @@ class EngineerRepairFunc {
API.engineerRepair.organization,
);
if (model.status ?? false) {
if (model.success) {
return (model.data as List)
.map((e) => EngineerRepairOrganizationModel.fromJson(e))
.toList();
@ -82,7 +82,7 @@ class EngineerRepairFunc {
var model = await NetUtil().get(API.engineerRepair.persons,
params: {'repairOrganizationId': organizationId});
if (model.status ?? false) {
if (model.success) {
return (model.data as List)
.map((e) => EngineerRepairPersonModel.fromJson(e))
.toList();
@ -94,20 +94,20 @@ class EngineerRepairFunc {
static Future companySend(int repairId, int organizationId) async {
var model = await NetUtil().post(API.engineerRepair.companySend,
params: {'id': repairId, 'organizationId': organizationId});
return model.status ?? false;
return model.success;
}
static Future<bool> personSend(int repairId, int maintenanceStaffId) async {
var model = await NetUtil().post(API.engineerRepair.personSend,
params: {'id': repairId, 'maintenanceStaff': maintenanceStaffId});
return model.status ?? false;
return model.success;
}
static Future<bool> personPick(int repairId) async {
var model = await NetUtil().post(API.engineerRepair.personPick, params: {
'id': repairId,
});
return model.status ?? false;
return model.success;
}
static Future uploadReportImages(List<File> files) async {
@ -123,7 +123,7 @@ class EngineerRepairFunc {
'content': detail,
'workReportImgUrls': urls,
});
return model.status ?? false;
return model.success;
}
static Future complete(
@ -138,7 +138,7 @@ class EngineerRepairFunc {
'billMaterials': material,
'maintenanceImgUrls': urls,
});
return model.status ?? false;
return model.success;
}
static Future uploadCompleteImages(List<File> files) async {
@ -151,7 +151,7 @@ class EngineerRepairFunc {
var model = await NetUtil().get(API.engineerRepair.repairResult, params: {
'repairEngineeringId': repairId,
});
if (model.status ?? false) {
if (model.success) {
return EngineerRepairResultModel.fromJson(model.data);
} else {
return null;
@ -168,7 +168,7 @@ class EngineerRepairFunc {
'advice': advice,
'acceptanceImgUrls': urls,
});
return model.status ?? false;
return model.success;
}
static Future uploadAcceptanceImages(List<File> files) async {
@ -182,7 +182,7 @@ class EngineerRepairFunc {
await NetUtil().get(API.engineerRepair.acceptanceRecordNew, params: {
'repairEngineeringId': repairId,
});
if (model.status ?? false) {
if (model.success) {
return EngineerRepairNewAcceptanceRecordModel.fromJson(model.data);
} else {
return null;
@ -195,7 +195,7 @@ class EngineerRepairFunc {
await NetUtil().get(API.engineerRepair.acceptanceRecordList, params: {
'repairEngineeringId': repairId,
});
if (model.status ?? false) {
if (model.success) {
return (model.data as List)
.map((e) => EngineerRepairNewAcceptanceRecordModel.fromJson(e))
.toList();
@ -209,6 +209,6 @@ class EngineerRepairFunc {
await NetUtil().post(API.engineerRepair.startRectification, params: {
'id': repairId,
});
return model.status ?? false;
return model.success;
}
}

@ -51,7 +51,7 @@ class _EngineerRepairViewState extends State<EngineerRepairView> {
},
controller: widget.controller,
convert: (models) {
return models.tableList!
return models.rows
.map((e) => EngineerRepairListModel.fromJson(e))
.toList();
},

@ -11,7 +11,7 @@ import 'package:aku_new_community_manager/ui/widgets/app_widgets/aku_single_chec
import 'package:aku_new_community_manager/ui/widgets/app_widgets/bee_grid_image_view.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
@ -104,10 +104,10 @@ class _FacilitiesInspectReportDetailPageState
"detail": _describtion,
"imgUrls": _scenePhotoUrl,
});
if (baseModel.status!) {
if (baseModel.success!) {
Get.back();
}
BotToast.showText(text: baseModel.message!);
BotToast.showText(text: baseModel.msg);
},
width: double.infinity,
height: 100.w,

@ -11,7 +11,7 @@ import 'package:aku_new_community_manager/ui/widgets/app_widgets/aku_single_chec
import 'package:aku_new_community_manager/ui/widgets/app_widgets/bee_grid_image_view.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
@ -78,10 +78,10 @@ class _FacilitiesInspectReportPageState
"detail": _describtion,
"imgUrls": _scenePhotoUrl,
});
if (baseModel.status!) {
if (baseModel.success!) {
Get.back();
}
BotToast.showText(text: baseModel.message!);
BotToast.showText(text: baseModel.msg);
},
width: double.infinity,
height: 100.w,

@ -5,17 +5,17 @@ import 'package:aku_new_community_manager/ui/manage_pages/facilities/facilities_
import 'package:aku_new_community_manager/ui/widgets/common/bee_list_view.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:velocity_x/velocity_x.dart';
// Package imports:
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
// Project imports:
class FacilitiesView extends StatefulWidget {
final int index;
final int facilitiesType;
FacilitiesView({Key? key, required this.index, required this.facilitiesType}) : super(key: key);
FacilitiesView({Key? key, required this.index, required this.facilitiesType})
: super(key: key);
@override
_FacilitiesViewState createState() => _FacilitiesViewState();
@ -45,7 +45,7 @@ class _FacilitiesViewState extends State<FacilitiesView> {
},
controller: _refreshController,
convert: (models) {
return models.tableList!
return models.rows
.map((e) => FacilitiesCheckListModel.fromJson(e))
.toList();
},
@ -59,7 +59,8 @@ class _FacilitiesViewState extends State<FacilitiesView> {
model: items[index],
callRefresh: () {
_refreshController!.callRefresh();
}, executeStatus: widget.index + 1,
},
executeStatus: widget.index + 1,
);
},
separatorBuilder: (_, __) {

@ -1,30 +1,30 @@
// Flutter imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/manager/green_manage/green_manage_list_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
// Project imports:
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/tools/aku_divider.dart';
import 'package:aku_new_community_manager/tools/extensions/list_extension_tool.dart';
import 'package:aku_new_community_manager/tools/widget_tool.dart';
import 'package:aku_new_community_manager/ui/manage_pages/green_manage/green_manage_details_page.dart';
import 'package:aku_new_community_manager/ui/manage_pages/green_manage/green_manage_map.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
// Project imports:
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/tools/aku_divider.dart';
import 'package:aku_new_community_manager/tools/extensions/list_extension_tool.dart';
import 'package:aku_new_community_manager/tools/widget_tool.dart';
import 'package:aku_new_community_manager/ui/manage_pages/green_manage/green_manage_map.dart';
import 'package:velocity_x/src/extensions/num_ext.dart';
import 'package:velocity_x/src/extensions/string_ext.dart';
class GreenManageCard extends StatefulWidget {
final int index;
final GreenManageListModel model;
final VoidCallback? callRefresh;
GreenManageCard({Key? key, required this.index, required this.model, this.callRefresh})
GreenManageCard(
{Key? key, required this.index, required this.model, this.callRefresh})
: super(key: key);
@override
@ -163,10 +163,10 @@ class _GreenManageCardState extends State<GreenManageCard> {
.post(API.manage.greenManageComplete, params: {
"id": widget.model.id,
});
if (baseModel.status!) {
if (baseModel.success!) {
widget.callRefresh!();
}
BotToast.showText(text: baseModel.message!);
BotToast.showText(text: baseModel.msg);
},
)
],

@ -1,11 +1,10 @@
// Flutter imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/manager/green_manage/green_manage_list_model.dart';
import 'package:aku_new_community_manager/ui/widgets/common/bee_list_view.dart';
import 'package:flutter/material.dart';
// Project imports:
import 'package:aku_new_community_manager/ui/manage_pages/green_manage/green_manage_card.dart';
import 'package:aku_new_community_manager/ui/widgets/common/bee_list_view.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
@ -41,7 +40,7 @@ class _GreenManageViewState extends State<GreenManageView> {
},
controller: _refreshController,
convert: (models) {
return models.tableList!
return models.rows
.map((e) => GreenManageListModel.fromJson(e))
.toList();
},

@ -1,20 +1,21 @@
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/manager/house_keeping/house_keeping_building_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/tools/aku_divider.dart';
import 'package:aku_new_community_manager/tools/extensions/list_extension_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/ui/widgets/inner/aku_bottom_button.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart' hide Response;
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community_manager/tools/extensions/list_extension_tool.dart';
import 'package:velocity_x/src/extensions/num_ext.dart';
import 'package:velocity_x/src/extensions/string_ext.dart';
import 'package:velocity_x/src/flutter/widgets.dart';
class HouseKeepingAddPage extends StatefulWidget {
HouseKeepingAddPage({Key? key}) : super(key: key);
@ -94,7 +95,7 @@ class _HouseKeepingAddPageState extends State<HouseKeepingAddPage> {
},
showMessage: true,
);
if (baseModel.status!) {
if (baseModel.success!) {
Get.back();
}
}

@ -3,7 +3,7 @@ import 'dart:io';
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/json_models/manager/house_keeping/house_keeping_pick_staff_model.dart';
import 'package:aku_new_community_manager/json_models/manager/house_keeping/house_keeping_process_model.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
@ -13,7 +13,7 @@ class HouseKeepingFunc {
int id) async {
BaseModel baseModel = await NetUtil().get(API.manage.newHouseKeepingProcess,
params: {"housekeepingServiceId": id});
if (baseModel.status ?? false) {
if (baseModel.success ?? false) {
return (baseModel.data as List)
.map((e) => HouseKeepingProcessModel.fromJson(e))
.toList();
@ -28,7 +28,7 @@ class HouseKeepingFunc {
await NetUtil().get(API.manage.newHouseKeepingUrgeWork, params: {
"housekeepingServiceId": id,
});
if (baseModel.status ?? false) {
if (baseModel.success ?? false) {
BotToast.showText(text: '已成功催单,请耐心等候');
return true;
} else {
@ -42,7 +42,7 @@ class HouseKeepingFunc {
await NetUtil().post(API.manage.newHouseKeepingOrderReceive, params: {
"id": id,
});
if (baseModel.status ?? false) {
if (baseModel.success ?? false) {
BotToast.showText(text: '接单成功');
return true;
} else {
@ -54,7 +54,7 @@ class HouseKeepingFunc {
static Future newHouseKeepingPickStaffList() async {
BaseModel baseModel =
await NetUtil().get(API.manage.newHouseKeepingPickStaffList);
if (baseModel.status ?? false) {
if (baseModel.success ?? false) {
return (baseModel.data as List)
.map((e) => HouseKeepingPickStaffModel.fromJson(e))
.toList();
@ -70,11 +70,11 @@ class HouseKeepingFunc {
"id": id,
"handler": handlerId,
});
if (baseModel.status ?? false) {
if (baseModel.success ?? false) {
BotToast.showText(text: '派单成功');
return true;
} else {
BotToast.showText(text: baseModel.message ?? '派单失败');
BotToast.showText(text: baseModel.msg);
return false;
}
}
@ -108,11 +108,11 @@ class HouseKeepingFunc {
"payFee": payFee,
"handlerImgUrls": urls,
});
if (baseModel.status ?? false) {
if (baseModel.success ?? false) {
BotToast.showText(text: '提交成功');
return true;
} else {
BotToast.showText(text: baseModel.message ?? '提交失败');
BotToast.showText(text: baseModel.msg);
return false;
}
}

@ -6,8 +6,8 @@ import 'package:aku_new_community_manager/ui/manage_pages/house_keeping/house_ke
import 'package:aku_new_community_manager/ui/widgets/common/bee_list_view.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class HouseKeepingView extends StatefulWidget {
final int index;
@ -56,7 +56,7 @@ class _HouseKeepingViewState extends State<HouseKeepingView> {
},
controller: _refreshController,
convert: (models) {
return models.tableList!
return models.rows
.map((e) => HouseKeepingListModel.fromJson(e))
.toList();
},

@ -9,7 +9,7 @@ import 'package:aku_new_community_manager/tools/widget_tool.dart';
import 'package:aku_new_community_manager/ui/manage_pages/hygience_manage/hygience_manage_detail_page.dart';
import 'package:aku_new_community_manager/ui/manage_pages/hygience_manage/hygience_manage_map.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
@ -161,10 +161,10 @@ class _HyginecManageCardState extends State<HyginecManageCard> {
.post(API.manage.hygienceComplete, params: {
"id": widget.model.id,
});
if (baseModel.status!) {
if (baseModel.success!) {
widget.callRefresh!();
}
BotToast.showText(text: baseModel.message!);
BotToast.showText(text: baseModel.msg);
},
)
],

@ -1,14 +1,13 @@
// Flutter imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/manager/hygience_manage/heygience_list_model.dart';
import 'package:aku_new_community_manager/ui/widgets/common/bee_list_view.dart';
import 'package:flutter/material.dart';
// Project imports:
import 'package:aku_new_community_manager/ui/manage_pages/hygience_manage/hygience_manage_card.dart';
import 'package:aku_new_community_manager/ui/widgets/common/bee_list_view.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class HygienceManageView extends StatefulWidget {
final int index;
@ -19,7 +18,7 @@ class HygienceManageView extends StatefulWidget {
}
class _HygienceManageViewState extends State<HygienceManageView> {
late EasyRefreshController _refreshController;
late EasyRefreshController _refreshController;
@override
void initState() {
super.initState();
@ -38,16 +37,14 @@ class _HygienceManageViewState extends State<HygienceManageView> {
path: API.manage.hygienceList,
controller: _refreshController,
extraParams: {
"hygieneStatus":widget.index+1,
"hygieneStatus": widget.index + 1,
},
convert: (models) {
return models.tableList!
.map((e) => HygienceListModel.fromJson(e))
.toList();
return models.rows.map((e) => HygienceListModel.fromJson(e)).toList();
},
builder: (items) {
return ListView.separated(
padding: EdgeInsets.all(24.w),
padding: EdgeInsets.all(24.w),
itemBuilder: (context, index) {
return HyginecManageCard(
index: widget.index,

@ -1,38 +1,40 @@
// Dart imports:
import 'dart:async';
// Flutter imports:
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:amap_flutter_base/amap_flutter_base.dart';
import 'package:amap_flutter_map/amap_flutter_map.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:provider/provider.dart';
import 'package:qr_code_scanner/qr_code_scanner.dart';
import 'package:velocity_x/velocity_x.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/manager/inspection/inspection_detail_model.dart';
import 'package:aku_new_community_manager/models/manager/inspection/inspection_point_model.dart';
import 'package:aku_new_community_manager/models/manager/inspection/inspection_qrcode_model.dart';
import 'package:aku_new_community_manager/provider/app_provider.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/ui/manage_pages/inspection_manage/inspection_point_detail_page.dart';
import 'package:aku_new_community_manager/ui/manage_pages/inspection_manage/inspection_point_input_page.dart';
import 'package:aku_new_community_manager/ui/manage_pages/inspection_manage/qr_scanner_page.dart';
import 'package:aku_new_community_manager/ui/sub_pages/manage_func.dart';
import 'package:aku_new_community_manager/ui/tool_pages/warning/warning_page.dart';
// Flutter imports:
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/utils/extension/list_extension.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:amap_flutter_base/amap_flutter_base.dart';
import 'package:amap_flutter_map/amap_flutter_map.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_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:qr_code_scanner/qr_code_scanner.dart';
import 'package:velocity_x/src/extensions/num_ext.dart';
import 'package:velocity_x/src/extensions/string_ext.dart';
import 'package:velocity_x/src/flutter/container.dart';
import 'package:velocity_x/src/flutter/gesture.dart';
import 'package:velocity_x/src/flutter/padding.dart';
import 'package:velocity_x/src/flutter/widgets.dart';
class InspectionManageDetailsPage extends StatefulWidget {
final int executeId;
@ -55,7 +57,7 @@ class _InspectionManageDetailsPageState
switch (status) {
case 1:
return Color(0xFFFF4501);
case 2:
return Color(0xFF999999);
case 3:
@ -167,20 +169,21 @@ class _InspectionManageDetailsPageState
BaseModel _baseModel = await NetUtil().get(
API.manage.inspectionStart,
params: {"executeId": widget.executeId});
if (_baseModel.status!) {
BotToast.showText(text: _baseModel.message!);
if (_baseModel.success!) {
BotToast.showText(text: _baseModel.msg);
_refreshController!.callRefresh();
_startTimer(5000);
} else {
BotToast.showText(text: _baseModel.message!);
BotToast.showText(text: _baseModel.msg);
}
}
: () async {
Barcode result = await (Get.to(() => QrScannerPage()) );
Barcode result =
await (Get.to(() => QrScannerPage()));
BaseModel baseModel =
await ManageFunc.getInspectionFindCheckDetailByQr(
_detailModel!.id!, result.code);
if (baseModel.status!) {
if (baseModel.success!) {
Get.to(() => InspectionPointInputPage(
inspectionName: _detailModel!.name,
qrModel: InspectionQRCodeModel.fromJson(
@ -507,7 +510,8 @@ class _InspectionManageDetailsPageState
zoomGesturesEnabled: false,
onMapCreated: (controller) {
_aMapController = controller;
LatLng _target = LatLng(appProvider.location!['latitude'] as double,
LatLng _target = LatLng(
appProvider.location!['latitude'] as double,
appProvider.location!['longitude'] as double);
_aMapController!.moveCamera(CameraUpdate.newCameraPosition(
CameraPosition(target: _target, zoom: 19)));
@ -521,9 +525,9 @@ class _InspectionManageDetailsPageState
CameraPosition(target: argument.latLng, zoom: 19)));
if (_canUploadLocation) {
BaseModel baseModel = await (_uploadLocation(widget.executeId,
argument.latLng.longitude, argument.latLng.latitude) );
if (!baseModel.status!) {
BotToast.showText(text: baseModel.message!);
argument.latLng.longitude, argument.latLng.latitude));
if (!baseModel.success!) {
BotToast.showText(text: baseModel.msg);
} else {
_canUploadLocation = false;
//线

@ -1,20 +1,19 @@
// Flutter imports:
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/manager/inspection/inspection_list_model.dart';
import 'package:aku_new_community_manager/ui/manage_pages/inspection_manage/inspection_manage_card.dart';
import 'package:aku_new_community_manager/ui/widgets/common/bee_list_view.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class InspectionMangeView extends StatefulWidget {
final int/*!*/ inspectionStatus;
InspectionMangeView({Key? key, required this.inspectionStatus}) : super(key: key);
final int /*!*/ inspectionStatus;
InspectionMangeView({Key? key, required this.inspectionStatus})
: super(key: key);
@override
_InspectionMangeViewState createState() => _InspectionMangeViewState();
@ -41,9 +40,7 @@ class _InspectionMangeViewState extends State<InspectionMangeView> {
controller: _easyRefreshController,
extraParams: {"inspectionStatus": widget.inspectionStatus},
convert: (models) {
return models.tableList!
.map((e) => InspectionListModel.fromJson(e))
.toList();
return models.rows.map((e) => InspectionListModel.fromJson(e)).toList();
},
builder: (items) {
return ListView.separated(

@ -1,24 +1,24 @@
// Flutter imports:
import 'dart:async';
import 'package:flutter/material.dart';
// Package imports:
import 'package:common_utils/common_utils.dart';
import 'package:dotted_border/dotted_border.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/common/img_model.dart';
import 'package:aku_new_community_manager/models/manager/inspection/inspection_check_detail_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/ui/manage_pages/inspection_manage/inspection_utils.dart';
import 'package:aku_new_community_manager/ui/sub_pages/manage_func.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
// Package imports:
import 'package:common_utils/common_utils.dart';
import 'package:dotted_border/dotted_border.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:velocity_x/src/extensions/num_ext.dart';
import 'package:velocity_x/src/extensions/string_ext.dart';
import 'package:velocity_x/src/flutter/container.dart';
import 'package:velocity_x/src/flutter/widgets.dart';
class InspectionPointDetailPage extends StatefulWidget {
final int executePointId;
@ -48,8 +48,6 @@ class _InspectionPointDetailPageState extends State<InspectionPointDetailPage> {
_easyRefreshController = EasyRefreshController();
}
@override
void dispose() {
_easyRefreshController?.dispose();
@ -66,7 +64,7 @@ class _InspectionPointDetailPageState extends State<InspectionPointDetailPage> {
MaterialHeader(valueColor: AlwaysStoppedAnimation(kPrimaryColor)),
firstRefresh: true,
onRefresh: () async {
BaseModel baseModel = await (_getModels );
BaseModel baseModel = await (_getModels);
if (baseModel.data != null) {
_detialModel = InspectionCheckDetialModel.fromJson(baseModel.data);
_onload = false;

@ -1,29 +1,30 @@
// Dart imports:
import 'dart:io';
// Flutter imports:
import 'package:aku_new_community_manager/ui/manage_pages/inspection_manage/inspection_point_submit_page.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:flutter/material.dart';
// Package imports:
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';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/manager/inspection/inspection_point_submit_model.dart';
import 'package:aku_new_community_manager/models/manager/inspection/inspection_qrcode_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
// Flutter imports:
import 'package:aku_new_community_manager/ui/manage_pages/inspection_manage/inspection_point_submit_page.dart';
import 'package:aku_new_community_manager/ui/manage_pages/inspection_manage/inspection_utils.dart';
import 'package:aku_new_community_manager/ui/sub_pages/manage_func.dart';
import 'package:aku_new_community_manager/ui/widgets/app_widgets/aku_pick_image_widget.dart';
import 'package:aku_new_community_manager/ui/widgets/app_widgets/aku_single_check_button.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
// Package imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:velocity_x/src/extensions/num_ext.dart';
import 'package:velocity_x/src/extensions/string_ext.dart';
import 'package:velocity_x/src/flutter/container.dart';
import 'package:velocity_x/src/flutter/padding.dart';
import 'package:velocity_x/src/flutter/widgets.dart';
class InspectionPointInputPage extends StatefulWidget {
final InspectionQRCodeModel? qrModel;
@ -63,7 +64,8 @@ class _InspectionPointInputPageState extends State<InspectionPointInputPage> {
);
_submitModel.executeCheckList = List.generate(
widget.qrModel!.checkVoList!.length,
(index) => ExecuteCheckList(widget.qrModel!.checkVoList![index].id, -1, ''),
(index) =>
ExecuteCheckList(widget.qrModel!.checkVoList![index].id, -1, ''),
);
}
@ -95,14 +97,15 @@ class _InspectionPointInputPageState extends State<InspectionPointInputPage> {
.uploadFiles(_selfPhotos!, API.upload.uploadInspectionFace);
_submitModel.inspectionSpaceImgPath = await NetUtil()
.uploadFiles(_scenePhots!, API.upload.uploadInspectionSpace);
.uploadFiles(
_scenePhots!, API.upload.uploadInspectionSpace);
BaseModel baseModel =
await (ManageFunc.getSubmitPoint(_submitModel) );
if (baseModel.status!) {
BotToast.showText(text: baseModel.message!);
await (ManageFunc.getSubmitPoint(_submitModel));
if (baseModel.success!) {
BotToast.showText(text: baseModel.msg);
Get.to(() => InspectionPointSubmitPage());
} else {
BotToast.showText(text: baseModel.message!);
BotToast.showText(text: baseModel.msg);
}
}
: () {},

@ -1,16 +1,16 @@
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/manager/interview/interview_list_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/tools/aku_divider.dart';
import 'package:aku_new_community_manager/tools/extensions/list_extension_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/ui/widgets/inner/aku_bottom_button.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:flutter/material.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_manager/tools/extensions/list_extension_tool.dart';
import 'package:velocity_x/src/extensions/num_ext.dart';
import 'package:velocity_x/src/extensions/string_ext.dart';
class InterviewFeedBackPage extends StatefulWidget {
final InterviewListModel model;
@ -57,7 +57,7 @@ class _InterviewFeedBackPageState extends State<InterviewFeedBackPage> {
},
showMessage: true,
);
if (baseModel.status!) {
if (baseModel.success!) {
Get.back();
}
},
@ -83,16 +83,16 @@ class _InterviewFeedBackPageState extends State<InterviewFeedBackPage> {
],
),
16.w.heightBox,
_inputWidget(_textEditingController,hintText:'请输入回复内容'),
_inputWidget(_textEditingController, hintText: '请输入回复内容'),
],
),
);
}
Widget _inputWidget(
TextEditingController? controller,
{String? hintText,}
) {
TextEditingController? controller, {
String? hintText,
}) {
return Container(
width: double.infinity,
decoration: BoxDecoration(
@ -108,12 +108,10 @@ class _InterviewFeedBackPageState extends State<InterviewFeedBackPage> {
autofocus: false,
controller: controller,
onChanged: (value) {
setState(() {
});
setState(() {});
},
decoration: InputDecoration(
hintText: hintText??'',
hintText: hintText ?? '',
hintStyle: TextStyle(
fontSize: 28.sp,
color: kTextSubColor,

@ -38,7 +38,7 @@ class _InterviewViewState extends State<InterviewView> {
"interviewStatus": widget.index + 1,
},
convert: (models) {
return models.tableList!
return models.rows
.map((e) => InterviewListModel.fromJson(e))
.toList();
},

@ -1,12 +1,12 @@
// Flutter imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/json_models/manager/key_manage/key_manage_record_list_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
// Project imports:
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/tools/aku_divider.dart';
import 'package:aku_new_community_manager/tools/extensions/list_extension_tool.dart';
import 'package:aku_new_community_manager/ui/manage_pages/key_manage/key_manage_map.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
@ -100,7 +100,7 @@ class _KeyApplyRecordCardState extends State<KeyApplyRecordCard> {
button = _bottomButton('重新申请', () async {
BaseModel baseModel = await NetUtil()
.post(API.manage.applyKey, params: {"keyId": widget.model.id});
BotToast.showText(text: baseModel.message ?? '网络错误');
BotToast.showText(text: baseModel.msg);
widget.callRefresh!();
}, Colors.white, Colors.black) as MaterialButton?;
break;

@ -42,7 +42,7 @@ class _KeyApplyRecordViewState extends State<KeyApplyRecordView>
},
controller: _refreshController,
convert: (models) {
return models.tableList!
return models.rows
.map((e) => KeyManageRecordListModel.fromJson(e))
.toList();
},

@ -1,27 +1,26 @@
// Flutter imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/manager/key_manage/key_manage_all_key_model.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
// Project imports:
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/tools/aku_divider.dart';
import 'package:aku_new_community_manager/tools/extensions/list_extension_tool.dart';
import 'package:aku_new_community_manager/ui/manage_pages/key_manage/key_manage_map.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:url_launcher/url_launcher.dart';
import 'package:velocity_x/src/extensions/num_ext.dart';
import 'package:velocity_x/src/extensions/string_ext.dart';
class KeyManageCard extends StatefulWidget {
final int/*!*/ index;
final int /*!*/ index;
final KeyMangeAllKeyModel model;
final VoidCallback? callRefresh;
KeyManageCard({Key? key, required this.index, required this.model, this.callRefresh})
KeyManageCard(
{Key? key, required this.index, required this.model, this.callRefresh})
: super(key: key);
@override
@ -94,7 +93,7 @@ class _KeyManageCardState extends State<KeyManageCard> {
button = _bottomButton('申请钥匙', () async {
BaseModel baseModel = await NetUtil()
.post(API.manage.applyKey, params: {"keyId": widget.model.id});
BotToast.showText(text: baseModel.message!);
BotToast.showText(text: baseModel.msg);
widget.callRefresh!();
}, Color(0xFFFFC40C), Colors.black) as MaterialButton?;
break;
@ -102,7 +101,7 @@ class _KeyManageCardState extends State<KeyManageCard> {
button = _bottomButton('归还钥匙', () async {
BaseModel baseModel = await NetUtil()
.get(API.manage.returnKey, params: {"keyId": widget.model.id});
BotToast.showText(text: baseModel.message!);
BotToast.showText(text: baseModel.msg);
widget.callRefresh!();
}, Color(0xFFFFC40C), Colors.black) as MaterialButton?;
break;

@ -1,15 +1,13 @@
// Flutter imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/manager/key_manage/key_manage_all_key_model.dart';
// Project imports:
import 'package:aku_new_community_manager/ui/manage_pages/key_manage/key_manage_card.dart';
import 'package:aku_new_community_manager/ui/widgets/common/bee_list_view.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
// Package imports:
import 'package:flutter_screenutil/flutter_screenutil.dart';
// Project imports:
import 'package:aku_new_community_manager/ui/manage_pages/key_manage/key_manage_card.dart';
import 'package:velocity_x/velocity_x.dart';
class KeyManageView extends StatefulWidget {
@ -43,13 +41,13 @@ class _KeyManageViewState extends State<KeyManageView> {
: API.manage.getNOReturnList,
controller: _refreshController,
convert: (models) {
return models.tableList!
return models.rows
.map((e) => KeyMangeAllKeyModel.fromJson(e))
.toList();
},
builder: (items) {
return ListView.separated(
padding: EdgeInsets.all(24.w),
padding: EdgeInsets.all(24.w),
itemBuilder: (context, index) {
return KeyManageCard(
index: widget.index,

@ -1,22 +1,20 @@
// Flutter imports:
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
// Package imports:
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:velocity_x/velocity_x.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/tools/extensions/list_extension_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/ui/widgets/inner/aku_bottom_button.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:aku_new_community_manager/tools/extensions/list_extension_tool.dart';
// Package imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:velocity_x/src/extensions/num_ext.dart';
import 'package:velocity_x/src/extensions/string_ext.dart';
class AddPackagePage extends StatefulWidget {
AddPackagePage({Key? key}) : super(key: key);
@ -139,11 +137,11 @@ class _AddPackagePageState extends State<AddPackagePage> {
},
);
if (!baseModel.status!) {
BotToast.showText(text: baseModel.message!);
if (!baseModel.success!) {
BotToast.showText(text: baseModel.msg);
return;
}
BotToast.showText(text: baseModel.message!);
BotToast.showText(text: baseModel.msg);
Get.back();
}

@ -1,29 +1,27 @@
// Dart imports:
// Flutter imports:
import 'package:flutter/material.dart';
// Package imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/const/resource.dart';
import 'package:aku_new_community_manager/models/manager/package_manage/package_manage_list_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/tools/aku_divider.dart';
import 'package:aku_new_community_manager/tools/extensions/list_extension_tool.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
// Package imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
// Flutter imports:
import 'package:flutter/material.dart';
import 'package:velocity_x/src/extensions/num_ext.dart';
import 'package:velocity_x/src/extensions/string_ext.dart';
class PackageManageCard extends StatefulWidget {
final int index;
final PackageManageListModel model;
final VoidCallback? callRefresh;
PackageManageCard({Key? key, required this.index, required this.model, this.callRefresh})
PackageManageCard(
{Key? key, required this.index, required this.model, this.callRefresh})
: super(key: key);
@override
@ -130,8 +128,8 @@ class _PackageManageCardState extends State<PackageManageCard> {
Future _remindPackage(int packageCollectionId) async {
BaseModel baseModel = await NetUtil().get(API.manage.packageManageRemind,
params: {"packageCollectionId": packageCollectionId});
if (!baseModel.status!) {
BotToast.showText(text: baseModel.message!);
if (!baseModel.success!) {
BotToast.showText(text: baseModel.msg);
} else {
BotToast.showText(text: '已成功提醒领取');
}

@ -1,16 +1,14 @@
// Flutter imports:
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/manager/package_manage/package_manage_list_model.dart';
import 'package:aku_new_community_manager/ui/manage_pages/packages_manage/packages_manage_card.dart';
import 'package:aku_new_community_manager/ui/widgets/common/bee_list_view.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class PackagesManageView extends StatefulWidget {
final int index;
@ -45,9 +43,8 @@ class _PackagesManageViewState extends State<PackagesManageView> {
controller: _refreshController,
extraParams: {"collectionStatus": widget.index + 1},
convert: (models) {
List<PackageManageListModel> modelList = models.tableList!
.map((e) => PackageManageListModel.fromJson(e))
.toList();
List<PackageManageListModel> modelList =
models.rows.map((e) => PackageManageListModel.fromJson(e)).toList();
print(modelList);
return modelList;
},

@ -44,7 +44,7 @@ class _RulesManagePageState extends State<RulesManagePage> {
path: API.manage.rulesManageList,
controller: _refreshController,
convert: (models) {
return models.tableList!
return models.rows
.map((e) => RulesManageListModel.fromJson(e))
.toList();
},

@ -12,7 +12,7 @@ import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/provider/user_provider.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
class NickNameChangePage extends StatefulWidget {
@ -71,11 +71,11 @@ class _NickNameChangePageState extends State<NickNameChangePage> {
API.user.updateNickName,
params: {'nickName': _textEditingController!.text});
if (baseModel.status == true) {
if (baseModel.success == true) {
userProvider.setNickName(_textEditingController!.text);
Get.back();
} else {
BotToast.showText(text: baseModel.message!);
BotToast.showText(text: baseModel.msg);
}
},
child: '保存'.text.black.size(32.sp).make(),

@ -1,22 +1,20 @@
// Dart imports:
import 'dart:io';
// Flutter imports:
import 'package:aku_new_community_manager/ui/widgets/common/aku_material_button.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:get/get.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/tools/screen_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/app_widgets/aku_pick_image_widget.dart';
// Flutter imports:
import 'package:aku_new_community_manager/ui/widgets/common/aku_material_button.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
// Package imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
class SettingFeedBackPage extends StatefulWidget {
SettingFeedBackPage({Key? key}) : super(key: key);
@ -90,11 +88,11 @@ class _SettingFeedBackPageState extends State<SettingFeedBackPage> {
"content": _content,
"fileUrls": _imgeUrls,
});
if (baseModel.status!) {
BotToast.showText(text: baseModel.message!);
if (baseModel.success!) {
BotToast.showText(text: baseModel.msg);
Get.back();
} else {
BotToast.showText(text: baseModel.message!);
BotToast.showText(text: baseModel.msg);
}
},
child: Text('提交'),

@ -17,7 +17,7 @@ import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community_manager/provider/user_provider.dart';
import 'package:aku_new_community_manager/ui/settings/update_userinfo_func.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
class TelChangePage extends StatefulWidget {
TelChangePage({Key? key}) : super(key: key);
@ -112,7 +112,7 @@ class _TelChangePageState extends State<TelChangePage> {
BaseModel baseModel =
await UpdateUserInfoFunc.sendTelUpdateCode(
_newTelController!.text);
if (baseModel.status!) {
if (baseModel.success!) {
startTick();
} else {}
}
@ -187,11 +187,11 @@ class _TelChangePageState extends State<TelChangePage> {
_oldTelController!.text,
_newTelController!.text,
_codeController!.text);
if (baseModel.status!) {
if (baseModel.success!) {
userProvider.setTel(_newTelController!.text);
Get.back();
} else {
BotToast.showText(text: baseModel.message!);
BotToast.showText(text: baseModel.msg);
}
}
},

@ -1,6 +1,6 @@
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
class UpdateUserInfoFunc {

@ -12,7 +12,7 @@ import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/tools/screen_tool.dart';
import 'package:aku_new_community_manager/tools/widget_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/utils/network/base_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
class ActivityDetailPage extends StatefulWidget {

@ -1,16 +1,14 @@
// Flutter imports:
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_easyrefresh/easy_refresh.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/manager/activity_item_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_list_model.dart';
import 'package:aku_new_community_manager/ui/sub_pages/activity_manager/activity_manager_card.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/ui/widgets/common/bee_list_view.dart';
import 'package:aku_new_community_manager/utils/network/base_list_model.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_easyrefresh/easy_refresh.dart';
class ActivityManagerPage extends StatefulWidget {
ActivityManagerPage({Key? key}) : super(key: key);
@ -36,9 +34,7 @@ class _ActivityManagerPageState extends State<ActivityManagerPage> {
},
controller: _refreshController,
convert: (BaseListModel model) {
return model.tableList!
.map((e) => ActivityItemModel.fromJson(e))
.toList();
return model.rows.map((e) => ActivityItemModel.fromJson(e)).toList();
},
path: API.manage.acitivityList,
),

@ -1,27 +1,25 @@
// Dart imports:
import 'dart:io';
// Flutter imports:
import 'package:aku_new_community_manager/ui/widgets/common/aku_material_button.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
// Package imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:get/get.dart';
import 'package:get/instance_manager.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
// Flutter imports:
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/tools/widget_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_material_button.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/ui/widgets/inner/pick_image.dart';
import 'package:aku_new_community_manager/utils/network/base_file_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
// Package imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:get/instance_manager.dart';
class AddBorrowItemPage extends StatefulWidget {
final int/*!*/ articleId;
final int /*!*/ articleId;
AddBorrowItemPage({
Key? key,
required this.articleId,
@ -57,23 +55,23 @@ class _AddBorrowItemPageState extends State<AddBorrowItemPage> {
AkuMaterialButton(
minWidth: 120.w,
onPressed: () async {
BaseFileModel baseFileModel =
BaseModel baseFileModel =
await NetUtil().upload(API.upload.uploadArticleDetail, file!);
if (baseFileModel.status!) {
if (baseFileModel.success) {
await NetUtil().post(
API.manage.borrowinsertArticleDetail,
params: {
"articleId": widget.articleId,
"name": _textEditingController!.text,
"code": _codeEditingCOntroller!.text,
"fileUrls": [baseFileModel.url]
"fileUrls": [baseFileModel.data]
},
showMessage: true,
);
Get.back();
} else {
BotToast.showText(text: baseFileModel.message!);
BotToast.showText(text: baseFileModel.msg);
}
},
child: Text(

@ -1,23 +1,21 @@
// Dart imports:
import 'dart:io';
// Flutter imports:
import 'package:flutter/material.dart';
// Package imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:get/get.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/tools/widget_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/ui/widgets/inner/aku_bottom_button.dart';
import 'package:aku_new_community_manager/ui/widgets/inner/pick_image.dart';
import 'package:aku_new_community_manager/utils/network/base_file_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
// Package imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
// Flutter imports:
import 'package:flutter/material.dart';
import 'package:get/get.dart';
class AddBorrowObjectPage extends StatefulWidget {
AddBorrowObjectPage({Key? key}) : super(key: key);
@ -142,19 +140,19 @@ class _AddBorrowObjectPageState extends State<AddBorrowObjectPage> {
// int.tryParse(_numberController.text) == null
? null
: () async {
BaseFileModel baseFileModel = await NetUtil()
BaseModel baseFileModel = await NetUtil()
.upload(API.upload.uploadArtical, file!);
if (baseFileModel.status!) {
if (baseFileModel.success) {
await NetUtil().post(
API.manage.insertArticle,
params: {
"name": _textEditingController.text,
"fileUrls": [baseFileModel.url]
"fileUrls": [baseFileModel.data]
},
showMessage: true,
);
} else {
BotToast.showText(text: baseFileModel.message!);
BotToast.showText(text: baseFileModel.msg);
}
Get.back();
},

@ -1,12 +1,4 @@
// Flutter imports:
import 'package:aku_new_community_manager/ui/widgets/common/aku_material_button.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
// Project imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/const/resource.dart';
@ -16,8 +8,14 @@ import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/tools/widget_tool.dart';
import 'package:aku_new_community_manager/ui/sub_pages/borrow_manager/add_borrow_object_page.dart';
import 'package:aku_new_community_manager/ui/sub_pages/borrow_manager/borrow_items_page.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_material_button.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/ui/widgets/common/bee_list_view.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
class AllBorrowGoods extends StatefulWidget {
AllBorrowGoods({Key? key}) : super(key: key);
@ -54,7 +52,7 @@ class _AllBorrowGoodsState extends State<AllBorrowGoods> {
path: API.manage.borrowList,
controller: _refreshController,
convert: (model) =>
model.tableList!.map((e) => BorrowItemModel.fromJson(e)).toList(),
model.rows.map((e) => BorrowItemModel.fromJson(e)).toList(),
builder: (items) {
return ListView.builder(
padding: EdgeInsets.symmetric(

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save