完善添加锁流程,添加长按闭锁功能

This commit is contained in:
魏少阳 2024-01-08 17:58:19 +08:00
parent b8278db9ef
commit 8c2fdf6d8a
19 changed files with 194 additions and 102 deletions

View File

@ -61,7 +61,14 @@ class BlueManage {
_sendStreamSubscription ??= EventBusManager().eventBus!.on<EventSendModel>().listen((EventSendModel model) { _sendStreamSubscription ??= EventBusManager().eventBus!.on<EventSendModel>().listen((EventSendModel model) {
if (model.sendChannel == DataChannel.ble) { if (model.sendChannel == DataChannel.ble) {
// managerAppWriteData(model.data); // managerAppWriteData(model.data);
writeCharacteristicWithResponse(model.data); _flutterReactiveBle!.statusStream.listen((status) {
if (status == BleStatus.ready) {
//
writeCharacteristicWithResponse(model.data);
}else{
Get.log("写入数据 蓝牙未开启,不能进行蓝牙操作");
}
});
} }
}); });
} }
@ -69,43 +76,57 @@ class BlueManage {
/// ///
void startScan({List<Uuid>? idList}) { void startScan({List<Uuid>? idList}) {
// List<Service>? list = _flutterReactiveBle!.getDiscoveredServices("deviceId").then((value)); // List<Service>? list = _flutterReactiveBle!.getDiscoveredServices("deviceId").then((value));
_flutterReactiveBle!.statusStream.listen((status) {
scanDevices.clear(); if (status == BleStatus.ready) {
_scanSubscription = _flutterReactiveBle!.scanForDevices(withServices:[]).listen((device) { //
// scanDevices.clear();
if (device.name.isEmpty) { _scanSubscription = _flutterReactiveBle!.scanForDevices(withServices:[]).listen((device) {
return; //
if (device.name.isEmpty) {
return;
}
print("startScanDevice:$device");
if (((device.serviceUuids.isNotEmpty ? device.serviceUuids[0] : "").toString().contains("758824")) && (device.rssi >= -100)) {
// id相同的元素
final knownDeviceIndex = scanDevices.indexWhere((d) => d.id == device.id);
// -1
if (knownDeviceIndex >= 0) {
scanDevices[knownDeviceIndex] = device;
} else {
scanDevices.add(device);
}
EventBusManager().eventBusFir(scanDevices);
}
}, onError: (Object e) {
print('Device scan fails with error: $e');
});
}else{
Get.log("开始扫描 蓝牙未开启,不能进行蓝牙操作");
} }
print("startScanDevice:$device");
if (((device.serviceUuids.isNotEmpty ? device.serviceUuids[0] : "").toString().contains("758824")) && (device.rssi >= -100)) {
// id相同的元素
final knownDeviceIndex = scanDevices.indexWhere((d) => d.id == device.id);
// -1
if (knownDeviceIndex >= 0) {
scanDevices[knownDeviceIndex] = device;
} else {
scanDevices.add(device);
}
EventBusManager().eventBusFir(scanDevices);
}
}, onError: (Object e) {
print('Device scan fails with error: $e');
}); });
} }
/// ///
Future<void> bludSendData(String deviceName, ConnectStateCallBack stateCallBack, {bool isAddEquipment = false}) async { Future<void> bludSendData(String deviceName, ConnectStateCallBack stateCallBack, {bool isAddEquipment = false}) async {
if(deviceConnectionState != DeviceConnectionState.connected){ _flutterReactiveBle!.statusStream.listen((status) {
if(isAddEquipment == false){ if (status == BleStatus.ready) {
startScan(); //
} if(deviceConnectionState != DeviceConnectionState.connected){
if(isAddEquipment == false){
startScan();
}
_connect(deviceName, (state){ _connect(deviceName, (state){
stateCallBack(deviceConnectionState!); stateCallBack(deviceConnectionState!);
}); });
}else{ }else{
stateCallBack(deviceConnectionState!); stateCallBack(deviceConnectionState!);
} }
}else{
Get.log("调用发送数据 蓝牙未开启,不能进行蓝牙操作");
}
});
} }
/// ///

View File

@ -501,18 +501,18 @@ class LockSetLogic extends BaseGetXController {
if (entity.errorCode!.codeIsSuccessful) { if (entity.errorCode!.codeIsSuccessful) {
Get.back(); Get.back();
if(BlueManage().deviceConnectionState == DeviceConnectionState.connected){ // if(BlueManage().deviceConnectionState == DeviceConnectionState.connected){
// // //
// // //
if (state.lockSetInfoData.value.lockBasicInfo!.isLockOwner == 1) { // if (state.lockSetInfoData.value.lockBasicInfo!.isLockOwner == 1) {
// // //
factoryDataResetAction(); // factoryDataResetAction();
} else { // } else {
// // //
deletUserAction(); // deletUserAction();
} // }
return; // return;
} // }
if (state.currentDeviceUUid.value.isNotEmpty) { if (state.currentDeviceUUid.value.isNotEmpty) {
// //
@ -539,6 +539,7 @@ class LockSetLogic extends BaseGetXController {
}else{ }else{
// //
if (state.currentDeviceUUid.isNotEmpty) { if (state.currentDeviceUUid.isNotEmpty) {
BlueManage().stopScan();
// //
if(state.deletWaitScanTimer != null){ if(state.deletWaitScanTimer != null){
state.deletWaitScanTimer!.cancel(); state.deletWaitScanTimer!.cancel();
@ -546,7 +547,6 @@ class LockSetLogic extends BaseGetXController {
if(state.deletWaitScanCompleter != null){ if(state.deletWaitScanCompleter != null){
state.deletWaitScanCompleter!.complete(); state.deletWaitScanCompleter!.complete();
} }
BlueManage().stopScan();
dismissEasyLoading(); dismissEasyLoading();
deletLockLogic(); deletLockLogic();

View File

@ -306,7 +306,7 @@ class LockDetailLogic extends BaseGetXController {
// updateLockUserNo(); // updateLockUserNo();
if (state.isOpenLockNeedOnline.value == 0) { if (state.isOpenLockNeedOnline.value == 0) {
openDoorAction(); openDoorAction(1);
} else { } else {
getLockNetToken(); getLockNetToken();
} }
@ -407,7 +407,7 @@ class LockDetailLogic extends BaseGetXController {
} }
// //
Future<void> openDoorAction() async { Future<void> openDoorAction(int openMode) async {
showBlueConnetctToastTimer(action:() { showBlueConnetctToastTimer(action:() {
state.openLockBtnState.value = 0; state.openLockBtnState.value = 0;
// state.animationController.reset(); // state.animationController.reset();
@ -428,7 +428,7 @@ class LockDetailLogic extends BaseGetXController {
IoSenderManage.senderOpenLock( IoSenderManage.senderOpenLock(
keyID: BlueManage().connectDeviceName, keyID: BlueManage().connectDeviceName,
userID: await Storage.getUid(), userID: await Storage.getUid(),
openMode: 1, openMode: openMode,
openTime: DateTime.now().millisecondsSinceEpoch ~/ 1000, openTime: DateTime.now().millisecondsSinceEpoch ~/ 1000,
onlineToken: state.lockNetToken, onlineToken: state.lockNetToken,
token: getTokenList, token: getTokenList,
@ -542,6 +542,7 @@ class LockDetailLogic extends BaseGetXController {
if(state.openLockBtnState.value == 1){ if(state.openLockBtnState.value == 1){
return; return;
} }
state.iSOpenLock.value = true;
state.iSClosedUnlockSuccessfulPopup.value = false; state.iSClosedUnlockSuccessfulPopup.value = false;
state.openLockBtnState.value = 1; state.openLockBtnState.value = 1;
state.animationController.forward(); state.animationController.forward();
@ -552,7 +553,7 @@ class LockDetailLogic extends BaseGetXController {
} else { } else {
if (state.isOpenLockNeedOnline.value == 0) { if (state.isOpenLockNeedOnline.value == 0) {
// //
openDoorAction(); openDoorAction(1);
} else { } else {
// //
getLockNetToken(); getLockNetToken();
@ -560,6 +561,23 @@ class LockDetailLogic extends BaseGetXController {
} }
} }
startUnLock() {
if(state.openLockBtnState.value == 1){
return;
}
state.iSOpenLock.value = false;
state.iSClosedUnlockSuccessfulPopup.value = false;
state.openLockBtnState.value = 1;
state.animationController.forward();
if (state.lockUserNo == 0) {
// lockUserNo为0
addUserConnectBlue();
} else {
openDoorAction(32);
}
}
longPressCloseDoor(){ longPressCloseDoor(){
} }
@ -571,7 +589,7 @@ class LockDetailLogic extends BaseGetXController {
if (entity.errorCode!.codeIsSuccessful) { if (entity.errorCode!.codeIsSuccessful) {
state.lockNetToken = entity.data!.token!; state.lockNetToken = entity.data!.token!;
print("state.lockNetToken:${state.lockNetToken}"); print("state.lockNetToken:${state.lockNetToken}");
openDoorAction(); openDoorAction(1);
} }
} }
@ -582,7 +600,7 @@ class LockDetailLogic extends BaseGetXController {
lockUserNo: state.lockUserNo.toString()); lockUserNo: state.lockUserNo.toString());
if (entity.errorCode!.codeIsSuccessful) { if (entity.errorCode!.codeIsSuccessful) {
if (state.isOpenLockNeedOnline.value == 0) { if (state.isOpenLockNeedOnline.value == 0) {
openDoorAction(); openDoorAction(1);
} else { } else {
getLockNetToken(); getLockNetToken();
} }

View File

@ -76,32 +76,37 @@ class _LockDetailPageState extends State<LockDetailPage>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Stack(children: [ return ListView(
Container( children: [
width: 1.sw, Stack(children: [
height: 1.sh - ScreenUtil().statusBarHeight * 2, Container(
color: Colors.white, width: 1.sw,
child: Column( height: 1.sh - ScreenUtil().statusBarHeight * 2,
children: [ color: Colors.white,
topWidget(), child: Column(
Expanded(child: Obx(() => bottomWidget())), children: [
], topWidget(),
), Expanded(child: Obx(() => bottomWidget())),
), ],
Obx(() => Visibility(
visible: state.iSClosedUnlockSuccessfulPopup.value,
child: GestureDetector(
onTap: () {
state.iSClosedUnlockSuccessfulPopup.value = false;
},
child: Container(
width: 1.sw,
height: 1.sh,
color: Colors.black.withOpacity(0.3),
child: _unlockSuccessWidget()),
), ),
)) ),
]); Obx(() => Visibility(
visible: state.iSClosedUnlockSuccessfulPopup.value,
// visible: true,
child: GestureDetector(
onTap: () {
state.iSClosedUnlockSuccessfulPopup.value = false;
},
child: Container(
width: 1.sw,
height: 1.sh - ScreenUtil().statusBarHeight * 2,
color: Colors.black.withOpacity(0.3),
child: _unlockSuccessWidget()),
),
))
]),
],
);
} }
Widget topWidget() { Widget topWidget() {
@ -170,8 +175,8 @@ class _LockDetailPageState extends State<LockDetailPage>
logic.startOpenLock(); logic.startOpenLock();
}, },
onLongPressStart: (details) { onLongPressStart: (details) {
Get.log("长按"); Get.log("长按");
// logic.startConnect(); logic.startUnLock();
}, },
)), )),
], ],
@ -556,12 +561,12 @@ class _LockDetailPageState extends State<LockDetailPage>
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
Image.asset( Image.asset(
'images/main/unlocked_bg.png', state.iSOpenLock.value == true ? 'images/main/unlocked_bg.png' : 'images/main/locked_bg.png',
width: 358.w, width: 358.w,
height: 348.h, height: 348.h,
), ),
Positioned( Positioned(
top: 1.sh / 2 - 70.h, top: (1.sh - ScreenUtil().statusBarHeight * 2)/ 2,
child: Column( child: Column(
children: [ children: [
Text( Text(

View File

@ -30,6 +30,7 @@ class LockDetailState {
var ifCurrentScreen = true.obs; // , var ifCurrentScreen = true.obs; // ,
var iSClosedUnlockSuccessfulPopup = false.obs; // var iSClosedUnlockSuccessfulPopup = false.obs; //
var iSOpenLock = true.obs; //
Timer? closedUnlockSuccessfulTimer; Timer? closedUnlockSuccessfulTimer;
// //

View File

@ -5,6 +5,7 @@ import 'package:get/get.dart';
import 'package:star_lock/talk/call/callTalk.dart'; import 'package:star_lock/talk/call/callTalk.dart';
import '../../../../app_settings/app_colors.dart'; import '../../../../app_settings/app_colors.dart';
import '../../../../login/seletCountryRegion/common/index.dart';
import '../../../../talk/udp/udp_manage.dart'; import '../../../../talk/udp/udp_manage.dart';
import '../../../../talk/udp/udp_senderManage.dart'; import '../../../../talk/udp/udp_senderManage.dart';
import '../../../../tools/showTFView.dart'; import '../../../../tools/showTFView.dart';
@ -157,8 +158,7 @@ class _LockMonitoringPageState extends State<LockMonitoringPage> {
Widget bottomBottomBtnWidget() { Widget bottomBottomBtnWidget() {
return Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ return Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
// //
Obx(() => bottomBtnItemWidget( Obx(() => bottomBtnItemWidget(getAnswerBtnImg(), getAnswerBtnName(), Colors.white, () async {
getAnswerBtnImg(), getAnswerBtnName(), Colors.white, () async {
// //
await logic.getPermissionStatus().then((value) async { await logic.getPermissionStatus().then((value) async {
if (!value) { if (!value) {
@ -274,8 +274,17 @@ class _LockMonitoringPageState extends State<LockMonitoringPage> {
return; return;
} }
List<int> numbers = state.passwordTF.text.split('').map((char) => int.parse(char)).toList(); // List<int> numbers = state.passwordTF.text.split('').map((char) => int.parse(char)).toList();
// //
// lockID
List<int> numbers = [];
List<int> lockIDData = utf8.encode(state.passwordTF.text);
numbers.addAll(lockIDData);
// topBytes = getFixedLengthList(lockIDData, 20 - lockIDData.length);
for (int i = 0; i < 6 - lockIDData.length; i++) {
numbers.add(0);
}
print("numbersnumbersnumbers:$numbers");
logic.udpOpenDoorAction(numbers); logic.udpOpenDoorAction(numbers);
}, },
cancelClick: () { cancelClick: () {

View File

@ -116,15 +116,17 @@ class LockMainLogic extends BaseGetXController {
if (connectResult == ConnectivityResult.mobile) { if (connectResult == ConnectivityResult.mobile) {
// _netType = "4G"; // _netType = "4G";
print("4G 4G 4G 4G 4G"); state.networkConnectionStatus.value = 1;
// print("4G 4G 4G 4G 4G");
} else if (connectResult == ConnectivityResult.wifi) { } else if (connectResult == ConnectivityResult.wifi) {
// _netType = "wifi"; // _netType = "wifi";
print("wifi wifi wifi wifi wifi"); state.networkConnectionStatus.value = 1;
// print("wifi wifi wifi wifi wifi");
} else { } else {
// _netType = "未连接"; // _netType = "未连接";
print("未连接 未连接 未连接 未连接 未连接"); state.networkConnectionStatus.value = 0;
// print("未连接 未连接 未连接 未连接 未连接");
} }
} }
/// ///
@ -137,6 +139,11 @@ class LockMainLogic extends BaseGetXController {
connectListener() async { connectListener() async {
Connectivity().onConnectivityChanged.listen((ConnectivityResult result) { Connectivity().onConnectivityChanged.listen((ConnectivityResult result) {
print("设置网络切换监听:$result"); print("设置网络切换监听:$result");
if(state.networkConnectionStatus.value == 0 && result != ConnectivityResult.none){
//
state.networkConnectionStatus.value = 1;
getStarLockInfo();
}
}); });
} }
@ -160,9 +167,9 @@ class LockMainLogic extends BaseGetXController {
// getLockInfo(); // getLockInfo();
// //
// connectListener(); connectListener();
// //
// getConnectType(); getConnectType();
getStarLockInfo(); getStarLockInfo();
} }

View File

@ -10,5 +10,8 @@ class LockMainState {
var dataLength = 100.obs; var dataLength = 100.obs;
var lockListInfoEntity = LockListInfoEntity().obs; var lockListInfoEntity = LockListInfoEntity().obs;
// 0 1
var networkConnectionStatus = 0.obs;
// late Timer timer; // late Timer timer;
} }

View File

@ -38,7 +38,7 @@ class _AbountPageState extends State<AbountPage> {
), ),
SizedBox(height: 20.h), SizedBox(height: 20.h),
Text( Text(
"星锁 1.0.0.03(preRelease-20240108)", "星锁 1.0.0.04(preRelease-20240108-1)",
style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor), style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
), ),
SizedBox( SizedBox(

View File

@ -131,6 +131,7 @@ class _AddLockSeletCountryPageState extends State<AddLockSeletCountryPage> {
"featureValue": state.featureValue, "featureValue": state.featureValue,
"featureSettingValue": state.featureSettingValue, "featureSettingValue": state.featureSettingValue,
"featureSettingParams": state.featureSettingParams, "featureSettingParams": state.featureSettingParams,
"isFromMap": 0,
}); });
}, },
), ),
@ -152,6 +153,7 @@ class _AddLockSeletCountryPageState extends State<AddLockSeletCountryPage> {
"featureValue": state.featureValue, "featureValue": state.featureValue,
"featureSettingValue": state.featureSettingValue, "featureSettingValue": state.featureSettingValue,
"featureSettingParams": state.featureSettingParams, "featureSettingParams": state.featureSettingParams,
"isFromMap": 0,
}); });
// Navigator.pushNamed(context, Routers.saveLockPage); // Navigator.pushNamed(context, Routers.saveLockPage);
}, },

View File

@ -50,6 +50,10 @@ class LockAddressGaoDeLogic extends BaseGetXController{
// ..startLocation(); // ..startLocation();
// } // }
void pushAddAction(){
}
@override @override
void onReady() { void onReady() {
// TODO: implement onReady // TODO: implement onReady

View File

@ -67,14 +67,18 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage> with RouteA
final status = await Permission.location.request(); final status = await Permission.location.request();
print("Permission.location.request()=status:$status"); print("Permission.location.request()=status:$status");
permissionStatus = status; permissionStatus = status;
if(Platform.isIOS){
_setLocationOption();
requestIOSLocation();
}
switch (status) { switch (status) {
case PermissionStatus.denied: case PermissionStatus.denied:
print("拒绝"); print("拒绝");
break; break;
case PermissionStatus.granted: case PermissionStatus.granted:
if(Platform.isIOS){ if(Platform.isIOS){
_setLocationOption(); // _setLocationOption();
requestIOSLocation(); // requestIOSLocation();
}else{ }else{
requestAndroidLocation(); requestAndroidLocation();
location.startLocation(); location.startLocation();
@ -83,6 +87,12 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage> with RouteA
case PermissionStatus.limited: case PermissionStatus.limited:
print("限制"); print("限制");
break; break;
case PermissionStatus.permanentlyDenied:
print("永久的否认");
break;
case PermissionStatus.provisional:
print("临时");
break;
default: default:
print("其他状态"); print("其他状态");
// requestLocation(); // requestLocation();
@ -264,6 +274,7 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage> with RouteA
"featureValue": state.featureValue, "featureValue": state.featureValue,
"featureSettingValue": state.featureSettingValue, "featureSettingValue": state.featureSettingValue,
"featureSettingParams": state.featureSettingParams, "featureSettingParams": state.featureSettingParams,
"isFromMap": 1,
}); });
// Navigator.pushNamed(context, Routers.saveLockPage); // Navigator.pushNamed(context, Routers.saveLockPage);
}, },

View File

@ -373,13 +373,16 @@ class NearbyLockLogic extends BaseGetXController {
_initReplySubscription(); _initReplySubscription();
_scanListDiscoveredDeviceSubscriptionAction(); _scanListDiscoveredDeviceSubscriptionAction();
state.ifCurrentScreen.value = true;
startScanBlueList();
} }
@override @override
void onInit() { void onInit() {
// TODO: implement onInit // TODO: implement onInit
super.onInit();
print("NearbyLockLogic onInit()"); print("NearbyLockLogic onInit()");
super.onInit();
} }
@override @override

View File

@ -145,14 +145,17 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
@override @override
void didPush() { void didPush() {
super.didPush(); super.didPush();
state.ifCurrentScreen.value = true; Get.log("NearbyLockLogic didPush()");
logic.startScanBlueList();
// state.ifCurrentScreen.value = true;
// logic.startScanBlueList();
} }
/// ///
@override @override
void didPop() { void didPop() {
super.didPop(); super.didPop();
Get.log("NearbyLockLogic didPop()");
state.ifCurrentScreen.value = false; state.ifCurrentScreen.value = false;
logic.cancelBlueConnetctToastTimer(); logic.cancelBlueConnetctToastTimer();
@ -163,6 +166,7 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
@override @override
void didPopNext() { void didPopNext() {
super.didPopNext(); super.didPopNext();
Get.log("NearbyLockLogic didPopNext()");
state.ifCurrentScreen.value = true; state.ifCurrentScreen.value = true;
logic.startScanBlueList(); logic.startScanBlueList();
@ -172,6 +176,7 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
@override @override
void didPushNext() { void didPushNext() {
super.didPushNext(); super.didPushNext();
Get.log("NearbyLockLogic didPushNext()");
state.ifCurrentScreen.value = false; state.ifCurrentScreen.value = false;
logic.cancelBlueConnetctToastTimer(); logic.cancelBlueConnetctToastTimer();

View File

@ -155,7 +155,7 @@ class SaveLockLogic extends BaseGetXController {
showBlueConnetctToast(); showBlueConnetctToast();
} }
} }
}); }, isAddEquipment: true);
} }
@ -204,7 +204,7 @@ class SaveLockLogic extends BaseGetXController {
if (entity.errorCode!.codeIsSuccessful) { if (entity.errorCode!.codeIsSuccessful) {
BlueManage().disconnect(BlueManage().connectDeviceMacAddress); BlueManage().disconnect(BlueManage().connectDeviceMacAddress);
eventBus.fire(RefreshLockListInfoDataEvent()); eventBus.fire(RefreshLockListInfoDataEvent());
Get.close(5); Get.close(state.isFromMap == 1 ? 5 : 6);
// Future.delayed(const Duration(milliseconds: 200), () { // Future.delayed(const Duration(milliseconds: 200), () {
// Get.offAllNamed(Routers.starLockMain); // Get.offAllNamed(Routers.starLockMain);
// }); // });
@ -231,6 +231,7 @@ class SaveLockLogic extends BaseGetXController {
void onClose() { void onClose() {
// TODO: implement onClose // TODO: implement onClose
_replySubscription.cancel(); _replySubscription.cancel();
BlueManage().stopScan();
super.onClose(); super.onClose();
} }
} }

View File

@ -16,6 +16,7 @@ class SaveLockState {
var featureValue = ''; var featureValue = '';
var featureSettingValue = ''; var featureSettingValue = '';
var featureSettingParams = []; var featureSettingParams = [];
var isFromMap = 0; // 0: 1:
var ifCurrentScreen = true.obs; // , var ifCurrentScreen = true.obs; // ,
var saveBtnIsUsable = true.obs; // var saveBtnIsUsable = true.obs; //
@ -31,6 +32,7 @@ class SaveLockState {
featureValue = map["featureValue"]; featureValue = map["featureValue"];
featureSettingValue = map["featureSettingValue"]; featureSettingValue = map["featureSettingValue"];
featureSettingParams = map["featureSettingParams"]; featureSettingParams = map["featureSettingParams"];
isFromMap = map["isFromMap"];
} }
void onClose() { void onClose() {

View File

@ -1,6 +1,6 @@
abstract class Api { abstract class Api {
// static String baseAddress = "https://pre.lock.star-lock.cn:8093"; // static String baseAddress = "https://pre.lock.star-lock.cn:8093"; //
static String baseAddress = "http://192.168.56.101:8099"; // // static String baseAddress = "http://192.168.56.101:8099"; //
// static String baseAddress = "http://192.168.1.15:8022"; // // static String baseAddress = "http://192.168.1.15:8022"; //
final String baseUrl = "$baseAddress/api"; final String baseUrl = "$baseAddress/api";

View File

@ -71,7 +71,7 @@ class CallTalk {
// 63 // 63
int getIframeIndex = int getIframeIndex =
bb[POS_iframe_index] + bb[POS_iframe_index + 1] * 256; bb[POS_iframe_index] + bb[POS_iframe_index + 1] * 256;
print('获取帧序号 getIframeIndex$getIframeIndex'); // print('获取帧序号 getIframeIndex$getIframeIndex');
// 65 // 65
// int alen = bb[POS_alen] & 0xff; // int alen = bb[POS_alen] & 0xff;
@ -84,10 +84,10 @@ class CallTalk {
// 71 // 71
int getBagIndex = bb[POS_bag_index] & 0xff; int getBagIndex = bb[POS_bag_index] & 0xff;
print('当前包号 getBagIndex$getBagIndex'); // print('当前包号 getBagIndex$getBagIndex');
// 69 // 69
int getBagNum = bb[POS_bag_num] & 0xff; int getBagNum = bb[POS_bag_num] & 0xff;
print('总包数 getBagNum$getBagNum'); // print('总包数 getBagNum$getBagNum');
// 73 // 73
int blen = bb[POS_blen] + bb[POS_blen + 1] * 256; int blen = bb[POS_blen] + bb[POS_blen + 1] * 256;
// print('数据长度 blen$blen'); // print('数据长度 blen$blen');

View File

@ -63,7 +63,7 @@ class BaseGetXController extends GetxController{
action(); action();
} }
cancelBlueConnetctToastTimer(); cancelBlueConnetctToastTimer();
if(isShowBlueConnetctToast == false){ if(isShowBlueConnetctToast == true){
showBlueConnetctToast(); showBlueConnetctToast();
} }
}); });