修改TAPD 优2优bug
This commit is contained in:
parent
4b0d3d13fe
commit
2a66f5e8c5
@ -474,7 +474,7 @@
|
||||
"天后失效": "Days later invalid",
|
||||
"电量更新时间:": "Power update time:",
|
||||
"新增配件": "Add",
|
||||
"请在锁旁边完成第一次开锁": "Please complete the first unlock next to the lock",
|
||||
"钥匙不可用": "Key is not available",
|
||||
"正在开锁中...": "Unlocking...",
|
||||
"你的钥匙": "Your key",
|
||||
"常开模式启动!长按闭锁": "Open mode started! Long press to lock",
|
||||
|
||||
@ -497,7 +497,7 @@
|
||||
"天后失效":"天后失效",
|
||||
"电量更新时间:":"电量更新时间:",
|
||||
"新增配件":"新增配件",
|
||||
"请在锁旁边完成第一次开锁":"请在锁旁边完成第一次开锁",
|
||||
"钥匙不可用":"钥匙不可用",
|
||||
"正在开锁中...":"正在开锁中...",
|
||||
"你的钥匙": "你的钥匙",
|
||||
"常开模式启动!长按闭锁": "常开模式启动!长按闭锁",
|
||||
|
||||
@ -472,7 +472,7 @@
|
||||
"天后失效": "天后失效",
|
||||
"电量更新时间:": "电量更新时间:",
|
||||
"新增配件": "新增配件",
|
||||
"请在锁旁边完成第一次开锁": "请在锁旁边完成第一次开锁",
|
||||
"钥匙不可用": "钥匙不可用",
|
||||
"正在开锁中...": "正在开锁中...",
|
||||
"你的钥匙": "你的钥匙",
|
||||
"常开模式启动!长按闭锁": "常开模式启动!长按闭锁",
|
||||
|
||||
@ -394,6 +394,7 @@ class BlueManage {
|
||||
// 添加这个判断是因为有些苹果设备或者安卓等性能比较好的设备时,添加完锁之后,锁板未改变为已添加状态之前,就进行了蓝牙连接,导致添加完锁就失败,这里进行了判断,如果第一次连接失败,就清除缓存重新扫描连接
|
||||
if(isReconnect == true){
|
||||
AppLog.log('该锁已被重置, 重新发送扫描命令');
|
||||
scanDevices.clear();
|
||||
startScanSingle(deviceName, 15, (List<ScanResult> scanDevices) {
|
||||
_connectDevice(scanDevices, deviceName, connectStateCallBack, isAddEquipment: isAddEquipment, isReconnect: false);
|
||||
});
|
||||
@ -456,10 +457,8 @@ class BlueManage {
|
||||
//循环判断服务
|
||||
for (final BluetoothService service in services) {
|
||||
if (service.uuid == _serviceIdConnect) {
|
||||
for (final BluetoothCharacteristic characteristic
|
||||
in service.characteristics) {
|
||||
if (characteristic.characteristicUuid ==
|
||||
_characteristicIdSubscription) {
|
||||
for (final BluetoothCharacteristic characteristic in service.characteristics) {
|
||||
if (characteristic.characteristicUuid == _characteristicIdSubscription) {
|
||||
_subScribeToCharacteristic(characteristic);
|
||||
bluetoothConnectionState = BluetoothConnectionState.connected;
|
||||
connectStateCallBack(bluetoothConnectionState!);
|
||||
|
||||
@ -1,17 +1,16 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
import 'package:star_lock/blue/blue_manage.dart';
|
||||
import 'package:star_lock/blue/sm4Encipher/sm4.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../io_type.dart';
|
||||
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
|
||||
List<int> publicKeyDataList = [];
|
||||
|
||||
class GetPrivateKeyCommand extends SenderProtocol {
|
||||
@ -45,25 +44,25 @@ class GetPrivateKeyCommand extends SenderProtocol {
|
||||
List<int> ebcData = [];
|
||||
|
||||
// 指令类型
|
||||
int type = commandType!.typeValue;
|
||||
double typeDouble = type / 256;
|
||||
int type1 = typeDouble.toInt();
|
||||
int type2 = type % 256;
|
||||
final int type = commandType!.typeValue;
|
||||
final double typeDouble = type / 256;
|
||||
final int type1 = typeDouble.toInt();
|
||||
final int type2 = type % 256;
|
||||
data.add(type1);
|
||||
data.add(type2);
|
||||
|
||||
// 锁id
|
||||
int lockIDLength = utf8.encode(lockID!).length;
|
||||
final int lockIDLength = utf8.encode(lockID!).length;
|
||||
data.addAll(utf8.encode(lockID!));
|
||||
data = getFixedLengthList(data, 40 - lockIDLength);
|
||||
|
||||
//KeyID 40
|
||||
int keyIDLength = utf8.encode(keyID!).length;
|
||||
final int keyIDLength = utf8.encode(keyID!).length;
|
||||
data.addAll(utf8.encode(keyID!));
|
||||
data = getFixedLengthList(data, 40 - keyIDLength);
|
||||
|
||||
//authUserID 40
|
||||
int authUserIDLength = utf8.encode(authUserID!).length;
|
||||
//authUserID 20
|
||||
final int authUserIDLength = utf8.encode(authUserID!).length;
|
||||
data.addAll(utf8.encode(authUserID!));
|
||||
data = getFixedLengthList(data, 20 - authUserIDLength);
|
||||
|
||||
@ -74,12 +73,12 @@ class GetPrivateKeyCommand extends SenderProtocol {
|
||||
data.add((nowTime! & 0xff000000) >> 24);
|
||||
data.add((nowTime! & 0xff0000) >> 16);
|
||||
data.add((nowTime! & 0xff00) >> 8);
|
||||
data.add((nowTime! & 0xff));
|
||||
data.add(nowTime! & 0xff);
|
||||
|
||||
if (needAuthor == 0) {
|
||||
data.add(0);
|
||||
} else {
|
||||
List<int> authCodeData = [];
|
||||
final List<int> authCodeData = [];
|
||||
|
||||
//authUserID
|
||||
authCodeData.addAll(utf8.encode(authUserID!));
|
||||
@ -94,19 +93,19 @@ class GetPrivateKeyCommand extends SenderProtocol {
|
||||
authCodeData.add((nowTime! & 0xff000000) >> 24);
|
||||
authCodeData.add((nowTime! & 0xff0000) >> 16);
|
||||
authCodeData.add((nowTime! & 0xff00) >> 8);
|
||||
authCodeData.add((nowTime! & 0xff));
|
||||
authCodeData.add(nowTime! & 0xff);
|
||||
|
||||
authCodeData.addAll(publicKeyData!);
|
||||
|
||||
// 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
||||
var authCode = crypto.md5.convert(authCodeData);
|
||||
final authCode = crypto.md5.convert(authCodeData);
|
||||
|
||||
data.add(authCode.bytes.length);
|
||||
data.addAll(authCode.bytes);
|
||||
}
|
||||
|
||||
if ((data.length % 16) != 0) {
|
||||
int add = (16 - data.length % 16);
|
||||
final int add = 16 - data.length % 16;
|
||||
for (int i = 0; i < add; i++) {
|
||||
data.add(0);
|
||||
}
|
||||
@ -114,9 +113,7 @@ class GetPrivateKeyCommand extends SenderProtocol {
|
||||
|
||||
printLog(data);
|
||||
// 拿到数据之后通过LockId进行SM4 ECB加密 key:544d485f633335373034383064613864
|
||||
ebcData = SM4.encrypt(data,
|
||||
key: utf8.encode(BlueManage().connectDeviceName),
|
||||
mode: SM4CryptoMode.ECB);
|
||||
ebcData = SM4.encrypt(data, key: utf8.encode(BlueManage().connectDeviceName), mode: SM4CryptoMode.ECB);
|
||||
|
||||
return ebcData;
|
||||
}
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../io_type.dart';
|
||||
|
||||
class GetPublicKeyCommand extends SenderProtocol {
|
||||
String? lockID;
|
||||
GetPublicKeyCommand({
|
||||
this.lockID,
|
||||
}) : super(CommandType.getLockPublicKey);
|
||||
String? lockID;
|
||||
|
||||
|
||||
@override
|
||||
@ -23,14 +23,14 @@ class GetPublicKeyCommand extends SenderProtocol {
|
||||
List<int> data = [];
|
||||
|
||||
// 指令类型
|
||||
int type = commandType!.typeValue;
|
||||
double typeDouble = type / 256;
|
||||
int type1 = typeDouble.toInt();
|
||||
int type2 = type % 256;
|
||||
final int type = commandType!.typeValue;
|
||||
final double typeDouble = type / 256;
|
||||
final int type1 = typeDouble.toInt();
|
||||
final int type2 = type % 256;
|
||||
data.add(type1);
|
||||
data.add(type2);
|
||||
|
||||
int length = utf8.encode(lockID!).length;
|
||||
final int length = utf8.encode(lockID!).length;
|
||||
data.addAll(utf8.encode(lockID!));
|
||||
data = getFixedLengthList(data, 40 - length);
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../io_type.dart';
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
|
||||
class SenderGetWifiCommand extends SenderProtocol {
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
import '../io_type.dart';
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
import '../sm4Encipher/sm4.dart';
|
||||
|
||||
//TODO:开门
|
||||
class OpenLockCommand extends SenderProtocol {
|
||||
@ -47,20 +48,20 @@ class OpenLockCommand extends SenderProtocol {
|
||||
List<int> ebcData = [];
|
||||
|
||||
// 指令类型
|
||||
int type = commandType!.typeValue;
|
||||
double typeDouble = type / 256;
|
||||
int type1 = typeDouble.toInt();
|
||||
int type2 = type % 256;
|
||||
final int type = commandType!.typeValue;
|
||||
final double typeDouble = type / 256;
|
||||
final int type1 = typeDouble.toInt();
|
||||
final int type2 = type % 256;
|
||||
data.add(type1);
|
||||
data.add(type2);
|
||||
|
||||
//KeyID 40
|
||||
int keyIDLength = utf8.encode(lockID!).length;
|
||||
final int keyIDLength = utf8.encode(lockID!).length;
|
||||
data.addAll(utf8.encode(lockID!));
|
||||
data = getFixedLengthList(data, 40 - keyIDLength);
|
||||
|
||||
//userID 要接受钥匙的用户的useid 20
|
||||
int userIDLength = utf8.encode(userID!).length;
|
||||
final int userIDLength = utf8.encode(userID!).length;
|
||||
data.addAll(utf8.encode(userID!));
|
||||
data = getFixedLengthList(data, 20 - userIDLength);
|
||||
|
||||
@ -68,13 +69,13 @@ class OpenLockCommand extends SenderProtocol {
|
||||
data.add(openMode!);
|
||||
|
||||
// OpenTime 4
|
||||
int? d1 = openTime;
|
||||
final int? d1 = openTime;
|
||||
// AppLog.log("开门时间是:$d1");
|
||||
|
||||
data.add((d1! & 0xff000000) >> 24);
|
||||
data.add((d1 & 0xff0000) >> 16);
|
||||
data.add((d1 & 0xff00) >> 8);
|
||||
data.add((d1 & 0xff));
|
||||
data.add(d1 & 0xff);
|
||||
|
||||
// token 长度4 首次请求 Token 填 0,如果锁需要鉴权 操作者身份,则会分配动态口令并在应答消息中返回,二次请求时带上。 当token失效或者第一次发送的时候token为0
|
||||
data.addAll(token!);
|
||||
@ -83,7 +84,7 @@ class OpenLockCommand extends SenderProtocol {
|
||||
//AuthCodeLen 1
|
||||
data.add(0);
|
||||
} else {
|
||||
List<int> authCodeData = [];
|
||||
final List<int> authCodeData = [];
|
||||
//KeyID
|
||||
authCodeData.addAll(utf8.encode(lockID!));
|
||||
|
||||
@ -96,7 +97,7 @@ class OpenLockCommand extends SenderProtocol {
|
||||
authCodeData.addAll(signKey!);
|
||||
|
||||
// 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
||||
var authCode = crypto.md5.convert(authCodeData);
|
||||
final authCode = crypto.md5.convert(authCodeData);
|
||||
|
||||
data.add(authCode.bytes.length);
|
||||
data.addAll(authCode.bytes);
|
||||
@ -104,13 +105,13 @@ class OpenLockCommand extends SenderProtocol {
|
||||
|
||||
//onlineToken 16
|
||||
if(onlineToken!.isNotEmpty){
|
||||
int onlineTokenLength = utf8.encode(onlineToken!).length;
|
||||
final int onlineTokenLength = utf8.encode(onlineToken!).length;
|
||||
data.addAll(utf8.encode(onlineToken!));
|
||||
data = getFixedLengthList(data, 16 - onlineTokenLength);
|
||||
}
|
||||
|
||||
if ((data.length % 16) != 0) {
|
||||
int add = (16 - data.length % 16);
|
||||
final int add = 16 - data.length % 16;
|
||||
for (int i = 0; i < add; i++) {
|
||||
data.add(0);
|
||||
}
|
||||
@ -127,7 +128,7 @@ class OpenDoorReply extends Reply {
|
||||
OpenDoorReply.parseData(CommandType commandType, List<int> dataDetail)
|
||||
: super.parseData(commandType, dataDetail) {
|
||||
data = dataDetail;
|
||||
int status = data[6];
|
||||
final int status = data[6];
|
||||
errorWithStstus(status);
|
||||
}
|
||||
}
|
||||
@ -86,8 +86,9 @@ class F {
|
||||
static String get apiPrefix {
|
||||
switch (appFlavor) {
|
||||
case Flavor.local:
|
||||
return 'https://ge.lock.star-lock.cn'; // 葛工
|
||||
// return 'https://ge.lock.star-lock.cn'; // 葛工
|
||||
// return 'http://192.168.1.15:8022'; // 谢工
|
||||
return 'http://zhou.lock.star-lock.cn'; // 周工
|
||||
case Flavor.dev:
|
||||
return 'https://dev.lock.star-lock.cn';
|
||||
case Flavor.pre:
|
||||
|
||||
@ -152,69 +152,71 @@ class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
|
||||
],
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
state.agree.value = !state.agree.value;
|
||||
logic.changeAgreeState();
|
||||
},
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 30.h, horizontal: 40.w),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Obx(
|
||||
() => Container(
|
||||
padding: EdgeInsets.only(
|
||||
left: 5.w,
|
||||
right: 10.w,
|
||||
),
|
||||
child: Image.asset(
|
||||
state.agree.value
|
||||
Container(
|
||||
color: Colors.transparent,
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 30.h, horizontal: 40.w),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Obx(() => GestureDetector(
|
||||
onTap: () {
|
||||
state.agree.value = !state.agree.value;
|
||||
logic.changeAgreeState();
|
||||
},
|
||||
child: Container(
|
||||
width: 40.w,
|
||||
height: 40.w,
|
||||
// color: Colors.red,
|
||||
padding: EdgeInsets.only(
|
||||
left: 5.w,
|
||||
right: 10.w,
|
||||
),
|
||||
child: Image.asset(
|
||||
state.agree.value
|
||||
? 'images/icon_round_select.png'
|
||||
: 'images/icon_round_unSelect.png',
|
||||
width: 20.w,
|
||||
height: 20.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(children: <Widget>[
|
||||
Text(TranslationLoader.lanKeys!.readAndAgree!.tr,
|
||||
),
|
||||
),
|
||||
Row(children: <Widget>[
|
||||
Text(TranslationLoader.lanKeys!.readAndAgree!.tr,
|
||||
style: TextStyle(
|
||||
color: const Color(0xff333333),
|
||||
fontSize: 20.sp)),
|
||||
GestureDetector(
|
||||
child: Text(
|
||||
'《${TranslationLoader.lanKeys!.userAgreement!.tr}》',
|
||||
style: TextStyle(
|
||||
color: const Color(0xff333333),
|
||||
color: AppColors.mainColor,
|
||||
fontSize: 20.sp)),
|
||||
GestureDetector(
|
||||
child: Text(
|
||||
'《${TranslationLoader.lanKeys!.userAgreement!.tr}》',
|
||||
style: TextStyle(
|
||||
color: AppColors.mainColor,
|
||||
fontSize: 20.sp)),
|
||||
onTap: () {
|
||||
Get.toNamed(Routers.webviewShowPage,
|
||||
arguments: <String, String>{
|
||||
'url': XSConstantMacro.userAgreementURL,
|
||||
'title': '用户协议'.tr
|
||||
});
|
||||
},
|
||||
),
|
||||
GestureDetector(
|
||||
child: Text(
|
||||
'《${TranslationLoader.lanKeys!.privacyPolicy!.tr}》',
|
||||
style: TextStyle(
|
||||
color: AppColors.mainColor,
|
||||
fontSize: 20.sp)),
|
||||
onTap: () {
|
||||
Get.toNamed(Routers.webviewShowPage,
|
||||
arguments: <String, String>{
|
||||
'url': XSConstantMacro.privacyPolicyURL,
|
||||
'title': '隐私政策'.tr
|
||||
});
|
||||
},
|
||||
),
|
||||
]),
|
||||
],
|
||||
),
|
||||
onTap: () {
|
||||
Get.toNamed(Routers.webviewShowPage,
|
||||
arguments: <String, String>{
|
||||
'url': XSConstantMacro.userAgreementURL,
|
||||
'title': '用户协议'.tr
|
||||
});
|
||||
},
|
||||
),
|
||||
GestureDetector(
|
||||
child: Text(
|
||||
'《${TranslationLoader.lanKeys!.privacyPolicy!.tr}》',
|
||||
style: TextStyle(
|
||||
color: AppColors.mainColor,
|
||||
fontSize: 20.sp)),
|
||||
onTap: () {
|
||||
Get.toNamed(Routers.webviewShowPage,
|
||||
arguments: <String, String>{
|
||||
'url': XSConstantMacro.privacyPolicyURL,
|
||||
'title': '隐私政策'.tr
|
||||
});
|
||||
},
|
||||
),
|
||||
]),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
|
||||
@ -34,6 +34,7 @@ FutureOr<void> main() async {
|
||||
if (isLogin) {
|
||||
await privacySDKInitialization();
|
||||
Future<void>.delayed(const Duration(milliseconds: 500), () async {
|
||||
AppLog.log('main函数调用了获取App信息接口');
|
||||
final GetAppInfo entity = await ApiRepository.to.getAppInfo();
|
||||
CustomerTool.init(entity.data?.wechatServiceUrl ?? '');
|
||||
if (entity.data?.appSiteUrl != null) {
|
||||
@ -53,7 +54,7 @@ FutureOr<void> main() async {
|
||||
|
||||
if (AppPlatform.isAndroid) {
|
||||
const SystemUiOverlayStyle systemUiOverlayStyle =
|
||||
SystemUiOverlayStyle(statusBarColor: Colors.transparent);
|
||||
SystemUiOverlayStyle(statusBarColor: Colors.transparent);
|
||||
SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,17 +1,23 @@
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:crypto/crypto.dart' as crypto;
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/app_settings/app_settings.dart';
|
||||
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
import '../../../../blue/io_protocol/io_addICCardWithTimeCycleCoercion.dart';
|
||||
import '../../../../blue/io_reply.dart';
|
||||
import '../../../../blue/io_tool/io_tool.dart';
|
||||
import '../../../../blue/io_tool/manager_event_bus.dart';
|
||||
import '../../../../blue/sender_manage.dart';
|
||||
import '../../../../blue/sm4Encipher/sm4.dart';
|
||||
import '../../../../network/api_repository.dart';
|
||||
import '../../../../tools/eventBusEventManage.dart';
|
||||
import '../../../../tools/storage.dart';
|
||||
@ -224,6 +230,40 @@ class CardListLogic extends BaseGetXController {
|
||||
return keyDateTypeStr;
|
||||
}
|
||||
|
||||
void signBlue(){
|
||||
// final authCode = crypto.md5.convert([48,50,57,52,102,179,68,85,170,30,0,0,111,9,183,38,188,37,220,154,158,173,242,98]);
|
||||
// AppLog.log('authCode:$authCode');
|
||||
|
||||
// final ebcData = SM4.encrypt([48, 145, 84, 77, 72, 95, 49, 101, 48, 54, 56, 57, 97, 56, 56, 54, 102, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 57, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 179, 68, 85, 32, 98, 99, 101, 101, 56, 97, 50, 51, 51, 99, 102, 51, 52, 53, 48, 101, 57, 53, 52, 51, 98, 49, 51, 56, 53, 52, 49, 48, 57, 100, 56, 54], key: utf8.encode('TMH_1e0689a886f8'), mode: SM4CryptoMode.ECB);
|
||||
// AppLog.log('ebcData:$ebcData');
|
||||
|
||||
// final oriDataList = SM4.decrypt([103, 213, 54, 227, 120, 57, 155, 4, 31, 95, 214, 233, 229, 100, 85, 18], key: utf8.encode('TMH_1e0689a886f8'), mode: SM4CryptoMode.ECB);
|
||||
// AppLog.log('oriDataList:$oriDataList');
|
||||
|
||||
final List<int> authCodeData = [];
|
||||
//authUserID
|
||||
authCodeData.addAll(utf8.encode('294'));
|
||||
|
||||
//KeyID
|
||||
authCodeData.addAll(utf8.encode('0'));
|
||||
|
||||
//NowTime 4
|
||||
// DateTime now = DateTime.now();
|
||||
// int timestamp = now.millisecondsSinceEpoch;
|
||||
var nowTime = 1723083753;
|
||||
authCodeData.add((nowTime & 0xff000000) >> 24);
|
||||
authCodeData.add((nowTime & 0xff0000) >> 16);
|
||||
authCodeData.add((nowTime & 0xff00) >> 8);
|
||||
authCodeData.add(nowTime & 0xff);
|
||||
|
||||
authCodeData.addAll([168, 37, 0, 0, 190, 240, 188, 129, 150, 249, 113, 15, 44, 243, 227, 30]);
|
||||
|
||||
AppLog.log('authCodeData:$authCodeData');
|
||||
// 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
||||
final authCode = crypto.md5.convert(authCodeData);
|
||||
AppLog.log('authCode:$authCode authCode.bytes.length:${authCode.bytes.length} authCode.bytes:${authCode.bytes}');
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> onReady() async {
|
||||
super.onReady();
|
||||
@ -235,6 +275,8 @@ class CardListLogic extends BaseGetXController {
|
||||
|
||||
_initRefreshAction();
|
||||
}
|
||||
|
||||
// signBlue();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@ -684,7 +684,7 @@ class OtherTypeKeyChangeDateLogic extends BaseGetXController{
|
||||
faceRight: state.fingerprintItemData.value.faceRight!,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast('修改成功', something: () {
|
||||
showToast('修改成功'.tr, something: () {
|
||||
Get.back(result: <String, String>{
|
||||
'beginTimeTimestamp':state.beginTimeTimestamp.value.toString(),
|
||||
'endTimeTimestamp':state.endTimeTimestamp.value.toString(),
|
||||
@ -711,7 +711,7 @@ class OtherTypeKeyChangeDateLogic extends BaseGetXController{
|
||||
palmVeinRight: state.fingerprintItemData.value.palmVeinRight!,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast('修改成功', something: () {
|
||||
showToast('修改成功'.tr, something: () {
|
||||
Get.back(result: <String, String>{
|
||||
'beginTimeTimestamp':state.beginTimeTimestamp.value.toString(),
|
||||
'endTimeTimestamp':state.endTimeTimestamp.value.toString(),
|
||||
|
||||
@ -187,8 +187,7 @@ class LockDetailLogic extends BaseGetXController {
|
||||
|
||||
state.lockUserNo = state.keyInfos.value.lockUserNo!;
|
||||
|
||||
if (state.keyInfos.value.keyStatus ==
|
||||
XSConstantMacro.keyStatusWaitIneffective ||
|
||||
if (state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusWaitIneffective ||
|
||||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusFrozen ||
|
||||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusExpired ||
|
||||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusDeleted ||
|
||||
@ -611,6 +610,7 @@ class LockDetailLogic extends BaseGetXController {
|
||||
getServerDatetime();
|
||||
await PermissionDialog.request(Permission.location);
|
||||
await PermissionDialog.requestBluetooth();
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@ -1290,7 +1290,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
onTap: bottomBtnisEable
|
||||
? onClick
|
||||
: () {
|
||||
logic.showToast('请在锁旁边完成第一次开锁'.tr);
|
||||
logic.showToast('钥匙不可用'.tr);
|
||||
},
|
||||
child: child,
|
||||
);
|
||||
|
||||
@ -147,6 +147,7 @@ class LockOperatingRecordLogic extends BaseGetXController {
|
||||
keyId: state.type == 5 ? state.idStr : '',
|
||||
faceId: state.type == 4 ? state.idStr : '',
|
||||
remoteId:state.type == 6 ? state.idStr : '',
|
||||
palmVeinId:state.type == 7 ? state.idStr : '',
|
||||
pageSize:pageSize,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
|
||||
@ -30,6 +30,6 @@ class LockOperatingRecordState { // 记录名称
|
||||
bool ifHaveNext = false; // 页码
|
||||
int logCountPage = 10; // 蓝牙记录一页多少个
|
||||
String idStr = ''; //
|
||||
int type = 0; // 1:密码 2:卡 3:指纹 4:人脸 5:钥匙 6:遥控
|
||||
int type = 0; // 1:密码 2:卡 3:指纹 4:人脸 5:钥匙 6:遥控 7掌静脉
|
||||
RxString recordName = ''.obs;
|
||||
}
|
||||
|
||||
@ -183,10 +183,12 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
rightTitle: '',
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
// Get.toNamed(Routers.keyOperationRecordPage, arguments: {
|
||||
// 'lockId': state.fingerprintItemData.value.lockId.toString(),
|
||||
// 'cardId': state.fingerprintItemData.value.cardId.toString()
|
||||
// });
|
||||
Get.toNamed(Routers.lockOperatingRecordPage,
|
||||
arguments: <String, Object?>{
|
||||
'type': 7,
|
||||
'id': state.fingerprintItemData.value.palmVeinId.toString(),
|
||||
'recordName': state.fingerprintItemData.value.palmVeinName
|
||||
});
|
||||
}),
|
||||
// SizedBox(height: 40.h),
|
||||
// addControlsBtn(type),
|
||||
@ -221,7 +223,7 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
}
|
||||
Get.back();
|
||||
state.typeName.value = state.changeNameController.text;
|
||||
// logic.editICCardData();
|
||||
logic.editPalmData();
|
||||
},
|
||||
cancelClick: () {
|
||||
Get.back();
|
||||
|
||||
@ -137,7 +137,7 @@ class PalmListLogic extends BaseGetXController {
|
||||
});
|
||||
}
|
||||
|
||||
// 获取IC卡列表
|
||||
// 获取掌静脉列表
|
||||
Future<FingerprintListDataEntity> getPalmListData({required bool isRefresh}) async {
|
||||
// 如果是下拉刷新,清空已有数据
|
||||
if (isRefresh) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -9,19 +9,16 @@ import 'package:star_lock/main/lockDetail/palm/palmList/palmList_logic.dart';
|
||||
import 'package:star_lock/main/lockDetail/palm/palmList/palmList_state.dart';
|
||||
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||
import 'package:star_lock/tools/keySearchWidget.dart';
|
||||
import 'package:star_lock/tools/left_slide/left_slide_actions.dart';
|
||||
|
||||
import '../../../../appRouters.dart';
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
import '../../../../tools/EasyRefreshTool.dart';
|
||||
import '../../../../tools/appRouteObserver.dart';
|
||||
import '../../../../tools/noData.dart';
|
||||
import '../../../../tools/showIosTipView.dart';
|
||||
import '../../../../tools/showTipView.dart';
|
||||
import '../../../../tools/storage.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class PalmListPage extends StatefulWidget {
|
||||
const PalmListPage({Key? key}) : super(key: key);
|
||||
|
||||
@ -142,7 +142,7 @@ class AddRemoteControlLogic extends BaseGetXController{
|
||||
}
|
||||
}
|
||||
|
||||
// 添加卡片
|
||||
// 添加遥控
|
||||
Future<void> senderAddRemoteControl() async {
|
||||
showBlueConnetctToastTimer(action: (){
|
||||
Get.close(1);
|
||||
|
||||
@ -175,7 +175,7 @@ class RemoteControlDetailLogic extends BaseGetXController {
|
||||
remoteRight: 2,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
state.fingerprintItemData.value.cardName = state.changeNameController.text;
|
||||
state.fingerprintItemData.value.remoteName = state.changeNameController.text;
|
||||
// state.fingerprintItemData.value.isCoerced = state.isStressCard.value ? 1 : 2;
|
||||
// state.fingerprintItemData.value.cardRight = state.isAdministrator.value ? 1 : 0;
|
||||
showToast('修改成功'.tr, something: () {
|
||||
|
||||
@ -147,7 +147,7 @@ class _LockListXHJPageState extends State<LockListXHJPage> with RouteAware {
|
||||
//设备多层级列表
|
||||
Widget _buildLockExpandedList(BuildContext context, int index, GroupList itemData) {
|
||||
final List<LockListInfoItemEntity> lockItemList = itemData.lockList ?? <LockListInfoItemEntity>[];
|
||||
AppLog.log('lockItemList[0].lockAlias:${lockItemList[0].lockAlias}');
|
||||
// AppLog.log('lockItemList[0].lockAlias:${lockItemList[0].lockAlias}');
|
||||
final List<Widget> list = forItems(lockItemList);
|
||||
return LockListGroupView(
|
||||
onTap: () {
|
||||
|
||||
@ -38,7 +38,7 @@ class LockMainLogic extends BaseGetXController {
|
||||
isUnShowLoading: isUnShowLoading,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
AppLog.log('请求列表调用 loadMainDataLogic');
|
||||
// AppLog.log('请求列表调用 loadMainDataLogic');
|
||||
await loadMainDataLogic(entity.data!);
|
||||
updateZoneOffsetsAndLanguages();
|
||||
}
|
||||
|
||||
@ -41,8 +41,7 @@ class _StarLockMainPageState extends State<StarLockMainPage>
|
||||
|
||||
Future<void> getHttpData(
|
||||
{bool clearScanDevices = false, bool isUnShowLoading = false}) async {
|
||||
LockListInfoGroupEntity? lockListInfoGroupEntity =
|
||||
await Storage.getLockMainListData();
|
||||
LockListInfoGroupEntity? lockListInfoGroupEntity = await Storage.getLockMainListData();
|
||||
if (lockListInfoGroupEntity != null) {
|
||||
await logic.loadMainDataLogic(lockListInfoGroupEntity);
|
||||
setState(() {});
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
import 'app_settings/app_settings.dart';
|
||||
import 'flavors.dart';
|
||||
|
||||
import 'main.dart' as runner;
|
||||
|
||||
Future<void> main() async {
|
||||
F.appFlavor = Flavor.dev;
|
||||
AppLog.log('dev调用了main函数');
|
||||
await runner.main();
|
||||
}
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
import 'app_settings/app_settings.dart';
|
||||
import 'flavors.dart';
|
||||
|
||||
import 'main.dart' as runner;
|
||||
|
||||
Future<void> main() async {
|
||||
F.appFlavor = Flavor.local;
|
||||
AppLog.log('local调用了main函数');
|
||||
await runner.main();
|
||||
}
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
import 'app_settings/app_settings.dart';
|
||||
import 'flavors.dart';
|
||||
|
||||
import 'main.dart' as runner;
|
||||
|
||||
Future<void> main() async {
|
||||
F.appFlavor = Flavor.pre;
|
||||
AppLog.log('pre调用了main函数');
|
||||
await runner.main();
|
||||
}
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
import 'app_settings/app_settings.dart';
|
||||
import 'flavors.dart';
|
||||
|
||||
import 'main.dart' as runner;
|
||||
|
||||
Future<void> main() async {
|
||||
F.appFlavor = Flavor.sky;
|
||||
AppLog.log('sky_full调用了main函数');
|
||||
await runner.main();
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import 'app_settings/app_settings.dart';
|
||||
import 'flavors.dart';
|
||||
|
||||
import 'main.dart' as runner;
|
||||
@ -5,5 +6,6 @@ import 'main.dart' as runner;
|
||||
Future<void> main() async {
|
||||
F.appFlavor = Flavor.sky;
|
||||
F.isLite = true;
|
||||
AppLog.log('sky_lite调用了main函数');
|
||||
await runner.main();
|
||||
}
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
import 'app_settings/app_settings.dart';
|
||||
import 'flavors.dart';
|
||||
|
||||
import 'main.dart' as runner;
|
||||
|
||||
Future<void> main() async {
|
||||
F.appFlavor = Flavor.xhj;
|
||||
AppLog.log('xhj_full调用了main函数');
|
||||
await runner.main();
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import 'app_settings/app_settings.dart';
|
||||
import 'flavors.dart';
|
||||
|
||||
import 'main.dart' as runner;
|
||||
@ -5,5 +6,6 @@ import 'main.dart' as runner;
|
||||
Future<void> main() async {
|
||||
F.appFlavor = Flavor.xhj;
|
||||
F.isLite = true;
|
||||
AppLog.log('xhj_lite调用了main函数');
|
||||
await runner.main();
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ class NearbyLockLogic extends BaseGetXController {
|
||||
});
|
||||
BlueManage().blueSendData(deviceName,
|
||||
(BluetoothConnectionState state) async {
|
||||
AppLog.log('点击要添加的设备了');
|
||||
// AppLog.log('点击要添加的设备了');
|
||||
if (state == BluetoothConnectionState.connected) {
|
||||
AppLog.log('开始获取公钥');
|
||||
IoSenderManage.getPublicKey(lockId: deviceName);
|
||||
@ -663,9 +663,19 @@ class NearbyLockLogic extends BaseGetXController {
|
||||
|
||||
Future<void> getNearByLimits() async {
|
||||
if (!Platform.isIOS) {
|
||||
final bool bluetoothRequest = await PermissionDialog.requestBluetooth();
|
||||
final bool locationRequest =
|
||||
await PermissionDialog.request(Permission.location);
|
||||
bool bluetoothRequest = false;
|
||||
try {
|
||||
bluetoothRequest = await PermissionDialog.requestBluetooth();
|
||||
AppLog.log('bluetoothRequest:$bluetoothRequest');
|
||||
if (!bluetoothRequest) {
|
||||
return;
|
||||
}
|
||||
} catch (e) {
|
||||
AppLog.log('bluetoothRequest:$e');
|
||||
}
|
||||
|
||||
final bool locationRequest = await PermissionDialog.request(Permission.location);
|
||||
AppLog.log('locationRequest:$locationRequest');
|
||||
if (!bluetoothRequest || !locationRequest) {
|
||||
return;
|
||||
}
|
||||
@ -674,4 +684,5 @@ class NearbyLockLogic extends BaseGetXController {
|
||||
state.ifCurrentScreen.value = true;
|
||||
startScanBlueList();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/flavors.dart';
|
||||
import 'package:star_lock/mine/addLock/nearbyLock/nearbyLock_state.dart';
|
||||
import '../../../app_settings/app_colors.dart';
|
||||
import '../../../tools/appRouteObserver.dart';
|
||||
import '../../../tools/titleAppBar.dart';
|
||||
@ -19,8 +20,8 @@ class NearbyLockPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
||||
final logic = Get.put(NearbyLockLogic());
|
||||
final state = Get.find<NearbyLockLogic>().state;
|
||||
final NearbyLockLogic logic = Get.put(NearbyLockLogic());
|
||||
final NearbyLockState state = Get.find<NearbyLockLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -31,7 +32,7 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
||||
barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
actionsList: <Widget>[
|
||||
CupertinoActivityIndicator(
|
||||
radius: 18.w,
|
||||
color: Colors.white,
|
||||
@ -44,7 +45,7 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
||||
backgroundColor: Colors.white,
|
||||
iconColor: AppColors.blackColor,
|
||||
titleColor: AppColors.blackColor,
|
||||
actionsList: [
|
||||
actionsList: <Widget>[
|
||||
CupertinoActivityIndicator(
|
||||
radius: 18.w,
|
||||
color: AppColors.blackColor,
|
||||
@ -52,20 +53,18 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
||||
SizedBox(width: 30.w)
|
||||
]),
|
||||
),
|
||||
body: Obx(() {
|
||||
return listView();
|
||||
}),
|
||||
body: Obx(listView),
|
||||
);
|
||||
}
|
||||
|
||||
Widget listView() {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: ListView.separated(
|
||||
itemCount: state.devices.length,
|
||||
itemBuilder: (c, index) {
|
||||
itemBuilder: (BuildContext c, int index) {
|
||||
return nearbyLockItem('images/icon_lockGroup_item.png', state.devices[index], () {
|
||||
String advName = state.devices[index].advertisementData.advName;
|
||||
state.selectLockName.value = advName;
|
||||
@ -109,19 +108,19 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
||||
return GestureDetector(
|
||||
onTap: ((scanResult.advertisementData.serviceUuids.isNotEmpty
|
||||
? scanResult.advertisementData.serviceUuids[0]
|
||||
: "")
|
||||
: '')
|
||||
.toString()[33] ==
|
||||
"1")
|
||||
'1')
|
||||
? action
|
||||
: null,
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Container(
|
||||
height: 89.h,
|
||||
width: 1.sw,
|
||||
color: Colors.white,
|
||||
child: Row(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
SizedBox(width: 20.w),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
@ -132,7 +131,7 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
// 第32、33两位00 表示休眠, 01表示唤醒
|
||||
Text(scanResult.advertisementData.advName,
|
||||
style: TextStyle(
|
||||
@ -141,9 +140,9 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
||||
.isNotEmpty
|
||||
? scanResult.advertisementData
|
||||
.serviceUuids[0]
|
||||
: "")
|
||||
: '')
|
||||
.toString()[33] ==
|
||||
"1")
|
||||
'1')
|
||||
? AppColors.blackColor
|
||||
: Colors.grey)),
|
||||
],
|
||||
@ -152,7 +151,7 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
||||
width: 10.w,
|
||||
),
|
||||
Image.asset(
|
||||
"images/mine/icon_mine_main_about.png",
|
||||
'images/mine/icon_mine_main_about.png',
|
||||
width: 22.w,
|
||||
height: 22.w,
|
||||
),
|
||||
@ -237,11 +236,9 @@ class _TipDialog extends StatelessWidget {
|
||||
'固件升级提示'.tr,
|
||||
),
|
||||
content: Text('请先获取固件文件到手机本地,再选择升级'.tr),
|
||||
actions: [
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
onPressed: Get.back,
|
||||
child: Text(
|
||||
'取消'.tr,
|
||||
style: TextStyle(fontSize: 22.sp, color: AppColors.blackColor),
|
||||
@ -274,7 +271,7 @@ class OTAProgressDialog extends StatelessWidget {
|
||||
'固件升级中'.tr,
|
||||
),
|
||||
content: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 20.h, bottom: 10.h),
|
||||
child: Text(
|
||||
@ -283,7 +280,7 @@ class OTAProgressDialog extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'传输中'.tr,
|
||||
style: TextStyle(fontSize: 18.sp, color: AppColors.mainColor),
|
||||
@ -300,7 +297,7 @@ class OTAProgressDialog extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
logic.closeOTADAta();
|
||||
|
||||
@ -34,16 +34,17 @@ class _AdministratorAssociationLockPageState
|
||||
barTitle: '锁'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: <Widget>[
|
||||
IconButton(
|
||||
icon: Image.asset(
|
||||
'images/icon_bar_more.png',
|
||||
height: 30.h,
|
||||
width: 10.w,
|
||||
),
|
||||
onPressed: logic.openModalBottomSheet,
|
||||
),
|
||||
],
|
||||
// 功能未做 先隐藏下个版本修改
|
||||
// actionsList: <Widget>[
|
||||
// IconButton(
|
||||
// icon: Image.asset(
|
||||
// 'images/icon_bar_more.png',
|
||||
// height: 30.h,
|
||||
// width: 10.w,
|
||||
// ),
|
||||
// onPressed: logic.openModalBottomSheet,
|
||||
// ),
|
||||
// ],
|
||||
),
|
||||
body: Obx(_buildListView),
|
||||
);
|
||||
|
||||
@ -36,8 +36,8 @@ class AdministratorDetailsLogic extends BaseGetXController {
|
||||
keyName: isChangeName
|
||||
? state.changeNameController.text
|
||||
: state.itemData.value.name ?? '',
|
||||
endDate: '',
|
||||
startDate: '',
|
||||
endDate: state.itemData.value.endDate.toString(),
|
||||
startDate: state.itemData.value.startDate.toString(),
|
||||
isOnlyManageSelf: isChangeName
|
||||
? state.itemData.value.onlyManageYouCreatesUser ?? 0
|
||||
: isManageCreateUser,
|
||||
|
||||
@ -287,6 +287,7 @@ class ApiProvider extends BaseProvider {
|
||||
required String keyId,
|
||||
required String faceId,
|
||||
required String remoteId,
|
||||
required String palmVeinId,
|
||||
required String pageSize}) =>
|
||||
post(
|
||||
keyOperationRecordURL.toUrl,
|
||||
@ -303,6 +304,7 @@ class ApiProvider extends BaseProvider {
|
||||
'keyId': keyId,
|
||||
'faceId': faceId,
|
||||
'remoteId': remoteId,
|
||||
'palmVeinId': palmVeinId,
|
||||
'pageSize': pageSize
|
||||
}));
|
||||
|
||||
|
||||
@ -255,6 +255,7 @@ class ApiRepository {
|
||||
required String keyId,
|
||||
required String faceId,
|
||||
required String remoteId,
|
||||
required String palmVeinId,
|
||||
required String pageSize,
|
||||
}) async {
|
||||
final res = await apiProvider.lockRecordList(
|
||||
@ -270,6 +271,7 @@ class ApiRepository {
|
||||
keyId: keyId,
|
||||
faceId: faceId,
|
||||
remoteId: remoteId,
|
||||
palmVeinId: palmVeinId,
|
||||
pageSize: pageSize,
|
||||
);
|
||||
return KeyOperationRecordEntity.fromJson(res.body);
|
||||
@ -1857,7 +1859,7 @@ class ApiRepository {
|
||||
// 校验掌静脉名字是否重复
|
||||
Future<LoginEntity> checkPalmNameDuplicatedData(
|
||||
{required String lockId, required String palmVeinName}) async {
|
||||
final res = await apiProvider.checkRemoteControlNameDuplicatedData(lockId, palmVeinName);
|
||||
final res = await apiProvider.checkPalmNameDuplicatedData(lockId, palmVeinName);
|
||||
return LoginEntity.fromJson(res.body);
|
||||
}
|
||||
|
||||
|
||||
@ -70,6 +70,7 @@ class AppFirstEnterHandle {
|
||||
}
|
||||
|
||||
Future<void> getAppInfo() async {
|
||||
AppLog.log('AppFirstEnterHandle调用了获取App信息接口');
|
||||
final GetAppInfo entity = await ApiRepository.to.getAppInfo();
|
||||
CustomerTool.init(entity.data?.wechatServiceUrl ?? '');
|
||||
WxPayTool.setAssociationUrl(entity.data!.appSiteUrl!);
|
||||
|
||||
@ -282,6 +282,7 @@ class PermissionDialog {
|
||||
|
||||
//显示权限判断申请框
|
||||
static Future<bool> request(Permission permission, [String? content]) async {
|
||||
AppLog.log('context:${content}');
|
||||
if (Get.context == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ case $environment in
|
||||
;;
|
||||
local)
|
||||
main_file="lib/main_local.dart"
|
||||
api_prefix='http://192.168.1.15:8022'
|
||||
api_prefix='http://zhou.lock.star-lock.cn'
|
||||
;;
|
||||
*)
|
||||
echo "错误: flavor[$environment] mainFile not found"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user