优化半自动锁在操作记录页面的昵称
This commit is contained in:
parent
42a4e88c73
commit
cd9e5da6a0
@ -1,4 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -81,11 +82,18 @@ class DoorLockLogLogic extends BaseGetXController {
|
||||
indexMap['type'] = indexList[0].toString();
|
||||
|
||||
final int userNo = (indexList[1] * 256) + indexList[2];
|
||||
indexMap['user'] = userNo.toString();
|
||||
// AppLog.log('userNouserNouserNouserNo:$userNo');
|
||||
|
||||
final List<int> passwordData = indexList.sublist(7, 17);
|
||||
final String password = utf8String(passwordData);
|
||||
final String password;
|
||||
if(userNo == 65535){
|
||||
//离线密码
|
||||
password = passwordData
|
||||
.map((byte) => byte.toRadixString(16).padLeft(2, '0'))
|
||||
.join('')
|
||||
.replaceAll(RegExp(r'f*$'), '');
|
||||
} else {
|
||||
indexMap['user'] = userNo.toString();
|
||||
password = utf8String(passwordData);
|
||||
}
|
||||
indexMap['password'] = password.toString();
|
||||
// AppLog.log('passwordpasswordpassword:$password');
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user