修改测试部门提出bug

This commit is contained in:
魏少阳 2024-07-27 14:36:35 +08:00
parent d4c37f9f4a
commit 6505ec535a
16 changed files with 202 additions and 193 deletions

View File

@ -15,6 +15,7 @@ class SenderReferEventRecordTimeCommand extends SenderProtocol {
String? userID;
int? logsCount;
int? time;
int? currentDate;
List<int>? token;
int? needAuthor;
List<int>? publicKey;
@ -25,6 +26,7 @@ class SenderReferEventRecordTimeCommand extends SenderProtocol {
this.userID,
this.logsCount,
this.time,
this.currentDate,
this.token,
this.needAuthor,
this.publicKey,
@ -34,7 +36,7 @@ class SenderReferEventRecordTimeCommand extends SenderProtocol {
@override
String toString() {
return 'SenderReferEventRecordTimeCommand{keyID: $keyID, '
'userID: $userID, logsCount: $logsCount, time:$time timeStr: ${DateTool().dateIntToYMDHNString(time)}, '
'userID: $userID, logsCount: $logsCount, time:$time timeStr: ${DateTool().dateIntToYMDHNString(time)}, currentDate: ${DateTool().dateIntToYMDHNString(time)}'
'token: $token, needAuthor: $needAuthor, publicKey: $publicKey, '
'privateKey: $privateKey}';
}
@ -74,7 +76,13 @@ class SenderReferEventRecordTimeCommand extends SenderProtocol {
subData.add((time! & 0xff000000) >> 24);
subData.add((time! & 0xff0000) >> 16);
subData.add((time! & 0xff00) >> 8);
subData.add((time! & 0xff));
subData.add(time! & 0xff);
// currentDate
subData.add((currentDate! & 0xff000000) >> 24);
subData.add((currentDate! & 0xff0000) >> 16);
subData.add((currentDate! & 0xff00) >> 8);
subData.add(currentDate! & 0xff);
// token
// subData.addAll(token!);
@ -107,7 +115,7 @@ class SenderReferEventRecordTimeCommand extends SenderProtocol {
data.addAll(subData);
if ((data.length % 16) != 0) {
int add = (16 - data.length % 16);
int add = 16 - data.length % 16;
for (int i = 0; i < add; i++) {
data.add(0);
}

View File

@ -816,6 +816,7 @@ class IoSenderManage {
required String? userID,
required int? logsCount,
required int? time,
required int? currentDate,
required List<int>? token,
required int? needAuthor,
required List<int>? publicKey,

View File

@ -59,19 +59,15 @@ class DoorLockLogLogic extends BaseGetXController {
// AppLog.log("indexList:$indexList");
final Map indexMap = {};
indexMap['type'] = indexList[0].toString();
const int operateDate = 0;
// if (indexList[0] == 2) {
final int userNo = (indexList[1] * 256) + indexList[2];
indexMap['user'] = userNo.toString();
AppLog.log('userNouserNouserNouserNo:$userNo');
final List<int> passwordData = indexList.sublist(7, 17);
final String password = utf8String(passwordData);
indexMap['password'] = password.toString();
AppLog.log('passwordpasswordpassword:$password');
// } else {
// final int userNo = (indexList[1] * 256) + indexList[2];
// indexMap['user'] = userNo.toString();
// }
final int userNo = (indexList[1] * 256) + indexList[2];
indexMap['user'] = userNo.toString();
// AppLog.log('userNouserNouserNouserNo:$userNo');
final List<int> passwordData = indexList.sublist(7, 17);
final String password = utf8String(passwordData);
indexMap['password'] = password.toString();
// AppLog.log('passwordpasswordpassword:$password');
indexMap['success'] = '1';
@ -81,17 +77,13 @@ class DoorLockLogLogic extends BaseGetXController {
(0xFF & indexList[6]);
indexMap['date'] = '${time * 1000}';
uploadList.add(indexMap);
if (i == getList.length - 1) {
//
state.operateDate = operateDate;
}
}
lockRecordUploadData(uploadList);
if (dataLength == state.logCountPage) {
state.ifHaveNext = true;
} else {
state.ifHaveNext = false;
}
lockRecordUploadData(uploadList);
}
break;
case 0x06:
@ -110,8 +102,7 @@ class DoorLockLogLogic extends BaseGetXController {
showBlueConnetctToastTimer(action: () {
dismissEasyLoading();
});
BlueManage().blueSendData(BlueManage().connectDeviceName,
(BluetoothConnectionState connectionStateState) async {
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState connectionStateState) async {
if (connectionStateState == BluetoothConnectionState.connected) {
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
final List<int> getPrivateKeyList =
@ -130,6 +121,7 @@ class DoorLockLogLogic extends BaseGetXController {
logsCount: state.logCountPage,
// time:DateTime.now().millisecondsSinceEpoch~/1000,
time: state.operateDate,
currentDate: state.currentDate,
token: getTokenList,
needAuthor: 1,
publicKey: getPublicKeyList,
@ -202,6 +194,7 @@ class DoorLockLogLogic extends BaseGetXController {
lockId: state.keyInfos.value.lockId.toString());
if (entity.errorCode!.codeIsSuccessful) {
state.operateDate = entity.data!.operateDate! ~/ 1000;
state.currentDate = entity.data!.currentDate! ~/ 1000;
senderReferEventRecordTime();
}
}

View File

@ -63,6 +63,7 @@ class DoorLockLogState {
RxBool ifCurrentScreen = true.obs; // ,
int operateDate = 0; //
int currentDate = 0; // UTC毫秒时间戳
bool ifHaveNext = false; //
int logCountPage = 10; //
Rx<DateTime> currentSelectDate = DateTime.now().obs;

View File

@ -51,10 +51,10 @@ class LockDetailLogic extends BaseGetXController {
}
//
if (reply is SenderReferEventRecordTimeReply &&
state.ifCurrentScreen.value == true) {
_replyReferEventRecordTime(reply);
}
// if (reply is SenderReferEventRecordTimeReply &&
// state.ifCurrentScreen.value == true) {
// _replyReferEventRecordTime(reply);
// }
});
}
@ -255,71 +255,71 @@ class LockDetailLogic extends BaseGetXController {
}
//
Future<void> _replyReferEventRecordTime(Reply reply) async {
final int status = reply.data[2];
switch (status) {
case 0x00:
//
final int dataLength = (reply.data[5] << 8) + reply.data[6];
AppLog.log('dataLength:$dataLength');
if (dataLength > 0) {
reply.data.removeRange(0, 7);
// 17
if (reply.data.length < 17) {
return;
}
final List<List<int>> getList = splitList(reply.data, 17);
AppLog.log('getList:$getList');
final List uploadList = [];
for (int i = 0; i < getList.length; i++) {
final List<int> indexList = getList[i];
AppLog.log('indexList:$indexList');
final Map indexMap = {};
indexMap['type'] = indexList[0].toString();
int operateDate = 0;
// if (indexList[0] == 2) {
final List<int> passwordData = indexList.sublist(7, 17);
final String password = utf8String(passwordData);
AppLog.log('passwordData:$passwordData password:$password');
indexMap['user'] = password.toString();
// } else {
// final int userNo = (indexList[1] * 256) + indexList[2];
// indexMap['user'] = userNo.toString();
// }
indexMap['success'] = '1';
final int time = (0xff & indexList[3]) << 24 |
(0xff & indexList[4]) << 16 |
(0xff & indexList[5]) << 8 |
(0xFF & indexList[6]);
operateDate = time * 1000;
indexMap['date'] = '$operateDate';
uploadList.add(indexMap);
if (i == getList.length - 1) {
//
state.operateDate = operateDate;
}
}
lockRecordUploadData(uploadList);
if (dataLength == state.logCountPage) {
senderReferEventRecordTime();
} else {
await blueManageDisconnect();
}
}
break;
case 0x06:
//
blueManageDisconnect();
break;
default:
blueManageDisconnect();
break;
}
}
// Future<void> _replyReferEventRecordTime(Reply reply) async {
// final int status = reply.data[2];
// switch (status) {
// case 0x00:
// //
// final int dataLength = (reply.data[5] << 8) + reply.data[6];
// AppLog.log('dataLength:$dataLength');
// if (dataLength > 0) {
// reply.data.removeRange(0, 7);
// // 17
// if (reply.data.length < 17) {
// return;
// }
// final List<List<int>> getList = splitList(reply.data, 17);
// AppLog.log('getList:$getList');
// final List uploadList = [];
// for (int i = 0; i < getList.length; i++) {
// final List<int> indexList = getList[i];
// AppLog.log('indexList:$indexList');
// final Map indexMap = {};
// indexMap['type'] = indexList[0].toString();
// int operateDate = 0;
// // if (indexList[0] == 2) {
// final List<int> passwordData = indexList.sublist(7, 17);
// final String password = utf8String(passwordData);
// AppLog.log('passwordData:$passwordData password:$password');
// indexMap['user'] = password.toString();
// // } else {
// // final int userNo = (indexList[1] * 256) + indexList[2];
// // indexMap['user'] = userNo.toString();
// // }
//
// indexMap['success'] = '1';
//
// final int time = (0xff & indexList[3]) << 24 |
// (0xff & indexList[4]) << 16 |
// (0xff & indexList[5]) << 8 |
// (0xFF & indexList[6]);
// operateDate = time * 1000;
// indexMap['date'] = '$operateDate';
// uploadList.add(indexMap);
//
// if (i == getList.length - 1) {
// //
// state.operateDate = operateDate;
// }
// }
// lockRecordUploadData(uploadList);
//
// if (dataLength == state.logCountPage) {
// senderReferEventRecordTime();
// } else {
// await blueManageDisconnect();
// }
// }
// break;
// case 0x06:
// //
// blueManageDisconnect();
// break;
// default:
// blueManageDisconnect();
// break;
// }
// }
//
Future<void> openDoorAction() async {
@ -375,42 +375,42 @@ class LockDetailLogic extends BaseGetXController {
}
// ()
void senderReferEventRecordTime() {
showBlueConnetctToastTimer(
isShowBlueConnetctToast: false,
action: () {
blueManageDisconnect();
});
BlueManage().blueSendData(BlueManage().connectDeviceName,
(BluetoothConnectionState connectionState) async {
if (connectionState == BluetoothConnectionState.connected) {
final List<String>? privateKey =
await Storage.getStringList(saveBluePrivateKey);
final List<int> getPrivateKeyList =
changeStringListToIntList(privateKey!);
final List<String>? token = await Storage.getStringList(saveBlueToken);
final List<int> getTokenList = changeStringListToIntList(token!);
final List<String>? publicKey =
await Storage.getStringList(saveBluePublicKey);
final List<int> getPublicKeyList =
changeStringListToIntList(publicKey!);
IoSenderManage.senderReferEventRecordTimeCommand(
keyID: BlueManage().connectDeviceName,
userID: await Storage.getUid(),
logsCount: state.logCountPage,
// time:DateTime.now().millisecondsSinceEpoch~/1000,
time: state.operateDate,
token: getTokenList,
needAuthor: 1,
publicKey: getPublicKeyList,
privateKey: getPrivateKeyList,
);
}
});
}
// void senderReferEventRecordTime() {
// showBlueConnetctToastTimer(
// isShowBlueConnetctToast: false,
// action: () {
// blueManageDisconnect();
// });
// BlueManage().blueSendData(BlueManage().connectDeviceName,
// (BluetoothConnectionState connectionState) async {
// if (connectionState == BluetoothConnectionState.connected) {
// final List<String>? privateKey =
// await Storage.getStringList(saveBluePrivateKey);
// final List<int> getPrivateKeyList =
// changeStringListToIntList(privateKey!);
//
// final List<String>? token = await Storage.getStringList(saveBlueToken);
// final List<int> getTokenList = changeStringListToIntList(token!);
//
// final List<String>? publicKey =
// await Storage.getStringList(saveBluePublicKey);
// final List<int> getPublicKeyList =
// changeStringListToIntList(publicKey!);
//
// IoSenderManage.senderReferEventRecordTimeCommand(
// keyID: BlueManage().connectDeviceName,
// userID: await Storage.getUid(),
// logsCount: state.logCountPage,
// // time:DateTime.now().millisecondsSinceEpoch~/1000,
// time: state.operateDate,
// token: getTokenList,
// needAuthor: 1,
// publicKey: getPublicKeyList,
// privateKey: getPrivateKeyList,
// );
// }
// });
// }
//
Future<void> getServerDatetime() async {
@ -468,15 +468,15 @@ class LockDetailLogic extends BaseGetXController {
}
//
Future<void> getLockRecordLastUploadDataTime() async {
final LockOperatingRecordGetLastRecordTimeEntity entity =
await ApiRepository.to.getLockRecordLastUploadDataTime(
lockId: state.keyInfos.value.lockId.toString());
if (entity.errorCode!.codeIsSuccessful) {
state.operateDate = entity.data!.operateDate! ~/ 1000;
senderReferEventRecordTime();
}
}
// Future<void> getLockRecordLastUploadDataTime() async {
// final LockOperatingRecordGetLastRecordTimeEntity entity =
// await ApiRepository.to.getLockRecordLastUploadDataTime(
// lockId: state.keyInfos.value.lockId.toString());
// if (entity.errorCode!.codeIsSuccessful) {
// state.operateDate = entity.data!.operateDate! ~/ 1000;
// senderReferEventRecordTime();
// }
// }
//
Future<void> lockRecordUploadData(List list) async {

View File

@ -1,8 +1,4 @@
class LockOperatingRecordGetLastRecordTimeEntity {
int? errorCode;
String? description;
String? errorMsg;
Data? data;
LockOperatingRecordGetLastRecordTimeEntity(
{this.errorCode, this.description, this.errorMsg, this.data});
@ -13,6 +9,10 @@ class LockOperatingRecordGetLastRecordTimeEntity {
errorMsg = json['errorMsg'];
data = json['data'] != null ? Data.fromJson(json['data']) : null;
}
int? errorCode;
String? description;
String? errorMsg;
Data? data;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
@ -27,20 +27,22 @@ class LockOperatingRecordGetLastRecordTimeEntity {
}
class Data {
String? lockId;
int? operateDate;
Data({this.lockId, this.operateDate});
Data({this.lockId, this.operateDate, this.currentDate});
Data.fromJson(Map<String, dynamic> json) {
lockId = json['lockId'];
operateDate = json['operateDate'];
currentDate = json['currentDate'];
}
String? lockId;
int? operateDate;
int? currentDate;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['lockId'] = lockId;
data['operateDate'] = operateDate;
data['currentDate'] = currentDate;
return data;
}
}

View File

@ -43,30 +43,28 @@ class LockOperatingRecordLogic extends BaseGetXController {
if (dataLength > 0) {
reply.data.removeRange(0, 7);
// 8
if(reply.data.length < 17){
if (reply.data.length < 17) {
return;
}
final List<List<int>> getList = splitList(reply.data, 17);
AppLog.log('getList:$getList');
// AppLog.log("getList:$getList");
final List uploadList = [];
for (int i = 0; i < getList.length; i++) {
final List<int> indexList = getList[i];
AppLog.log('indexList:$indexList');
// AppLog.log("indexList:$indexList");
final Map indexMap = {};
indexMap['type'] = indexList[0].toString();
// if(indexList[0] == 2){
final int userNo = (indexList[1] * 256) + indexList[2];
indexMap['user'] = userNo.toString();
AppLog.log('userNouserNouserNouserNo:$userNo');
final List<int> passwordData = indexList.sublist(7, 17);
final String password = utf8String(passwordData);
indexMap['password'] = password.toString();
AppLog.log('passwordpasswordpassword:$password');
// }else{
// final int userNo = (indexList[1]*256) + indexList[2];
// indexMap['user'] = userNo.toString();
// }
final int userNo = (indexList[1] * 256) + indexList[2];
indexMap['user'] = userNo.toString();
AppLog.log('userNouserNouserNouserNo:$userNo');
final List<int> passwordData = indexList.sublist(7, 17);
final String password = utf8String(passwordData);
indexMap['password'] = password.toString();
AppLog.log('passwordpasswordpassword:$password');
indexMap['success'] = '1';
@ -77,11 +75,12 @@ class LockOperatingRecordLogic extends BaseGetXController {
indexMap['date'] = '${time * 1000}';
uploadList.add(indexMap);
}
lockRecordUploadData(uploadList);
if(dataLength == state.logCountPage){
if (dataLength == state.logCountPage) {
state.ifHaveNext = true;
} else {
state.ifHaveNext = false;
}
lockRecordUploadData(uploadList);
}
break;
case 0x06:
@ -117,6 +116,7 @@ class LockOperatingRecordLogic extends BaseGetXController {
logsCount: state.logCountPage,
// time:DateTime.now().millisecondsSinceEpoch~/1000,
time: state.operateDate,
currentDate: state.currentDate,
token: getTokenList,
needAuthor: 1,
publicKey: getPublicKeyList,
@ -164,18 +164,19 @@ class LockOperatingRecordLogic extends BaseGetXController {
}
//
void getLockRecordLastUploadDataTime() async {
Future<void> getLockRecordLastUploadDataTime() async {
final LockOperatingRecordGetLastRecordTimeEntity entity = await ApiRepository.to
.getLockRecordLastUploadDataTime(
lockId: CommonDataManage().currentKeyInfo.lockId.toString());
if (entity.errorCode!.codeIsSuccessful) {
state.operateDate = entity.data!.operateDate! ~/ 1000;
state.currentDate = entity.data!.currentDate! ~/ 1000;
senderReferEventRecordTime();
}
}
//
void lockRecordUploadData(List list) async {
Future<void> lockRecordUploadData(List list) async {
final KeyOperationRecordEntity entity = await ApiRepository.to
.lockRecordUploadData(lockId: CommonDataManage().currentKeyInfo.lockId.toString(), records: list);
if (entity.errorCode!.codeIsSuccessful) {
@ -189,7 +190,7 @@ class LockOperatingRecordLogic extends BaseGetXController {
}
//
void clearOperationRecordRequest() async {
Future<void> clearOperationRecordRequest() async {
final KeyOperationRecordEntity entity = await ApiRepository.to.clearOperationRecord(CommonDataManage().currentKeyInfo.lockId.toString());
if (entity.errorCode!.codeIsSuccessful) {
showToast('清除数据成功', something: (){
@ -201,7 +202,6 @@ class LockOperatingRecordLogic extends BaseGetXController {
@override
Future<void> onReady() async {
// TODO: implement onReady
super.onReady();
//
@ -230,7 +230,6 @@ class LockOperatingRecordLogic extends BaseGetXController {
@override
Future<void> onClose() async {
// TODO: implement onClose
super.onClose();
//

View File

@ -26,6 +26,7 @@ class LockOperatingRecordState { // 记录名称
RxBool ifCurrentScreen = true.obs; // ,
int operateDate = 0; //
int currentDate = 0; // UTC毫秒时间戳
bool ifHaveNext = false; //
int logCountPage = 10; //
String idStr = ''; //

View File

@ -11,6 +11,7 @@ import '../../../../../tools/dateTool.dart';
import '../../../../../tools/submitBtn.dart';
import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.dart';
import '../../lockSet/lockSetInfo_entity.dart';
import 'uploadElectricQuantity_logic.dart';
class UploadElectricQuantityPage extends StatefulWidget {
@ -61,7 +62,7 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
],
)),
Visibility(
visible: state.lockSetInfoData.value.lockFeature!.isSupportBackupBattery == 1,
visible: (state.lockSetInfoData.value.lockFeature ?? LockFeature()).isSupportBackupBattery == 1,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[

View File

@ -513,7 +513,6 @@ class LockSetLogic extends BaseGetXController {
//
StreamSubscription? _passCurrentLockInformationEvent;
void initLoadDataAction(BlockSetStateCallback blockSetStateCallback) {
// eventBus
_passCurrentLockInformationEvent = eventBus
@ -527,22 +526,21 @@ class LockSetLogic extends BaseGetXController {
final String content = showContent!.isEmpty
? "${"删除设备失败,请确保在设备附近,设备未被连接,设备已打开".tr}${BlueManage().connectDeviceName!.contains("T9A") == true ? "。如果是全自动锁,请使屏幕变亮".tr : ""}"
: showContent;
ShowTipView().showSureAlertDialog(content);
state.showTipView.showSureAlertDialog(content);
}
///
void deleyLockLogicOfRoles() {
if (state.lockBasicInfo.value.isLockOwner == 1) {
//
ShowTipView().showIosTipWithContentDialog('删除锁后,所有信息都会一起删除,确定删除锁吗?'.tr,
() {
state.showTipView.showIosTipWithContentDialog('删除锁后,所有信息都会一起删除,确定删除锁吗?'.tr, () {
//
ShowTipView().showTFViewAlertDialog(
state.passwordTF, '请输入登录密码'.tr, '请输入登录密码'.tr, checkLoginPassword);
state.showTipView.resetGetController();
state.showTipView.showTFViewAlertDialog(state.passwordTF, '请输入登录密码'.tr, '请输入登录密码'.tr, checkLoginPassword);
});
} else if (state.lockBasicInfo.value.keyRight == 1) {
//
ShowTipView().showDeleteAdministratorIsHaveAllDataDialog(
state.showTipView.showDeleteAdministratorIsHaveAllDataDialog(
'同时删除其发送的所有钥匙,钥匙删除后不能恢复'.tr, (bool a) {
//
state.deleteAdministratorIsHaveAllData.value = a;
@ -550,7 +548,7 @@ class LockSetLogic extends BaseGetXController {
});
} else {
//
ShowTipView().showIosTipWithContentDialog('是否删除钥匙?'.tr, deletKeyData);
state.showTipView.showIosTipWithContentDialog('是否删除钥匙?'.tr, deletKeyData);
}
}

View File

@ -27,8 +27,7 @@ class LockSetPage extends StatefulWidget {
State<LockSetPage> createState() => _LockSetPageState();
}
class _LockSetPageState extends State<LockSetPage>
with WidgetsBindingObserver, RouteAware {
class _LockSetPageState extends State<LockSetPage> with WidgetsBindingObserver, RouteAware {
final LockSetLogic logic = Get.put(LockSetLogic());
final LockSetState state = Get.find<LockSetLogic>().state;

View File

@ -2,6 +2,7 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../../tools/showTipView.dart';
import 'lockSetInfo_entity.dart';
class LockSetState {
@ -29,6 +30,7 @@ class LockSetState {
RxBool deleteAdministratorIsHaveAllData = false.obs; //
RxInt sureBtnState = 0.obs;// 0() 1()
final ShowTipView showTipView = ShowTipView();
LockSetState() {
Map map = Get.arguments;
lockId.value = map['lockId'];

View File

@ -162,7 +162,7 @@ class RemoteControlListLogic extends BaseGetXController{
return entity;
}
// IC卡
//
Future<void> resetRemoteControlData() async {
final LoginEntity entity = await ApiRepository.to.resetRemoteControlData(
lockId: state.lockId.value
@ -181,7 +181,7 @@ class RemoteControlListLogic extends BaseGetXController{
);
if (entity.errorCode!.codeIsSuccessful) {
showToast('删除成功'.tr, something: () {
Get.back(result: 'addScuess');
getRemoteControlListData(isRefresh: true);
});
}
}

View File

@ -30,6 +30,7 @@ class LockListLogic extends BaseGetXController {
LockListState state = LockListState();
List<GroupList> _groupDataList = <GroupList>[];
LockListInfoGroupEntity? entity;
final ShowTipView showTipView = ShowTipView();
List<GroupList> get groupDataList {
@ -180,23 +181,22 @@ class LockListLogic extends BaseGetXController {
void deleyLockLogicOfRoles() {
if (state.lockListInfoItemEntity.isLockOwner == 1) {
//
ShowTipView().showIosTipWithContentDialog('删除锁后,所有信息都会一起删除,确定删除锁吗?'.tr,
() {
showTipView.showIosTipWithContentDialog('删除锁后,所有信息都会一起删除,确定删除锁吗?'.tr, () {
//
ShowTipView().showTFViewAlertDialog(
state.passwordTF, '请输入登录密码'.tr, '请输入登录密码'.tr, checkLoginPassword);
AppLog.log('调用了删除锁');
showTipView.resetGetController();
showTipView.showTFViewAlertDialog(state.passwordTF, '请输入登录密码'.tr, '请输入登录密码'.tr, checkLoginPassword);
});
} else if (state.lockListInfoItemEntity.keyRight == 1) {
//
ShowTipView().showDeleteAdministratorIsHaveAllDataDialog(
'同时删除其发送的所有钥匙,钥匙删除后不能恢复'.tr, (bool a) {
showTipView.showDeleteAdministratorIsHaveAllDataDialog('同时删除其发送的所有钥匙,钥匙删除后不能恢复'.tr, (bool a) {
//
state.deleteAdministratorIsHaveAllData.value = a;
deletKeyData();
});
} else {
//
ShowTipView().showIosTipWithContentDialog('是否删除钥匙?'.tr, deletKeyData);
showTipView.showIosTipWithContentDialog('是否删除钥匙?'.tr, deletKeyData);
}
}

View File

@ -179,8 +179,7 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
}
})),
CommonItem(
leftTitel:
TranslationLoader.lanKeys!.resetPasswords!.tr,
leftTitel: '重置密码'.tr,
rightTitle: '',
isHaveLine: true,
isHaveDirection: true,

View File

@ -94,10 +94,12 @@ class ShowTipView {
);
}
TextEditingController getController = TextEditingController();
void showTFViewAlertDialog(TextEditingController controller, String title,
String tipTitle, Function sureClick,
{List<TextInputFormatter>? inputFormatters, bool? isShowSuffixIcon}) {
//
getController = controller;
showDialog(
context: Get.context!,
builder: (BuildContext context) {
@ -108,7 +110,6 @@ class ShowTipView {
controller: controller,
isShowSuffixIcon: isShowSuffixIcon ?? false,
sureClick: () {
//
if (controller.text.isEmpty) {
EasyLoading.showToast(tipTitle, duration: 2000.milliseconds);
return;
@ -124,6 +125,10 @@ class ShowTipView {
);
}
void resetGetController(){
getController.text = '';
}
//
void showSureBtnTipsAlert(
{required String tipsText, required String sureText}) {