Merge branch 'develop_liyi' of code-internal.star-lock.cn:StarlockTeam/app-starlock into develop_liyi

This commit is contained in:
“DaisyWu” 2025-03-03 09:34:06 +08:00
commit 46fa893f7a
5 changed files with 32 additions and 32 deletions

View File

@ -824,8 +824,8 @@ class LockDetailLogic extends BaseGetXController {
recordEndTime: 0,
recordMode: 0,
recordStartTime: 0,
recordTime: 0,
detectionDistance: 0)));
recordTime: '0',
detectionDistance: '0')));
}
state.keyInfos.value.lockSetting!.catEyeConfig![0].catEyeMode = event
.lockSetInfoData.lockSettingInfo!.catEyeConfig![0].catEyeMode ??

View File

@ -250,8 +250,8 @@ class CatEyeSetLogic extends BaseGetXController {
recordEndTime: 0,
recordMode: 0,
recordStartTime: 0,
recordTime: 0,
detectionDistance: 0)));
recordTime: '0',
detectionDistance: '0')));
}
state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0].catEyeMode =
state.catEyeConfig.value.catEyeMode;
@ -271,15 +271,16 @@ class CatEyeSetLogic extends BaseGetXController {
.catEyeConfig![0]
.catEyeModeConfig
?.recordEndTime = state.catEyeConfig.value.recordEndTime;
state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0]
.catEyeModeConfig?.recordTime = state.catEyeConfig.value.recordTime;
state
.lockSetInfoData
.value
.lockSettingInfo!
.catEyeConfig![0]
.catEyeModeConfig
?.detectionDistance = state.catEyeConfig.value.detectionDistance;
?.recordTime = state.catEyeConfig.value.recordTime.toString();
state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0]
.catEyeModeConfig?.detectionDistance =
state.catEyeConfig.value.detectionDistance.toString();
state
.lockSetInfoData
.value

View File

@ -88,13 +88,13 @@ class CatEyeSetState {
.catEyeConfig![0].catEyeModeConfig!.recordStartTime!);
recordEndTime = _handleTimeToM(lockSetInfoData.value.lockSettingInfo!
.catEyeConfig![0].catEyeModeConfig!.recordEndTime!);
recordTime = lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0]
.catEyeModeConfig!.recordTime!;
recordTime = int.parse(lockSetInfoData.value.lockSettingInfo!
.catEyeConfig![0].catEyeModeConfig!.recordTime!);
if (lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0]!
.catEyeModeConfig!.detectionDistance !=
null) {
detectionDistance = lockSetInfoData.value.lockSettingInfo!
.catEyeConfig![0].catEyeModeConfig!.detectionDistance!;
detectionDistance = int.parse(lockSetInfoData.value.lockSettingInfo!
.catEyeConfig![0].catEyeModeConfig!.detectionDistance!);
}
realTimeMode = lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0]
.catEyeModeConfig!.realTimeMode!;

View File

@ -717,21 +717,21 @@ class CatEyeModeConfig {
// JSON
factory CatEyeModeConfig.fromJson(Map<String, dynamic> json) {
return CatEyeModeConfig(
recordMode: json['recordMode']?.toInt(),
recordTime: json['recordTime']?.toInt(),
realTimeMode: json['realTimeMode']?.toInt(),
recordEndTime: json['recordEndTime']?.toInt(),
recordStartTime: json['recordStartTime']?.toInt(),
detectionDistance: json['detectionDistance']?.toInt(),
recordMode: json['recordMode'] != null ? int.tryParse(json['recordMode'].toString()) : null,
recordTime: json['recordTime'],
realTimeMode: json['realTimeMode'] != null ? int.tryParse(json['realTimeMode'].toString()) : null,
recordEndTime: json['recordEndTime'] != null ? int.tryParse(json['recordEndTime'].toString()) : null,
recordStartTime: json['recordStartTime'] != null ? int.tryParse(json['recordStartTime'].toString()) : null,
detectionDistance: json['detectionDistance'],
);
}
int? recordMode;
int? recordTime;
String? recordTime;
int? realTimeMode;
int? recordEndTime;
int? recordStartTime;
int? detectionDistance;
String? detectionDistance;
// JSON
Map<String, dynamic> toJson() {

View File

@ -325,7 +325,6 @@ class NetworkInfo {
}
}
class Bluetooth {
Bluetooth(
{this.bluetoothDeviceId,
@ -447,8 +446,8 @@ class LockSetting {
// catEyeConfig
catEyeConfig: json['catEyeConfig'] != null
? (json['catEyeConfig'] as List)
.map((item) => CatEyeConfig.fromJson(item))
.toList()
.map((item) => CatEyeConfig.fromJson(item))
.toList()
: [],
);
}
@ -473,7 +472,6 @@ class LockSetting {
}
}
// CatEyeConfig
class CatEyeConfig {
CatEyeConfig({
@ -485,7 +483,8 @@ class CatEyeConfig {
factory CatEyeConfig.fromJson(Map<String, dynamic> json) {
return CatEyeConfig(
catEyeMode: json['catEyeMode']?.toInt() ?? 0,
catEyeModeConfig: CatEyeModeConfig.fromJson(json['catEyeModeConfig'] ?? {}),
catEyeModeConfig:
CatEyeModeConfig.fromJson(json['catEyeModeConfig'] ?? {}),
);
}
@ -515,21 +514,21 @@ class CatEyeModeConfig {
// JSON
factory CatEyeModeConfig.fromJson(Map<String, dynamic> json) {
return CatEyeModeConfig(
recordMode: json['recordMode']?.toInt(),
recordTime: json['recordTime']?.toInt(),
realTimeMode: json['realTimeMode']?.toInt(),
recordEndTime: json['recordEndTime']?.toInt(),
recordStartTime: json['recordStartTime']?.toInt(),
detectionDistance: json['detectionDistance']?.toInt(),
recordMode: json['recordMode'] != null ? int.tryParse(json['recordMode'].toString()) : null,
recordTime: json['recordTime'],
realTimeMode: json['realTimeMode'] != null ? int.tryParse(json['realTimeMode'].toString()) : null,
recordEndTime: json['recordEndTime'] != null ? int.tryParse(json['recordEndTime'].toString()) : null,
recordStartTime: json['recordStartTime'] != null ? int.tryParse(json['recordStartTime'].toString()) : null,
detectionDistance: json['detectionDistance'],
);
}
int? recordMode;
int? recordTime;
String? recordTime;
int? realTimeMode;
int? recordEndTime;
int? recordStartTime;
int? detectionDistance;
String? detectionDistance;
// JSON
Map<String, dynamic> toJson() {