fix: 修复蓝牙记录问题
This commit is contained in:
parent
c36fb4b27e
commit
9ea328968a
@ -138,9 +138,8 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
privateKey: getPrivateKeyList,
|
privateKey: getPrivateKeyList,
|
||||||
).toString();
|
).toString();
|
||||||
|
|
||||||
showEasyLoading();
|
showBlueConnetctToastTimer(isShowBlueConnetctToast:false, action: () async {
|
||||||
showBlueConnetctToastTimer(action: () async {
|
cancelBlueConnetctToastTimer();
|
||||||
dismissEasyLoading();
|
|
||||||
|
|
||||||
final String getMobile = (await Storage.getMobile())!;
|
final String getMobile = (await Storage.getMobile())!;
|
||||||
UmengCommonSdk.onEvent('check_doorLockLog', {
|
UmengCommonSdk.onEvent('check_doorLockLog', {
|
||||||
@ -156,10 +155,8 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
eventStr: '查询锁记录事件超时',
|
eventStr: '查询锁记录事件超时',
|
||||||
upload: true
|
upload: true
|
||||||
);
|
);
|
||||||
|
|
||||||
});
|
});
|
||||||
BlueManage().blueSendData(BlueManage().connectDeviceName,
|
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState connectionStateState) async {
|
||||||
(BluetoothConnectionState connectionStateState) async {
|
|
||||||
if (connectionStateState == BluetoothConnectionState.connected) {
|
if (connectionStateState == BluetoothConnectionState.connected) {
|
||||||
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
@ -182,9 +179,7 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
publicKey: getPublicKeyList,
|
publicKey: getPublicKeyList,
|
||||||
privateKey: getPrivateKeyList,
|
privateKey: getPrivateKeyList,
|
||||||
);
|
);
|
||||||
} else if (connectionStateState ==
|
} else if (connectionStateState == BluetoothConnectionState.disconnected) {
|
||||||
BluetoothConnectionState.disconnected) {
|
|
||||||
dismissEasyLoading();
|
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
|
|
||||||
final String getMobile = (await Storage.getMobile())!;
|
final String getMobile = (await Storage.getMobile())!;
|
||||||
@ -201,9 +196,6 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
eventStr: '查询锁记录事件断开连接',
|
eventStr: '查询锁记录事件断开连接',
|
||||||
upload: true
|
upload: true
|
||||||
);
|
);
|
||||||
if (state.ifCurrentScreen.value == true) {
|
|
||||||
showBlueConnetctToast();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -254,6 +246,7 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
.millisecondsSinceEpoch;
|
.millisecondsSinceEpoch;
|
||||||
|
|
||||||
pageNo = 1;
|
pageNo = 1;
|
||||||
|
AppLog.log('_getDoorLockLogListRefreshUIAction');
|
||||||
mockNetworkDataRequest(isRefresh: true);
|
mockNetworkDataRequest(isRefresh: true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -336,9 +329,10 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
// 获取是否是演示模式 演示模式不获取接口
|
// 获取是否是演示模式 演示模式不获取接口
|
||||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
|
mockNetworkDataRequest(isRefresh: true);
|
||||||
|
|
||||||
getLockRecordLastUploadDataTime();
|
getLockRecordLastUploadDataTime();
|
||||||
_initReplySubscription();
|
_initReplySubscription();
|
||||||
mockNetworkDataRequest(isRefresh: true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -124,7 +124,7 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
|
|||||||
switch (value) {
|
switch (value) {
|
||||||
case '读取记录':
|
case '读取记录':
|
||||||
{
|
{
|
||||||
logic.mockNetworkDataRequest(isRefresh: true);
|
logic.getLockRecordLastUploadDataTime();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case '清空记录':
|
case '清空记录':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user