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