44 lines
992 B
Dart
Executable File
44 lines
992 B
Dart
Executable File
|
|
import 'package:star_lock/tools/baseGetXController.dart';
|
|
|
|
import '../../../../network/api_repository.dart';
|
|
import 'diagnose_state.dart';
|
|
|
|
class DiagnoseLogic extends BaseGetXController{
|
|
DiagnoseState state = DiagnoseState();
|
|
|
|
// 诊断
|
|
Future<void> setLockDiagnose() async{
|
|
var entity = await ApiRepository.to.setLockDiagnoseData(
|
|
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){
|
|
showToast("操作成功");
|
|
}
|
|
}
|
|
|
|
@override
|
|
void onReady() {
|
|
// TODO: implement onReady
|
|
super.onReady();
|
|
}
|
|
|
|
@override
|
|
void onInit() {
|
|
// TODO: implement onInit
|
|
super.onInit();
|
|
}
|
|
|
|
@override
|
|
void onClose() {
|
|
// TODO: implement onClose
|
|
}
|
|
|
|
} |