1,解决胁迫指纹—指纹列表不能搜索问题
2,修复群发钥匙-接收者 点通讯录无反应问题
This commit is contained in:
parent
204cd370d8
commit
5f676340dd
@ -154,23 +154,26 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
||||
rightTitle: state.receiverList.isEmpty
|
||||
? TranslationLoader.lanKeys!.pleaseAdd!.tr
|
||||
: state.receiverList.length.toString(),
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.massSendReceiverPage)
|
||||
.then((value) {
|
||||
if (value != null) {
|
||||
value as Map<String, dynamic>;
|
||||
state.receiverList = value['lockUserList'];
|
||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
||||
rightTitle: state.receiverList.isEmpty
|
||||
? TranslationLoader.lanKeys!.pleaseAdd!.tr
|
||||
: state.receiverList.length.toString(),
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.massSendReceiverPage,
|
||||
arguments: {
|
||||
'lockUserList': state.receiverList,
|
||||
}).then((value) {
|
||||
if (value != null) {
|
||||
value as Map<String, dynamic>;
|
||||
state.receiverList = value['lockUserList'];
|
||||
|
||||
setState(() {});
|
||||
}
|
||||
});
|
||||
}),
|
||||
setState(() {});
|
||||
}
|
||||
});
|
||||
},
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
||||
rightTitle: "",
|
||||
|
||||
@ -1,25 +1,52 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get_utils/get_utils.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_entity.dart';
|
||||
import 'package:star_lock/translations/trans_lib.dart';
|
||||
|
||||
import '../../../../../../app_settings/app_colors.dart';
|
||||
|
||||
class MassSendReceiverCell extends StatelessWidget {
|
||||
class MassSendReceiverCell extends StatefulWidget {
|
||||
const MassSendReceiverCell({
|
||||
required this.currentIndex,
|
||||
required this.userData,
|
||||
required this.onDeleteUser,
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
final int currentIndex;
|
||||
LockUserItemData userData;
|
||||
final VoidCallback clickDeleteUser;
|
||||
final FlutterContactPicker contactPicker = FlutterContactPicker();
|
||||
late Contact contact;
|
||||
final LockUserItemData userData;
|
||||
final VoidCallback onDeleteUser;
|
||||
|
||||
MassSendReceiverCell(int index,
|
||||
{Key? key,
|
||||
required this.currentIndex,
|
||||
required this.userData,
|
||||
required this.clickDeleteUser})
|
||||
: super(key: key);
|
||||
@override
|
||||
_MassSendReceiverCellState createState() => _MassSendReceiverCellState();
|
||||
}
|
||||
|
||||
class _MassSendReceiverCellState extends State<MassSendReceiverCell> {
|
||||
final FlutterContactPicker contactPicker = FlutterContactPicker();
|
||||
late TextEditingController _receiverController;
|
||||
late TextEditingController _nickNameController;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_receiverController =
|
||||
TextEditingController(text: widget.userData.userid ?? '');
|
||||
_nickNameController =
|
||||
TextEditingController(text: widget.userData.nickname ?? '');
|
||||
_receiverController.addListener(() {
|
||||
widget.userData.userid = _receiverController.text;
|
||||
});
|
||||
_nickNameController.addListener(() {
|
||||
widget.userData.nickname = _nickNameController.text;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_receiverController.dispose();
|
||||
_nickNameController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -28,184 +55,129 @@ class MassSendReceiverCell extends StatelessWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
GestureDetector(
|
||||
child: SizedBox(
|
||||
// width: 40.w,
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 20.w,
|
||||
),
|
||||
Image.asset(
|
||||
'images/icon_massSend_delete.png',
|
||||
width: 26.w,
|
||||
height: 26.w,
|
||||
)
|
||||
],
|
||||
onTap: widget.onDeleteUser,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 20.w),
|
||||
child: Image.asset(
|
||||
'images/icon_massSend_delete.png',
|
||||
width: 26.w,
|
||||
height: 26.w,
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
clickDeleteUser();
|
||||
// _lockUserList.removeAt(index - 1);
|
||||
// setState(() {});
|
||||
},
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
children: [
|
||||
massSendReceiverCellWidget(
|
||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
||||
rightTitle: userData.userid ?? ' ',
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
true,
|
||||
child: Column(
|
||||
children: [
|
||||
_buildCellWidget(
|
||||
leftTitle: TranslationLoader.lanKeys!.receiver!.tr,
|
||||
isInputField: true,
|
||||
inputHint:
|
||||
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||
1,
|
||||
userData)),
|
||||
Divider(
|
||||
color: AppColors.greyLineColor,
|
||||
indent: 20.w,
|
||||
endIndent: 20.w,
|
||||
height: 1,
|
||||
),
|
||||
massSendReceiverCellWidget(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
rightTitle: userData.nickname ?? ' ',
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
false,
|
||||
TranslationLoader.lanKeys!.enterYourName!.tr,
|
||||
2,
|
||||
userData)),
|
||||
],
|
||||
))
|
||||
controller: _receiverController,
|
||||
isContactPickerEnabled: true,
|
||||
),
|
||||
Divider(
|
||||
color: AppColors.greyLineColor,
|
||||
indent: 20.w,
|
||||
endIndent: 20.w,
|
||||
height: 1,
|
||||
),
|
||||
_buildCellWidget(
|
||||
leftTitle: TranslationLoader.lanKeys!.name!.tr,
|
||||
isInputField: true,
|
||||
inputHint: TranslationLoader.lanKeys!.enterYourName!.tr,
|
||||
controller: _nickNameController,
|
||||
isContactPickerEnabled: false,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TextEditingController _receiverController(String getStr) {
|
||||
TextEditingController controller = TextEditingController(text: getStr);
|
||||
controller.addListener(() {
|
||||
userData.userid = controller.text;
|
||||
});
|
||||
|
||||
return controller;
|
||||
}
|
||||
|
||||
TextEditingController _nickNameController(String getStr) {
|
||||
TextEditingController controller = TextEditingController(text: getStr);
|
||||
controller.addListener(() {
|
||||
userData.nickname = controller.text;
|
||||
});
|
||||
|
||||
return controller;
|
||||
}
|
||||
|
||||
Widget massSendReceiverCellWidget({
|
||||
String? leftTitel,
|
||||
String? rightTitle,
|
||||
bool? isHaveDirection,
|
||||
bool? isHaveLine,
|
||||
bool? isHaveRightWidget,
|
||||
Widget? rightWidget,
|
||||
Function()? action,
|
||||
double? allHeight,
|
||||
Widget _buildCellWidget({
|
||||
required String leftTitle,
|
||||
required bool isInputField,
|
||||
required String inputHint,
|
||||
required TextEditingController controller,
|
||||
required bool isContactPickerEnabled,
|
||||
}) {
|
||||
return Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
height: 60.h,
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(right: 20.w), // , top: 20.w, bottom: 20.w
|
||||
child: Row(
|
||||
return Container(
|
||||
height: 60.h,
|
||||
padding: EdgeInsets.only(right: 20.w),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: 20.w),
|
||||
Text(leftTitle, style: TextStyle(fontSize: 22.sp)),
|
||||
Expanded(child: SizedBox(width: 10.w)),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
SizedBox(width: 20.w),
|
||||
Text(leftTitel!, style: TextStyle(fontSize: 22.sp)),
|
||||
Expanded(child: SizedBox(width: 10.w)),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
isHaveRightWidget!
|
||||
? rightWidget!
|
||||
: Text(
|
||||
rightTitle ?? "",
|
||||
textAlign: TextAlign.end,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// maxLines: 1,
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp,
|
||||
color: AppColors.darkGrayTextColor),
|
||||
)
|
||||
],
|
||||
)
|
||||
if (isInputField)
|
||||
_buildTextField(controller, inputHint, isContactPickerEnabled)
|
||||
else
|
||||
Text(
|
||||
controller.text,
|
||||
textAlign: TextAlign.end,
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// 接受者信息输入框
|
||||
Widget getTFWidget(
|
||||
bool isHaveBtn, String tfStr, int lineIndex, LockUserItemData userData) {
|
||||
Widget _buildTextField(TextEditingController controller, String hintText,
|
||||
bool isContactPickerEnabled) {
|
||||
return SizedBox(
|
||||
height: 50.h,
|
||||
width: 380.w,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: lineIndex == 1
|
||||
? _receiverController(userData.userid ?? '')
|
||||
: _nickNameController(userData.nickname ?? ''),
|
||||
//输入框一行
|
||||
controller: controller,
|
||||
maxLines: 1,
|
||||
autofocus: false,
|
||||
textAlign: TextAlign.end,
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(top: -12.0, bottom: 0.0),
|
||||
hintText: tfStr,
|
||||
hintText: hintText,
|
||||
hintStyle: TextStyle(fontSize: 22.sp),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
isHaveBtn
|
||||
? Container(
|
||||
if (isContactPickerEnabled)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 10.w),
|
||||
child: InkWell(
|
||||
onTap: _pickContact,
|
||||
child: Image.asset(
|
||||
'images/icon_addressBook.png',
|
||||
width: 32.w,
|
||||
height: 32.w,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
image: DecorationImage(
|
||||
image: AssetImage('images/icon_addressBook.png'),
|
||||
fit: BoxFit.fill),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
// Contact? currentContact =
|
||||
// await contactPicker.selectContact();
|
||||
// setState(() {
|
||||
// state.contact = currentContact!;
|
||||
// if (currentContact.phoneNumbers!.isNotEmpty) {
|
||||
// state.emailOrPhoneController.text = currentContact
|
||||
// .phoneNumbers![0]
|
||||
// .replaceAll(RegExp(r"\s+\b|\b\s"), "");
|
||||
// }
|
||||
// });
|
||||
},
|
||||
),
|
||||
)
|
||||
: Container()
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _pickContact() async {
|
||||
final Contact? selectedContact = await contactPicker.selectContact();
|
||||
if (selectedContact != null) {
|
||||
setState(() {
|
||||
if (selectedContact.phoneNumbers?.isNotEmpty ?? false) {
|
||||
_receiverController.text = selectedContact.phoneNumbers!.first;
|
||||
}
|
||||
if (selectedContact.fullName?.isNotEmpty ?? false) {
|
||||
_nickNameController.text = selectedContact.fullName!;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -177,11 +177,10 @@ class _MassSendReceiverPageState extends State<MassSendReceiverPage> {
|
||||
|
||||
Widget _itemBuilder(int index, LockUserItemData userData) {
|
||||
return MassSendReceiverCell(
|
||||
index,
|
||||
currentIndex: index,
|
||||
userData: userData,
|
||||
clickDeleteUser: () {
|
||||
state.lockUserList.value.removeAt(index - 1);
|
||||
onDeleteUser: () {
|
||||
state.lockUserList.removeAt(index - 1);
|
||||
setState(() {});
|
||||
},
|
||||
);
|
||||
|
||||
@ -3,6 +3,13 @@ import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_entity.dart';
|
||||
|
||||
class MassSendReceiverState {
|
||||
// MassSendReceiverState() {
|
||||
// final Map map = Get.arguments;
|
||||
// if (map['lockUserList'] != null) {
|
||||
// lockUserList = map['lockUserList'] ?? [];
|
||||
// }
|
||||
// }
|
||||
|
||||
var isVip = false.obs;
|
||||
var lockUserList = <LockUserItemData>[].obs;
|
||||
TextEditingController emailOrPhoneController = TextEditingController();
|
||||
|
||||
@ -106,7 +106,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
// Container(height: 10.h),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
@ -116,7 +116,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
logic)),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
isHaveDirection: true,
|
||||
@ -139,7 +139,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
false, TranslationLoader.lanKeys!.enterYourName!.tr, 2, logic)),
|
||||
@ -192,13 +192,13 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
children: [
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.realNameAuthentication!.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isTipsImg: true,
|
||||
isHaveLine:
|
||||
logic.state.isRequireAuth.value == true ? true : false,
|
||||
tipsImgAction: () {
|
||||
ShowTipView().showSureAlertDialog(
|
||||
"人脸实名认证指的是用户在使用手机APP开锁时,需要先进行本人人脸验证,验证通过才能开锁。".tr);
|
||||
'人脸实名认证指的是用户在使用手机APP开锁时,需要先进行本人人脸验证,验证通过才能开锁。'.tr);
|
||||
},
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: SizedBox(
|
||||
@ -210,7 +210,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
visible: logic.state.isRequireAuth.value,
|
||||
child: CommonItem(
|
||||
leftTitel: '真实姓名'.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
isHaveLine: true,
|
||||
rightWidget: getTFWidget(false, '请输入真实姓名'.tr, 3, logic)))),
|
||||
@ -218,7 +218,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
visible: logic.state.isRequireAuth.value,
|
||||
child: CommonItem(
|
||||
leftTitel: '身份证号'.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(false, '请输入身份证号'.tr, 4, logic)))),
|
||||
],
|
||||
@ -232,7 +232,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
rightTitle:
|
||||
"${logic.state.cycleBeginTime}\n${logic.state.cycleEndTime}",
|
||||
'${logic.state.cycleBeginTime}\n${logic.state.cycleEndTime}',
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () async {
|
||||
@ -256,8 +256,8 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
Visibility(
|
||||
visible: logic.state.weekdaysList.isNotEmpty ? true : false,
|
||||
child: CommonItem(
|
||||
leftTitel: "有效日".tr,
|
||||
rightTitle: logic.state.weekdaysList.join(",").toString(),
|
||||
leftTitel: '有效日'.tr,
|
||||
rightTitle: logic.state.weekdaysList.join(',').toString(),
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () async {
|
||||
@ -281,9 +281,9 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
Visibility(
|
||||
visible: logic.state.effectiveDateTime.isNotEmpty,
|
||||
child: CommonItem(
|
||||
leftTitel: "有效时间".tr,
|
||||
leftTitel: '有效时间'.tr,
|
||||
rightTitle:
|
||||
"${logic.state.effectiveDateTime}-${logic.state.failureDateTime}",
|
||||
'${logic.state.effectiveDateTime}-${logic.state.failureDateTime}',
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () async {
|
||||
@ -334,7 +334,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
setState(() {});
|
||||
} else {
|
||||
//演示模式不获取接口
|
||||
logic.showToast("演示模式".tr);
|
||||
logic.showToast('演示模式'.tr);
|
||||
}
|
||||
}),
|
||||
Container(
|
||||
@ -349,7 +349,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
Navigator.pushNamed(
|
||||
context, Routers.massSendElectronicKeyManagePage);
|
||||
} else {
|
||||
logic.showToast("演示模式".tr);
|
||||
logic.showToast('演示模式'.tr);
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
@ -389,7 +389,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"发送成功".tr,
|
||||
'发送成功'.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 26.sp,
|
||||
color: Colors.black,
|
||||
@ -433,7 +433,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
roomStatus: 1,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
logic.showToast("标记成功".tr);
|
||||
logic.showToast('标记成功'.tr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -482,35 +482,36 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
isHaveBtn
|
||||
? Container(
|
||||
width: 32.w,
|
||||
height: 32.w,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
image: DecorationImage(
|
||||
image: AssetImage('images/icon_addressBook.png'),
|
||||
fit: BoxFit.fill),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
Contact? currentContact =
|
||||
await logic.state.contactPicker.selectContact();
|
||||
logic.state.contact = currentContact!;
|
||||
if (currentContact.phoneNumbers!.isNotEmpty) {
|
||||
logic.state.emailOrPhoneController.text = currentContact
|
||||
.phoneNumbers![0]
|
||||
.replaceAll(RegExp(r"\s+\b|\b\s"), "");
|
||||
}
|
||||
if (currentContact.fullName!.isNotEmpty) {
|
||||
logic.state.keyNameController.text =
|
||||
currentContact.fullName!;
|
||||
}
|
||||
},
|
||||
),
|
||||
)
|
||||
: Container()
|
||||
if (isHaveBtn)
|
||||
Container(
|
||||
width: 32.w,
|
||||
height: 32.w,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
image: DecorationImage(
|
||||
image: AssetImage('images/icon_addressBook.png'),
|
||||
fit: BoxFit.fill),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
final Contact? currentContact =
|
||||
await logic.state.contactPicker.selectContact();
|
||||
logic.state.contact = currentContact!;
|
||||
if (currentContact.phoneNumbers!.isNotEmpty) {
|
||||
logic.state.emailOrPhoneController.text = currentContact
|
||||
.phoneNumbers![0]
|
||||
.replaceAll(RegExp(r'\s+\b|\b\s'), '');
|
||||
}
|
||||
if (currentContact.fullName!.isNotEmpty) {
|
||||
logic.state.keyNameController.text =
|
||||
currentContact.fullName!;
|
||||
}
|
||||
},
|
||||
),
|
||||
)
|
||||
else
|
||||
Container()
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -528,7 +529,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
children: [
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: SizedBox(
|
||||
width: 60.w, height: 50.h, child: _remoteSwitch(true, logic)),
|
||||
|
||||
@ -1299,7 +1299,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
}
|
||||
|
||||
//如果需要实名认证,需认证完成,方可开锁
|
||||
isNeedRealNameAuthThenOpenLock() {
|
||||
void isNeedRealNameAuthThenOpenLock() {
|
||||
state.nextAuthTime.value = state.keyInfos.value.nextFaceValidateTime ?? 0;
|
||||
if (state.keyInfos.value.faceAuthentication == 1 &&
|
||||
state.nextAuthTime.value > 0 &&
|
||||
|
||||
@ -15,6 +15,7 @@ class CoerceFingerprintListLogic extends BaseGetXController {
|
||||
lockId: state.getLockId.value,
|
||||
pageNo: state.pageNum.value,
|
||||
pageSize: state.pageSize.value,
|
||||
searchStr: state.searchController.text,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
state.fingerprintList.value = entity.data!.list!;
|
||||
|
||||
@ -1984,11 +1984,15 @@ class ApiProvider extends BaseProvider {
|
||||
|
||||
// 获取胁迫指纹列表
|
||||
Future<Response> getCoercedFingerprintList(
|
||||
int lockId, int pageNo, int pageSize) =>
|
||||
int lockId, int pageNo, int pageSize, String searchStr) =>
|
||||
post(
|
||||
getCoercedFingerprintListURL.toUrl,
|
||||
jsonEncode(
|
||||
{'lockId': lockId, 'pageNo': pageNo, 'pageSize': pageSize}));
|
||||
jsonEncode({
|
||||
'lockId': lockId,
|
||||
'pageNo': pageNo,
|
||||
'pageSize': pageSize,
|
||||
'searchStr': searchStr
|
||||
}));
|
||||
|
||||
// 获取云存列表
|
||||
Future<Response> getLockCloudStorageList(int lockId) =>
|
||||
|
||||
@ -2014,9 +2014,12 @@ class ApiRepository {
|
||||
|
||||
// 获取胁迫指纹列表
|
||||
Future<CoerceFingerprintListEntity> getCoercedFingerprintList(
|
||||
{required int lockId, required int pageNo, required int pageSize}) async {
|
||||
final res =
|
||||
await apiProvider.getCoercedFingerprintList(lockId, pageNo, pageSize);
|
||||
{required int lockId,
|
||||
required int pageNo,
|
||||
required int pageSize,
|
||||
required String searchStr}) async {
|
||||
final res = await apiProvider.getCoercedFingerprintList(
|
||||
lockId, pageNo, pageSize, searchStr);
|
||||
return CoerceFingerprintListEntity.fromJson(res.body);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user