diff --git a/.DS_Store b/.DS_Store index f2fb2aab..1e38da1a 100755 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/lan/lan_en.json b/lan/lan_en.json index 3a58447b..2d48d88e 100755 --- a/lan/lan_en.json +++ b/lan/lan_en.json @@ -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", diff --git a/lan/lan_keys.json b/lan/lan_keys.json index 0445b481..48eb4db3 100755 --- a/lan/lan_keys.json +++ b/lan/lan_keys.json @@ -497,7 +497,7 @@ "天后失效":"天后失效", "电量更新时间:":"电量更新时间:", "新增配件":"新增配件", - "请在锁旁边完成第一次开锁":"请在锁旁边完成第一次开锁", + "钥匙不可用":"钥匙不可用", "正在开锁中...":"正在开锁中...", "你的钥匙": "你的钥匙", "常开模式启动!长按闭锁": "常开模式启动!长按闭锁", diff --git a/lan/lan_zh.json b/lan/lan_zh.json index 6b833cb2..c40c06a0 100755 --- a/lan/lan_zh.json +++ b/lan/lan_zh.json @@ -472,7 +472,7 @@ "天后失效": "天后失效", "电量更新时间:": "电量更新时间:", "新增配件": "新增配件", - "请在锁旁边完成第一次开锁": "请在锁旁边完成第一次开锁", + "钥匙不可用": "钥匙不可用", "正在开锁中...": "正在开锁中...", "你的钥匙": "你的钥匙", "常开模式启动!长按闭锁": "常开模式启动!长按闭锁", diff --git a/lib/blue/blue_manage.dart b/lib/blue/blue_manage.dart index 0c2409ee..d0a13911 100755 --- a/lib/blue/blue_manage.dart +++ b/lib/blue/blue_manage.dart @@ -394,6 +394,7 @@ class BlueManage { // 添加这个判断是因为有些苹果设备或者安卓等性能比较好的设备时,添加完锁之后,锁板未改变为已添加状态之前,就进行了蓝牙连接,导致添加完锁就失败,这里进行了判断,如果第一次连接失败,就清除缓存重新扫描连接 if(isReconnect == true){ AppLog.log('该锁已被重置, 重新发送扫描命令'); + scanDevices.clear(); startScanSingle(deviceName, 15, (List 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!); diff --git a/lib/blue/io_protocol/io_getPrivateKey.dart b/lib/blue/io_protocol/io_getPrivateKey.dart index 144751ad..29fde17a 100755 --- a/lib/blue/io_protocol/io_getPrivateKey.dart +++ b/lib/blue/io_protocol/io_getPrivateKey.dart @@ -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 publicKeyDataList = []; class GetPrivateKeyCommand extends SenderProtocol { @@ -45,25 +44,25 @@ class GetPrivateKeyCommand extends SenderProtocol { List 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 authCodeData = []; + final List 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; } diff --git a/lib/blue/io_protocol/io_getPublicKey.dart b/lib/blue/io_protocol/io_getPublicKey.dart index 212f3d9e..71fad94e 100755 --- a/lib/blue/io_protocol/io_getPublicKey.dart +++ b/lib/blue/io_protocol/io_getPublicKey.dart @@ -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 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); diff --git a/lib/blue/io_protocol/io_getWifiList.dart b/lib/blue/io_protocol/io_getWifiList.dart index a8b4f946..74fe1e0f 100755 --- a/lib/blue/io_protocol/io_getWifiList.dart +++ b/lib/blue/io_protocol/io_getWifiList.dart @@ -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 { diff --git a/lib/blue/io_protocol/io_openLock.dart b/lib/blue/io_protocol/io_openLock.dart index b8ccbc5d..a0e89e70 100755 --- a/lib/blue/io_protocol/io_openLock.dart +++ b/lib/blue/io_protocol/io_openLock.dart @@ -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 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 authCodeData = []; + final List 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 dataDetail) : super.parseData(commandType, dataDetail) { data = dataDetail; - int status = data[6]; + final int status = data[6]; errorWithStstus(status); } } \ No newline at end of file diff --git a/lib/flavors.dart b/lib/flavors.dart index 982acd95..fcc73aca 100755 --- a/lib/flavors.dart +++ b/lib/flavors.dart @@ -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: diff --git a/lib/login/login/starLock_login_xhj_page.dart b/lib/login/login/starLock_login_xhj_page.dart index 4f23fb50..c0345671 100755 --- a/lib/login/login/starLock_login_xhj_page.dart +++ b/lib/login/login/starLock_login_xhj_page.dart @@ -152,69 +152,71 @@ class _StarLockLoginPageState extends State { ], ), ), - 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: [ - 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: [ + 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: [ - Text(TranslationLoader.lanKeys!.readAndAgree!.tr, + ), + ), + Row(children: [ + 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: { - '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: { - 'url': XSConstantMacro.privacyPolicyURL, - 'title': '隐私政策'.tr - }); - }, - ), - ]), - ], - ), + onTap: () { + Get.toNamed(Routers.webviewShowPage, + arguments: { + '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: { + 'url': XSConstantMacro.privacyPolicyURL, + 'title': '隐私政策'.tr + }); + }, + ), + ]), + ], ), ), Padding( diff --git a/lib/main.dart b/lib/main.dart index f25dbcfd..be8484da 100755 --- a/lib/main.dart +++ b/lib/main.dart @@ -34,6 +34,7 @@ FutureOr main() async { if (isLogin) { await privacySDKInitialization(); Future.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 main() async { if (AppPlatform.isAndroid) { const SystemUiOverlayStyle systemUiOverlayStyle = - SystemUiOverlayStyle(statusBarColor: Colors.transparent); + SystemUiOverlayStyle(statusBarColor: Colors.transparent); SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle); } } diff --git a/lib/main/lockDetail/card/cardList/cardList_logic.dart b/lib/main/lockDetail/card/cardList/cardList_logic.dart index e88131fc..cb5c420c 100755 --- a/lib/main/lockDetail/card/cardList/cardList_logic.dart +++ b/lib/main/lockDetail/card/cardList/cardList_logic.dart @@ -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 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 onReady() async { super.onReady(); @@ -235,6 +275,8 @@ class CardListLogic extends BaseGetXController { _initRefreshAction(); } + + // signBlue(); } @override diff --git a/lib/main/lockDetail/card/otherTypeKeyChangeDate/otherTypeKeyChangeDate_logic.dart b/lib/main/lockDetail/card/otherTypeKeyChangeDate/otherTypeKeyChangeDate_logic.dart index 2c0268fd..2048dd9e 100755 --- a/lib/main/lockDetail/card/otherTypeKeyChangeDate/otherTypeKeyChangeDate_logic.dart +++ b/lib/main/lockDetail/card/otherTypeKeyChangeDate/otherTypeKeyChangeDate_logic.dart @@ -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: { '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: { 'beginTimeTimestamp':state.beginTimeTimestamp.value.toString(), 'endTimeTimestamp':state.endTimeTimestamp.value.toString(), diff --git a/lib/main/lockDetail/lockDetail/lockDetail_logic.dart b/lib/main/lockDetail/lockDetail/lockDetail_logic.dart index 5d0dbf01..bf80cee6 100755 --- a/lib/main/lockDetail/lockDetail/lockDetail_logic.dart +++ b/lib/main/lockDetail/lockDetail/lockDetail_logic.dart @@ -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 diff --git a/lib/main/lockDetail/lockDetail/lockDetail_page.dart b/lib/main/lockDetail/lockDetail/lockDetail_page.dart index d3b922db..489c1570 100755 --- a/lib/main/lockDetail/lockDetail/lockDetail_page.dart +++ b/lib/main/lockDetail/lockDetail/lockDetail_page.dart @@ -1290,7 +1290,7 @@ class _LockDetailPageState extends State onTap: bottomBtnisEable ? onClick : () { - logic.showToast('请在锁旁边完成第一次开锁'.tr); + logic.showToast('钥匙不可用'.tr); }, child: child, ); diff --git a/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_logic.dart b/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_logic.dart index 1ed1d547..12ac7f80 100755 --- a/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_logic.dart +++ b/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_logic.dart @@ -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) { diff --git a/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_state.dart b/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_state.dart index 109e696e..78b4f811 100755 --- a/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_state.dart +++ b/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_state.dart @@ -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; } diff --git a/lib/main/lockDetail/palm/palmDetail/palmDetail_page.dart b/lib/main/lockDetail/palm/palmDetail/palmDetail_page.dart index cde24882..7941a11d 100755 --- a/lib/main/lockDetail/palm/palmDetail/palmDetail_page.dart +++ b/lib/main/lockDetail/palm/palmDetail/palmDetail_page.dart @@ -183,10 +183,12 @@ class _PalmDetailPageState extends State 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: { + '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 with RouteAware { } Get.back(); state.typeName.value = state.changeNameController.text; - // logic.editICCardData(); + logic.editPalmData(); }, cancelClick: () { Get.back(); diff --git a/lib/main/lockDetail/palm/palmList/palmList_logic.dart b/lib/main/lockDetail/palm/palmList/palmList_logic.dart index cad800a0..15a00abc 100755 --- a/lib/main/lockDetail/palm/palmList/palmList_logic.dart +++ b/lib/main/lockDetail/palm/palmList/palmList_logic.dart @@ -137,7 +137,7 @@ class PalmListLogic extends BaseGetXController { }); } - // 获取IC卡列表 + // 获取掌静脉列表 Future getPalmListData({required bool isRefresh}) async { // 如果是下拉刷新,清空已有数据 if (isRefresh) { diff --git a/lib/main/lockDetail/palm/palmList/palmList_page.dart b/lib/main/lockDetail/palm/palmList/palmList_page.dart index ef2023f0..7cbc8872 100755 --- a/lib/main/lockDetail/palm/palmList/palmList_page.dart +++ b/lib/main/lockDetail/palm/palmList/palmList_page.dart @@ -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); diff --git a/lib/main/lockDetail/remoteControl/addRemoteControl/addRemoteControl_logic.dart b/lib/main/lockDetail/remoteControl/addRemoteControl/addRemoteControl_logic.dart index e5c0cd23..b280dca7 100644 --- a/lib/main/lockDetail/remoteControl/addRemoteControl/addRemoteControl_logic.dart +++ b/lib/main/lockDetail/remoteControl/addRemoteControl/addRemoteControl_logic.dart @@ -142,7 +142,7 @@ class AddRemoteControlLogic extends BaseGetXController{ } } - // 添加卡片 + // 添加遥控 Future senderAddRemoteControl() async { showBlueConnetctToastTimer(action: (){ Get.close(1); diff --git a/lib/main/lockDetail/remoteControl/remoteControlDetail/remoteControlDetail_logic.dart b/lib/main/lockDetail/remoteControl/remoteControlDetail/remoteControlDetail_logic.dart index d40339c5..e39994ac 100644 --- a/lib/main/lockDetail/remoteControl/remoteControlDetail/remoteControlDetail_logic.dart +++ b/lib/main/lockDetail/remoteControl/remoteControlDetail/remoteControlDetail_logic.dart @@ -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: () { diff --git a/lib/main/lockMian/lockList/lockList_xhj_page.dart b/lib/main/lockMian/lockList/lockList_xhj_page.dart index 4d826a24..8937b161 100755 --- a/lib/main/lockMian/lockList/lockList_xhj_page.dart +++ b/lib/main/lockMian/lockList/lockList_xhj_page.dart @@ -147,7 +147,7 @@ class _LockListXHJPageState extends State with RouteAware { //设备多层级列表 Widget _buildLockExpandedList(BuildContext context, int index, GroupList itemData) { final List lockItemList = itemData.lockList ?? []; - AppLog.log('lockItemList[0].lockAlias:${lockItemList[0].lockAlias}'); + // AppLog.log('lockItemList[0].lockAlias:${lockItemList[0].lockAlias}'); final List list = forItems(lockItemList); return LockListGroupView( onTap: () { diff --git a/lib/main/lockMian/lockMain/lockMain_logic.dart b/lib/main/lockMian/lockMain/lockMain_logic.dart index 7c59b8c5..295f121d 100755 --- a/lib/main/lockMian/lockMain/lockMain_logic.dart +++ b/lib/main/lockMian/lockMain/lockMain_logic.dart @@ -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(); } diff --git a/lib/main/lockMian/lockMain/lockMain_page.dart b/lib/main/lockMian/lockMain/lockMain_page.dart index 0171aedb..47e01e95 100755 --- a/lib/main/lockMian/lockMain/lockMain_page.dart +++ b/lib/main/lockMian/lockMain/lockMain_page.dart @@ -41,8 +41,7 @@ class _StarLockMainPageState extends State Future 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(() {}); diff --git a/lib/main_dev.dart b/lib/main_dev.dart index c9275a23..194d5e31 100755 --- a/lib/main_dev.dart +++ b/lib/main_dev.dart @@ -1,8 +1,10 @@ +import 'app_settings/app_settings.dart'; import 'flavors.dart'; import 'main.dart' as runner; Future main() async { F.appFlavor = Flavor.dev; + AppLog.log('dev调用了main函数'); await runner.main(); } diff --git a/lib/main_local.dart b/lib/main_local.dart index a6fd745a..51b4662a 100755 --- a/lib/main_local.dart +++ b/lib/main_local.dart @@ -1,8 +1,10 @@ +import 'app_settings/app_settings.dart'; import 'flavors.dart'; import 'main.dart' as runner; Future main() async { F.appFlavor = Flavor.local; + AppLog.log('local调用了main函数'); await runner.main(); } diff --git a/lib/main_pre.dart b/lib/main_pre.dart index d2e9fed6..3420ca9c 100755 --- a/lib/main_pre.dart +++ b/lib/main_pre.dart @@ -1,8 +1,10 @@ +import 'app_settings/app_settings.dart'; import 'flavors.dart'; import 'main.dart' as runner; Future main() async { F.appFlavor = Flavor.pre; + AppLog.log('pre调用了main函数'); await runner.main(); } diff --git a/lib/main_sky_full.dart b/lib/main_sky_full.dart index ab526bfb..2a8188d5 100755 --- a/lib/main_sky_full.dart +++ b/lib/main_sky_full.dart @@ -1,8 +1,10 @@ +import 'app_settings/app_settings.dart'; import 'flavors.dart'; import 'main.dart' as runner; Future main() async { F.appFlavor = Flavor.sky; + AppLog.log('sky_full调用了main函数'); await runner.main(); } diff --git a/lib/main_sky_lite.dart b/lib/main_sky_lite.dart index 3c0a2b0b..80f60e49 100755 --- a/lib/main_sky_lite.dart +++ b/lib/main_sky_lite.dart @@ -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 main() async { F.appFlavor = Flavor.sky; F.isLite = true; + AppLog.log('sky_lite调用了main函数'); await runner.main(); } diff --git a/lib/main_xhj_full.dart b/lib/main_xhj_full.dart index 8f92a4f0..76db6238 100755 --- a/lib/main_xhj_full.dart +++ b/lib/main_xhj_full.dart @@ -1,8 +1,10 @@ +import 'app_settings/app_settings.dart'; import 'flavors.dart'; import 'main.dart' as runner; Future main() async { F.appFlavor = Flavor.xhj; + AppLog.log('xhj_full调用了main函数'); await runner.main(); } diff --git a/lib/main_xhj_lite.dart b/lib/main_xhj_lite.dart index 7546bbe0..9b6a97c6 100755 --- a/lib/main_xhj_lite.dart +++ b/lib/main_xhj_lite.dart @@ -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 main() async { F.appFlavor = Flavor.xhj; F.isLite = true; + AppLog.log('xhj_lite调用了main函数'); await runner.main(); } diff --git a/lib/mine/addLock/nearbyLock/nearbyLock_logic.dart b/lib/mine/addLock/nearbyLock/nearbyLock_logic.dart index 2477cb87..f34fa137 100755 --- a/lib/mine/addLock/nearbyLock/nearbyLock_logic.dart +++ b/lib/mine/addLock/nearbyLock/nearbyLock_logic.dart @@ -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 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(); } + } diff --git a/lib/mine/addLock/nearbyLock/nearbyLock_page.dart b/lib/mine/addLock/nearbyLock/nearbyLock_page.dart index 32d252ca..37274cf2 100755 --- a/lib/mine/addLock/nearbyLock/nearbyLock_page.dart +++ b/lib/mine/addLock/nearbyLock/nearbyLock_page.dart @@ -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 with RouteAware { - final logic = Get.put(NearbyLockLogic()); - final state = Get.find().state; + final NearbyLockLogic logic = Get.put(NearbyLockLogic()); + final NearbyLockState state = Get.find().state; @override Widget build(BuildContext context) { @@ -31,7 +32,7 @@ class _NearbyLockPageState extends State with RouteAware { barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr, haveBack: true, backgroundColor: AppColors.mainColor, - actionsList: [ + actionsList: [ CupertinoActivityIndicator( radius: 18.w, color: Colors.white, @@ -44,7 +45,7 @@ class _NearbyLockPageState extends State with RouteAware { backgroundColor: Colors.white, iconColor: AppColors.blackColor, titleColor: AppColors.blackColor, - actionsList: [ + actionsList: [ CupertinoActivityIndicator( radius: 18.w, color: AppColors.blackColor, @@ -52,20 +53,18 @@ class _NearbyLockPageState extends State with RouteAware { SizedBox(width: 30.w) ]), ), - body: Obx(() { - return listView(); - }), + body: Obx(listView), ); } Widget listView() { return Column( crossAxisAlignment: CrossAxisAlignment.start, - children: [ + children: [ 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 with RouteAware { return GestureDetector( onTap: ((scanResult.advertisementData.serviceUuids.isNotEmpty ? scanResult.advertisementData.serviceUuids[0] - : "") + : '') .toString()[33] == - "1") + '1') ? action : null, child: Column( - children: [ + children: [ Container( height: 89.h, width: 1.sw, color: Colors.white, child: Row( - children: [ + children: [ SizedBox(width: 20.w), Image.asset( lockTypeIcon, @@ -132,7 +131,7 @@ class _NearbyLockPageState extends State with RouteAware { Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, - children: [ + children: [ // 第32、33两位00 表示休眠, 01表示唤醒 Text(scanResult.advertisementData.advName, style: TextStyle( @@ -141,9 +140,9 @@ class _NearbyLockPageState extends State with RouteAware { .isNotEmpty ? scanResult.advertisementData .serviceUuids[0] - : "") + : '') .toString()[33] == - "1") + '1') ? AppColors.blackColor : Colors.grey)), ], @@ -152,7 +151,7 @@ class _NearbyLockPageState extends State 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: [ 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: [ Padding( padding: EdgeInsets.only(top: 20.h, bottom: 10.h), child: Text( @@ -283,7 +280,7 @@ class OTAProgressDialog extends StatelessWidget { ), ), Row( - children: [ + children: [ Text( '传输中'.tr, style: TextStyle(fontSize: 18.sp, color: AppColors.mainColor), @@ -300,7 +297,7 @@ class OTAProgressDialog extends StatelessWidget { ), ], ), - actions: [ + actions: [ TextButton( onPressed: () { logic.closeOTADAta(); diff --git a/lib/mine/mineSet/authorizedAdministrator/administratorAssociationLock/administratorAssociationLock_page.dart b/lib/mine/mineSet/authorizedAdministrator/administratorAssociationLock/administratorAssociationLock_page.dart index 5b07ec57..3ea55476 100644 --- a/lib/mine/mineSet/authorizedAdministrator/administratorAssociationLock/administratorAssociationLock_page.dart +++ b/lib/mine/mineSet/authorizedAdministrator/administratorAssociationLock/administratorAssociationLock_page.dart @@ -34,16 +34,17 @@ class _AdministratorAssociationLockPageState barTitle: '锁'.tr, haveBack: true, backgroundColor: AppColors.mainColor, - actionsList: [ - IconButton( - icon: Image.asset( - 'images/icon_bar_more.png', - height: 30.h, - width: 10.w, - ), - onPressed: logic.openModalBottomSheet, - ), - ], + // 功能未做 先隐藏下个版本修改 + // actionsList: [ + // IconButton( + // icon: Image.asset( + // 'images/icon_bar_more.png', + // height: 30.h, + // width: 10.w, + // ), + // onPressed: logic.openModalBottomSheet, + // ), + // ], ), body: Obx(_buildListView), ); diff --git a/lib/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetails_logic.dart b/lib/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetails_logic.dart index ad73303a..5b9c293d 100755 --- a/lib/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetails_logic.dart +++ b/lib/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetails_logic.dart @@ -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, diff --git a/lib/network/api_provider.dart b/lib/network/api_provider.dart index 3d909bc4..0c41a23b 100755 --- a/lib/network/api_provider.dart +++ b/lib/network/api_provider.dart @@ -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 })); diff --git a/lib/network/api_repository.dart b/lib/network/api_repository.dart index d48ab024..454e7fb8 100755 --- a/lib/network/api_repository.dart +++ b/lib/network/api_repository.dart @@ -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 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); } diff --git a/lib/tools/appFirstEnterHandle.dart b/lib/tools/appFirstEnterHandle.dart index 8699f57a..fef9dd99 100755 --- a/lib/tools/appFirstEnterHandle.dart +++ b/lib/tools/appFirstEnterHandle.dart @@ -70,6 +70,7 @@ class AppFirstEnterHandle { } Future getAppInfo() async { + AppLog.log('AppFirstEnterHandle调用了获取App信息接口'); final GetAppInfo entity = await ApiRepository.to.getAppInfo(); CustomerTool.init(entity.data?.wechatServiceUrl ?? ''); WxPayTool.setAssociationUrl(entity.data!.appSiteUrl!); diff --git a/lib/widget/permission/permission_dialog.dart b/lib/widget/permission/permission_dialog.dart index 2a01642b..c15f1737 100755 --- a/lib/widget/permission/permission_dialog.dart +++ b/lib/widget/permission/permission_dialog.dart @@ -282,6 +282,7 @@ class PermissionDialog { //显示权限判断申请框 static Future request(Permission permission, [String? content]) async { + AppLog.log('context:${content}'); if (Get.context == null) { return false; } diff --git a/pre_build.sh b/pre_build.sh index ae698199..f996e68c 100755 --- a/pre_build.sh +++ b/pre_build.sh @@ -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"