完成网关配网功能

This commit is contained in:
魏少阳 2024-10-08 18:22:31 +08:00
parent 219c70d3cc
commit 427503c10b
6 changed files with 17 additions and 17 deletions

View File

@ -77,7 +77,7 @@ class _GatewayConfigurationWifiPageState extends State<GatewayConfigurationWifiP
), ),
CommonItem( CommonItem(
leftTitel: '网络MAC'.tr, leftTitel: '网络MAC'.tr,
rightTitle: state.gatewayModel.wifiMac, rightTitle: state.gatewayModel.mac,
// allHeight: 100.h, // allHeight: 100.h,
isHaveLine: false), isHaveLine: false),
// SizedBox( // SizedBox(

View File

@ -14,6 +14,7 @@ class GatewayConfigurationWifiState{
if (map['gatewayModel'] != null && map['gatewayModel'] != '') { if (map['gatewayModel'] != null && map['gatewayModel'] != '') {
gatewayModel = map['gatewayModel']; gatewayModel = map['gatewayModel'];
// AppLog.log('gatewayModel.mac:${gatewayModel.mac} gatewayModel.mac:${gatewayModel.mac}');
} }
} }

View File

@ -72,12 +72,14 @@ class SelectGatewayListLogic extends BaseGetXController {
index = index + 20; index = index + 20;
AppLog.log('软件版本 gatewayVersion:$gatewayVersion gatewayVersionStr:$gatewayVersionStr'); AppLog.log('软件版本 gatewayVersion:$gatewayVersion gatewayVersionStr:$gatewayVersionStr');
// // wifiMac地址
final List<int> wifiMac = reply.data.sublist(index, index + 20); // final List<int> wifiMac = reply.data.sublist(index, index + 20);
final String wifiMacStr = utf8String(wifiMac); // final String wifiMacStr = utf8String(wifiMac);
// lockInfo['wifiMac'] = wifiMacStr; // // lockInfo['wifiMac'] = wifiMacStr;
gatewayModel.wifiMac = wifiMacStr; // gatewayModel.wifiMac = wifiMacStr;
index = index + 20; // index = index + 20;
// AppLog.log('wifiMac地址 wifiMac:$wifiMac wifiMacStr:$wifiMacStr');
gatewayModel.wifiMac = '00:00:00:00:00:00';
Get.toNamed(Routers.gatewayGetWifiListPage, arguments: { Get.toNamed(Routers.gatewayGetWifiListPage, arguments: {
'gatewayModel':gatewayModel, 'gatewayModel':gatewayModel,

View File

@ -68,7 +68,7 @@ class _GatewayDetailPageState extends State<GatewayDetailPage> {
isHaveDirection: false), isHaveDirection: false),
CommonItem( CommonItem(
leftTitel: '网络MAC'.tr, leftTitel: '网络MAC'.tr,
rightTitle: state.getewayItemData.value.networkMac, rightTitle: state.getewayItemData.value.gatewayMac,
isHaveLine: false, isHaveLine: false,
isHaveDirection: false), isHaveDirection: false),
SizedBox( SizedBox(

View File

@ -24,14 +24,11 @@ class _GatewayListPageState extends State<GatewayListPage> {
final GatewayListState state = Get.find<GatewayListLogic>().state; final GatewayListState state = Get.find<GatewayListLogic>().state;
Future<void> getHttpData({required bool isRefresh}) async { Future<void> getHttpData({required bool isRefresh}) async {
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); logic.getGatewayListData(isRefresh: isRefresh).then((GetewayDataEntity value) {
if (isDemoMode == false) { if (mounted) {
logic.getGatewayListData(isRefresh: isRefresh).then((GetewayDataEntity value) { setState(() {});
if (mounted) { }
setState(() {}); });
}
});
}
} }
@override @override

View File

@ -94,7 +94,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# 1.0.80+2024091901添加网关功能给谢敬调试 # 1.0.80+2024091901添加网关功能给谢敬调试
# 1.0.80+2024091902网关功能去掉网关通信不够16倍数凑够16倍数功能 # 1.0.80+2024091902网关功能去掉网关通信不够16倍数凑够16倍数功能
version: 1.0.80+2024100801 version: 1.0.80+2024100803
environment: environment:
sdk: '>=2.12.0 <3.0.0' sdk: '>=2.12.0 <3.0.0'