44 lines
992 B
Dart
Raw Normal View History

2023-09-07 18:36:16 +08:00
import 'package:star_lock/tools/baseGetXController.dart';
import '../../../../network/api_repository.dart';
2023-09-07 18:36:16 +08:00
import 'diagnose_state.dart';
class DiagnoseLogic extends BaseGetXController{
DiagnoseState state = DiagnoseState();
// 诊断
Future<void> setLockDiagnose() async{
var entity = await ApiRepository.to.setLockDiagnoseData(
2023-11-01 17:28:59 +08:00
lockId: state.lockSetInfoData.value.lockId.toString(),
electricQuantity:"23",
firmwareRevision:"1.0", // 1-开启、2-关闭;
hardwareRevision:"1.3", // 4 重置键开关
lockDate:"1689410557000",
modelNum:"123456",
pwdInfo:"123456",
timestamp:"1689410559456000",
);
if(entity.errorCode!.codeIsSuccessful){
2024-01-16 16:52:05 +08:00
showToast("操作成功");
}
}
@override
void onReady() {
// TODO: implement onReady
super.onReady();
}
@override
void onInit() {
// TODO: implement onInit
super.onInit();
}
@override
void onClose() {
// TODO: implement onClose
}
2023-09-07 18:36:16 +08:00
}