web优化
This commit is contained in:
parent
d884436dcf
commit
1c0ebd3e64
|
|
@ -1,5 +1,5 @@
|
|||
class NetworkConfig {
|
||||
static String ServerDomain_Online = BASE_URLS_TEST[SELECT_INDEX];
|
||||
static String ServerDomain_Online = BASE_URLS[SELECT_INDEX];
|
||||
static String deviceID = ""; //设备ID
|
||||
static String systemVersion = ""; //设备ID
|
||||
|
||||
|
|
|
|||
|
|
@ -49,13 +49,15 @@ class HomeModel {
|
|||
|
||||
///设备列表
|
||||
Future<void> odfPortsUnitType() async {
|
||||
List<String> list = [];
|
||||
RequestCenter.instance.requestGet(NetworkConfig.odfPortsUnitType, {}, (dataEntity) {
|
||||
if (dataEntity.code == 200) {
|
||||
List<DeviceListBean> data = (dataEntity.data as List<dynamic>).map((e) => DeviceListBean.fromJson(e as Map<String, dynamic>)).toList();
|
||||
|
||||
for (var element in data) {
|
||||
NetworkConfig.diverItems.add("${element.dictValue}");
|
||||
list.add("${element.dictValue}");
|
||||
}
|
||||
|
||||
NetworkConfig.diverItems = list;
|
||||
}
|
||||
}, (errorEntity) {
|
||||
print("errorEntity==${errorEntity.msg}");
|
||||
|
|
@ -64,13 +66,14 @@ class HomeModel {
|
|||
|
||||
///业务类型
|
||||
Future<void> odfPortsBusinessType() async {
|
||||
List<String> list = [];
|
||||
RequestCenter.instance.requestGet(NetworkConfig.odfPortsBusinessType, {}, (dataEntity) {
|
||||
if (dataEntity.code == 200) {
|
||||
List<DeviceListBean> data = (dataEntity.data as List<dynamic>).map((e) => DeviceListBean.fromJson(e as Map<String, dynamic>)).toList();
|
||||
|
||||
for (var element in data) {
|
||||
NetworkConfig.businessItems.add("${element.dictValue}");
|
||||
list.add("${element.dictValue}");
|
||||
}
|
||||
NetworkConfig.businessItems = list;
|
||||
}
|
||||
}, (errorEntity) {
|
||||
print("errorEntity==${errorEntity.msg}");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user