| | |
| | | [self.logoutBtn setEnabled: NO]; |
| | | |
| | | [self checkEZIsLogin]; |
| | | |
| | | // self.addButton=nil; |
| | | self.addButton=[[UIBarButtonItem alloc] init]; |
| | | // self.addButton=[UIImage imageNamed:@""]; |
| | | } |
| | | |
| | | |
| | |
| | | return; |
| | | } |
| | | [weakSelf.deviceList removeAllObjects]; |
| | | [weakSelf.deviceList addObjectsFromArray:deviceList]; |
| | | HDLEZLog(@"获取到的设备列表:%@",deviceList); |
| | | NSMutableArray *finalDeviceList=[NSMutableArray arrayWithArray:deviceList]; |
| | | if (self.filterTypes&&self.filterTypes.count!=0) {//判断是否需要过滤 |
| | | for (EZDeviceInfo *deviceInfo in deviceList) { |
| | | HDLEZLog(@"获取到的设备列表category:%@",deviceInfo.category); |
| | | if ([self.filterTypes containsObject:[HDLEZConstants turnNil:deviceInfo.category]]) { |
| | | [finalDeviceList removeObject:deviceInfo]; |
| | | } |
| | | } |
| | | } |
| | | [weakSelf.deviceList addObjectsFromArray:finalDeviceList]; |
| | | [weakSelf.tableView reloadData]; |
| | | [weakSelf.tableView.header endRefreshing]; |
| | | if (weakSelf.deviceList.count == totalCount) |
| | |
| | | // [weakSelf.view makeToast:error.description duration:2.0 position:@"bottom"]; |
| | | // return; |
| | | // } |
| | | [weakSelf.deviceList addObjectsFromArray:deviceList]; |
| | | |
| | | NSMutableArray *finalDeviceList=[NSMutableArray arrayWithArray:deviceList]; |
| | | if (self.filterTypes&&self.filterTypes.count!=0) {//判断是否需要过滤 |
| | | for (EZDeviceInfo *deviceInfo in deviceList) { |
| | | if ([self.filterTypes containsObject:[HDLEZConstants turnNil:deviceInfo.category]]) { |
| | | [finalDeviceList removeObject:deviceInfo]; |
| | | } |
| | | } |
| | | } |
| | | [weakSelf.deviceList addObjectsFromArray:finalDeviceList]; |
| | | // [weakSelf.deviceList addObjectsFromArray:deviceList]; |
| | | [weakSelf.tableView reloadData]; |
| | | [weakSelf.tableView.footer endRefreshing]; |
| | | if (weakSelf.deviceList.count == totalCount) |