1,新增检测是否支持开启实名认证接口对接
2,发送电子钥匙根据数据新增键入真实姓名和身份证号 3,编辑锁分组页面新增高级功能相应权限及开通处理
This commit is contained in:
parent
bff61936e1
commit
69c6c3e1dd
@ -795,5 +795,9 @@
|
|||||||
"当前剩余数量":"Current surplus quantity",
|
"当前剩余数量":"Current surplus quantity",
|
||||||
"购买":"Buy",
|
"购买":"Buy",
|
||||||
"实名认证为付费功能,请购买后再使用":"Real-name authentication is a paid function, please use it after purchase",
|
"实名认证为付费功能,请购买后再使用":"Real-name authentication is a paid function, please use it after purchase",
|
||||||
"密码不一致哦":"The passwords are inconsistent"
|
"密码不一致哦":"The passwords are inconsistent",
|
||||||
|
"真实姓名":"Real name",
|
||||||
|
"身份证号":"ID number",
|
||||||
|
"请输入真实姓名":"Please enter your real name",
|
||||||
|
"请输入身份证号":"Please enter your ID number"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -822,5 +822,9 @@
|
|||||||
"实名认证":"实名认证",
|
"实名认证":"实名认证",
|
||||||
"当前剩余数量":"当前剩余数量",
|
"当前剩余数量":"当前剩余数量",
|
||||||
"购买":"购买",
|
"购买":"购买",
|
||||||
"实名认证为付费功能,请购买后再使用":"实名认证为付费功能,请购买后再使用"
|
"实名认证为付费功能,请购买后再使用":"实名认证为付费功能,请购买后再使用",
|
||||||
|
"真实姓名":"真实姓名",
|
||||||
|
"身份证号":"身份证号",
|
||||||
|
"请输入真实姓名":"请输入真实姓名",
|
||||||
|
"请输入身份证号":"请输入身份证号"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -825,5 +825,9 @@
|
|||||||
"实名认证":"实名认证",
|
"实名认证":"实名认证",
|
||||||
"当前剩余数量":"当前剩余数量",
|
"当前剩余数量":"当前剩余数量",
|
||||||
"购买":"购买",
|
"购买":"购买",
|
||||||
"实名认证为付费功能,请购买后再使用":"实名认证为付费功能,请购买后再使用"
|
"实名认证为付费功能,请购买后再使用":"实名认证为付费功能,请购买后再使用",
|
||||||
|
"真实姓名":"真实姓名",
|
||||||
|
"身份证号":"身份证号",
|
||||||
|
"请输入真实姓名":"请输入真实姓名",
|
||||||
|
"请输入身份证号":"请输入身份证号"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/app_settings/app_settings.dart';
|
import 'package:star_lock/app_settings/app_settings.dart';
|
||||||
import 'package:star_lock/blue/io_type.dart';
|
|
||||||
import 'package:star_lock/tools/dateTool.dart';
|
import 'package:star_lock/tools/dateTool.dart';
|
||||||
|
|
||||||
import '../../../../blue/blue_manage.dart';
|
import '../../../../blue/blue_manage.dart';
|
||||||
@ -117,7 +115,8 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
|||||||
if (state.seletType.value == 0) {
|
if (state.seletType.value == 0) {
|
||||||
getKeyType = "2";
|
getKeyType = "2";
|
||||||
|
|
||||||
startDate = DateTool().dateToTimestamp(state.beginDate.value, 1).toString();
|
startDate =
|
||||||
|
DateTool().dateToTimestamp(state.beginDate.value, 1).toString();
|
||||||
endDate = DateTool().dateToTimestamp(state.endDate.value, 1).toString();
|
endDate = DateTool().dateToTimestamp(state.endDate.value, 1).toString();
|
||||||
startTime = "0";
|
startTime = "0";
|
||||||
endTime = "0";
|
endTime = "0";
|
||||||
@ -156,7 +155,9 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
|||||||
weekDays: state.weekdaysList,
|
weekDays: state.weekdaysList,
|
||||||
startTime: int.parse(startTime),
|
startTime: int.parse(startTime),
|
||||||
endTime: int.parse(endTime),
|
endTime: int.parse(endTime),
|
||||||
isOnlyManageSelf: state.onlyManageYouCreatesUser.value ? 1 : 0);
|
isOnlyManageSelf: state.onlyManageYouCreatesUser.value ? 1 : 0,
|
||||||
|
realName: '',
|
||||||
|
idCardNumber: '');
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
state.isCreateUser.value = false;
|
state.isCreateUser.value = false;
|
||||||
state.isSendSuccess.value = true;
|
state.isSendSuccess.value = true;
|
||||||
@ -169,7 +170,9 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
|||||||
//用户未注册
|
//用户未注册
|
||||||
state.isCreateUser.value = true;
|
state.isCreateUser.value = true;
|
||||||
// _showDialog('${entity.errorMsg}');
|
// _showDialog('${entity.errorMsg}');
|
||||||
ShowTipView().showIosTipWithContentDialog('${"是否发送授权管理员给未注册账号".tr}\n${state.emailOrPhoneController.text}', (){
|
ShowTipView().showIosTipWithContentDialog(
|
||||||
|
'${"是否发送授权管理员给未注册账号".tr}\n${state.emailOrPhoneController.text}',
|
||||||
|
() {
|
||||||
sendElectronicKeyRequest();
|
sendElectronicKeyRequest();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,14 +1,5 @@
|
|||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_state.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_state.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/view/sendElectronicKeyView_state.dart';
|
|
||||||
import 'package:star_lock/network/api_repository.dart';
|
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
import 'package:star_lock/tools/commonDataManage.dart';
|
|
||||||
import 'package:star_lock/tools/dateTool.dart';
|
|
||||||
import 'package:star_lock/tools/eventBusEventManage.dart';
|
|
||||||
|
|
||||||
import '../../../../../tools/showTipView.dart';
|
|
||||||
|
|
||||||
class SendElectronicKeyLogic extends BaseGetXController {
|
class SendElectronicKeyLogic extends BaseGetXController {
|
||||||
final SendElectronicKeyState state = SendElectronicKeyState();
|
final SendElectronicKeyState state = SendElectronicKeyState();
|
||||||
|
|||||||
@ -1,28 +1,11 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/app_settings/app_colors.dart';
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_logic.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_logic.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/view/sendElectronicKeyView_page.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/view/sendElectronicKeyView_page.dart';
|
||||||
import 'package:star_lock/network/api_repository.dart';
|
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
|
||||||
import 'package:star_lock/tools/pickers/pickers.dart';
|
|
||||||
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
|
||||||
import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart';
|
|
||||||
import 'package:star_lock/tools/showTipView.dart';
|
|
||||||
import 'package:star_lock/tools/storage.dart';
|
|
||||||
|
|
||||||
import '../../../../../appRouters.dart';
|
|
||||||
import '../../../../../tools/CustomUnderlineTabIndicator.dart';
|
import '../../../../../tools/CustomUnderlineTabIndicator.dart';
|
||||||
import '../../../../../tools/NativeInteractionTool.dart';
|
|
||||||
import '../../../../../tools/commonDataManage.dart';
|
|
||||||
import '../../../../../tools/commonItem.dart';
|
|
||||||
import '../../../../../tools/dateTool.dart';
|
|
||||||
import '../../../../../tools/submitBtn.dart';
|
|
||||||
import '../../../../../tools/titleAppBar.dart';
|
import '../../../../../tools/titleAppBar.dart';
|
||||||
import '../../../../../translations/trans_lib.dart';
|
import '../../../../../translations/trans_lib.dart';
|
||||||
|
|
||||||
@ -107,8 +90,8 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage>
|
|||||||
controller: state.tabController,
|
controller: state.tabController,
|
||||||
children: _itemTabs
|
children: _itemTabs
|
||||||
.map((ItemView item) => SendElectronicKeyView(
|
.map((ItemView item) => SendElectronicKeyView(
|
||||||
type: item.type,
|
type: item.type,
|
||||||
))
|
))
|
||||||
.toList()),
|
.toList()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -119,7 +102,6 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage>
|
|||||||
ItemView(title: TranslationLoader.lanKeys!.once!.tr, type: "2"),
|
ItemView(title: TranslationLoader.lanKeys!.once!.tr, type: "2"),
|
||||||
ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: "3"),
|
ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: "3"),
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ItemView {
|
class ItemView {
|
||||||
|
|||||||
@ -1,27 +1,16 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||||
import 'package:get/get.dart';
|
|
||||||
|
|
||||||
import '../../../../../tools/dateTool.dart';
|
|
||||||
import '../../../../lockMian/entity/lockListInfo_entity.dart';
|
|
||||||
|
|
||||||
class SendElectronicKeyState {
|
class SendElectronicKeyState {
|
||||||
|
|
||||||
late TabController tabController;
|
late TabController tabController;
|
||||||
|
|
||||||
final FlutterContactPicker contactPicker = FlutterContactPicker();
|
final FlutterContactPicker contactPicker = FlutterContactPicker();
|
||||||
late Contact contact;
|
late Contact contact;
|
||||||
|
|
||||||
|
|
||||||
final timeLimitTips = '接收者在有效期内可以不限次数使用'; //限时
|
final timeLimitTips = '接收者在有效期内可以不限次数使用'; //限时
|
||||||
final permanentTips = '接收者可以使用此App开关锁'; //永久
|
final permanentTips = '接收者可以使用此App开关锁'; //永久
|
||||||
final onceLimitTips = '单次钥匙有效期为1小时,只能使用一次'; //单次
|
final onceLimitTips = '单次钥匙有效期为1小时,只能使用一次'; //单次
|
||||||
final cycleLimitTips = '接收者可以在有效期内的固定时间段里,不限次数使用'; //循环
|
final cycleLimitTips = '接收者可以在有效期内的固定时间段里,不限次数使用'; //循环
|
||||||
|
|
||||||
SendElectronicKeyState() {
|
SendElectronicKeyState() {}
|
||||||
// Map map = Get.arguments;
|
|
||||||
// if ((map["keyInfo"] != null)) {
|
|
||||||
// keyInfo.value = map["keyInfo"];
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/appRouters.dart';
|
||||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_state.dart';
|
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/view/sendElectronicKeyView_state.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/view/sendElectronicKeyView_state.dart';
|
||||||
|
import 'package:star_lock/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_entity.dart';
|
||||||
import 'package:star_lock/network/api_repository.dart';
|
import 'package:star_lock/network/api_repository.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
import 'package:star_lock/tools/commonDataManage.dart';
|
import 'package:star_lock/tools/commonDataManage.dart';
|
||||||
@ -50,12 +52,10 @@ class SendElectronicKeyViewLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
typeValue = XSConstantMacro.keyTypeTime;
|
typeValue = XSConstantMacro.keyTypeTime;
|
||||||
startDate = DateTool()
|
startDate =
|
||||||
.dateToTimestamp(state.timeLimitBeginTime, 1)
|
DateTool().dateToTimestamp(state.timeLimitBeginTime, 1).toString();
|
||||||
.toString();
|
endDate =
|
||||||
endDate = DateTool()
|
DateTool().dateToTimestamp(state.timeLimitEndTime, 1).toString();
|
||||||
.dateToTimestamp(state.timeLimitEndTime, 1)
|
|
||||||
.toString();
|
|
||||||
startTime = "0";
|
startTime = "0";
|
||||||
endTime = "0";
|
endTime = "0";
|
||||||
|
|
||||||
@ -77,17 +77,13 @@ class SendElectronicKeyViewLogic extends BaseGetXController {
|
|||||||
showToast("请选择有效期".tr);
|
showToast("请选择有效期".tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
startDate = DateTool()
|
startDate =
|
||||||
.dateToTimestamp(state.cycleBeginTime, 1)
|
DateTool().dateToTimestamp(state.cycleBeginTime, 1).toString();
|
||||||
.toString();
|
endDate = DateTool().dateToTimestamp(state.cycleEndTime, 1).toString();
|
||||||
endDate =
|
startTime =
|
||||||
DateTool().dateToTimestamp(state.cycleEndTime, 1).toString();
|
DateTool().dateToTimestamp(state.effectiveDateTime, 0).toString();
|
||||||
startTime = DateTool()
|
endTime =
|
||||||
.dateToTimestamp(state.effectiveDateTime, 0)
|
DateTool().dateToTimestamp(state.failureDateTime, 0).toString();
|
||||||
.toString();
|
|
||||||
endTime = DateTool()
|
|
||||||
.dateToTimestamp(state.failureDateTime, 0)
|
|
||||||
.toString();
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
typeValue = XSConstantMacro.keyTypeTime;
|
typeValue = XSConstantMacro.keyTypeTime;
|
||||||
@ -116,7 +112,13 @@ class SendElectronicKeyViewLogic extends BaseGetXController {
|
|||||||
weekDays: state.weekdaysList,
|
weekDays: state.weekdaysList,
|
||||||
startTime: int.parse(startTime),
|
startTime: int.parse(startTime),
|
||||||
endTime: int.parse(endTime),
|
endTime: int.parse(endTime),
|
||||||
isOnlyManageSelf: 0);
|
isOnlyManageSelf: 0,
|
||||||
|
realName: state.isRequireAuth.value == true
|
||||||
|
? state.realNameController.text
|
||||||
|
: "",
|
||||||
|
idCardNumber: state.isRequireAuth.value == true
|
||||||
|
? state.idCardController.text
|
||||||
|
: "");
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
state.isSendSuccess = true;
|
state.isSendSuccess = true;
|
||||||
resetData();
|
resetData();
|
||||||
@ -135,6 +137,24 @@ class SendElectronicKeyViewLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//检测实名认证是否支持开启
|
||||||
|
Future<void> keyCheckFace() async {
|
||||||
|
AdvancedFunctionRecordEntity entity = await ApiRepository.to.keyCheckFace(
|
||||||
|
countryCode: int.parse(state.countryCode),
|
||||||
|
account: state.emailOrPhoneController.text);
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
ShowTipView().showBuyTipWithContentAlert(
|
||||||
|
titleStr: '实名认证为付费功能,请购买后再使用'.tr,
|
||||||
|
sureClick: () {
|
||||||
|
Get.toNamed(Routers.advancedFeaturesWebPage,
|
||||||
|
arguments: {'isShop': false});
|
||||||
|
});
|
||||||
|
} else if (entity.errorCode! == 431) {
|
||||||
|
//431代表改用户没有身份证信息,需要弹出输入身份证信息框
|
||||||
|
state.isRequireAuth.value = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool isPhoneNumber(String input) {
|
bool isPhoneNumber(String input) {
|
||||||
// 手机号正则表达式,这里简化为11位数字
|
// 手机号正则表达式,这里简化为11位数字
|
||||||
final RegExp phoneRegExp = RegExp(r'^\d{11}$');
|
final RegExp phoneRegExp = RegExp(r'^\d{11}$');
|
||||||
@ -148,15 +168,33 @@ class SendElectronicKeyViewLogic extends BaseGetXController {
|
|||||||
return emailRegExp.hasMatch(input);
|
return emailRegExp.hasMatch(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextEditingController getCurrentController(int lineIndex) {
|
||||||
|
TextEditingController currentController = TextEditingController();
|
||||||
|
switch (lineIndex) {
|
||||||
|
case 1:
|
||||||
|
currentController = state.emailOrPhoneController;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
currentController = state.keyNameController;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
currentController = state.realNameController;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
currentController = state.idCardController;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
return currentController;
|
||||||
|
}
|
||||||
|
|
||||||
void resetData() {
|
void resetData() {
|
||||||
state.emailOrPhoneController.text = "";
|
state.emailOrPhoneController.text = "";
|
||||||
state.keyNameController.text = "";
|
state.keyNameController.text = "";
|
||||||
state.timeLimitBeginTime = DateTool()
|
state.timeLimitBeginTime = DateTool().dateToYMDHNString(
|
||||||
.dateToYMDHNString(DateTime.now().millisecondsSinceEpoch.toString())
|
DateTime.now().millisecondsSinceEpoch.toString()); // 限时开始时间
|
||||||
; // 限时开始时间
|
state.timeLimitEndTime = DateTool().dateToYMDHNString(
|
||||||
state.timeLimitEndTime = DateTool()
|
DateTime.now().millisecondsSinceEpoch.toString()); // 限时结束时间
|
||||||
.dateToYMDHNString(DateTime.now().millisecondsSinceEpoch.toString())
|
|
||||||
; // 限时结束时间
|
|
||||||
state.cycleBeginTime = ""; // 循环开始时间
|
state.cycleBeginTime = ""; // 循环开始时间
|
||||||
state.cycleEndTime = ""; // 循环结束时间
|
state.cycleEndTime = ""; // 循环结束时间
|
||||||
state.effectiveDateTime = ""; // 生效时间
|
state.effectiveDateTime = ""; // 生效时间
|
||||||
|
|||||||
@ -17,7 +17,6 @@ import 'package:star_lock/tools/pickers/pickers.dart';
|
|||||||
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
||||||
import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart';
|
import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart';
|
||||||
import 'package:star_lock/tools/showTipView.dart';
|
import 'package:star_lock/tools/showTipView.dart';
|
||||||
import 'package:star_lock/tools/storage.dart';
|
|
||||||
import 'package:star_lock/tools/submitBtn.dart';
|
import 'package:star_lock/tools/submitBtn.dart';
|
||||||
import 'package:star_lock/translations/trans_lib.dart';
|
import 'package:star_lock/translations/trans_lib.dart';
|
||||||
|
|
||||||
@ -34,6 +33,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
with AutomaticKeepAliveClientMixin {
|
with AutomaticKeepAliveClientMixin {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
super.build(context);
|
||||||
return GetBuilder<SendElectronicKeyViewLogic>(
|
return GetBuilder<SendElectronicKeyViewLogic>(
|
||||||
tag: widget.type,
|
tag: widget.type,
|
||||||
init: SendElectronicKeyViewLogic(widget.type),
|
init: SendElectronicKeyViewLogic(widget.type),
|
||||||
@ -43,7 +43,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
} else {
|
} else {
|
||||||
switch (widget.type) {
|
switch (widget.type) {
|
||||||
case '0':
|
case '0':
|
||||||
// 限时
|
// 限时
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
@ -56,7 +56,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
case '1':
|
case '1':
|
||||||
// 永久
|
// 永久
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
@ -68,7 +68,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
case '2':
|
case '2':
|
||||||
// 单次
|
// 单次
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
@ -80,7 +80,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
case '3':
|
case '3':
|
||||||
// 循环
|
// 循环
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
@ -124,7 +124,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
'${logic.state.countryName} +${logic.state.countryCode}',
|
'${logic.state.countryName} +${logic.state.countryCode}',
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
style:
|
style:
|
||||||
TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
||||||
),
|
),
|
||||||
action: () async {
|
action: () async {
|
||||||
var result = await Navigator.pushNamed(
|
var result = await Navigator.pushNamed(
|
||||||
@ -161,13 +161,11 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
PDuration selectDate = PDuration.parse(
|
PDuration selectDate = PDuration.parse(
|
||||||
DateTime.parse(logic.state.timeLimitBeginTime));
|
DateTime.parse(logic.state.timeLimitBeginTime));
|
||||||
Pickers.showDatePicker(context,
|
Pickers.showDatePicker(context,
|
||||||
selectDate: selectDate,
|
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) {
|
||||||
mode: DateMode.YMDHM,
|
logic.state.timeLimitBeginTime =
|
||||||
onConfirm: (p) {
|
DateTool().getYMDHNDateString(p, 1);
|
||||||
logic.state.timeLimitBeginTime =
|
logic.update();
|
||||||
DateTool().getYMDHNDateString(p, 1);
|
});
|
||||||
logic.update();
|
|
||||||
});
|
|
||||||
}),
|
}),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||||
@ -177,13 +175,11 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
PDuration selectDate = PDuration.parse(
|
PDuration selectDate = PDuration.parse(
|
||||||
DateTime.tryParse(logic.state.timeLimitEndTime));
|
DateTime.tryParse(logic.state.timeLimitEndTime));
|
||||||
Pickers.showDatePicker(context,
|
Pickers.showDatePicker(context,
|
||||||
selectDate: selectDate,
|
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) {
|
||||||
mode: DateMode.YMDHM,
|
logic.state.timeLimitEndTime =
|
||||||
onConfirm: (p) {
|
DateTool().getYMDHNDateString(p, 1);
|
||||||
logic.state.timeLimitEndTime =
|
logic.update();
|
||||||
DateTool().getYMDHNDateString(p, 1);
|
});
|
||||||
logic.update();
|
|
||||||
});
|
|
||||||
}),
|
}),
|
||||||
Container(height: 10.h),
|
Container(height: 10.h),
|
||||||
],
|
],
|
||||||
@ -194,19 +190,37 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
Widget keyRealNameWidget(SendElectronicKeyViewLogic logic) {
|
Widget keyRealNameWidget(SendElectronicKeyViewLogic logic) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.realNameAuthentication!.tr,
|
leftTitel: TranslationLoader.lanKeys!.realNameAuthentication!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isTipsImg: true,
|
isTipsImg: true,
|
||||||
tipsImgAction: () {
|
isHaveLine:
|
||||||
ShowTipView().showSureAlertDialog(
|
logic.state.isRequireAuth.value == true ? true : false,
|
||||||
"人脸实名认证指的是用户在使用手机APP开锁时,需要先进行本人人脸验证,验证通过才能开锁。"
|
tipsImgAction: () {
|
||||||
.tr);
|
ShowTipView().showSureAlertDialog(
|
||||||
},
|
"人脸实名认证指的是用户在使用手机APP开锁时,需要先进行本人人脸验证,验证通过才能开锁。".tr);
|
||||||
isHaveRightWidget: true,
|
},
|
||||||
rightWidget: SizedBox(
|
isHaveRightWidget: true,
|
||||||
width: 60.w, height: 50.h, child: _remoteSwitch(false, logic)),
|
rightWidget: SizedBox(
|
||||||
),
|
width: 60.w,
|
||||||
|
height: 50.h,
|
||||||
|
child: _remoteSwitch(false, logic)),
|
||||||
|
)),
|
||||||
|
Obx(() => Visibility(
|
||||||
|
visible: logic.state.isRequireAuth.value,
|
||||||
|
child: CommonItem(
|
||||||
|
leftTitel: '真实姓名'.tr,
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveRightWidget: true,
|
||||||
|
isHaveLine: true,
|
||||||
|
rightWidget: getTFWidget(false, '请输入真实姓名'.tr, 3, logic)))),
|
||||||
|
Obx(() => Visibility(
|
||||||
|
visible: logic.state.isRequireAuth.value,
|
||||||
|
child: CommonItem(
|
||||||
|
leftTitel: '身份证号'.tr,
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveRightWidget: true,
|
||||||
|
rightWidget: getTFWidget(false, '请输入身份证号'.tr, 4, logic)))),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -218,13 +232,12 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||||
rightTitle:
|
rightTitle:
|
||||||
"${logic.state.cycleBeginTime}\n${logic.state.cycleEndTime}",
|
"${logic.state.cycleBeginTime}\n${logic.state.cycleEndTime}",
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
var result =
|
var result =
|
||||||
await Get.toNamed(
|
await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: {
|
||||||
Routers.seletKeyCyclicDatePage, arguments: {
|
|
||||||
'validityValue': logic.state.weekdaysList,
|
'validityValue': logic.state.weekdaysList,
|
||||||
'starDate': logic.state.cycleBeginTime,
|
'starDate': logic.state.cycleBeginTime,
|
||||||
'endDate': logic.state.cycleEndTime,
|
'endDate': logic.state.cycleEndTime,
|
||||||
@ -248,8 +261,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
var result = await Get.toNamed(
|
var result = await Get.toNamed(Routers.seletKeyCyclicDatePage,
|
||||||
Routers.seletKeyCyclicDatePage,
|
|
||||||
arguments: {
|
arguments: {
|
||||||
'validityValue': logic.state.weekdaysList,
|
'validityValue': logic.state.weekdaysList,
|
||||||
'starDate': logic.state.cycleBeginTime,
|
'starDate': logic.state.cycleBeginTime,
|
||||||
@ -258,12 +270,10 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
'endTime': logic.state.failureDateTime
|
'endTime': logic.state.failureDateTime
|
||||||
});
|
});
|
||||||
if (result != null && result.isNotEmpty) {
|
if (result != null && result.isNotEmpty) {
|
||||||
logic.state.weekdaysList =
|
logic.state.weekdaysList = result['validityValue'];
|
||||||
result['validityValue'];
|
|
||||||
logic.state.cycleBeginTime = result['starDate'];
|
logic.state.cycleBeginTime = result['starDate'];
|
||||||
logic.state.cycleEndTime = result['endDate'];
|
logic.state.cycleEndTime = result['endDate'];
|
||||||
logic.state.effectiveDateTime =
|
logic.state.effectiveDateTime = result['starTime'];
|
||||||
result['starTime'];
|
|
||||||
logic.state.failureDateTime = result['endTime'];
|
logic.state.failureDateTime = result['endTime'];
|
||||||
logic.update();
|
logic.update();
|
||||||
}
|
}
|
||||||
@ -273,12 +283,10 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: "有效时间".tr,
|
leftTitel: "有效时间".tr,
|
||||||
rightTitle:
|
rightTitle:
|
||||||
"${logic.state.effectiveDateTime}-${logic.state
|
"${logic.state.effectiveDateTime}-${logic.state.failureDateTime}",
|
||||||
.failureDateTime}",
|
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
var result = await Get.toNamed(
|
var result = await Get.toNamed(Routers.seletKeyCyclicDatePage,
|
||||||
Routers.seletKeyCyclicDatePage,
|
|
||||||
arguments: {
|
arguments: {
|
||||||
'validityValue': logic.state.weekdaysList,
|
'validityValue': logic.state.weekdaysList,
|
||||||
'starDate': logic.state.cycleBeginTime,
|
'starDate': logic.state.cycleBeginTime,
|
||||||
@ -287,12 +295,10 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
'endTime': logic.state.failureDateTime
|
'endTime': logic.state.failureDateTime
|
||||||
});
|
});
|
||||||
if (result != null && result.isNotEmpty) {
|
if (result != null && result.isNotEmpty) {
|
||||||
logic.state.weekdaysList =
|
logic.state.weekdaysList = result['validityValue'];
|
||||||
result['validityValue'];
|
|
||||||
logic.state.cycleBeginTime = result['starDate'];
|
logic.state.cycleBeginTime = result['starDate'];
|
||||||
logic.state.cycleEndTime = result['endDate'];
|
logic.state.cycleEndTime = result['endDate'];
|
||||||
logic.state.effectiveDateTime =
|
logic.state.effectiveDateTime = result['starTime'];
|
||||||
result['starTime'];
|
|
||||||
logic.state.failureDateTime = result['endTime'];
|
logic.state.failureDateTime = result['endTime'];
|
||||||
logic.update();
|
logic.update();
|
||||||
}
|
}
|
||||||
@ -301,8 +307,8 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget keyBottomWidget(String sendElectronicKeyTips,
|
Widget keyBottomWidget(
|
||||||
SendElectronicKeyViewLogic logic) {
|
String sendElectronicKeyTips, SendElectronicKeyViewLogic logic) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
@ -311,11 +317,11 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
sendElectronicKeyTips,
|
sendElectronicKeyTips,
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18.sp, color: AppColors.darkGrayTextColor),
|
fontSize: 18.sp, color: AppColors.darkGrayTextColor),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -348,7 +354,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
child: Text(
|
child: Text(
|
||||||
TranslationLoader.lanKeys!.sendGroupKey!.tr,
|
TranslationLoader.lanKeys!.sendGroupKey!.tr,
|
||||||
style:
|
style:
|
||||||
TextStyle(color: AppColors.mainColor, fontSize: 22.sp),
|
TextStyle(color: AppColors.mainColor, fontSize: 22.sp),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -440,9 +446,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: lineIndex == 1
|
controller: logic.getCurrentController(lineIndex),
|
||||||
? logic.state.emailOrPhoneController
|
|
||||||
: logic.state.keyNameController,
|
|
||||||
//输入框一行
|
//输入框一行
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
inputFormatters: <TextInputFormatter>[
|
inputFormatters: <TextInputFormatter>[
|
||||||
@ -458,16 +462,16 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
hintStyle: TextStyle(fontSize: 22.sp),
|
hintStyle: TextStyle(fontSize: 22.sp),
|
||||||
focusedBorder: const OutlineInputBorder(
|
focusedBorder: const OutlineInputBorder(
|
||||||
borderSide:
|
borderSide:
|
||||||
BorderSide(width: 0, color: Colors.transparent)),
|
BorderSide(width: 0, color: Colors.transparent)),
|
||||||
disabledBorder: const OutlineInputBorder(
|
disabledBorder: const OutlineInputBorder(
|
||||||
borderSide:
|
borderSide:
|
||||||
BorderSide(width: 0, color: Colors.transparent)),
|
BorderSide(width: 0, color: Colors.transparent)),
|
||||||
enabledBorder: const OutlineInputBorder(
|
enabledBorder: const OutlineInputBorder(
|
||||||
borderSide:
|
borderSide:
|
||||||
BorderSide(width: 0, color: Colors.transparent)),
|
BorderSide(width: 0, color: Colors.transparent)),
|
||||||
border: const OutlineInputBorder(
|
border: const OutlineInputBorder(
|
||||||
borderSide:
|
borderSide:
|
||||||
BorderSide(width: 0, color: Colors.transparent)),
|
BorderSide(width: 0, color: Colors.transparent)),
|
||||||
contentPadding: const EdgeInsets.symmetric(vertical: 0),
|
contentPadding: const EdgeInsets.symmetric(vertical: 0),
|
||||||
),
|
),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -479,32 +483,32 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
),
|
),
|
||||||
isHaveBtn
|
isHaveBtn
|
||||||
? Container(
|
? Container(
|
||||||
width: 32.w,
|
width: 32.w,
|
||||||
height: 32.w,
|
height: 32.w,
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('images/icon_addressBook.png'),
|
image: AssetImage('images/icon_addressBook.png'),
|
||||||
fit: BoxFit.fill),
|
fit: BoxFit.fill),
|
||||||
),
|
),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
Contact? currentContact =
|
Contact? currentContact =
|
||||||
await logic.state.contactPicker.selectContact();
|
await logic.state.contactPicker.selectContact();
|
||||||
logic.state.contact = currentContact!;
|
logic.state.contact = currentContact!;
|
||||||
if (currentContact.phoneNumbers!.isNotEmpty) {
|
if (currentContact.phoneNumbers!.isNotEmpty) {
|
||||||
logic.state.emailOrPhoneController.text = currentContact
|
logic.state.emailOrPhoneController.text = currentContact
|
||||||
.phoneNumbers![0]
|
.phoneNumbers![0]
|
||||||
.replaceAll(RegExp(r"\s+\b|\b\s"), "");
|
.replaceAll(RegExp(r"\s+\b|\b\s"), "");
|
||||||
}
|
}
|
||||||
if (currentContact.fullName!.isNotEmpty) {
|
if (currentContact.fullName!.isNotEmpty) {
|
||||||
logic.state.keyNameController.text =
|
logic.state.keyNameController.text =
|
||||||
currentContact.fullName!;
|
currentContact.fullName!;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Container()
|
: Container()
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -517,8 +521,8 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
visible: logic.state.isDemoMode
|
visible: logic.state.isDemoMode
|
||||||
? false
|
? false
|
||||||
: (CommonDataManage().currentKeyInfo.lockSetting!.remoteUnlock == 1
|
: (CommonDataManage().currentKeyInfo.lockSetting!.remoteUnlock == 1
|
||||||
? true
|
? true
|
||||||
: false),
|
: false),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
CommonItem(
|
CommonItem(
|
||||||
@ -535,28 +539,23 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
}
|
}
|
||||||
|
|
||||||
//isRemote true:远程开锁 false:实名认证
|
//isRemote true:远程开锁 false:实名认证
|
||||||
CupertinoSwitch _remoteSwitch(bool isRemote,
|
CupertinoSwitch _remoteSwitch(
|
||||||
SendElectronicKeyViewLogic logic) {
|
bool isRemote, SendElectronicKeyViewLogic logic) {
|
||||||
return CupertinoSwitch(
|
return CupertinoSwitch(
|
||||||
activeColor: CupertinoColors.activeBlue,
|
activeColor: CupertinoColors.activeBlue,
|
||||||
trackColor: CupertinoColors.systemGrey5,
|
trackColor: CupertinoColors.systemGrey5,
|
||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: isRemote
|
value:
|
||||||
? logic.state.isRemoteUnlock
|
isRemote ? logic.state.isRemoteUnlock : logic.state.isAuthentication,
|
||||||
: logic.state.isAuthentication,
|
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
if (isRemote) {
|
if (isRemote) {
|
||||||
logic.state.isRemoteUnlock = !logic.state.isRemoteUnlock;
|
logic.state.isRemoteUnlock = !logic.state.isRemoteUnlock;
|
||||||
} else {
|
} else {
|
||||||
logic.state.isAuthentication =
|
logic.state.isAuthentication = !logic.state.isAuthentication;
|
||||||
!logic.state.isAuthentication;
|
|
||||||
if (logic.state.isAuthentication) {
|
if (logic.state.isAuthentication) {
|
||||||
ShowTipView().showBuyTipWithContentAlert(
|
logic.keyCheckFace();
|
||||||
titleStr: '实名认证为付费功能,请购买后再使用'.tr,
|
} else {
|
||||||
sureClick: () {
|
logic.state.isRequireAuth.value = false;
|
||||||
Get.toNamed(Routers.advancedFeaturesWebPage,
|
|
||||||
arguments: {'isShop': false});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -586,7 +585,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
TextButton(
|
TextButton(
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
overlayColor:
|
overlayColor:
|
||||||
MaterialStateProperty.all<Color>(Colors.white)),
|
MaterialStateProperty.all<Color>(Colors.white)),
|
||||||
child: Text(
|
child: Text(
|
||||||
'取消'.tr,
|
'取消'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -610,14 +609,14 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
return widgetList;
|
return widgetList;
|
||||||
}
|
}
|
||||||
|
|
||||||
GestureDetector buildCenter3(String imageName, String titleStr,
|
GestureDetector buildCenter3(
|
||||||
int itemIndex) {
|
String imageName, String titleStr, int itemIndex) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 120.w,
|
width: 120.w,
|
||||||
// height: 64.h,
|
// height: 64.h,
|
||||||
margin:
|
margin:
|
||||||
EdgeInsets.only(top: 20.w, bottom: 20.w, left: 10.w, right: 10.w),
|
EdgeInsets.only(top: 20.w, bottom: 20.w, left: 10.w, right: 10.w),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@ -645,21 +644,21 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
Get.back();
|
Get.back();
|
||||||
switch (itemIndex) {
|
switch (itemIndex) {
|
||||||
case 0:
|
case 0:
|
||||||
//微信好友
|
//微信好友
|
||||||
String pwdShareStr = '您好,您的电子钥匙生成成功'.tr;
|
String pwdShareStr = '您好,您的电子钥匙生成成功'.tr;
|
||||||
NativeInteractionTool().loadNativeShare(shareText: pwdShareStr);
|
NativeInteractionTool().loadNativeShare(shareText: pwdShareStr);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
//短信
|
//短信
|
||||||
String pwdShareStr = '您好,您的电子钥匙生成成功'.tr;
|
String pwdShareStr = '您好,您的电子钥匙生成成功'.tr;
|
||||||
NativeInteractionTool().loadNativeShare(shareText: pwdShareStr);
|
NativeInteractionTool().loadNativeShare(shareText: pwdShareStr);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
//邮件
|
//邮件
|
||||||
Get.toNamed(Routers.sendEmailNotificationPage);
|
Get.toNamed(Routers.sendEmailNotificationPage);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
//更多
|
//更多
|
||||||
String pwdShareStr = '您好,您的电子钥匙生成成功'.tr;
|
String pwdShareStr = '您好,您的电子钥匙生成成功'.tr;
|
||||||
NativeInteractionTool().loadNativeShare(shareText: pwdShareStr);
|
NativeInteractionTool().loadNativeShare(shareText: pwdShareStr);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -7,6 +7,8 @@ class SendElectronicKeyViewState {
|
|||||||
TextEditingController emailOrPhoneController =
|
TextEditingController emailOrPhoneController =
|
||||||
TextEditingController(); //邮箱/手机号输入框
|
TextEditingController(); //邮箱/手机号输入框
|
||||||
TextEditingController keyNameController = TextEditingController(); //钥匙名输入框
|
TextEditingController keyNameController = TextEditingController(); //钥匙名输入框
|
||||||
|
TextEditingController realNameController = TextEditingController(); //真实姓名输入框
|
||||||
|
TextEditingController idCardController = TextEditingController(); //身份证号输入框
|
||||||
|
|
||||||
final FlutterContactPicker contactPicker = FlutterContactPicker();
|
final FlutterContactPicker contactPicker = FlutterContactPicker();
|
||||||
late Contact contact;
|
late Contact contact;
|
||||||
@ -29,6 +31,7 @@ class SendElectronicKeyViewState {
|
|||||||
var countryCode = '86';
|
var countryCode = '86';
|
||||||
var isCreateUser = false; //用户未注册时传1 已注册传0
|
var isCreateUser = false; //用户未注册时传1 已注册传0
|
||||||
var isDemoMode = false;
|
var isDemoMode = false;
|
||||||
|
var isRequireAuth = false.obs; //是否需要实名认证的必填项
|
||||||
|
|
||||||
final timeLimitTips = '接收者在有效期内可以不限次数使用'; //限时
|
final timeLimitTips = '接收者在有效期内可以不限次数使用'; //限时
|
||||||
final permanentTips = '接收者可以使用此App开关锁'; //永久
|
final permanentTips = '接收者可以使用此App开关锁'; //永久
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/tools/storage.dart';
|
||||||
|
|
||||||
import '../../../../network/api_repository.dart';
|
import '../../../../network/api_repository.dart';
|
||||||
import '../../../../tools/baseGetXController.dart';
|
import '../../../../tools/baseGetXController.dart';
|
||||||
@ -11,13 +11,12 @@ class GroupEditLockLogic extends BaseGetXController {
|
|||||||
|
|
||||||
//锁分组里面添加锁
|
//锁分组里面添加锁
|
||||||
Future<void> lockGroupAddLock(List lockIds) async {
|
Future<void> lockGroupAddLock(List lockIds) async {
|
||||||
if(lockIds.isEmpty){
|
if (lockIds.isEmpty) {
|
||||||
showToast("请选择锁".tr);
|
showToast("请选择锁".tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var entity = await ApiRepository.to.lockGroupAddLock(
|
var entity = await ApiRepository.to.lockGroupAddLock(
|
||||||
lockIds: lockIds,
|
lockIds: lockIds, groupId: state.selectGroupListItem.keyGroupId!);
|
||||||
groupId: state.selectGroupListItem.keyGroupId!);
|
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
showToast("添加成功");
|
showToast("添加成功");
|
||||||
eventBus.fire(LockGroupEditGroupLockRefreshEvent());
|
eventBus.fire(LockGroupEditGroupLockRefreshEvent());
|
||||||
@ -28,7 +27,7 @@ class GroupEditLockLogic extends BaseGetXController {
|
|||||||
|
|
||||||
//锁分组里面添加锁
|
//锁分组里面添加锁
|
||||||
Future<void> lockGroupDeletLock(List lockIds) async {
|
Future<void> lockGroupDeletLock(List lockIds) async {
|
||||||
if(lockIds.isEmpty){
|
if (lockIds.isEmpty) {
|
||||||
showToast("请选择锁".tr);
|
showToast("请选择锁".tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -41,4 +40,11 @@ class GroupEditLockLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
onReady() async {
|
||||||
|
super.onReady();
|
||||||
|
|
||||||
|
var isVip = await Storage.getBool(saveIsVip);
|
||||||
|
state.isVip.value = isVip ?? false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
||||||
|
import 'package:star_lock/tools/advancedFunctionHandle.dart';
|
||||||
import 'package:star_lock/tools/noData.dart';
|
import 'package:star_lock/tools/noData.dart';
|
||||||
|
|
||||||
import '../../../../../../app_settings/app_colors.dart';
|
import '../../../../../../app_settings/app_colors.dart';
|
||||||
@ -26,61 +27,78 @@ class _GroupEditLockPageState extends State<GroupEditLockPage> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle: state.type == 0 ? TranslationLoader.lanKeys!.add!.tr : TranslationLoader.lanKeys!.delete!.tr,
|
barTitle: state.type == 0
|
||||||
|
? TranslationLoader.lanKeys!.add!.tr
|
||||||
|
: TranslationLoader.lanKeys!.delete!.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
|
Obx(() => Visibility(
|
||||||
|
visible: state.isVip.value ? false : true,
|
||||||
|
child: AdvancedFunctionHandle()
|
||||||
|
.topTipsAdvancedFeatures('开通高级功能后才可以对锁进行管理'.tr))),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.all(15.w),
|
margin: EdgeInsets.all(15.w),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(TranslationLoader.lanKeys!.selectTheLockToJoinTheGroup!.tr, style: TextStyle(fontSize: 25.sp)),
|
Text(
|
||||||
|
TranslationLoader
|
||||||
|
.lanKeys!.selectTheLockToJoinTheGroup!.tr,
|
||||||
|
style: TextStyle(fontSize: 25.sp)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(child: _buildMainUI()),
|
Expanded(child: _buildMainUI()),
|
||||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, onClick: () async {
|
Obx(() => Visibility(
|
||||||
var idList = [];
|
visible: state.isVip.value ? true : false,
|
||||||
for(int i = 0; i<state.lockList.length; i++){
|
child: SubmitBtn(
|
||||||
LockListItem lockListItem = state.lockList[i];
|
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||||
if(lockListItem.isChecked == true){
|
onClick: () async {
|
||||||
idList.add(lockListItem.lockId);
|
var idList = [];
|
||||||
}
|
for (int i = 0; i < state.lockList.length; i++) {
|
||||||
}
|
LockListItem lockListItem = state.lockList[i];
|
||||||
if(state.type == 0){
|
if (lockListItem.isChecked == true) {
|
||||||
// 添加
|
idList.add(lockListItem.lockId);
|
||||||
logic.lockGroupAddLock(idList);
|
}
|
||||||
}else if(state.type == 1){
|
}
|
||||||
// 删除
|
if (state.type == 0) {
|
||||||
logic.lockGroupDeletLock(idList);
|
// 添加
|
||||||
}
|
logic.lockGroupAddLock(idList);
|
||||||
}),
|
} else if (state.type == 1) {
|
||||||
|
// 删除
|
||||||
|
logic.lockGroupDeletLock(idList);
|
||||||
|
}
|
||||||
|
}))),
|
||||||
SizedBox(height: 20.h)
|
SizedBox(height: 20.h)
|
||||||
],
|
],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildMainUI(){
|
Widget _buildMainUI() {
|
||||||
return state.lockList.isNotEmpty
|
return state.lockList.isNotEmpty
|
||||||
? ListView.separated(
|
? ListView.separated(
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
LockListItem itemData = state.lockList[index];
|
LockListItem itemData = state.lockList[index];
|
||||||
return _listItemView(itemData);
|
return _listItemView(itemData);
|
||||||
},
|
},
|
||||||
itemCount: state.lockList.length,
|
itemCount: state.lockList.length,
|
||||||
separatorBuilder: (BuildContext context, int index) {
|
separatorBuilder: (BuildContext context, int index) {
|
||||||
return Divider(
|
return Divider(
|
||||||
height: 1.h,
|
height: 1.h,
|
||||||
color: AppColors.greyLineColor,
|
color: AppColors.greyLineColor,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
) : NoData();
|
)
|
||||||
|
: NoData();
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _listItemView(LockListItem itemData) {
|
Widget _listItemView(LockListItem itemData) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: (){
|
onTap: () {
|
||||||
|
if (!state.isVip.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
setState(() {
|
setState(() {
|
||||||
itemData.isChecked = !itemData.isChecked;
|
itemData.isChecked = !itemData.isChecked;
|
||||||
});
|
});
|
||||||
@ -92,9 +110,18 @@ class _GroupEditLockPageState extends State<GroupEditLockPage> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 20.w,),
|
SizedBox(
|
||||||
Image.asset('images/icon_lockGroup_item.png', width: 36, height: 36, fit: BoxFit.fill,),
|
width: 20.w,
|
||||||
SizedBox(width: 10.w,),
|
),
|
||||||
|
Image.asset(
|
||||||
|
'images/icon_lockGroup_item.png',
|
||||||
|
width: 36,
|
||||||
|
height: 36,
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 10.w,
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
itemData.lockAlias ?? '',
|
itemData.lockAlias ?? '',
|
||||||
style: TextStyle(fontSize: 24.sp),
|
style: TextStyle(fontSize: 24.sp),
|
||||||
@ -113,5 +140,4 @@ class _GroupEditLockPageState extends State<GroupEditLockPage> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,24 +1,25 @@
|
|||||||
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import '../../../../main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
import '../../../../main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
||||||
|
|
||||||
class GroupEditLockState {
|
class GroupEditLockState {
|
||||||
var lockList = <LockListItem>[];
|
var lockList = <LockListItem>[];
|
||||||
var type = 0;// 0添加 1删除
|
var type = 0; // 0添加 1删除
|
||||||
var selectGroupListItem = GroupListItem();
|
var selectGroupListItem = GroupListItem();
|
||||||
var ungrouped = GroupListItem();
|
var ungrouped = GroupListItem();
|
||||||
|
var isVip = false.obs;
|
||||||
|
|
||||||
GroupEditLockState() {
|
GroupEditLockState() {
|
||||||
Map map = Get.arguments;
|
Map map = Get.arguments;
|
||||||
type = map["type"];
|
type = map["type"];
|
||||||
selectGroupListItem = map["groupListItem"];
|
selectGroupListItem = map["groupListItem"];
|
||||||
ungrouped = map["ungrouped"];
|
ungrouped = map["ungrouped"];
|
||||||
if(type == 0){
|
if (type == 0) {
|
||||||
lockList = ungrouped.lockList!;
|
lockList = ungrouped.lockList!;
|
||||||
}else{
|
} else {
|
||||||
lockList = selectGroupListItem.lockList!;
|
lockList = selectGroupListItem.lockList!;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i<lockList.length; i++){
|
for (int i = 0; i < lockList.length; i++) {
|
||||||
LockListItem lockListItem = lockList[i];
|
LockListItem lockListItem = lockList[i];
|
||||||
lockListItem.isChecked = false;
|
lockListItem.isChecked = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,12 +43,17 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
|
|||||||
// 处理操作按钮的点击事件-添加锁分组
|
// 处理操作按钮的点击事件-添加锁分组
|
||||||
state.changeNameController.text = "";
|
state.changeNameController.text = "";
|
||||||
// showCupertinoAlertDialog(context, true, 0);
|
// showCupertinoAlertDialog(context, true, 0);
|
||||||
ShowTipView().showTFViewAlertDialog(state.changeNameController, TranslationLoader.lanKeys!.createNewGroup!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, (){
|
ShowTipView().showTFViewAlertDialog(
|
||||||
|
state.changeNameController,
|
||||||
|
TranslationLoader.lanKeys!.createNewGroup!.tr,
|
||||||
|
TranslationLoader.lanKeys!.pleaseEnter!.tr, () {
|
||||||
//发送编辑钥匙名称请求
|
//发送编辑钥匙名称请求
|
||||||
if (state.changeNameController.text.isNotEmpty) {
|
if (state.changeNameController.text.isNotEmpty) {
|
||||||
|
Navigator.of(context).pop();
|
||||||
logic.addLockGroupRequest();
|
logic.addLockGroupRequest();
|
||||||
} else {
|
} else {
|
||||||
logic.showToast(TranslationLoader.lanKeys!.pleaseEnterAGroupName!.tr);
|
logic.showToast(
|
||||||
|
TranslationLoader.lanKeys!.pleaseEnterAGroupName!.tr);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -57,7 +62,10 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
|
|||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
Expanded(child: Obx(() => state.itemDataList.value.isEmpty ? NoData(): _buildMainUI())),
|
Expanded(
|
||||||
|
child: Obx(() => state.itemDataList.value.isEmpty
|
||||||
|
? NoData()
|
||||||
|
: _buildMainUI())),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -81,7 +89,7 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 40.h,
|
height: 40.h,
|
||||||
child: Text(
|
child: Text(
|
||||||
'${TranslationLoader.lanKeys!.lockTrCount!.tr}:${state.lockNum.toString()}',
|
'${TranslationLoader.lanKeys!.lockTrCount!.tr}:${state.lockNum.toString()}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: AppColors.darkGrayTextColor, fontSize: 20.sp),
|
color: AppColors.darkGrayTextColor, fontSize: 20.sp),
|
||||||
),
|
),
|
||||||
@ -91,28 +99,32 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
GroupListItem itemData = state.itemDataList.value[index];
|
GroupListItem itemData = state.itemDataList.value[index];
|
||||||
if(itemData.groupType == 0){
|
if (itemData.groupType == 0) {
|
||||||
state.ungrouped = itemData;
|
state.ungrouped = itemData;
|
||||||
}
|
}
|
||||||
if (index < state.itemDataList.value.length) {
|
if (index < state.itemDataList.value.length) {
|
||||||
return LeftSlideActions(
|
return LeftSlideActions(
|
||||||
key: Key(itemData.keyGroupId!.toString()),
|
key: Key(itemData.keyGroupId!.toString()),
|
||||||
actionsWidth: itemData.groupType != 0 ? 200.w : 0,
|
actionsWidth: itemData.groupType != 0 ? 200.w : 0,
|
||||||
actions: itemData.groupType != 0 ? [
|
actions: itemData.groupType != 0
|
||||||
_buildEditBtn(itemData),
|
? [
|
||||||
_buildDeleteBtn(itemData),
|
_buildEditBtn(itemData),
|
||||||
] : [],
|
_buildDeleteBtn(itemData),
|
||||||
|
]
|
||||||
|
: [],
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(1)),
|
borderRadius: BorderRadius.all(Radius.circular(1)),
|
||||||
),
|
),
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel:
|
leftTitel:
|
||||||
'${itemData.keyGroupName}(${itemData.lockList?.length})',
|
'${itemData.keyGroupName}(${itemData.lockList?.length})',
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
allHeight: 70.h,
|
allHeight: 70.h,
|
||||||
action: () {
|
action: () {
|
||||||
|
Get.toNamed(Routers.lockItemListPage, arguments: {
|
||||||
Get.toNamed(Routers.lockItemListPage, arguments: {'groupListItem': itemData, "ungrouped": state.ungrouped});
|
'groupListItem': itemData,
|
||||||
|
"ungrouped": state.ungrouped
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -161,7 +173,7 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
// 省略: 弹出是否删除的确认对话框。
|
// 省略: 弹出是否删除的确认对话框。
|
||||||
// showIosTipViewDialog(context, groupListItem);
|
// showIosTipViewDialog(context, groupListItem);
|
||||||
ShowTipView().showIosTipWithContentDialog("分组下的锁将被移到未分组里".tr, (){
|
ShowTipView().showIosTipWithContentDialog("分组下的锁将被移到未分组里".tr, () {
|
||||||
logic.deleteLockGroupRequest(groupListItem.keyGroupId!);
|
logic.deleteLockGroupRequest(groupListItem.keyGroupId!);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -189,11 +201,15 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
|
|||||||
state.changeNameController.text = groupListItem.keyGroupName!;
|
state.changeNameController.text = groupListItem.keyGroupName!;
|
||||||
// showCupertinoAlertDialog(context, false, groupListItem.keyGroupId!);
|
// showCupertinoAlertDialog(context, false, groupListItem.keyGroupId!);
|
||||||
|
|
||||||
ShowTipView().showTFViewAlertDialog(state.changeNameController, TranslationLoader.lanKeys!.createNewGroup!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, (){
|
ShowTipView().showTFViewAlertDialog(
|
||||||
|
state.changeNameController,
|
||||||
|
TranslationLoader.lanKeys!.createNewGroup!.tr,
|
||||||
|
TranslationLoader.lanKeys!.pleaseEnter!.tr, () {
|
||||||
if (state.changeNameController.text.isNotEmpty) {
|
if (state.changeNameController.text.isNotEmpty) {
|
||||||
logic.editLockGroupRequest(groupListItem.keyGroupId!);
|
logic.editLockGroupRequest(groupListItem.keyGroupId!);
|
||||||
} else {
|
} else {
|
||||||
logic.showToast(TranslationLoader.lanKeys!.pleaseEnterAGroupName!.tr);
|
logic.showToast(
|
||||||
|
TranslationLoader.lanKeys!.pleaseEnterAGroupName!.tr);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -232,5 +248,4 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
|
|||||||
// }
|
// }
|
||||||
// );
|
// );
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -227,6 +227,5 @@ abstract class Api {
|
|||||||
final String deleteLockCloudStorageURL = '/lockCloudStorage/delete'; //删除云存
|
final String deleteLockCloudStorageURL = '/lockCloudStorage/delete'; //删除云存
|
||||||
final String getServiceUserPackageURL =
|
final String getServiceUserPackageURL =
|
||||||
'/v2/service/getUserPackage'; //获取增值服务用户余量包
|
'/v2/service/getUserPackage'; //获取增值服务用户余量包
|
||||||
final String isFaceAuthenticationURL =
|
final String isFaceAuthenticationURL = '/key/checkFace'; //检测实名认证是否支持开启
|
||||||
'/key/isFaceAuthentication'; //检测实名认证是否支持开启
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -142,7 +142,9 @@ class ApiProvider extends BaseProvider {
|
|||||||
List weekDays,
|
List weekDays,
|
||||||
int startTime,
|
int startTime,
|
||||||
int endTime,
|
int endTime,
|
||||||
int isOnlyManageSelf) =>
|
int isOnlyManageSelf,
|
||||||
|
String realName,
|
||||||
|
String idCardNumber) =>
|
||||||
post(
|
post(
|
||||||
sendElectronicKeyURL.toUrl,
|
sendElectronicKeyURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -165,6 +167,8 @@ class ApiProvider extends BaseProvider {
|
|||||||
'startTime': startTime,
|
'startTime': startTime,
|
||||||
'endTime': endTime,
|
'endTime': endTime,
|
||||||
'isOnlyManageSelf': isOnlyManageSelf,
|
'isOnlyManageSelf': isOnlyManageSelf,
|
||||||
|
'realName': realName,
|
||||||
|
'idCardNumber': idCardNumber
|
||||||
}));
|
}));
|
||||||
|
|
||||||
Future<Response> uploadElectricQuantity(
|
Future<Response> uploadElectricQuantity(
|
||||||
@ -452,7 +456,7 @@ class ApiProvider extends BaseProvider {
|
|||||||
String startDate,
|
String startDate,
|
||||||
String endDate,
|
String endDate,
|
||||||
String addType,
|
String addType,
|
||||||
int? pwdRight,
|
int? pwdRight,
|
||||||
) =>
|
) =>
|
||||||
post(
|
post(
|
||||||
passwordKeyAddURL.toUrl,
|
passwordKeyAddURL.toUrl,
|
||||||
@ -2028,7 +2032,7 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 检测实名认证是否支持开启
|
// 检测实名认证是否支持开启
|
||||||
Future<Response> isFaceAuthentication(
|
Future<Response> keyCheckFace(
|
||||||
int countryCode,
|
int countryCode,
|
||||||
String account,
|
String account,
|
||||||
) =>
|
) =>
|
||||||
|
|||||||
@ -179,7 +179,9 @@ class ApiRepository {
|
|||||||
required List weekDays,
|
required List weekDays,
|
||||||
required int startTime,
|
required int startTime,
|
||||||
required int endTime,
|
required int endTime,
|
||||||
required int isOnlyManageSelf}) async {
|
required int isOnlyManageSelf,
|
||||||
|
required String realName,
|
||||||
|
required String idCardNumber}) async {
|
||||||
final res = await apiProvider.sendElectronicKey(
|
final res = await apiProvider.sendElectronicKey(
|
||||||
createUser,
|
createUser,
|
||||||
countryCode,
|
countryCode,
|
||||||
@ -199,7 +201,9 @@ class ApiRepository {
|
|||||||
weekDays,
|
weekDays,
|
||||||
startTime,
|
startTime,
|
||||||
endTime,
|
endTime,
|
||||||
isOnlyManageSelf);
|
isOnlyManageSelf,
|
||||||
|
realName,
|
||||||
|
idCardNumber);
|
||||||
return AuthorizedAdminSendEntity.fromJson(res.body);
|
return AuthorizedAdminSendEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2055,11 +2059,11 @@ class ApiRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 检测实名认证是否支持开启
|
// 检测实名认证是否支持开启
|
||||||
Future<AdvancedFunctionRecordEntity> isFaceAuthentication({
|
Future<AdvancedFunctionRecordEntity> keyCheckFace({
|
||||||
required int countryCode,
|
required int countryCode,
|
||||||
required String account,
|
required String account,
|
||||||
}) async {
|
}) async {
|
||||||
final res = await apiProvider.isFaceAuthentication(countryCode, account);
|
final res = await apiProvider.keyCheckFace(countryCode, account);
|
||||||
return AdvancedFunctionRecordEntity.fromJson(res.body);
|
return AdvancedFunctionRecordEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user