鸿蒙手机-图传锁-首次配置wifi的KeyId问题
This commit is contained in:
parent
780ae8ccd2
commit
361a4c441e
@ -1,5 +1,6 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:star_lock/blue/entity/lock_user_no_list_entity.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_cleanUpUsers.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
@ -276,6 +277,12 @@ class SenderBeforeDataManage {
|
||||
|
||||
// 普通用户接收电子钥匙之后 更新锁用户NO
|
||||
Future<void> _updateLockUserNo(List<int> dataList) async {
|
||||
// 使用空值感知操作符安全访问 keyId
|
||||
final String? keyId = CommonDataManage().currentKeyInfo.keyId?.toString();
|
||||
if (keyId == null) {
|
||||
debugPrint('keyId获取失败');
|
||||
return;
|
||||
}
|
||||
final LockNetTokenEntity entity = await ApiRepository.to.updateLockUserNo(
|
||||
keyId: CommonDataManage().currentKeyInfo.keyId.toString(), lockUserNo: CommonDataManage().currentKeyInfo.lockUserNo.toString());
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user